Communication method, device and system, computer equipment, and readable storage medium

By detecting the grip and occlusion status of the electronic device and adjusting the transmission power of the Bluetooth signal, the problem of inaccurate RSSI ranging caused by signal attenuation in complex scenarios is solved, and the accuracy and user experience of the automatic unlocking/locking function of the vehicle-mounted equipment are improved.

CN114339686BActive Publication Date: 2025-05-16GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111609136.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-05-16
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In complex scenarios, the signal attenuation of Bluetooth devices is large, resulting in weak RSSI detected by on-board devices, affecting the accuracy of automatic locking or unlocking operations.

Method used

By detecting the grip and occlusion state of the electronic device, the power compensation information is determined, and the transmission power of the short-distance communication signal is adjusted to compensate for signal attenuation and improve the accuracy of RSSI ranging.

Benefits of technology

It effectively compensates for signal attenuation caused by environmental factors, improves the accuracy and reliability of the automatic unlocking/locking function of vehicle-mounted equipment in complex environments, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114339686B_ABST
    Figure CN114339686B_ABST
Patent Text Reader

Abstract

This application relates to a communication method, communication device, electronic device, communication system, computer equipment, and computer-readable storage medium. The communication method includes: detecting the state of an electronic device, including a holding state and an obstruction state; determining power compensation information of the electronic device based on one of the holding state and the obstruction state; adjusting the transmission power of a short-range communication signal based on the power compensation information; and sending the power-adjusted short-range communication signal to an in-vehicle device to instruct the in-vehicle device to perform a functional operation. The electronic device can determine the power compensation information based on the current state and adjust the transmission power value of the electronic device based on the power compensation information, compensating for signal attenuation in short-range wireless communication caused by environmental factors. This can improve the accuracy of RSSI-based ranging and ensure that the electronic device, as a Bluetooth car key, can perform normal unlocking / locking operations on the in-vehicle device even in complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Bluetooth technology, and in particular to a communication method, a communication device, an electronic device, a communication system, a computer device, and a computer-readable storage medium. Background Art

[0002] With the development of Bluetooth technology, the application scenarios of Bluetooth devices are also increasing. For example, in related technologies, Bluetooth technology can be used to achieve automatic locking or unlocking operations of vehicle-mounted equipment, such as based on received signal strength indicator (RSSI) ranging.

[0003] However, electronic devices are generally placed in complex scenarios (for example, held, in a pocket, or in a backpack), and their signals are greatly attenuated. This can cause the RSSI detected by the vehicle-mounted device to be weak, and the RSSI ranging is not accurate enough, which seriously affects the automatic locking or unlocking operation of the vehicle-mounted device. Summary of the Invention

[0004] The embodiments of the present application provide a communication method, a communication device, an electronic device, a communication system, a computer device, and a computer-readable storage medium, which can compensate for the attenuation of Bluetooth signals caused by environmental factors and improve the accuracy of RSSI-based ranging.

[0005] In a first aspect, the present application provides a communication method, applied to an electronic device, the method comprising:

[0006] Acquiring a state of the electronic device, the state including a holding state and a blocking state;

[0007] determining power compensation information of the electronic device according to one of the holding state and the shielding state;

[0008] The transmission power of the short-range communication signal is adjusted according to the power compensation information, and the short-range communication signal with adjusted power is sent to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation includes a locking operation or an unlocking operation.

[0009] In a second aspect, the present application provides a communication method, applied to an in-vehicle device, the communication method comprising:

[0010] receiving a short-range communication signal transmitted by an electronic device at normal transmission power, the short-range communication signal carrying power compensation information; wherein the power compensation information is determined by the electronic device according to one of a holding state and an obstruction state of the electronic device;

[0011] Obtaining a received signal strength of the short-range communication signal;

[0012] A functional operation is performed according to the received signal strength and the power compensation information; wherein the functional operation at least includes a locking operation or an unlocking operation.

[0013] In a third aspect, the present application provides a communication device, applied to an electronic device, the communication device comprising:

[0014] A state acquisition module, configured to acquire the state of the electronic device, wherein the state includes a holding state and a blocking state;

[0015] a power compensation module, configured to determine power compensation information of the electronic device according to one of the holding state and the shielding state;

[0016] A power adjustment module is used to adjust the transmission power of the short-range communication signal according to the power compensation information, and transmit the short-range communication signal with adjusted power to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation includes at least a locking operation or an unlocking operation.

[0017] In a fourth aspect, the present application provides a communication device, applied to an in-vehicle device, the communication device comprising:

[0018] a receiving module, configured to receive a short-range communication signal transmitted by an electronic device at normal transmission power, the short-range communication signal carrying power compensation information; wherein the power compensation information is determined by the electronic device based on one of a holding state and an obstruction state of the electronic device;

[0019] An acquisition module, configured to acquire the received signal strength of the short-range communication signal;

[0020] An execution module is used to perform a functional operation according to the received signal strength and the power compensation information; wherein the functional operation at least includes a locking operation or an unlocking operation.

[0021] In a fifth aspect, the present application provides an electronic device, comprising: a radio frequency circuit, a display unit, a sensor unit, and a processor, wherein the processor is connected to the radio frequency circuit, the display unit, and the sensor unit, respectively, and the processor is configured to:

[0022] Acquiring a state of the electronic device based on the sensing unit, the state including a holding state and a blocking state;

[0023] determining power compensation information of the electronic device according to one of the holding state and the shielding state;

[0024] According to the power compensation information, the radio frequency circuit is controlled to adjust the transmission power of the short-range communication signal, and the short-range communication signal with adjusted power is sent to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation includes a locking operation or an unlocking operation.

[0025] In a fifth aspect, the present application provides a communication system, including:

[0026] An electronic device, configured to obtain a state of the electronic device, the state including a holding state and a shielding state, determine power compensation information of the electronic device based on one of the holding state and the shielding state, adjust the transmission power of the short-range communication signal based on the power compensation information, and send the short-range communication signal after the power adjustment to the vehicle-mounted device;

[0027] The vehicle-mounted device is connected to the electronic device and is used to receive the short-range communication signal sent by the electronic device and perform a functional operation according to the short-range communication signal, wherein the functional operation at least includes a locking operation or an unlocking operation.

[0028] In a sixth aspect, the present application provides a communication system, including:

[0029] Electronic equipment for transmitting short-range communication signals at normal transmission power;

[0030] A vehicle-mounted device, used to receive the short-range communication signal sent by the electronic device, the short-range communication signal carrying power compensation information, obtain the received signal strength of the short-range communication signal, and perform functional operations based on the received signal strength and the power compensation information; wherein the power compensation information is determined by the electronic device based on one of the holding state and the blocking state of the electronic device, and the functional operation includes at least a locking operation or an unlocking operation.

[0031] In a seventh aspect, the present application provides a computer device comprising a memory and a processor, wherein a computer program is stored in the memory, and wherein when the computer program is executed by the processor, the processor executes the steps of the aforementioned communication method.

[0032] In an eighth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the aforementioned communication method when executed by a processor.

