Distance measurement method and device of communication equipment, electronic equipment and storage medium
By obtaining the WiFi and Bluetooth signal strength of the communication device, and using the calibration table to calculate the accurate distance, the problem of inaccurate distance measurement in the prior art is solved, and the measurement accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202411066947.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The distance measurement of existing communication equipment is inaccurate, especially in multi-product interference environments.
By obtaining the WiFi signal strength and Bluetooth signal strength between the communication device to be measured and the detection node, the calibration table matches the calibration signal strength and distance, calculates the range and deviation range of the WiFi and Bluetooth signals, and then determines the accurate measurement distance.
It improves the accuracy and efficiency of distance measurement of communication equipment, reduces the interference of WiFi and Bluetooth data inaccuracy on measurement distance, and achieves more accurate positioning.
Smart Images

Figure CN118938124A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of short-range wireless communication, and in particular to a distance measurement method and device for communication equipment, an electronic device and a storage medium. Background Art
[0002] In daily life, mobile phones, tablets or various Bluetooth devices have become necessities. Measuring the distance of communication devices within a specific range often requires repeatedly revising the measurement accuracy and overcoming interference between various products.
[0003] The distance measurement of existing communication devices is not accurate. Summary of the invention
[0004] The present invention provides a distance measurement method, device, electronic device and storage medium for a communication device, which are used to solve the defect that the distance measurement of the communication device in the prior art is not accurate, and improve the accuracy of the distance measurement of the communication device.
[0005] The present invention provides a distance measurement method for a communication device, comprising: obtaining WiFi signal strength and Bluetooth signal strength between a communication device to be measured and a detection node; finding a matching calibrated WiFi signal strength, a matching calibrated Bluetooth signal strength and a matching distance of the WiFi signal strength in a calibration table; the calibration table comprises a plurality of calibrated distances between a beacon and a detection node, and calibrated WiFi signal strengths and calibrated Bluetooth signal strengths corresponding to the calibrated distances; determining a WiFi distance of the communication device to be measured from the detection node based on matching calibrated WiFi signal strength, WiFi signal strength and matching distance; determining a Bluetooth distance of the communication device to be measured from the detection node based on matching calibrated Bluetooth signal strength, Bluetooth signal strength and matching distance; and taking an average value of the WiFi distance and the Bluetooth distance as a measurement distance of the communication device to be measured from the detection node.
[0006] According to the distance measurement method of the communication device provided by the present invention, the matching and calibrating WiFi signal strength includes a first upper limit and a first lower limit, the matching and calibrating Bluetooth signal strength includes a second upper limit and a second lower limit, and the matching and calibrating WiFi signal strength, the matching and calibrating Bluetooth signal strength and the matching distance of the WiFi signal strength are found in the calibration table, including: in the calibration table, the calibrated WiFi signal strength that is closest to the WiFi signal strength and greater than the WiFi signal strength is used as the first upper limit, and the calibrated WiFi signal strength that is closest to the WiFi signal strength and less than the WiFi signal strength is used as the first lower limit; in the calibration table, the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and greater than the Bluetooth signal strength is used as the second upper limit, and the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and less than the Bluetooth signal strength is used as the second lower limit; the calibrated distance corresponding to the first upper limit is used as the matching distance, or the calibrated distance corresponding to the second upper limit is used as the matching distance.
[0007] According to the distance measurement method of the communication device provided by the present invention, the WiFi distance of the communication device to be measured from the detection node is determined based on matching and calibrating the WiFi signal strength, the WiFi signal strength and the matching distance, including: determining the WiFi signal range based on the difference between the first upper limit and the first lower limit; determining the WiFi signal deviation range based on the difference between the first upper limit and the WiFi signal strength; obtaining the WiFi distance deviation range based on the ratio of the WiFi signal deviation range to the WiFi signal range; and obtaining the WiFi distance based on the sum of the WiFi distance deviation range and the matching distance.
[0008] According to the distance measurement method of the communication device provided by the present invention, the Bluetooth distance of the communication device to be measured from the detection node is determined based on the matching calibration Bluetooth signal strength, the Bluetooth signal strength and the matching distance, including: determining the Bluetooth signal range based on the difference between the second upper limit and the second lower limit; determining the Bluetooth signal deviation range based on the difference between the first upper limit and the Bluetooth signal strength; obtaining the Bluetooth distance deviation range based on the ratio of the Bluetooth signal deviation range to the Bluetooth signal range; and obtaining the Bluetooth distance based on the sum of the Bluetooth distance deviation range and the matching distance.
[0009] According to the distance measurement method of the communication device provided by the present invention, the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node are obtained, including: capturing the WiFi data packet and the Bluetooth data packet of the communication device to obtain the received data packet; filtering the received data packet based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain the target data packet, obtaining the device name and address data in the target data packet to identify the communication device to be measured; obtaining the WiFi signal data of the target data packet to obtain the WiFi signal strength; obtaining the Bluetooth signal data of the target data packet to obtain the Bluetooth signal strength.
[0010] According to the distance measurement method of the communication device provided by the present invention, the received data packet is filtered based on the signal strength filtering instruction and the manufacturer filtering instruction, and before obtaining the target data packet, it also includes: capturing the Apple Wireless Direct AWDL data packet and Bluetooth data packet of the communication device to obtain the received data packet.
[0011] According to the distance measurement method of the communication device provided by the present invention, the manufacturer filtering instruction includes setting the manufacturer information, the signal strength filtering instruction includes setting the signal strength information, and the received data packet is filtered based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain the target data packet, including: when the manufacturer information in the received data packet is the set manufacturer information, and the WiFi signal data of the received data packet or the Bluetooth signal data of the received data packet is greater than or equal to the set signal strength information, determining that the received data packet is the target data packet.
[0012] The present invention also provides a distance measurement device for a communication device, comprising: an acquisition module, used to acquire the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node; a matching module, used to find the matching calibrated WiFi signal strength, the matching calibrated Bluetooth signal strength and the matching distance of the WiFi signal strength in a calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and the calibrated Bluetooth signal strength corresponding to the calibrated distances; a WiFi distance determination module, used to determine the WiFi distance of the communication device to be measured from the detection node based on the matching calibrated WiFi signal strength, the WiFi signal strength and the matching distance; a Bluetooth distance determination module, used to determine the Bluetooth distance of the communication device to be measured from the detection node based on the matching calibrated Bluetooth signal strength, the Bluetooth signal strength and the matching distance; a measurement distance determination module, used to use the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a distance measurement method for any of the above-mentioned communication devices is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the distance measurement method of any of the above-mentioned communication devices is implemented.
[0015] The present invention also provides a computer program product, comprising a computer program, and when the computer program is executed by a processor, the distance measurement method of any of the above communication devices is implemented.
[0016] The communication device distance measurement method, device, electronic device and storage medium provided by the present invention obtain the WiFi signal strength and Bluetooth signal strength between the communication device to be measured and the detection node; find the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance of the WiFi signal strength in the calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and calibrated Bluetooth signal strength corresponding to the calibrated distance; determine the WiFi distance of the communication device to be measured from the detection node based on the matching calibrated WiFi signal strength, WiFi signal strength and matching distance; determine the Bluetooth distance of the communication device to be measured from the detection node based on the matching calibrated Bluetooth signal strength, Bluetooth signal strength and matching distance; and use the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node. The present application determines the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance according to the calibration table, and can quickly lock the signal strength range and distance range of the communication device to be measured, which is conducive to improving the accuracy and efficiency of calculating the WiFi distance and Bluetooth distance. At the same time, the measurement distance is determined according to the WiFi distance and the Bluetooth distance, which reduces the interference of inaccurate WiFi data or inaccurate Bluetooth data on the measurement distance and improves the accuracy of the measurement distance of the calculation detection node. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is one of the flow charts of the distance measurement method for the communication device provided by the present invention.
[0019] Figure 2 It is a schematic diagram of setting a beacon provided by the present invention.
[0020] Figure 3 This is the second flow chart of the distance measurement method for the communication device provided by the present invention.
[0021] Figure 4 It is a structural schematic diagram of a distance measuring device for communication equipment provided by the present invention.
[0022] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The distance measurement solution based on Bluetooth and WiFi communication devices is a low-cost, flexible and practical distance measurement method, which can give relative distance in a small range of application scenarios, thereby achieving positioning. The distance measurement solution based on Bluetooth and WiFi communication devices can be used as a supplement to GPS or Beidou satellites to improve positioning accuracy, and can also provide relative position when GPS or Beidou satellite signals are weak.
[0025] Combine the following Figure 1-Figure 5 The present invention describes a communication device distance measurement method, device, electronic device and storage medium.
[0026] Figure 1 FIG. 1 is a flow chart of a distance measurement method for a communication device provided by the present invention. Figure 1 As shown, the method includes steps S100 to S500, and each step is specifically described as follows.
[0027] S100: Obtain WiFi signal strength and Bluetooth signal strength between the communication device to be measured and the detection node.
[0028] The execution subject of the present invention is a detection node, which is used to identify the communication device to be measured and calculate the measurement distance between the communication device to be measured and the detection node.
[0029] The communication device to be measured is identified according to the device name and address data of the communication device to be measured. A target data packet corresponding to the communication device to be measured is obtained, and the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node are obtained according to the target data packet.
[0030] S200: Find the matching calibrated WiFi signal strength, the matching calibrated Bluetooth signal strength and the matching distance of the WiFi signal strength in the calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and the calibrated Bluetooth signal strength corresponding to the calibrated distance.
[0031] The matching and calibrated WiFi signal strength includes a first upper limit and a first lower limit, the matching and calibrated Bluetooth signal strength includes a second upper limit and a second lower limit, and the matching and calibrated WiFi signal strength, the matching and calibrated Bluetooth signal strength and the matching distance of the WiFi signal strength are found in the calibration table, including: in the calibration table, the calibrated WiFi signal strength that is closest to the WiFi signal strength and greater than the WiFi signal strength is used as the first upper limit, and the calibrated WiFi signal strength that is closest to the WiFi signal strength and less than the WiFi signal strength is used as the first lower limit; in the calibration table, the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and greater than the Bluetooth signal strength is used as the second upper limit, and the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and less than the Bluetooth signal strength is used as the second lower limit; the calibrated distance corresponding to the first upper limit is used as the matching distance, or the calibrated distance corresponding to the second upper limit is used as the matching distance.
[0032] Multiple beacons are pre-set within the preset range of the detection node, and multiple distance calibrations are performed based on the beacons. The distance between two adjacent beacons is fixed. Figure 2 As shown, a beacon is set for every 1 meter increase in the distance to the detection node. Ten beacons are set within a 10-meter range of the detection node, and the distance between two adjacent beacons is 1 meter. Each beacon includes a WiFi module and a Bluetooth module. The WiFi module is used to send WiFi signals to the detection node, and the Bluetooth module is used to send Bluetooth signals to the detection node.
[0033] Start the detection node and use the network analysis tool (wireshark) of the detection node to capture and analyze the WiFi data and Bluetooth data of 10 beacons. Determine the calibration WiFi signal strength based on the WiFi data of the beacon, and determine the calibration Bluetooth signal strength based on the Bluetooth data of the beacon. Use the distance between the beacon and the detection node as the calibration distance. For example, the WiFi data of the beacon includes the WiFi antenna signal (Antenna Signal), and the Bluetooth data of the beacon includes the received signal strength indication (RSSI). Construct a calibration table based on the WiFi antenna signal, RSSI, and the distance between the beacon and the detection point.
[0034] The calibration table is shown in Table 1.
[0035] Table 1 Calibration table
[0036] The first upper limit is the calibrated WiFi signal strength that is closest to the WiFi signal strength and greater than the WiFi signal strength, and the first lower limit is the calibrated WiFi signal strength that is closest to the WiFi signal strength and less than the WiFi signal strength. The WiFi signal strength is greater than or equal to the first lower limit and less than the first upper limit. For example, if the WiFi signal strength is -43dBm, the first upper limit is -41.42dBm and the first lower limit is -48.75dBm.
[0037] The second upper limit is the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and greater than the Bluetooth signal strength, and the second lower limit is the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and less than the Bluetooth signal strength. The Bluetooth signal strength is greater than or equal to the second lower limit and less than the second upper limit. For example, if the Bluetooth signal strength is -45dBm, the second upper limit is -41.6dBm and the second lower limit is -47.8dBm.
[0038] The matching distance is the calibration distance that matches the first upper limit in the calibration table, or the matching distance is the calibration distance that matches the second upper limit in the calibration table. For example, when the first upper limit is -41.6dBm and the second upper limit is 41.42dBm, the matching distance is 4m.
[0039] By finding the first upper limit and the first lower limit that match the WiFi signal strength through the calibration table, the calibration range of the WiFi signal strength can be quickly determined, which is conducive to improving the efficiency of calculating the WiFi distance. By finding the second upper limit and the second lower limit that match the Bluetooth signal strength through the calibration table, the calibration range of the Bluetooth signal strength can be quickly determined, which is conducive to improving the efficiency of calculating the Bluetooth distance.
[0040] S300: Determine the WiFi distance between the communication device to be measured and the detection node based on the matched calibrated WiFi signal strength, the WiFi signal strength and the matched distance.
[0041] The method comprises: determining a WiFi distance between a communication device to be measured and a detection node based on matching a calibrated WiFi signal strength, a WiFi signal strength and a matching distance, comprising: determining a WiFi signal range based on a difference between a first upper limit and a first lower limit; determining a WiFi signal deviation range based on a difference between the first upper limit and the WiFi signal strength; obtaining a WiFi distance deviation range based on a ratio of the WiFi signal deviation range to the WiFi signal range; and obtaining a WiFi distance based on a sum of the WiFi distance deviation range and the matching distance.
[0042] The calculation formula for WiFi distance is as follows.
[0043] ; in, is the first upper limit, is the first lower limit.
[0044] The WiFi distance deviation range is calculated according to the first upper limit, the first lower limit and the WiFi signal strength, thereby realizing the calculation of the WiFi distance deviation range according to the calibrated WiFi signal strength, improving the accuracy of determining the WiFi distance deviation range, and facilitating improving the accuracy of determining the WiFi distance.
[0045] S400: Determine the Bluetooth distance of the communication device to be measured from the detection node based on the matched calibrated Bluetooth signal strength, the Bluetooth signal strength and the matched distance.
[0046] The Bluetooth distance between the communication device to be measured and the detection node is determined based on the matching and calibration Bluetooth signal strength, the Bluetooth signal strength and the matching distance. Specifically, the Bluetooth signal range is determined based on the difference between the second upper limit and the second lower limit; the Bluetooth signal deviation range is determined based on the difference between the first upper limit and the Bluetooth signal strength; the Bluetooth distance deviation range is obtained based on the ratio of the Bluetooth signal deviation range to the Bluetooth signal range; and the Bluetooth distance is obtained based on the sum of the Bluetooth distance deviation range and the matching distance.
[0047] The calculation formula for Bluetooth distance is as follows.
[0048] ; in, is the second upper limit, is the second lower limit.
[0049] The Bluetooth distance deviation range is calculated according to the first upper limit, the first lower limit and the Bluetooth signal strength, thereby realizing the calculation of the Bluetooth distance deviation range according to the calibrated Bluetooth signal strength, improving the accuracy of determining the Bluetooth distance deviation range, and being conducive to improving the accuracy of determining the Bluetooth distance.
[0050] S500: Taking the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node.
[0051] The calculation formula for measuring distance is as follows.
[0052] .
[0053] At the same time, the measurement distance is determined according to the WiFi distance and the Bluetooth distance, thereby improving the accuracy of determining the measurement distance.
[0054] The distance measurement method of the communication device provided by the embodiment of the present invention obtains the WiFi signal strength and Bluetooth signal strength between the communication device to be measured and the detection node; finds the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance of the WiFi signal strength in the calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and calibrated Bluetooth signal strength corresponding to the calibrated distance; determines the WiFi distance of the communication device to be measured from the detection node based on the matching calibrated WiFi signal strength, WiFi signal strength and matching distance; determines the Bluetooth distance of the communication device to be measured from the detection node based on the matching calibrated Bluetooth signal strength, Bluetooth signal strength and matching distance; and uses the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node. The present application determines the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance according to the calibration table, and can quickly lock the signal strength range and distance range of the communication device to be measured, which is conducive to improving the accuracy and efficiency of calculating the WiFi distance and Bluetooth distance. At the same time, the measurement distance is determined according to the WiFi distance and the Bluetooth distance, which reduces the interference of inaccurate WiFi data or inaccurate Bluetooth data on the measurement distance and improves the accuracy of the measurement distance of the calculation detection node.
[0055] Based on the above embodiment, obtaining the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node includes steps S110 to S140, and each step is specifically as follows.
[0056] S110: Capture the WiFi data packet of the communication device and the Bluetooth data packet of the communication device to obtain a received data packet.
[0057] S120: Filter the received data packet based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain a target data packet, and obtain the device name and address data in the target data packet to identify the communication device to be measured.
[0058] S130: Obtain WiFi signal data of the target data packet to obtain WiFi signal strength.
[0059] S140: Acquire Bluetooth signal data of the target data packet to obtain Bluetooth signal strength.
[0060] The received data packet is filtered based on the signal strength filtering instruction and the manufacturer filtering instruction, and before obtaining the target data packet, it also includes: capturing the Apple Wireless Direct AWDL data packet and the Bluetooth data packet of the communication device to obtain the received data packet.
[0061] The manufacturer filtering instruction includes setting the manufacturer information, and the signal strength filtering instruction includes setting the signal strength information. The received data packet is filtered based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain the target data packet. Specifically, when the manufacturer information in the received data packet is the set manufacturer information, and the WiFi signal data of the received data packet or the Bluetooth signal data of the received data packet is greater than or equal to the set signal strength information, the received data packet is determined to be the target data packet.
[0062] The address data includes the Media Access Control (MAC) address and the Bluetooth address. Figure 3 As shown, the detection node includes a WiFi unit and a Bluetooth unit. The WiFi unit includes an Apple Wireless DirectLink (AWDL) and a WiFi monitor. AWDL is provided with an open wireless link (OWL) plug-in for monitoring AWDL data packets. The WiFi monitor is provided with a wireless network cracking tool (aircrack-ng) for monitoring WiFi data packets. The Bluetooth unit includes a Bluetooth Controller Interface (BT HCI) for monitoring Bluetooth data packets. A network analysis tool (e.g., Wireshark) captures WiFi data packets and Bluetooth data packets to obtain received data packets. Alternatively, Wireshark captures AWDL data packets and Bluetooth data packets to obtain received data packets. Wireshark filters received data packets through signal strength filtering instructions and manufacturer filtering instructions to obtain target data packets.
[0063] For example, for AWDL data packets, the signal strength filtering instruction is: WiFi signal strength ≥ -90dBm. The manufacturer filtering instruction is: AWDL.type == 8. AWDL.type == 8 is the communication protocol type of the datagram. AWDL is a communication protocol dedicated to Apple devices. Devices from other manufacturers do not have this communication protocol. Therefore, AWDL data packets can be filtered out through AWDL.type == 8.
[0064] For WiFi data packets, the signal strength filtering instruction is: WiFi signal strength ≥ -90dBm. The manufacturer filtering instruction is: the manufacturer is manufacturer A.
[0065] For Bluetooth data packets: the signal strength filtering instruction is: Bluetooth signal strength ≥ -90dBm. The manufacturer filtering instruction is: the manufacturer is manufacturer A.
[0066] The present invention requires obtaining communication devices within a set range (for example, within 10 meters from the detection node), and therefore requires the WiFi signal strength or the Bluetooth signal strength to be ≥ -90dBm.
[0067] A target data packet having set manufacturer information and set signal strength information is acquired according to the manufacturer filtering instruction and the signal strength filtering instruction.
[0068] The target data packet passes through the WiFi and AWDL filters to filter the WiFi signal strength, device name, manufacturer information and MAC address in the WiFi data packet or AWDL data packet to identify the communication device to be measured and obtain the WiFi signal strength of the communication device to be measured. The received data packet passes through the HCI event filter to filter the Bluetooth signal strength, manufacturer information, device name and Bluetooth address in the Bluetooth data packet to identify the communication device to be measured and obtain the Bluetooth signal strength of the communication device to be measured.
[0069] Further, the WiFi distance of the communication device to be measured is calculated according to the WiFi signal strength, and the Bluetooth distance of the communication device to be measured is calculated according to the Bluetooth signal strength. The measurement distance of the communication device to be measured is calculated according to the Bluetooth distance and the WiFi distance.
[0070] The present invention obtains the target data packet according to the signal strength filtering instruction and the manufacturer filtering instruction, realizes the simultaneous detection of communication devices of multiple brands, and improves the efficiency and accuracy of obtaining the target data packet. According to the OWL plug-in, the virtual AWDL transmission protocol is used to realize the accurate identification of Apple devices through WiFi.
[0071] The distance measuring device of the communication device provided by the present invention is described below. The distance measuring device of the communication device described below and the distance measuring method of the communication device described above can be referred to each other.
[0072] like Figure 4 As shown, a distance measurement device for a communication device includes: an acquisition module 401, which is used to obtain the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node.
[0073] The matching module 402 is used to find the matching calibrated WiFi signal strength, the matching calibrated Bluetooth signal strength and the matching distance of the WiFi signal strength in the calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and calibrated Bluetooth signal strength corresponding to the calibrated distance.
[0074] The WiFi distance determination module 403 is used to determine the WiFi distance between the communication device to be measured and the detection node based on the matched calibrated WiFi signal strength, the WiFi signal strength and the matched distance.
[0075] The Bluetooth distance determination module 404 is used to determine the Bluetooth distance between the communication device to be measured and the detection node based on the matched calibrated Bluetooth signal strength, the Bluetooth signal strength and the matched distance.
[0076] The measurement distance determination module 405 is used to use the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node.
[0077] The distance measuring device of the communication device provided by the embodiment of the present invention obtains the WiFi signal strength and Bluetooth signal strength between the communication device to be measured and the detection node; finds the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance of the WiFi signal strength in the calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and calibrated Bluetooth signal strength corresponding to the calibrated distance; determines the WiFi distance of the communication device to be measured from the detection node based on the matching calibrated WiFi signal strength, WiFi signal strength and matching distance; determines the Bluetooth distance of the communication device to be measured from the detection node based on the matching calibrated Bluetooth signal strength, Bluetooth signal strength and matching distance; and uses the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node. The present application determines the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance according to the calibration table, and can quickly lock the signal strength range and distance range of the communication device to be measured, which is conducive to improving the accuracy and efficiency of calculating the WiFi distance and Bluetooth distance. At the same time, the measurement distance is determined according to the WiFi distance and the Bluetooth distance, which reduces the interference of inaccurate WiFi data or inaccurate Bluetooth data on the measurement distance and improves the accuracy of the measurement distance of the calculation detection node.
[0078] In one embodiment, the matching calibrated WiFi signal strength includes a first upper limit and a first lower limit, and the matching calibrated Bluetooth signal strength includes a second upper limit and a second lower limit, and the matching module 402 is used to: in the calibration table, use the calibrated WiFi signal strength that is closest to the WiFi signal strength and greater than the WiFi signal strength as the first upper limit, and use the calibrated WiFi signal strength that is closest to the WiFi signal strength and less than the WiFi signal strength as the first lower limit; in the calibration table, use the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and greater than the Bluetooth signal strength as the second upper limit, and use the calibrated Bluetooth signal strength that is closest to the Bluetooth signal strength and less than the Bluetooth signal strength as the second lower limit; use the calibrated distance corresponding to the first upper limit as the matching distance, or use the calibrated distance corresponding to the second upper limit as the matching distance.
[0079] In one embodiment, the WiFi distance determination module 403 is used to: determine the WiFi signal range based on the difference between the first upper limit and the first lower limit; determine the WiFi signal deviation range based on the difference between the first upper limit and the WiFi signal strength; obtain the WiFi distance deviation range based on the ratio of the WiFi signal deviation range to the WiFi signal range; and obtain the WiFi distance based on the sum of the WiFi distance deviation range and the matching distance.
[0080] In one embodiment, the Bluetooth distance determination module 404 is used to: determine the Bluetooth signal range based on the difference between the second upper limit and the second lower limit; determine the Bluetooth signal deviation range based on the difference between the first upper limit and the Bluetooth signal strength; obtain the Bluetooth distance deviation range based on the ratio of the Bluetooth signal deviation range to the Bluetooth signal range; and obtain the Bluetooth distance based on the sum of the Bluetooth distance deviation range and the matching distance.
[0081] In one embodiment, the acquisition module 401 is used to: capture the WiFi data packet and the Bluetooth data packet of the communication device to obtain the received data packet; filter the received data packet based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain the target data packet, obtain the device name and address data in the target data packet to identify the communication device to be measured; obtain the WiFi signal data of the target data packet to obtain the WiFi signal strength; obtain the Bluetooth signal data of the target data packet to obtain the Bluetooth signal strength.
[0082] In one embodiment, the acquisition module 401 is further used to capture the Apple Wireless Direct AWDL data packet and the Bluetooth data packet of the communication device to obtain the received data packet.
[0083] In one embodiment, the manufacturer filtering instruction includes setting the manufacturer information, the signal strength filtering instruction includes setting the signal strength information, and the acquisition module 401 is used to: when the manufacturer information in the received data packet is the set manufacturer information, and the WiFi signal data of the received data packet or the Bluetooth signal data of the received data packet is greater than or equal to the set signal strength information, determine that the received data packet is a target data packet.
[0084] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 complete mutual communication through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the distance measurement method of the communication device, the method comprising: obtaining the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node; finding the matching calibrated WiFi signal strength, the matching calibrated Bluetooth signal strength and the matching distance of the WiFi signal strength in the calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and the calibrated Bluetooth signal strength corresponding to the calibrated distance; determining the WiFi distance of the communication device to be measured from the detection node based on the matching calibrated WiFi signal strength, the WiFi signal strength and the matching distance; determining the Bluetooth distance of the communication device to be measured from the detection node based on the matching calibrated Bluetooth signal strength, the Bluetooth signal strength and the matching distance; and taking the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node.
[0085] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0086] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the distance measurement method of the communication device provided by the above-mentioned methods, the method comprising: obtaining the WiFi signal strength and Bluetooth signal strength between the communication device to be measured and the detection node; finding the matching calibrated WiFi signal strength, the matching calibrated Bluetooth signal strength and the matching distance of the WiFi signal strength in a calibration table; the calibration table comprises a plurality of calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and the calibrated Bluetooth signal strength corresponding to the calibrated distances; determining the WiFi distance of the communication device to be measured from the detection node based on the matching calibrated WiFi signal strength, the WiFi signal strength and the matching distance; determining the Bluetooth distance of the communication device to be measured from the detection node based on the matching calibrated Bluetooth signal strength, the Bluetooth signal strength and the matching distance; and taking the average value of the WiFi distance and the Bluetooth distance as the measurement distance of the communication device to be measured from the detection node.
[0087] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A distance measurement method for a communication device, It is characterized in that include: Obtain the WiFi signal strength and Bluetooth signal strength between the communication device to be measured and the detection node; Finding the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance of the WiFi signal strength in a calibration table; the calibration table includes a plurality of calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and calibrated Bluetooth signal strength corresponding to the calibrated distances; Determine the WiFi distance between the communication device to be measured and the detection node based on the matched calibrated WiFi signal strength, the WiFi signal strength and the matched distance; Determine the Bluetooth distance between the communication device to be measured and the detection node based on the matched calibrated Bluetooth signal strength, the Bluetooth signal strength and the matched distance; An average value of the WiFi distance and the Bluetooth distance is used as the measurement distance between the communication device to be measured and the detection node.
2. The distance measurement method of a communication device according to claim 1, It is characterized in that The matching calibration WiFi signal strength includes a first upper limit and a first lower limit, the matching calibration Bluetooth signal strength includes a second upper limit and a second lower limit, and the matching calibration WiFi signal strength, matching calibration Bluetooth signal strength and matching distance of the WiFi signal strength are found in the calibration table, including: In the calibration table, the calibrated WiFi signal strength closest to the WiFi signal strength and greater than the WiFi signal strength is used as the first upper limit, and the calibrated WiFi signal strength closest to the WiFi signal strength and less than the WiFi signal strength is used as the first lower limit; In the calibration table, the calibrated Bluetooth signal strength closest to and greater than the Bluetooth signal strength is used as the second upper limit, and the calibrated Bluetooth signal strength closest to and less than the Bluetooth signal strength is used as the second lower limit; The calibrated distance corresponding to the first upper limit is used as the matching distance, or the calibrated distance corresponding to the second upper limit is used as the matching distance.
3. The distance measurement method of a communication device according to claim 2, It is characterized in that The determining the WiFi distance between the communication device to be measured and the detection node based on the matching calibrated WiFi signal strength, the WiFi signal strength and the matching distance includes: Determine a WiFi signal range based on a difference between the first upper limit and the first lower limit; Determine a WiFi signal deviation range based on a difference between the first upper limit and the WiFi signal strength; Obtaining a WiFi distance deviation range based on a ratio of the WiFi signal deviation range to the WiFi signal range; The WiFi distance is obtained based on the sum of the WiFi distance deviation range and the matching distance.
4. The distance measurement method of a communication device according to claim 2, It is characterized in that The determining the Bluetooth distance between the communication device to be measured and the detection node based on the matched calibrated Bluetooth signal strength, the Bluetooth signal strength and the matched distance includes: determining a Bluetooth signal range based on a difference between the second upper limit and the second lower limit; Determine a Bluetooth signal deviation range based on a difference between the first upper limit and the Bluetooth signal strength; Obtaining a Bluetooth distance deviation range based on a ratio of the Bluetooth signal deviation range to the Bluetooth signal range; The Bluetooth distance is obtained based on the sum of the Bluetooth distance deviation range and the matching distance.
5. The distance measurement method of a communication device according to claim 1, It is characterized in that The obtaining of the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node includes: Capture the WiFi data packet of the communication device and the Bluetooth data packet of the communication device to obtain the received data packet; Filtering the received data packet based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain a target data packet, and acquiring the device name and address data in the target data packet to identify the communication device to be measured; Obtain WiFi signal data of the target data packet to obtain the WiFi signal strength; The Bluetooth signal data of the target data packet is obtained to obtain the Bluetooth signal strength.
6. The distance measurement method of a communication device according to claim 5, It is characterized in that Before filtering the received data packet based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain the target data packet, the method further includes: The Apple Wireless Direct AWDL data packet and the Bluetooth data packet of the communication device are captured to obtain the received data packet.
7. The distance measurement method of a communication device according to claim 5 or 6, It is characterized in that The manufacturer filtering instruction includes setting manufacturer information, the signal strength filtering instruction includes setting signal strength information, and filtering the received data packet based on the signal strength filtering instruction and the manufacturer filtering instruction to obtain the target data packet includes: When the manufacturer information in the received data packet is the set manufacturer information, and the WiFi signal data of the received data packet or the Bluetooth signal data of the received data packet is greater than or equal to the set signal strength information, the received data packet is determined to be the target data packet.
8. A distance measuring device for a communication device, It is characterized in that include: An acquisition module is used to acquire the WiFi signal strength and the Bluetooth signal strength between the communication device to be measured and the detection node; A matching module, used to find the matching calibrated WiFi signal strength, matching calibrated Bluetooth signal strength and matching distance of the WiFi signal strength in a calibration table; the calibration table includes multiple calibrated distances between the beacon and the detection node, and the calibrated WiFi signal strength and calibrated Bluetooth signal strength corresponding to the calibrated distance; A WiFi distance determination module, configured to determine the WiFi distance between the communication device to be measured and the detection node based on the matched calibrated WiFi signal strength, the WiFi signal strength and the matched distance; A Bluetooth distance determination module, used to determine the Bluetooth distance between the communication device to be measured and the detection node based on the matched calibrated Bluetooth signal strength, the Bluetooth signal strength and the matched distance; The measurement distance determination module is used to use the average value of the WiFi distance and the Bluetooth distance as the measurement distance between the communication device to be measured and the detection node.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the distance measurement method of the communication device according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the distance measurement method of the communication device according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Radio frequency identification speed measurement method and device
CN103605126A
Depth compensation method and device of iTOF camera, terminal and readable storage medium
CN113064144A
Double-triangulation positioning method fusing Wi-Fi and Bluetooth
CN117676462A
Real time location system and method for caching location information based on finger printing
US20110128124A1
Cited By
Sensor access method and system of Internet of Things
CN121348921A
