[go: up one dir, main page]

CN118566533B - Mobile detection method based on Wi-Fi signal similarity - Google Patents

Mobile detection method based on Wi-Fi signal similarity Download PDF

Info

Publication number
CN118566533B
CN118566533B CN202411044953.8A CN202411044953A CN118566533B CN 118566533 B CN118566533 B CN 118566533B CN 202411044953 A CN202411044953 A CN 202411044953A CN 118566533 B CN118566533 B CN 118566533B
Authority
CN
China
Prior art keywords
signal
similarity
equipment
detection method
identifier
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202411044953.8A
Other languages
Chinese (zh)
Other versions
CN118566533A (en
Inventor
陈梁
邓洪燕
白晶晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Xinwang Technology Co ltd
Original Assignee
Sichuan Changhong Xinwang Technology Co ltd
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 Sichuan Changhong Xinwang Technology Co ltd filed Critical Sichuan Changhong Xinwang Technology Co ltd
Priority to CN202411044953.8A priority Critical patent/CN118566533B/en
Publication of CN118566533A publication Critical patent/CN118566533A/en
Application granted granted Critical
Publication of CN118566533B publication Critical patent/CN118566533B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P13/00Indicating or recording presence, absence, or direction, of movement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to the field of mobile detection, and provides a mobile detection method based on Wi-Fi signal similarity, which is used for analyzing signal intensity changes of surrounding Wi-Fi hot spots, respectively calculating average signal intensity of each hot spot, and comparing two groups of continuous scanning results by using cosine similarity so as to judge whether equipment moves or not. The method not only can feed back the moving state of the equipment in real time, has important significance for management and control of the equipment of the Internet of things, but also has a Wi-Fi signal scanning function, so that special movement detection sensors such as acceleration sensors and gyroscopes are not required to be additionally added, the cost of the equipment is greatly reduced, and the application range is wider.

Description

Mobile detection method based on Wi-Fi signal similarity
Technical Field
The invention relates to the field of mobile detection, in particular to a mobile detection method based on Wi-Fi signal similarity.
Background
The conventional device movement detection method requires that the device have specific hardware support, such as an acceleration sensor and a gyroscope, but many devices do not have such hardware support, which limits the application of the device to various devices, and if a corresponding hardware structure is added, the cost of the device is increased, and the power consumption of the device is increased.
Disclosure of Invention
In order to realize low-cost mobile detection and increase universality, the application provides a mobile detection method based on Wi-Fi signal similarity.
The invention solves the problems by adopting the following technical scheme:
A movement detection method based on Wi-Fi signal similarity comprises the following steps:
Step 1, equipment periodically scans surrounding Wi-Fi hot spots, and records identifiers and signal intensity of each hot spot to form a scanning data set;
And 2, calculating the similarity of the signal intensity by using a cosine similarity formula based on two continuous scanning data sets, wherein if the similarity is larger than a threshold value, the equipment is not moved, otherwise, the equipment is moved.
Further, in the step 1, the device scans N times continuously for each period, and the average value of the signal intensities of N times continuously for each hot spot is taken as the final signal intensity of the hot spot in the scanned data set.
Further, N is 5.
Further, the identifier is a base station identifier.
Further, the surrounding Wi-Fi hotspots are at least 2.
Further, the step 2 specifically includes: cosine similarity CosineSimilarity = DotProduct/(Modulus 1×modulus 2), where DotProduct is the dot product of the signal intensities in the two scan data sets, and Modulus1 and Modulus2 are the modulo of the signal intensities in the two scan data sets, respectively.
Compared with the prior art, the invention has the following beneficial effects:
The average signal intensity of each hotspot is calculated by analyzing the signal intensity changes of surrounding Wi-Fi hotspots, and two continuous groups of scanning results are compared by using cosine similarity, so that whether the equipment moves or not is judged. The method not only can feed back the moving state of the equipment in real time, has important significance for management and control of the equipment of the Internet of things, but also has a Wi-Fi signal scanning function, so that special movement detection sensors such as acceleration sensors and gyroscopes are not required to be additionally added, the cost of the equipment is greatly reduced, and the application range is wider.
Drawings
Fig. 1 is a flow chart of a movement detection method based on Wi-Fi signal similarity.
Detailed Description
The present invention will be described in further detail with reference to the following examples in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
A movement detection method based on Wi-Fi signal similarity comprises the following steps:
Step 1, equipment periodically scans surrounding Wi-Fi hot spots, and records identifiers and signal intensity of each hot spot to form a scanning data set;
And 2, calculating the similarity of the signal intensity by using a cosine similarity formula based on two continuous scanning data sets, wherein if the similarity is larger than a threshold value, the equipment is not moved, otherwise, the equipment is moved.
According to the equipment movement detection method, the surrounding Wi-Fi hot spots are scanned in real time, and cosine similarity is used for comparing continuous Wi-Fi signal scanning results twice, so that whether equipment moves or not is judged. The method does not depend on specific sensors and hardware schemes, does not need to additionally increase hardware cost, and is lower in power consumption and higher in efficiency. In addition, the method has the advantages of strong instantaneity, simplicity and convenience in operation and the like, and is particularly suitable for the environment of the Internet of things, which needs large-scale equipment deployment and management.
The method only adopts a software algorithm mode to calculate, the accuracy and the instantaneity of mobile detection can be improved continuously through optimization of the algorithm, and the product competitiveness is improved continuously through an OTA mode.
Specifically, as shown in fig. 1, the movement detection method based on Wi-Fi signal similarity includes:
(1) Wi-Fi scanning: after the device is started, the Wi-Fi scanning function is started first. The device will periodically scan for surrounding Wi-Fi hotspots and record the BSSID (base station identifier) and signal strength (RSSI) of each hotspot. The step is realized by calling the Wi-Fi interface of the device, and information of all surrounding Wi-Fi hot spots can be acquired. In this embodiment, the BSSID is used as a unique identifier of the hotspot, and other information may also be used as an identifier, which is not limited herein.
Assuming that there are 3 hot spots currently scanned, the 3 hot spot information is stored as a row vector, and each vector element is composed of BSSID and signal strength RSSI, for example:
[{“aa:bb:cc:dd:ee:ff”,-10},{“gg:hh:ii:jj:kk:ll”,-20},{“mm:nn:oo:pp:qq:rr”,-30}]。
(2) Signal intensity analysis: in this embodiment, the device performs five scans continuously, and the final signal intensity in the scan data set is determined by averaging the signal intensity of each hot spot in the results of the five scans continuously. The signal strength of the hot spot can be reflected more accurately by adopting the average signal strength.
When calculating the average value, the fact that different Wi-Fi hot spots in the two scanning result lists possibly exist is considered, for example, when the hot spot with the BSSID of 'aa: bb: cc: dd: ee: ff' is scanned for the first time, and the hot spot with the BSSID of 'aa: bb: cc: dd: ee: ff' is not scanned for the second time, the signal intensity of the hot spot with the BSSID of 'aa: bb: cc: dd: ee: ff' for the second time is recorded as 0, and the hot spot is still calculated according to five times, so that the variation amplitude of the average value is correspondingly increased, and the moving state of the equipment can be reflected.
Assume that the 5 scans result in:
[{"aa:bb:cc:dd:ee:ff",-10},{"gg:hh:ii:jj:kk:ll",-20},{"mm:nn:oo:pp:qq:rr",-30}],[{"aa:bb:cc:dd:ee:ff",-15},{"gg:hh:ii:jj:kk:ll",-22},{"mm:nn:oo:pp:qq:rr",-30}],[{"aa:bb:cc:dd:ee:ff",-12},{"gg:hh:ii:jj:kk:ll",-30},{"mm:nn:oo:pp:qq:rr",-40}],[{"aa:bb:cc:dd:ee:ff",-30},{"gg:hh:ii:jj:kk:ll",-18},{"mm:nn:oo:pp:qq:rr",-50}],[{"gg:hh:ii:jj:kk:ll",-40},{"mm:nn:oo:pp:qq:rr",-30},{"ss:tt:uu:vv:ww:xx",-40}].
The vector of the average value composition finally calculated is then:
[{"aa:bb:cc:dd:ee:ff",(-10-15-12-30+0)/5=-13.4},{"gg:hh:ii:jj:kk:ll",(-20-22-30-18-40)/5=-26},{"mm:nn:oo:pp:qq:rr",(-30-30-40-50-30)/5=-36},{"ss:tt:uu:vv:ww:xx",(-40+0+0+0+0)/5=-8}]. There are no hot spots in the fifth result where BSSID is "aa: bb: cc: dd: ee: ff", at which time the signal strength is still averaged over 5 times. Meanwhile, in the 5 th result, a hot spot with the BSSID of 'ss: tt: uu: vv: ww: xx' which does not appear before appears is added into the vector, and the signal intensity is still averaged according to the 5 times calculation.
(3) Cosine similarity calculation: a cosine similarity formula is used to calculate the similarity of two consecutive sets of scan results. Specifically, the device will first calculate the dot product of the two sets of scan results (DotProduct), then calculate the Modulus (Modulus) of each set of scan results, and finally calculate the cosine similarity (CosineSimilarity) using the following formula: cosineSimilarity = DotProduct \ (Modulus 1 x Modulus 2), where DotProduct is the dot product of the two sets of scan results, and Modulus1 and Modulus2 are the modes of the two sets of scan results, respectively. In this way, cosine similarity of the two groups of scanning results can be obtained, so that whether the equipment moves or not can be judged.
Regarding the calculation of dot product: because of the comparison of the two sets of scan results, there may be cases where the BSSIDs cannot be matched, for example, if the first set of results has a hotspot with BSSID name "aa: bb: cc: dd: ee: ff" and the second set does not have it, the calculation is performed according to the RSSI of "aa: bb: cc: dd: ee: ff" in the second set as 0. The same applies to the case where there is a second group, but not the first group.
Assuming there are two calculations, the first set is the average of the first 5 scans:
[{"aa:bb:cc:dd:ee:ff",-13.4},{"gg:hh:ii:jj:kk:ll",-26},{"mm:nn:oo:pp:qq:rr",-36},{"ss:tt:uu:vv:ww:xx",-8}],
The second group is the average result of the last 5 scans:
[{"aa:bb:cc:dd:ee:ff",-16},{"gg:hh:ii:jj:kk:ll",-22},{"mm:nn:oo:pp:qq:rr",-46},{"yy:zz:aa:bb:cc:dd",-10}].
The dot product of the two vectors is [ (13.4) × (-16) ] + [ (-26) × (-22) ] + [ (-36) × (-46) ] + [ (-8) ×0] + [0× (-10) ]= 2442.4.
Wherein "ss: tt: uu: vw: xx" and "yy: zz: aa: bb: cc: dd" occur only in the first group and the second group, respectively, and both do not occur in the vector of each other, so that the corresponding intensity product is 0.
The first set of result vectors is modulo=47.1, Modulo of the second set of result vectors is=54.4。
The cosine similarity of the final two result vectors is: 2442.4 ≡ (47.1×54.4) =0.95.
(4) Device movement detection: if the calculated cosine similarity is lower than a preset threshold (such as 0.5), judging that the equipment moves; otherwise the device is not moved. The specific value of the threshold may be set according to actual needs, and is not limited herein.
(5) Device movement status feedback: the device may feed back the detection result of the movement state to the user or the management system in real time. This step is implemented through a communication interface of the device, and the detection result may be sent out through a wireless network, a wired network, or other communication modes. Thus, the user or the management system can know the moving state of the equipment in real time, so as to perform corresponding management and control.
It should be noted that, if there is only one Wi-Fi hotspot in the surrounding environment, the accuracy of mobile detection is not high, and if there are two Wi-Fi hotspots, the accuracy of detection is higher, and the accuracy of detection can be improved by properly increasing the number of Wi-Fi hotspots.

Claims (5)

1. The mobile detection method based on Wi-Fi signal similarity is characterized by comprising the following steps:
Step 1, equipment periodically scans surrounding Wi-Fi hot spots, and records identifiers and signal intensity of each hot spot to form a scanning data set;
Step2, calculating the similarity of the signal intensity by using a cosine similarity formula based on two continuous scanning data sets, if the similarity is larger than a threshold value, the equipment is not moved, otherwise, the equipment is moved;
the cosine similarity formula is: cosine similarity CosineSimilarity = DotProduct/(Modulus 1×modulus 2), where DotProduct is the dot product of the signal intensities in the two scan data sets, and Modulus1 and Modulus2 are the modulo of the signal intensities in the two scan data sets, respectively; the dot product of the signal intensities in the two scan data sets refers to the product of the signal intensities of the same identifier; if there is an identifier in the first group but not in the second group, the signal strength of the identifier in the second group is calculated as 0, and the same applies to the identifier in the second group but not in the first group.
2. The Wi-Fi signal similarity-based movement detection method of claim 1, wherein in step 1, each periodic device scans N times continuously, and an average value of signal intensities of N times continuously for each hotspot is used as a final signal intensity of the hotspot in the scan data set.
3. The Wi-Fi signal similarity-based movement detection method of claim 2, wherein N is 5.
4. The Wi-Fi signal similarity-based movement detection method of claim 1, wherein the identifier is a base station identifier.
5. The Wi-Fi signal similarity-based movement detection method of claim 1, wherein the surrounding Wi-Fi hotspots are at least 2.
CN202411044953.8A 2024-08-01 2024-08-01 Mobile detection method based on Wi-Fi signal similarity Active CN118566533B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411044953.8A CN118566533B (en) 2024-08-01 2024-08-01 Mobile detection method based on Wi-Fi signal similarity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411044953.8A CN118566533B (en) 2024-08-01 2024-08-01 Mobile detection method based on Wi-Fi signal similarity

Publications (2)

Publication Number Publication Date
CN118566533A CN118566533A (en) 2024-08-30
CN118566533B true CN118566533B (en) 2024-10-01

Family

ID=92471428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411044953.8A Active CN118566533B (en) 2024-08-01 2024-08-01 Mobile detection method based on Wi-Fi signal similarity

Country Status (1)

Country Link
CN (1) CN118566533B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106054128A (en) * 2016-05-26 2016-10-26 天津城建大学 Indoor navigation method and indoor navigation method device
CN110290583A (en) * 2019-06-20 2019-09-27 浙江鑫网能源工程有限公司 A kind of wireless sensor network moving targets location device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9167991B2 (en) * 2010-09-30 2015-10-27 Fitbit, Inc. Portable monitoring devices and methods of operating same
US10866302B2 (en) * 2015-07-17 2020-12-15 Origin Wireless, Inc. Method, apparatus, and system for wireless inertial measurement
CN106123897B (en) * 2016-06-14 2019-05-03 中山大学 Multi-feature-based indoor fusion localization method
US10989786B2 (en) * 2016-12-28 2021-04-27 Sap Se Outdoor localization using hotspot labels
WO2020102368A1 (en) * 2018-11-14 2020-05-22 Starlight Ag, Llc Systems and methods for selective and real-time user interface display
US11913970B2 (en) * 2019-02-22 2024-02-27 Aerial Technologies Inc. Wireless motion detection using multiband filters
US12042669B2 (en) * 2019-05-08 2024-07-23 Shanghai United Imaging Healthcare Co., Ltd. Systems and methods for motion tracking in radiation therapy
US11461699B2 (en) * 2020-02-05 2022-10-04 Samsung Electronics Co., Ltd. Device-free localization robust to environmental changes
CN111366150B (en) * 2020-04-20 2022-03-18 Oppo广东移动通信有限公司 Running direction detection method, device, electronic device and storage medium
CN116908872A (en) * 2023-04-10 2023-10-20 西南科技大学 Multi-robot laser radar map construction method combining WIFI similarity
CN117241328B (en) * 2023-11-15 2024-01-23 四川长虹新网科技有限责任公司 Easymesh switching method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106054128A (en) * 2016-05-26 2016-10-26 天津城建大学 Indoor navigation method and indoor navigation method device
CN110290583A (en) * 2019-06-20 2019-09-27 浙江鑫网能源工程有限公司 A kind of wireless sensor network moving targets location device

Also Published As

Publication number Publication date
CN118566533A (en) 2024-08-30

Similar Documents

Publication Publication Date Title
JP5025585B2 (en) COMMUNICATION DEVICE, COMMUNICATION PROGRAM, AND STORAGE MEDIUM
KR101363118B1 (en) Method and apparatus for low-power ap-assisted fast wireless roaming using optimized neighbor graphs
CN102844672B (en) Positioning device and positioning method
US7991425B2 (en) Mobile terminal device and roaming method thereof
US7447176B2 (en) Making roaming decisions based on association qualities between wireless devices and wireless access points
US20090310567A1 (en) Global network neighborhood: Scheme for providing information about available networks in a geographical location
US20060142004A1 (en) Method and apparatus to intelligently perform scanning and assist scanning by profiling scanning history
US20100167728A1 (en) Apparatus and method for femto cell coverage mapping using macro base station
CN101483489A (en) Method of operating a cognitive radio device and cognitive radio device
US20080123607A1 (en) 802.11k neighbor report enhancement
US20030235164A1 (en) Management of location-aware networks
CN101483894A (en) Fast switching method for WLAN
CN103747431B (en) Method and device for realizing rapid roaming based on neighbor detection
CN103347278A (en) Method and device for renewing fingerprint database in wireless positioning
US10159008B2 (en) Terminal positioning
CN106658665A (en) Method and apparatus for establishing wireless connection
US20050007979A1 (en) Uniform channel spreading in a wireless local area network using dynamic frequency selection
CN118566533B (en) Mobile detection method based on Wi-Fi signal similarity
US20060285538A1 (en) System, terminal, network entity, method, and computer program product for system selection in a multi-mode communication system
CN106507444A (en) A kind of method and device of scanning WAP
CN111586801A (en) WiFi hotspot selection method and device
US12096352B2 (en) Cell selection method and apparatus, communication device, and storage medium
Varsamopoulos et al. Dynamically adapting registration areas to user mobility and call patterns for efficient location management in PCS networks
JP2009199592A (en) Global query manager and ubiquitous gateway for object search
Biswash et al. An efficient metric-based (EM-B) location management scheme for wireless cellular networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant