WiFi scanning method and electronic equipment

By using a multi-band WiFi scanning method, combining the scanning results of 2.4G and 5G bands with fingerprint matching similarity, the problem of inaccurate WiFi scanning is solved, achieving higher scanning accuracy and more timely recommendation services.

CN122002245APending Publication Date: 2026-05-08HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-10-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Inaccurate WiFi scanning results can make it difficult to accurately identify whether a user has entered a store's point of interest, affecting the timeliness of recommendation services.

Method used

A multi-band WiFi scanning method is adopted. First, the 2.4G band is used to scan while walking. If the matching similarity does not meet the threshold, the scanning is switched to the 5G band. The results of multi-band scanning and fingerprint matching similarity are combined to determine whether the user has entered the point of interest.

Benefits of technology

It improves the accuracy of WiFi scanning results, ensures the timeliness and accuracy of recommended services, and saves power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122002245A_ABST
    Figure CN122002245A_ABST
Patent Text Reader

Abstract

The invention discloses a WiFi scanning method and electronic equipment, and the method relates to the field of computers, and the method comprises the steps: obtaining the motion state of a user under the condition that the electronic equipment of the user is in a first cell and the first cell comprises a first POI; when the motion state is a walking state, starting WiFi scanning of a first frequency band, and obtaining a first WiFi scanning result; calculating a first matching similarity between the first WiFi scanning result and the 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, WiFi scanning of a second frequency band is started, and a second WiFi scanning result is obtained; and determining whether the user enters the first POI based on the first matching similarity, the second WiFi scanning result and the second WiFi fingerprint. According to the method and the device, a multi-band WiFi scanning mode is adopted, so that the accuracy of a WiFi scanning result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more particularly to a WiFi scanning method and an electronic device. Background Technology

[0002] A point of interest (POI) is typically used to identify a small object. In a geographic information system (GIS), a POI can be a building, a shop, a coffee shop, an oil drum, a gas station, a bus stop, etc. A POI can contain basic information such as name, address, category, and location information (e.g., latitude and longitude coordinates).

[0003] With the development of internet technology, service providers can generate geofences for specific areas based on crowdsourced data when users obtain services. A geofence is a virtual fence that defines a virtual geographical boundary. When an electronic device enters or leaves a specific geographical area, or moves within that area, it can receive corresponding service requests. A geofence can consist of base station information, Wi-Fi fingerprints, latitude and longitude information, etc. Taking a store's Point of Interest (POI) as an example, when a user connects to the base station corresponding to that geofence, a Wi-Fi scan is performed. If the Wi-Fi scan result matches the Wi-Fi fingerprint within the geofence, it indicates that the user has entered the store's POI, and the provider can then recommend in-store services corresponding to that POI.

[0004] However, inaccurate WiFi scanning results can lead to an inability to accurately identify whether a user has entered a store's Point of Interest (POI), thus affecting the timeliness of recommendation services. Therefore, improving the accuracy of WiFi scanning results is a pressing issue that needs to be addressed. Summary of the Invention

[0005] This application provides a WiFi scanning method and an electronic device. Based on the method described in this application, it is beneficial to improve the accuracy of WiFi scanning results.

[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0007] In a first aspect, this application provides a WiFi scanning method, which is applied to an electronic device and includes:

[0008] When a user's electronic device is located in a first cell, and the first cell contains a first point of interest (POI), the electronic device acquires the user's movement state. If the movement state is walking, the electronic device initiates a WiFi scan on a first frequency band and acquires the first WiFi scan result. Then, the electronic device calculates a first matching similarity between the first WiFi scan result and a first WiFi fingerprint, where the first WiFi fingerprint is the WiFi fingerprint corresponding to the first POI for the first frequency band. If the first matching similarity is less than a first threshold and greater than or equal to a second threshold, the electronic device initiates a WiFi scan on a second frequency band and acquires the second WiFi scan result. Further, based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint, the electronic device determines whether the user has entered the first POI, where the second WiFi fingerprint is the WiFi fingerprint corresponding to the first POI for the second frequency band.

[0009] In this application embodiment, a Point of Interest (POI) is typically used to identify an object with a small footprint. In a geographic information system, a POI can be a building, a shop, a coffee shop, an oil drum, a gas station, a bus stop, etc. Taking a shop POI as an example, assuming that a first cell contains a certain POI (which can be called the first POI), when a user enters the geofence (i.e., cell fence) of the first cell and the user is in a walking state, the electronic device can use a multi-band (first band (e.g., 2.4 GHz band), second band (e.g., 5 GHz band)) WiFi scanning method to perform WiFi scanning, and can activate WiFi scanning on different bands under different conditions.

[0010] Specifically, when a user is walking, they are considered likely to have entered the first POI. To conserve power, the electronic device will proactively prioritize scanning for WiFi on the first frequency band (e.g., 2.4GHz) and obtain the first WiFi scan result. Then, a WiFi list matching algorithm is used to calculate the matching score, i.e., the first matching similarity, between the first WiFi scan result (including BSSID and RSSI) and the first WiFi fingerprint (including BSSID and RSSI). If the first matching similarity is less than a first threshold and greater than or equal to a second threshold, it is considered that the limited scanning frequency band may be causing the reduced matching accuracy. Therefore, the electronic device will further activate WiFi scanning on the second frequency band (e.g., 5GHz) and obtain the second WiFi scan result. Based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint, it can then be determined whether the user has entered the first POI. This method avoids situations where the limited scanning frequency band leads to reduced matching accuracy and missed WiFi scans, thereby improving the accuracy of WiFi scan results and more accurately identifying whether a user has entered the store POI (i.e., the first POI), ensuring the timeliness of the recommendation service.

[0011] In one possible implementation, when the electronic device determines whether a user has entered a first POI based on a first matching similarity, a second WiFi scan result, and a second WiFi fingerprint, the specific implementation method may be: determining a second matching similarity based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint; and determining that the user has entered the first POI if the second matching similarity is greater than or equal to a third threshold value.

[0012] In this embodiment, the electronic device will first use the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint to calculate the second matching similarity, and use the relationship between the second matching similarity and the third threshold value to determine whether the user has entered the first POI, thereby ensuring the timeliness of the recommendation service.

[0013] In one possible implementation, the method further includes: if the second matching similarity is greater than or equal to a third threshold value, the electronic device stops WiFi scanning of the first frequency band and WiFi scanning of the second frequency band.

[0014] In this embodiment of the application, if the second matching similarity is greater than or equal to the third threshold value, it is considered that the first WiFi scan result and the first WiFi fingerprint, and the second WiFi scan result and the second WiFi fingerprint are both successfully matched. At this time, the electronic device can stop the WiFi scanning of the first frequency band and the WiFi scanning of the second frequency band. It can be considered that the user has entered the first POI, and the corresponding in-store services (such as payment services, product recommendations, information, etc. for the store) can be recommended to the user.

[0015] In one possible implementation, the method further includes: if the second matching similarity is less than the third threshold, the electronic device stops WiFi scanning of the second frequency band and continues WiFi scanning of the first frequency band.

[0016] In this embodiment of the application, if the second matching similarity is less than the third threshold, it is considered that the WiFi scanning of the second frequency band has been increased, which has actually reduced the matching similarity. At this time, the electronic device needs to turn off or stop the WiFi scanning of the second frequency band and continue the WiFi scanning of the first frequency band to save power consumption.

[0017] In one possible implementation, when the electronic device determines the second matching similarity based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint, the specific implementation method may be: calculating the third matching similarity between the second WiFi scan result and the second WiFi fingerprint; and then obtaining the second matching similarity based on the first matching similarity and the third matching similarity.

[0018] In this embodiment, the electronic device can also use a WiFi list matching algorithm to calculate the matching score between the second WiFi scan result (including BSSID and RSSI) and the second WiFi fingerprint (including BSSID and RSSI), i.e., the third matching similarity. Then, the previously calculated first matching similarity and the third matching similarity calculated here can be used to calculate (e.g., weighted sum calculation) to determine the final second matching similarity. The second matching similarity determined here integrates the consideration of the first matching similarity for the first frequency band and the third matching similarity for the second frequency band, which can more accurately determine the matching degree between the current WiFi scan result and the WiFi fingerprint, and is conducive to more accurately determining whether the user has entered the first POI, thereby ensuring the timeliness of the recommendation service.

[0019] In one possible implementation, when the electronic device obtains the second matching similarity based on the first matching similarity and the third matching similarity, the specific implementation method may be: to calculate the second matching similarity by weighting the first matching similarity and the third matching similarity; the first weight value corresponding to the first matching similarity is less than the second weight value corresponding to the third matching similarity.

