Search

CN-118804025-B - BSSID detection method and device, electronic equipment and storage medium

CN118804025BCN 118804025 BCN118804025 BCN 118804025BCN-118804025-B

Abstract

The application discloses a BSSID detection method, a BSSID detection device, electronic equipment and a storage medium. The method comprises the steps of receiving a first wifi signal, collecting signal power of the first wifi signal, analyzing and obtaining a starting point and an ending point of a beacon frame in the first wifi signal according to the signal power, calculating and obtaining a predicted frequency matched with the working frequency of a target sending end according to the starting point and the ending point, controlling the working frequency of a radio frequency module to be the predicted frequency, receiving a second wifi signal sent by the target sending end through the radio frequency module under the working frequency, analyzing the second wifi signal to obtain a preamble, and decoding the second wifi signal according to the preamble to obtain the BSSID. According to the embodiment of the application, the BSSID detection method is obtained by software calculation, and a wireless communication chip hung on a system chip is not required to be additionally arranged, so that the preparation cost is reduced.

Inventors

  • WU YUANHUA
  • XU MEI
  • ZHANG YINGCHUAN
  • YANG FENGKAI
  • YANG LONGBO
  • XIAO QING

Assignees

  • 中移物联网有限公司
  • 芯昇科技有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260512
Application Date
20231226

Claims (9)

  1. 1. A BSSID detection method, comprising: Receiving a first wifi signal, and collecting signal power of the first wifi signal, wherein the first wifi signal comprises a wifi signal sent by a target sending end; performing interpolation processing on signal power of a plurality of continuous subframes in the first wifi signal to obtain a first analysis sequence, wherein the first analysis sequence comprises m signal powers corresponding to n preset beacon frame periods; Calculating power average values of a plurality of signal powers of which the intervals are integral multiples of the preset beacon frame period in the first analysis sequence, and arranging the power average values according to the bit times in the preset beacon frame period to obtain a second analysis sequence, wherein the second analysis sequence comprises q power average values corresponding to the preset beacon frame period, n multiplied by q is more than or equal to m, (n-1) multiplied by q is less than m, and n, m and q are natural numbers; Setting a power threshold according to the value of each power average value in the second analysis sequence; Setting the P x th bit of the second analysis sequence as a start point of the beacon frame, setting the P y th bit of the second analysis sequence as an end point of the beacon frame, wherein the power average value of the P x th bit is less than or equal to the power threshold value, the power average value of the P x+1 th bit is greater than the power threshold value, the power average value of the P y-1 th bit is greater than the power threshold value, the power average value of the P y th bit is less than or equal to the power threshold value, and x < y; according to the starting point and the ending point, calculating to obtain a predicted frequency matched with the working frequency of the target transmitting end, and controlling the working frequency of a radio frequency module to be the predicted frequency so as to receive a second wifi signal transmitted by the target transmitting end through the radio frequency module under the predicted frequency; Analyzing the second wifi signal to obtain a preamble; And decoding the second wifi signal according to the preamble to obtain the BSSID.
  2. 2. The BSSID detection method of claim 1, wherein said setting a power threshold according to the magnitude of each of said power averages in said second analysis sequence comprises: Determining a maximum peak in the second analysis sequence; and calculating the difference between the maximum peak value and the preset bias to obtain a power threshold value.
  3. 3. The BSSID detection method according to claim 1, wherein the calculating, according to the start point and the end point, a predicted frequency that matches the operating frequency of the target transmitting end, and controlling the operating frequency of the radio frequency module to be the predicted frequency, so as to receive, by using the radio frequency module under the predicted frequency, the second wifi signal sent by the target transmitting end includes: calculating to obtain the predicted frequency with the same working frequency of the target sending end according to the starting point and the ending point; Controlling the working frequency of the radio frequency module to be the predicted frequency, so as to receive a second wifi signal sent by the target sending end through the radio frequency module under the predicted frequency.
  4. 4. The BSSID detection method of claim 1, wherein the analyzing the second wifi signal to obtain a preamble comprises: selecting continuous N0 signal powers from a synchronization field of a preset reference sequence as a first signal sequence, wherein N0 is a natural number; Taking the signal power of each subframe in the second wifi signal as a second signal sequence; Performing sliding correlation processing on the first signal sequence and the second signal sequence by taking N0 as the sliding window number to obtain cross-correlation power corresponding to each signal power in the second signal sequence; Calculating an autocorrelation power p corresponding to each signal power in the second signal sequence; and determining the preamble in the second wifi signal according to the cross-correlation power and p×n0.
  5. 5. The BSSID detection method of claim 4, wherein said determining the preamble in the second wifi signal according to the cross correlation power and p x N0 comprises: and setting the Pi bit as an index start bit of the preamble under the condition that the cross correlation power at the Pi bit in the second wifi signal is larger than or equal to the product of the autocorrelation power and N0 and the cross correlation power at the Pi-1 bit in the second wifi signal is smaller than or equal to the product of the autocorrelation power and N0.
  6. 6. The BSSID detection method according to claim 1, wherein decoding the second wifi signal according to the preamble to obtain a BSSID includes: determining a frame header field in the second wifi signal according to the preamble, and decoding the frame header field to obtain the byte length of the Mac PDU field; decoding and checking Mac PDU fields in the second wifi signals according to the byte length; And under the condition that the verification of the Mac PDU field is successful, analyzing the BSSID field in the second wifi signal to obtain the BSSID.
  7. 7. A BSSID detecting apparatus, comprising: The first receiving module is used for receiving a first wifi signal, collecting the signal power of the first wifi signal, wherein the first wifi signal comprises a wifi signal sent by a target sending end; The beacon frame detection module is used for carrying out interpolation processing on signal powers of a plurality of subframes in the first wifi signal to obtain a first analysis sequence, wherein the first analysis sequence comprises m signal powers corresponding to n preset beacon frame periods, calculating a power average value of the signal powers in the first analysis sequence, which is integral multiple of the preset beacon frame periods, arranging the power average values according to the order in the preset beacon frame period to obtain a second analysis sequence, the second analysis sequence comprises q power average values corresponding to the preset beacon frame periods, n multiplied by q is larger than or equal to m, (n-1) multiplied by q, n, m and q are natural numbers, setting a power threshold value according to the value of each power average value in the second analysis sequence, setting a P x bit of the second analysis sequence as a starting point of the beacon frame, setting a P y bit of the second analysis sequence as an ending point of the beacon frame, wherein the P32 bit is equal to or less than or equal to the P x+1 average value, and the power average value is equal to or less than or equal to P x+1 , and the power average value is equal to or more than or equal to the threshold value P x+1 ; The second receiving module is used for calculating and obtaining a predicted frequency matched with the working frequency of the target sending end according to the starting point and the ending point, and controlling the working frequency of the radio frequency module to be the predicted frequency so as to receive a second wifi signal sent by the target sending end through the radio frequency module under the predicted frequency; the preamble detection module is used for analyzing the second wifi signal to obtain a preamble; and the BSSID decoding module is used for decoding the second wifi signal according to the preamble to obtain the BSSID.
  8. 8. An electronic device comprising a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the BSSID detection method of any one of claims 1-6.
  9. 9. A computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement the BSSID detection method according to any one of claims 1-6.

