CN-122002245-A - WiFi scanning method and electronic equipment
Abstract
The application discloses a WiFi scanning method and electronic equipment, and the method relates to the field of computers, and comprises the steps of acquiring a motion state of a user under the condition that the electronic equipment of the user is in a first cell and the first cell contains a first POI; when the motion state is a walking state, starting WiFi scanning of a first frequency band and acquiring a first WiFi scanning result, calculating first matching similarity between the first WiFi scanning result and a first WiFi fingerprint, when the first matching similarity is smaller than a first threshold value and the first matching similarity is larger than or equal to a second threshold value, starting WiFi scanning of a second frequency band and acquiring a second WiFi scanning result, and determining whether a user enters a first POI or not based on the first matching similarity, the second WiFi scanning result and the second WiFi fingerprint. According to the application, a multi-band WiFi scanning mode is adopted, so that the accuracy of WiFi scanning results is improved.
Inventors
- ZHENG ZHUO
- MA DI
- NIE DAWEI
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241029
Claims (14)
- 1. A wireless fidelity WiFi scanning method, the method comprising: Acquiring a motion state of a user under the condition that electronic equipment of the user is in a first cell and the first cell contains a first point of interest (POI); Under the condition that the motion state is a walking state, starting WiFi scanning of a first frequency band, and acquiring a first WiFi scanning result; calculating a first matching similarity between the first WiFi scanning result and a first WiFi fingerprint, wherein the first WiFi fingerprint is a WiFi fingerprint corresponding to the first POI aiming at the first frequency band; When the first matching similarity is smaller than a first threshold value and the first matching similarity is larger than or equal to a second threshold value, starting WiFi scanning of a second frequency band, and acquiring a second WiFi scanning result; And determining whether the user enters the first POI or not based on the first matching similarity, the second WiFi scanning result and a second WiFi fingerprint, wherein the second WiFi fingerprint is a WiFi fingerprint corresponding to the first POI aiming at the second frequency band.
- 2. The method of claim 1, wherein the determining whether the user entered the first POI based on the first matching similarity, the second WiFi scan result, and a second WiFi fingerprint comprises: determining a second matching similarity based on the first matching similarity, the second WiFi scanning result and a second WiFi fingerprint; and under the condition that the second matching similarity is greater than or equal to a third threshold value, determining that the user enters the first POI.
- 3. The method according to claim 2, wherein the method further comprises: and stopping WiFi scanning of the first frequency band and WiFi scanning of the second frequency band under the condition that the second matching similarity is larger than or equal to a third threshold value.
- 4. A method according to claim 2 or 3, characterized in that the method further comprises: And stopping WiFi scanning of the second frequency band and continuing WiFi scanning of the first frequency band under the condition that the second matching similarity is smaller than the third threshold value.
- 5. The method of any of claims 2-4, wherein the determining a second matching similarity based on the first matching similarity, the second WiFi scan result, and a second WiFi fingerprint comprises: calculating a third matching similarity between the second WiFi scanning result and the second WiFi fingerprint; and obtaining a second matching similarity based on the first matching similarity and the third matching similarity.
- 6. The method of claim 5, wherein the obtaining a second matching similarity based on the first matching similarity and the third matching similarity comprises: weighting and calculating the first matching similarity and the third matching similarity to obtain a second matching similarity; the first weight value corresponding to the first matching similarity is smaller than the second weight value corresponding to the third matching similarity.
- 7. The method of any of claims 1-6, wherein the number of WiFi operating in the first frequency band is greater than the number of WiFi operating in the second frequency band.
- 8. The method according to any one of claims 1-7, further comprising: and stopping WiFi scanning of the first frequency band under the condition that the first matching similarity is larger than or equal to the first threshold value, and determining that the user enters the first POI.
- 9. The method according to any one of claims 1-8, further comprising: And continuing WiFi scanning of the first frequency band under the condition that the first matching similarity is smaller than the first threshold value and the first matching similarity is smaller than the second threshold value.
- 10. An electronic device comprising one or more processors and one or more memories, wherein the one or more memories are coupled to the one or more processors, the one or more memories for storing computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-9.
- 11. A WiFi scanning system comprising an electronic device, wherein the electronic device is configured to perform the method of any of claims 1-9.
- 12. A chip comprising a processor and an interface, the processor and the interface being coupled, the interface being for receiving or outputting signals, the processor being for executing code instructions to cause the method of any of claims 1-9 to be performed.
- 13. A computer storage medium storing a computer program comprising program instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-9.
- 14. A computer program product, characterized in that the computer program product, when run on a computer, causes the computer to perform the method according to any of claims 1-9.
Description
WiFi scanning method and electronic equipment Technical Field The embodiment of the application relates to the field of computers, in particular to a WiFi scanning method and electronic equipment. Background Points of interest (point of interest, POIs) are typically used to identify an object that occupies a small area. In the geographic information system, a POI may be a house, a store, a cafe, an oil drum, a gas station, a bus stop, etc. A POI may contain basic information such as name, address, category, location information (e.g., latitude and longitude coordinates), etc. With the development of internet technology, service providers may generate geofences for a region based on crowd-sourced data of users when they obtain service. A geofence is a virtual fence that encloses a virtual geographic boundary and allows the electronic device to receive corresponding business services when it enters or leaves a particular geographic area or is active within that area. The geofence may be composed of base station information, wireless fidelity network (WIRELESS FIDELITY, wiFi) fingerprints, latitude and longitude information, and the like. Taking a geofence corresponding to a store POI as an example, when a user connects to a base station corresponding to the geofence, wiFi scanning is performed, and when a WiFi scanning result is matched with a WiFi fingerprint in the geofence, the user is indicated to enter the store POI, and store service corresponding to the store POI can be recommended for the user. However, in the WiFi scanning process, if the WiFi scanning result is inaccurate, whether the user enters the store POI cannot be accurately identified, so that timeliness of the recommended service is affected. Therefore, how to perform WiFi scanning to improve the accuracy of the WiFi scanning result is a problem to be solved at present. Disclosure of Invention The embodiment of the application provides a WiFi scanning method and electronic equipment, which are beneficial to improving the accuracy of WiFi scanning results based on the method described by the application. In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme: In a first aspect, the present application provides a WiFi scanning method, where the method is applied to an electronic device, and the method includes: The method comprises the steps of obtaining a motion state of a user by the electronic equipment under the condition that the electronic equipment of the user is in a first cell and the first cell contains a first interest point (point of interest, POI), starting WiFi scanning of a first frequency band by the electronic equipment under the condition that the motion state is a walking state and obtaining a first WiFi scanning result, calculating first matching similarity between the first WiFi scanning result and a first WiFi fingerprint by the electronic equipment, wherein the first WiFi fingerprint is a WiFi fingerprint corresponding to the first frequency band, starting WiFi scanning of a second frequency band by the electronic equipment under the condition that the first matching similarity is smaller than a first threshold value and the first matching similarity is larger than or equal to a second threshold value, and obtaining a second WiFi scanning result, and further determining whether the user enters the first POI or not by the electronic equipment based on the first matching similarity, the second WiFi scanning result and the second WiFi fingerprint, and the second WiFi fingerprint is a WiFi fingerprint corresponding to the second frequency band by the first POI. In embodiments of the present application, POIs are typically used to identify an object that occupies a small area. In the geographic information system, a POI may be a house, a store, a cafe, an oil drum, a gas station, a bus stop, etc. Taking a store POI as an example, assuming that the first cell includes a certain POI (may be referred to as a first POI), when the user enters a geofence (i.e. a cell fence) of the first cell and the user is in a walking state, the electronic device may perform WiFi scanning in a WiFi scanning manner of multiple frequency bands (a first frequency band (e.g. 2.4G frequency band) and a second frequency band (e.g. 5G frequency band)), and may start WiFi scanning of different frequency bands when different conditions are satisfied. Specifically, in the case that the motion state of the user is a walking state, the user may be considered to have a possibility of entering the first POI, in order to save power consumption, the electronic device may actively and preferentially start WiFi scanning in the first frequency band (such as the 2.4G frequency band), obtain a first WiFi scanning result, and then calculate a matching score, that is, a first matching similarity, between the first WiFi scanning result (including BSSID and RSSI) and the first WiFi fingerprint (including BSS