[0020] In this embodiment, taking a 2.4GHz first frequency band and a 5GHz second frequency band as an example, the number of WiFi networks operating in the first frequency band is greater than that in the second frequency band. This can be understood as the WiFi range operating in the second frequency band being smaller. Therefore, the calculated third matching similarity will be more accurate. Thus, when using the weighted sum of the first and third matching similarities, a higher weight value can be assigned to the third matching similarity; that is, the first weight value corresponding to the first matching similarity can be less than the second weight value corresponding to the third matching similarity. In this way, the matching degree between the current WiFi scan result and the WiFi fingerprint can be determined more accurately, which is beneficial for more accurately determining whether a user has entered the first POI, thereby ensuring the timeliness of the recommendation service.

[0021] In one possible implementation, the number of WiFi networks operating in the first frequency band is greater than the number of WiFi networks operating in the second frequency band.

[0022] In one possible implementation, the method further includes: if the first matching similarity is greater than or equal to a first threshold value, the electronic device stops WiFi scanning of the first frequency band and determines that the user has entered the first POI.

[0023] In this embodiment of the application, if the first matching similarity is greater than or equal to the first threshold value, it is considered that the first WiFi scan result and the first WiFi fingerprint are successfully matched. At this time, the electronic device can stop the WiFi scanning of the first frequency band, and it can be considered that the user has entered the first POI. The device can then recommend corresponding in-store services (such as payment services, product recommendations, information, etc. for the store) to the user.

[0024] In one possible implementation, the method further includes: if the first matching similarity is less than a first threshold and the first matching similarity is less than a second threshold, the electronic device continues WiFi scanning of the first frequency band.

[0025] In this embodiment of the application, if the first matching similarity is less than the first threshold value and the first matching similarity is less than the second threshold value, it is considered that the reduced matching accuracy is not due to the limitation of the scanning frequency band, but rather that the WiFi scanning degree of the current frequency band (i.e., the first frequency band) is insufficient. At this time, the electronic device can continue WiFi scanning of the first frequency band to ensure the reliability and accuracy of the WiFi scanning results.

[0026] Secondly, this application provides a WiFi scanning device, which can be an electronic device, a device within an electronic device, or a device compatible with an electronic device. The WiFi scanning device can also be a chip system, capable of executing the methods performed by the electronic device in the first aspect. The functions of the WiFi scanning device can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the aforementioned functions. These units can be software and / or hardware. The operations and beneficial effects performed by the WiFi scanning device are described in the first aspect and their beneficial effects are not repeated here.

[0027] Thirdly, this application provides an electronic device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, the memories being used to store a computer program, and the processors being used to invoke the computer program to cause the electronic device to perform the method described in the first aspect.

[0028] Fourthly, this application provides a chip system for use in an electronic device, the chip system including at least one processor and an interface for receiving instructions and transmitting them to the at least one processor; the at least one processor executes the instructions to cause the electronic device to perform the method described in the first aspect.

[0029] Fifthly, this application provides a WiFi scanning system, which includes an electronic device; wherein the electronic device is used to perform the method as described in the first aspect.

[0030] In a sixth aspect, this application provides a WiFi scanning device that includes functions or units for performing the method as described in any of the first aspects.

[0031] In a seventh aspect, this application provides a computer storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the method and steps described in the first aspect.

[0032] Eighthly, this application provides a computer program product including a computer program / instructions that, when executed by a processor, implement the method and steps described in the first aspect. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of a system architecture provided in an embodiment of this application;

[0034] Figure 2 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0035] Figure 3 This is a software structure block diagram of an electronic device provided in an embodiment of this application;

[0036] Figure 4 This is a schematic diagram of a geofence-based recommendation service provided in an embodiment of this application;

[0037] Figure 5 This is a schematic diagram of a WiFi scanning process provided in an embodiment of this application;

[0038] Figure 6A This is a schematic diagram of a user entering a first cell according to an embodiment of this application;

[0039] Figure 6B This is a schematic diagram illustrating the calculation of the first matching similarity provided in an embodiment of this application;

[0040] Figure 6C This is a schematic diagram of a first WiFi scan result and a first WiFi fingerprint provided in an embodiment of this application;

[0041] Figure 7A This is a schematic diagram of a process provided in this application embodiment of an electronic device to determine whether a user has entered a first POI based on a first matching similarity, a second WiFi scanning result, and a second WiFi fingerprint;

[0042] Figure 7B This is a schematic diagram illustrating the process of determining a second matching similarity based on the first matching similarity, the second WiFi scanning result, and the second WiFi fingerprint provided in an embodiment of this application;

[0043] Figure 7C This is a schematic diagram illustrating the calculation of third-party matching similarity provided in an embodiment of this application;

[0044] Figure 7D This is a schematic diagram illustrating the calculation of a second matching similarity according to an embodiment of this application;

[0045] Figure 8This is a schematic diagram of another WiFi scanning process provided in an embodiment of this application;

[0046] Figure 9 This is a schematic diagram of the structure of a WiFi scanning device provided in an embodiment of this application;

[0047] Figure 10 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation

[0048] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0049] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0050] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with a user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visual interface elements such as time, date, text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.

[0051] To better understand the embodiments of this application, the communication system involved in the embodiments of this application will be described below:

[0052] The method provided in this application can be applied to various communication systems, such as: wireless local area network (WLAN) communication systems, wireless fidelity (Wi-Fi) systems, multiple-in multiple-out (MIMO) communication systems, long-term evolution (LTE) systems, internet of things (IoT) systems, narrowband internet of things (NB-IoT) systems, LTE frequency division duplex (FDD) systems, LTE time division duplex (TDD) systems, fourth-generation (4G) systems, fifth-generation (5G) systems, or new radio (NR) systems, and other future communication systems, such as sixth-generation (6G) systems. Among these, IoT networks may include, but are not limited to, vehicle-to-everything (V2X) networks. The communication methods in V2X systems can be collectively referred to as vehicle-to-everything (V2X), where X can represent anything. For example, V2X can include vehicle-to-vehicle (V2V) communication, vehicle-to-infrastructure (V2I) communication, vehicle-to-pedestrian (V2P) communication, or vehicle-to-network (V2N) communication. The method provided in this application also supports communication systems that integrate multiple wireless technologies. For example, it can be applied to systems that integrate non-terrestrial networks (NTN) with terrestrial mobile communication networks, such as drones, satellite communication systems, and high-altitude platform station (HAPS) communication. Additionally, it can be applied to low-frequency (sub-6GHz) and high-frequency (above 6GHz) communication scenarios. It is understood that the system architecture described in this application is for the purpose of more clearly illustrating the technical solutions of this application and does not constitute a limitation on the technical solutions provided in this application.

[0053] Specifically, the method provided in this application can be applied to WLAN systems, such as Wireless Fidelity (Wi-Fi). A WiFi system is a technology that uses wireless technology to achieve fast access to Ethernet. It replaces the traditional wired transmission medium with a wireless channel to build a local area network. The main design of a WiFi system is to provide convenient wireless network connectivity, allowing devices to transmit data without physical cables. The method provided in this application can be applied to the Institute of Electrical and Electronics Engineers (IEEE) 802.11 series protocols, such as the 802.11be protocol, the 802.11bn protocol, or next-generation protocols of the 802.11bn protocol, etc., and will not be listed individually.

[0054] Figure 1 This is a schematic diagram of a system architecture applicable to embodiments of this application. The system architecture includes at least one network device and at least one electronic device. Figure 1 The example provided uses electronic device 100 and network device 200. The electronic device can be a cellular phone, smartphone, laptop, handheld communication device, handheld computing device, satellite radio device, global positioning system, personal digital assistant (PDA), and / or any other suitable device for communication over a wireless communication system, and all can connect to the network device. These electronic devices are all capable of communicating with the network device. Of course, Figure 1 The number of electronic and network devices listed is just an example; it could be fewer or more. The following sections will discuss these separately. Figure 1 The electronic and network devices involved in the system architecture are described in detail.

[0055] I. Electronic Equipment

[0056] Electronic device 100, also known as terminal device, user equipment (UE), mobile station, mobile terminal, etc., is a device with wireless transceiver capabilities. Electronic device 100 can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, ultra-mobile personal computer (UMPC), wearable electronic device with wireless communication capabilities (such as a smartwatch), personal digital assistant (PDA), etc., but is not limited to these. Additionally, electronic device 100 is equipped with a display screen and can have pre-installed applications (APPs), etc., which are not limited here. It should be noted that all or part of the functions of the electronic device in this application can also be implemented through software functions running on hardware, or through virtualization functions instantiated on a platform (e.g., a cloud platform). In the embodiments of this application, the device used to implement the functions of the electronic device can be an electronic device itself, or a device capable of supporting the electronic device to implement that function, such as a chip system or a combination of devices or components capable of implementing the functions of the electronic device, which can be installed in the electronic device.

[0057] The hardware structure of electronic device 100 is described below. Please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram of the hardware structure of the electronic device 100 provided in the embodiments of this application.

[0058] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0059] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0060] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0061] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0062] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor 110 retrieves the instructions or data stored in the memory, causing the electronic device 100 to execute the WiFi scanning method performed by the electronic device in the following method embodiments.

[0063] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0064] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0065] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be located in the processor 110.

[0066] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0067] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0068] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0069] A modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor.

[0070] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), BLE broadcasting, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0071] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0072] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0073] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0074] Electronic device 100 can perform shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP processes data fed back from the camera 193. The camera 193 captures still images or video. The digital signal processor processes digital signals, including digital image signals and other digital signals. The video codec compresses or decompresses digital video. Electronic device 100 can support one or more video codecs.

[0075] NPU stands for Neural-Network (NN) Computing Processor. By drawing inspiration from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can quickly process input information and continuously learn on its own.

[0076] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.

[0077] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as a sound playback function), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data), etc. Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as flash memory devices.

[0078] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0079] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0080] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The receiver 170B, also known as a "handpiece," is used to convert audio electrical signals into sound signals. The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones. The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals.

[0081] In some embodiments, a pressure sensor 180A may be disposed on a display screen 194. A gyroscope sensor 180B may be used to determine the motion posture of the electronic device 100. A barometric pressure sensor 180C is used to measure barometric pressure. A magnetic sensor 180D includes a Hall effect sensor. An accelerometer sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally triaxial). A distance sensor 180F is used to measure distance. A proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photodetector. An ambient light sensor 180L is used to sense ambient light intensity. A fingerprint sensor 180H is used to collect fingerprints. A temperature sensor 180J is used to detect temperature. A touch sensor 180K, also called a "touch panel," may be disposed on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also called a "touchscreen." The touch sensor 180K is used to detect touch operations applied to or near it. A bone conduction sensor 180M can acquire vibration signals. Buttons 190 include a power button, volume buttons, etc. A motor 191 can generate vibration feedback. An indicator 192 can be an indicator light, used to indicate charging status, battery level changes, and also to indicate messages, missed calls, notifications, etc. A SIM card interface 195 is used to connect a SIM card.

[0082] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0083] Furthermore, an operating system runs on top of the aforementioned components. Examples include iOS and Android. The operating system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100. It should be noted that although this application embodiment uses the Android system as an example for illustration, its basic principles are equally applicable to electronic devices with other operating systems.

[0084] Figure 3 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application. The software structure adopts a layered architecture, which divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In this embodiment, the operating system (taking the Android system, which runs on an AP as an example) can be divided into six layers, from top to bottom: application layer (APP), application framework layer (FWK), Android runtime and system library, hardware abstraction layer (HAL), kernel layer, and hardware layer.

[0085] The application layer can include a series of application packages. For example... Figure 3 As shown, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, payment, and store services. The application layer can also include the system UI, which displays the electronic device's interface, such as the payment interface or store service interface. For example, when a user arrives at a store, the payment interface or store service interface can be displayed on the electronic device, improving the user experience.

[0086] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 3As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, camera service, etc., and this application embodiment does not impose any limitations on this.

[0087] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0088] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0089] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0090] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0091] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0092] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0093] The camera service is the core process module of the camera framework. It mainly provides API interface functions to the application layer and calls the camera hardware abstraction layer through HIDL (hardware interface definition language).

[0094] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0095] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0096] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0097] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0098] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0099] The media library supports playback and recording of various common audio and video formats, as well as still image files. It also supports multiple audio and video encoding formats.

[0100] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0101] A 2D graphics engine is a graphics engine for 2D drawing.

[0102] The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and the hardware circuitry, its purpose being to abstract the hardware. It hides the platform-specific hardware interface details, providing the operating system with a virtual hardware platform. For example, the HAL encapsulates Linux kernel drivers, providing an interface to the upper layers and shielding them from the implementation details of the lower-level hardware. Figure 3 As shown, the hardware abstraction layer can include Wi-Fi HAL, audio HAL, camera HAL, etc.

[0103] The kernel layer is the layer between hardware and software. It is the core of an operating system, the first layer of software extension based on the hardware, providing the most basic functions of the operating system. It is the foundation for the operating system's operation, responsible for managing system processes, memory, device drivers, files, and network systems, and determining the system's performance and stability. The kernel layer can include display drivers, audio drivers, camera drivers, sensor drivers, etc. Among them, the camera driver is the driver layer for camera devices, mainly responsible for interaction with the hardware.

[0104] The hardware layer includes displays, cameras, sensors, etc.

[0105] II. Network equipment (such as base stations)

[0106] Network device 200 has wireless transceiver capabilities for communicating with electronic devices (also known as terminal devices). Specifically, it can refer to a base station, an evolved NodeB (eNodeB), a transmission reception point (TRP), a next-generation NodeB (gNB) in a 5G mobile communication system, a next-generation eNB (ng-eNB), a next-generation base station in a 6th-generation (6G) mobile communication system, an access network device or module of an access network device in an open RAN (ORAN) system, a base station in a future mobile communication system, or an access node in a WiFi system. Network device can also be a module or unit capable of implementing some of the functions of a base station. For example, network device can be a central unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU), as described below. In the ORAN system, CU can also be called O-CU, DU can also be called open (O)-DU, CU-CP can also be called O-CU-CP, CU-UP can also be called O-CUP-UP, and RU can also be called O-RU. Exemplarily, the base station in this application embodiment can include various forms of base stations, such as: macro base stations, micro base stations (also called small stations), relay stations, access points, next-generation base stations (gNodeB, gNB), transmitting and receiving points (TRP), transmitting points (TP), mobile switching centers, and also devices that perform wireless access functions in D2D, vehicle-to-everything (V2X), machine-to-machine (M2M) communication, and Internet of Things (IoT) communication. Furthermore, in this application, unless otherwise specified, "network device" can refer to the network device itself or a component within the network device, such as a chip system or system-on-a-chip (SOC), which can be installed within the network device. In this embodiment, the chip system may consist of a chip or include chips and other discrete components. In this and subsequent embodiments, only network devices (such as base stations) are used as examples for description.

[0107] To facilitate understanding of the solutions provided in the embodiments of this application, the relevant concepts involved in the embodiments of this application are introduced below:

[0108] 1. Point of Interest (POI)

[0109] Points of Interest (POIs) are typically used to identify objects that occupy a small area. In a Geographic Information System (GIS), a POI can be a building, a shop, a coffee shop, an oil drum, a gas station, a bus stop, etc. A POI can contain basic information such as name, address, category, and location information (e.g., latitude and longitude coordinates). The location information can include only the latitude and longitude coordinates of a single location point, or it can include the latitude and longitude coordinates of a center point and a radius, although this radius is usually very small.

[0110] 2. Crowdsourced data collection

[0111] Crowdsourcing data collection is a method of data collection that utilizes public networks. It involves distributing data collection tasks across a large network, and the resulting data can be called crowdsourced data. Crowdsourcing effectively utilizes public resources, reducing collection costs, improving efficiency, and ensuring high timeliness. For example, real-time traffic information for location maps can be collected through crowdsourcing. Users can upload large amounts of vehicle speed and location information to the backend via location software, allowing the backend to analyze the data and generate comprehensive real-time traffic information.

[0112] 3. WiFi fingerprint

[0113] A WiFi fingerprint consists of several WiFi information items (such as the WiFi basic service set identifier (BSSID), WiFi name (SSID), WiFi signal strength indicator (RSSI), and WiFi latitude and longitude information). One WiFi fingerprint corresponds to one Point of Interest (POI). In this embodiment, it can be understood that the POI includes the WiFi fingerprint. Thus, the WiFi result scanned by the electronic device can be compared with the WiFi fingerprint. When the two are very similar, the electronic device can be considered to be within the POI corresponding to the WiFi fingerprint.

[0114] In a wireless local area network (WLAN), the BSSID stands for Basic Service Set Identifier. It is a unique identifier used to identify the physical address of a wireless access point (AP) or wireless router. The BSSID is composed of the AP's MAC address and the network interface card's MAC address, uniquely identifying a specific wireless access point within a wireless network. BSSIDs are typically represented in hexadecimal, for example, "00:1A:2B:3C:4D:5E". In a wireless network, the BSSID distinguishes different wireless access points, enabling devices to correctly connect to a specific wireless network.

[0115] SSID stands for Service Set Identifier in Wireless Local Area Network (WLAN). It is the name of a wireless network used to identify a specific wireless network. The SSID is set by the network administrator on the wireless router or wireless access point, and users can find and connect to a specific SSID by searching for available wireless networks. The SSID is typically a human-readable string, such as "MyWiFiNetwork". In a wireless network, the SSID is used to distinguish different wireless networks so that users can select and connect to the wireless network they want.

[0116] RSSI, also known as Received Signal Strength Indicator, is a measurement unit used to indicate the strength of received electromagnetic wave signals. It measures the strength of wireless signals (i.e., a metric for wireless signal strength), thus allowing for better assessment of the signal source's location. RSSI is a number between 0 and -120 dBm. A higher RSSI value indicates a stronger signal and better signal reception. Conversely, a lower RSSI value indicates a weaker signal and increased susceptibility to interference.

[0117] 4. Cell

[0118] Taking a base station as an example, a base station (cell tower) is a device in a mobile communication network used to provide wireless communication services. It is a fixed wireless communication facility used to provide signal coverage and communication connectivity to mobile devices. A base station typically consists of an antenna, transmitter, receiver, and related equipment for wireless communication with mobile devices. The coverage area of ​​a base station is divided into multiple cells, each covered by one base station. Therefore, a base station is also called a cell base station. Mobile devices in a mobile communication network communicate with base stations to perform functions such as voice calls, SMS transmission, and data transmission. Base stations play a crucial role in mobile communication networks; they constitute the infrastructure of mobile communication networks and provide mobile communication services to users.

[0119] A cell, also known as a cellular unit, refers to the area covered by a base station in a cellular mobile communication system. Within this area, mobile stations can communicate wirelessly with the base station. Cell handover, on the other hand, refers to the process in a wireless communication system where, when a mobile station moves from one cell (referring to a base station or its coverage area) to another, the connected base station needs to be switched to maintain uninterrupted communication for the mobile user.

[0120] 5. Geographic fence

[0121] With the development of internet technology, service providers can generate geofences for specific areas based on crowdsourced data from user requests for services. A geofence is essentially a virtual fence defining a virtual geographical boundary, an application of location-based services (LBS). A geofence typically corresponds to a Point of Interest (POI). When an electronic device enters or leaves a specific geographical area, or moves within that area, it can receive corresponding service requests. A geofence can consist of base station information, Wi-Fi information, latitude and longitude information, etc.

[0122] Currently, there are three main types of geofencing solutions: cell fencing, passive WiFi fencing, and active WiFi fencing. As shown in Table 1, different types of geofencing have their own advantages and disadvantages. Among them, active WiFi fencing has high positioning accuracy and low latency, making it suitable for in-store services. This application embodiment mainly uses active WiFi fencing for illustration.

[0123] Table 1

[0124]

[0125] Taking a geofencing mechanism, specifically an active WiFi geofencing mechanism, as an example, crowdsourced data on user payment transactions can be collected to generate a geofencing for a specific store's Point of Interest (POI) (also known as a payment geofencing). Once a user's electronic device connects to the base station corresponding to this payment geofencing, a continuous WiFi scan is performed to determine if the device is within a given POI. When the WiFi scan result matches a WiFi fingerprint within the POI, it's considered that the user has entered the store, and appropriate in-store services (such as payment services, product recommendations, or information) can be recommended.

[0126] like Figure 4 As shown, before a user enters store A, their phone displays... Figure 4 The user interface shown in (a) includes various applications (APPs), and the first APP recommended in the recommendation bar of the user interface is file application 10.

[0127] When the phone connects to the base station of the community where store A is located, the phone will continuously scan for WiFi. When the WiFi scan result matches the WiFi fingerprint corresponding to store A, it can be determined that the phone is inside store A, that is, the user has entered store A, and the phone will display [the relevant information]. Figure 4 The user interface shown in (b) is now configured so that the first recommended app in the recommendation bar is the service application 11 of store A. Users can quickly access the in-store service interface by clicking on the service application 11 of store A. Figure 4 The in-store service interface shown in (c) is an example of the in-store service interface. This interface includes in-store services for store A, such as home delivery, in-store pickup, online store, store information, and member center, realizing the function of quick business through scene recognition. After the user leaves store A, the phone displays... Figure 4 The user interface shown in (d) has its first recommended app in the recommendation bar reverted to File Application 10.

[0128] However, the current WiFi scanning process only supports the 2.4GHz band. In real-world scenarios, this can easily lead to inaccurate scanning results (for example, some WiFi networks on other frequency bands may be missed, resulting in them being missed in recall). Inaccurate WiFi scanning results can prevent accurate identification of whether a user has entered a store's Point of Interest (POI), thus affecting the timeliness of recommendation services. Therefore, improving the accuracy of WiFi scanning results is a pressing issue that needs to be addressed.

[0129] Therefore, in order to effectively perform WiFi scanning, improve the accuracy of WiFi scanning results, and thus more accurately identify whether a user has entered a store's Point of Interest (POI) and ensure the timeliness of recommendation services, this application provides a WiFi scanning method and electronic device. The WiFi scanning method and electronic device provided in this application are further described in detail below.

[0130] Figure 5 This is a flowchart illustrating a WiFi scanning method provided in an embodiment of this application. Figure 5 As shown, the WiFi scanning method includes the following steps S501 to S505. Figure 5 The method shown can be implemented by the aforementioned electronic device. Alternatively, Figure 5 The method shown can be executed by a chip in an electronic device, but this application does not limit the implementation. Figure 5 The method will be explained using an electronic device as the executing entity.

[0131] It should be noted that the method executed by the electronic device in this application can also be implemented by the communication / processing module in the electronic device or the circuit or chip responsible for communication / processing functions in the electronic device (such as a modem chip (also known as a baseband chip), or a SoC chip / SIP chip containing a modem core, or a GPU / AI processor / ASIC).

[0132] S501. When the user's electronic device is in the first cell and the first cell contains the first POI, the electronic device obtains the user's motion state.

[0133] S502, When the movement state is walking, the electronic device starts WiFi scanning of the first frequency band and obtains the first WiFi scan result.

[0134] In this embodiment, taking a first cell as an example, when a user's electronic device connects to the base station of the first cell, it can be considered that the user has entered the geofence (i.e., cell fence) of the first cell, and at this time, the user's electronic device is in the first cell. In order to further determine whether the user has entered a certain store POI (taking the first POI as an example) contained in the first cell, the electronic device first needs to obtain the user's motion state. Specifically, the electronic device can use certain system processes to obtain the user's motion state, or it can use other methods to obtain the user's current motion state, which is not limited here. Among them, the system processes mentioned here can provide the electronic device with various state detection capabilities. For example, state detection can include: the motion state of the electronic device, the stationary state of the electronic device, the motion state of the user using the electronic device (including walking, running, cycling, riding in a car, etc.), and various states such as elevators.

[0135] When a user is walking, it can be assumed that the user has a possibility of entering the first Point of Interest (POI), at which point the electronic device will actively initiate WiFi scanning. In real-world scenarios, WiFi operates on different frequency bands, such as WiFi operating on the 2.4GHz band and WiFi operating on the 5GHz band. Therefore, in order to improve the accuracy of WiFi scanning results and avoid reduced matching accuracy and missed WiFi scans due to limitations in scanning frequency bands, this embodiment of the application employs a multi-band WiFi scanning method.

[0136] For example, an electronic device can perform WiFi scanning in a first frequency band or in a second frequency band.

[0137] Optionally, the first frequency band is the 2.4 GHz band, and the second frequency band is the 5 GHz band.

[0138] Optionally, the first frequency band is less than the second frequency band.

[0139] Optionally, the number of WiFi networks operating in the first frequency band is greater than the number of WiFi networks operating in the second frequency band.

[0140] Taking the first frequency band as 2.4G and the second frequency band as 5G as an example, when the user is walking, the electronic device will prioritize the 2.4G frequency band WiFi scan (which can be considered as a low-frequency WiFi scan of the 2.4G frequency band) in order to save power and obtain the first WiFi scan result.

[0141] The first WiFi scan result can be considered a WiFi scan list, which includes information on one or more WiFi access points obtained by an electronic device scanning a first frequency band. In this embodiment, the WiFi access point information includes at least one of the following: BSSID and RSSI. Alternatively, the first WiFi scan result can be understood as including at least one of the following: BSSID and RSSI.

[0142] Specifically, such as Figure 6A As shown, electronic devices can use mobile communication modules to monitor cell handovers. When a cell handover occurs, the mobile communication module reports the identifier of the cell the electronic device is currently in. For example, if an electronic device hands over from another cell to the first cell and connects to the base station of the first cell, the mobile communication module will report the identifier of that first cell.