[0033] The above-mentioned communication method, communication device, electronic device, communication system, computer device and computer-readable storage medium can detect the state of the electronic device, which includes a holding state and a blocking state. According to one of the holding state and the blocking state, the power compensation information of the electronic device is determined, the transmission power of the short-range communication signal is adjusted according to the power compensation information, and the short-range communication signal with adjusted power is sent to the vehicle-mounted device to instruct the vehicle-mounted device to perform a locking operation or an unlocking operation. The electronic device can determine the power compensation information of the electronic device based on the current state and adjust the normal transmission power value of the electronic device according to the power compensation information, compensating for the signal attenuation of short-range wireless communication caused by environmental factors, and can improve the accuracy of RSSI-based ranging, ensuring that the electronic device can be used as a Bluetooth car key to unlock / lock, welcome and other functional operations normally in complex environments, ensuring the normal function of the Bluetooth car key, and improving the user experience of using the electronic device as a Bluetooth car key to unlock and unlock the vehicle-mounted device (for example, the vehicle-mounted device). BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 A schematic diagram of an application environment of a communication method in one embodiment;

[0036] Figure 2 is a structural block diagram of an electronic device according to an embodiment;

[0037] Figure 3 is one of the flow charts of a communication method in one embodiment;

[0038] Figure 4 This is a second flow chart of a communication method in one embodiment;

[0039] Figure 5 Schematic diagram of the housing structure of an electronic device in one embodiment;

[0040] FIG6(A) is a schematic diagram of a first horizontal holding position of an electronic device (a left hand holding the top of the electronic device in horizontal position);

[0041] FIG6(B) is a schematic diagram of a second horizontal holding position of an electronic device (a posture of holding the top of the electronic device horizontally with the right hand);

[0042] Figure 7is a flow chart of step 304 in one embodiment;

[0043] Figure 8 This is a third flow chart of a communication method in one embodiment;

[0044] Figure 9 This is a fourth flowchart of a communication method in one embodiment;

[0045] Figure 10 This is a fifth flow chart of a communication method in one embodiment;

[0046] Figure 11 This is a sixth flowchart of a communication method in one embodiment;

[0047] Figure 12 This is one of the structural block diagrams of a communication device according to an embodiment;

[0048] Figure 13 This is a second structural block diagram of a communication device according to an embodiment;

[0049] Figure 14 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0051] It will be understood that the terms "first," "second," etc., used herein may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first horizontal screen grip may be referred to as a second horizontal screen grip, and similarly, a second horizontal screen grip may be referred to as a first horizontal screen grip without departing from the scope of this application. The first horizontal screen grip and the second horizontal screen grip are both horizontal screen grips, but they are not the same horizontal screen grip.

[0052] Figure 1 FIG. 1 is a schematic diagram of an application environment of a communication method in an embodiment. Figure 1 As shown, the application environment includes an electronic device 110 and an in-vehicle device 120. The execution subject of the communication method can be the electronic device 110 and the in-vehicle device 120. The electronic device 110 and the in-vehicle device 120 can be any terminal device such as a mobile phone, tablet computer, laptop computer, desktop computer, PDA (Personal Digital Assistant), in-vehicle device, POS (Point of Sales), wearable device, etc.