Description

BSSID detection method and device, electronic equipment and storage medium Technical Field The present application belongs to the field of communications technologies, and in particular, to a BSSID detection method, a BSSID detection device, an electronic apparatus, and a storage medium. Background In the related art, an electronic device scans a wifi signal which can be received by an environment where the electronic device is located, the wifi signal is analyzed section by section to obtain a BSSID, and the geographic position information of a transmitting end of the wifi signal can be analyzed and obtained through inquiring and transmitting the geographic position information of the transmitting end of the wifi signal by the BSSID. The wifi signal is analyzed segment by segment to obtain the BSSID at a low speed, which is unfavorable for the subsequent positioning of the electronic equipment through the BSSID. Disclosure of Invention The embodiment of the application provides a BSSID detection method, a device, electronic equipment and a storage medium, which are used for solving the technical problem that the speed of obtaining the BSSID by analyzing wifi signals segment by segment is low. In a first aspect, an embodiment of the present application provides a BSSID detection method, where the method includes: Receiving a first wifi signal, and collecting signal power of the first wifi signal, wherein the first wifi signal comprises a wifi signal sent by a target sending end; analyzing and obtaining a starting point and an ending point of a beacon frame in the first wifi signal according to the signal power; According to the starting point and the ending point, calculating to obtain a predicted frequency matched with the working frequency of the target transmitting end, and controlling the working frequency of the radio frequency module to be the predicted frequency so as to receive a second wifi signal transmitted by the target transmitting end through the radio frequency module under the working frequency; analyzing the second wifi signal to obtain a preamble; And decoding the second wifi signal according to the preamble to obtain the BSSID. In an embodiment, according to the signal power, analyzing the start point and the end point of the beacon frame in the first wifi signal includes: interpolation processing is carried out on signal power of a plurality of continuous subframes in the first wifi signal, a first analysis sequence is obtained, and the first analysis sequence comprises m signal powers corresponding to n preset beacon frame periods; Calculating the power average value of a plurality of signal powers of which the intervals are integral multiples of a preset beacon frame period in the first analysis sequence to obtain a second analysis sequence, wherein the second analysis sequence comprises q power average values corresponding to the preset beacon frame period, n is equal to or more than m, (n-1) q is less than m, and n, m and q are natural numbers; Setting a power threshold according to the value of each power average value in the second analysis sequence; setting the P x th bit of the second analysis sequence as the starting point of the beacon frame, setting the P y th bit of the second analysis sequence as the ending point of the beacon frame, wherein the power average value of the P x th bit is smaller than or equal to the power threshold value, the power average value of the P x+1 th bit is larger than the power threshold value, the power average value of the P y-1 th bit is larger than the power threshold value, the power average value of the P y th bit is smaller than or equal to the power threshold value, and x < y. In one embodiment, setting the power threshold according to the magnitude of the value of each power average in the second analysis sequence includes: determining a maximum peak in the second analysis sequence; and calculating the difference between the maximum peak value and the preset offset value to obtain a power threshold value. In an embodiment, according to the start point and the end point, calculating to obtain a predicted frequency matched with the working frequency of the target transmitting end, and controlling the working frequency of the radio frequency module to be the predicted frequency, so as to receive the second wifi signal sent by the target transmitting end through the radio frequency module under the working frequency includes: according to the starting point and the ending point, calculating to obtain a predicted frequency matched with the working frequency of the target sending end, and controlling the working frequency of the radio frequency module to be the same as the working frequency of the target sending end, so that the second wifi signal sent by the target sending end is received through the radio frequency module under the predicted frequency. In an embodiment, analyzing the second wifi signal to obtain the preamble includes: selectin