[0143] The electronic device can retrieve the corresponding cell information from the database based on the identifier of the first cell. This cell information may include identifiers for various Points of Interest (POIs). Assuming the current service of interest is the first POI, the electronic device needs to determine whether the cell information corresponding to the first cell contains the identifier for that first POI. If the cell information corresponding to the first cell contains the identifier for the first POI, then the user's electronic device is considered to be located in a cell containing the first POI.

[0144] Furthermore, the electronic device determines the user's current movement state. Specifically, it can utilize the MSDP service to obtain the user's current movement state, or other methods can be used; no limitation is made here. Only when the user's movement state is walking can it be considered that the user has the potential to enter the first POI. At this point, the electronic device will initiate a 2.4GHz band (i.e., the first band) WiFi scan and obtain the first WiFi scan result. This method avoids unnecessary WiFi scanning operations that could lead to excessive power consumption.

[0145] S503, the electronic device calculates the first matching similarity between the first WiFi scan result and the first WiFi fingerprint, wherein the first WiFi fingerprint is the WiFi fingerprint corresponding to the first POI for the first frequency band.

[0146] In this embodiment of the application, the electronic device may pre-store the WiFi fingerprint corresponding to the first POI. Here, the WiFi fingerprint corresponding to the first POI can also be understood as the WiFi fingerprint included within the geofence corresponding to the first POI.

[0147] The WiFi fingerprint corresponding to the first POI can be further divided into WiFi fingerprints for different frequency bands. Taking the first WiFi fingerprint and the second WiFi fingerprint as examples, assuming the first frequency band is the 2.4G band and the second frequency band is the 5G band, the first WiFi fingerprint can be considered as the WiFi fingerprint corresponding to the first POI for the 2.4G band, and the second WiFi fingerprint can be considered as the WiFi fingerprint corresponding to the first POI for the 5G band.

[0148] The first and second WiFi fingerprints can also be considered as WiFi scan lists, which also include at least one of the following: BSSID, RSSI.

[0149] After the electronic device performs a WiFi scan on the first frequency band and obtains the first WiFi scan result, it calculates the first matching similarity between the first WiFi scan result and the first WiFi fingerprint. For example... Figure 6B As shown, it can be simply understood as using a WiFi list matching algorithm to calculate the matching score between the first WiFi scan result (including BSSID and RSSI) and the first WiFi fingerprint (including BSSID and RSSI), which is the first matching similarity.

[0150] The specific implementation process of the WiFi list matching algorithm can be as follows: calculate the similarity between the first WiFi scan result and the RSSI corresponding to the same BSSID in the first WiFi fingerprint; then, calculate the sum of the similarities between the first WiFi scan result and the RSSI corresponding to each of the same BSSIDs in the first WiFi fingerprint to obtain the first matching similarity between the first WiFi scan result and the first WiFi fingerprint.

[0151] This can be understood as follows: for the first WiFi scan result and the first WiFi fingerprint, the fewer identical BSSIDs they share, the lower the probability that the first WiFi scan result and the first WiFi fingerprint were scanned and collected in the same indoor location or in two indoor locations that are close to each other. In other words, the first WiFi scan result and the first WiFi fingerprint fail to match, and it can be assumed that the user has not entered the first POI. Conversely, the more identical BSSIDs the first WiFi scan result and the first WiFi fingerprint share, the higher the probability that the first WiFi scan result and the first WiFi fingerprint were scanned and collected in the same indoor location or in two indoor locations that are close to each other. In other words, the first WiFi scan result and the first WiFi fingerprint successfully match, and it can be assumed that the user has entered the first POI.

[0152] Therefore, the first matching similarity between the first WiFi scan result and the first WiFi fingerprint in this embodiment can depend on the similarity between the first WiFi scan result and the RSSI corresponding to the same BSSID in the first WiFi fingerprint. Furthermore, the more identical BSSIDs there are between the first WiFi scan result and the first WiFi fingerprint, and the higher the similarity of the RSSI corresponding to the same BSSID, the higher the matching similarity between the first WiFi scan result and the first WiFi fingerprint will be.

[0153] For example, with Figure 6C Taking the first WiFi scan result and the first WiFi fingerprint as examples, the same BSSID for the first WiFi scan result and the first WiFi fingerprint includes: “04:d3:b5:b7:37:d4”, “1c:28:af:9c:82:a2”, and “1c:28:af:9c:82:a4”.

[0154] The electronic device first needs to calculate the similarity between the two RSSIs corresponding to "04:d3:b5:b7:37:d4" (hereinafter referred to as the first similarity), the similarity between the two RSSIs corresponding to "1c:28:af:9c:82:a2" (hereinafter referred to as the second similarity), and the similarity between the two RSSIs corresponding to "1c:28:af:9c:82:a4" (hereinafter referred to as the third similarity). Then, the electronic device will sum the above first, second, and third similarities. The sum of the similarities is the first matching similarity between the first WiFi scan result and the first WiFi fingerprint.

[0155] Specifically, the electronic device first calculates a first signal strength difference based on the first difference of RSSI corresponding to the same BSSID. Simultaneously, the electronic device calculates a first signal strength weight based on any RSSI corresponding to the same BSSID.

[0156] In some embodiments, the first signal strength difference can be calculated using the following formula (1).

[0157]

[0158] Where q(x) i,b ,x j,b ) represents the first signal strength difference of RSSI corresponding to the same BSSID, x i,b This indicates the RSSI corresponding to BSSID b in the WiFi scan results (such as the first WiFi scan result); x j,b This represents the RSSI corresponding to BSSID b in a WiFi fingerprint (such as the first WiFi fingerprint); k q and d q k is a preset parameter. q =0.052160; d q =0.2;Ⅱ(x) i,b <x j,b () represents an indicator function, which is triggered when the input condition x is met. i,b <x j,b When true, the function value is 1; otherwise, the function value is 0. According to the formula for calculating the first signal strength difference, the first difference |x| between RSSIs corresponding to the same BSSID is... i,b -x j,b The larger | is, the greater the difference in the first signal strength q(x) i,b ,x j,b The smaller the value, the better. Therefore, the first signal strength difference is negatively correlated with the first difference value.

[0159] In some embodiments, the first signal strength weight can be calculated using the following formula (2):

[0160]

[0161] Where p(x) represents the first signal strength weight of any RSSI corresponding to the same BSSID, x = x i,b or x j,b Therefore, p(x) = p(x) i,b ) or p(x j,b ), p(x i,b ) represents the first signal strength weight of the RSSI corresponding to BSSID b in the WiFi scan results (such as the first WiFi scan result), p(x j,b ) represents the first signal strength weight of the RSSI corresponding to BSSID b in the WiFi fingerprint (such as the first WiFi fingerprint); k p and b p k is a preset parameter. p =0.130401; b p= -65.

[0162] According to the formula for calculating the first signal strength weight, the larger the RSSI (i.e., x...), the more... i,b or x j,b The larger the value, the greater the weight of the first signal strength (i.e., p(x)). i,b ) or p(x j,b The larger the value, the greater the weight of the first signal strength. Therefore, the first signal strength weight is positively correlated with RSSI.

[0163] In the embodiments of this application, k q d q k p and b p The fixed values ​​of these four preset parameters are determined based on actual needs. They are obtained by substituting multiple sets of different preset values ​​into the experimental calculations and then determining the effects presented by the different calculation results corresponding to different values.

[0164] After the electronic device calculates the first signal strength difference and the first signal strength weight of the RSSI corresponding to the same BSSID in the first WiFi fingerprint, it calculates the similarity between the first WiFi scan result and the RSSI corresponding to the same BSSID in the first WiFi fingerprint based on the first signal strength difference and the first signal strength weight.

[0165] Specifically, the electronic device first calculates the difference between any RSSI corresponding to the same BSSID and a preset RSSI to obtain a second difference. Then, a second signal strength difference is calculated based on the second difference. The product of the difference between the first and second signal strength differences and the first signal strength weight is used as the similarity of the RSSIs corresponding to the same BSSID. The preset RSSI is a pre-defined RSSI used for signal strength comparison and can be set according to actual needs and experience. In this embodiment, the preset RSSI = -105.

[0166] In some embodiments, the similarity of RSSIs corresponding to the same BSSID can be calculated using the following formula (3):

[0167] p(x)(q(x i,b ,x j,b )-q(x,c x ))(3)

[0168] Where p(x) represents the first signal strength weight of any RSSI corresponding to the same BSSID, including p(x) i,b ) or p(x j,b );q(x i,b ,x j,b ) represents the first signal strength difference of RSSI corresponding to the same BSSID; q(x,cx ) represents the second signal strength difference of any RSSI corresponding to the same BSSID, including q(x i,b ,c x ) or q(x j,b ,c x ), cx represents the default RSSI.