[0053] Alternatively, as Figure 2 As shown, electronic device 10 may include components such as a radio frequency (RF) circuit 101, a memory 102, an input unit 103, a display unit 104, a Bluetooth module 105, an audio circuit 106, a wireless fidelity (WIFI) module 107, a processor 108, a power supply 109, and a sensor unit 110. Processor 108 executes various functional applications and data processing by running applications stored in memory 102. Input unit 103 may be used to receive input of numbers, characters, or user characteristics (such as fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control. Display unit 104 may be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of electronic device 10. These graphical user interfaces may be composed of graphics, text, icons, videos, or any combination thereof. Audio circuit 106 may provide an audio interface between the user and electronic device 10 via a speaker and microphone. Wireless Fidelity (WiFi) is a short-range wireless transmission technology. The electronic device 10 can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 107, providing users with wireless broadband Internet access. The processor 108 is the control center of the electronic device 10. It uses various interfaces and lines to connect the various parts of the electronic device 10. By running or executing applications stored in the memory 102 and calling data stored in the memory 102, it executes various functions of the electronic device 10 and processes data, thereby monitoring the electronic device 10 as a whole. Those skilled in the art will understand that Figure 2 The terminal device structure shown does not constitute a limitation of the terminal device, and may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components. The Bluetooth module 105 supports Bluetooth functionality. Bluetooth technology is a radio technology that supports short-range communication between devices and enables wireless information exchange between a variety of wireless terminal devices, including smartphones, personal computers, laptops, tablets, portable wearable devices, in-vehicle devices, wireless headphones, wireless speakers, etc.

[0054] When the electronic device 110 and the in-vehicle device 120 establish a communication connection, they communicate over a frequency hopping channel. Optionally, the communication interaction may be Bluetooth communication interaction. When the electronic device 110 and the in-vehicle device 120 establish a Bluetooth communication connection, the electronic device 110 transmits a Bluetooth signal to the in-vehicle device 120 over the frequency hopping channel at a target transmit power. The in-vehicle device 120 may then perform a locking or unlocking action based on the received signal strength and the received signal strength value and a preset threshold.

[0055] Figure 3 FIG. 1 is a flow chart of a communication method in one embodiment. Figure 3 As shown, the communication method is applied to an electronic device, and the communication method includes steps 302 to 306.

[0056] Step 302: Acquire the state of the electronic device, where the state includes a holding state and a blocking state.

[0057] The state of the electronic device can be detected based on a sensing unit provided on the electronic device, or it can be detected by an external detection device. Among them, the state of the electronic device may include a holding state and a blocking state. In the embodiment of the present application, for the sake of convenience, the state of the electronic device is detected by a sensing unit provided on the electronic device as an example. The sensing unit includes a motion sensor (for example, an acceleration sensor, a gyroscope, a magnetic sensor, etc.), a motion sensor, a distance sensor, a light sensor, etc. Specifically, the electronic device can detect whether the electronic device is in a blocking state based on a distance sensor and / or a light sensor. If the electronic device is in a blocking state, it can be understood that the electronic device is placed in a closed or semi-closed environment such as a pocket, a backpack, a handbag, etc. The electronic device can detect whether the electronic device is in a holding state based on a motion sensor and / or a motion sensor. If the electronic device is in a holding state, it can be understood that the electronic device is held in the hand of the user, or placed on a holding bracket, etc.

[0058] Step 304: Determine power compensation information of the electronic device according to one of the holding state and the shielding state.

[0059] If the electronic device is in one of a held state and a blocked state. For example, when the electronic device is placed in a pocket, backpack, handbag or other scenes or is held, at a preset position away from the electronic device, the received signal indication information RSSI received by its on-board device will be significantly smaller than the received signal indication information of the electronic device in a normal state. In an embodiment of the present application, the electronic device will determine the power compensation information of the electronic device transmitting a short-range communication signal based on the current state. The short-range communication signal may be a Bluetooth signal. The power compensation information may include a compensation power value, which may be used to compensate for the power value attenuated by the electronic device when it is held or blocked relative to the normal state of the electronic device. The normal state can be understood as a state in which the electronic device is not held and is not blocked.

[0060] Step 306: Adjust the transmission power of the short-range communication signal according to the power compensation information, and send the short-range communication signal with adjusted power to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, which at least includes a locking operation or an unlocking operation.

[0061] The radio frequency circuit in the electronic device may also be provided with multiple antennas, including at least an antenna for supporting short-range wireless communication (e.g., Bluetooth communication). The electronic device may adjust the transmission power of the Bluetooth signal transmitted by the electronic device to the vehicle-mounted device according to the acquired power compensation information, and then transmit the Bluetooth signal to the vehicle-mounted device at the target transmission power to instruct the vehicle-mounted device to perform functional operations. The target transmission power can be understood as the sum of the compensation power value in the power compensation information and the normal transmission power. The normal transmission power is the transmission power value when the electronic device is in a normal state.

[0062] When an electronic device transmits a short-range communication signal to an onboard device at a target transmit power, the onboard device receives the short-range communication signal and calculates the received signal strength based on the received signal. This received signal strength meets a preset threshold for performing a function operation. Function operations may include locking, unlocking, or welcoming. The received signal strength can be represented by the received signal strength indicator (RSSI).

[0063] Among them, RSSI is inversely proportional to the distance in the absence of interference. The closer the distance between the electronic device and the vehicle-mounted device, the larger the RSSI value, and vice versa. Therefore, the RSSI value can be used to judge the distance between the electronic device and the vehicle-mounted device. The preset threshold of the signal strength corresponds to the preset distance value, so that the vehicle-mounted device can obtain the actual distance from the mobile electronic device based on the signal strength value, and perform a locking action or an unlocking action based on the comparison result of the actual distance and the preset threshold. Among them, the mapping relationship between the RSSI value and the distance can refer to the existing technology and will not be repeated here. Optionally, when the RSSI value is greater than the unlocking threshold, the unlocking action is performed; when the RSSI value is less than the locking threshold, the locking action is performed.

[0064] The above-mentioned communication method can obtain the state of the electronic device, wherein the state includes a holding state and a shielding state. According to one of the holding state and the shielding state, the power compensation information of the electronic device is determined, the transmission power of the short-range communication signal is adjusted according to the power compensation information, and the short-range communication signal with the adjusted power is sent to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation at least includes a locking operation or an unlocking operation. The electronic device can determine the power compensation information of the electronic device based on the current state and adjust the normal transmission power value of the electronic device according to the power compensation information, thereby compensating for the signal attenuation of short-range wireless communication caused by environmental factors, improving the accuracy of RSSI-based ranging, and ensuring that the electronic device can be used as a Bluetooth car key to unlock / lock, welcome guests, and other functions in complex environments. This ensures the normal function of the Bluetooth car key and improves the user experience of using the electronic device as a Bluetooth car key to unlock and unlock a vehicle-mounted device (e.g., a vehicle-mounted device).

[0065] Figure 4 FIG. 1 is a flow chart of a communication method in another embodiment. Figure 4 As shown, the communication method includes steps 402 to 408.

[0066] Step 402: Acquire the screen status of the electronic device, where the screen status includes a bright screen status and a black screen status.

[0067] The screen state of an electronic device may include a bright screen state and a black screen (off screen) state. Among them, the electronic device can detect the screen state, or it can detect the screen state of the electronic device based on other external detection devices and send the detection result to the electronic device. Whether the electronic device is in a bright screen state or a black screen state can be detected according to existing relevant technologies and will not be repeated in this application.

[0068] Step 404: If the screen state is the screen-on state, detect the holding state of the electronic device.

[0069] When the screen of the electronic device is in the bright screen state, the gripping state of the electronic device can be detected based on data collected by the motion sensor and pressure sensor inside the electronic device. When the electronic device is in the gripping state, at least part of the Bluetooth antenna is blocked.

[0070] like Figure 5As shown, for the sake of convenience, in the embodiment of the present application, the electronic device is taken as a mobile phone 10 as an example for description. The shell of the mobile phone 10 has a metal frame, which includes an upper frame 131, a lower frame 132, a left frame 133 and a right frame 134. The upper frame 131 can be set at the top of the mobile phone, the lower frame 132 can be set at the bottom of the mobile phone, and the two side frames 133 and 134 can be set on both sides of the mobile phone respectively. Multiple antennas are set on the metal frame, for example, 2G antennas, 3G antennas, 4G antennas, and 5G antennas for supporting data networks; as well as WIFI antennas, Bluetooth antennas, near field communication (NFC) antennas for short-range communication, etc. The top of the mobile phone can be provided with a front camera 135, an earpiece, a proximity light sensor and other devices, the bottom of the mobile phone can be provided with a USB charging port, a microphone, etc., and the mobile phone can be provided with a volume adjustment button and a power button.

[0071] The holding state may include horizontal screen holding and vertical screen holding. Specifically, several holding postures for horizontal screen holding may be shown in (A)-(B) in Figure 6. Among them, (A) in Figure 6 shows the first horizontal screen holding (the left hand holding the top of the mobile phone in horizontal screen), and (B) in Figure 6 shows the second horizontal screen holding (the right hand holding the top of the mobile phone in horizontal screen). Optionally, horizontal screen holding may also include the postures of holding the top and bottom of the mobile phone in horizontal screen with both hands and the postures of holding the middle and bottom of the mobile phone in horizontal screen with one hand. Among them, the horizontal screen holding scene may be a scene in which the user holds the electronic device in horizontal screen, which may include but is not limited to scenes such as the user holding the electronic device in horizontal screen to play games, the user holding the electronic device in horizontal screen to watch TV, etc. Vertical screen holding may include the postures of holding the bottom, top, and middle of the mobile phone in vertical screen with one hand, etc. The vertical screen holding scene may include but is not limited to scenes such as the user holding the electronic device in vertical screen to read, the user holding the electronic device in vertical screen to play games, and the user holding the electronic device in vertical screen to make a call, etc.

[0072] Since it is difficult for the antenna layout to take into account all communication methods, the Bluetooth antenna will be blocked in the horizontal holding state. Therefore, when the horizontal holding state is determined, the transmission power is increased to compensate for the attenuation of the horizontal screen holding. For the sake of convenience, the Bluetooth antenna 140 is set at the top of the mobile phone as an example. Specifically, the Bluetooth antenna can be set on the side frame 133 set near the upper frame 131. For example, the Bluetooth antenna can be set on the side frame near the front camera 135. When the holding state of the electronic device is in the first horizontal screen holding, its Bluetooth antenna is partially blocked; when the holding state of the electronic device is in the second horizontal screen holding, the Bluetooth antenna is completely blocked.

[0073] It should be noted that, in the embodiment of the present application, the holding posture of the electronic device can be determined based on the specific setting position of the antenna for supporting short-range wireless communication (for example, a Bluetooth antenna) on the electronic device.

[0074] Step 406: If the screen state is the black screen state, detect the shielding state of the electronic device.

[0075] When the screen state of an electronic device is a black screen state, the obstruction state of the electronic device can be detected based on the light sensor, proximity sensor, etc. in the electronic device. Exemplarily, taking the proximity sensor as an example, the electronic device can detect the distance between the electronic device and the obstacle based on the proximity sensor. If the distance is less than or equal to the preset threshold, it can be determined that the electronic device is in an obstruction state. The preset threshold is set according to actual needs, for example, 0-2 cm. Exemplarily, taking the light sensor as an example, the electronic device can detect the brightness of the environment in which the electronic device is located based on the light sensor. If the brightness is less than or equal to the brightness threshold, it can be determined that the electronic device is in an obstruction state.

[0076] Step 408: Determine power compensation information of the electronic device according to one of the holding state and the shielding state.

[0077] Step 410: Adjust the transmission power of the short-range communication signal according to the power compensation information, and send the short-range communication signal with adjusted power to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation.

[0078] The above steps 408 to 410 correspond to the above steps 304 to 306 one by one, and are not described again here.

[0079] In this embodiment, by detecting the screen status of the electronic device, the holding status of the electronic device can be detected only when the screen status is in the bright screen state, and the blocking status of the electronic device can be detected only when the screen status is in the black screen state. This not only reduces the power consumption of the electronic device, but also adjusts the transmission power of the electronic device according to different states of the electronic device, compensates for signal attenuation caused by environmental factors, and ensures the normal function of the car key.

[0080] like Figure 7 As shown, in one embodiment, determining the power compensation information of the electronic device according to one of the holding state and the blocking state includes: steps 702 to 704.

[0081] Step 702: Acquire mapping relationships between the holding state, the shielding state, and the power compensation information.

[0082] The degree to which the Bluetooth antenna is blocked varies depending on the holding state of the electronic device. The higher the degree to which the Bluetooth antenna is blocked, the larger the area that is blocked by the Bluetooth antenna. In an embodiment of the present application, the corresponding power compensation information can be set according to the different holding states of the electronic device. The higher the degree to which the Bluetooth antenna is blocked, the greater the corresponding power compensation amount. For example, the first horizontal screen holding may correspond to the first power compensation information ZH, the second horizontal screen holding may correspond to the second power compensation information YH, and so on. The first power compensation information ZH and the second power compensation information YH are different.

[0083] The electronic device may further construct a mapping relationship between the blocking state and the power compensation information. For example, the blocking state corresponds to the third power compensation information KB.

[0084] It should be noted that in the embodiment of the present application, the first power compensation information ZH, the second power compensation information YH, the third power compensation information KB, etc. set by the electronic device can be obtained through laboratory testing by the developer, and each power compensation information can change with the change of the antenna layout of the electronic device.

[0085] Step 704: Determine the power compensation information according to the mapping relationship and the current state of the electronic device.

[0086] Power compensation information of the electronic device's transmit power may be determined based on the set mapping relationship and the current state of the electronic device.

[0087] In the embodiments of the present application, power compensation information corresponding to the holding state of the electronic device and the power compensation information corresponding to the occlusion state are pre-established and stored in the electronic device. In this way, the electronic device can set matching power compensation information according to different complex scenarios (for example, the occlusion scenario of the electronic device being placed in a pocket or backpack, or the holding scenario of being held by the user or a holding bracket), which can be used to compensate for the attenuation of the transmission signal caused by environmental factors, thereby ensuring the normal function of the car key.

[0088] In one embodiment, detecting the holding state of the electronic device includes: obtaining motion sensing data of the electronic device, and detecting the holding state of the electronic device based on the motion sensing data. The motion sensing data includes at least one of gravity information, acceleration information, gyroscope information, and magnetic sensing information. In this embodiment of the present application, for ease of explanation, the motion sensing data is gravity information. Specifically, when the user's holding posture of the electronic device changes, the gravity information detected by its gravity sensor will also change accordingly. Specifically, the gravity information may include a first gravity value on the x-axis, a second gravity value on the y-axis, and a third gravity value on the z-axis. When the top frame of the electronic device is facing upward, the second gravity value on the y-axis approaches 1g; when the bottom frame of the electronic device is facing upward, the second gravity value on the y-axis approaches -1g; when the right frame of the electronic device is facing upward, the first gravity value on the x-axis approaches 1g; and when the left frame of the electronic device is facing upward, the first gravity value on the x-axis approaches -1g.

[0089] If the first gravity value of the x-axis tends to 1g, combined with the gyroscope data, it can be determined that the holding state of the electronic device is the first horizontal screen holding; if the first gravity value of the x-axis tends to -1g, combined with the gyroscope data, it can be determined that the holding state of the electronic device is the second horizontal screen holding.

[0090] Optionally, the holding state of the electronic device can also be determined based on at least one of pressure information from a pressure sensor, magnetic sensor information, acceleration information, acceleration information, and gyroscope information. In the embodiments of the present application, the specific method for determining the holding state of the electronic device is not limited to the above examples, and other methods can also be used.

[0091] In an embodiment of the present application, the holding state of the electronic device can be obtained based solely on the existing sensors in the electronic device. That is, the holding state of the electronic device can be detected without adding additional sensors to the electronic device, which can reduce costs.

[0092] In one embodiment, detecting the obstruction state of the electronic device includes: obtaining clock information of the electronic device; if the clock information satisfies a preset condition, obtaining proximity sensor information of the electronic device; and detecting the obstruction state of the electronic device based on the proximity sensor information. The proximity sensor information includes light sensor information and distance sensor information.

[0093] For example, the proximity sensing information is light sensing information. If the electronic device is in a black screen state, the electronic device's clock information can be obtained. If the clock information meets the preset conditions for the daytime time period, the light brightness collected by the light sensor is obtained. The clock information can be a calibrated time signal of the electronic device. The daytime time period can be set based on the current geographic location of the electronic device. If the light brightness is less than or equal to the light brightness threshold, it is determined that the electronic device is in an obscured state in a pocket, backpack, or handbag scenario.

[0094] In the embodiments of the present application, the obstruction status of the electronic device can be detected solely based on the existing sensors in the electronic device. That is, without adding additional sensors to the electronic device, the obstruction status of the electronic device can be detected, which can reduce costs. In addition, when detecting the obstruction status of the electronic device, proximity sensor information of the electronic device is obtained only when the clock information meets preset conditions. This can avoid the misjudgment of the obstruction status of the electronic device at night, thereby improving the accuracy of the obstruction status and further reducing the power consumption of the electronic device.

[0095] In one embodiment, before executing the step of detecting the screen status of the electronic device, the communication method includes: the electronic device sending a Bluetooth connection request to the vehicle-mounted device to instruct the vehicle-mounted device to establish a short-range communication connection with the electronic device according to the Bluetooth connection request, wherein the Bluetooth connection request carries the physical address (Media Access Control Address, MAC) of the electronic device. The physical address is an identifier used to mark each device in the network and is unique.

[0096] The electronic device can control the Bluetooth module to start working and, based on the Bluetooth module, start detecting broadcast information from a detection terminal around the electronic device. When the electronic device detects an on-board device that has been paired with the electronic device, the electronic device can send a Bluetooth connection request to the on-board device to request establishment of a communication connection with the electronic device. The Bluetooth connection request is generated by the electronic device based on the physical address of the electronic device itself, and the Bluetooth connection request carries the physical address of the electronic device.

[0097] The vehicle-mounted device can verify the physical address of the electronic device using the pre-physical address based on the received Bluetooth connection request and establish a Bluetooth connection with the electronic device if the verification is successful. When the electronic device and the vehicle-mounted device establish a Bluetooth communication connection based on the Bluetooth connection request, it can be determined that the Bluetooth car key function of the electronic device is enabled.

[0098] In the embodiment of the application, before executing the step of detecting the screen status of the electronic device, the electronic device needs to send a Bluetooth connection request to the vehicle-mounted device to establish a Bluetooth communication connection with the vehicle-mounted device and enable the Bluetooth car key function of the electronic device. It is also understandable that the step of detecting the screen status of the electronic device is only executed when the Bluetooth car key function of the electronic device is enabled. In this way, when the Bluetooth car key function is not enabled, the acquisition and operation time of various sensors and other components used by the electronic device for status detection can be reduced, thereby saving power consumption.

[0099] like Figure 8 As shown, for ease of explanation, the above communication method is described by taking the example of an electronic device including a Bluetooth antenna disposed on the top of the electronic device and on the first side frame near the front camera. Specifically, the communication method includes steps 801 to 811.

[0100] Step 801, detect whether the Bluetooth car key function is turned on; if so, execute step 802 to turn on the fusion algorithm assistance, if not, execute step 803 and do not turn on the fusion algorithm assistance. When the fusion algorithm assistance is turned on, execute step 804 to detect whether the screen status of the electronic device is the bright screen state, if so, execute step 805 to detect whether the electronic device is in a holding state. If the electronic device is in a holding state, execute step 806, and the electronic device transmits a Bluetooth signal to the vehicle-mounted device at the target transmission power (the sum of the normal transmission power and the power compensation information ZH or YH) to instruct the vehicle-mounted device to perform functional operations. If the electronic device is not in a holding state, execute step 807, and the electronic device transmits a Bluetooth signal at normal transmission power to instruct the vehicle-mounted device to perform functional operations.

[0101] If the screen state of the electronic device is not in the bright screen state, execute step 808 to obtain the light sensor and clock information, and detect the occlusion state of the electronic device. Then execute step 809 to detect whether the electronic device is in an occlusion state in a pocket, backpack, or handbag scene; if so, execute step 810, and the electronic device transmits a Bluetooth signal to the vehicle-mounted device at the target transmission power (the sum of the normal transmission power P and the power compensation information KB) to instruct the vehicle-mounted device to perform a functional operation. If the electronic device is not in an occlusion state, execute step 807, and the electronic device transmits a Bluetooth signal to the vehicle-mounted device at the normal transmission power P to instruct the vehicle-mounted device to perform a functional operation.

[0102] It should be noted that step 801 detects whether the Bluetooth car key function is turned on, which can be understood as whether the electronic device and the vehicle-mounted device establish a Bluetooth communication connection based on the Bluetooth connection request in the aforementioned embodiment. If the electronic device and the vehicle-mounted device establish a Bluetooth communication connection based on the Bluetooth connection request, it can be considered that the Bluetooth car key function has been turned on. Step 802 turns on the fusion algorithm assistance, which can be understood as turning on the corresponding sensor in the electronic device for detecting the screen status of the electronic device and / or detecting the status of the electronic device in the aforementioned embodiment, so that it is in the corresponding working mode. Regardless of whether the electronic device is in the normal power transmission state or the target power transmission state, it will always maintain the judgment state, including whether the function is turned on, whether the screen is on, the holding state, the blocking state, etc., and when the state changes, it will also switch to the corresponding power state in real time.

[0103] The communication method in this embodiment can dynamically adjust the transmission power of the electronic device according to the holding state and shielding state of the electronic device, compensate for the signal attenuation caused by environmental factors, and ensure that the electronic device can be used as a Bluetooth car key to unlock / lock normally in complex environments, welcome guests and perform other functions. Compared with traditional Bluetooth car key solutions, it can improve the accuracy of RSSI ranging and greatly improve the user experience of unlocking and unlocking.

[0104] Figure 9 FIG. 1 is a flow chart of a communication method in one embodiment. Figure 9 As shown, the communication method is applied to an in-vehicle device, and the communication method includes steps 902 to 906 .

[0105] Step 902: Receive a short-range communication signal sent by the electronic device at normal transmission power, where the short-range communication signal carries power compensation information.

[0106] The vehicle-mounted device can receive short-range communication signals sent by electronic devices at normal transmission power. In this embodiment, for the sake of convenience, the short-range communication signal is taken as a Bluetooth signal as an example. The Bluetooth signal carries power compensation information. The power compensation information is determined by the electronic device based on one of the holding state and the blocking state of the electronic device. The method for determining the power compensation information can be determined according to the method in any of the aforementioned embodiments. For example, the electronic device can detect whether the electronic device is in a blocked state or a holding state based on the screen state of the electronic device, and determine the power compensation information corresponding to the current state of the electronic device based on a pre-stored mapping relationship. Exemplarily, if the electronic device is in a first horizontal screen holding state, the corresponding power compensation information is the first power compensation information ZH; if the electronic device is in a second horizontal screen holding state, the corresponding power compensation information is the second power compensation information YH; if the electronic device is in a blocked state, the corresponding power compensation information is the third power compensation information KB.

[0107] Step 904: Obtain the received signal strength of the short-range communication signal.

[0108] Step 906: Perform a functional operation according to the received signal strength and the power compensation information; wherein the functional operation includes a locking operation or an unlocking operation.

[0109] The vehicle-mounted device will obtain the received signal strength RSSI ori of the received Bluetooth signal based on the received Bluetooth signal, and automatically perform functional operations based on the obtained received signal strength RSSI ori, power compensation information (for example, ZH, YH or KB) and the preset threshold. Specifically, the signal reception strength is inversely proportional to the distance in the absence of interference, and is proportional to the transmission power of the electronic device and the interference signal. Among them, the interference signal can be an attenuated signal when the electronic device is blocked or held. Among them, the functional relationship between the signal reception strength and the distance can be expressed by the following calculation formula:

[0110] Rssi=A-10nlgd1

[0111] In the formula, A is the signal strength when the electronic device is 1 meter away from the vehicle-mounted device. The signal strength can be understood as the difference between the transmission power of the electronic device and the Bluetooth signal path loss at a distance of 1 meter. n is the environmental factor, and d1 is the calculated distance. Therefore, if the electronic device is in a holding state or a blocked state, the transmission power of the electronic device at 1 meter will be severely attenuated, which will cause the Bluetooth signal received by the vehicle-mounted device to have a low signal strength, making it impossible to perform normal unlocking or locking operations. Based on this, in the embodiments provided by the present application, the vehicle-mounted device can compensate for the received signal strength of the Bluetooth signal based on the received power compensation information, or the vehicle-mounted device can compensate for the preset threshold corresponding to the functional operation based on the received power compensation information to automatically perform the unlocking or locking operation.

[0112] In this embodiment, the in-vehicle device can automatically perform the corresponding unlocking or locking operation based on the compensation power information carried in the Bluetooth signal and the received signal strength of the received Bluetooth signal. In other words, the in-vehicle device can also compensate for signal attenuation caused by the electronic device being blocked or held, so that the in-vehicle device can automatically perform the unlocking or locking operation, which can improve the accuracy of RSSI-based ranging and enhance the user experience of unlocking and unlocking the car.

[0113] In one embodiment, performing the functional operation based on the received signal strength and the power compensation information includes determining the received compensation strength based on the power compensation information, and performing the functional operation if the sum of the received signal strength and the received compensation strength is greater than or equal to a first preset threshold.

[0114] Among them, the first preset threshold RSSI_th may include a first functional threshold. The functional threshold can be understood as the threshold at which the electronic device is in a normal state and the on-board device performs the corresponding functional operation. Exemplarily, the first preset threshold RSSI_th may include a first unlocking threshold and a first locking threshold. The on-board device is also provided with a Bluetooth module. The Bluetooth module of the on-board device will receive the Bluetooth signal sent by the electronic device, calculate the received signal strength RSSI ori, and determine the received compensation strength based on the compensation power compensation information carried in the Bluetooth signal. Among them, the power compensation information is a power value, which the Bluetooth module can convert into a received compensation strength. Among them, the received compensation strength corresponding to the first power compensation information ZH can also be represented by ZH, the received compensation strength corresponding to the second power compensation information YH can also be represented by YH, and the received compensation strength corresponding to the third power compensation information KB can also be represented by KB.

[0115] The Bluetooth module of the vehicle-mounted device sums the received signal strength RSSI ori and the received compensation strength (e.g., ZH, YH, or KB), and uploads the summed target received strength to the vehicle-mounted device's processor. The summing process can be understood as adding the received signal strength RSSI ori and the received compensation strength to obtain the sum of the received signal strength RSSI ori and the received compensation strength, and using the sum as the target received strength RSSI_report. The vehicle-mounted device's processor compares the obtained target received strength RSSI_report with a first unlocking threshold. If the target received strength RSSI_report is greater than or equal to the first unlocking threshold, the unlocking operation is performed. Correspondingly, the vehicle-mounted device's processor compares the obtained target received strength RSSI_report with a first locking threshold. If the target received strength RSSI_report is greater than or equal to the first locking threshold, the locking operation is performed; otherwise, the corresponding unlocking or locking operation is not performed.

[0116] In this embodiment, the vehicle-mounted device can compensate for the received signal strength RSSI ori of the received Bluetooth signal based on the compensation power information carried in the Bluetooth signal to obtain the target received signal strength RSSI_report, and compare the target received signal strength RSSI_report with the first unlocking threshold or the first locking threshold to automatically perform the corresponding unlocking operation or locking operation. That is, the vehicle-mounted device can also compensate for the signal attenuation caused by the electronic device being in a blocked state or a held state, so that the vehicle-mounted device can automatically perform the unlocking operation or locking operation, which can improve the accuracy of ranging based on the received signal strength value RSSI, and improve the user experience of using the electronic device as a Bluetooth car key to unlock or unlock the vehicle-mounted device (for example, the vehicle-mounted device).

[0117] In one embodiment, performing a functional operation based on the received signal strength and the power compensation information includes: determining a received compensation strength based on the power compensation information, determining a second preset threshold corresponding to the functional operation based on a first preset threshold corresponding to the functional operation and the received compensation strength, and performing the functional operation if the received signal strength is greater than or equal to the second preset threshold. The second preset threshold RSSI_th_offset may include multiple second functional thresholds, exemplarily including a second unlocking threshold and a second locking threshold. The second preset threshold RSSI_th_offset is the difference between the first preset threshold RSSI_th and the received compensation strength (e.g., ZH, YH, or KB).

[0118] Specifically, the vehicle-mounted device can compensate the first preset threshold RSSI_th corresponding to the functional operation based on the power compensation information to obtain a corresponding second preset threshold RSSI_th_offset. The second preset threshold RSSI_th_offset is used to compare with the received signal strength RSSI ori of the Bluetooth signal received by the vehicle-mounted device, and determine whether to execute the corresponding functional operation based on the comparison result. Exemplarily, the second unlocking threshold is the difference between the first unlocking threshold and the received signal strength compensation, and the second locking threshold is the difference between the first locking threshold and the received signal strength compensation.

[0119] In this embodiment, the vehicle-mounted device can compensate the first preset threshold RSSI_th corresponding to the functional operation according to the compensation power information carried in the Bluetooth signal to obtain the second preset threshold RSSI_th_offset, and compare the received signal strength RSSI ori with the second preset threshold RSSI_th_offset (for example, the second unlocking threshold or the second locking threshold) to automatically perform the corresponding unlocking operation or locking operation. That is, the vehicle-mounted device can also compensate for the signal attenuation caused by the electronic device being in a blocked state or a held state. In the embodiment of the present application, different second unlocking thresholds or second locking thresholds can be dynamically selected according to the power compensation information output by the electronic device, so that the success rate of the unlocking operation or locking operation is continuously improved.

[0120] In one embodiment, before executing step 902 , the communication method includes steps 1002 to 106 .

[0121] Step 1002: Receive a Bluetooth connection request sent by the electronic device, where the Bluetooth connection request carries the physical address of the electronic device.

[0122] The electronic device also includes a Bluetooth module. The electronic device can control the Bluetooth module to start working and start detecting the broadcast information of the detection end around the electronic device based on the Bluetooth module. When a vehicle-mounted device that has been paired with the electronic device is detected, the electronic device can send a Bluetooth connection request to the vehicle-mounted device to request to establish a communication connection with the electronic device. Then, the vehicle-mounted device can receive the Bluetooth connection request sent by the electronic device.

[0123] Step 1004: Verify the legitimacy of the electronic device according to the Bluetooth connection request and the pre-stored physical address.

[0124] Step 1006: If the electronic device is legal, a short-range communication connection is established with the electronic device.

[0125] The vehicle-mounted device can verify the physical address of the electronic device using the pre-physical address according to the received Bluetooth connection request, and establish a Bluetooth connection with the electronic device when the verification is successful. When the electronic device and the vehicle-mounted device establish a Bluetooth communication connection based on the Bluetooth connection request, it can be determined that the Bluetooth car key function of the electronic device is turned on, such as Figure 8 shown.

[0126] Figure 11 FIG. 1 is a flow chart of a communication method in one embodiment. Figure 11 As shown, the communication method is applied to electronic equipment and vehicle-mounted equipment, and the communication method includes steps 1102 to 1106.

[0127] Step 1101: The electronic device sends a Bluetooth connection request to the in-vehicle device; the Bluetooth connection request carries the physical address of the electronic device.

[0128] In step 1102 , the vehicle-mounted device receives the Bluetooth connection request sent by the electronic device, verifies the legitimacy of the electronic device based on the Bluetooth connection request and the pre-stored physical address, and establishes a short-range communication connection with the electronic device if the electronic device is legitimate.

[0129] In step 1103, the electronic device detects the screen state of the electronic device. If the screen state is the bright screen state, the holding state of the electronic device is detected. If the screen state is the black screen state, the blocking state of the electronic device is detected.

[0130] Step 1104: The electronic device obtains mapping relationships between the holding state, the blocking state, and the power compensation information respectively; and determines the power compensation information according to the mapping relationships and the current state of the electronic device.

[0131] Step 1105: The electronic device transmits a short-range communication signal to the vehicle-mounted device at normal transmission power;

[0132] Step 1106: The vehicle-mounted device obtains the received signal strength of the short-range communication signal.

[0133] Step 1107: Perform a functional operation according to the received signal strength and the power compensation information; wherein the functional operation includes a locking operation or an unlocking operation.

[0134] The communication method provided in this embodiment is that the electronic device can obtain the power compensation information of the Bluetooth antenna based on the screen status, holding status, and occlusion status of the electronic device, and send the power compensation information to the vehicle-mounted device. The vehicle-mounted device performs locking or unlocking operations based on the received signal strength and power compensation information of the received short-range communication signal, which can compensate for the signal attenuation of short-range wireless communication caused by environmental factors, improve the accuracy of RSSI-based ranging, and ensure that the electronic device can be used as a Bluetooth car key to unlock / lock normally in complex environments, welcome guests and other functions, ensure the normal function of the Bluetooth car key, and improve the user's experience of using the electronic device as a Bluetooth car key to unlock and unlock the vehicle-mounted device (for example, the vehicle-mounted device).

[0135] It should be understood that although Figure 3 、 Figure 4 、 Figure 7-11The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 3 、 Figure 4 、 Figure 7-11 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0136] Figure 12 A block diagram of a communication device according to an embodiment of the present invention is provided. Figure 3 The communication device can be applied to electronic devices. Figure 12 As shown, the communication device includes:

