WO2022174721A1 - 设备测距方法、装置、设备及存储介质 - Google Patents

设备测距方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022174721A1
WO2022174721A1 PCT/CN2022/073397 CN2022073397W WO2022174721A1 WO 2022174721 A1 WO2022174721 A1 WO 2022174721A1 CN 2022073397 W CN2022073397 W CN 2022073397W WO 2022174721 A1 WO2022174721 A1 WO 2022174721A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal strength
corrected
distance
signal
threshold
Prior art date
Application number
PCT/CN2022/073397
Other languages
English (en)
French (fr)
Inventor
翟召轩
吴泰月
余志刚
曾春亮
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022174721A1 publication Critical patent/WO2022174721A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/02Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/02Systems for determining distance or velocity not using reflection or reradiation using radio waves
    • G01S11/06Systems for determining distance or velocity not using reflection or reradiation using radio waves using intensity measurements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/20Monitoring; Testing of receivers
    • H04B17/21Monitoring; Testing of receivers for calibration; for correcting measurements

Definitions

  • the embodiments of the present application relate to the technical field of the Internet of Things, and in particular, to a device ranging method, apparatus, device, and storage medium.
  • IoT Internet of Things
  • the Bluetooth device When implementing interaction between devices, distance measurement is usually required between settings, so that the interacting device is determined based on the measured distance. Taking the interaction between Bluetooth devices as an example, the Bluetooth device substitutes the Received Signal Strength Indication (RSSI, Received Signal Strength Indication) of the Bluetooth received signal into the distance calculation formula to determine the distance with other Bluetooth devices.
  • RSSI Received Signal Strength Indication
  • Embodiments of the present application provide a device ranging method, apparatus, device, and storage medium.
  • the technical solution is as follows:
  • an embodiment of the present application provides a device ranging method, the method is used for a first device, and the method includes:
  • the original signal strength is corrected by a correction function to obtain a corrected signal strength, and the correction function is used to correct the influence of the difference of the receiving device and/or the transmitting device on the measurement of the signal strength;
  • a device spacing between the first device and the second device is determined based on the modified signal strength.
  • an embodiment of the present application provides a device ranging device, the device is used for a first device, and the device includes:
  • the signal measurement module is used to measure the wireless signal sent by the second device to obtain the original signal strength
  • a strength correction module configured to correct the original signal strength through a correction function to obtain a corrected signal strength, and the correction function is used to correct the influence of the difference of the receiving device and/or the transmitting device on the signal strength measurement;
  • a distance determination module configured to determine a device distance between the first device and the second device based on the corrected signal strength.
  • an embodiment of the present application provides a computer device, the computer device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the The device ranging method described in the above aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the storage medium stores at least one instruction, and the at least one instruction is configured to be executed by a processor to implement the device ranging according to the above aspect method.
  • an embodiment of the present application provides a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the device ranging method provided in various optional implementation manners of the above aspects.
  • FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
  • FIG. 2 shows a flowchart of a device ranging method provided by an exemplary embodiment of the present application
  • FIG. 3 shows a flowchart of a device ranging method provided by another exemplary embodiment of the present application
  • FIG. 4 is an interaction sequence diagram of a device ranging process according to an exemplary embodiment of the present application.
  • FIG. 5 is a flowchart of a standard comparison table generation process shown in an exemplary embodiment of the present application.
  • FIG. 6 is a flowchart of a first correction function determination process shown in an exemplary embodiment of the present application.
  • FIG. 7 is a flowchart of a second correction function determination process shown in an exemplary embodiment of the present application.
  • FIG. 8 is a flowchart of a process for determining the distance between devices according to an exemplary embodiment of the present application.
  • FIG. 9 is a schematic diagram of the implementation of a device distance determination process shown in an exemplary embodiment of the present application.
  • FIG. 10 is a flowchart of a process for determining the distance between devices according to another exemplary embodiment of the present application.
  • FIG. 11 is a flowchart of a process for determining the distance between devices according to another exemplary embodiment of the present application.
  • FIG. 12 is a schematic diagram of the implementation of a device distance determination process shown in another exemplary embodiment of the present application.
  • FIG. 13 shows a structural block diagram of a device ranging apparatus provided by an embodiment of the present application.
  • FIG. 14 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
  • plural refers to two or more.
  • “And/or”, which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone.
  • the character “/” generally indicates that the associated objects are an "or" relationship.
  • the device when performing distance measurement, the device first measures the signal strength of the wireless signal, and then uses the measured signal strength as a parameter to input the distance calculation formula to obtain the distance between the devices.
  • the distance calculation formula is as follows:
  • Distance is the distance between the devices
  • MeasuredPower is the measured signal strength when the distance between the devices is 1 meter
  • RSSI is the signal strength actually measured by the device
  • N is the signal attenuation rate (related to environmental factors, usually a constant 2).
  • the accuracy of the device spacing is strongly related to the accuracy of the actual measured signal strength.
  • its numerical value fluctuates greatly. If only the signal strength obtained by a single measurement is used to calculate the distance between the devices, the calculation result has a large error. Therefore, the device usually measures the signal strength multiple times to improve the accuracy of the distance between the devices.
  • the device ranging method In the device ranging method provided by the embodiment of the present application, after the device measures the wireless signal to obtain the original signal strength, it does not directly use the original signal strength to determine the distance between the devices, but firstly uses the correction function to correct the original signal strength to eliminate the receiving equipment. And/or the impact of differences in transmitting devices on signal strength measurement, thereby improving the accuracy of signal strength, and then determining the distance between devices based on the corrected signal strength.
  • the accuracy of the measured signal strength can be improved by introducing a signal strength correction mechanism without adding additional equipment hardware, thereby improving the accuracy of the subsequently determined equipment spacing.
  • FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, where the implementation environment includes a first device 110 and a second device 120 .
  • the first device 110 is an electronic device with a wireless signal transceiving function, which can be a smart phone, a tablet computer, a wearable device, a personal computer, etc., and the wireless signal transceiving function can be implemented by a signal transceiving component.
  • the signal transceiving component can receive wireless signals sent by other devices within the signal receiving range, and can send wireless signals to other devices within the signal sending range.
  • the signal transceiving component may be built in the first device 110, or may be externally connected to the first device 110, which is not limited in this embodiment.
  • the wireless signal transceived by the signal transceiving component when the signal transceiving component is a Bluetooth component, the wireless signal transceived by the signal transceiving component is a Bluetooth signal; when the signal transceiving component is a wireless fidelity (Wireless Fidelity, WiFi) component, the wireless signal transceived by the signal transceiving component is a WiFi signal; when the signal transceiver component is an Ultra Wide Band (UWB) component, the wireless signal sent and received by the signal transceiver component is a UWB signal (pulse signal), and the embodiment of the present application does not limit the signal type of the wireless signal.
  • a wireless fidelity Wireless Fidelity, WiFi
  • UWB Ultra Wide Band
  • the second device 120 is an electronic device with a wireless signal transceiving function.
  • the electronic device can be an IoT device, such as a smart speaker 121, a smart TV 122, a smart door lock 123, a Bluetooth headset 124, etc., and the wireless signal transceiving function can be transmitted through a signal Transceiver component implementation.
  • the signal transceiving component can receive wireless signals sent by other devices within the signal receiving range, and can send wireless signals to other devices within the signal sending range.
  • the second device 120 sends wireless signals through the signal transceiver component, and the first device 110 receives the wireless signal through the signal transceiver component.
  • Wireless signal and measure the signal strength of the wireless signal to obtain the original signal strength.
  • the first device 110 corrects the original signal strength, eliminates the influence of the difference between the receiving device and the transmitting device on the signal strength measurement, obtains the corrected signal strength, and determines the device distance from the second device 120 based on the corrected signal strength.
  • the first device 110 establishes a connection with the second device 120, and then controls the second device 120 through the connection.
  • the second device 120 may also determine the device distance based on the wireless signal sent by the first device 110 , which is not limited in this embodiment.
  • the following embodiments are described by taking the application of the device ranging method to the first device 110 as an example.
  • FIG. 2 shows a flowchart of a device ranging method provided by an exemplary embodiment of the present application. This embodiment is described by taking the method for the first device shown in FIG. 1 as an example, and the method includes the following steps:
  • Step 201 Measure the wireless signal sent by the second device to obtain the original signal strength.
  • the first device when the wireless signal transceiving function (such as the WiFi function, the Bluetooth function or the UWB function, etc.) is enabled, the first device receives the wireless signal sent by the second device through the signal transceiving component, and responds to the wireless signal. Perform signal strength measurements to obtain raw signal strength.
  • the wireless signal transceiving function such as the WiFi function, the Bluetooth function or the UWB function, etc.
  • the first device when the first device receives the wireless signal and measures the signal strength, it does not need to establish a stable connection with the second device. For example, when the second device broadcasts the signal, the first device can receive the signal as long as it is within the range of the signal broadcast. Wireless signal and measure the signal strength of the wireless signal without establishing a connection with a second device.
  • the original signal strength is the original Bluetooth signal strength
  • the wireless signal is a WiFi signal
  • the original signal strength is the original WiFi signal strength
  • the wireless signal is a UWB signal
  • the original signal strength is the original pulse signal strength. This embodiment does not limit this.
  • the signal strength is represented by RSSI (negative number, the unit is dbm).
  • RSSI negative number, the unit is dbm.
  • the larger the RSSI the smaller the loss of the wireless signal during the propagation process.
  • the smaller the RSSI the smaller the loss of the wireless signal during the propagation process. bigger.
  • the first device measures the wireless signal received each time to obtain multiple consecutive original signal strengths. For example, when the second device sends wireless signals at intervals of 100ms, the first device can measure and obtain 10 original signal strengths within 1s.
  • step 202 the original signal strength is corrected by a correction function to obtain a corrected signal strength, and the correction function is used to correct the influence of the difference of the receiving device and/or the transmitting device on the signal strength measurement.
  • the receiving device ie the first device
  • the transmitting device ie the second device
  • the correction process of signal strength can be understood as the standardization of the measurement process, that is, the measurement process of the wireless signal sent by the first device to the second device under the actual device distance is converted into the standard receiving device under the actual device distance. measurement process of wireless signals. It should be noted that, if the first device and the second device are both standard devices, the first device does not need to perform signal strength correction.
  • the first device is provided with a correction function for performing signal strength correction.
  • the first device takes the measured original signal strength as a function input, and outputs the function of the correction function. Determined to correct the signal strength.
  • different receiving devices and/or transmitting devices correspond to different correction functions, and the correction functions may be preset at the first device, or acquired and stored by the first device from a server.
  • the correction function is used to correct the influence of the receiving device on the signal strength measurement, or the correction function is used to correct the influence of the transmitting device on the signal strength measurement, or the correction function is used to correct the signal strength measurement of the receiving device and the transmitting device. Impact.
  • the correction function is used to correct the influence of the receiving device on the signal strength measurement, or the correction function is used to correct the receiving device and the transmitting device Influence on the signal strength measurement (ie at least the influence of the receiving device on the signal strength measurement needs to be corrected).
  • the first device when the second device sends a wireless signal according to a specific frequency, performs signal strength correction on multiple raw signal strengths obtained by continuous measurement.
  • Step 203 Determine the device distance between the first device and the second device based on the corrected signal strength.
  • the first device determines the device distance based on the corrected signal strength, wherein the device distance may be a specific distance (such as 30cm, 50cm, etc.), or a range indication (such as a range of 30cm to 50cm, or a range of 30cm) inside, outside the 30cm range).
  • the device distance may be a specific distance (such as 30cm, 50cm, etc.), or a range indication (such as a range of 30cm to 50cm, or a range of 30cm) inside, outside the 30cm range).
  • the first device uses the corrected signal strength as a parameter to input the distance calculation formula to obtain the device distance. Because the distance calculation formula contains power operations, the speed of calculating the distance between devices using the distance calculation formula is slow.
  • the first device when only the approximate range of the distance between the devices needs to be obtained, the first device obtains a standard comparison table between the standard distance between the devices and the standard signal strength, so that based on the corrected signal strength, from the standard comparison table
  • the distance between devices is searched, wherein the standard signal strength is obtained by measuring the wireless signals sent by the second standard device (standard transmitting device) at different standard device distances by the first standard device (standard receiving device).
  • the speed of determining the distance between the devices by looking up the look-up table is faster (because no exponentiation is required).
  • Table 1 a standard comparison table between standard device spacing and standard signal strength is shown in Table 1.
  • the first device determines that the distance between the first device and the second device is within the range of 20cm to 30cm, or determines that the distance between the devices is within the range of 30cm; when the corrected signal strength is -35dbm When the first device determines that the device distance from the second device is in the range of 30cm to 60cm, or determines that the device distance is outside the range of 30cm.
  • the first device determines whether to establish a connection with the second device based on the determined device distance, and interacts with the second device after the second device establishes the connection.
  • the second device 120 when the second device 120 is a smart speaker 121, if the first device 120 determines that the smart speaker 121 is within 50 cm based on the Bluetooth signal strength, it establishes a Bluetooth connection with the smart speaker 121, thereby controlling The smart speaker 121 plays music; when the second device 120 is the smart TV 122, if the first device 120 determines that the smart TV 122 is located within 100 cm based on the Bluetooth signal strength, it establishes a connection with the smart TV 122 through the WiFi network, thereby controlling the smart TV 122.
  • the TV 122 performs device screen projection; when the second device 120 is the smart door lock 123, if the first device 120 determines that the smart door lock 123 is located within 20 cm based on the Bluetooth signal strength, it establishes a Bluetooth connection with the smart door lock 123, and receives The user enters a fingerprint on the first device 120, and when the fingerprint passes the verification, the smart door lock 123 is controlled to open; when the second device 120 is the Bluetooth headset 124, if the first device 120 determines based on the Bluetooth signal strength that the Bluetooth headset 124 is located at 30 cm Inside, it is paired with the Bluetooth headset 124 via Bluetooth, and after pairing, music is played through the Bluetooth headset 124 .
  • the first device before determining the device distance between the first device and the second device based on the measured raw signal strength, the first device first uses a correction function to correct the original signal strength, so as to eliminate the receiving device. and/or the influence of the difference of the transmitting device on the signal strength measurement, so that the distance between the devices is determined based on the corrected signal strength obtained by the correction.
  • the signal strength correction can improve the accuracy of the measured signal strength, This further improves the accuracy of the subsequently determined device distance.
  • the original signal strength is corrected by the correction function to obtain the corrected signal strength, including:
  • the original signal strength is corrected by the first correction function to obtain the corrected signal strength, and the first correction function is used to correct the influence of the first device on the signal strength measurement; or,
  • the original signal strength is corrected by the first correction function and the second correction function to obtain the corrected signal strength.
  • the first correction function is used to correct the influence of receiving the first device on the signal strength measurement
  • the second correction function is used to correct the second device. Impact on signal strength measurements.
  • the first correction function is determined based on the signal strength measurement result of the wireless signal sent by the first standard device to the second standard device, and the signal strength measurement result of the wireless signal sent by the first device to the second standard device;
  • the second correction function is determined based on the signal strength measurement result of the wireless signal sent by the first standard device to the second standard device and the signal strength measurement result of the wireless signal sent by the first standard device to the second device.
  • the method before the original signal strength is corrected by the correction function to obtain the corrected signal strength, the method includes:
  • the first correction function is obtained locally or from the server, and the server stores the mapping relationship between different receiving device identifiers and the correction function;
  • the second correction function is acquired locally or from the server, and the server stores the mapping relationship between different sending device identifiers and the correction function.
  • determining the device distance between the first device and the second device based on the corrected signal strength including:
  • the cumulative score is updated based on the target impact score, and the cumulative score is accumulated from at least one target impact score;
  • a device distance determination result is determined based on the accumulated score, and the device distance determination result includes at least one of the device distance being within the target device distance and the device distance being outside the target device distance.
  • determine the target impact score corresponding to the corrected signal strength including:
  • mapping relationship between the m-level signal strength threshold and the impact score from the local or server, where the impact score and the signal strength threshold are positively correlated, and m is an integer greater than or equal to 2;
  • the target impact score corresponding to the corrected signal strength is determined.
  • the target impact score corresponding to the corrected signal strength including:
  • the target impact score corresponding to the corrected signal strength is a preset score, and the preset score is a negative score.
  • the device distance determination result is determined based on the accumulated score, including:
  • the m-level signal strength threshold is determined based on the measurement result of the signal strength of the wireless signal sent by the first standard device to the second device under different device distances;
  • the m-level signal strength threshold is determined based on the measurement results of the signal strength of the wireless signal sent by the first standard device to the second standard device under different device distances get.
  • determining the device distance between the first device and the second device based on the corrected signal strength including:
  • the candidate signal strengths are the modified signal strengths located in the preset position interval after sorting based on the magnitude of the signal strengths
  • the device distance determination result is determined based on the average signal strength, and the device distance determination result includes at least one of the device distance being within the target device distance and the device distance being outside the target device distance.
  • determine the average signal strength of the candidate signal strengths in the signal strength pool including:
  • the method also includes:
  • the last device distance determination result is determined as the current device distance determination result.
  • the device distance determination result is determined based on the average signal strength, including:
  • the first signal strength threshold, the second signal strength threshold and the third signal strength threshold are obtained locally or from the server, and are determined based on the distribution of signal strengths under different device distances;
  • the distribution is determined based on the measurement result of the signal strength of the wireless signal sent by the first standard device to the second device under different device distances;
  • the distribution is determined based on the measurement results of the signal strength of the wireless signal sent by the first standard device to the second standard device under different device distances.
  • the corrected signal strength is obtained based on the first correction function and the second correction function
  • Determining a device distance between the first device and the second device based on the corrected signal strength further comprising:
  • the standard signal strength is obtained by measuring the wireless signals sent by the second standard equipment at different standard equipment distances by the first standard equipment;
  • the method further includes:
  • channel processing is performed on the original signal strength, wherein the channel processing is used to correct the influence of the channel difference on the attenuation speed of the signal strength.
  • corresponding correction functions are preset in the server, and when performing signal strength correction, the first device acquires the corrections corresponding to the first device and/or the second device. function, so as to use the obtained correction function to perform signal strength correction. Exemplary embodiments are used for description below.
  • FIG. 3 shows a flowchart of a device ranging method provided by another exemplary embodiment of the present application. This embodiment is described by taking the method for the first device shown in FIG. 1 as an example, and the method includes the following steps:
  • Step 301 based on the first device identifier of the first device, obtain the first correction function from the local or the server, the first correction function is used to correct the influence of the first device on the signal strength measurement, and the server stores different receiving device identifiers and corrections. Mapping relationship between functions.
  • the first device when the first device enables the wireless signal sending and receiving function, the first device first searches for whether the first correction function corresponding to the first device identification is stored locally according to its own first device identification; , then obtain the first correction function, if not found, then request to obtain the corresponding first correction function from the server based on the first device identifier, and store the first device identifier and the acquired first correction function in a local , for subsequent use.
  • the first device identifier may be a device model of the first device, such as a mobile phone model.
  • the server stores a mapping relationship between receiving device identifiers (device models) of different receiving devices and correction functions.
  • the first device may acquire the first correction function in advance, or may acquire the first correction function when receiving a wireless signal, and the timing for acquiring the first correction function is not limited in this embodiment.
  • the first device requests the server to obtain the first correction function, and the server searches for and returns the corresponding first correction function based on the first device identifier contained in the request. function.
  • the process of determining the first correction function may include the following steps:
  • the standard comparison table is generated by the developer through measurement in advance, and includes the correspondence between the standard device distance and the standard signal strength.
  • the standard signal strength is the standard device distance
  • the first standard device sends the second standard device to the second standard device.
  • the signal strength measurement of the wireless signal is a device with stable receive power
  • the second standard device is a device with stable transmit power.
  • the generated standard comparison table is shown in Table 1 above.
  • the process of generating the standard comparison table is shown in FIG. 5 .
  • Step 501 Set the second standard device to a signal sending state.
  • the second standard device transmits wireless signals with stable signal transmission power and signal transmission interval.
  • Step 502 Set the first standard device to a signal receiving state.
  • the first standard device receives and records the signal strength of the wireless signal.
  • Step 503 Adjust the device distance between the first standard device and the second standard device.
  • Step 504 under the current device distance, based on multiple measurement results, obtain the signal strength corresponding to the device distance.
  • the first standard device performs an average calculation on the signal strengths obtained from multiple measurements, and determines the average signal strength as the signal strength corresponding to the current distance between the devices.
  • Step 505 Store the device distance and signal strength in a standard comparison table.
  • Step 506 check whether all device distances have been tested. If all the tests are completed, the process ends, and if all the tests are not completed, step 503 is executed.
  • the first standard device is used to receive the wireless signal sent by the second standard device, and when the first comparison table is generated, the first device needs to be used to receive the wireless signal sent by the second standard device, so that the first device is used to receive the wireless signal sent by the second standard device.
  • the measured signal strength is used as the signal strength corresponding to the device distance in the first comparison table.
  • the signal strength at all device distances may be measured, or only the signal strength at some key device distances may be measured according to the actual device distance detection requirements of the first device. , and the signal intensities at other device distances can be obtained by function fitting.
  • the corresponding relationship between the device spacing and the signal strength in the first comparison table is shown in Table 2. (Only measure the signal strength under the two key equipment distances of 30cm and 60cm)
  • the corrected signal strength output by the first correction function is: -30dbm; after the first device inputs the measured signal strength -60bm into the first correction function, the corrected signal strength output by the first correction function is -50dbm; and when the signal strength input to the first correction function is between -60 and -35dbm is between, the corrected signal strength output by the first correction function is between -50 and -30 dbm.
  • the process of determining the first correction function is shown in FIG. 6 .
  • Step 601 Set the second standard device to a signal sending state.
  • the second standard device transmits wireless signals with stable signal transmission power and signal transmission interval.
  • Step 602 Set the first device to a signal receiving state.
  • the first device receives and records the signal strength of the wireless signal.
  • Step 603 Adjust the device distance between the first device and the second standard device.
  • Step 604 under the current device distance, based on multiple measurement results, obtain the signal strength corresponding to the device distance.
  • the first device performs an average calculation on the signal strengths obtained from multiple measurements, and determines the average signal strength as the signal strength corresponding to the current distance between the devices.
  • Step 605 Store the device distance and signal strength in the first comparison table.
  • Step 606 check whether all device distances have been tested. If all the tests are completed, go to step 607 , and if not all of the tests are completed, go to step 603 .
  • Step 607 Determine the first correction function based on the standard comparison table and the first comparison table.
  • Step 608 Record the correspondence between the first device and the first correction function.
  • the developer repeats the above steps to obtain respective correction functions corresponding to different receiving devices, and store them in the server.
  • Step 302 Measure the wireless signal sent by the second device to obtain the original signal strength.
  • Step 303 based on the second device identification contained in the wireless signal, obtain a second correction function from the local or the server, the second correction function is used to correct the influence of the second device difference on the signal strength measurement, and the server stores different sending device identifications The mapping relationship with the correction function.
  • the wireless signal sent by the second device includes the second device identifier, and after receiving the wireless signal, the first device first searches for whether there is a local storage corresponding to the second device identifier according to the second device identifier.
  • the second correction function if found, obtain the second correction function; if not found, obtain the corresponding second correction function from the server based on the second device identification request, and combine the second device identification with the acquired
  • the second correction function association is stored locally for subsequent use.
  • the second device identifier may be the device model of the second device, such as earphone model, speaker model, door lock model, etc.
  • the server stores the difference between the transmitting device identifiers (device models) of different transmitting devices and the correction function mapping relationship between.
  • the process of determining the second correction function may include the following steps:
  • the first standard device is used to receive the wireless signal sent by the second standard device.
  • the first standard device needs to be used to receive the wireless signal sent by the second device, so that the first standard device is used to receive the wireless signal sent by the second device.
  • the signal strength measured by the device is used as the signal strength corresponding to the distance of the device in the second comparison table.
  • the signal strength at all device distances may be measured, or only the signal strength at some key device distances may be measured according to the actual device distance detection requirements of the second device. , and the signal intensities at other device distances can be obtained by function fitting.
  • the computer device obtains the second correction function corresponding to the second device by means of polynomial fitting, wherein the first correction function
  • the process of determining the first correction function is shown in FIG. 7 .
  • Step 701 Set the second device to a signal sending state.
  • the second device transmits the wireless signal with stable signal transmission power and signal transmission interval.
  • Step 702 Set the first standard device to a signal receiving state.
  • the first standard device receives and records the signal strength of the wireless signal.
  • Step 703 Adjust the device distance between the first standard device and the second device.
  • Step 704 under the current device distance, based on multiple measurement results, obtain the signal strength corresponding to the device distance.
  • the first standard device performs an average calculation on the signal strengths obtained from multiple measurements, and determines the average signal strength as the signal strength corresponding to the current distance between the devices.
  • Step 705 Store the device distance and signal strength in the second comparison table.
  • Step 706 check whether all device distances have been tested. If all the tests are completed, step 707 is performed, and if all the tests are not completed, step 703 is performed.
  • Step 707 Determine a second correction function based on the standard comparison table and the second comparison table.
  • Step 708 Record the correspondence between the second device and the second correction function.
  • the developer repeats the above steps to obtain the corresponding correction functions for different transmitting devices and store them in the server.
  • Step 304 correcting the original signal strength by using the first correction function and the second correction function to obtain the corrected signal strength.
  • the first device first corrects the original signal strength by using the first correction function to obtain the intermediate signal strength, and then uses the second correction function to correct the intermediate signal strength to obtain the corrected signal strength.
  • the first device receives the wireless signal sent by the second device, and corrects the measured signal strength through the first correction function; in the second correction stage, the A device requests a second correction function corresponding to the second device from the server, the server searches and returns the second correction function based on the identifier of the second device, and the first device uses the second correction function to correct the signal strength obtained by the first correction function and further corrects .
  • Step 305 Determine the device distance between the first device and the second device based on the corrected signal strength.
  • the first device determines the device distance from the second device based on the signal strengths after two corrections.
  • the first device may also only obtain the first correction function corresponding to the first device, and correct the original signal strength through the first correction function to obtain the corrected signal strength, This embodiment will not be repeated here.
  • the signal strength is corrected by using the respective correction functions of the receiving device and the transmitting device, thereby improving the performance of different devices.
  • Accuracy of device distance measurement in ranging scenarios scenarios where distance measurement is performed between different devices).
  • wireless signals may be transmitted between devices through signals of different frequencies (for example, any of the three Bluetooth broadcast channels can be used for wireless signal transmission.
  • One channel sends Bluetooth signals, or 14 2.4GHz WiFi channels send WiFi signals), so in order to further improve the accuracy of the determined device distance, in a possible implementation, before using the correction function to correct the signal strength,
  • the first device performs channel processing on the original signal strength based on the target channel corresponding to the wireless signal, wherein the channel processing is used to correct the influence of the channel difference on the attenuation speed of the signal strength.
  • the first device may determine the signal strength scaling constant corresponding to the target channel, so as to multiply the original signal strength by the signal strength scaling constant, so as to correct the influence of the channel difference on the signal strength attenuation rate.
  • the corresponding relationship between the channel and the signal strength scaling constant may be preset at the first device.
  • the developer may also perform data testing and collection according to different channels in advance, so as to construct different correction functions, which is not limited in this embodiment.
  • the smartphone when devices realize mutual perception, it does not need to be based on the specific device distance, but only based on the distance range.
  • a specific distance range such as within 30cm
  • the smartphone can complete the Bluetooth pairing with the Bluetooth headset; as long as it is identified that the Bluetooth headset is outside a specific distance range (For example, outside the range of 30cm), the smartphone can be unpaired with the Bluetooth headset.
  • the first device may determine the device distance in the following manner.
  • Step 801 Determine the target influence score corresponding to the corrected signal strength.
  • the first device determines the target impact score corresponding to the corrected signal strength, wherein the target impact score may be a positive value or a negative value, and the target impact score is The absolute value is used to characterize the degree of influence of the corrected signal strength on the determination result of the device distance (the degree of influence is positively correlated with the absolute value), and the positive target influence score indicates that the corrected signal strength has a positive impact on the determination result of the device distance (the distance between the devices is located at Within the target device distance), the negative target impact score indicates that the corrected signal strength has a negative impact on the device distance determination result (the device distance is outside the target device distance).
  • the target impact score may be a positive value or a negative value
  • the target impact score is The absolute value is used to characterize the degree of influence of the corrected signal strength on the determination result of the device distance (the degree of influence is positively correlated with the absolute value)
  • the positive target influence score indicates that the corrected signal strength has a positive impact on the determination result of the device distance (the distance between the devices is located at Within the target
  • the first device ranks the corrected signal strength, so as to determine the target impact score based on the level at which the corrected signal strength is located. This step may include the following steps.
  • At least two levels of signal strength thresholds and the impact score are preset in the server.
  • the first device when the mapping relationship is not stored locally, the first device requests to acquire the mapping relationship from the server (which may be acquired together with the correction function).
  • the server can store signal strength thresholds and impact scores corresponding to different device distances, and the first device obtains the signal strength thresholds and impact scores corresponding to the target device distances from the server according to the target device distances.
  • the m-level signal strength threshold is based on different device distances.
  • the signal strength measurement result of the wireless signal sent by the first standard device to the second standard device is determined (that is, determined based on the standard comparison table).
  • the target device distance is 30cm (that is, judging whether the device distance is within the within 30cm)
  • the signal strength threshold "-40" corresponding to the distance "40cm” is determined as the third-level signal strength threshold, and the influence score less than the second-level signal strength threshold is set to 50 points for the third-level signal strength threshold.
  • the above-mentioned signal strength threshold and impact score are finally obtained by developers through continuous fine-tuning based on the recall rate (probability of accurately identifying the distance between devices) and false recognition rate (probability of incorrectly identifying the distance between devices). And after applying the signal strength threshold and impact score obtained by fine-tuning, the judgment of the device distance can meet the requirements of the recall rate and the false recognition rate (the recall rate is higher than the first threshold, and the false recognition rate is lower than the threshold).
  • the m-level signal strength threshold is based on the measurement results of the signal strength of the wireless signal sent by the first standard device to the second device under different device distances It is determined to be obtained (ie, it is determined to be obtained based on the second comparison table).
  • the manner of determining the signal strength threshold and the influence score may refer to the foregoing embodiment, and details are not described herein again in this embodiment.
  • the server stores signal strength thresholds and impact scores corresponding to different transmitting devices, and the first device obtains the signal strength thresholds and impact scores corresponding to the second device from the server according to the second device identifier.
  • the first device determines the target influence score corresponding to the corrected signal strength by comparing the magnitude relationship between the corrected signal strength and the signal strength thresholds of all levels. Among them, the greater the corrected signal strength, the higher the target impact score, the greater the positive impact on the device distance judgment result; the smaller the corrected signal strength, the lower the target impact score, and the greater the negative impact on the device distance judgment result. big.
  • the first device in response to the corrected signal strength being less than the nth level signal strength threshold and greater than the n+1th level signal strength threshold, sets the influence score corresponding to the n+1th level signal strength threshold Determined as the target impact score, n is a positive integer less than m.
  • the target influence score corresponding to the corrected signal strength is a preset score, and the preset score is a negative score.
  • the preset score is usually fine-tuned by the developer through testing.
  • the first device determines that the target impact score is 150 points; when When the corrected signal strength is -28dbm, since the first-level signal strength threshold ⁇ -28dbm ⁇ the second-level signal strength threshold, the first device determines that the target impact score is 100 points.
  • the first device determines that the target impact score is -200 points.
  • Step 802 Update the cumulative score based on the target impact score, and the cumulative score is obtained by accumulating at least one target impact score.
  • the first device uses a cumulative score obtained by accumulating at least one target impact score as a judgment basis for the device distance judgment result.
  • the first device accumulates the target influence score on the basis of the current accumulated score.
  • the updated cumulative score is 150 points; if the current cumulative score is 100 points, and the target impact score is 50 points If the value is -200 points, the updated cumulative score will be -200 points.
  • Step 803 Determine a device distance determination result based on the accumulated score, where the device distance determination result includes at least one of the device distance being within the target device distance and the device distance being outside the target device distance.
  • the first device After each cumulative score update is completed, the first device will perform a device distance determination based on the updated cumulative score to obtain a device distance determination result, which is used to indicate that the device distance is within the target device distance or The device spacing is outside the target device spacing.
  • the first device acquires at least two-level score thresholds (which can be acquired together with the signal strength threshold and the impact score) from the local or server, and compares the cumulative score with the various score thresholds The size relationship between them is obtained, and the result of the device spacing judgment is obtained.
  • the first device in response to the cumulative score being greater than the first score threshold, determines that the device spacing is within the target device spacing
  • the first device determines the previous device distance determination result as the current device distance determination result
  • the score threshold is fine-tuned by the developer through testing.
  • the first device determines the device distance from the second device Within 30cm, if the cumulative score is -150 points, the first device determines that the device distance from the second device is beyond 30cm.
  • the corresponding correction signal strength is determined.
  • the target affects the score, and the score is accumulated, and then the device distance is determined based on the accumulated score.
  • Speed accumulation and size judgment are much faster than exponentiation).
  • the complete process of determining the distance between devices based on the corrected signal strength is shown in FIG. 9 .
  • Step 901 Initialize the accumulated score when the wireless signal is received.
  • Step 902 Obtain the corrected signal strength.
  • Step 903 Detect whether the corrected signal strength is greater than the first-level signal strength threshold. If it is greater than, go to step 904 , if it is less than, go to step 905 .
  • Step 904 determining the target influence score as the first score.
  • Step 905 detecting whether the corrected signal strength is greater than the second-level signal strength threshold. If it is greater than, go to step 906 , if it is less than, go to step 907 .
  • Step 906 determining the target influence score as the second score.
  • Step 907 detecting whether the corrected signal strength is greater than the third-level signal strength threshold. If it is greater than, go to step 908 , if it is less than, go to step 909 .
  • Step 908 determining the target influence score as the third score.
  • Step 909 Determine the target influence score as the fourth score.
  • Step 910 update the accumulated score.
  • Step 911 Detect whether the accumulated score is greater than the first score threshold. If it is greater than, go to step 912 , if it is less than, go to step 913 .
  • Step 912 it is determined that the second device is located within the distance between the target devices.
  • Step 913 check whether the accumulated score is less than the second score threshold, if it is less than, go to step 914 , if it is greater, go to step 915 .
  • Step 914 it is determined that the second device is located beyond the distance between the target devices.
  • Step 915 maintaining the last device distance determination result.
  • the first device may determine the distance between devices in the following manner.
  • Step 1001 adding the corrected signal strength to a signal strength pool, where the signal strength pool is used to store k corrected signal strengths obtained by the latest measurement and correction, where k is a positive integer greater than 1.
  • the first device in order to smooth the fluctuation of the signal strength, sets a signal strength pool, and the capacity of the signal strength pool is k, that is, it can store at most the latest k corrected signal strengths.
  • the first device adopts the first-in, first-out principle, and moves the corrected signal strength that first enters the signal strength pool out of the signal strength pool.
  • the signal strength pool is designed to store the corrected signal strength in the most recent i seconds at most.
  • the capacity of the signal strength pool is 30, that is, the corrected signal strength within the last 3s can be stored.
  • Step 1002 Determine the average signal strength of the candidate signal strengths in the signal strength pool, where the candidate signal strengths are the modified signal strengths located in the preset position interval after sorting based on the size of the signal strengths.
  • the first device determines the average signal strength based on the corrected signal strength in the signal strength pool by calculating the average value.
  • the first device does not obtain an average value of all the corrected signal strengths in the signal strength pool, but obtains an average value of some of the candidate signal strengths.
  • the modified signal strengths in the signal strength pool are sorted in ascending order of strength, and the modified signal strengths located in the preset position range after sorting are selected as candidate signal strengths.
  • the number of candidate signal strengths is greater than or equal to half of the current number of corrected signal strengths in the signal strength pool.
  • the top 30% to 85% of the modified signal strengths are determined as candidate signal strengths.
  • the first device may directly calculate the average value of the candidate signal strengths, so as to determine the average value as the average signal strength; or, the first device may calculate the weighted average value of the candidate signal strengths, thereby The weighted average is determined as the average signal strength, wherein the weights of different candidate signal strengths may be determined based on the signal strength measurement moments (the closer the measurement moment is, the greater the weight), or the weights of the candidate signal strengths may be determined based on the distribution of signal strengths (The wider the distribution, the greater the weight), which is not limited in this embodiment.
  • Step 1003 Determine a device distance determination result based on the average signal strength, where the device distance determination result includes at least one of the device distance being within the target device distance and the device distance being outside the target device distance.
  • the first device After each update of the average signal strength, the first device will perform a device distance determination based on the updated average signal strength, and obtain the device distance determination result.
  • the device distance determination result is used to indicate that the device distance is within the target device distance or the device distance. The spacing is outside the target device spacing.
  • the first device obtains at least two signal strength thresholds locally or from a server, and obtains a device distance determination result by comparing the magnitude relationship between the average signal strength and each signal strength threshold.
  • the first device in response to the average signal strength being greater than the second signal strength threshold, determines that the device separation is within the target device separation;
  • the first device determines the previous device distance determination result as the current device distance determination result
  • the first device determines that the device separation is outside the target device separation.
  • the signal strength threshold is determined based on the distribution of signal strengths under different device distances.
  • the distribution is determined based on the measurement results of the signal strength of the wireless signal sent by the first standard equipment to the second equipment under different equipment distances, that is, based on the second comparison table The distribution of signal strength under each device distance is determined.
  • the first standard device when generating the second comparison table corresponding to the second device, will record the signal strength obtained by each measurement in addition to the average value of the signal strength (as the signal strength in the second comparison table). , and analyze the distribution of signal strength under different device distances. Further, the signal strength (range) with the highest distribution probability is the second signal strength threshold corresponding to the device distance, and the signal strength (range) with the lowest distribution probability is the third signal strength threshold corresponding to the device distance.
  • the probability that the signal strength is greater than -25dbm is 85%, and the probability that the signal strength is greater than -30dbm and less than -25dbm is 10%. , there is a 5% probability that the signal strength is less than -30dbm.
  • the second signal strength threshold corresponding to the device distance of 20cm is set to -25dbm (that is, when the average signal strength is greater than -25dbm, the device distance is determined to be within 20cm);
  • the third signal strength threshold corresponding to the device distance of 20cm is set to Set it to -30dbm (that is, when the average signal strength is less than -30dbm, determine that the distance between the devices is 20cm away).
  • the distribution is based on the wireless signals sent by the first standard device to the second standard device under different device distances
  • the measurement result of the signal strength of is determined based on the distribution of the signal strength under the distance between each device in the standard comparison table, which is not repeated in this embodiment.
  • the first device may determine the distance between devices in the following manner.
  • Step 1101 adding the corrected signal strength to a signal strength pool, where the signal strength pool is used to store k corrected signal strengths obtained by the latest measurement and correction, where k is a positive integer greater than 1.
  • step 100 For the implementation of this step, reference may be made to step 1001, and details are not described herein again in this embodiment.
  • Step 1102 in response to the latest modified signal strength in the signal strength pool being greater than the first signal strength threshold, determine that the device distance is within the target device distance.
  • the first signal strength threshold is greater than the second signal strength threshold, and is determined based on the distribution of signal strengths at different device distances (tends to reduce the possibility of out-of-range).
  • the probability that the signal strength is greater than the target signal strength threshold is greater than the probability threshold
  • the probability that the signal strength is greater than the target signal strength threshold is less than the probability threshold
  • the first signal strength threshold corresponding to the distance between the second devices is set as the target signal strength threshold.
  • the probability of the signal strength being greater than -30dbm is 95%; when the distance between the devices is 30cm, the probability of the signal strength being greater than -30dbm is 40%; when the distance between the devices is 50cm , the probability that the signal strength is greater than -30dbm is 5%, and the first signal strength threshold corresponding to the device distance "30cm" can be set to -30dbm, that is, when the latest corrected signal strength is greater than -30dbm, the first device determines that the device distance is within within 30cm.
  • Step 1103 in response to the most recent modified signal strength in the signal strength pool being less than the first signal strength threshold, and the number of modified signal strengths in the signal strength pool being greater than the number threshold, determine the average signal strength of the candidate signal strengths in the signal strength pool.
  • the first device calculates the average signal strength only when the number of corrected signal strengths in the signal strength pool is greater than the number threshold.
  • the number threshold is 3, that is, when there are at least three modified signal strengths in the signal strength pool, the first device will calculate the average signal strength.
  • Step 1104 Determine the device distance determination result based on the average signal strength, where the device distance determination result includes at least one of the device distance being within the target device distance and the device distance being outside the target device distance.
  • step 1003 For the implementation of this step, reference may be made to step 1003, and details are not described herein again in this embodiment.
  • Step 1105 in response to the last corrected signal strength in the signal strength pool being less than the first signal strength threshold, and the number of corrected signal strengths in the signal strength pool being less than the number threshold, determine the previous device distance determination result as the current device distance determination result.
  • the first device When the number of corrected signal strengths in the signal strength pool is less than the number threshold, the first device continues to use the previous device distance determination result. Wherein, when the previous device distance determination result is empty, the device distance determination result is not output.
  • the distance between devices is quickly determined based on the single signal measurement result, and the speed of determining the distance between devices is improved.
  • the complete process of determining the distance between devices based on the corrected signal strength is shown in FIG. 12 .
  • Step 1201 when a wireless signal is received, initialize a signal strength pool.
  • Step 1202 Obtain the corrected signal strength.
  • Step 1203 adding the corrected signal strength to the signal strength pool.
  • Step 1204 detecting whether the latest modified signal strength is greater than the first signal strength threshold. If it is greater than, go to step 1205 , if it is less than, go to step 1206 .
  • Step 1205 it is determined that the second device is located within the distance between the target devices.
  • Step 1206 Detect whether the number of corrected signal strengths in the signal strength pool is less than the number threshold. If it is less than, go to step 1207, if it is greater than, go to step 1208.
  • Step 1207 maintaining the last device distance determination result.
  • Step 1208 Calculate the average signal strength of the candidate signal strengths in the signal strength pool.
  • Step 1209 detecting whether the average signal strength is greater than the second signal strength threshold. If it is greater than, go to step 1210, if it is less than, go to step 1211.
  • Step 1210 it is determined that the second device is located within the distance between the target devices.
  • Step 1211 Detect whether the average signal strength is less than a third signal strength threshold. If it is less than, go to step 1212, if it is greater than, go to step 1213.
  • Step 1212 it is determined that the second device is located outside the distance between the target devices.
  • Step 1213 maintaining the last device distance determination result.
  • FIG. 13 shows a structural block diagram of a device ranging apparatus provided by an embodiment of the present application.
  • the apparatus may be implemented by software, hardware or a combination of the two to become all or a part of the first device.
  • the device includes:
  • the signal measurement module 1301 is used to measure the wireless signal sent by the second device to obtain the original signal strength
  • an intensity correction module 1302 configured to correct the original signal strength through a correction function to obtain a corrected signal strength, and the correction function is used to correct the influence of the difference of the receiving device and/or the transmitting device on the signal strength measurement;
  • a distance determination module 1303, configured to determine a device distance between the first device and the second device based on the corrected signal strength.
  • the intensity correction module 1302 includes:
  • a first strength correction unit configured to correct the original signal strength through a first correction function to obtain the corrected signal strength, and the first correction function is used to correct the influence of the first device on the signal strength measurement;
  • a second strength correction unit configured to correct the original signal strength by using a first correction function and a second correction function to obtain the corrected signal strength, and the first correction function is used to correct the pair received by the first device.
  • the influence of the signal strength measurement, the second correction function is used to correct the influence of the second device on the signal strength measurement.
  • the first correction function is based on the signal strength measurement result of the wireless signal sent by the first standard device to the second standard device, and the signal strength of the wireless signal sent by the first device to the second standard device. The measurement results are confirmed;
  • the second correction function is based on the signal strength measurement result of the wireless signal sent by the first standard device to the second standard device, and the signal strength of the wireless signal sent by the first standard device to the second device The measurement results are confirmed.
  • the device includes:
  • a first obtaining module configured to obtain the first correction function from a local or a server based on the first device identifier of the first device, and the server stores the mapping relationship between different receiving device identifiers and the correction function;
  • the second acquisition module is configured to acquire the second correction function from a local or a server based on the second device identifier included in the wireless signal, and the server stores the mapping relationship between different sending device identifiers and correction functions .
  • the distance determination module 1303 includes:
  • a score determination unit configured to determine the target influence score corresponding to the corrected signal strength
  • a score updating unit configured to update a cumulative score based on the target impact score, where the cumulative score is obtained by accumulating at least one of the target impact scores
  • a first distance determination unit configured to determine a device distance determination result based on the cumulative score value, the device distance determination result including the device distance being within the target device distance and the device distance being located outside the target device distance. at least one.
  • the score determination unit is used for:
  • mapping relationship between the m-level signal strength threshold and the impact score from the local or server, wherein the impact score and the signal strength threshold are positively correlated, and m is an integer greater than or equal to 2;
  • the target influence score corresponding to the corrected signal strength is determined.
  • the score determination unit is specifically used for:
  • determining the impact score corresponding to the n+1th level signal strength threshold as the target impact score In response to the modified signal strength being less than the nth level signal strength threshold and greater than the n+1th level signal strength threshold, determining the impact score corresponding to the n+1th level signal strength threshold as the target impact score , where n is a positive integer less than m;
  • the target influence score corresponding to the corrected signal strength is a preset score, and the preset score is a negative score.
  • the first distance determining unit is used for:
  • the m-level signal strength threshold is based on the wireless signal sent by the first standard device to the second device under different device distances. The measurement result of the signal strength is determined;
  • the m-level signal strength threshold is based on the difference between the first standard equipment and the second standard equipment at different distances between equipments.
  • the signal strength measurement result of the transmitted wireless signal is determined.
  • the distance determination module 1303 includes:
  • the adding unit is configured to add the corrected signal strength to a signal strength pool, where the signal strength pool is configured to store the k corrected signal strengths obtained by the latest measurement and correction, where k is a positive integer greater than 1;
  • a determining unit configured to determine the average signal strength of the candidate signal strengths in the signal strength pool, where the candidate signal strengths are the modified signal strengths located in a preset position interval after sorting based on the size of the signal strengths;
  • a second distance determining unit configured to determine a device distance determination result based on the average signal strength, where the device distance determination result includes the device distance within the target device distance and the device distance outside the target device distance at least one.
  • the determining unit is used for:
  • determining the candidate in the signal strength pool The mean signal strength of the signal strength.
  • the device also includes:
  • a first determining module configured to determine that the device distance is within the target device distance in response to the most recent one of the modified signal strengths in the signal strength pool being greater than the first signal strength threshold
  • a second determining module configured to respond that the latest modified signal strength in the signal strength pool is less than the first signal strength threshold, and the number of the modified signal strengths in the signal strength pool is less than the number threshold , and the last device distance judgment result is determined as the current device distance judgment result.
  • the second distance determining unit is used for:
  • the second signal strength threshold In response to the average signal strength being greater than a second signal strength threshold, determining that the device spacing is within the target device spacing, the second signal strength threshold being less than the first signal strength threshold;
  • the first signal strength threshold, the second signal strength threshold and the third signal strength threshold are obtained locally or from a server, and are determined based on the distribution of signal strengths under different device distances;
  • the distribution is based on the measurement result of the signal strength of the wireless signal sent by the first standard device to the second device under different device distances sure to get;
  • the distribution is based on the wireless signals sent by the first standard device to the second standard device under different device distances.
  • the signal strength measurement of the signal is determined.
  • the corrected signal strength is obtained through correction based on the first correction function and the second correction function;
  • the distance determination module 1303 further includes:
  • an obtaining unit configured to obtain a standard comparison table between standard equipment spacing and standard signal strength, where the standard signal strength is obtained by measuring the wireless signals sent by the second standard equipment at different standard equipment spacings by the first standard equipment;
  • a third distance determination unit configured to look up the device distance from the comparison table based on the corrected signal strength.
  • the device further includes:
  • the processing module is configured to perform channel processing on the original signal strength based on the target channel corresponding to the wireless signal, wherein the channel processing is used to correct the influence of channel differences on the attenuation speed of the signal strength.
  • the first device before determining the distance between the first device and the second device based on the measured original signal strength, the first device first uses a correction function to correct the original signal strength, so as to eliminate the receiving device and/or the influence of the difference of the transmitting device on the signal strength measurement, so that the distance between the devices is determined based on the corrected signal strength obtained by the correction.
  • the signal strength correction can improve the accuracy of the measured signal strength. This further improves the accuracy of the subsequently determined device distance.
  • FIG. 14 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
  • the computer device 1400 may be a smartphone, a tablet, a wearable device, or the like.
  • Computer device 1400 in this application may include one or more of the following components: processor 1410 , memory 1420 , and wireless communication component 1430 .
  • Processor 1410 may include one or more processing cores.
  • the processor 1410 uses various interfaces and lines to connect various parts of the entire computer device 1400, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 1420, and calling the data stored in the memory 1420.
  • the processor 1410 may employ at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA programmable logic array
  • the processor 1410 may integrate one or more of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU), and a modem, etc.
  • a central processing unit Central Processing Unit, CPU
  • a graphics processor Graphics Processing Unit, GPU
  • a neural network processor Neural-network Processing Unit, NPU
  • a modem etc.
  • the CPU mainly processes the operating system, user interface and application programs, etc.
  • the GPU is used for rendering and drawing the content that needs to be displayed on the touch display screen 1430
  • the NPU is used for implementing artificial intelligence (Artificial Intelligence, AI) functions
  • the modem is used for Handle wireless communications. It can be understood that, the above-mentioned modem may not be integrated into the processor 1410, but is implemented by a single chip.
  • the memory 1420 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory, ROM).
  • the memory 1420 includes a non-transitory computer-readable storage medium.
  • Memory 1420 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 1420 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the various method embodiments described below; the storage data area may store data (such as audio data, phone book) and the like created according to the use of the computer device 1400 .
  • the wireless communication component 1430 is a component for transmitting and receiving wireless signals, and is composed of a receiver and a transmitter.
  • the wireless communication component 1430 may be a Bluetooth communication component, a WiFi communication component, or a UWB communication component, etc., which is not limited in this embodiment.
  • the structure of the computer device 1400 shown in the above drawings does not constitute a limitation on the computer device, and the computer device may include more or less components than those shown in the drawings, or combinations thereof. certain components, or different component arrangements.
  • the computer device 1400 also includes components such as a display screen, a sensor, an audio circuit, and a power supply, which will not be repeated here.
  • Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the device ranging method described in each of the above embodiments.
  • Embodiments of the present application provide yet another computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the device ranging method provided in various optional implementation manners of the above aspects.
  • Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
  • a storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种设备测距方法、装置、计算机设备、计算机可读存储介质及计算机产品,属于物联网技术领域。设备测距方法包括:测量第二设备发送的无线信号,得到原始信号强度(201);通过修正函数对原始信号强度进行修正,得到修正信号强度,修正函数用于修正接收设备和/或发射设备差异对信号强度测量的影响(202);基于修正信号强度确定第一设备与第二设备之间的设备间距(203)。