[0169] After calculating the similarity between the first WiFi scan result and the RSSI corresponding to all the same BSSID in the first WiFi fingerprint according to the above formula (3), the electronic device sums the similarity of the RSSI corresponding to all the same BSSID to obtain the matching similarity between the first WiFi scan result and the first WiFi fingerprint.

[0170] Of course, electronic devices can also upload the acquired first WiFi scan result to a cloud device. The cloud device then calculates the first matching similarity between the first WiFi scan result and the first WiFi fingerprint, and sends this first matching similarity to the electronic device. Here, the cloud device can be understood as the server-side component of the electronic device, such as a cloud server. It primarily generates geofences corresponding to POIs based on the Wi-Fi data uploaded by the electronic device and stores the WiFi fingerprints corresponding to the POIs. Simultaneously, the cloud device possesses large data storage and processing capabilities, enabling it to manage and update all geofences. This approach helps reduce the computational burden on the electronic device.

[0171] It should be noted that electronic devices may also use other methods (such as the Bhattacharyya coefficient (BC) algorithm, cosine similarity algorithm, etc.) to calculate the first matching similarity between the first WiFi scan result and the first WiFi fingerprint, which is not limited here.

[0172] S504. If the first matching similarity is less than the first threshold and the first matching similarity is greater than or equal to the second threshold, the electronic device starts WiFi scanning of the second frequency band and obtains the second WiFi scanning result.

[0173] In one possible implementation, the method further includes: if the first matching similarity is greater than or equal to a first threshold value, the electronic device stops WiFi scanning of the first frequency band and determines that the user has entered the first POI.

[0174] In one possible implementation, the method further includes: if the first matching similarity is less than a first threshold and the first matching similarity is less than a second threshold, the electronic device continues WiFi scanning of the first frequency band.

[0175] In this embodiment of the application, after the electronic device calculates the first matching similarity, it further determines the relationship between the first matching similarity and the first threshold value. Here, the first threshold value can be considered as a preset value.

[0176] If the first matching similarity is greater than or equal to the first threshold value, the first WiFi scan result is considered to have successfully matched the first WiFi fingerprint. At this time, the electronic device can stop WiFi scanning on the first frequency band, and it can be considered that the user has entered the first POI. The device can then recommend corresponding in-store services to the user (such as payment services, product recommendations, information, etc. for the store).

[0177] If the first match similarity is less than the first threshold, the relationship between the first match similarity and the second threshold will be further determined. Here, the second threshold can also be considered a preset value.

[0178] If the first matching similarity is greater than or equal to the second threshold, it is considered that the reduced matching accuracy may be due to limitations in the scanning frequency band. Therefore, the electronic device will activate a WiFi scan in the second frequency band and obtain a second WiFi scan result. The second threshold is less than the first threshold. This second WiFi scan result can also be considered a WiFi scan list, which includes information on one or more WiFi access points obtained by the electronic device from a single scan of the second frequency band. In this embodiment, the WiFi access point information includes at least one of the following: BSSID and RSSI. Alternatively, the second WiFi scan result can be understood to include at least one of the following: BSSID and RSSI.

[0179] If the first matching similarity is less than the second threshold, it is considered that the reduced matching accuracy is not due to the limitation of the scanning frequency band, but rather that the WiFi scanning degree of the current frequency band (i.e., the first frequency band) is insufficient. In this case, the electronic device can continue WiFi scanning of the first frequency band to ensure the reliability and accuracy of the WiFi scanning results.

[0180] S505. The electronic device determines whether the user has entered the first POI based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint. The second WiFi fingerprint is the WiFi fingerprint of the first POI corresponding to the second frequency band.

[0181] In this embodiment, the electronic device further determines whether the user has entered the first POI based on the first matching similarity, the second WiFi scan for the second frequency band, and the second WiFi fingerprint of the first POI corresponding to the second frequency band, thereby ensuring the timeliness of the recommendation service. Taking the second frequency band as a 5G frequency band as an example, the second WiFi fingerprint can be the WiFi fingerprint of the first POI corresponding to the 5G frequency band, and also includes at least one of the following: BSSID and RSSI.

[0182] In one possible implementation, when the electronic device determines whether a user has entered a first POI based on a first matching similarity, a second WiFi scan result, and a second WiFi fingerprint, the specific implementation may include the following steps s11 and s12, such as... Figure 7A As shown.

[0183] s11. The electronic device determines the second matching similarity based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint.

[0184] Optionally, when the electronic device determines the second matching similarity based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint, the specific implementation may include the following steps s21 and s22, such as... Figure 7B As shown.

[0185] s21. The electronic device calculates the third matching similarity between the second WiFi scan result and the second WiFi fingerprint.

[0186] Specifically, the electronic device calculates a third matching similarity between the second WiFi scan result and the second WiFi fingerprint, such as... Figure 7C As shown, this can be simply understood as using a WiFi list matching algorithm to calculate the matching score between the second WiFi scan result (including BSSID and RSSI) and the second WiFi fingerprint (including BSSID and RSSI), which is the third matching similarity. The specific implementation method can be found in step S503 above, and will not be elaborated upon here.

[0187] Optionally, taking a 2.4GHz band as the first frequency band and a 5GHz band as the second frequency band as an example, the number of WiFi networks operating in the first frequency band is greater than the number operating in the second frequency band. This can be understood as the WiFi network operating in the second frequency band having a smaller range. Therefore, the calculated third matching similarity will be more accurate. Thus, when calculating the third matching similarity, a higher score weight can be given to WiFi networks operating in the 5GHz band (i.e., the second frequency band). Therefore, when calculating the third matching similarity using formulas (1), (2), and (3), k can be adjusted. q d q kp and b p These four preset parameters allow 5G band (i.e., the second band) WiFi to have a higher score weight.

[0188] Of course, electronic devices can also upload the acquired second WiFi scan results to a cloud device. The cloud device then calculates the third matching similarity between the second WiFi scan result and the second WiFi fingerprint, and sends this third matching similarity to the electronic device. Here, the cloud device can be understood as the server-side component of the electronic device, such as a cloud server. It primarily generates geofences corresponding to POIs based on the Wi-Fi data uploaded by the electronic device and stores the WiFi fingerprints corresponding to the POIs. Simultaneously, the cloud device possesses large data storage and processing capabilities, enabling it to manage and update all geofences. This approach helps reduce the computational burden on the electronic device.

[0189] It should be noted that electronic devices can also use other methods (such as the Bach coefficient (BC) algorithm, cosine similarity algorithm, etc.) to calculate the third matching similarity between the second WiFi scan result and the second WiFi fingerprint, which is not limited here.

[0190] s22. The electronic device obtains a second matching similarity based on the first matching similarity and the third matching similarity.

[0191] For example, such as Figure 7D As shown, in step S503, the electronic device previously used a WiFi list matching algorithm to calculate the matching score between the first WiFi scan result (including BSSID and RSSI) and the first WiFi fingerprint (including BSSID and RSSI), i.e., the first matching similarity. Now, the electronic device again uses the WiFi list matching algorithm to calculate the matching score between the second WiFi scan result (including BSSID and RSSI) and the second WiFi fingerprint (including BSSID and RSSI), i.e., the third matching similarity. Then, the matching scores of both are used to determine the final second matching similarity (for example, by weighting and summing the first and third matching similarities). This determined second matching similarity incorporates considerations of both the first and third matching similarities for the first frequency band, allowing for a more accurate assessment of the matching degree between the current WiFi scan result and the WiFi fingerprint. This helps to more accurately determine whether a user has entered the first POI, thereby ensuring the timeliness of the recommendation service.

[0192] Optionally, when the electronic device obtains the second matching similarity based on the first matching similarity and the third matching similarity, the specific implementation method may be: the electronic device performs a weighted sum calculation on the first matching similarity and the third matching similarity to obtain the second matching similarity; the first weight value corresponding to the first matching similarity is less than the second weight value corresponding to the third matching similarity.

[0193] Taking a 2.4GHz band as the first frequency band and a 5GHz band as the second, the number of WiFi networks operating in the first band is greater than that in the second band. This can be understood as the WiFi range operating in the second band being smaller. Therefore, the calculated third matching similarity will be more accurate. Thus, when weighting the first and third matching similarities, a higher weight can be assigned to the third matching similarity; that is, the first weight value corresponding to the first matching similarity can be less than the second weight value corresponding to the third matching similarity. In this way, the matching degree between the current WiFi scan result and the WiFi fingerprint can be determined more accurately, which helps to more accurately determine whether a user has entered the first POI, thereby ensuring the timeliness of the recommendation service.