[0137] A state acquisition module 1202 detects a state of the electronic device, wherein the state includes a holding state and a blocking state;

[0138] a power compensation module 1204, configured to determine power compensation information of the electronic device according to one of the holding state and the shielding state;

[0139] The power adjustment module 1206 is used to adjust the transmission power of the short-range communication signal according to the power compensation information, and send the short-range communication signal after power adjustment to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, which at least includes a locking operation or an unlocking operation.

[0140] The communication device in this embodiment can be applied to an electronic device, wherein the communication device can detect the state of the electronic device, wherein the state includes a holding state and a blocking state, and determine the power compensation information of the electronic device according to one of the holding state and the blocking state, and adjust the transmission power of the short-range communication signal transmitted by the electronic device to the vehicle-mounted device according to the power compensation information to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation at least includes a locking operation or an unlocking operation. The electronic device can determine the power compensation information of the electronic device based on the current state, and adjust the normal transmission power value of the electronic device according to the power compensation information, thereby compensating for the signal attenuation of short-range wireless communication caused by environmental factors, and can improve the accuracy of RSSI-based ranging, ensuring that the electronic device can be used as a Bluetooth car key to unlock / lock, welcome, and other functions normally in complex environments, ensuring the normal function of the Bluetooth car key, and improving the user experience of using the electronic device as a Bluetooth car key to unlock and unlock the vehicle-mounted device (for example, the vehicle-mounted device).