Description

设备测距方法、装置、设备及存储介质
本申请要求于2021年02月18日提交的申请号为202110190420.0、发明名称为“设备测距方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及物联网技术领域,特别涉及一种设备测距方法、装置、设备及存储介质。
背景技术
随着物联网(Internet of Things,IoT)技术的不断发展,越来越多的电子设备之间能够通过无线方式实现交互。
在实现设备间交互时,设置之间通常需要进行测距,从而基于测量得到的间距确定出进行交互的设备。以蓝牙设备间进行交互为例,蓝牙设备将蓝牙接收信号的信号接收强度指示(RSSI,Received Signal Strength Indication)代入距离计算公式,确定与其他蓝牙设备之间的距离。
发明内容
本申请实施例提供了一种设备测距方法、装置、设备及存储介质。所述技术方案如下:
一方面,本申请实施例提供了一种设备测距方法,所述方法用于第一设备,所述方法包括:
测量第二设备发送的无线信号,得到原始信号强度;
通过修正函数对所述原始信号强度进行修正,得到修正信号强度,所述修正函数用于修正接收设备和/或发射设备差异对信号强度测量的影响;
基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距。
另一方面,本申请实施例提供了一种设备测距装置,所述装置用于第一设备,所述装置包括:
信号测量模块,用于测量第二设备发送的无线信号,得到原始信号强度;
强度修正模块,用于通过修正函数对所述原始信号强度进行修正,得到修正信号强度,所述修正函数用于修正接收设备和/或发射设备差异对信号强度测量的影响;
间距确定模块,用于基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距。
另一方面,本申请实施例提供了一种计算机设备,所述计算机设备包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现如上述方面所述的设备测距方法。
另一方面,本申请实施例提供了一种计算机可读存储介质,所述存储介质存储有至少一条指令,所述至少一条指令用于被处理器执行以实现如上述方面所述的设备测距方法。
另一方面,本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的设备测距方法。
附图说明
图1示出了本申请一个示例性实施例提供的实施环境的示意图;
图2示出了本申请一个示例性实施例提供的设备测距方法的流程图;
图3示出了本申请另一个示例性实施例提供的设备测距方法的流程图;
图4是本申请一个示例性实施例示出的设备测距过程的交互时序图;
图5是本申请一个示例性实施例示出的标准对照表生成过程的流程图;
图6是本申请一个示例性实施例示出的第一修正函数确定过程的流程图;
图7是本申请一个示例性实施例示出的第二修正函数确定过程的流程图;
图8是本申请一个示例性实施例示出的设备间距确定过程的流程图;
图9是本申请一个示例性实施例示出的设备间距确定过程的实施示意图;
图10是本申请另一个示例性实施例示出的设备间距确定过程的流程图;
图11是本申请另一个示例性实施例示出的设备间距确定过程的流程图;
图12是本申请另一个示例性实施例示出的设备间距确定过程的实施示意图;
图13示出了本申请一个实施例提供的设备测距装置的结构框图;
图14示出了本申请一个示例性实施例提供的计算机设备的结构方框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
相关技术中,进行测距时,设备首先对无线信号进行信号强度测量,然后将测量得到的信号强度作为参数输入距离计算公式,得到设备间距,该距离计算公式如下:
Figure PCTCN2022073397-appb-000001
其中,Distance为设备间距,MeasuredPower为设备间距为1米是测量得到的信号强度,RSSI为设备实际测量得到的信号强度,N为信号衰减速率(与环境因素相关,通常取常数2)。
从上述公式可以看出,设备间距的准确性与实际测量得到的信号强度的准确性强相关。然而由于信号测量收到环境因素的影响,其数值波动较大,若仅适用单次测量得到的信号强度计算设备间距,计算结果误差较大。因此设备通常会测量多次信号强度,以此提高设备间距的准确性。
并且,由于不同设备的收发天线在设计上存在差异,因此上述距离计算公式中,MeasuredPower和N的取值在不同设备上存在较大差异,导致采用固定常数的MeasuredPower和N进行距离计算时,计算得到的设备间距与实际设备间距之间的误差较大。
本申请实施例提供的设备测距方法中,设备对无线信号进行测量得到原始信号强度后,并非直接利用原始信号强度确定设备间距,而是首先利用修正函数对原始信号强度进行修正,消除接收设备和/或发射设备差异对信号强度测量的影响,以此提高信号强度的准确性,进而基于修正信号强度确定设备间距。采用本申请实施例提供的方案,在不增加额外设备硬件的前提下,通过引入信号强度修正机制能够提高测量得到的信号强度的准确性,进而提高后续确定出的设备间距的准确性。
请参考图1,其示出了本申请一个示例性实施例提供的实施环境的示意图,该实施环境中包括第一设备110和第二设备120。
第一设备110是具有无线信号收发功能的电子设备,该电子设备可以是智能手机、平板电脑、可穿戴式设备、个人计算机等等,且该无线信号收发功能可以通过信号收发组件实现。第一设备110开启无线信号收发功能时,信号收发组件即可接收到信号接收范围内其他设备发送的无线信号,并能够向信号发送范围内的其他设备发送无线信号。其中,该信号收发组件可以内置在第一设备110中,也可以外接在第一设备110上,本实施例对此不作限定。
在一些实施例中,当信号收发组件为蓝牙组件时,信号收发组件收发的无线信号为蓝牙信号;当信号收发组件为无线保真(Wireless Fidelity,WiFi)组件时,信号收发组件收发的无线信号为WiFi信号;当信号收发组件为超宽带(Ultra Wide Band,UWB)组件时,信号收发组件收发的无线信号为UWB信号(脉冲信号),本申请实施例并不对无线信号的信号类型进行限定。
第二设备120是具有无线信号收发功能的电子设备,该电子设备可以是IoT设备,比如智能音箱121、智能电视122、智能门锁123、蓝牙耳机124等等,且无线信号收发功能可以通过信号收发组件实现。第二设备120开启无线信号收发功能时,信号收发组件即可接收到信号接收范围内其他设备发送的无线信号,并能够向信号发送范围内的其他设备发送无线信号。
在一种可能的应用场景下,当第一设备110和第二设备120的信号收发功能均开启时,第二设备120通过信号收发组件发送无线信号,第一设备110则通过信号收发组件接收该无线信号,并对无线信号进行信号强度测量,得到原始信号强度。进一步的,第一设备110对原始信号强度进行修正,消除接收设备与发送设备差异对信号强度测量的影响,得到修正信号强度,从而基于修正信号强度确定与第二设备120之间的设备间距。当设备间距位于距离范围之内时,第一设备110即与第二设备120建立连接,进而通过该连接控制第二设备120。
当然,当第二设备120具有较强数据处理能力时,第二设备120也可以基于第一设备110发送的无线信号确定设备间距,本实施例对此并不进行限定。为了方便描述,下述各个实施例以设备测距方法应用于第一设备110为例进行说明。
请参考图2,其示出了本申请一个示例性实施例提供的设备测距方法的流程图。本实施例以该方法用于图1所示的第一设备为例进行说明,该方法包括如下步骤:
步骤201,测量第二设备发送的无线信号,得到原始信号强度。
在一种可能的实施方式中,当开启无线信号收发功能(比如WiFi功能、蓝牙功能或UWB功能等等)时,第一设备通过信号收发组件接收第二设备发送的无线信号,并对无线信号进行信号强度测量,得到原始信号强度。
其中,第一设备接收无线信号并测量信号强度时,并不需要与第二设备建立稳定连接,比如,当第二 设备进行信号广播时,第一设备只要位于信号广播范围内,即可接收到无线信号,并测量无线信号的信号强度,无需与第二设备建立连接。
在一些实施例中,当无线信号为蓝牙信号时,该原始信号强度即为原始蓝牙信号强度;当无线信号为WiFi信号时,该原始信号强度即为原始WiFi信号强度;当无线信号为UWB信号时,该原始信号强度即为原始脉冲信号强度。本实施例并不对此进行限定。
本申请实施例中,信号强度采用RSSI表示(负数,单位为dbm),RSSI越大,表明无线信号在传播过程中的损失越小,反之,RSSI越小,表明无线信号在传播过程中的损失越大。
可选的,当第二设备按照特定频率发送无线信号时,第一设备对每次接收到的无线信号进行测量,得到连续的多个原始信号强度。比如,当第二设备以100ms间隔发送无线信号时,第一设备在1s内可以测量得到10个原始信号强度。
步骤202,通过修正函数对原始信号强度进行修正,得到修正信号强度,修正函数用于修正接收设备和/或发射设备差异对信号强度测量的影响。
由于信号强度的测量结果会受到接收设备(即第一设备)以及发射设备(即第二设备)的影响(即相同设备间距下,不同接收设备对同一发射设备发送的无线信号的信号强度测量结果存在差异;相同设备间距下,同一接收设备对不同发射设备发送的无线信号的信号强度测量结果存在差异),因此为了提高信号测量结果的准确性,第一设备需要对原始信号强度进行修正。
其中,信号强度的修正过程可以理解为测量过程的标准化,即将实际设备间距下第一设备对第二设备发送的无线信号的测量过程,转化为,实际设备间距下标准接收设备对标准发送设备发送的无线信号的测量过程。需要说明的是,若第一设备和第二设备均为标准设备,第一设备则无需进行信号强度修正。
在一种可能的实施方式中,第一设备中设置有用于进行信号强度修正的修正函数,信号强度修正过程中,第一设备将测量得到的原始信号强度作为函数输入,将修正函数的函数输出确定为修正信号强度。其中,不同的接收设备和/或发射设备对应不同的修正函数,且修正函数可以预先设置在第一设备处,或者由第一设备从服务器处获取并存储。
可选的,修正函数用于修正接收设备对信号强度测量的影响,或者,修正函数用于修正发射设备对信号强度测量的影响,或者,修正函数用于修正接收设备以及发射设备对信号强度测量的影响。
由于接收设备对信号强度测量的影响较大,因此在一种可能的实施方式中,该修正函数用于修正接收设备对信号强度测量的影响,或者,该修正函数用于修正接收设备以及发射设备对信号强度测量的影响(即至少需要修正接收设备对信号强度测量的影响)。
可选的,当第二设备按照特定频率发送无线信号时,第一设备对连续测量得到的多个原始信号强度均进行信号强度修正。
步骤203,基于修正信号强度确定第一设备与第二设备之间的设备间距。
进一步的,第一设备基于修正信号强度,确定设备间距,其中,该设备间距可以为具体距离(比如30cm,50cm等等),可以是范围指示(比如30cm至50cm这一范围,或者,30cm范围内,30cm范围外)。
在一种可能的实施方式中,当需要得到具体设备间距时,第一设备将修正信号强度作为参数输入距离计算公式,得到设备间距。由于距离计算公式中包含乘方运算,因此利用距离计算公式计算设备间距的速度较慢。
在另一种可能的实施方式中,当仅需要得到设备间距所处的大致范围时,第一设备获取标准设备间距与标准信号强度的标准对照表,从而基于修正信号强度,从标准对照表中查找设备间距,其中,标准信号强度是通过第一标准设备(标准接收设备)对不同标准设备间距处第二标准设备(标准发射设备)发送的无线信号进行测量得到。相较于利用距离计算公式计算设备间距,通过查找对照表确定设备间距的速度较快(因为无需进行乘方运算)。
在一个示意性的例子中,标准设备间距与标准信号强度的标准对照表如表一所示。
表一
标准设备间距(cm) 标准信号强度(dbm)
10 -20
20 -25
30 -30
60 -40
100 -50
比如,当修正信号强度为-27dbm时,第一设备确定与第二设备之间的设备间距位于20cm至30cm这一范围,或,确定设备间距位于30cm范围之内;当修正信号强度为-35dbm时,第一设备确定与第二设备之间的设备间距位于30cm至60cm这一范围,或,确定设备间距位于30cm范围之外。
可选的,第一设备基于确定出的设备间距,确定是否与第二设备建立连接,并在于第二设备建立连接后,与第二设备进行交互。
示意性的,如图1所示,当第二设备120为智能音箱121时,若第一设备120基于蓝牙信号强度确定智能音箱121位于50cm之内,则与智能音箱121建立蓝牙连接,从而控制智能音箱121进行音乐播放;当第二设备120为智能电视122时,若第一设备120基于蓝牙信号强度确定智能电视122位于100cm之内,则通过WiFi网络与智能电视122建立连接,从而控制智能电视122进行设备投屏;当第二设备120为智能门锁123时,若第一设备120基于蓝牙信号强度确定智能门锁123位于20cm之内,则与智能门锁123建立蓝牙连接,并接收用户在第一设备120出录入指纹,当指纹通过验证时,即控制智能门锁123开启;当第二设备120为蓝牙耳机124时,若第一设备120基于蓝牙信号强度确定蓝牙耳机124位于30cm之内,则与蓝牙耳机124进行蓝牙配对,并在配对后通过蓝牙耳机124进行音乐播放。
综上所述,本申请实施例中,第一设备基于测量得到的原始信号强度,确定与第二设备之间的设备间距前,首先利用修正函数对原始信号强度进行修正,以此消除接收设备和/或发射设备差异对信号强度测量的影响,从而基于修正得到的修正信号强度确定设备间距,在利用已有设备硬件的前提下,通过信号强度修正能够提高测量得到的信号强度的准确性,进而提高后续确定出的设备间距的准确性。
可选的,通过修正函数对原始信号强度进行修正,得到修正信号强度,包括:
通过第一修正函数对原始信号强度进行修正,得到修正信号强度,第一修正函数用于修正第一设备对信号强度测量的影响;或,
通过第一修正函数和第二修正函数对原始信号强度进行修正,得到修正信号强度,第一修正函数用于修正接收第一设备对信号强度测量的影响,第二修正函数用于修正第二设备对信号强度测量的影响。
可选的,第一修正函数基于第一标准设备对第二标准设备发送的无线信号的信号强度测量结果,以及第一设备对第二标准设备发送的无线信号的信号强度测量结果确定得到;
第二修正函数基于第一标准设备对第二标准设备发送的无线信号的信号强度测量结果,以及第一标准设备对第二设备发送的无线信号的信号强度测量结果确定得到。
可选的,通过修正函数对原始信号强度进行修正,得到修正信号强度之前,该方法包括:
基于第一设备的第一设备标识,从本地或服务器处获取第一修正函数,服务器存储有不同接收设备标识与修正函数之间的映射关系;
基于无线信号中包含的第二设备标识,从本地或服务器处获取第二修正函数,服务器存储有不同发送设备标识与修正函数之间的映射关系。
可选的,基于修正信号强度确定第一设备与第二设备之间的设备间距,包括:
确定修正信号强度对应的目标影响分值;
基于目标影响分值更新累积分值,累积分值由至少一个目标影响分值累积得到;
基于累积分值确定设备间距判定结果,设备间距判定结果包括设备间距位于目标设备间距之内和设备间距位于目标设备间距之外中的至少一种。
可选的,确定修正信号强度对应的目标影响分值,包括:
从本地或服务器处获取m级信号强度阈值与影响分值之间的映射关系,其中,影响分值与信号强度阈值呈正相关关系,m为大于等于2的整数;
基于修正信号强度与各级信号强度阈值之间的大小关系,确定修正信号强度对应的目标影响分值。
可选的,基于修正信号强度与各级信号强度阈值之间的大小关系,确定修正信号强度对应的目标影响分值,包括:
响应于修正信号强度小于第n级信号强度阈值,且大于第n+1级信号强度阈值,将第n+1级信号强度阈值对应的影响分值确定为目标影响分值,n为小于m的正整数;
响应于修正信号强度小于第m级信号强度阈值,确定修正信号强度对应的目标影响分值为预设分值,预设分值为负分值。
可选的,基于累积分值确定设备间距判定结果,包括:
响应于累积分值大于第一分值阈值,确定设备间距位于目标设备间距之内;
响应于累积分值小于第一分值阈值且大于第二分值阈值,将上一设备间距判定结果确定为当前设备间距判定结果;
响应于累积分值小于第二分值阈值,确定设备间距位于目标设备间距之外。
可选的,在修正信号强度通过第一修正函数修正得到的情况下,m级信号强度阈值基于不同设备间距下,第一标准设备对第二设备发送的无线信号的信号强度测量结果确定得到;
在修正信号强度通过第一修正函数和第二修正函数修正得到的情况下,m级信号强度阈值基于不同设备间距下,第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到。
可选的,基于修正信号强度确定第一设备与第二设备之间的设备间距,包括:
将修正信号强度添加至信号强度池,信号强度池用于存储最近测量并修正得到的k个修正信号强度,k为大于1的正整数;
确定信号强度池中候选信号强度的平均信号强度,候选信号强度是基于信号强度大小排序后位于预设位置区间的所述修正信号强度;
基于平均信号强度确定设备间距判定结果,设备间距判定结果包括设备间距位于目标设备间距之内和设备间距位于目标设备间距之外中的至少一种。
可选的,确定信号强度池中候选信号强度的平均信号强度,包括:
响应于信号强度池中最近一个修正信号强度小于第一信号强度阈值,且信号强度池中修正信号强度的数量大于数量阈值,确定信号强度池中候选信号强度的平均信号强度;
该方法还包括:
响应于信号强度池中最近一个所述修正信号强度大于第一信号强度阈值,确定设备间距位于目标设备间距之内;
响应于信号强度池中最近一个修正信号强度小于第一信号强度阈值,且信号强度池中修正信号强度的数量小于数量阈值,将上一设备间距判定结果确定为当前设备间距判定结果。
可选的,基于平均信号强度确定设备间距判定结果,包括:
响应于平均信号强度大于第二信号强度阈值,确定设备间距位于目标设备间距之内,第二信号强度阈值小于第一信号强度阈值;
响应于平均信号强度小于第二信号强度阈值且大于第三信号强度阈值,将上一设备间距判定结果确定为当前设备间距判定结果;
响应于平均信号强度小于第三信号强度阈值,确定设备间距位于目标设备间距之外。
可选的,第一信号强度阈值、第二信号强度阈值以及第三信号强度阈值从本地或服务器处获取,且基于不同设备间距下,信号强度的分布情况确定得到;
其中,在修正信号强度通过第一修正函数修正得到的情况下,分布情况基于不同设备间距下,第一标准设备对第二设备发送的无线信号的信号强度测量结果确定得到;
在修正信号强度通过第一修正函数和第二修正函数修正得到的情况下,分布情况基于不同设备间距下,第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到。
可选的,修正信号强度基于第一修正函数和第二修正函数修正得到;
基于修正信号强度确定第一设备与第二设备之间的设备间距,还包括:
获取标准设备间距与标准信号强度的标准对照表,标准信号强度是通过第一标准设备对不同标准设备间距处第二标准设备发送的无线信号进行测量得到;
基于修正信号强度,从对照表中查找设备间距。
可选的,通过修正函数对原始信号强度进行修正,得到修正信号强度之前,该方法还包括:
基于无线信号对应的目标信道,对原始信号强度进行信道处理,其中,信道处理用于修正信道差异对信号强度衰减速度的影响。
在一种可能的实施方式中,针对不同的接收设备以及发射设备,服务器中预先设置对应的修正函数,进行信号强度修正时,第一设备即获取第一设备和/或第二设备对应的修正函数,从而利用获取到的修正函数进行信号强度修正。下面采用示例性的实施例进行说明。
请参考图3,其示出了本申请另一个示例性实施例提供的设备测距方法的流程图。本实施例以该方法用于图1所示的第一设备为例进行说明,该方法包括如下步骤:
步骤301,基于第一设备的第一设备标识,从本地或服务器处获取第一修正函数,第一修正函数用于修正第一设备对信号强度测量的影响,服务器存储有不同接收设备标识与修正函数之间的映射关系。
在一种可能的实施方式中,当第一设备开启无线信号收发功能时,第一设备首先根据自身的第一设备标识查找本地是否存储有第一设备标识对应的第一修正函数;若查找到,则获取该第一修正函数,若未查找到,则基于第一设备标识请求从服务器处获取对应的第一修正函数,并将第一设备标识与获取到的第一修正函数关联存储在本地,以便后续使用。
其中,第一设备标识可以是第一设备的设备型号,比如手机型号,相应的,服务器中存储有不同接收设备的接收设备标识(设备型号)与修正函数之间的映射关系。
需要说明的是,第一设备可以预先获取第一修正函数,也可以在接收到无线信号时获取第一修正函数,本实施例对获取第一修正函数的时机不作限定。
在一个示意性的例子中,如图4所示,在准备阶段,第一设备向服务器请求获取第一修正函数,服务器即基于请求中包含的第一设备标识,查找并返回相应的第一修正函数。
在一种可能的实施方式中,第一修正函数的确定过程可以包括如下步骤:
1、生成标准对照表。
可选的,该标准对照表由开发人员预先通过测量生成,其中包含标准设备间距与标准信号强度之间的对应关系,标准信号强度为标准设备间距下,第一标准设备对第二标准设备发送的无线信号的信号强度测量结果。其中,第一标准设备为接收功率稳定的设备,第二标准设备为发射功率稳定的设备。示意性的,生成标准对照表如上述表一所示。
在一种可能的实施方式中,生成标准对照表的过程如图5所示。
步骤501,将第二标准设备设置为信号发送状态。
信号发送状态下,第二标准设备以稳定的信号发射功率以及信号发射间隔发送无线信号。
步骤502,将第一标准设备设置为信号接收状态。
信号接收状态下,第一标准设备接收并记录无线信号的信号强度。
步骤503,调整第一标准设备与第二标准设备之间的设备间距。
步骤504,在当前设备间距下,基于多次测量结果,得到该设备间距对应的信号强度。
可选的,为了提高测量得到的信号强度的准确性,第一标准设备对多次测量得到信号强度进行平均值计算,将平均信号强度确定为当前设备间距对应的信号强度。
步骤505,将设备距离和信号强度存储至标准对照表。
步骤506,检测所有设备间距是否均完成测试。若全部完成测试,则结束,若未全部完成测试,则执行步骤503。
2、生成第一设备对应的第一对照表。
不同于生成标准对照表时,利用第一标准设备接收第二标准设备发送的无线信号,生成第一对照表时,需要利用第一设备接收第二标准设备发送的无线信号,从而将第一设备测量的信号强度作为第一对照表中设备距离对应的信号强度。
可选的,在生成第一对照表时,可以对所有设备间距下的信号强度均进行测量,也可以根据第一设备实际的设备间距检测需求,仅对部分关键设备间距下的信号强度进行测量,其他设备间距下的信号强度则可以通过函数拟合得到。
在一个示意性的例子中,第一对照表中设备间距与信号强度的对应关系如表二所示。(仅对30cm和60cm这两个关键设备间距下的信号强度进行测量)
表二
设备间距(cm) 信号强度(dbm)
10 未测量
20 未测量
30 -35
60 未测量
100 -60
3、基于标准对照表和第一对照表确定第一修正函数。
在一种可能的实施方式中,基于同一设备间距下标准对照表以及第一对照表中的信号强度,计算机设备通过多项式拟合的方式,得到第一设备对应的第一修正函数,其中,第一修正函数可以表示为y=ax+b,其中,x为第一设备实际测到得到的信号强度,a、b为拟合得到的参数,y为修正后的信号强度。
结合表一和表二所示的数据,当第二设备为第二标准设备时,第一设备将测量得到的信号强度-35dbm输入第一修正函数后,第一修正函数输出的修正信号强度为-30dbm;第一设备将测量得到的信号强度-60bm输入第一修正函数后,第一修正函数输出的修正信号强度为-50dbm;而当输入第一修正函数的信号强度位于-60至-35dbm之间时,第一修正函数输出的修正信号强度位于-50至-30dbm之间。
在一种可能的实施方式中,确定第一修正函数的过程如图6所示。
步骤601,将第二标准设备设置为信号发送状态。
信号发送状态下,第二标准设备以稳定的信号发射功率以及信号发射间隔发送无线信号。
步骤602,将第一设备设置为信号接收状态。
信号接收状态下,第一设备接收并记录无线信号的信号强度。
步骤603,调整第一设备与第二标准设备之间的设备间距。
步骤604,在当前设备间距下,基于多次测量结果,得到该设备间距对应的信号强度。
可选的,为了提高测量得到的信号强度的准确性,第一设备对多次测量得到信号强度进行平均值计算,将平均信号强度确定为当前设备间距对应的信号强度。
步骤605,将设备距离和信号强度存储至第一对照表。
步骤606,检测所有设备间距是否均完成测试。若全部完成测试,则执行步骤607,若未全部完成测试,则执行步骤603。
步骤607,基于标准对照表和第一对照表确定第一修正函数。
步骤608,记录第一设备与第一修正函数的对应关系。
对于不同的接收设备,开发人员重复执行上述步骤,从而得到不同接收设备各自对应的修正函数,并将其存储在服务器中。
步骤302,测量第二设备发送的无线信号,得到原始信号强度。
本步骤的实施方式可以参考上述步骤201,本实施例在此不再赘述。
步骤303,基于无线信号中包含的第二设备标识,从本地或服务器处获取第二修正函数,第二修正函数用于修正第二设备差异对信号强度测量的影响,服务器存储有不同发送设备标识与修正函数之间的映射关系。
在一种可能的实施方式中,第二设备发送的无线信号中包含第二设备标识,接收到无线信号后,第一设备首先根据该第二设备标识查找本地是否存储有第二设备标识对应的第二修正函数;若查找到,则获取该第二修正函数,若未查找到,则基于第二设备标识请求从服务器处获取对应的第二修正函数,并将第二设备标识与获取到的第二修正函数关联存储在本地,以便后续使用。
其中,第二设备标识可以是第二设备的设备型号,比如耳机型号、音箱型号、门锁型号等等,相应的,服务器中存储有不同发射设备的发射设备标识(设备型号)与修正函数之间的映射关系。
在一种可能的实施方式中,第二修正函数的确定过程可以包括如下步骤:
1、生成标准对照表。(参考第一修正函数确定过程中标准对照表的生成过程)
2、生成第二设备对应的第二对照表。
不同于生成标准对照表时,利用第一标准设备接收第二标准设备发送的无线信号,生成第二对照表时,需要利用第一标准设备接收第二设备发送的无线信号,从而将第一标准设备测量的信号强度作为第二对照表中设备距离对应的信号强度。
可选的,在生成第二对照表时,可以对所有设备间距下的信号强度均进行测量,也可以根据第二设备实际的设备间距检测需求,仅对部分关键设备间距下的信号强度进行测量,其他设备间距下的信号强度则可以通过函数拟合得到。
3、基于标准对照表和第二对照表确定第二修正函数。
在一种可能的实施方式中,基于同一设备间距下标准对照表以及第二对照表中的信号强度,计算机设备通过多项式拟合的方式,得到第二设备对应的第二修正函数,其中,第二修正函数可以表示为y=a’x+b’,其中,x为第二设备实际测到得到的信号强度,a’、b’为拟合得到的参数,y为修正后的信号强度。
在一种可能的实施方式中,确定第一修正函数的过程如图7所示。
步骤701,将第二设备设置为信号发送状态。
信号发送状态下,第二设备以稳定的信号发射功率以及信号发射间隔发送无线信号。
步骤702,将第一标准设备设置为信号接收状态。
信号接收状态下,第一标准设备接收并记录无线信号的信号强度。
步骤703,调整第一标准设备与第二设备之间的设备间距。
步骤704,在当前设备间距下,基于多次测量结果,得到该设备间距对应的信号强度。
可选的,为了提高测量得到的信号强度的准确性,第一标准设备对多次测量得到信号强度进行平均值计算,将平均信号强度确定为当前设备间距对应的信号强度。
步骤705,将设备距离和信号强度存储至第二对照表。
步骤706,检测所有设备间距是否均完成测试。若全部完成测试,则执行步骤707,若未全部完成测试,则执行步骤703。
步骤707,基于标准对照表和第二对照表确定第二修正函数。
步骤708,记录第二设备与第二修正函数的对应关系。
对于不同的发射设备,开发人员重复执行上述步骤,从而得到不同发射设备各自对应的修正函数,并将其存储在服务器中。
步骤304,通过第一修正函数和第二修正函数对原始信号强度进行修正,得到修正信号强度。
在一种可能的实施方式中,第一设备首先通过第一修正函数对原始信号强度进行修正,得到中间信号强度,然后利用第二修正函数对中间信号强度进行修正,得到修正信号强度。
示意性的,如图4所示,在第一修正阶段,第一设备接收到第二设备发送的无线信号,通过第一修正函数对测量得到的信号强度进行修正;在第二修正阶段,第一设备向服务器请求第二设备对应的第二修正函数,服务器基于第二设备标识查找并返回第二修正函数,由第一设备通过第二修正函数对第一修正函数 修正得到信号强度进行进一步修正。
步骤305,基于修正信号强度确定第一设备与第二设备之间的设备间距。
本步骤的实施方式可以参考上述步骤203,本实施例在此不再赘述。
示意性的,如图4所示,第一设备基于两次修正后的信号强度确定与第二设备之间的设备间距。
需要说明的是,在另一种可能的实施方式中,第一设备也可以仅获取第一设备对应的第一修正函数,并通过第一修正函数对原始信号强度进行修正,得到修正信号强度,本实施例在此不做赘述。
本实施例中,通过为不同的接收设备以及发射设备设置对应的修正函数,并在实际测量得到信号强度后,利用接收设备以及发射设备各自对应的修正函数对信号强度进行修正,提高了不同设备测距场景(不同设备间进行测距的场景)下设备间距测量的准确性。
由于不同频率无线信号的信号强度随距离的衰减速度不同(频率越高衰减越快),而设备之间可能通过不同频率的信号进行无线信号传输(比如,可以在三个蓝牙广播信道中的任一信道发送蓝牙信号,或者在14个2.4GHzWiFi信道上发送WiFi信号),因此为了进一步提高确定出的设备间距的准确性,在一种可能的实施方式中,利用修正函数进行信号强度修正之前,第一设备基于无线信号对应的目标信道,对原始信号强度进行信道处理,其中,信道处理用于修正信道差异对信号强度衰减速度的影响。
可选的,第一设备可以确定目标信道对应的信号强度缩放常数,从而将原始信号强度乘以信号强度缩放常数,以此修正信道差异对信号强度衰减速度的影响。其中,信道与信号强度缩放常数的对应关系可以预先设置在第一设备处。
在其他可能的实施方式中,开发人员也可以预先按照不同信道进行数据测试和采集,从而构建得到不同的修正函数,本实施例对此不作限定。
在物联网应用场景下,设备间实现相互感知时,并不需要基于具体的设备间距,而仅需要基于距离范围。比如,智能手机与蓝牙耳机实现蓝牙配对时,只要识别出蓝牙耳机在特定距离范围内(比如30cm范围内),智能手机即可与蓝牙耳机完成蓝牙配对;只要识别出蓝牙耳机在特定距离范围外(比如30cm范围外),智能手机即可与蓝牙耳机取消蓝牙配对。
针对上述需要获取距离范围的应用场景,如图8所示,第一设备可以采用如下方式确定设备间距。
步骤801,确定修正信号强度对应的目标影响分值。
本实施例中,针对每一次修正得到的修正信号强度,第一设备确定该修正信号强度对应的目标影响分值,其中,该目标影响分值可以为正值或负值,目标影响分值的绝对值用于表征修正信号强度对设备间距判定结果的影响程度(影响程度与绝对值呈正相关关系),且正目标影响分值表征修正信号强度对设备间距判定结果具有正向影响(设备间距位于目标设备间距之内),负目标影响分值表征修正信号强度对设备间距判定结果具有反向影响(设备间距位于目标设备间距之外)。
在一种可能的实施方式中,第一设备对修正信号强度进行分级,从而基于修正信号强度所处的等级确定目标影响分值。本步骤可以包括如下步骤。
一、从本地或服务器处获取m级信号强度阈值与影响分值之间的映射关系,其中,影响分值与信号强度阈值呈正相关关系,m为大于等于2的整数。
在一种可能的实施方式中,针对判断设备间距是否位于目标设备间距之内(或位于目标设备间距之外)这一应用场景,服务器中预先设置有至少两级信号强度阈值与影响分值之间的映射关系,其中,信号强度阈值越大,对应的影响分值越大。
可选的,当本地未存储该映射关系时,第一设备即从服务器处请求获取该映射关系(可以与修正函数一同获取)。并且,服务器中可以存储不同设备间距对应的信号强度阈值和影响分值,第一设备根据目标设备间距,从服务器处获取目标设备间距对应的信号强度阈值以及影响分值。
关于信号强度阈值以及影响分值的确定方式,在一种可能的实施方式中,当修正信号强度通过第一修正函数和第二修正函数修正得到时,m级信号强度阈值基于不同设备间距下,第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到(即基于标准对照表确定得到)。
在一些实施例中,针对判断设备间距是否位于目标设备间距之内这一应用场景,结合表一所示的数据,如表三所示,当目标设备间距为30cm时(即判断设备间距是否在30cm之内),将设备间距“30cm”对应的信号强度阈值“-30”确定为基础信号强度阈值(即第二级信号强度阈值),为第二级信号强度阈值设置影响分值为100分;将设备间距“20cm”对应的信号强度阈值“-25”确定为第一级信号强度阈值,并为第一级信号强度阈值设置大于第二级信号强度阈值的影响分值150分;将设备间距“40cm”对应的信号强度阈值“-40”确定为第三级信号强度阈值,并为第三级信号强度阈值设置小于第二级信号强度阈值的影响分值50分。
表三
级别 信号强度阈值(dbm) 影响分值
1 -25 150
2 -30 100
3 -40 50
当然,除了设置三级信号强度阈值外,还可以设置的更多等级的信号强度阈值,并未等级越低的信号强度阈值设置越小的影响分值(可以为负值)。本实施例对此不作限定。
在一种可能的实施方式中,上述信号强度阈值和影响分值由开发人员基于召回率(准确识别设备间距的概率)和误识率(错误识别设备间距的概率),通过不断微调最终得到,且应用微调得到的信号强度阈值和影响分值后,设备间距的判断能够满足召回率和误识率要求(召回率高于第一阈值,误识率低于阈值)。
在一种可能的实施方式中,当修正信号强度通过第一修正函数修正得到时,m级信号强度阈值基于不同设备间距下,第一标准设备对第二设备发送的无线信号的信号强度测量结果确定得到(即基于第二对照表确定得到)。其中,信号强度阈值以及影响分值的确定方式可以参考上述实施例,本实施例在此不再赘述。
可选的,服务器中存储有不同发射设备对应的信号强度阈值和影响分值,第一设备根据第二设备标识,从服务器处获取第二设备对应的信号强度阈值以及影响分值。
二、基于修正信号强度与各级信号强度阈值之间的大小关系,确定修正信号强度对应的目标影响分值。
进一步的,第一设备通过比较修正信号强度与各级信号强度阈值之间的大小关系,确定修正信号强度对应的目标影响分值。其中,修正信号强度越大,目标影响分值越高,对设备间距判定结果的正向影响越大;修正信号强度越小,目标影响分值越低,对设备间距判定结果的反向影响越大。
在一种可能的实施方式中,响应于修正信号强度小于第n级信号强度阈值,且大于第n+1级信号强度阈值,第一设备将第n+1级信号强度阈值对应的影响分值确定为目标影响分值,n为小于m的正整数。
并且,响应于修正信号强度小于第m级信号强度阈值,确定修正信号强度对应的目标影响分值为预设分值,预设分值为负分值。其中,预设分值通常由开发人员通过测试微调得到。
结合表三所示的数据,在一个示意性的例子中,当修正信号强度为-20dbm时,由于-20dbm>第一级信号强度阈值,因此第一设备确定目标影响分值为150分;当修正信号强度为-28dbm时,由于第一级信号强度阈值<-28dbm<第二级信号强度阈值,因此第一设备确定目标影响分值为100分。
当修正信号强度为-50dbm时,由于-50dbm<第三级信号强度阈值,因此第一设备确定目标影响分值为-200分。
步骤802,基于目标影响分值更新累积分值,累积分值由至少一个目标影响分值累积得到。
本实施例中,第一设备将至少一个目标影响分值累积得到的累积分值作为设备间距判定结果的判定依据。相应的,第一设备在当前累积分值的基础上累加目标影响分值。
在一个示意性的例子中,若当前累积分值为100分,且目标影响分值为50分,则更新后的累积分值为150分;若当前累积分值为100分,且目标影响分值为-200分,则更新后的累积分值为-200分。
步骤803,基于累积分值确定设备间距判定结果,设备间距判定结果包括设备间距位于目标设备间距之内和设备间距位于目标设备间距之外中的至少一种。
每次完成累积分值更新后,第一设备都会基于更新后的累积分值进行一次设备间距判定,得到设备间距判定结果,该设备间距判定结果即用于指示设备间距位于目标设备间距之内或设备间距位于目标设备间距之外。
在一种可能的实施方式中,第一设备从本地或服务器处获取至少两级分值阈值(可以与信号强度阈值以及影响分值一同获取),并通过比较累积分值与各级分值阈值之间的大小关系,得到设备间距判定结果。
在一些实施例中,响应于累积分值大于第一分值阈值,第一设备确定设备间距位于目标设备间距之内;
响应于累积分值小于第一分值阈值且大于第二分值阈值,第一设备将上一设备间距判定结果确定为当前设备间距判定结果;
响应于累积分值小于第二分值阈值,确定设备间距位于目标设备间距之外。
可选的,该分值阈值由开发人员通过测试微调得到。
在一个示意性的例子中,当第一分值阈值为200分,且第二分值阈值为50分时,若累积分值为250分,第一设备确定与第二设备之间的设备距离在30cm之内,若累积分值为-150分,第一设备确定与第二设备之间的设备距离在30cm之外。
本实施例中,通过设计多级信号强度阈值,并为每一级信号强度阈值设置对应的影响分值,从而基于修正信号强度与各级信号强度阈值之间的大小关系,确定修正信号强度对应的目标影响分值,并进行分值累积,进而基于累积分值进行设备间距判定,无需要使用复杂的距离计算公式计算具体距离,既保证了判断结果的准确性,又能够提高设备间距的判定速度(累加和大小判断的速度远快于乘方运算)。
在一个示意性的实施例中,基于修正信号强度确定设备间距的完整流程如图9所示。
步骤901,接收到无线信号时,初始化累积分值。
步骤902,获取修正信号强度。
步骤903,检测修正信号强度是否大于第一级信号强度阈值。若大于,执行步骤904,若小于,执行步骤905。
步骤904,确定目标影响分值为第一分值。
步骤905,检测修正信号强度是否大于第二级信号强度阈值。若大于,执行步骤906,若小于,执行步骤907。
步骤906,确定目标影响分值为第二分值。
步骤907,检测修正信号强度是否大于第三级信号强度阈值。若大于,执行步骤908,若小于,执行步骤909。
步骤908,确定目标影响分值为第三分值。
步骤909,确定目标影响分值为第四分值。
步骤910,更新累积分值。
步骤911,检测累积分值是否大于第一分值阈值。若大于,执行步骤912,若小于,执行步骤913。
步骤912,确定第二设备位于目标设备间距以内。
步骤913,检测累积分值是否小于第二分值阈值,若小于,执行步骤914,若大于,执行步骤915。
步骤914,确定第二设备位于目标设备间距以外。
步骤915,维持上一次设备间距判定结果。
采用上述方式确定设备间距时,开发人员需要通过不断微调阈值和分值,调试阈值和分值耗费的时间较长。为了提高前期准备的效率,在另一种可能的实施方式中,如图10所示,第一设备可以采用如下方式确定设备间距。
步骤1001,将修正信号强度添加至信号强度池,信号强度池用于存储最近测量并修正得到的k个修正信号强度,k为大于1的正整数。
本实施例中,为了平滑信号强度的波动,第一设备设置信号强度池,该信号强度池的容量为k,即最多能够存储最近k个修正信号强度。其中,当信号强度池中存在k个修正信号强度时,第一设备采用先进先出原则,将最先进入信号强度池的修正信号强度移出信号强度池。
虽然信号强度池的容量越大,信号强度的平滑效果越好,但是过大的容量会导致设备间距确定存在滞后性,因此信号强度池被设计为最多存储最近i秒内的修正信号强度。在一个示意性的例子中,当第二设备以100ms间隔发送无线信号时,信号强度池的容量为30,即能够存储最近3s内的修正信号强度。
步骤1002,确定信号强度池中候选信号强度的平均信号强度,候选信号强度是基于信号强度大小排序后位于预设位置区间的修正信号强度。
为了平滑信号强度的波动,本实施例中,第一设备采用计算平均值的方式,基于信号强度池中的修正信号强度确定平均信号强度。
本实施中,第一设备并非对信号强度池中的所有修正信号强度求取平均值,而是对其中部分候选信号强度求取平均值,在一种可能的实施方式中,第一设备按照信号强度由小到大的顺序,对信号强度池中的修正信号强度进行排序,并选取排序后位于预设位置区间的修正信号强度作为候选信号强度。
可选的,候选信号强度的数量大于等于信号强度池中当前修正信号强度数量的二分之一。
在一个示意性的例子中,第一设备将大小排序后,前30%至85%的修正信号强度确定为候选信号强度。
在一种可能的实施方式中,第一设备可以直接对候选信号强度进行平均值计算,从而将平均值确定为平均信号强度;或者,第一设备可以对候选信号强度进行加权平均值计算,从而将加权平均值确定为平均信号强度,其中,不同候选信号强度的权重可以基于信号强度测量时刻确定(测量时刻越近权重越大),或者,候选信号强度的权重可以基于信号强度的分布情况确定(分布越广权重越大),本实施例对此不作限定。
步骤1003,基于平均信号强度确定设备间距判定结果,设备间距判定结果包括设备间距位于目标设备间距之内和设备间距位于目标设备间距之外中的至少一种。
每次更新平均信号强度后,第一设备都会基于更新后的平均信号强度进行一次设备间距判定,得到设备间距判定结果,该设备间距判定结果即用于指示设备间距位于目标设备间距之内或设备间距位于目标设备间距之外。
在一种可能的实施方式中,第一设备从本地或服务器处获取至少两个信号强度阈值,并通过比较平均信号强度与各个信号强度阈值之间的大小关系,得到设备间距判定结果。
在一些实施例中,响应于平均信号强度大于第二信号强度阈值,第一设备确定设备间距位于目标设备 间距之内;
响应于平均信号强度小于第二信号强度阈值且大于第三信号强度阈值,第一设备将上一设备间距判定结果确定为当前设备间距判定结果;
响应于平均信号强度小于第三信号强度阈值,第一设备确定设备间距位于目标设备间距之外。
关于第二信号强度阈值和第三信号强度阈值的确定的方式,在一种可能的实施方式中,信号强度阈值基于不同设备间距下,信号强度的分布情况确定得到。
其中,当修正信号强度通过第一修正函数修正得到时,分布情况基于不同设备间距下,第一标准设备对第二设备发送的无线信号的信号强度测量结果确定得到,即基于第二对照表中各设备间距下信号强度的分布情况确定得到。
可选的,在生成第二设备对应的第二对照表时,第一标准设备除了统计信号强度平均值外(作为第二对照表中的信号强度),还会记录各次测量得到的信号强度,并分析得到不同设备距离下信号强度的分布情况。进一步的,分布概率最高的信号强度(范围)即为该设备间距对应的第二信号强度阈值,分布概率最低的信号强度(范围)即为该设备间距对应的第三信号强度阈值。
在一个示意性的例子中,在生成第二对照表的同时,分析得到设备间距为20cm时,信号强度大于-25dbm的概率为85%,信号强度大于-30dbm且小于-25dbm的概率为10%,信号强度小于-30dbm的概率为5%。因此,20cm这一设备间距对应的第二信号强度阈值被设置为-25dbm(即平均信号强度大于-25dbm时,确定设备间距在20cm以内);20cm这一设备间距对应的第三信号强度阈值被设置为-30dbm(即平均信号强度小于-30dbm时,确定设备间距在20cm以外)。
在另一种可能的实施方式中,当修正信号强度通过第一修正函数和第二修正函数修正得到时,该分布情况基于不同设备间距下,第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到,即基于标准对照表中各设备间距下信号强度的分布情况确定得到,本实施例在此不再赘述。
上述实施例中,由于判定设备间距时需要计算信号强度池中信号强度的平均信号强度,因此设备间距确定存在延迟(需要等待信号强度池中存储一定量的数据)。为了进一步提高判定设备间距的速度,如图11所示,第一设备可以采用如下方式确定设备间距。
步骤1101,将修正信号强度添加至信号强度池,信号强度池用于存储最近测量并修正得到的k个修正信号强度,k为大于1的正整数。
本步骤的实施方式可以参考步骤1001,本实施例在此不再赘述。
步骤1102,响应于信号强度池中最近一个修正信号强度大于第一信号强度阈值,确定设备间距位于目标设备间距之内。
其中,第一信号强度阈值大于第二信号强度阈值,且基于不同设备间距下信号强度的分布情况确定得到(趋向于降低范围之外的可能性)。在一种可能的实施方式中,当在第一设备间距下,信号强度大于目标信号强度阈值的概率大于概率阈值,且在第二设备间距下,信号强度大于目标信号强度阈值的概率小于概率阈值,第二设备间距对应的第一信号强度阈值即被设置为目标信号强度阈值。
在一个示意性的例子中,当分析得到设备间距为20cm时,信号强度大于-30dbm的概率为95%;设备间距为30cm时,信号强度大于-30dbm的概率为40%;设备间距为50cm时,信号强度大于-30dbm的概率为5%,设备间距“30cm”对应的第一信号强度阈值可以被设置为-30dbm,即当最近一个修正信号强度大于-30dbm时,第一设备确定设备间距位于30cm以内。
步骤1103,响应于信号强度池中最近一个修正信号强度小于第一信号强度阈值,且信号强度池中修正信号强度的数量大于数量阈值,确定信号强度池中候选信号强度的平均信号强度。
在一种可能的实施方式中,由于信号强度的波动较大,因此在信号强度池中修正信号强度数量较少时,基于平均值得到的判定结果的稳定性较差,因此为了得到稳定的判定结果,第一设备在信号强度池中修正信号强度的数量大于数量阈值时,才会计算平均信号强度。
在一个示意性的例子中,该数量阈值为3,即当信号强度池中存在至少三个修正信号强度时,第一设备才会进行平均信号强度计算。
步骤1104,基于平均信号强度确定设备间距判定结果,设备间距判定结果包括设备间距位于目标设备间距之内和设备间距位于目标设备间距之外中的至少一种。
本步骤的实施方式可以参考步骤1003,本实施例在此不再赘述。
步骤1105,响应于信号强度池中最近一个修正信号强度小于第一信号强度阈值,且信号强度池中修正信号强度的数量小于数量阈值,将上一设备间距判定结果确定为当前设备间距判定结果。
当信号强度池中修正信号强度的数量小于数量阈值时,第一设备延用上一设备间距判定结果。其中,当上一设备间距判定结果为空时,则不输出设备间距判定结果。
本实施例中,通过设置第一信号强度阈值,并通过判断修正信号强度与第一信号强度阈值之间的大小 关系,实现基于单次信号测量结果快速确定设备间距,提高设备间距的确定速度。
在一个示意性的实施例中,基于修正信号强度确定设备间距的完整流程如图12所示。
步骤1201,接收到无线信号时,初始化信号强度池。
步骤1202,获取修正信号强度。
步骤1203,将修正信号强度添加至信号强度池。
步骤1204,检测最近一个修正信号强度是否大于第一信号强度阈值。若大于,执行步骤1205,若小于,执行步骤1206。
步骤1205,确定第二设备位于目标设备间距以内。
步骤1206,检测信号强度池中修正信号强度的数量是否小于数量阈值。若小于,执行步骤1207,若大于,执行步骤1208。
步骤1207,维持上一次设备间距判定结果。
步骤1208,计算信号强度池中候选信号强度的平均信号强度。
步骤1209,检测平均信号强度是否大于第二信号强度阈值。若大于,执行步骤1210,若小于,执行步骤1211。
步骤1210,确定第二设备位于目标设备间距以内。
步骤1211,检测平均信号强度是否小于第三信号强度阈值。若小于,执行步骤1212,若大于,执行步骤1213。
步骤1212,确定第二设备位于目标设备间距以外。
步骤1213,维持上一次设备间距判定结果。
请参考图13,其示出了本申请一个实施例提供的设备测距装置的结构框图。该装置可以通过软件、硬件或者两者的结合实现成为第一设备的全部或一部分。该装置包括:
信号测量模块1301,用于测量第二设备发送的无线信号,得到原始信号强度;
强度修正模块1302,用于通过修正函数对所述原始信号强度进行修正,得到修正信号强度,所述修正函数用于修正接收设备和/或发射设备差异对信号强度测量的影响;
间距确定模块1303,用于基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距。
可选的,强度修正模块1302,包括:
第一强度修正单元,用于通过第一修正函数对所述原始信号强度进行修正,得到所述修正信号强度,所述第一修正函数用于修正所述第一设备对信号强度测量的影响;
或,
第二强度修正单元,用于通过第一修正函数和第二修正函数对所述原始信号强度进行修正,得到所述修正信号强度,所述第一修正函数用于修正接收所述第一设备对信号强度测量的影响,所述第二修正函数用于修正所述第二设备对信号强度测量的影响。
可选的,所述第一修正函数基于第一标准设备对第二标准设备发送的无线信号的信号强度测量结果,以及所述第一设备对所述第二标准设备发送的无线信号的信号强度测量结果确定得到;
所述第二修正函数基于所述第一标准设备对所述第二标准设备发送的无线信号的信号强度测量结果,以及所述第一标准设备对所述第二设备发送的无线信号的信号强度测量结果确定得到。
可选的,所述装置包括:
第一获取模块,用于基于所述第一设备的第一设备标识,从本地或服务器处获取所述第一修正函数,所述服务器存储有不同接收设备标识与修正函数之间的映射关系;
第二获取模块,用于基于所述无线信号中包含的第二设备标识,从本地或服务器处获取所述第二修正函数,所述服务器存储有不同发送设备标识与修正函数之间的映射关系。
可选的,所述间距确定模块1303,包括:
分值确定单元,用于确定所述修正信号强度对应的目标影响分值;
分值更新单元,用于基于所述目标影响分值更新累积分值,所述累积分值由至少一个所述目标影响分值累积得到;
第一间距确定单元,用于基于所述累积分值确定设备间距判定结果,所述设备间距判定结果包括所述设备间距位于目标设备间距之内和所述设备间距位于目标设备间距之外中的至少一种。
可选的,所述分值确定单元,用于:
从本地或服务器处获取m级信号强度阈值与影响分值之间的映射关系,其中,所述影响分值与所述信号强度阈值呈正相关关系,m为大于等于2的整数;
基于所述修正信号强度与各级所述信号强度阈值之间的大小关系,确定所述修正信号强度对应的所述目标影响分值。
可选的,所述分值确定单元,具体用于:
响应于所述修正信号强度小于第n级信号强度阈值,且大于第n+1级信号强度阈值,将所述第n+1级信号强度阈值对应的影响分值确定为所述目标影响分值,n为小于m的正整数;
响应于所述修正信号强度小于第m级信号强度阈值,确定所述修正信号强度对应的所述目标影响分值为预设分值,所述预设分值为负分值。
可选的,所述第一间距确定单元,用于:
响应于所述累积分值大于第一分值阈值,确定所述设备间距位于目标设备间距之内;
响应于所述累积分值小于所述第一分值阈值且大于第二分值阈值,将上一设备间距判定结果确定为当前设备间距判定结果;
响应于所述累积分值小于所述第二分值阈值,确定所述设备间距位于目标设备间距之外。
可选的,在所述修正信号强度通过所述第一修正函数修正得到的情况下,m级所述信号强度阈值基于不同设备间距下,第一标准设备对所述第二设备发送的无线信号的信号强度测量结果确定得到;
在所述修正信号强度通过所述第一修正函数和所述第二修正函数修正得到的情况下,m级所述信号强度阈值基于不同设备间距下,所述第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到。
可选的,所述间距确定模块1303,包括:
添加单元,用于将所述修正信号强度添加至信号强度池,所述信号强度池用于存储最近测量并修正得到的k个所述修正信号强度,k为大于1的正整数;
确定单元,用于确定所述信号强度池中候选信号强度的平均信号强度,所述候选信号强度是基于信号强度大小排序后位于预设位置区间的所述修正信号强度;
第二间距确定单元,用于基于所述平均信号强度确定设备间距判定结果,所述设备间距判定结果包括所述设备间距位于目标设备间距之内和所述设备间距位于目标设备间距之外中的至少一种。
可选的,所述确定单元,用于:
响应于所述信号强度池中最近一个所述修正信号强度小于第一信号强度阈值,且所述信号强度池中所述修正信号强度的数量大于数量阈值,确定所述信号强度池中所述候选信号强度的所述平均信号强度。
所述装置还包括:
第一确定模块,用于响应于所述信号强度池中最近一个所述修正信号强度大于所述第一信号强度阈值,确定所述设备间距位于目标设备间距之内;
第二确定模块,用于响应于所述信号强度池中最近一个所述修正信号强度小于所述第一信号强度阈值,且所述信号强度池中所述修正信号强度的数量小于所述数量阈值,将上一设备间距判定结果确定为当前设备间距判定结果。
可选的,所述第二间距确定单元,用于:
响应于所述平均信号强度大于第二信号强度阈值,确定所述设备间距位于目标设备间距之内,所述第二信号强度阈值小于所述第一信号强度阈值;
响应于所述平均信号强度小于所述第二信号强度阈值且大于第三信号强度阈值,将上一设备间距判定结果确定为当前设备间距判定结果;
响应于所述平均信号强度小于所述第三信号强度阈值,确定所述设备间距位于目标设备间距之外。
可选的,所述第一信号强度阈值、所述第二信号强度阈值以及所述第三信号强度阈值从本地或服务器处获取,且基于不同设备间距下,信号强度的分布情况确定得到;
其中,在所述修正信号强度通过所述第一修正函数修正得到的情况下,所述分布情况基于不同设备间距下,第一标准设备对所述第二设备发送的无线信号的信号强度测量结果确定得到;
在所述修正信号强度通过所述第一修正函数和所述第二修正函数修正得到的情况下,所述分布情况基于不同设备间距下,所述第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到。
可选的,所述修正信号强度基于所述第一修正函数和所述第二修正函数修正得到;
所述间距确定模块1303,还包括:
获取单元,用于获取标准设备间距与标准信号强度的标准对照表,所述标准信号强度是通过第一标准设备对不同标准设备间距处第二标准设备发送的无线信号进行测量得到;
第三间距确定单元,用于基于所述修正信号强度,从所述对照表中查找所述设备间距。
可选的,所述装置还包括:
处理模块,用于基于所述无线信号对应的目标信道,对所述原始信号强度进行信道处理,其中,信道处理用于修正信道差异对信号强度衰减速度的影响。
综上所述,本申请实施例中,第一设备基于测量得到的原始信号强度,确定与第二设备之间的设备间 距前,首先利用修正函数对原始信号强度进行修正,以此消除接收设备和/或发射设备差异对信号强度测量的影响,从而基于修正得到的修正信号强度确定设备间距,在利用已有设备硬件的前提下,通过信号强度修正能够提高测量得到的信号强度的准确性,进而提高后续确定出的设备间距的准确性。
上述装置实施例中,各个模块或单元的功能实施过程可以参考上述方法实施例,本实施例在此不再赘述。
请参考图14,其示出了本申请一个示例性实施例提供的计算机设备的结构方框图。该计算机设备1400可以是智能手机、平板电脑、可穿戴式设备等。本申请中的计算机设备1400可以包括一个或多个如下部件:处理器1410、存储器1420和无线通信组件1430。
处理器1410可以包括一个或者多个处理核心。处理器1410利用各种接口和线路连接整个计算机设备1400内的各个部分,通过运行或执行存储在存储器1420内的指令、程序、代码集或指令集,以及调用存储在存储器1420内的数据,执行计算机设备1400的各种功能和处理数据。可选地,处理器1410可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1410可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、神经网络处理器(Neural-network Processing Unit,NPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责触摸显示屏1430所需要显示的内容的渲染和绘制;NPU用于实现人工智能(Artificial Intelligence,AI)功能;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1410中,单独通过一块芯片进行实现。
存储器1420可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1420包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1420可用于存储指令、程序、代码、代码集或指令集。存储器1420可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储根据计算机设备1400的使用所创建的数据(比如音频数据、电话本)等。
无线通信组件1430是用于进行无线信号收发的组件,由接收器和发射器构成。该无线通信组件1430可以为蓝牙通信组件、WiFi通信组件或UWB通信组件等等,本实施例对此不作限定。
除此之外,本领域技术人员可以理解,上述附图所示出的计算机设备1400的结构并不构成对计算机设备的限定,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,计算机设备1400中还包括显示屏、传感器、音频电路、电源等部件,在此不再赘述。
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如上各个实施例所述的设备测距方法。
本申请实施例提供了还一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的设备测距方法。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (19)

  1. 一种设备测距方法,所述方法用于第一设备,所述方法包括:
    测量第二设备发送的无线信号,得到原始信号强度;
    通过修正函数对所述原始信号强度进行修正,得到修正信号强度,所述修正函数用于修正接收设备和/或发射设备差异对信号强度测量的影响;
    基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距。
  2. 根据权利要求1所述的方法,其中,所述通过修正函数对所述原始信号强度进行修正,得到修正信号强度,包括:
    通过第一修正函数对所述原始信号强度进行修正,得到所述修正信号强度,所述第一修正函数用于修正所述第一设备对信号强度测量的影响;
    或,
    通过第一修正函数和第二修正函数对所述原始信号强度进行修正,得到所述修正信号强度,所述第一修正函数用于修正接收所述第一设备对信号强度测量的影响,所述第二修正函数用于修正所述第二设备对信号强度测量的影响。
  3. 根据权利要求2所述的方法,其中,
    所述第一修正函数基于第一标准设备对第二标准设备发送的无线信号的信号强度测量结果,以及所述第一设备对所述第二标准设备发送的无线信号的信号强度测量结果确定得到;
    所述第二修正函数基于所述第一标准设备对所述第二标准设备发送的无线信号的信号强度测量结果,以及所述第一标准设备对所述第二设备发送的无线信号的信号强度测量结果确定得到。
  4. 根据权利要求2所述的方法,其中,所述通过修正函数对所述原始信号强度进行修正,得到修正信号强度之前,所述方法包括:
    基于所述第一设备的第一设备标识,从本地或服务器处获取所述第一修正函数,所述服务器存储有不同接收设备标识与修正函数之间的映射关系;
    基于所述无线信号中包含的第二设备标识,从本地或服务器处获取所述第二修正函数,所述服务器存储有不同发送设备标识与修正函数之间的映射关系。
  5. 根据权利要求2至4任一所述的方法,其中,所述基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距,包括:
    确定所述修正信号强度对应的目标影响分值;
    基于所述目标影响分值更新累积分值,所述累积分值由至少一个所述目标影响分值累积得到;
    基于所述累积分值确定设备间距判定结果,所述设备间距判定结果包括所述设备间距位于目标设备间距之内和所述设备间距位于目标设备间距之外中的至少一种。
  6. 根据权利要求5所述的方法,其中,所述确定所述修正信号强度对应的目标影响分值,包括:
    从本地或服务器处获取m级信号强度阈值与影响分值之间的映射关系,其中,所述影响分值与所述信号强度阈值呈正相关关系,m为大于等于2的整数;
    基于所述修正信号强度与各级所述信号强度阈值之间的大小关系,确定所述修正信号强度对应的所述目标影响分值。
  7. 根据权利要求6所述的方法,其中,所述基于所述修正信号强度与各级所述信号强度阈值之间的大小关系,确定所述修正信号强度对应的所述目标影响分值,包括:
    响应于所述修正信号强度小于第n级信号强度阈值,且大于第n+1级信号强度阈值,将所述第n+1级信号强度阈值对应的影响分值确定为所述目标影响分值,n为小于m的正整数;
    响应于所述修正信号强度小于第m级信号强度阈值,确定所述修正信号强度对应的所述目标影响分值为预设分值,所述预设分值为负分值。
  8. 根据权利要求5所述的方法,其中,所述基于所述累积分值确定设备间距判定结果,包括:
    响应于所述累积分值大于第一分值阈值,确定所述设备间距位于目标设备间距之内;
    响应于所述累积分值小于所述第一分值阈值且大于第二分值阈值,将上一设备间距判定结果确定为当前设备间距判定结果;
    响应于所述累积分值小于所述第二分值阈值,确定所述设备间距位于目标设备间距之外。
  9. 根据权利要求6所述的方法,其中,
    在所述修正信号强度通过所述第一修正函数修正得到的情况下,m级所述信号强度阈值基于不同设备间距下,第一标准设备对所述第二设备发送的无线信号的信号强度测量结果确定得到;
    在所述修正信号强度通过所述第一修正函数和所述第二修正函数修正得到的情况下,m级所述信号强度阈值基于不同设备间距下,所述第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到。
  10. 根据权利要求2至4任一所述的方法,其中,所述基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距,包括:
    将所述修正信号强度添加至信号强度池,所述信号强度池用于存储最近测量并修正得到的k个所述修正信号强度,k为大于1的正整数;
    确定所述信号强度池中候选信号强度的平均信号强度,所述候选信号强度是基于信号强度大小排序后位于预设位置区间的所述修正信号强度;
    基于所述平均信号强度确定设备间距判定结果,所述设备间距判定结果包括所述设备间距位于目标设备间距之内和所述设备间距位于目标设备间距之外中的至少一种。
  11. 根据权利要求10所述的方法,其中,所述确定所述信号强度池中候选信号强度的平均信号强度,包括:
    响应于所述信号强度池中最近一个所述修正信号强度小于第一信号强度阈值,且所述信号强度池中所述修正信号强度的数量大于数量阈值,确定所述信号强度池中所述候选信号强度的所述平均信号强度;
    所述方法还包括:
    响应于所述信号强度池中最近一个所述修正信号强度大于所述第一信号强度阈值,确定所述设备间距位于目标设备间距之内;
    响应于所述信号强度池中最近一个所述修正信号强度小于所述第一信号强度阈值,且所述信号强度池中所述修正信号强度的数量小于所述数量阈值,将上一设备间距判定结果确定为当前设备间距判定结果。
  12. 根据权利要求11所述的方法,其中,所述基于所述平均信号强度确定设备间距判定结果,包括:
    响应于所述平均信号强度大于第二信号强度阈值,确定所述设备间距位于目标设备间距之内,所述第二信号强度阈值小于所述第一信号强度阈值;
    响应于所述平均信号强度小于所述第二信号强度阈值且大于第三信号强度阈值,将上一设备间距判定结果确定为当前设备间距判定结果;
    响应于所述平均信号强度小于所述第三信号强度阈值,确定所述设备间距位于目标设备间距之外。
  13. 根据权利要求12所述的方法,其中,所述第一信号强度阈值、所述第二信号强度阈值以及所述第三信号强度阈值从本地或服务器处获取,且基于不同设备间距下,信号强度的分布情况确定得到;
    其中,在所述修正信号强度通过所述第一修正函数修正得到的情况下,所述分布情况基于不同设备间距下,第一标准设备对所述第二设备发送的无线信号的信号强度测量结果确定得到;
    在所述修正信号强度通过所述第一修正函数和所述第二修正函数修正得到的情况下,所述分布情况基于不同设备间距下,所述第一标准设备对第二标准设备发送的无线信号的信号强度测量结果确定得到。
  14. 根据权利要求2至4任一所述的方法,其中,所述修正信号强度基于所述第一修正函数和所述第二修正函数修正得到;
    所述基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距,还包括:
    获取标准设备间距与标准信号强度的标准对照表,所述标准信号强度是通过第一标准设备对不同标准设备间距处第二标准设备发送的无线信号进行测量得到;
    基于所述修正信号强度,从所述对照表中查找所述设备间距。
  15. 根据权利要求1至4任一所述的方法,其中,所述通过修正函数对所述原始信号强度进行修正,得到修正信号强度之前,所述方法还包括:
    基于所述无线信号对应的目标信道,对所述原始信号强度进行信道处理,其中,信道处理用于修正信道差异对信号强度衰减速度的影响。
  16. 一种设备测距装置,所述装置用于第一设备,所述装置包括:
    信号测量模块,用于测量第二设备发送的无线信号,得到原始信号强度;
    强度修正模块,用于通过修正函数对所述原始信号强度进行修正,得到修正信号强度,所述修正函数用于修正接收设备和/或发射设备差异对信号强度测量的影响;
    间距确定模块,用于基于所述修正信号强度确定所述第一设备与所述第二设备之间的设备间距。
  17. 一种计算机设备,所述计算机设备包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现如权利要求1至15任一所述的设备测距方法。
  18. 一种计算机可读存储介质,所述存储介质存储有至少一条指令,所述至少一条指令用于被处理器执行以实现如权利要求1至15任一所述的设备测距方法。
  19. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,以实现权利要求1至15任一所述的设备测距方法。
PCT/CN2022/073397 2021-02-18 2022-01-24 设备测距方法、装置、设备及存储介质 WO2022174721A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110190420.0 2021-02-18
CN202110190420.0A CN114966534A (zh) 2021-02-18 2021-02-18 设备测距方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022174721A1 true WO2022174721A1 (zh) 2022-08-25

Family

ID=82931193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/073397 WO2022174721A1 (zh) 2021-02-18 2022-01-24 设备测距方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN114966534A (zh)
WO (1) WO2022174721A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621810A (zh) * 2008-07-04 2010-01-06 博通集成电路(上海)有限公司 接收信号强度指示探测器和校准接收信号强度指示的方法
US20140287776A1 (en) * 2011-10-17 2014-09-25 COMMISSARIAT A I'energie atomique et aux ene alt Range estimation method based on rss measurement with limited sensitivity receiver
US20160234653A1 (en) * 2015-02-09 2016-08-11 Winitech Co., Ltd Indoor location measurement system and method using radio signal transmitters
CN106685543A (zh) * 2016-12-09 2017-05-17 广州视源电子科技股份有限公司 无线信号检测方法及装置
CN107509175A (zh) * 2017-09-19 2017-12-22 深圳市深层互联科技有限公司 蓝牙室内定位方法、系统、存储介质及终端
CN107655479A (zh) * 2017-09-19 2018-02-02 深圳市深层互联科技有限公司 基于定位信标的定位方法、定位装置、电子设备及计算机程序产品
CN107896131A (zh) * 2017-12-22 2018-04-10 广东欧珀移动通信有限公司 蓝牙信号调整方法、装置、测试终端、系统及可读介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621810A (zh) * 2008-07-04 2010-01-06 博通集成电路(上海)有限公司 接收信号强度指示探测器和校准接收信号强度指示的方法
US20140287776A1 (en) * 2011-10-17 2014-09-25 COMMISSARIAT A I'energie atomique et aux ene alt Range estimation method based on rss measurement with limited sensitivity receiver
US20160234653A1 (en) * 2015-02-09 2016-08-11 Winitech Co., Ltd Indoor location measurement system and method using radio signal transmitters
CN106685543A (zh) * 2016-12-09 2017-05-17 广州视源电子科技股份有限公司 无线信号检测方法及装置
CN107509175A (zh) * 2017-09-19 2017-12-22 深圳市深层互联科技有限公司 蓝牙室内定位方法、系统、存储介质及终端
CN107655479A (zh) * 2017-09-19 2018-02-02 深圳市深层互联科技有限公司 基于定位信标的定位方法、定位装置、电子设备及计算机程序产品
CN107896131A (zh) * 2017-12-22 2018-04-10 广东欧珀移动通信有限公司 蓝牙信号调整方法、装置、测试终端、系统及可读介质

Also Published As

Publication number Publication date
CN114966534A (zh) 2022-08-30

Similar Documents

Publication Publication Date Title
US10706263B2 (en) Evaluation method and evaluation device for facial key point positioning result
CN109412900B (zh) 一种网络状态识别的方法、模型训练的方法及装置
CN111182562B (zh) 一种测量处理方法、参数配置方法、终端和网络设备
CN108268366B (zh) 测试用例执行方法及装置
CN106294308B (zh) 命名实体识别方法及装置
US8559728B2 (en) Image processing apparatus and image processing method for evaluating a plurality of image recognition processing units
CN109872710B (zh) 音效调制方法、装置及存储介质
WO2022247390A1 (zh) 测量设备距离的方法、装置、电子设备以及可读存储介质
CN110972246A (zh) 功率控制方法、传输功率控制参数确定方法及相关设备
CN107784298B (zh) 一种识别方法及装置
WO2022174721A1 (zh) 设备测距方法、装置、设备及存储介质
CN113179509B (zh) 基于WiFi的自组网方法、装置、存储介质及无线节点
CN112566170B (zh) 网络质量评估方法、装置、服务器及存储介质
CN110008815A (zh) 人脸识别融合模型的生成方法和装置
US20220247470A1 (en) Signal to interference plus noise ratio measurement method and apparatus, device, and medium
CN114049195A (zh) 一种卡方分箱方法和装置
CN106782614B (zh) 音质检测方法及装置
CN111615216A (zh) 一种随机接入方法及终端
CN114870395B (zh) 游戏场景的终端振动检测方法、装置、介质及设备
KR20180008088A (ko) 지능형전자장치 성능검증 장치, 지능형전자장치 성능검증 시스템 및 컴퓨터 판독가능 기록 매체
JP2006313428A (ja) データベース評価装置
CN110611930B (zh) 一种测量结果获取方法、信息发送方法及设备
WO2024083004A1 (zh) Ai模型配置方法、终端及网络侧设备
CN111739493B (zh) 音频处理方法、装置及存储介质
US11627432B2 (en) Method and apparatus for improving positioning performance by analyzing signals transmitted via different sub-channels

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22755494

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22755494

Country of ref document: EP

Kind code of ref document: A1