[0194] For example, suppose the first weight value corresponding to the first matching similarity is 0.4, the second weight value corresponding to the third matching similarity is 0.6, the first matching similarity is 1.24, and the third matching similarity is 1.4; by weighting the first matching similarity and the third matching similarity, the second matching similarity is calculated to be 1.336.

[0195] s12. If the second matching similarity is greater than or equal to the third threshold, the electronic device determines that the user has entered the first POI.

[0196] Optionally, the method further includes: if the second matching similarity is greater than or equal to a third threshold value, the electronic device stops WiFi scanning of the first frequency band and WiFi scanning of the second frequency band.

[0197] Optionally, the method further includes: if the second matching similarity is less than the third threshold, the electronic device stops WiFi scanning of the second frequency band and continues WiFi scanning of the first frequency band.

[0198] Specifically, after calculating the second matching similarity, the electronic device will further determine the relationship between the second matching similarity and the third threshold value. Here, the third threshold value can be considered as a preset value.

[0199] If the second matching similarity is greater than or equal to the third threshold, it is considered that the first WiFi scan result matches the first WiFi fingerprint and the second WiFi scan result matches the second WiFi fingerprint. At this time, the electronic device can stop WiFi scanning on the first frequency band and WiFi scanning on the second frequency band. It can be considered that the user has entered the first POI, and the corresponding in-store services (such as payment services, product recommendations, information, etc. for the store) can be recommended to the user.

[0200] If the second matching similarity is less than the third threshold, it is considered that the WiFi scanning of the second frequency band has been increased, which has actually reduced the matching similarity. In this case, the electronic device needs to turn off or stop the WiFi scanning of the second frequency band and continue the WiFi scanning of the first frequency band to save power.

[0201] Based on the above, the following specific example will be used to illustrate the WiFi scanning method as a whole:

[0202] like Figure 8 As shown, taking the first cell as an example, when a user's electronic device connects to the base station of a cell (such as the first cell), it can be considered that the user has entered the geofence (i.e., cell fence) of the first cell, and at this time, the user's electronic device is in the first cell. When the user's movement state is walking (specifically, the user's movement state can be obtained using the MSDP service), it can be considered that the user has the possibility of entering the first POI. In order to save power, the electronic device will actively prioritize starting WiFi scanning (low frequency) on the 2.4G band (i.e., the first band) and obtain the first WiFi scan result. Among them, the first WiFi scan result includes at least one of the following: BSSID, RSSI.

[0203] Furthermore, the matching score (i.e., the first matching similarity) between the first WiFi scan result and the first WiFi fingerprint is calculated. Here, the first WiFi fingerprint refers to the WiFi fingerprint corresponding to the first POI for the 2.4G frequency band, and also includes at least one of the following: BSSID and RSSI.

[0204] (1) If the matching score between the first WiFi scan result and the first WiFi fingerprint is greater than or equal to the first threshold value, it is considered that the first WiFi scan result and the first WiFi fingerprint are successfully matched. At this time, the electronic device can stop the WiFi scan of the 2.4G band and it can be considered that the user has entered the first POI. The corresponding in-store services (such as payment services, product recommendations, information, etc. for the store) can be recommended to the user.

[0205] (2) If the matching score between the first WiFi scan result and the first WiFi fingerprint is less than the first threshold, the relationship between the first matching similarity and the second threshold will be further determined. The second threshold is less than the first threshold.

[0206] A. If the first matching similarity is greater than or equal to the second threshold, it is considered that the reduced matching accuracy may be due to limitations in the scanning frequency band. Therefore, the electronic device will activate WiFi scanning on the 5G frequency band and obtain the second WiFi scan result. The second WiFi scan result includes at least one of the following: BSSID and RSSI.

[0207] Furthermore, the electronic device calculates the matching score (i.e., the third matching similarity) between the second WiFi scan result and the second WiFi fingerprint. Then, it performs a weighted sum of the first and third matching similarities to obtain the second matching similarity. The first weight value corresponding to the first matching similarity is less than the second weight value corresponding to the third matching similarity. The relationship between the second matching similarity and the third threshold value is further determined.

[0208] If the second matching similarity is greater than or equal to the third threshold, it is considered that the first WiFi scan result matches the first WiFi fingerprint and the second WiFi scan result matches the second WiFi fingerprint. At this time, the electronic device can stop WiFi scanning on the first frequency band and WiFi scanning on the second frequency band. It can be considered that the user has entered the first POI, and the corresponding in-store services (such as payment services, product recommendations, information, etc. for the store) can be recommended to the user.

[0209] If the second matching similarity is less than the third threshold, it is considered that the WiFi scanning of the second frequency band has been increased, which has actually reduced the matching similarity. In this case, the electronic device needs to turn off or stop the WiFi scanning of the second frequency band and continue the WiFi scanning of the first frequency band to save power.

[0210] B. If the first matching similarity is less than the second threshold, it is considered that the reduced matching accuracy is not due to the limitation of the scanning frequency band, but rather that the WiFi scanning degree of the current frequency band (i.e., the 2.4G frequency band) is insufficient. In this case, the electronic device can continue to scan for WiFi in the 2.4G frequency band to ensure the reliability and accuracy of the WiFi scanning results.

[0211] Alternatively, in one possible implementation, while the electronic device continues scanning for WiFi on the first frequency band, it can automatically pause the scan after a first preset duration, at which point it can be assumed that the user has not entered the first Point of Interest (POI). Of course, the scan can be restarted later. This method helps save power consumption.

[0212] It can be seen that, based on Figure 5 The described method uses Points of Interest (POIs) to identify objects with a small footprint. In a geographic information system (GIS), a POI can be a building, a shop, a coffee shop, an oil drum, a gas station, a bus stop, etc. Taking a shop POI as an example, assuming a first cell contains a certain POI (which can be called the first POI), when a user enters the geofence (cell fence) of the first cell and is walking, the electronic device can use a multi-band (first band (e.g., 2.4 GHz) and second band (e.g., 5 GHz)) WiFi scanning method to perform WiFi scanning. Different frequency bands can be activated under different conditions. Specifically, when the user is walking, it can be considered that the user has the possibility of entering the first POI. To save power, the electronic device will actively prioritize activating the first band (e.g., 2.4 GHz) WiFi scanning and obtain the first WiFi scan result. Then, a WiFi list matching algorithm is used to calculate the matching score between the first WiFi scan result (including BSSID and RSSI) and the first WiFi fingerprint (including BSSID and RSSI), i.e., the first matching similarity. If the first match similarity is less than a first threshold and greater than or equal to a second threshold, it is assumed that the reduced matching accuracy may be due to limitations in the scanning frequency band. Therefore, the electronic device will further activate a second frequency band (such as the 5G band) for WiFi scanning and obtain the second WiFi scan results. Then, based on the first match similarity, the second WiFi scan results, and the second WiFi fingerprint, it can be determined whether the user has entered the first POI. This method avoids situations where reduced matching accuracy or missed WiFi scans are caused by limitations in the scanning frequency band, thereby improving the accuracy of WiFi scan results and more accurately identifying whether a user has entered the store POI (i.e., the first POI), ensuring the timeliness of the recommendation service.

[0213] The apparatus provided in the embodiments of this application will be described below.

[0214] This application divides the device into functional modules according to the above method embodiments. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application is illustrative and only represents one logical functional division; other division methods may be used in actual implementation. The following will combine... Figure 9 and Figure 10 The apparatus of the embodiments of this application is described in detail.

[0215] Please see Figure 9 , Figure 9 A schematic diagram of the structure of a WiFi scanning device 900 according to an embodiment of this application is shown. Figure 9 The WiFi scanning device shown can be an electronic device, a device within an electronic device, or a device that can be used in conjunction with an electronic device. Figure 9 The WiFi scanning device shown may include an acquisition unit 901, a scanning unit 902, and a processing unit 903. Wherein:

[0216] The acquisition unit 901 is used to acquire the motion state of the user when the user's electronic device is in the first cell and the first cell contains the first POI;

[0217] The scanning unit 902 is used to activate WiFi scanning of the first frequency band and obtain the first WiFi scanning result when the movement state is walking.

[0218] Processing unit 903 is used to calculate a first matching similarity between the first WiFi scan result and the first WiFi fingerprint, wherein the first WiFi fingerprint is the WiFi fingerprint corresponding to the first POI for the first frequency band;

[0219] The scanning unit 902 is also used to start WiFi scanning of the second frequency band and obtain the second WiFi scanning result when the first matching similarity is less than the first threshold value and the first matching similarity is greater than or equal to the second threshold value.