[0141] Figure 13 The communication device is a structural block diagram of an embodiment, and the communication device is applied to a vehicle-mounted device for executing Figure 9 The relevant steps of the embodiment shown are as follows. Figure 13 As shown, the communication device includes:

[0142] a receiving module 1302, configured to receive a short-range communication signal sent by the electronic device at normal transmission power, the short-range communication signal carrying power compensation information; wherein the power compensation information is determined by the electronic device based on one of a holding state and an obstruction state of the electronic device;

[0143] An acquisition module 1304 is configured to acquire a received signal strength of the short-range communication signal;

[0144] The execution module 1306 is configured to execute a functional operation according to the received signal strength and the power compensation information; wherein the functional operation at least includes a locking operation or an unlocking operation.

[0145] The communication device in this embodiment can be applied to an in-vehicle device, wherein the communication device can automatically perform a corresponding unlocking or locking operation based on the compensation power information carried in the Bluetooth signal and the received signal strength of the received Bluetooth signal. That is, the in-vehicle device can also compensate for signal attenuation caused by the electronic device being in a blocked state or a held state, so that the in-vehicle device can automatically perform an unlocking or locking operation, which can improve the accuracy of RSSI-based ranging and enhance the user experience of using the electronic device as a Bluetooth car key to unlock or unlock the in-vehicle device (e.g., an in-vehicle device).

[0146] Please continue to refer to Figure 2 , an embodiment of the present application also provides an electronic device. Specifically, the processor in the electronic device is further configured to: obtain a state of the electronic device based on the sensing unit, the state including a holding state and a shielding state; determine power compensation information of the electronic device according to one of the holding state and the shielding state; control the radio frequency circuit to adjust the transmission power of the short-range communication signal according to the power compensation information, and send the short-range communication signal with adjusted power to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, the functional operation including a locking operation or an unlocking operation.

[0147] The electronic device in the embodiment of the present application can detect the state of the electronic device, which includes a holding state and a blocking state. According to one of the holding state and the blocking state, the power compensation information of the electronic device is determined, the transmission power of the short-range communication signal is adjusted according to the power compensation information, and the short-range communication signal with adjusted power is sent to the vehicle-mounted device to instruct the vehicle-mounted device to perform a locking operation or an unlocking operation. The electronic device can determine the power compensation information of the electronic device based on the current state, and adjust the normal transmission power value of the electronic device according to the power compensation information, compensating for the signal attenuation of short-range wireless communication caused by environmental factors, and can improve the accuracy of RSSI-based ranging, ensuring that the electronic device can be used as a Bluetooth car key to unlock / lock, welcome guests and other functional operations normally in complex environments, ensuring the normal function of the Bluetooth car key, and improving the user experience of using the electronic device as a Bluetooth car key to unlock and unlock the vehicle-mounted device (for example, the vehicle-mounted device).