[0220] The processing unit 903 is further configured to determine whether the user has entered the first POI based on the first matching similarity, the second WiFi scanning result, and the second WiFi fingerprint, wherein the second WiFi fingerprint is the WiFi fingerprint of the first POI for the second frequency band.

[0221] In one possible implementation, when determining whether a user has entered a first POI based on a first matching similarity, a second WiFi scan result, and a second WiFi fingerprint, the processing unit 903 is specifically used to: determine a second matching similarity based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint; and determine that the user has entered the first POI if the second matching similarity is greater than or equal to a third threshold value.

[0222] In one possible implementation, the scanning unit 902 is further configured to: stop WiFi scanning of the first frequency band and WiFi scanning of the second frequency band when the second matching similarity is greater than or equal to a third threshold value.

[0223] In one possible implementation, the scanning unit 902 is further configured to: if the second matching similarity is less than the third threshold value, the electronic device stops WiFi scanning of the second frequency band and continues WiFi scanning of the first frequency band.

[0224] In one possible implementation, when determining the second matching similarity based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint, the processing unit 903 is specifically used to: calculate the third matching similarity between the second WiFi scan result and the second WiFi fingerprint; and obtain the second matching similarity based on the first matching similarity and the third matching similarity.

[0225] In one possible implementation, when obtaining the second matching similarity based on the first matching similarity and the third matching similarity, the processing unit 903 is specifically used to: perform a weighted sum calculation on the first matching similarity and the third matching similarity to obtain the second matching similarity; the first weight value corresponding to the first matching similarity is less than the second weight value corresponding to the third matching similarity.

[0226] In one possible implementation, the number of WiFi networks operating in the first frequency band is greater than the number of WiFi networks operating in the second frequency band.

[0227] In one possible implementation, the scanning unit 902 is further configured to: if the first matching similarity is greater than or equal to a first threshold value, the electronic device stops WiFi scanning of the first frequency band and determines that the user has entered the first POI.

[0228] In one possible implementation, the scanning unit 902 is further configured to: when the first matching similarity is less than a first threshold and the first matching similarity is less than a second threshold, the electronic device continues WiFi scanning of the first frequency band.

[0229] In one possible implementation, in the above embodiments, the WiFi scanning device may further include a storage unit, which can be used to store instructions and / or data. The processing unit 903 can read the instructions and / or data from the storage unit to enable the device to implement the aforementioned method embodiments. For example, the storage unit may also store the WiFi scanning results, WiFi fingerprints, etc., as shown above.

[0230] For detailed explanations of terms or steps such as POI, WiFi fingerprint, geofence, BSSID, SSID, and RSSI in the various embodiments described above, please refer to the descriptions in the method embodiments above. They will not be detailed here. In the embodiments of this application, a unit may also be referred to as a "module".

[0231] The specific descriptions of the units shown in the above embodiments are merely examples. For the specific functions or execution steps of each unit, please refer to the above method embodiments, which will not be described in detail here.

[0232] The apparatus of the embodiments of this application has been described above. The possible product forms of the described apparatus are described below. Any device possessing the above-described features... Figure 9 Any form of product that incorporates the functionality of the described device falls within the protection scope of the embodiments of this application. The following description is merely illustrative and does not limit the product form of the device in the embodiments of this application to this specific example.

[0233] For cases where the WiFi scanning device can be a chip or a chip system, please refer to [link / reference]. Figure 10 The diagram shows the structure of the chip. Figure 10 The chip 1000 shown includes a processor 1001 and an interface 1002. Optionally, it may also include a memory 1003. The number of processors 1001 can be one or more, and the number of interfaces 1002 can be multiple.

[0234] For cases where the chip is used to implement the electronic device in the embodiments of this application:

[0235] The interface 1002 is used to receive or output signals;

[0236] The processor 1001 is used to perform data processing operations of the electronic device.

[0237] In this embodiment, the processor and the interface can also be coupled to each other. The specific connection method between the processor and the interface is not limited in this embodiment. Furthermore, the router networking device can also be a logic circuit, processing circuit, integrated circuit, or system-on-chip (SoC) chip, etc., and the interface can be a communication interface, input / output interface, pins, etc.

[0238] It is understood that some optional features in the embodiments of this application can be implemented independently in certain scenarios without relying on other features, such as the current underlying solution, to solve the corresponding technical problems and achieve the corresponding effects. Alternatively, they can be combined with other features as needed in certain scenarios. Accordingly, the router networking device given in the embodiments of this application can also implement these features or functions, which will not be elaborated here.

[0239] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0240] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0241] The apparatus shown in the embodiments of this application can be implemented in hardware or software, and the embodiments of this application do not limit this.

[0242] This application also provides a router networking system, which includes an electronic device; wherein the electronic device is used to perform the method executed by the electronic device in any of the above method embodiments.

[0243] This application also provides a computer storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the methods and steps as described in any of the above method embodiments.

[0244] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the methods and steps as described in any of the above method embodiments.

[0245] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.

[0246] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the technical effects of the solutions provided in the embodiments of this application.

[0247] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0248] As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the listed items. As used in the above embodiments, depending on the context, the term “when” can be interpreted as meaning “if…” or “after…” or “in response to determining…” or “in response to detecting…”. Similarly, depending on the context, the phrase “when…” or “if (the stated condition or event) is interpreted as meaning “if…” or “in response to determining…” or “when (the stated condition or event) is detected” or “in response to detecting (the stated condition or event)”.

[0249] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., high-density digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)). Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0250] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A wireless fidelity WiFi scanning method, characterized in that, The method includes: When the user's electronic device is in a first cell and the first cell contains a first point of interest (POI), the user's motion state is obtained. When the movement state is walking, start WiFi scanning on the first frequency band and obtain the first WiFi scan result; Calculate the first matching similarity between the first WiFi scan result and the first WiFi fingerprint, where the first WiFi fingerprint is the WiFi fingerprint of the first POI corresponding to the first frequency band; If the first matching similarity is less than the first threshold and the first matching similarity is greater than or equal to the second threshold, WiFi scanning of the second frequency band is started and the second WiFi scanning result is obtained. Based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint, it is determined whether the user has entered the first POI, where the second WiFi fingerprint is the WiFi fingerprint of the first POI corresponding to the second frequency band.

2. The method according to claim 1, characterized in that, The step of determining whether the user has entered the first POI based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint includes: Based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint, a second matching similarity is determined; If the second matching similarity is greater than or equal to the third threshold, the user is determined to have entered the first POI.

3. The method according to claim 2, characterized in that, The method further includes: If the second matching similarity is greater than or equal to the third threshold, stop WiFi scanning of the first frequency band and WiFi scanning of the second frequency band.

4. The method according to claim 2 or 3, characterized in that, The method further includes: If the second matching similarity is less than the third threshold, stop WiFi scanning of the second frequency band and continue WiFi scanning of the first frequency band.

5. The method according to any one of claims 2-4, characterized in that, The step of determining the second matching similarity based on the first matching similarity, the second WiFi scan result, and the second WiFi fingerprint includes: Calculate the third matching similarity between the second WiFi scan result and the second WiFi fingerprint; A second matching similarity is obtained based on the first matching similarity and the third matching similarity.

6. The method according to claim 5, characterized in that, The step of obtaining the second matching similarity based on the first matching similarity and the third matching similarity includes: The second matching similarity is obtained by weighting and summing the first matching similarity and the third matching similarity. The first weight value corresponding to the first matching similarity is less than the second weight value corresponding to the third matching similarity.

7. The method according to any one of claims 1-6, characterized in that, The number of WiFi networks operating in the first frequency band is greater than the number of WiFi networks operating in the second frequency band.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: If the first matching similarity is greater than or equal to the first threshold value, stop the WiFi scanning of the first frequency band and determine that the user has entered the first POI.

9. The method according to any one of claims 1-8, characterized in that, The method further includes: If the first matching similarity is less than the first threshold value and the first matching similarity is less than the second threshold value, continue the WiFi scanning of the first frequency band.

10. An electronic device, characterized in that, include: One or more processors, one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories being used to store computer program code, the computer program code including computer instructions, which, when the one or more processors execute the computer instructions, cause the electronic device to perform the method as described in any one of claims 1-9.

11. A wireless fidelity WiFi scanning system, characterized in that, Includes an electronic device; wherein the electronic device is used to perform the method as described in any one of claims 1-9.

12. A chip, characterized in that, The device includes a processor and an interface, the processor and the interface being coupled; the interface is used to receive or output signals, and the processor is used to execute code instructions to cause the method of any one of claims 1-9 to be performed.

13. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which includes program instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-9.

14. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-9.