[0148] Please continue to refer to Figure 1 The communication system includes: an electronic device 110 and an on-board device 120. The electronic device is used to detect the state of the electronic device, where the state includes a holding state and a shielding state, determine power compensation information of the electronic device based on one of the holding state and the shielding state, and adjust the transmission power of the short-range communication signal transmitted by the electronic device to the on-board device based on the power compensation information. The on-board device is connected to the electronic device, and is used to receive the short-range communication signal sent by the electronic device and perform a functional operation based on the short-range communication signal, where the functional operation includes at least a locking operation or an unlocking operation.

[0149] The communication system provided in the embodiment of the present application can detect the state of the electronic device, which includes a holding state and a blocking state. According to one of the holding state and the blocking state, the power compensation information of the electronic device is determined, and the transmission power of the short-range communication signal transmitted by the electronic device to the vehicle-mounted device is adjusted according to the power compensation information to instruct the vehicle-mounted device to perform a functional operation, and the functional operation at least includes a locking operation or an unlocking operation. The electronic device can determine the power compensation information of the electronic device based on the current state, and adjust the normal transmission power value of the electronic device according to the power compensation information, compensating for the signal attenuation of short-range wireless communication caused by environmental factors, and can improve the accuracy of RSSI-based ranging, ensuring that the electronic device can be used as a Bluetooth car key to unlock / lock, welcome and other functions normally in complex environments, thereby ensuring the normal function of the Bluetooth car key.

[0150] In one embodiment, an electronic device is configured to transmit a short-range communication signal at normal transmission power. An on-vehicle device is configured to receive the short-range communication signal transmitted by the electronic device at normal transmission power, the short-range communication signal carrying power compensation information, obtain a received signal strength of the short-range communication signal received by the on-vehicle device, and perform a functional operation based on the received signal strength and the power compensation information; wherein the power compensation information is determined by the electronic device based on one of a holding state and a shielding state of the electronic device, and the functional operation includes at least a locking operation or an unlocking operation.

[0151] The communication system provided in the embodiment of the present application can automatically perform corresponding unlocking or locking operations based on the compensation power information carried in the Bluetooth signal output by the electronic device and the received signal strength of the Bluetooth signal received by the vehicle-mounted device. That is, the vehicle-mounted device can also compensate for the signal attenuation caused by the electronic device being in a blocked state or a held state, so that the vehicle-mounted device can automatically perform the unlocking or locking operation, which can improve the accuracy of RSSI-based ranging and enhance the user experience of using the electronic device as a Bluetooth car key to unlock or unlock the vehicle-mounted device (for example, the vehicle-mounted device).

[0152] The division of the various modules in the above-mentioned communication device and communication system is only for illustration. In other embodiments, the selection device, communication device and communication system can be divided into different modules as needed to complete all or part of the functions of the above-mentioned selection device, communication device and communication system. For the specific definition of the communication device and communication system, please refer to the definition of the communication method above and will not be repeated here. The various modules in the above-mentioned communication device and communication system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0153] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 14 As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a communication method is implemented.

[0154] The present application also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the communication method described in the above embodiment.

[0155] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the communication method described in the above embodiment are implemented.

[0156] The present application also provides a computer program product, including a computer program, which implements the steps of the communication method described in the above embodiment when executed by a processor.

[0157] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory) or flash memory. Volatile memory may include RAM (Random Access Memory), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), Double Data Rate DDRSDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), and DRDRAM (Direct Rambus Dynamic Random Access Memory).

[0158] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A communication method, characterized in that: Applied to electronic equipment, the method comprises: Acquire the state of the electronic device, where the state includes a holding state and a blocking state; Determining power compensation information of the electronic device according to one of the holding state and the shielding state; The transmission power of the short-distance communication signal is adjusted according to the power compensation information, and the short-distance communication signal with adjusted power is sent to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation includes a locking operation or an unlocking operation.

2. The communication method according to claim 1, characterized in that: The electronic device includes an antenna for receiving and transmitting the short-range communication signal, and when the electronic device is in the holding state or the shielding state, at least part of the antenna is shielded; wherein, before obtaining the state of the electronic device, the method further includes: Detecting a screen state of the electronic device, wherein the screen state includes a bright screen state and a dark screen state; The obtaining the state of the electronic device includes: If the screen state is the screen-on state, detecting a holding state of the electronic device; If the screen state is the black screen state, the shielding state of the electronic device is detected.

3. The communication method according to claim 2, characterized in that: The detecting the holding state of the electronic device comprises: Acquire motion sensing data of the electronic device, wherein the motion sensing data includes: at least one of acceleration information, gravity information, gyroscope information and magnetic sensing information; The holding state of the electronic device is detected according to the motion sensing data, and the holding state includes a first horizontal screen holding and a second horizontal screen holding, wherein the holding state of the electronic device is different and the shielding degree of the antenna used for radiating the short-range communication signal is different.

4. The communication method according to claim 2, characterized in that: Detecting the shielding state of the electronic device includes: Acquiring clock information of the electronic device; If the clock information meets a preset condition, acquiring proximity sensor information of the electronic device; The shielding state of the electronic device is detected according to the proximity sensing information.

5. The communication method according to claim 2, characterized in that: Before detecting the screen status of the electronic device, the method further includes: The electronic device sends a Bluetooth connection request to the vehicle-mounted device to instruct the vehicle-mounted device to establish a short-range communication connection with the electronic device according to the Bluetooth connection request, and the Bluetooth connection request carries the physical address of the electronic device.

6. The communication method according to claim 1, characterized in that: The determining the power compensation information of the electronic device according to one of the holding state and the shielding state includes: Acquire mapping relationships between the holding state, the shielding state and the power compensation information respectively; The power compensation information is determined according to the mapping relationship and the current state of the electronic device.

7. A communication method, characterized in that: Applied to an in-vehicle device, the communication method includes: Receiving a short-distance communication signal sent by an electronic device at normal transmission power, the short-distance communication signal carrying power compensation information; wherein the power compensation information is determined by the electronic device according to one of a holding state and a shielding state of the electronic device; Obtaining a received signal strength of the short-range communication signal; A functional operation is performed according to the received signal strength and the power compensation information; wherein the functional operation at least includes a locking operation or an unlocking operation.

8. The communication method according to claim 7, characterized in that: The performing a functional operation according to the received signal strength and the power compensation information comprises: Determine a receiving compensation strength according to the power compensation information; If the sum of the received signal strength and the received compensation strength is greater than or equal to a first preset threshold, the corresponding function operation is performed.

9. The communication method according to claim 7, characterized in that: The performing a functional operation according to the received signal strength and the power compensation information comprises: Determine a receiving compensation strength according to the power compensation information; Determine a second preset threshold corresponding to the functional operation according to the first preset threshold corresponding to the functional operation and the receiving compensation strength; If the received signal strength is greater than or equal to the second preset threshold, the corresponding function operation is performed.

10. The communication method according to claim 9, characterized in that: The second preset threshold is a difference between the first preset threshold and the receiving compensation strength.

11. The communication method according to any one of claims 7 to 10, characterized in that: Before receiving the short-distance communication signal sent by the electronic device with normal transmission power, the method further includes: receiving a Bluetooth connection request sent by the electronic device, wherein the Bluetooth connection request carries a physical address of the electronic device; Verifying the legitimacy of the electronic device according to the Bluetooth connection request and the pre-stored physical address; If the electronic device is legal, a short-range communication connection is established with the electronic device.

12. A communication device, characterized in that: Applied to electronic equipment, the communication device comprises: A state acquisition module, used to acquire the state of the electronic device, wherein the state includes a holding state and a shielding state; A power compensation module, used to determine power compensation information of the electronic device according to one of the holding state and the shielding state; A power adjustment module is used to adjust the transmission power of the short-range communication signal according to the power compensation information, and transmit the short-range communication signal with adjusted power to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation at least includes a locking operation or an unlocking operation.

13. A communication device, characterized in that: Applied to vehicle-mounted equipment, the communication device comprises: A receiving module, configured to receive a short-distance communication signal sent by an electronic device at normal transmission power, wherein the short-distance communication signal carries power compensation information; wherein the power compensation information is determined by the electronic device according to one of a holding state and a shielding state of the electronic device; An acquisition module, used to acquire the received signal strength of the short-range communication signal; An execution module is used to execute a functional operation according to the received signal strength and the power compensation information; wherein the functional operation at least includes a locking operation or an unlocking operation.

14. An electronic device, characterized in that: include: A radio frequency circuit, a display unit, a sensor unit and a processor, wherein the processor is connected to the radio frequency circuit, the display unit and the sensor unit respectively, and the processor is configured as follows: Acquiring a state of the electronic device based on the sensing unit, the state including a holding state and a shielding state; Determining power compensation information of the electronic device according to one of the holding state and the shielding state; The radio frequency circuit is controlled to adjust the transmission power of the short-range communication signal according to the power compensation information, and the short-range communication signal with adjusted power is sent to the vehicle-mounted device to instruct the vehicle-mounted device to perform a functional operation, wherein the functional operation includes a locking operation or an unlocking operation.

15. A communication system, characterized in that: include: An electronic device, used to obtain a state of the electronic device, the state including a holding state and a shielding state, determine power compensation information of the electronic device according to one of the holding state and the shielding state, adjust the transmission power of the short-distance communication signal according to the power compensation information, and send the short-distance communication signal with adjusted power to the vehicle-mounted device; The vehicle-mounted device is connected to the electronic device and is used to receive the short-range communication signal sent by the electronic device and perform a functional operation according to the short-range communication signal, wherein the functional operation at least includes a locking operation or an unlocking operation.

16. A communication system, characterized in that: include: Electronic equipment for transmitting short-range communication signals at normal transmission power; A vehicle-mounted device, used to receive the short-range communication signal sent by the electronic device, the short-range communication signal carries power compensation information, obtain the received signal strength of the short-range communication signal, and perform functional operations according to the received signal strength and the power compensation information; wherein the power compensation information is determined by the electronic device according to one of the holding state and the shielding state of the electronic device, and the functional operation at least includes a locking operation or an unlocking operation.

17. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the communication method according to any one of claims 1 to 11.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the communication method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Bluetooth signal adjustment method and apparatus, test terminal and system, and readable medium

    CN108199789A

  • Positioning method and device, electronic equipment and storage medium

    CN113840373A