WO2024104173A1 - Wireless communication method, storage medium, and terminal device - Google Patents

Wireless communication method, storage medium, and terminal device Download PDF

Info

Publication number
WO2024104173A1
WO2024104173A1 PCT/CN2023/129117 CN2023129117W WO2024104173A1 WO 2024104173 A1 WO2024104173 A1 WO 2024104173A1 CN 2023129117 W CN2023129117 W CN 2023129117W WO 2024104173 A1 WO2024104173 A1 WO 2024104173A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
scanning
mobile phone
network
mode
Prior art date
Application number
PCT/CN2023/129117
Other languages
French (fr)
Chinese (zh)
Inventor
卢军鑫
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024104173A1 publication Critical patent/WO2024104173A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment

Definitions

  • the present application relates to the field of communication technology, and in particular to a wireless communication method, a storage medium, and a terminal device.
  • the terminal device In a wireless fidelity (Wi-Fi) communication system, in order to discover network devices, the terminal device will perform periodic full-channel scanning to scan whether there are accessible network devices around.
  • the terminal device can store the authentication information when accessing the network device; when the terminal device disconnects from the Wi-Fi network and re-scans the network device, the terminal device can obtain the authentication information corresponding to the network device from the stored record to initiate authentication to the network device, so that the terminal device can automatically reconnect to the Wi-Fi network provided by the network device.
  • Wi-Fi wireless fidelity
  • the current scanning cycle of terminal devices is relatively long.
  • the scanning cycle of a terminal device in standby mode can be as long as 300 seconds, resulting in poor terminal device reconnection efficiency.
  • full-channel scanning requires the terminal device to switch back and forth on multiple Wi-Fi channels for scanning, resulting in high terminal device scanning power consumption, which affects terminal device performance.
  • the embodiments of the present application provide a wireless communication method, a storage medium, and a terminal device, which identify Wi-Fi devices scanned by a terminal device when it has historically accessed a Wi-Fi network through stored Wi-Fi fingerprints and cell identifiers, so that when the terminal device is not connected to a Wi-Fi network, the Wi-Fi scanning mode is switched through the Wi-Fi fingerprint and the cell identifier, thereby reducing the Wi-Fi scanning power consumption of the terminal device and improving the efficiency of the terminal device re-accessing the Wi-Fi network.
  • the present application provides a wireless communication method, including: a terminal device performs a Wi-Fi scan in a first scanning mode; a matching relationship between a Wi-Fi device scanned by the terminal device and a Wi-Fi device in a stored first Wi-Fi fingerprint satisfies a first matching condition; and the terminal device performs a Wi-Fi scan in a second scanning mode, wherein a scanning interval of the first scanning mode is greater than a scanning interval of the second scanning mode.
  • the first scanning mode is used to indicate a Wi-Fi scan based on cycle 001
  • the second scanning mode is used to indicate a Wi-Fi scan based on cycle 002.
  • the Wi-Fi devices scanned by the terminal device when it historically accesses the Wi-Fi network are identified by the stored first Wi-Fi fingerprint.
  • the Wi-Fi devices scanned by the terminal device include Wi-Fi devices scanned when the terminal device historically accessed the Wi-Fi network, it can be determined that the current terminal device is closer to the location when it historically accessed the Wi-Fi network, and the terminal device can shorten the scanning time, increase the Wi-Fi scanning frequency, and thereby improve the efficiency of the terminal device re-accessing the Wi-Fi network.
  • the first Wi-Fi fingerprint is determined by the following method: the terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device; acquires multiple second Wi-Fi devices scanned by the terminal device; and determines the first Wi-Fi fingerprint based on the first Wi-Fi device and the multiple second Wi-Fi devices.
  • the first Wi-Fi device is used to represent the target network device
  • the second Wi-Fi device is used to represent the associated network device.
  • the terminal device scans and accesses the Wi-Fi network provided by a certain network device
  • all network devices scanned by the current terminal device are recorded.
  • the network device connected to the current terminal device is regarded as the first Wi-Fi device
  • the network device not connected is regarded as the second Wi-Fi device
  • the first Wi-Fi fingerprint is generated based on the first Wi-Fi device and multiple second Wi-Fi devices.
  • the first Wi-Fi fingerprint is determined by the following method: the terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device at a first time; acquires multiple second Wi-Fi devices scanned by the terminal device at the first time; and determines the first Wi-Fi fingerprint based on the first Wi-Fi device and the multiple second Wi-Fi devices.
  • the first time is used to indicate the time when the terminal device accesses the first Wi-Fi signal provided by the first Wi-Fi device.
  • the Wi-Fi fingerprint for the first Wi-Fi device can be collected at the time when the terminal device accesses the first Wi-Fi signal provided by the first Wi-Fi device.
  • the method further includes: the terminal device disconnecting the first Wi-Fi signal provided by the first Wi-Fi device at a second time; and using the multiple Wi-Fi devices scanned by the terminal device at the second time as second Wi-Fi devices to update the first Wi-Fi fingerprint.
  • the second time is used to indicate the time when the terminal device disconnects the first Wi-Fi signal provided by the first Wi-Fi device.
  • the Wi-Fi fingerprint for the first Wi-Fi device can also be collected when the terminal device disconnects the first Wi-Fi signal provided by the first Wi-Fi device.
  • the matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint satisfies the first matching condition including: the Wi-Fi device scanned by the terminal device includes all or part of the plurality of second Wi-Fi devices.
  • the Wi-Fi devices scanned by the terminal device include the second Wi-Fi device scanned when the terminal device historically accessed the first Wi-Fi device, it can be determined that the current terminal device is closer to the location when the terminal device historically accessed the first Wi-Fi signal provided by the first Wi-Fi device.
  • the method further includes: corresponding to the matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint not satisfying the first matching condition, the terminal device performing a Wi-Fi scan in a first scanning mode.
  • the terminal device when the above-mentioned matching relationship does not meet the first matching condition, it means that there is no first Wi-Fi device that has been historically connected around the current location of the terminal device, and the terminal device cannot automatically access the Wi-Fi network. Therefore, a Wi-Fi scan is performed using a cycle 001 with a longer interval scanning time, thereby reducing the scanning power consumption of the terminal device.
  • the terminal device performs Wi-Fi scanning in a first scanning mode, including: when the Wi-Fi devices scanned by the terminal device include the first Wi-Fi device, the terminal device accesses a first Wi-Fi signal provided by the first Wi-Fi device; and when the Wi-Fi devices scanned by the terminal device do not include the first Wi-Fi device, determining whether a matching relationship between the Wi-Fi devices scanned by the terminal device and the Wi-Fi devices in a stored first Wi-Fi fingerprint satisfies a first matching condition.
  • the terminal device performs Wi-Fi scanning in the second scanning mode, including: corresponding to the Wi-Fi device scanned by the terminal device including the first Wi-Fi device, the terminal device accesses a first Wi-Fi signal provided by the first Wi-Fi device.
  • the Wi-Fi channels supported by the Wi-Fi scanning of the terminal device include multiple first Wi-Fi channels; and the first scanning mode includes: performing Wi-Fi scanning based on the multiple first Wi-Fi channels.
  • the multiple first Wi-Fi channels may be a combination of any Wi-Fi channels that can be used by the terminal device in the 2.4 GHz and 5 GHz operating frequency bands, and the multiple first Wi-Fi channels may also be all Wi-Fi channels supported by the terminal device for Wi-Fi scanning.
  • the first scanning mode is used to indicate that Wi-Fi scanning is performed based on cycle 001 and using multiple first Wi-Fi channels. Since the terminal device is not connected to the Wi-Fi network when using the first scanning mode, using multiple first Wi-Fi channels (full channel scanning mode) in cycle 001 can improve the efficiency of the terminal device scanning to Wi-Fi devices.
  • a Wi-Fi channel through which the terminal device accesses the first Wi-Fi signal provided by the first Wi-Fi device is a second Wi-Fi channel, wherein the second Wi-Fi channel is any one of the multiple first Wi-Fi channels; and the second scanning mode includes: performing Wi-Fi scanning based on the second Wi-Fi channel.
  • the second Wi-Fi channel is used to represent the target channel. After determining that the current terminal device is close to the location when the first Wi-Fi signal provided by the first Wi-Fi device was historically accessed, the terminal device can switch from multiple first Wi-Fi channels (all-channel scanning mode) to the second Wi-Fi channel (single-channel scanning mode), reducing scanning power consumption and ensuring scanning and searching for the first Wi-Fi device.
  • the terminal device performs the Wi-Fi scan in the second scanning mode, including: acquiring a first scanning number of the terminal device performing the Wi-Fi scan based on the second Wi-Fi channel; corresponding to the first scanning number not exceeding the first threshold, the terminal device performs the Wi-Fi scan in the second scanning mode; corresponding to the first scanning number exceeding the first threshold, the terminal device performs the Wi-Fi scan in the first scanning mode.
  • the terminal device when the terminal device does not scan the first Wi-Fi device, and the first scanning number of the second Wi-Fi channel is When the first threshold is not exceeded, it may indicate that the user's terminal device may be moving in a direction close to the first Wi-Fi device, and the terminal device continues to use the second scanning mode to perform Wi-Fi scanning.
  • the terminal device does not scan the first Wi-Fi device, and the first scanning number of the second Wi-Fi channel exceeds the first threshold, it indicates that the user's terminal device may be moving in a direction away from the first Wi-Fi device, thereby making it impossible for the terminal device to automatically access the Wi-Fi network provided by the first Wi-Fi device in a short period of time.
  • the terminal device switches from the second scanning mode to the first scanning mode for Wi-Fi scanning, thereby improving the efficiency of the terminal device scanning Wi-Fi devices and reducing the scanning power consumption of the terminal device.
  • the following steps include: a matching relationship between a cell identifier received by the terminal device and a cell identifier in a stored first cell identifier set satisfies a second matching condition; and the terminal device performs Wi-Fi scanning in the first scanning mode.
  • the cell identifier set is used to represent multiple cell identifiers collected when the terminal device accesses and disconnects the first Wi-Fi signal provided by the first Wi-Fi device.
  • the terminal device performs Wi-Fi scanning in a first scanning mode, including: a matching relationship between a cell identifier received by the terminal device and a cell identifier in a stored first cell identifier set does not satisfy a second matching condition; and the terminal device performs Wi-Fi scanning in a third scanning mode; wherein a scanning interval of the third scanning mode is greater than a scanning interval of the second scanning mode.
  • the third scanning mode is used to indicate that Wi-Fi scanning is performed based on cycle 003.
  • the first cell identifier set is determined by the following method: a terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device; multiple first cell identifiers received by the terminal device are acquired; and the first cell identifier set is determined based on the multiple first cell identifiers.
  • the first cell identifier set is determined by the following method: the terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device at a first time; obtains multiple first cell identifiers received by the terminal device at the first time; and determines the first cell identifier set based on the multiple first cell identifiers.
  • the method further includes: the terminal device disconnecting the first Wi-Fi signal provided by the first Wi-Fi device at a second time; and using the multiple cell identifiers received by the terminal device at the second time as the first cell identifier to update the first cell identifier set.
  • the terminal device when a terminal device accesses or disconnects from a Wi-Fi network provided by a first Wi-Fi device, the terminal device may simultaneously collect the Wi-Fi fingerprint and the cell identifier of the terminal device, and store the correspondence between the cell identifier, the Wi-Fi fingerprint, and the first Wi-Fi device currently accessed by the terminal device to generate a feature information table, so that the terminal device may further switch the scanning mode of the terminal device by detecting changes in the cell identifier.
  • the method further includes: a scanning interval of the third scanning mode is greater than or equal to a scanning interval of the first scanning mode.
  • the scanning interval relationship of each scanning mode is the third scanning mode>the first scanning mode>the second scanning mode.
  • the method further includes: a Wi-Fi channel on which the terminal device performs Wi-Fi scanning in a second scanning mode is a second Wi-Fi channel; when a first scanning number of Wi-Fi scanning performed by the terminal device based on the second Wi-Fi channel exceeds a first threshold; corresponding to the terminal device being in a mobile mode, the terminal device performs Wi-Fi scanning in the second scanning mode; corresponding to the terminal device being in a stationary mode, the terminal device performs Wi-Fi scanning in a third scanning mode.
  • the mobile mode is used to indicate a mobile state
  • the stationary mode is used to indicate a stationary state
  • the method further includes: when a matching relationship between a Wi-Fi device scanned by the terminal device and a Wi-Fi device in a stored first Wi-Fi fingerprint does not satisfy a first matching condition; corresponding to the terminal device being in a mobile mode, the terminal device performs a Wi-Fi scan in a second scanning mode; corresponding to the terminal device being in a stationary mode, the terminal device performs a Wi-Fi scan in a third scanning mode.
  • the terminal device performs Wi-Fi scanning in a third scanning mode, including: the terminal device switches from a stationary mode to a mobile mode, and determines whether a matching relationship between a cell identifier received by the terminal device and a cell identifier in a stored first cell identifier set satisfies a second matching condition.
  • the method further includes: storing the first Wi-Fi fingerprint and/or the first cell identifier set in a cloud server.
  • the user can upload the Wi-Fi fingerprint and cell identification set to the cloud server, and share the Wi-Fi fingerprint and cell identification set to the user's other terminal devices through the cloud server, so that the user can also switch the scanning mode through the Wi-Fi fingerprint and cell identification set when using other terminal devices.
  • an embodiment of the present application provides a readable storage medium, which stores instructions.
  • the terminal device implements any one of the wireless communication methods provided by the first aspect and various possible implementations of the first aspect.
  • an embodiment of the present application provides a terminal device, which includes: a memory for storing instructions executed by one or more processors of the terminal device; and a processor, which is one of the processors of the terminal device, for executing instructions stored in the memory to implement any one of the wireless communication methods provided by the first aspect and various possible implementations of the first aspect.
  • an embodiment of the present application provides a program product, which includes instructions, and when the instructions are executed by a terminal device, the terminal device can implement any one of the wireless communication methods provided by the first aspect and various possible implementations of the first aspect.
  • FIG1 shows an example schematic diagram of a wireless fidelity communication system according to some embodiments of the present application
  • FIG2 shows an example schematic diagram of a Wi-Fi channel and a Wi-Fi operating frequency band according to some embodiments of the present application
  • FIG3 is a schematic diagram showing a flow chart of determining a scanning time according to some embodiments of the present application.
  • FIG4 is a schematic diagram showing a scenario of collecting Wi-Fi fingerprints according to some embodiments of the present application.
  • FIG5A is a schematic diagram showing a flow chart of a wireless communication method according to some embodiments of the present application.
  • FIG5B is a schematic diagram showing a scenario of a wireless communication method according to some embodiments of the present application.
  • FIG5C shows an example schematic diagram of a feature information table according to some embodiments of the present application.
  • FIG5D is a schematic diagram showing a process of generating a feature information table according to some embodiments of the present application.
  • FIG6A is a schematic diagram showing a flow chart of another wireless communication method according to some embodiments of the present application.
  • FIG6B shows an example schematic diagram of another feature information table according to some embodiments of the present application.
  • FIG7 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
  • FIG8 shows a schematic structural diagram of a terminal device 100 according to some embodiments of the present application.
  • the illustrative embodiments of the present application include but are not limited to a wireless communication method, a storage medium, and a terminal device.
  • the wireless fidelity communication system includes a terminal device 11 and a network device 12 .
  • the terminal device 11 can connect to a Wi-Fi network through the network device 12 .
  • the terminal device 11 can be any electronic device that supports wireless network connection, including but not limited to: mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA) or special cameras (such as SLR cameras, card cameras), etc.
  • the terminal device 11 is a mobile phone.
  • the network device 12 may be a wireless switch in a wireless network, including but not limited to: a wireless router, a wireless network card, a modem, etc.
  • a wireless router a wireless network card
  • a modem a modem
  • the process of the terminal device 11 accessing the Wi-Fi network provided by the network device 12 generally includes three stages: scanning, authentication, and association.
  • scanning, authentication, and association In conjunction with FIG1 , the following mobile phone is used as an example of the terminal device 11, and the wireless router is used as an example of the network device 12, and the related processes of the three stages are explained as follows:
  • the mobile phone can obtain the Wi-Fi network provided by the wireless routers around the mobile phone through Wi-Fi scanning.
  • Wi-Fi scanning can be further divided into active scanning and passive scanning.
  • the probe response frame sent by the surrounding wireless routers is used to find the corresponding wireless router providing the Wi-Fi network.
  • the probe response frame includes but is not limited to: Service Set Identifier (SSID), Basic Service Set Identifier (BSSID), encryption and authentication methods and other wireless network information.
  • the mobile phone discovers the Wi-Fi network provided by the surrounding wireless routers by listening to the beacon frames sent regularly by the wireless routers. It can be understood that the wireless routers regularly broadcast Beacon frames on the Wi-Fi channel, and the Beacon frames include wireless network information such as SSID, BSSID, encryption and authentication methods.
  • the mobile phone After the mobile phone obtains the Wi-Fi network provided by the surrounding wireless routers through Wi-Fi scanning, it initiates an authentication request to the corresponding wireless router based on the Wi-Fi network.
  • a mobile phone obtains the Wi-Fi network provided by the surrounding wireless routers through Wi-Fi scanning, and displays the SSID of the scanned Wi-Fi network on the display screen; if the user needs to join a wireless network, he can click the corresponding SSID on the display screen, and the mobile phone responds to the user's click operation and pops up a password input window; after the user enters the password and other information in the password input window, he clicks the connect button, and the mobile phone responds to the user's operation on the connect button and sends an authentication request frame to the wireless router according to the password and other information entered by the user.
  • a mobile phone obtains a Wi-Fi network provided by a surrounding wireless router through Wi-Fi scanning, and detects that the Wi-Fi network is a Wi-Fi network that the mobile phone has accessed in the past. The mobile phone can then obtain the password information of the Wi-Fi network that was historically accessed from the historical records, and automatically send an authentication request frame to the wireless router.
  • the wireless router After receiving the authentication request from the mobile phone, the wireless router performs authentication according to the information carried in the authentication request, obtains the authentication result, and returns the authentication result to the mobile phone.
  • the mobile phone receives the authentication result returned by the wireless router, if the authentication result is authentication passed, it sends an association request to the wireless router. In response to the association request, the wireless router sends an association response to the mobile phone to notify the mobile phone that the association is successful. At this point, the mobile phone is connected to the Wi-Fi network provided by the wireless router.
  • the Wi-Fi operating frequency band can be 2.4 GHz and 5 GHz, or 6 GHz in the sixth generation Wi-Fi (Wi-Fi 6), without specific limitation.
  • the Wi-Fi device can work in both 2.4 GHz and 5 GHz frequency bands.
  • the Wi-Fi module of the Wi-Fi device supports Dual Band Dual Concurrent (DBDC)
  • the Wi-Fi device can work in two frequency bands simultaneously.
  • the Wi-Fi device supporting DBDC integrates two complete channels, including two complete baseband processors and two RF front ends.
  • the Wi-Fi device is used to indicate a wireless router or a mobile phone.
  • a wireless router that supports DBDC can send out 2.4GHz and 5GHz network signals at the same time, that is, it provides two Wi-Fi networks, one Wi-Fi network is in the 2.4G frequency band, and the other Wi-Fi network is in the 5G frequency band.
  • a mobile phone that supports DBDC can simultaneously connect to a 2.4G Wi-Fi network and a 5G Wi-Fi network.
  • the two Wi-Fi networks can be provided by the same network device or by two network devices.
  • a mobile phone that supports DBDC can simultaneously connect to a 2.4G Wi-Fi network and a 5G Wi-Fi network of wireless router A, or can separately connect to a 2.4G Wi-Fi network of wireless router A and a 5G Wi-Fi network of wireless router B.
  • the Wi-Fi device can only work in one frequency band in the same period, that is, it can only work in the 2.4G frequency band or the 5G frequency band in the same period.
  • wireless router A supporting DBDC works in both the 2.4G frequency band and the 5G frequency band, providing a 2.4G frequency band Wi-Fi network and a 5G frequency band Wi-Fi network, while the Wi-Fi module of the mobile phone can only work in one frequency band, so the mobile phone can only connect to the 2.4G frequency band Wi-Fi network or the 5G frequency band Wi-Fi network, and cannot connect to both 2.4G and 5G frequency bands of Wi-Fi networks at the same time.
  • the following uses the 2.4 GHz and 5 GHz operating frequency bands as examples to explain Wi-Fi channels.
  • Wi-Fi channels on each operating frequency band there are available Wi-Fi channels on each operating frequency band. Taking China as an example, as shown in Figure 2, there are 13 available Wi-Fi channels on the 2.4G frequency band, namely channel 1 to channel 13; the available Wi-Fi channels on the 5G frequency band include channel 36, channel 40, channel 44, channel 48, channel 52, channel 56, channel 60, channel 64, channel 149, channel 153, channel 157, channel 161 and channel 165.
  • a DBDC-supporting Wi-Fi device may broadcast or monitor Beacon frames on multiple Wi-Fi channels available in both 2.4G and 5G frequency bands.
  • a wireless router A supporting DBDC may broadcast Beacon frames on multiple Wi-Fi channels available in both 2.4G and 5G frequency bands, and accordingly, a mobile phone supporting DBDC may switch back and forth between multiple Wi-Fi channels available in both 2.4G and 5G frequency bands to monitor Beacon frames; or, for example, a mobile phone supporting DBDC may send a probe request frame on multiple Wi-Fi channels available in both 2.4G and 5G frequency bands.
  • the mobile phone can obtain the Wi-Fi network provided by the wireless router through Wi-Fi scanning; in other embodiments, mobile phones and other terminal devices that support the Wi-Fi network sharing function can enable the Wi-Fi network sharing function to enable other mobile phones and other terminal devices to obtain the shared Wi-Fi network through Wi-Fi scanning, that is, mobile phones and other terminal devices that support the Wi-Fi network sharing function can also serve as the above-mentioned network devices to provide Wi-Fi networks.
  • the scanning time for the mobile phone to perform Wi-Fi scanning can be determined by the working mode of the mobile phone.
  • FIG3 a schematic diagram of a process for determining a scanning time is shown, which specifically includes the following steps:
  • S301 The mobile phone is not connected to the Wi-Fi network.
  • the mobile phone when it is detected that the mobile phone is not connected to the Wi-Fi network, the mobile phone can scan the surrounding wireless routers to access the Wi-Fi network through the Wi-Fi scanning method. Further, the scanning time of the Wi-Fi scan can be determined by detecting the screen light mode of the mobile phone.
  • the mobile phone when it is detected that the mobile phone is not in the bright screen mode, it can indicate that the mobile phone is not used by the user, the mobile phone is in standby mode, and the user has low demand for the Wi-Fi network.
  • the mobile phone can use a longer scanning time for scanning, for example, the first scanning time is 60 seconds, the second scanning time is 120 seconds, the third scanning time is 180 seconds, and the fourth scanning time is 240 seconds.
  • the mobile phone usually extends the scanning time of the Wi-Fi scan, for example, the scanning time is always 300 seconds after the fifth scan.
  • a mobile phone can usually determine whether there is a connectable Wi-Fi network around it through the previous Wi-Fi scans. If the mobile phone fails to connect to a Wi-Fi network in the previous Wi-Fi scans, it is determined that there is no available Wi-Fi network around the current mobile phone, and the scanning time of the Wi-Fi scan is extended to reduce power consumption. Therefore, the scanning time of the previous scans can be adjusted in different usage scenarios.
  • the scanning time can be further determined by the static mode of the mobile phone, and the process jumps to step S303.
  • the mobile phone when it is detected that the mobile phone is in the bright screen mode but not in the static mode, it can indicate that the user is using the mobile phone and the user has a demand for the Wi-Fi network, such as the user using a mobile phone or other terminal device while walking.
  • the mobile phone can adjust the scanning time, for example, the first scanning time is 20 seconds, the second scanning time is 40 seconds, the third scanning time is 80 seconds, and the fourth scanning time is 160 seconds. If the mobile phone does not connect to the Wi-Fi network in the first few Wi-Fi scans, the scanning time of the Wi-Fi scan is then extended, for example, the scanning time for the fifth and subsequent times is always 300 seconds.
  • the mobile phone when it is detected that the mobile phone is in the bright screen mode and in the static mode, it can indicate that the user is using the mobile phone and the user has a high demand for the Wi-Fi network. For example, when the user places the mobile phone on the desktop and uses the mobile phone to play music, watch movies, cast movies, etc., the mobile phone is in static mode, and the mobile phone needs to connect to the Wi-Fi network to play music, watch movies, cast movies, etc., that is, the user has a high demand for the Wi-Fi network.
  • the mobile phone can use a shorter scanning time for scanning, for example, the first three scanning times are 10 seconds, and the fourth to sixth scanning times are 30 seconds. If the mobile phone is not connected to the Wi-Fi network in the first few Wi-Fi scans, the scanning time of the Wi-Fi scan is then extended, and the scanning time for the seventh and subsequent times is always 300 seconds.
  • the mobile phone will adjust the scanning time according to the detection results. At the same time, since there is no Wi-Fi network that the mobile phone can access around the mobile phone, and the scanning time of the first few times after each adjustment is shorter, the scanning power consumption of the mobile phone increases.
  • the working mode of the mobile phone is relatively fixed, and there are Wi-Fi networks that the mobile phone can access around the mobile phone, such as wireless routers that have been accessed in the past around the mobile phone, or password information used for authentication of wireless routers around the mobile phone can be obtained by the user, etc.
  • Wi-Fi networks such as wireless routers that have been accessed in the past around the mobile phone, or password information used for authentication of wireless routers around the mobile phone can be obtained by the user, etc.
  • Wi-Fi networks that the mobile phone can access around the mobile phone, such as wireless routers that have been accessed in the past around the mobile phone, or password information used for authentication of wireless routers around the mobile phone can be obtained by the user, etc.
  • the mobile phone failed to scan the wireless router in the first few scans, and then the mobile phone will extend the scanning time of the Wi-Fi scan.
  • the mobile phone cannot quickly scan the wireless router to connect to the Wi-Fi network, which reduces the efficiency of the mobile phone connecting to the Wi-Fi network.
  • the mobile phone in order to ensure that the mobile phone can scan all surrounding wireless routers during the above-mentioned Wi-Fi scanning process, the mobile phone usually adopts a full-channel scanning method, that is, switching among the 13 Wi-Fi channels in the 2.4G frequency band or multiple Wi-Fi channels in the 5G frequency band to perform Wi-Fi scanning. It can be seen that when the full-channel scanning method is adopted, the scanning power consumption of the mobile phone is relatively large.
  • the terminal device when the terminal device is in use, when the terminal device scans and connects to a Wi-Fi network provided by a certain network device, all network devices scanned by the current terminal device are recorded. Among all network devices, the network device connected to the current terminal device is used as the target network device, and the network devices not connected are used as associated network devices. A Wi-Fi fingerprint is generated based on the target network device and the associated network devices, and the target network device is identified by the Wi-Fi fingerprint. At the same time, the Wi-Fi network connected to the terminal device and the target network device is recorded. Channel, use the Wi-Fi channel as the target channel for the target network device.
  • the terminal device when the terminal device subsequently disconnects from the Wi-Fi network and needs to re-scan for the network, when the real-time network devices scanned by the terminal device include any one or more associated network devices in the Wi-Fi fingerprint, it can be determined that the current terminal device is close to the target network device, and the terminal device can shorten the scanning time and increase the Wi-Fi scanning frequency, thereby improving the efficiency of the terminal device scanning the target network device to re-access the Wi-Fi network.
  • the terminal device can obtain the target channel of the corresponding target network device from the historical records, and switch from the full channel scanning mode to a separate target channel scan, so that the terminal device does not need to switch back and forth between multiple Wi-Fi channels in the full channel scan, thereby reducing the scanning power consumption of the terminal device.
  • the target network device is a network device that the terminal device has accessed historically
  • the multiple associated network devices are multiple network devices scanned by the terminal device when it has accessed the target network device historically.
  • the multiple network devices scanned by the terminal device when it has accessed the target network device historically may include network devices that the terminal device has not accessed, and may also include network devices that the terminal device has accessed historically, that is, the associated network devices may be network devices that the terminal device has not accessed, and may also be network devices that the terminal device has accessed historically.
  • target network device 13 when the terminal device is not connected to a Wi-Fi network and is performing Wi-Fi scanning, two network devices that have been connected in the past are scanned at the same time, such as target network device 13 and target network device 14. Since the Wi-Fi network signal of target network device 13 is stronger, the terminal device can preferentially access the Wi-Fi network provided by target network device 13. At this time, target network device 14 can be used as an associated network device of target network device 13.
  • the following uses the mobile phone 10 as an example of a terminal device, and explains the process of generating a Wi-Fi fingerprint in combination with a scenario in which the mobile phone 10 is connected to a network device.
  • the Wi-Fi scanning area of mobile phone 10 is area 10A1; when mobile phone 10 is located at position 10B, the Wi-Fi scanning area of mobile phone 10 is area 10B1; network device 01 is the target network device of mobile phone 10.
  • network device 01 is a network device that mobile phone 10 has accessed in the past, that is, mobile phone 10 stores password information for authenticating network device 01.
  • mobile phone 10 can obtain password information from the historical record to initiate authentication to network device 01, and then mobile phone 10 can automatically reconnect to the Wi-Fi network provided by network device 01; or network device 01 can also be a network device that mobile phone 10 has not accessed in the past, but is a network device that the user wants to connect to, that is, the user knows the password information for authenticating network device 01.
  • the user can enter the password information through the network connection prompt pop-up window displayed by mobile phone 10 to initiate authentication to network device 01, so that mobile phone 10 can connect to the Wi-Fi network provided by network device 01.
  • the mobile phone 10 can scan network devices 01, 02, 03, 04 and 05 through full channel scanning.
  • the mobile phone 10 can automatically initiate a request to the network device 01 for network connection; or the user can select the SSID corresponding to the network device 01 and enter the password information through the network connection prompt pop-up window displayed by the mobile phone 10 to initiate a request to the network device 01 for network connection.
  • the network device information A obtained by the mobile phone 10 at the position 10A through the full channel scan is recorded.
  • the network device information A includes network devices 01, 02, 03, 04 and 05, and the network device 01 accessed by the mobile phone 10 is used as the target network device, and the network devices 02 to 05 not accessed by the mobile phone 10 are used as associated network devices.
  • the network device 01 is outside the Wi-Fi scanning area 10B1 of the mobile phone 10, that is, the mobile phone 10 is disconnected from the network device 01, and after the mobile phone 10 disconnects from the Wi-Fi network provided by the network device 01, the network device information B obtained by the mobile phone 10 at the position 10B through the full channel scanning is recorded.
  • the network device information B includes network devices 06 and 07, and the network device 01 that is disconnected after the mobile phone 10 is connected is used as the target network device, and the network devices 06 and 07 that the mobile phone 10 is not connected to are used as the associated network devices.
  • the above-mentioned position 10A is used as the living room of the user's residence
  • the position 10B is used as the bedroom bathroom of the user's residence
  • the network device 01 is placed in the living room by the user as a wireless router. Then when the user carries the mobile phone 10 in the living room, due to the short distance, the user can scan and access the Wi-Fi network provided by the network device 01.
  • the mobile phone 10 scans and accesses the network device 01, it also scans the neighbor's network devices, such as network devices 02, 03, 04 and 05; after the user carries the mobile phone 10 to the bedroom bathroom, the bedroom bathroom is far away from the network device 01, and the network device 01 cannot be scanned, that is, the mobile phone 10 is disconnected from the Wi-Fi network provided by the network device 01, so that the user cannot access the Wi-Fi network provided by the network device 01 in the bedroom bathroom, but at the same time, the mobile phone 10 can scan other neighbor's network devices at position 10B, such as network devices 06 and 07.
  • the neighbor's network devices such as network devices 02, 03, 04 and 05
  • the network device information A and the network device information B may be combined based on the fact that the network device information A and the network device information B include the same target network device.
  • Network device information A and network device information B are used to generate the same target network device Wi-Fi fingerprints included in the two. That is, the Wi-Fi fingerprint of the corresponding network device 01 is generated by recording the full channel scan results when the mobile phone 10 is connected to the network device 01 and the full channel scan results when the mobile phone 10 is disconnected from the network device 01.
  • the Wi-Fi fingerprint corresponding to the network device 01 includes network devices 01 to 07, among which network device 01 is used as the target network device and network devices 02 to 07 are used as associated network devices.
  • the Wi-Fi fingerprint of network device 01 can be updated by recording the full channel scanning results each time the mobile phone 10 accesses and disconnects the network device 01. It can be understood that, as shown in FIG4, after the mobile phone 10 generates the Wi-Fi fingerprint of the corresponding network device 01 based on network devices 01 to 07, the mobile phone 10 may also scan other network devices, such as network devices 08 and 09, when it subsequently re-accesses and disconnects the network device 01.
  • network devices 08 and 09 can be used as associated network devices and updated to the Wi-Fi fingerprint of the corresponding network device 01, so that the Wi-Fi fingerprint of the network device 01 includes network devices 01 to 09, thereby making the Wi-Fi fingerprint of the network device 01 more complete and improving the identification of the network device 01 through the Wi-Fi fingerprint.
  • the Wi-Fi fingerprint can be updated by periodically collecting the full channel scan results when the mobile phone 10 is connected to the network device 01. For example, after the mobile phone 10 is connected to the network device 01, the mobile phone 10 performs a full channel scan every half an hour or fifteen minutes, and updates the Wi-Fi fingerprint of the network device 01 based on the scan results.
  • the mobile phone 10 can use multiple network devices that have been historically connected as different target network devices of the mobile phone 10; or the mobile phone 10 can also use one or more network devices that have been accessed more than a preset number of times among the multiple network devices that have been historically connected as the target network devices of the mobile phone 10, so that the target network device can represent the network device that the user frequently connects to; or the user can also customize the selection of any one or more network devices from the multiple network devices that have been historically connected as the target network device of the mobile phone 10, so that the target network device meets the user's personalized needs, without specific limitation.
  • the user can upload the Wi-Fi fingerprint to a cloud server, and the user can share the Wi-Fi fingerprint to other terminal devices of the user through the cloud server, so that the user can also use the Wi-Fi fingerprint when using other terminal devices besides mobile phone 10; or different users can upload the obtained Wi-Fi fingerprint to the cloud server, and the cloud server can classify each Wi-Fi fingerprint based on the Media Access Control (MAC) address of the network device in the Wi-Fi fingerprint, and integrate the Wi-Fi fingerprint for network device 01, so that the Wi-Fi fingerprint of network device 01 is more complete, thereby improving the identification of network device 01 based on the Wi-Fi fingerprint.
  • MAC Media Access Control
  • multiple associated network devices in a Wi-Fi fingerprint may be filtered and screened. For example, if the geographical locations of the multiple associated network devices are similar, for example, the signal strengths (Received Signal Strength Indication, RSSI) of the detection response frames received by the mobile phone 10 at the same location from the multiple associated network devices are the same or similar, then any one or a preset number of associated network devices may be retained from the multiple associated network devices to improve the uniqueness of each associated network device in the Wi-Fi fingerprint. While ensuring the accuracy of the Wi-Fi fingerprint in identifying the target network device, the data volume of the Wi-Fi fingerprint may be reduced, thereby improving the efficiency of users downloading the Wi-Fi fingerprint from the cloud server.
  • RSSI Receiveived Signal Strength Indication
  • FIG. 5A shows a flowchart of a wireless communication method according to some embodiments of the present application, which is applied to a mobile phone 10 and specifically includes the following steps:
  • whether the mobile phone 10 needs to initiate a Wi-Fi scan may be determined by detecting the Wi-Fi connection mode of the mobile phone 10 .
  • the Wi-Fi connection mode of the mobile phone 10 when it is detected that the Wi-Fi connection mode of the mobile phone 10 is connected, it means that the mobile phone 10 has been connected to the Wi-Fi network, and there is no need to initiate a Wi-Fi scan, jump to step S501A, and the process ends; or for example, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected, it means that the mobile phone 10 is not connected to the Wi-Fi network, and a Wi-Fi scan needs to be initiated, jump to step S502.
  • S502 Acquire the channel set of the mobile phone 10, clear the scanning times of each scanning channel in the channel set, and then control the mobile phone 10 to perform full channel scanning through cycle 001.
  • the Wi-Fi scanning area of mobile phone 10 is area 10A1; when mobile phone 10 is located at position 10B, the Wi-Fi scanning area of mobile phone 10 is area 10B1; when mobile phone 10 is located at position 10C, the Wi-Fi scanning area of mobile phone 10 is area 10C1; when mobile phone 10 is located at position 10D, the Wi-Fi scanning area of mobile phone 10 is area 10D1; network device 01 is the target network device of mobile phone 10.
  • network device 01 is a network device that mobile phone 10 has accessed in the past, and mobile phone 10 stores authentication password information for connecting to network device 01; when mobile phone 10 scans network device 01, mobile phone 10 can automatically obtain the password information of network device 01 and send it to the network.
  • Device 01 initiates authentication, and the mobile phone 10 can automatically access the Wi-Fi network provided by network device 01 without the user entering a password.
  • Network devices 02 to 09 are network devices that the mobile phone 10 has never accessed before. The mobile phone 10 does not store authentication password information and cannot automatically access the Wi-Fi networks provided by network devices 02 to 09. The user needs to manually enter the corresponding password information before initiating an authentication connection to the corresponding network device.
  • the channel set of the mobile phone 10 is obtained.
  • the channel set includes multiple scanning channels, and the multiple scanning channels can be a combination of any Wi-Fi channels that can be used in the above-mentioned 2.4GHz and 5GHz working frequency bands, or the multiple scanning channels can also be all Wi-Fi channels supported by the mobile phone 10 for Wi-Fi scanning, without specific restrictions.
  • the mobile phone 10 is controlled to perform full channel scanning based on the channel set through cycle 001.
  • the scanning time interval between each Wi-Fi scan in cycle 001 is relatively long, for example, a Wi-Fi scan is performed every 60 seconds, because when the current mobile phone 10 is scanning through area 10D1 at position 10D, there is no network device that can be scanned, that is, the mobile phone 10 cannot connect to the Wi-Fi network, so using cycle 001 with a longer scanning interval to perform Wi-Fi scanning can reduce the scanning power consumption of the mobile phone 10.
  • the full channel scanning method in cycle 001 can improve the efficiency of the mobile phone 10 scanning network devices.
  • the mobile phone 10 when the mobile phone 10 finds a network device through full channel scanning in step S502, and the network device is a network device that the mobile phone 10 has historically connected to, such as when the network device 01 is scanned, it means that the mobile phone 10 matches the target network device, and the mobile phone 10 can automatically connect to the Wi-Fi network provided by the network device 01, that is, jump to step S502A.
  • the mobile phone 10 finds a network device through full channel scanning in step S502, and the network device is a network device that the mobile phone 10 has not connected to in history, such as when the network device 01 is not scanned, it means that the mobile phone 10 does not match the target network device, and jumps to step S503.
  • S503 Obtain a feature information table of the mobile phone 10, and match the scanning result of the full channel scan with the feature information table.
  • the mobile phone 10 acquires network devices, such as network devices 03, 05, 08, and 09, through full-channel scanning, and uses each scanned network device as a scanning result of the full-channel scanning, which is then matched with the feature information table.
  • network devices such as network devices 03, 05, 08, and 09
  • the Wi-Fi fingerprints corresponding to different target network devices can be determined by collecting the full channel scanning results when the mobile phone 10 historically accesses and disconnects the target network device.
  • the specific determination process can be seen in Figure 4 above.
  • the Wi-Fi fingerprint corresponding to network device 01 includes at least one target network device as network device 01, and multiple associated network devices as network devices 02 to 07, which will not be described in detail here.
  • a feature information table corresponding to the target network device is generated.
  • the characteristic information table 50 includes the MAC address, target channel, Wi-Fi fingerprint and connection status of the target network device.
  • the MAC address of the target network device is used to indicate the MAC address of the network device 01
  • the target channel is used to indicate the Wi-Fi channel through which the mobile phone 10 accesses the network device 01
  • the Wi-Fi fingerprint is used to indicate the MAC addresses of multiple network devices collected when the mobile phone 10 accesses and disconnects the network device 01, such as the MAC addresses of network devices 01 to 07, and the MAC address of the network device 01 currently accessed by the mobile phone 10 is used as the MAC address of the target network device
  • the connection status is used to indicate that the mobile phone 10 accesses or disconnects the network device 01, such as 1 indicates that the mobile phone 10 accesses the network device 01, and 0 indicates that the mobile phone 10 is disconnected from the network device 01.
  • the scanning results are matched with the feature information table.
  • the process jumps to step S502. It can be understood that when the scan result does not match the Wi-Fi fingerprint at all, it means that there is no target network device that has been historically connected around the current location of the mobile phone 10, and the mobile phone 10 cannot automatically access the Wi-Fi network, so the Wi-Fi scan is performed using the cycle 001 with a longer interval scanning time, thereby reducing the scanning power consumption of the mobile phone 10.
  • S504 Acquire the target channel from the feature information table, and control the mobile phone 10 to perform partial channel scanning based on the target channel and through cycle 002.
  • the Wi-Fi fingerprint is a fingerprint collected when the mobile phone 10 historically accesses the target network device
  • the Wi-Fi fingerprint can be used to identify the location of the mobile phone 10 when it historically accesses the target network device.
  • the MAC addresses of multiple network devices in the scan result are partially the same as the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint
  • the MAC addresses of any one or more network devices in the scan result can be queried from the Wi-Fi fingerprint, it means that the mobile phone 10 is close to the location when it historically accessed the target network device, and the user carrying the mobile phone 10 may be moving in a direction close to the target network device.
  • the mobile phone 10 obtains the target channel of the target network device corresponding to the matching Wi-Fi fingerprint from the feature information table, and controls the mobile phone 10 to switch from full-channel scanning to a single-channel scanning method based on the target channel, thereby reducing scanning power consumption and ensuring scanning and searching for the target network device.
  • the interval scanning time can be shortened. Relative to cycle 001, scanning is performed through cycle 002 with a shorter interval scanning time, for example, a Wi-Fi scan is performed every 20 seconds, thereby increasing the speed at which the mobile phone 10 connects back to the Wi-Fi network provided by the target network device, thereby improving the user experience.
  • partial channel scanning can be performed based on multiple target channels corresponding to the multiple target network devices. It can be understood that after determining that the scan result matches the Wi-Fi fingerprint, the target network device is determined by the matched Wi-Fi fingerprint, such as querying from the Wi-Fi fingerprint which network devices are network devices that the mobile phone 10 has accessed in the past, taking the network devices that have been accessed in the past as target network devices, and switching from full channel scanning to single channel scanning or partial channel scanning through the target channel recorded when the target network device was historically accessed.
  • the following explanation is given by taking the scanning result of the full channel scan of the mobile phone 10 matching the Wi-Fi fingerprint of the network device 01, and the mobile phone 10 switching from the full channel scan to the single channel scan mode of the target channel of the network device 01 that the mobile phone 10 historically accessed as an example.
  • the user carries mobile phone 10 at position 10C, so that after the full channel scan result of mobile phone 10 matches the Wi-Fi fingerprint, mobile phone 10 obtains the target channel of the target network device corresponding to the Wi-Fi fingerprint, such as the target channel of network device 01, performs a single channel scan based on the target channel, shortens the interval scanning time relative to period 001, and performs Wi-Fi scanning through period 002 with a shorter interval scanning time.
  • the target channel of the target network device corresponding to the Wi-Fi fingerprint such as the target channel of network device 01
  • performs a single channel scan based on the target channel shortens the interval scanning time relative to period 001, and performs Wi-Fi scanning through period 002 with a shorter interval scanning time.
  • the mobile phone 10 scans the network device 01, and the mobile phone 10 can automatically access the Wi-Fi network provided by the network device 01, and then jumps to step S502A.
  • S505 Record the number of scans of the target channel, and determine whether the number of scans of the target channel exceeds a preset number.
  • the scanning cycle and scanning channel of the mobile phone 10 can be switched according to the scanning times of the target channel.
  • the mobile phone 10 when the mobile phone 10 fails to scan the network device 01 and the target channel is scanned less than the preset number of times, it may indicate that the user carrying the mobile phone 10 may be moving towards the direction close to the network device 01, and the process jumps to step S504, where the mobile phone 10 continues to use the target channel and cycle 002 for Wi-Fi scanning.
  • the mobile phone 10 when the mobile phone 10 fails to scan the network device 01 and the number of scans of the target channel exceeds the preset number, it indicates that the user carrying the mobile phone 10 may move in a direction away from the signal of the network device 01, and thus the mobile phone 10 cannot automatically access the Wi-Fi network provided by the network device 01 in a short time, and then jumps to step S502.
  • the mobile phone 10 switches from single-channel scanning to full-channel scanning to improve the efficiency of the mobile phone 10 in scanning the network device.
  • the mobile phone 10 switches from the cycle 002 with a shorter interval scanning time to the cycle 001 with a longer interval scanning time to scan, thereby reducing the scanning power consumption of the mobile phone 10.
  • the above-mentioned position 10A is used as the living room of the user's residence
  • the position 10C is used as the corridor of the user's residence
  • the position 10D is used as the community of the user's residence
  • the network device 01 is placed in the living room by the user as a wireless router.
  • the mobile phone 10 When the user carries the mobile phone 10 into the residential area, the mobile phone 10 cannot scan the network device 01 because it is far away from the living room.
  • the mobile phone 10 uses the period 001 with a longer interval scanning time to perform a full-channel Wi-Fi scan to ensure that the network device can be scanned.
  • the mobile phone 10 scans the network device and matches the Wi-Fi fingerprint of the network device 01, indicating that the user may be approaching the living room with the mobile phone 10, so that the mobile phone 10 switches from the period 001 with a longer interval scanning time to the period 002 with a shorter interval scanning time, increases the scanning frequency, and performs a single-channel scan based on the Wi-Fi channel when the network device 01 was accessed historically.
  • the mobile phone 10 can immediately scan the network device 01 and automatically connect to the Wi-Fi network provided by the network device 01, thereby improving the reconnection speed of the Wi-Fi network of the mobile phone 10, thereby meeting the user's networking needs for the mobile phone 10.
  • FIG5D shows a schematic diagram of a process of generating a feature information table according to some embodiments of the present application, which specifically includes the following steps:
  • S51A The mobile phone 10 accesses the Wi-Fi network.
  • S51B The mobile phone 10 disconnects from the Wi-Fi network.
  • the mobile phone 10 can prompt the user whether it is necessary to generate a feature information table through an information pop-up window when connecting to a Wi-Fi network or disconnecting from a Wi-Fi network, and the user can then determine whether it is necessary to generate a feature information table through the information pop-up window.
  • the mobile phone 10 detects that the user determines through the information pop-up window that a feature information table needs to be generated, then the judgment result A is that the feature information table needs to be generated; or for example, when the mobile phone 10 is connected to a Wi-Fi network, the mobile phone 10 detects that the user determines through the information pop-up window that a feature information table does not need to be generated, then the judgment result A is that the feature information table does not need to be generated.
  • the judgment result B is the same as the judgment result A, and will not be repeated here.
  • step S53 when any one of the judgment results A and B requires generating a feature information table, jump to step S53; when both the judgment results A and B do not require generating a feature information table, jump to step S57, and the process ends.
  • S53 Collect Wi-Fi fingerprints of all-channel scanning by the mobile phone 10 .
  • the process can jump to step S53 separately.
  • the judgment result A is that the feature information table needs to be generated, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 accesses the Wi-Fi network.
  • the judgment result B is that the feature information table needs to be generated, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 disconnects the Wi-Fi network. That is, when the mobile phone 10 accesses or disconnects the Wi-Fi network, the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected.
  • the judgment result A is that it is not necessary to generate a feature information table, and the Wi-Fi fingerprint is not collected when the mobile phone 10 is connected to the Wi-Fi network.
  • the judgment result B is that it is necessary to generate a feature information table, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 is disconnected from the Wi-Fi network. That is, the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected only when the mobile phone 10 is disconnected from the Wi-Fi network.
  • the judgment result A is that the feature information table needs to be generated, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 accesses the Wi-Fi network.
  • the judgment result B is that the feature information table does not need to be generated, and the Wi-Fi fingerprint is not collected when the mobile phone 10 disconnects the Wi-Fi network. That is, the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected only when the mobile phone 10 accesses the Wi-Fi network.
  • S54 Collect the MAC address and target channel of the target network device for the mobile phone 10 to access the Wi-Fi network.
  • the MAC address of the network device corresponding to the Wi-Fi network to which the mobile phone 10 accesses is used as the MAC address of the target network device, and the Wi-Fi channel of the corresponding network device scanned before the mobile phone 10 accesses the Wi-Fi network is used as the target channel.
  • a feature information table is generated based on the Wi-Fi fingerprint, the MAC address of the target network device, the target channel, and the state of the mobile phone 10 when it is connected to or disconnected from the Wi-Fi network. For example, the feature information table 50 in step S503.
  • the feature information table is transmitted to a cloud server so that the user can share the feature information table to other terminal devices of the user through the cloud server, so that the user can also use the feature information table when using other terminal devices besides mobile phone 10.
  • the mobile phone 10 when the mobile phone 10 accesses or disconnects from the Wi-Fi network provided by the target network device, the mobile phone 10 can simultaneously collect the Wi-Fi fingerprint and cell identification (Cellular Identity, cell ID) information of the mobile phone 10, and load the correspondence between the cell identification set, the Wi-Fi fingerprint and the target network device currently accessed by the mobile phone 10 into the feature information table, so that the mobile phone 10 can further switch the scanning cycle of the mobile phone 10 by detecting the change of the cell identification.
  • cell identification Cellular Identity, cell ID
  • FIG6A shows a flowchart of another wireless communication method according to some embodiments of the present application, which is applied to a mobile phone 10 and specifically includes the following steps:
  • whether the mobile phone 10 needs to initiate a Wi-Fi scan may be determined by detecting the Wi-Fi connection mode of the mobile phone 10 .
  • step S601A when it is detected that the Wi-Fi connection mode of the mobile phone 10 is connected, it means that the mobile phone 10 has been connected to the Wi-Fi network, and there is no need to initiate a Wi-Fi scan, jump to step S601A, and the process ends; or for example, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected, it means that the mobile phone 10 is not connected to the Wi-Fi network, and a Wi-Fi scan needs to be initiated, jump to step S602.
  • the mobile phone 10 when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected and the cell identifier of the mobile phone 10 has not changed, it means that the mobile phone 10 may stay at the location when the Wi-Fi connection mode is not connected, and jump to step S602A.
  • S602A Acquire the channel set of the mobile phone 10 and control the mobile phone 10 to perform full channel scanning through cycle 003.
  • the channel set of the mobile phone 10 is obtained and the mobile phone 10 is controlled to perform a full channel scan based on the channel set through period 003.
  • cycle 003 is relative to cycle 002 and cycle 001 in FIG. 5A above, and the scanning cycle relationship of each cycle is cycle 003>cycle 001>cycle 002.
  • the interval scanning time of cycle 003 is the longest. For example, a Wi-Fi scan is performed every 120 seconds. This is because the mobile phone 10 is not currently connected to the Wi-Fi network, and the cell identification of the mobile phone 10 has not changed, indicating that the mobile phone 10 may stay at the location where the Wi-Fi network is not connected, that is, the mobile phone 10 cannot connect to the Wi-Fi network. Therefore, using the cycle 003 with the longest interval scanning time for Wi-Fi scanning can reduce the scanning power consumption of the mobile phone 10. At the same time, since the mobile phone 10 is not connected to the Wi-Fi network at this time, the full channel scanning method can improve the efficiency of the mobile phone 10 scanning network devices.
  • the Wi-Fi connection mode of the mobile phone 10 when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected and the cell identifier of the mobile phone 10 changes, it means that the user may move the mobile phone 10 away from the location when the Wi-Fi connection mode is not connected, and jump to step S602B.
  • S602B Obtain a feature information table of the mobile phone 10, and match the change result of the cell identifier with the feature information table.
  • a feature information table corresponding to the target network device is generated by collecting the Wi-Fi fingerprint and cell identification set of the mobile phone 10 .
  • the characteristic information table 60 includes the MAC address of the target network device, the target channel, the cell identifier set, the Wi-Fi fingerprint, and the connection state.
  • the MAC address of the target network device is used to indicate the MAC address of the network device 01
  • the target channel is used to indicate the Wi-Fi channel of the mobile phone 10 to access the network device 01
  • the cell identifier set is used to indicate the multiple cell identifiers collected when the mobile phone 10 accesses and disconnects the network device 01, such as the cell identifiers 1A, 1B, and 1C
  • the Wi-Fi fingerprint is used to indicate the MAC addresses of the multiple network devices collected when the mobile phone 10 accesses and disconnects the network device 01, such as the MAC addresses of the network devices 01 to 07, and the MAC address of the network device 01 currently connected by the mobile phone 10 is used as the MAC address of the target network device
  • the connection state is used to indicate the MAC addresses of the target network device, the target channel, the cell identifier set, the Wi-Fi
  • step S602B as shown in FIG5B , the user carries the mobile phone 10 and moves from position 10D to position 10C, and the mobile phone changes from cell identifier 1D to cell identifier 1C, that is, the change result is cell identifier 1C, and the change result matches the cell identifier set in the feature information table, indicating that there may be network devices that can be scanned around the mobile phone 10, and jumps to step S603, that is, obtaining the channel set of the mobile phone 10, and after clearing the scanning times of each scanning channel in the channel set, controlling the mobile phone 10 to perform a full channel scan through cycle 001, thereby improving the efficiency of the mobile phone 10 in scanning network devices and ensuring the efficiency of the mobile phone 10 in scanning network devices.
  • step S603 when the mobile phone 10 scans a network device through all channels and the network device is a network device that the mobile phone 10 has historically connected to, such as when the network device 01 is scanned, it indicates that the mobile phone 10 matches the target network device and jumps to step S603A, that is, the mobile phone 10 can automatically access the Wi-Fi network provided by the network device 01.
  • step S603 the mobile phone 10 scans the network device through all channels, and the network device is the mobile phone 10
  • the network device is the mobile phone 10
  • the network device has not been connected in the history, such as when the network device 01 is not scanned, it means that the mobile phone 10 does not match the target network device, and jumps to step S604, that is, obtaining the feature information table of the mobile phone 10, and matching the scanning result of the full channel scan with the feature information table.
  • step S604 when the MAC addresses of multiple network devices in the scan results of the full channel scan of the mobile phone 10 are partially identical to the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint, it is determined that the scan result matches the Wi-Fi fingerprint, and the process jumps to step S605, that is, obtaining the target channel from the feature information table, and controlling the mobile phone 10 to perform partial channel scanning based on the target channel and through cycle 002.
  • step S605 after the user carries the mobile phone 10 and moves from position 10C to position 10A, the mobile phone 10 scans the network device 01 and jumps to step S603A.
  • the mobile phone 10 can automatically access the Wi-Fi network provided by the network device 01.
  • step S605 if the user carries the mobile phone 10 and moves from position 10C in a direction away from position 10A, such as from position 10C to position 10D, the mobile phone 10 cannot scan the network device 01, and the mobile phone 10 cannot automatically access the Wi-Fi network provided by the network device 01, then the process jumps to step S606, i.e., recording the number of scans of the target channel and determining whether the number of scans of the target channel exceeds a preset number.
  • step S606 when the mobile phone 10 fails to scan the network device 01 and the number of scans of the target channel does not exceed the preset number, it may indicate that the user carrying the mobile phone 10 may be moving in a direction close to the network device 01, and the process jumps to step S605, and the mobile phone 10 continues to use the target channel and cycle 002 for Wi-Fi scanning.
  • step S604 when the MAC addresses of multiple network devices in the scan result are all different from the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint, it is determined that the scan result does not match the Wi-Fi fingerprint, and the process jumps to step S607.
  • step S606 when the mobile phone 10 fails to scan the network device 01 and the number of scans of the target channel exceeds a preset number, it indicates that the user carrying the mobile phone 10 may be moving in a direction away from the signal of the network device 01, and thus the mobile phone 10 cannot automatically access the Wi-Fi network provided by the network device 01 in a short period of time, and the process jumps to step S607.
  • step S603 when it is detected that the state mode of the mobile phone 10 is a mobile state, jump to step S603, that is, obtain the channel set of the mobile phone 10, clear the scanning times of each scanning channel in the channel set, and control the mobile phone 10 to perform a full channel scan through cycle 001.
  • step S604 the scanning result of mobile phone 10 does not match the Wi-Fi fingerprint; however, since in step S602B, the change result of the cell identifier of mobile phone 10 matches the cell identifier set; and mobile phone 10 is in a mobile state, mobile phone 10 may obtain other network devices in the mobile state, and then update the scanning result, so that the scanning result may match the Wi-Fi fingerprint or the target network device, that is, mobile phone 10 can continue to perform full-channel scanning through cycle 001, and the interval scanning time of cycle 001 is less than the interval scanning time of cycle 003. Mobile phone 10 uses the full-channel scanning method of cycle 001, which can improve the efficiency of mobile phone 10 scanning network devices.
  • step S602A when it is detected that the state mode of the mobile phone 10 is a stationary state, the process jumps to step S602A, that is, obtaining the channel combination of the mobile phone 10 and controlling the mobile phone 10 to perform a full channel scan through cycle 003.
  • step S604 the scanning result of the mobile phone 10 does not match the Wi-Fi fingerprint, and the mobile phone 10 is in a stationary state, that is, the mobile phone 10 stays at a position where the scanning result does not match the Wi-Fi fingerprint, that is, the mobile phone 10 cannot connect to the Wi-Fi network, so the Wi-Fi scan is performed using the cycle 003 with the longest interval scanning time, which can reduce the scanning power consumption of the mobile phone 10.
  • the full channel scanning method can improve the efficiency of the mobile phone 10 scanning network devices.
  • step S602A if it is detected that the mobile phone 10 switches from a stationary state to a moving state, the process jumps to step S602, that is, detecting whether the cell identifier of the mobile phone 10 changes.
  • the mobile phone 10 uses the cycle 003 with the longest interval scanning time to perform Wi-Fi scanning.
  • the process shown in FIG. 6A adds the step of detecting the cell identification and the state mode of the mobile phone 10, and switching the scanning cycle of the mobile phone 10 based on the result of the detection, so that the mobile phone 10 can switch between cycles 001 to 003.
  • the cell identifiers of each signal base station in the signal area can be obtained, that is, the acquisition of the cell identifier by the mobile phone 10 will not increase the power consumption of the mobile phone 10.
  • the interval scanning time of cycle 003 is the longest.
  • the detection of the cell identifier allows the mobile phone 10 to switch between cycles 001 to 003, which can effectively reduce the scanning power consumption of the mobile phone 10.
  • the mobile phone 10 matches multiple features in the feature information table, so that the mobile phone 10 switches between the full channel scanning mode, the single channel or the multi-channel scanning mode while switching between cycles 001 to 003, further reducing the scanning power consumption of the mobile phone 10, and improving the efficiency of the mobile phone 10 scanning the network equipment through the switching of the cycle.
  • the detection of the cell identification and status mode of the mobile phone 10 in the flowchart shown in Figure 6A above is only an example. In other embodiments, the detection of the cell identification and status mode of the mobile phone 10 can also be applied to any one of the scenarios in Figures 1 to 5D above or a combination of any multiple scenarios, without specific limitation.
  • FIG7 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
  • the mobile phone 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc.
  • different processing units can be independent devices or integrated in one or more processors.
  • the controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
  • the processor 110 can execute the instructions corresponding to the wireless communication methods provided in the aforementioned embodiments.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and improves processing efficiency.
  • the processor 110 may include one or more interfaces.
  • the interface 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.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple groups of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the mobile phone 10.
  • the I2S interface can be used for audio communication.
  • the processor 110 can include multiple I2S buses.
  • the processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
  • the wireless communication module 160 can be coupled via a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 via a PCM interface to implement the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the mobile phone 10.
  • the processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the mobile phone 10.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
  • the USB interface 130 is an interface that complies with USB standard specifications, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the mobile phone 10, and can also be used to transfer data between the mobile phone 10 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the mobile phone 10.
  • the mobile phone 10 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from a wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the mobile phone 10. While the charging management module 140 is charging the battery 142, it may also power the mobile phone 10 through the power management module 141.
  • 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
  • the power management module 141 can also be set in the processor 110.
  • the power management module 141 and the charging management module 140 can also be set in the same device.
  • the wireless communication function of the mobile phone 10 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone 10 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
  • antenna 1 can be reused as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G/6G applied to the mobile phone 10.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
  • at least some of the functional modules of the mobile communication module 150 can be set in the processor 110.
  • at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate 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.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless communication solutions for the mobile phone 10, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared
  • 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 the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
  • the antenna 1 of the mobile phone 10 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 10 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), 5G and subsequent evolution standards, BT, GNSS, WLAN, NFC, FM, and/or IR technology.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE long term evolution
  • 5G and subsequent evolution standards BT, GNSS, WLAN, NFC, FM, and/or IR technology.
  • GNSS may include the global positioning system (GPS), the global navigation satellite system
  • the mobile phone 10 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the mobile phone 10 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the mobile phone 10 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on the noise, brightness and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • ISP can be set in camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor.
  • CMOS complementary metal oxide semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
  • the mobile phone 10 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the mobile phone 10 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital videos.
  • Mobile phone 10 may support one or more video codecs.
  • mobile phone 10 may play or record videos in a variety of coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG moving picture experts group
  • NPU is a neural network (NN) computing processor. It can quickly process input information by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, and can also continuously self-learn. NPU can realize applications such as intelligent cognition of the mobile phone 10, such as image recognition, face recognition, voice recognition, text understanding, etc.
  • NN neural network
  • 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 terminal device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
  • the internal memory 121 may be used to store computer executable program codes, which may include instructions.
  • 121 may include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the data storage area may store data created during the use of the mobile phone 10 (such as audio data, a phone book, etc.), etc.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • UFS universal flash storage
  • the processor 110 executes various functional applications and data processing of the mobile phone 10 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the internal memory 121 may be used to temporarily store instructions of the wireless communication method provided in the aforementioned embodiments.
  • the mobile phone 10 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be connected to or separated from the mobile phone 10 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.
  • the mobile phone 10 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the mobile phone 10 interacts with the network through the SIM card to implement functions such as calls and data communications.
  • the mobile phone 10 uses an eSIM, i.e., an embedded SIM card.
  • the eSIM card can be embedded in the mobile phone 10 and cannot be separated from the mobile phone 10.
  • FIG8 shows a schematic structural diagram of a terminal device 100 according to some embodiments of the present application.
  • the terminal device 100 includes a main processor 100A, a sensor 100B, a cellular chip 100C, a Wi-Fi chip 100D, a storage device 100E, other components 100F, and the like.
  • the main processor 100A is used to detect the Wi-Fi connection mode of the terminal device 100; to detect whether the cell identification of the terminal device 100 changes; to match the change result of the cell identification of the terminal device 100 with the characteristic information table; to clear the scanning times of each scanning channel in the channel set of the terminal device 100; to match the scanning results of the full channel scanning of the terminal device 100 with the characteristic information table; to determine whether the scanning times of the target channel of the terminal device 100 exceeds the preset times; to detect the switching of the terminal device 100 from the static state to the mobile state, etc.
  • the specific functions of the main processor 100A and the method for implementing the specific functions can refer to the description of the steps shown in the aforementioned Figures 5A and 6A.
  • the sensor 100B is used to obtain the state mode of the terminal device 100, such as a stationary state, a moving state, etc.
  • the cellular chip 100C is used to obtain the cell identifier of the terminal device 100, such as the cell identifiers 1A, 1B, 1C, etc.
  • the Wi-Fi chip 100D is used to obtain the scanning result of the Wi-Fi scanning of the terminal device 100.
  • the scanning result may include network devices 01 to 09, etc.
  • the storage device 100E is used to store authentication information, information feature table, channel set, etc. for the terminal device 100 to access the Wi-Fi network.
  • the structure shown in the embodiments of the present application does not constitute a specific limitation on the terminal device 100.
  • the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules.
  • the physical implementation method of these logical units/modules themselves is not the most important.
  • the combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application.
  • the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present application relates to the technical field of communications, and discloses a wireless communication method, a storage medium, and a terminal device. The method comprises: identifying, by means of a stored first Wi-Fi fingerprint, a Wi-Fi device scanned by a terminal device when historically accessing a Wi-Fi network. In a process wherein a terminal device performs a Wi-Fi scan in a first scan mode, for example, when the terminal device has disconnected from a Wi-Fi network and needs to rescan for network connections, and the Wi-Fi devices scanned by the terminal device comprise a Wi-Fi device previously scanned by the terminal device when historically accessing a Wi-Fi network, it can be determined that the terminal device is currently near the location where the terminal device historically accessed the Wi-Fi network, the scan time of the terminal device can be shortened and the Wi-Fi scan frequency of the terminal device can be increased, thereby improving the efficiency of the terminal device re-accessing the Wi-Fi network.

Description

无线通信方法、存储介质及终端设备Wireless communication method, storage medium and terminal device
本申请要求于2022年11月18日提交中国专利局、申请号为202211448766.7、发明名称为“无线通信方法、存储介质及终端设备”的中国专利申请的优先权,上述专利的全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on November 18, 2022, with application number 202211448766.7 and invention name “Wireless Communication Method, Storage Medium and Terminal Device”. The entire contents of the above patent are incorporated into this application by reference.
技术领域Technical Field
本申请涉及通信技术领域,尤其涉及一种无线通信方法、存储介质及终端设备。The present application relates to the field of communication technology, and in particular to a wireless communication method, a storage medium, and a terminal device.
背景技术Background technique
在无线保真(Wireless-Fidelity,Wi-Fi)通信系统中,终端设备为了发现网络设备,终端设备会进行周期性的全信道扫描,以扫描周围是否存在可接入的网络设备。当终端设备扫描到并接入某网络设备提供的Wi-Fi网络时,终端设备可以存储接入该网络设备时的认证信息;在终端设备断开Wi-Fi网络重新扫描到该网络设备时,终端设备可以从存储记录中获取对应该网络设备的认证信息以向该网络设备发起认证,使得终端设备可以自动回连该网络设备提供的Wi-Fi网络。In a wireless fidelity (Wi-Fi) communication system, in order to discover network devices, the terminal device will perform periodic full-channel scanning to scan whether there are accessible network devices around. When the terminal device scans and accesses the Wi-Fi network provided by a network device, the terminal device can store the authentication information when accessing the network device; when the terminal device disconnects from the Wi-Fi network and re-scans the network device, the terminal device can obtain the authentication information corresponding to the network device from the stored record to initiate authentication to the network device, so that the terminal device can automatically reconnect to the Wi-Fi network provided by the network device.
然而,目前终端设备的扫描周期较长,例如终端设备处于待机状态时的扫描周期最长可以是300秒,导致终端设备回连效率较差,且全信道扫描使得终端设备需要在多条Wi-Fi信道上来回切换扫描,导致终端设备扫描功耗较高,影响终端设备性能。However, the current scanning cycle of terminal devices is relatively long. For example, the scanning cycle of a terminal device in standby mode can be as long as 300 seconds, resulting in poor terminal device reconnection efficiency. In addition, full-channel scanning requires the terminal device to switch back and forth on multiple Wi-Fi channels for scanning, resulting in high terminal device scanning power consumption, which affects terminal device performance.
发明内容Summary of the invention
本申请实施例提供了一种无线通信方法、存储介质及终端设备,通过已存储的Wi-Fi指纹和小区标识对终端设备在历史接入Wi-Fi网络时所扫描到的Wi-Fi设备进行标识,使得终端设备在未连接Wi-Fi网络时,通过Wi-Fi指纹和小区标识进行Wi-Fi扫描方式的切换,降低终端设备的Wi-Fi扫描功耗,同时,提高终端设备重新接入Wi-Fi网络的效率。The embodiments of the present application provide a wireless communication method, a storage medium, and a terminal device, which identify Wi-Fi devices scanned by a terminal device when it has historically accessed a Wi-Fi network through stored Wi-Fi fingerprints and cell identifiers, so that when the terminal device is not connected to a Wi-Fi network, the Wi-Fi scanning mode is switched through the Wi-Fi fingerprint and the cell identifier, thereby reducing the Wi-Fi scanning power consumption of the terminal device and improving the efficiency of the terminal device re-accessing the Wi-Fi network.
第一方面,本申请提供了一种无线通信方法,包括:终端设备以第一扫描方式进行Wi-Fi扫描;终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系满足第一匹配条件;终端设备以第二扫描方式进行Wi-Fi扫描,其中,第一扫描方式的扫描间隔大于第二扫描方式的扫描间隔。In a first aspect, the present application provides a wireless communication method, including: a terminal device performs a Wi-Fi scan in a first scanning mode; a matching relationship between a Wi-Fi device scanned by the terminal device and a Wi-Fi device in a stored first Wi-Fi fingerprint satisfies a first matching condition; and the terminal device performs a Wi-Fi scan in a second scanning mode, wherein a scanning interval of the first scanning mode is greater than a scanning interval of the second scanning mode.
在本申请实施例中,第一扫描方式用于表示基于周期001进行Wi-Fi扫描,第二扫描方式用于表示基于周期002进行Wi-Fi扫描。通过已存储的第一Wi-Fi指纹对终端设备在历史接入Wi-Fi网络时所扫描到的Wi-Fi设备进行标识。在终端设备以第一扫描方式进行Wi-Fi扫描的过程中,例如终端设备断开Wi-Fi网络,需要重新扫描连网的过程中,当终端设备扫描到的Wi-Fi设备中包括历史终端设备接入Wi-Fi网络时所扫描到的Wi-Fi设备时,可以确定当前终端设备距离历史接入Wi-Fi网络时的位置较近,终端设备可以缩短扫描时间,提高Wi-Fi扫描频率,进而提高终端设备重新接入Wi-Fi网络的效率。In an embodiment of the present application, the first scanning mode is used to indicate a Wi-Fi scan based on cycle 001, and the second scanning mode is used to indicate a Wi-Fi scan based on cycle 002. The Wi-Fi devices scanned by the terminal device when it historically accesses the Wi-Fi network are identified by the stored first Wi-Fi fingerprint. In the process of the terminal device performing Wi-Fi scanning in the first scanning mode, for example, when the terminal device is disconnected from the Wi-Fi network and needs to rescan for networking, when the Wi-Fi devices scanned by the terminal device include Wi-Fi devices scanned when the terminal device historically accessed the Wi-Fi network, it can be determined that the current terminal device is closer to the location when it historically accessed the Wi-Fi network, and the terminal device can shorten the scanning time, increase the Wi-Fi scanning frequency, and thereby improve the efficiency of the terminal device re-accessing the Wi-Fi network.
在上述第一方面的一种可能的实现中,上述第一Wi-Fi指纹通过以下方法确定:终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号;获取终端设备扫描到的多个第二Wi-Fi设备;基于第一Wi-Fi设备和多个第二Wi-Fi设备确定第一Wi-Fi指纹。In a possible implementation of the first aspect, the first Wi-Fi fingerprint is determined by the following method: the terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device; acquires multiple second Wi-Fi devices scanned by the terminal device; and determines the first Wi-Fi fingerprint based on the first Wi-Fi device and the multiple second Wi-Fi devices.
在本申请实施例中,第一Wi-Fi设备用于表示目标网络设备,第二Wi-Fi设备用于表示关联网络设备。当终端设备扫描到并接入某一网络设备提供的Wi-Fi网络时,记录当前终端设备扫描到的所有网络设备。在所有网络设备中,将当前终端设备所接入的网络设备作为第一Wi-Fi设备,未接入的网络设备作为第二Wi-Fi设备,基于第一Wi-Fi设备和多个第二Wi-Fi设备生成第一Wi-Fi指纹。In the embodiment of the present application, the first Wi-Fi device is used to represent the target network device, and the second Wi-Fi device is used to represent the associated network device. When the terminal device scans and accesses the Wi-Fi network provided by a certain network device, all network devices scanned by the current terminal device are recorded. Among all network devices, the network device connected to the current terminal device is regarded as the first Wi-Fi device, and the network device not connected is regarded as the second Wi-Fi device, and the first Wi-Fi fingerprint is generated based on the first Wi-Fi device and multiple second Wi-Fi devices.
在上述第一方面的一种可能的实现中,上述第一Wi-Fi指纹通过以下方法确定:终端设备在第一时间接入第一Wi-Fi设备提供的第一Wi-Fi信号;获取终端设备在第一时间扫描到的多个第二Wi-Fi设备;基于第一Wi-Fi设备和多个第二Wi-Fi设备确定第一Wi-Fi指纹。 In a possible implementation of the first aspect, the first Wi-Fi fingerprint is determined by the following method: the terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device at a first time; acquires multiple second Wi-Fi devices scanned by the terminal device at the first time; and determines the first Wi-Fi fingerprint based on the first Wi-Fi device and the multiple second Wi-Fi devices.
在本申请实施例中,第一时间用于表示终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号的时间。可以在终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号的时间采集针对第一Wi-Fi设备的Wi-Fi指纹。In the embodiment of the present application, the first time is used to indicate the time when the terminal device accesses the first Wi-Fi signal provided by the first Wi-Fi device. The Wi-Fi fingerprint for the first Wi-Fi device can be collected at the time when the terminal device accesses the first Wi-Fi signal provided by the first Wi-Fi device.
在上述第一方面的一种可能的实现中,上述方法还包括:终端设备在第二时间断开第一Wi-Fi设备提供的第一Wi-Fi信号;将终端设备在第二时间扫描到的多个Wi-Fi设备作为第二Wi-Fi设备以更新第一Wi-Fi指纹。In a possible implementation of the first aspect, the method further includes: the terminal device disconnecting the first Wi-Fi signal provided by the first Wi-Fi device at a second time; and using the multiple Wi-Fi devices scanned by the terminal device at the second time as second Wi-Fi devices to update the first Wi-Fi fingerprint.
在本申请实施例中,第二时间用于表示终端设备断开第一Wi-Fi设备提供的第一Wi-Fi信号的时间。还可以在终端设备断开第一Wi-Fi设备提供的第一Wi-Fi信号的时间采集针对第一Wi-Fi设备的Wi-Fi指纹。In the embodiment of the present application, the second time is used to indicate the time when the terminal device disconnects the first Wi-Fi signal provided by the first Wi-Fi device. The Wi-Fi fingerprint for the first Wi-Fi device can also be collected when the terminal device disconnects the first Wi-Fi signal provided by the first Wi-Fi device.
在上述第一方面的一种可能的实现中,上述终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系满足第一匹配条件,包括:终端设备扫描到的Wi-Fi设备包括全部或部分多个第二Wi-Fi设备。In a possible implementation of the first aspect, the matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint satisfies the first matching condition, including: the Wi-Fi device scanned by the terminal device includes all or part of the plurality of second Wi-Fi devices.
在本申请实施例中,当上述匹配关系满足第一匹配条件,表示终端设备扫描到的Wi-Fi设备中包括历史终端设备接入第一Wi-Fi设备时所扫描到的第二Wi-Fi设备时,可以确定当前终端设备距离历史接入第一Wi-Fi设备提供的第一Wi-Fi信号时的位置较近。In the embodiment of the present application, when the above-mentioned matching relationship satisfies the first matching condition, indicating that the Wi-Fi devices scanned by the terminal device include the second Wi-Fi device scanned when the terminal device historically accessed the first Wi-Fi device, it can be determined that the current terminal device is closer to the location when the terminal device historically accessed the first Wi-Fi signal provided by the first Wi-Fi device.
在上述第一方面的一种可能的实现中,上述方法还包括:对应于终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系不满足第一匹配条件,终端设备以第一扫描方式进行Wi-Fi扫描。In a possible implementation of the first aspect, the method further includes: corresponding to the matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint not satisfying the first matching condition, the terminal device performing a Wi-Fi scan in a first scanning mode.
在本申请实施例中,当上述匹配关系不满足第一匹配条件,表示当前终端设备所在位置周围没有历史接入过的第一Wi-Fi设备,终端设备无法自动接入Wi-Fi网络,故使用间隔扫描时间较长的周期001进行Wi-Fi扫描,进而降低终端设备的扫描功耗。In an embodiment of the present application, when the above-mentioned matching relationship does not meet the first matching condition, it means that there is no first Wi-Fi device that has been historically connected around the current location of the terminal device, and the terminal device cannot automatically access the Wi-Fi network. Therefore, a Wi-Fi scan is performed using a cycle 001 with a longer interval scanning time, thereby reducing the scanning power consumption of the terminal device.
在上述第一方面的一种可能的实现中,上述终端设备以第一扫描方式进行Wi-Fi扫描,包括:当终端设备扫描到的Wi-Fi设备包括第一Wi-Fi设备时,终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号;当终端设备扫描到的Wi-Fi设备未包括第一Wi-Fi设备时,判断终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系是否满足第一匹配条件。In a possible implementation of the first aspect, the terminal device performs Wi-Fi scanning in a first scanning mode, including: when the Wi-Fi devices scanned by the terminal device include the first Wi-Fi device, the terminal device accesses a first Wi-Fi signal provided by the first Wi-Fi device; and when the Wi-Fi devices scanned by the terminal device do not include the first Wi-Fi device, determining whether a matching relationship between the Wi-Fi devices scanned by the terminal device and the Wi-Fi devices in a stored first Wi-Fi fingerprint satisfies a first matching condition.
在上述第一方面的一种可能的实现中,上述终端设备以第二扫描方式进行Wi-Fi扫描,包括:对应于终端设备扫描到的Wi-Fi设备包括第一Wi-Fi设备,终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号。In a possible implementation of the first aspect, the terminal device performs Wi-Fi scanning in the second scanning mode, including: corresponding to the Wi-Fi device scanned by the terminal device including the first Wi-Fi device, the terminal device accesses a first Wi-Fi signal provided by the first Wi-Fi device.
在上述第一方面的一种可能的实现中,上述终端设备的Wi-Fi扫描支持的Wi-Fi信道包括多个第一Wi-Fi信道;第一扫描方式包括:基于多个第一Wi-Fi信道进行Wi-Fi扫描。In a possible implementation of the first aspect, the Wi-Fi channels supported by the Wi-Fi scanning of the terminal device include multiple first Wi-Fi channels; and the first scanning mode includes: performing Wi-Fi scanning based on the multiple first Wi-Fi channels.
在本申请实施例中,多个第一Wi-Fi信道可以是2.4GHz和5GHz工作频段中终端设备可使用的任意Wi-Fi信道的组合,多个第一Wi-Fi信道也可以是终端设备进行Wi-Fi扫描所支持的全部Wi-Fi信道。第一扫描方式用于表示基于周期001并采用多个第一Wi-Fi信道进行Wi-Fi扫描。由于终端设备采用第一扫描方式时为未连接Wi-Fi网络状态,故在周期001中采用多个第一Wi-Fi信道(全信道扫描方式)可以提高终端设备扫描到Wi-Fi设备的效率。In an embodiment of the present application, the multiple first Wi-Fi channels may be a combination of any Wi-Fi channels that can be used by the terminal device in the 2.4 GHz and 5 GHz operating frequency bands, and the multiple first Wi-Fi channels may also be all Wi-Fi channels supported by the terminal device for Wi-Fi scanning. The first scanning mode is used to indicate that Wi-Fi scanning is performed based on cycle 001 and using multiple first Wi-Fi channels. Since the terminal device is not connected to the Wi-Fi network when using the first scanning mode, using multiple first Wi-Fi channels (full channel scanning mode) in cycle 001 can improve the efficiency of the terminal device scanning to Wi-Fi devices.
在上述第一方面的一种可能的实现中,上述终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号的Wi-Fi信道为第二Wi-Fi信道,其中,第二Wi-Fi信道为多个第一Wi-Fi信道中的任意一个;第二扫描方式包括:基于第二Wi-Fi信道进行Wi-Fi扫描。In a possible implementation of the first aspect, a Wi-Fi channel through which the terminal device accesses the first Wi-Fi signal provided by the first Wi-Fi device is a second Wi-Fi channel, wherein the second Wi-Fi channel is any one of the multiple first Wi-Fi channels; and the second scanning mode includes: performing Wi-Fi scanning based on the second Wi-Fi channel.
在本申请实施例中,第二Wi-Fi信道用于表示目标信道。在确定当前终端设备距离历史接入第一Wi-Fi设备提供的第一Wi-Fi信号时的位置较近后,终端设备可以从多个第一Wi-Fi信道(全信道扫描方式)切换至基于第二Wi-Fi信道(单信道扫描方式),降低扫描功耗并确保对第一Wi-Fi设备的扫描搜寻。In the embodiment of the present application, the second Wi-Fi channel is used to represent the target channel. After determining that the current terminal device is close to the location when the first Wi-Fi signal provided by the first Wi-Fi device was historically accessed, the terminal device can switch from multiple first Wi-Fi channels (all-channel scanning mode) to the second Wi-Fi channel (single-channel scanning mode), reducing scanning power consumption and ensuring scanning and searching for the first Wi-Fi device.
在上述第一方面的一种可能的实现中,上述终端设备以第二扫描方式进行Wi-Fi扫描,包括:获取终端设备基于第二Wi-Fi信道进行Wi-Fi扫描的第一扫描次数;对应于第一扫描次数未超过第一阈值,终端设备以第二扫描方式进行Wi-Fi扫描;对应于第一扫描次数超过第一阈值,终端设备以第一扫描方式进行Wi-Fi扫描。In a possible implementation of the first aspect, the terminal device performs the Wi-Fi scan in the second scanning mode, including: acquiring a first scanning number of the terminal device performing the Wi-Fi scan based on the second Wi-Fi channel; corresponding to the first scanning number not exceeding the first threshold, the terminal device performs the Wi-Fi scan in the second scanning mode; corresponding to the first scanning number exceeding the first threshold, the terminal device performs the Wi-Fi scan in the first scanning mode.
本申请实施例中,当终端设备未扫描到第一Wi-Fi设备,且第二Wi-Fi信道的第一扫描次数 未超过第一阈值时,可以表示用户携带终端设备可能向靠近第一Wi-Fi设备的方向移动,终端设备继续采用第二扫描方式进行Wi-Fi扫描。当终端设备未扫描到第一Wi-Fi设备,且第二Wi-Fi信道的第一扫描次数超过第一阈值时,表示用户携带终端设备可能向远离第一Wi-Fi设备的方向移动,进而使得终端设备短时间内无法自动接入第一Wi-Fi设备所提供的Wi-Fi网络,终端设备从第二扫描方式切换至第一扫描方式进行Wi-Fi扫描,提高终端设备扫描到Wi-Fi设备的效率,并降低终端设备的扫描功耗。In the embodiment of the present application, when the terminal device does not scan the first Wi-Fi device, and the first scanning number of the second Wi-Fi channel is When the first threshold is not exceeded, it may indicate that the user's terminal device may be moving in a direction close to the first Wi-Fi device, and the terminal device continues to use the second scanning mode to perform Wi-Fi scanning. When the terminal device does not scan the first Wi-Fi device, and the first scanning number of the second Wi-Fi channel exceeds the first threshold, it indicates that the user's terminal device may be moving in a direction away from the first Wi-Fi device, thereby making it impossible for the terminal device to automatically access the Wi-Fi network provided by the first Wi-Fi device in a short period of time. The terminal device switches from the second scanning mode to the first scanning mode for Wi-Fi scanning, thereby improving the efficiency of the terminal device scanning Wi-Fi devices and reducing the scanning power consumption of the terminal device.
在上述第一方面的一种可能的实现中,在上述终端设备以第一扫描方式进行Wi-Fi扫描之前,包括:终端设备接收到小区标识与已存储的第一小区标识集合中的小区标识之间的匹配关系满足第二匹配条件;终端设备以第一扫描方式进行Wi-Fi扫描。In a possible implementation of the first aspect, before the terminal device performs Wi-Fi scanning in the first scanning mode, the following steps include: a matching relationship between a cell identifier received by the terminal device and a cell identifier in a stored first cell identifier set satisfies a second matching condition; and the terminal device performs Wi-Fi scanning in the first scanning mode.
在本申请实施例中,小区标识集合用于表示终端设备接入和断开第一Wi-Fi设备提供的第一Wi-Fi信号时所采集的多个小区标识。In the embodiment of the present application, the cell identifier set is used to represent multiple cell identifiers collected when the terminal device accesses and disconnects the first Wi-Fi signal provided by the first Wi-Fi device.
在上述第一方面的一种可能的实现中,上述终端设备以第一扫描方式进行Wi-Fi扫描,包括:终端设备接收到小区标识与已存储的第一小区标识集合中的小区标识之间的匹配关系不满足第二匹配条件;终端设备以第三扫描方式进行Wi-Fi扫描;其中,第三扫描方式的扫描间隔大于第二扫描方式的扫描间隔。In a possible implementation of the first aspect, the terminal device performs Wi-Fi scanning in a first scanning mode, including: a matching relationship between a cell identifier received by the terminal device and a cell identifier in a stored first cell identifier set does not satisfy a second matching condition; and the terminal device performs Wi-Fi scanning in a third scanning mode; wherein a scanning interval of the third scanning mode is greater than a scanning interval of the second scanning mode.
在本申请实施例中,第三扫描方式用于表示基于周期003进行Wi-Fi扫描。In the embodiment of the present application, the third scanning mode is used to indicate that Wi-Fi scanning is performed based on cycle 003.
在上述第一方面的一种可能的实现中,上述第一小区标识集合通过以下方法确定:终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号;获取终端设备接收到的多个第一小区标识;基于多个第一小区标识确定第一小区标识集合。In a possible implementation of the first aspect, the first cell identifier set is determined by the following method: a terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device; multiple first cell identifiers received by the terminal device are acquired; and the first cell identifier set is determined based on the multiple first cell identifiers.
在上述第一方面的一种可能的实现中,上述第一小区标识集合通过以下方法确定:终端设备在第一时间接入第一Wi-Fi设备提供的第一Wi-Fi信号;获取终端设备在第一时间接收到的多个第一小区标识;基于多个第一小区标识确定第一小区标识集合。In a possible implementation of the first aspect, the first cell identifier set is determined by the following method: the terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device at a first time; obtains multiple first cell identifiers received by the terminal device at the first time; and determines the first cell identifier set based on the multiple first cell identifiers.
在上述第一方面的一种可能的实现中,上述方法还包括:终端设备在第二时间断开第一Wi-Fi设备提供的第一Wi-Fi信号;将终端设备在第二时间接收到的多个小区标识作为第一小区标识以更新第一小区标识集合。In a possible implementation of the first aspect, the method further includes: the terminal device disconnecting the first Wi-Fi signal provided by the first Wi-Fi device at a second time; and using the multiple cell identifiers received by the terminal device at the second time as the first cell identifier to update the first cell identifier set.
在本申请实施例中,终端设备接入或断开第一Wi-Fi设备提供的Wi-Fi网络时,终端设备可以同时采集终端设备的Wi-Fi指纹和小区标识,并存储小区标识、Wi-Fi指纹与终端设备当前接入的第一Wi-Fi设备的对应关系生成特征信息表,使得终端设备可以进一步地通过检测小区标识的变化对终端设备的扫描方式进行切换。In an embodiment of the present application, when a terminal device accesses or disconnects from a Wi-Fi network provided by a first Wi-Fi device, the terminal device may simultaneously collect the Wi-Fi fingerprint and the cell identifier of the terminal device, and store the correspondence between the cell identifier, the Wi-Fi fingerprint, and the first Wi-Fi device currently accessed by the terminal device to generate a feature information table, so that the terminal device may further switch the scanning mode of the terminal device by detecting changes in the cell identifier.
在上述第一方面的一种可能的实现中,上述方法还包括:第三扫描方式的扫描间隔大于或等于第一扫描方式的扫描间隔。In a possible implementation of the first aspect, the method further includes: a scanning interval of the third scanning mode is greater than or equal to a scanning interval of the first scanning mode.
本申请实施例中,各个扫描方式的扫描间隔关系为第三扫描方式>第一扫描方式>第二扫描方式。In the embodiment of the present application, the scanning interval relationship of each scanning mode is the third scanning mode>the first scanning mode>the second scanning mode.
在上述第一方面的一种可能的实现中,上述方法还包括:终端设备以第二扫描方式进行Wi-Fi扫描的Wi-Fi信道为第二Wi-Fi信道;终端设备基于第二Wi-Fi信道进行Wi-Fi扫描的第一扫描次数超过第一阈值时;对应于终端设备处于移动模式,终端设备以第二扫描方式进行Wi-Fi扫描;对应于终端设备处于静止模式,终端设备以第三扫描方式进行Wi-Fi扫描。In a possible implementation of the first aspect, the method further includes: a Wi-Fi channel on which the terminal device performs Wi-Fi scanning in a second scanning mode is a second Wi-Fi channel; when a first scanning number of Wi-Fi scanning performed by the terminal device based on the second Wi-Fi channel exceeds a first threshold; corresponding to the terminal device being in a mobile mode, the terminal device performs Wi-Fi scanning in the second scanning mode; corresponding to the terminal device being in a stationary mode, the terminal device performs Wi-Fi scanning in a third scanning mode.
本申请实施例中,移动模式用于表示移动状态,静止模式用于表示静止状态。In the embodiment of the present application, the mobile mode is used to indicate a mobile state, and the stationary mode is used to indicate a stationary state.
在上述第一方面的一种可能的实现中,上述方法还包括:终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系不满足第一匹配条件时;对应于终端设备处于移动模式,终端设备以第二扫描方式进行Wi-Fi扫描;对应于终端设备处于静止模式,终端设备以第三扫描方式进行Wi-Fi扫描。In a possible implementation of the first aspect, the method further includes: when a matching relationship between a Wi-Fi device scanned by the terminal device and a Wi-Fi device in a stored first Wi-Fi fingerprint does not satisfy a first matching condition; corresponding to the terminal device being in a mobile mode, the terminal device performs a Wi-Fi scan in a second scanning mode; corresponding to the terminal device being in a stationary mode, the terminal device performs a Wi-Fi scan in a third scanning mode.
在上述第一方面的一种可能的实现中,上述终端设备以第三扫描方式进行Wi-Fi扫描,包括:终端设备从静止模式切换至移动模式,判断终端设备接收到小区标识与已存储的第一小区标识集合中的小区标识之间的匹配关系是否满足第二匹配条件。In a possible implementation of the first aspect above, the terminal device performs Wi-Fi scanning in a third scanning mode, including: the terminal device switches from a stationary mode to a mobile mode, and determines whether a matching relationship between a cell identifier received by the terminal device and a cell identifier in a stored first cell identifier set satisfies a second matching condition.
在上述第一方面的一种可能的实现中,上述方法还包括:第一Wi-Fi指纹和/或第一小区标识集合存储在云服务器。 In a possible implementation of the first aspect, the method further includes: storing the first Wi-Fi fingerprint and/or the first cell identifier set in a cloud server.
在本申请实施例中,用户可以将Wi-Fi指纹和小区标识集合上传至云服务器,通过云服务器将Wi-Fi指纹和小区标识集合共享至用户的其他终端设备,使得用户使用其他终端设备时也可以通过Wi-Fi指纹和小区标识集合进行扫描方式的切换。In an embodiment of the present application, the user can upload the Wi-Fi fingerprint and cell identification set to the cloud server, and share the Wi-Fi fingerprint and cell identification set to the user's other terminal devices through the cloud server, so that the user can also switch the scanning mode through the Wi-Fi fingerprint and cell identification set when using other terminal devices.
第二方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储有指令,该指令在终端设备上执行时使终端设备实现上述第一方面及上述第一方面的各种可能实现提供的任意一种无线通信方法。In a second aspect, an embodiment of the present application provides a readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device implements any one of the wireless communication methods provided by the first aspect and various possible implementations of the first aspect.
第三方面,本申请实施例提供了一种终端设备,该终端设备包括:存储器,用于存储由终端设备的一个或多个处理器执行的指令;以及处理器,是终端设备的处理器之一,用于执行存储器中存储的指令以实现上述第一方面及上述第一方面的各种可能实现提供的任意一种无线通信方法。In a third aspect, an embodiment of the present application provides a terminal device, which includes: a memory for storing instructions executed by one or more processors of the terminal device; and a processor, which is one of the processors of the terminal device, for executing instructions stored in the memory to implement any one of the wireless communication methods provided by the first aspect and various possible implementations of the first aspect.
第四方面,本申请实施例提供了一种程序产品,该程序产品中包括指令,在该指令被终端设备执行时可以使终端设备实现上述第一方面及上述第一方面的各种可能实现提供的任意一种无线通信方法。In a fourth aspect, an embodiment of the present application provides a program product, which includes instructions, and when the instructions are executed by a terminal device, the terminal device can implement any one of the wireless communication methods provided by the first aspect and various possible implementations of the first aspect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1根据本申请的一些实施例,示出了一种无线保真通信系统的示例示意图;FIG1 shows an example schematic diagram of a wireless fidelity communication system according to some embodiments of the present application;
图2根据本申请的一些实施例,示出了Wi-Fi信道和Wi-Fi工作频段的示例示意图;FIG2 shows an example schematic diagram of a Wi-Fi channel and a Wi-Fi operating frequency band according to some embodiments of the present application;
图3根据本申请的一些实施例,示出了确定扫描时间的流程示意图;FIG3 is a schematic diagram showing a flow chart of determining a scanning time according to some embodiments of the present application;
图4根据本申请的一些实施例,示出了采集Wi-Fi指纹的场景示意图;FIG4 is a schematic diagram showing a scenario of collecting Wi-Fi fingerprints according to some embodiments of the present application;
图5A根据本申请的一些实施例,示出了一种无线通信方法的流程示意图;FIG5A is a schematic diagram showing a flow chart of a wireless communication method according to some embodiments of the present application;
图5B根据本申请的一些实施例,示出了一种无线通信方法的场景示意图;FIG5B is a schematic diagram showing a scenario of a wireless communication method according to some embodiments of the present application;
图5C根据本申请的一些实施例,示出了一种特征信息表的示例示意图;FIG5C shows an example schematic diagram of a feature information table according to some embodiments of the present application;
图5D根据本申请的一些实施例,示出了生成特征信息表的流程示意图;FIG5D is a schematic diagram showing a process of generating a feature information table according to some embodiments of the present application;
图6A根据本申请的一些实施例,示出了另一种无线通信方法的流程示意图;FIG6A is a schematic diagram showing a flow chart of another wireless communication method according to some embodiments of the present application;
图6B根据本申请的一些实施例,示出了另一种特征信息表的示例示意图;FIG6B shows an example schematic diagram of another feature information table according to some embodiments of the present application;
图7根据本申请的一些实施例,示出了一种手机10的结构示意图;FIG7 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application;
图8根据本申请的一些实施例,示出了一种终端设备100的结构示意图。FIG8 shows a schematic structural diagram of a terminal device 100 according to some embodiments of the present application.
具体实施方式Detailed ways
本申请的说明性实施例包括但不限于一种无线通信方法、存储介质及终端设备。The illustrative embodiments of the present application include but are not limited to a wireless communication method, a storage medium, and a terminal device.
为了便于本领域技术人员理解本申请实施例中的方案,以下先对本申请中的可能涉及的相关内容进行解释说明。In order to facilitate those skilled in the art to understand the solutions in the embodiments of the present application, the relevant contents that may be involved in the present application are first explained below.
(1)Wi-Fi接入过程(1) Wi-Fi access process
如图1所示,无线保真通信系统包括终端设备11和网络设备12,终端设备11可以通过网络设备12连接Wi-Fi网络。As shown in FIG. 1 , the wireless fidelity communication system includes a terminal device 11 and a network device 12 . The terminal device 11 can connect to a Wi-Fi network through the network device 12 .
终端设备11可以是任意支持无线网络连接的电子设备,包括但不限于:手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)或专门的照相机(例如单反相机、卡片式相机)等,例如图1所示,终端设备11为手机。The terminal device 11 can be any electronic device that supports wireless network connection, including but not limited to: mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA) or special cameras (such as SLR cameras, card cameras), etc. For example, as shown in Figure 1, the terminal device 11 is a mobile phone.
网络设备12可以是无线网络中的无线交换机,包括但不限于:无线路由器、无线网卡、调制解调器等,例如图1所示,网络设备12为无线路由器。The network device 12 may be a wireless switch in a wireless network, including but not limited to: a wireless router, a wireless network card, a modem, etc. For example, as shown in FIG. 1 , the network device 12 is a wireless router.
在一些实施例中,终端设备11接入网络设备12提供的Wi-Fi网络的过程通常包括:扫描(Scanning)、认证(Authentication)和关联(Association)三个阶段。结合图1所示,以下手机作为终端设备11的示例,无线路由器作为网络设备12的示例,对三个阶段的相关过程进行解释说明,具体如下:In some embodiments, the process of the terminal device 11 accessing the Wi-Fi network provided by the network device 12 generally includes three stages: scanning, authentication, and association. In conjunction with FIG1 , the following mobile phone is used as an example of the terminal device 11, and the wireless router is used as an example of the network device 12, and the related processes of the three stages are explained as follows:
首先,手机通过Wi-Fi扫描可以获取到手机周围的无线路由器提供的Wi-Fi网络。其中,根据手机的Wi-Fi扫描方式的不同,Wi-Fi扫描可以进一步分为主动扫描和被动扫描。First, the mobile phone can obtain the Wi-Fi network provided by the wireless routers around the mobile phone through Wi-Fi scanning. Among them, according to the different Wi-Fi scanning methods of the mobile phone, Wi-Fi scanning can be further divided into active scanning and passive scanning.
主动扫描:手机在扫描的时候,主动在Wi-Fi信道上发送探测请求(Probe Request)帧,通过接收周 围的无线路由器发送的探测响应(Probe Response)帧以发现对应无线路由器提供Wi-Fi网络。探测响应帧包括但不限于:服务集标识符(Service Set Identifier,SSID)、基本服务集标识符(Basic Service Set Identifier,BSSID)、加密和认证方式等无线网络信息。Active scanning: When scanning, the mobile phone actively sends a probe request frame on the Wi-Fi channel. The probe response frame sent by the surrounding wireless routers is used to find the corresponding wireless router providing the Wi-Fi network. The probe response frame includes but is not limited to: Service Set Identifier (SSID), Basic Service Set Identifier (BSSID), encryption and authentication methods and other wireless network information.
被动扫描:手机通过监听无线路由器定期发送的信标(Beacon)帧发现周围的无线路由器提供的Wi-Fi网络。可以理解,无线路由器定期在Wi-Fi信道上广播Beacon帧,该Beacon帧包括SSID、BSSID、加密和认证方式等无线网络信息。Passive scanning: The mobile phone discovers the Wi-Fi network provided by the surrounding wireless routers by listening to the beacon frames sent regularly by the wireless routers. It can be understood that the wireless routers regularly broadcast Beacon frames on the Wi-Fi channel, and the Beacon frames include wireless network information such as SSID, BSSID, encryption and authentication methods.
其次,手机通过Wi-Fi扫描获取到周围的无线路由器提供的Wi-Fi网络之后,根据Wi-Fi网络向对应的无线路由器发起认证请求。Secondly, after the mobile phone obtains the Wi-Fi network provided by the surrounding wireless routers through Wi-Fi scanning, it initiates an authentication request to the corresponding wireless router based on the Wi-Fi network.
例如,手机通过Wi-Fi扫描获取到周围的无线路由器提供的Wi-Fi网络,并将扫描到的Wi-Fi网络的SSID显示在显示屏上;用户如果需要加入某个无线网络,可以点击显示屏上对应的SSID,手机响应于用户的点击操作,弹出密码输入窗口;用户在密码输入窗口输入密码等信息之后,再点击连接按钮,手机响应于用户针对连接按钮的操作,根据用户输入的密码等信息,向无线路由器发送认证请求帧。For example, a mobile phone obtains the Wi-Fi network provided by the surrounding wireless routers through Wi-Fi scanning, and displays the SSID of the scanned Wi-Fi network on the display screen; if the user needs to join a wireless network, he can click the corresponding SSID on the display screen, and the mobile phone responds to the user's click operation and pops up a password input window; after the user enters the password and other information in the password input window, he clicks the connect button, and the mobile phone responds to the user's operation on the connect button and sends an authentication request frame to the wireless router according to the password and other information entered by the user.
又例如,手机通过Wi-Fi扫描获取到周围的无线路由器提供的Wi-Fi网络,并检测到Wi-Fi网络为手机历史接入的Wi-Fi网络,则手机可以从历史记录中获取该历史接入的Wi-Fi网络的密码信息,自动向无线路由器发送认证请求帧。For another example, a mobile phone obtains a Wi-Fi network provided by a surrounding wireless router through Wi-Fi scanning, and detects that the Wi-Fi network is a Wi-Fi network that the mobile phone has accessed in the past. The mobile phone can then obtain the password information of the Wi-Fi network that was historically accessed from the historical records, and automatically send an authentication request frame to the wireless router.
无线路由器接收到手机的认证请求之后,根据认证请求携带的信息进行认证,得到认证结果,并将认证结果返回给手机。After receiving the authentication request from the mobile phone, the wireless router performs authentication according to the information carried in the authentication request, obtains the authentication result, and returns the authentication result to the mobile phone.
最后,手机接收到无线路由器返回的认证结果之后,若认证结果为认证通过,则向无线路由器发送关联请求。无线路由器响应于关联请求,向手机发送关联响应,以通知手机关联成功。至此,手机接入了无线路由器提供的Wi-Fi网络。Finally, after the mobile phone receives the authentication result returned by the wireless router, if the authentication result is authentication passed, it sends an association request to the wireless router. In response to the association request, the wireless router sends an association response to the mobile phone to notify the mobile phone that the association is successful. At this point, the mobile phone is connected to the Wi-Fi network provided by the wireless router.
(2)Wi-Fi信道和Wi-Fi工作频段(2) Wi-Fi channels and Wi-Fi operating frequency bands
在一些实施例中,Wi-Fi工作频段可以为2.4GHz和5GHz,还可以为第六代Wi-Fi(Wi-Fi6)中的6GHz,具体不作限制。In some embodiments, the Wi-Fi operating frequency band can be 2.4 GHz and 5 GHz, or 6 GHz in the sixth generation Wi-Fi (Wi-Fi 6), without specific limitation.
在一些实施例中,Wi-Fi设备可以同时工作在2.4GHz和5GHz两个频段。例如,Wi-Fi设备的Wi-Fi模块支持双频双发(Dual Band Dual Concurrent,DBDC),则该Wi-Fi设备可以同时工作在两个频段。其中,支持DBDC的Wi-Fi设备集成了两套完整的通路,包含两个完整的基带处理器和两个射频前端。其中,Wi-Fi设备用于指示无线路由器或手机。In some embodiments, the Wi-Fi device can work in both 2.4 GHz and 5 GHz frequency bands. For example, if the Wi-Fi module of the Wi-Fi device supports Dual Band Dual Concurrent (DBDC), the Wi-Fi device can work in two frequency bands simultaneously. Among them, the Wi-Fi device supporting DBDC integrates two complete channels, including two complete baseband processors and two RF front ends. Among them, the Wi-Fi device is used to indicate a wireless router or a mobile phone.
例如,支持DBDC的无线路由器可以同时发出2.4GHz和5GHz的网络信号,即提供两个Wi-Fi网络,一个Wi-Fi网络是2.4G频段的,另一个Wi-Fi网络是5G频段的。For example, a wireless router that supports DBDC can send out 2.4GHz and 5GHz network signals at the same time, that is, it provides two Wi-Fi networks, one Wi-Fi network is in the 2.4G frequency band, and the other Wi-Fi network is in the 5G frequency band.
又例如,支持DBDC的手机可以同时连接2.4G频段的Wi-Fi网络和5G频段的Wi-Fi网络。其中,这两个Wi-Fi网络可以是同一个网络设备提供的,也可以是两个网络设备提供的。例如,支持DBDC的手机可以同时连接至无线路由器A的2.4G频段的Wi-Fi网络和5G频段的Wi-Fi网络,也可以分别连接至无线路由器A的2.4G频段的Wi-Fi网络,以及无线路由器B的5G频段的Wi-Fi网络。For another example, a mobile phone that supports DBDC can simultaneously connect to a 2.4G Wi-Fi network and a 5G Wi-Fi network. The two Wi-Fi networks can be provided by the same network device or by two network devices. For example, a mobile phone that supports DBDC can simultaneously connect to a 2.4G Wi-Fi network and a 5G Wi-Fi network of wireless router A, or can separately connect to a 2.4G Wi-Fi network of wireless router A and a 5G Wi-Fi network of wireless router B.
在另一些实施例中,Wi-Fi设备在同一时段内只能工作在一个频段,即在同一时段只能工作在2.4G频段或5G频段。例如,支持DBDC的无线路由器A同时工作在2.4G频段和5G频段,提供2.4G频段的Wi-Fi网络和5G频段的Wi-Fi网络,而手机的Wi-Fi模块只能工作在一个频段,因此,手机只能连接2.4G频段的Wi-Fi网络,或者5G频段的Wi-Fi网络,不能同时连接2.4G和5G两个频段的Wi-Fi网络。In other embodiments, the Wi-Fi device can only work in one frequency band in the same period, that is, it can only work in the 2.4G frequency band or the 5G frequency band in the same period. For example, wireless router A supporting DBDC works in both the 2.4G frequency band and the 5G frequency band, providing a 2.4G frequency band Wi-Fi network and a 5G frequency band Wi-Fi network, while the Wi-Fi module of the mobile phone can only work in one frequency band, so the mobile phone can only connect to the 2.4G frequency band Wi-Fi network or the 5G frequency band Wi-Fi network, and cannot connect to both 2.4G and 5G frequency bands of Wi-Fi networks at the same time.
以下以2.4GHz和5GHz的工作频段对Wi-Fi信道进行示例说明。The following uses the 2.4 GHz and 5 GHz operating frequency bands as examples to explain Wi-Fi channels.
每个工作频段上都有可使用的Wi-Fi信道。以中国为例,如图2所示,2.4G频段上可使用的Wi-Fi信道有13个,分别为信道1至信道13;5G频段上可使用的Wi-Fi信道包括信道36、信道40、信道44、信道48、信道52、信道56、信道60、信道64、信道149、信道153、信道157、信道161和信道165。There are available Wi-Fi channels on each operating frequency band. Taking China as an example, as shown in Figure 2, there are 13 available Wi-Fi channels on the 2.4G frequency band, namely channel 1 to channel 13; the available Wi-Fi channels on the 5G frequency band include channel 36, channel 40, channel 44, channel 48, channel 52, channel 56, channel 60, channel 64, channel 149, channel 153, channel 157, channel 161 and channel 165.
在一些实施例中,支持DBDC的Wi-Fi设备可以在2.4G和5G两个频段可使用的多条Wi-Fi信道上广播或监听Beacon帧。例如,支持DBDC的无线路由器A可以在2.4G和5G两个频段可使用的多条Wi-Fi信道上广播Beacon帧,相应地,支持DBDC的手机可以在2.4G和5G两个频段可使用的多条Wi-Fi信道上来回切换以监听到Beacon帧;或例如,支持DBDC的手机可以在2.4G和5G两个频段可使用的多条Wi-Fi信道上发送探测请求帧。 In some embodiments, a DBDC-supporting Wi-Fi device may broadcast or monitor Beacon frames on multiple Wi-Fi channels available in both 2.4G and 5G frequency bands. For example, a wireless router A supporting DBDC may broadcast Beacon frames on multiple Wi-Fi channels available in both 2.4G and 5G frequency bands, and accordingly, a mobile phone supporting DBDC may switch back and forth between multiple Wi-Fi channels available in both 2.4G and 5G frequency bands to monitor Beacon frames; or, for example, a mobile phone supporting DBDC may send a probe request frame on multiple Wi-Fi channels available in both 2.4G and 5G frequency bands.
可以理解,手机可以通过Wi-Fi扫描方式获取无线路由器提供的Wi-Fi网络;在另一些实施例中,支持Wi-Fi网络共享功能的手机等终端设备,可以通过开启Wi-Fi网络共享功能,使得其他手机等终端设备通过Wi-Fi扫描方式获取到该共享的Wi-Fi网络,即支持Wi-Fi网络共享功能的手机等终端设备也可以作为上述网络设备提供Wi-Fi网络。It can be understood that the mobile phone can obtain the Wi-Fi network provided by the wireless router through Wi-Fi scanning; in other embodiments, mobile phones and other terminal devices that support the Wi-Fi network sharing function can enable the Wi-Fi network sharing function to enable other mobile phones and other terminal devices to obtain the shared Wi-Fi network through Wi-Fi scanning, that is, mobile phones and other terminal devices that support the Wi-Fi network sharing function can also serve as the above-mentioned network devices to provide Wi-Fi networks.
在一些实施例中,手机进行Wi-Fi扫描的扫描时间可以通过手机的工作模式确定。In some embodiments, the scanning time for the mobile phone to perform Wi-Fi scanning can be determined by the working mode of the mobile phone.
例如图3所示,示出了一种确定扫描时间的流程示意图,具体包括以下步骤:For example, as shown in FIG3 , a schematic diagram of a process for determining a scanning time is shown, which specifically includes the following steps:
S301:手机未连接Wi-Fi网络。S301: The mobile phone is not connected to the Wi-Fi network.
在一些实施例中,检测到手机未连接Wi-Fi网络时,手机可以通过Wi-Fi扫描方式扫描周围无线路由器以接入Wi-Fi网络。进一步地,可以通过检测手机的亮屏模式确定Wi-Fi扫描的扫描时间。In some embodiments, when it is detected that the mobile phone is not connected to the Wi-Fi network, the mobile phone can scan the surrounding wireless routers to access the Wi-Fi network through the Wi-Fi scanning method. Further, the scanning time of the Wi-Fi scan can be determined by detecting the screen light mode of the mobile phone.
S302:检测手机是否亮屏。S302: Detect whether the mobile phone screen is on.
在一些实施例中,当检测手机未处于亮屏模式时,可以表示手机未被用户使用,手机处于待机状态,用户对Wi-Fi网络需求较低。手机可以采用较长的扫描时间进行扫描,例如第一次扫描时间为60秒,第二次扫描时间为120秒,第三次扫描时间为180秒,第四次扫描时间为240秒,随后为了降低手机功耗,手机通常会延长Wi-Fi扫描的扫描时间,例如第五次扫描之后扫描时间一直为300秒。In some embodiments, when it is detected that the mobile phone is not in the bright screen mode, it can indicate that the mobile phone is not used by the user, the mobile phone is in standby mode, and the user has low demand for the Wi-Fi network. The mobile phone can use a longer scanning time for scanning, for example, the first scanning time is 60 seconds, the second scanning time is 120 seconds, the third scanning time is 180 seconds, and the fourth scanning time is 240 seconds. Subsequently, in order to reduce the power consumption of the mobile phone, the mobile phone usually extends the scanning time of the Wi-Fi scan, for example, the scanning time is always 300 seconds after the fifth scan.
可以理解,手机通常可以通过前几次的Wi-Fi扫描确定周围是否有可连接的Wi-Fi网络,若手机在前几次Wi-Fi扫描中,手机未连接上Wi-Fi网络,则确定当前手机周围无可用Wi-Fi网络,进而延长Wi-Fi扫描的扫描时间,以降低功耗。故可以在不同的使用场景下对前几次的扫描时间做调整。It is understandable that a mobile phone can usually determine whether there is a connectable Wi-Fi network around it through the previous Wi-Fi scans. If the mobile phone fails to connect to a Wi-Fi network in the previous Wi-Fi scans, it is determined that there is no available Wi-Fi network around the current mobile phone, and the scanning time of the Wi-Fi scan is extended to reduce power consumption. Therefore, the scanning time of the previous scans can be adjusted in different usage scenarios.
在另一些实施例中,当检测手机处于亮屏模式时,可以进一步通过手机的静置模式确定扫描时间,跳转至步骤S303。In other embodiments, when it is detected that the mobile phone is in the bright screen mode, the scanning time can be further determined by the static mode of the mobile phone, and the process jumps to step S303.
S303:检测手机是否静置。S303: Detect whether the mobile phone is stationary.
在一些实施例中,当检测手机处于亮屏模式但未处于静置模式时,可以表示用户正在使用手机,用户对Wi-Fi网络存在需求,如用户在走路途中使用手机等终端设备。则手机可以调整扫描时间,例如第一次扫描时间为20秒,第二次扫描时间为40秒,第三次扫描时间为80秒,第四次扫描时间为160秒。若在前几次Wi-Fi扫描中手机未连接上Wi-Fi网络,随后则延长Wi-Fi扫描的扫描时间,例如第五次及之后的扫描时间一直为300秒。In some embodiments, when it is detected that the mobile phone is in the bright screen mode but not in the static mode, it can indicate that the user is using the mobile phone and the user has a demand for the Wi-Fi network, such as the user using a mobile phone or other terminal device while walking. The mobile phone can adjust the scanning time, for example, the first scanning time is 20 seconds, the second scanning time is 40 seconds, the third scanning time is 80 seconds, and the fourth scanning time is 160 seconds. If the mobile phone does not connect to the Wi-Fi network in the first few Wi-Fi scans, the scanning time of the Wi-Fi scan is then extended, for example, the scanning time for the fifth and subsequent times is always 300 seconds.
在另一些实施例中,当检测手机处于亮屏模式且处于静置模式时,可以表示用户正在使用手机,且用户对Wi-Fi网络需求较高,如用户将手机放置在桌面上,并通过手机进行音乐播放、电影观看、电影投屏等操作时,手机处于静置模式,且手机需要通过连接Wi-Fi网络才能进行音乐播放、电影观看、电影投屏等操作,即用户对Wi-Fi网络需求较高。则手机可以采用较短的扫描时间进行扫描,例如前三次扫描时间为10秒,第四次至第六次扫描时间为30秒。若在前几次Wi-Fi扫描中手机未连接上Wi-Fi网络,随后则延长Wi-Fi扫描的扫描时间,第七次及之后的扫描时间一直为300秒。In other embodiments, when it is detected that the mobile phone is in the bright screen mode and in the static mode, it can indicate that the user is using the mobile phone and the user has a high demand for the Wi-Fi network. For example, when the user places the mobile phone on the desktop and uses the mobile phone to play music, watch movies, cast movies, etc., the mobile phone is in static mode, and the mobile phone needs to connect to the Wi-Fi network to play music, watch movies, cast movies, etc., that is, the user has a high demand for the Wi-Fi network. The mobile phone can use a shorter scanning time for scanning, for example, the first three scanning times are 10 seconds, and the fourth to sixth scanning times are 30 seconds. If the mobile phone is not connected to the Wi-Fi network in the first few Wi-Fi scans, the scanning time of the Wi-Fi scan is then extended, and the scanning time for the seventh and subsequent times is always 300 seconds.
在一些实施例中,若手机的工作模式一直在变化,但手机周围没有手机可以接入的Wi-Fi网络,如手机周围没有无线路由器,或手机周围无线路由器用于认证的密码信息用户无法获取等。但由于手机的工作模式一直在变化,则手机会根据检测结果一直调整扫描时间。同时,由于手机周围没有手机可以接入的Wi-Fi网络,而每次调整后前几次的扫描时间较短,使得手机的扫描功耗增大。In some embodiments, if the working mode of the mobile phone is constantly changing, but there is no Wi-Fi network that the mobile phone can access around the mobile phone, such as no wireless router around the mobile phone, or the password information of the wireless router used for authentication around the mobile phone cannot be obtained by the user. However, since the working mode of the mobile phone is constantly changing, the mobile phone will adjust the scanning time according to the detection results. At the same time, since there is no Wi-Fi network that the mobile phone can access around the mobile phone, and the scanning time of the first few times after each adjustment is shorter, the scanning power consumption of the mobile phone increases.
在一些实施例中,若手机工作模式相对固定,且手机周围有手机可以接入的Wi-Fi网络,如手机周围有历史接入过的无线路由器,或手机周围无线路由器用于认证的密码信息用户可以获取等。但由于无线路由器信号不稳定或外部遮挡等因素,导致手机在前几次扫描中未扫描到无线路由器,随后手机会延长Wi-Fi扫描的扫描时间。同时由于手机周围有手机可以接入的Wi-Fi网络,进而导致手机无法快速扫描到无线路由器以连接Wi-Fi网络,降低了手机连接Wi-Fi网络效率。In some embodiments, if the working mode of the mobile phone is relatively fixed, and there are Wi-Fi networks that the mobile phone can access around the mobile phone, such as wireless routers that have been accessed in the past around the mobile phone, or password information used for authentication of wireless routers around the mobile phone can be obtained by the user, etc. However, due to factors such as unstable wireless router signals or external obstructions, the mobile phone failed to scan the wireless router in the first few scans, and then the mobile phone will extend the scanning time of the Wi-Fi scan. At the same time, because there are Wi-Fi networks that the mobile phone can access around the mobile phone, the mobile phone cannot quickly scan the wireless router to connect to the Wi-Fi network, which reduces the efficiency of the mobile phone connecting to the Wi-Fi network.
在一些实施例中,为了使得手机在上述Wi-Fi扫描过程中,能确保手机扫描到周围全部无线路由器,手机通常采用全信道扫描的方式,即在2.4G频段的13个Wi-Fi信道或5G频段的多个Wi-Fi信道进行切换进行Wi-Fi扫描,可知采用全信道扫描方式时,手机的扫描功耗较大。In some embodiments, in order to ensure that the mobile phone can scan all surrounding wireless routers during the above-mentioned Wi-Fi scanning process, the mobile phone usually adopts a full-channel scanning method, that is, switching among the 13 Wi-Fi channels in the 2.4G frequency band or multiple Wi-Fi channels in the 5G frequency band to perform Wi-Fi scanning. It can be seen that when the full-channel scanning method is adopted, the scanning power consumption of the mobile phone is relatively large.
为解决上述问题,在终端设备使用过程中,当终端设备扫描到并接入某一网络设备提供的Wi-Fi网络时,记录当前终端设备扫描到的所有网络设备。在所有网络设备中,将当前终端设备所接入的网络设备作为目标网络设备,未接入的网络设备作为关联网络设备,基于目标网络设备和关联网络设备生成Wi-Fi指纹,通过Wi-Fi指纹来标识目标网络设备。同时,记录终端设备与目标网络设备连接的Wi-Fi 信道,将该Wi-Fi信道作为目标网络设备的目标信道。To solve the above problem, when the terminal device is in use, when the terminal device scans and connects to a Wi-Fi network provided by a certain network device, all network devices scanned by the current terminal device are recorded. Among all network devices, the network device connected to the current terminal device is used as the target network device, and the network devices not connected are used as associated network devices. A Wi-Fi fingerprint is generated based on the target network device and the associated network devices, and the target network device is identified by the Wi-Fi fingerprint. At the same time, the Wi-Fi network connected to the terminal device and the target network device is recorded. Channel, use the Wi-Fi channel as the target channel for the target network device.
如此,在后续终端设备断开Wi-Fi网络,需要重新扫描连网的过程中,当终端设备扫描到的实时网络设备中包括Wi-Fi指纹中任意一个或多个关联网络设备时,可以确定当前终端设备距离目标网络设备较近,终端设备可以缩短扫描时间,提高Wi-Fi扫描频率,进而提高终端设备扫描到目标网络设备以重新接入Wi-Fi网络的效率。同时,在确定出当前终端设备距离目标网络设备较近时,终端设备可以从历史记录中获取对应目标网络设备的目标信道,从全信道扫描方式切换到单独的目标信道扫描,使得终端设备无需在全信道扫描中的多条Wi-Fi信道来回切换扫描,减小终端设备扫描功耗。In this way, when the terminal device subsequently disconnects from the Wi-Fi network and needs to re-scan for the network, when the real-time network devices scanned by the terminal device include any one or more associated network devices in the Wi-Fi fingerprint, it can be determined that the current terminal device is close to the target network device, and the terminal device can shorten the scanning time and increase the Wi-Fi scanning frequency, thereby improving the efficiency of the terminal device scanning the target network device to re-access the Wi-Fi network. At the same time, when it is determined that the current terminal device is close to the target network device, the terminal device can obtain the target channel of the corresponding target network device from the historical records, and switch from the full channel scanning mode to a separate target channel scan, so that the terminal device does not need to switch back and forth between multiple Wi-Fi channels in the full channel scan, thereby reducing the scanning power consumption of the terminal device.
在一些实施例中,目标网络设备为终端设备历史接入过的网络设备,多个关联网络设备为终端设备在历史接入目标网络设备时所扫描到的多个网络设备。其中,终端设备在历史接入目标网络设备时所扫描到的多个网络设备,可以包括终端设备未接入过的网络设备,也可以包括终端设备历史接入过的网络设备,即关联网络设备可以是终端设备未接入过的网络设备,也可以是终端设备历史接入过的网络设备。In some embodiments, the target network device is a network device that the terminal device has accessed historically, and the multiple associated network devices are multiple network devices scanned by the terminal device when it has accessed the target network device historically. The multiple network devices scanned by the terminal device when it has accessed the target network device historically may include network devices that the terminal device has not accessed, and may also include network devices that the terminal device has accessed historically, that is, the associated network devices may be network devices that the terminal device has not accessed, and may also be network devices that the terminal device has accessed historically.
例如,在终端设备未接入Wi-Fi网络进行Wi-Fi扫描的过程中,同时扫描到两个历史接入过的网络设备,如目标网络设备13和目标网络设备14,由于目标网络设备13的Wi-Fi网络信号较强,则终端设备可以优先接入目标网络设备13所提供的Wi-Fi网络。此时,目标网络设备14可以作为目标网络设备13的关联网络设备。For example, when the terminal device is not connected to a Wi-Fi network and is performing Wi-Fi scanning, two network devices that have been connected in the past are scanned at the same time, such as target network device 13 and target network device 14. Since the Wi-Fi network signal of target network device 13 is stronger, the terminal device can preferentially access the Wi-Fi network provided by target network device 13. At this time, target network device 14 can be used as an associated network device of target network device 13.
以下以手机10作为终端设备的示例,结合手机10与网络设备进行网络连接的场景,对Wi-Fi指纹的生成过程进行解释说明。The following uses the mobile phone 10 as an example of a terminal device, and explains the process of generating a Wi-Fi fingerprint in combination with a scenario in which the mobile phone 10 is connected to a network device.
在一些实施例中,如图4所示,当手机10位于位置10A时,手机10的Wi-Fi扫描区域为区域10A1;当手机10位于位置10B时,手机10的Wi-Fi扫描区域为区域10B1;网络设备01为手机10的目标网络设备。In some embodiments, as shown in FIG. 4 , when mobile phone 10 is located at position 10A, the Wi-Fi scanning area of mobile phone 10 is area 10A1; when mobile phone 10 is located at position 10B, the Wi-Fi scanning area of mobile phone 10 is area 10B1; network device 01 is the target network device of mobile phone 10.
可以理解,网络设备01为手机10历史接入过的网络设备,即手机10存储有用于网络设备01认证的密码信息,则在手机10扫描到网络设备01时,手机10可以从历史记录中获取密码信息向网络设备01发起认证,进而手机10可以自动回连网络设备01提供的Wi-Fi网络;或网络设备01也可以为手机10历史未接入过的网络设备,但为用户想要连接的网络设备,即用户知晓用于网络设备01认证的密码信息,则在手机10扫描到网络设备01时,用户可以通过手机10所显示的网络连接提示弹窗,输入密码信息向网络设备01发起认证,进而使得手机10可以连接网络设备01提供的Wi-Fi网络。It can be understood that network device 01 is a network device that mobile phone 10 has accessed in the past, that is, mobile phone 10 stores password information for authenticating network device 01. When mobile phone 10 scans network device 01, mobile phone 10 can obtain password information from the historical record to initiate authentication to network device 01, and then mobile phone 10 can automatically reconnect to the Wi-Fi network provided by network device 01; or network device 01 can also be a network device that mobile phone 10 has not accessed in the past, but is a network device that the user wants to connect to, that is, the user knows the password information for authenticating network device 01. When mobile phone 10 scans network device 01, the user can enter the password information through the network connection prompt pop-up window displayed by mobile phone 10 to initiate authentication to network device 01, so that mobile phone 10 can connect to the Wi-Fi network provided by network device 01.
如图4所示,当用户携带手机10位于位置10A时,手机10通过全信道扫描可以扫描到网络设备01、02、03、04及05。手机10可以自动向网络设备01发起请求进行网络连接;或用户可以通过手机10所显示的网络连接提示弹窗,选择网络设备01对应的SSID并输入密码信息向网络设备01发起请求进行网络连接。As shown in FIG4 , when the user carries the mobile phone 10 at position 10A, the mobile phone 10 can scan network devices 01, 02, 03, 04 and 05 through full channel scanning. The mobile phone 10 can automatically initiate a request to the network device 01 for network connection; or the user can select the SSID corresponding to the network device 01 and enter the password information through the network connection prompt pop-up window displayed by the mobile phone 10 to initiate a request to the network device 01 for network connection.
在手机10接入网络设备01所提供的Wi-Fi网络后,记录手机10在位置10A通过采集全信道扫描所获取的网络设备信息A。此时,网络设备信息A包括网络设备01、02、03、04和05,且将手机10所接入的网络设备01作为目标网络设备,将手机10未接入的网络设备02至05作为关联网络设备。After the mobile phone 10 accesses the Wi-Fi network provided by the network device 01, the network device information A obtained by the mobile phone 10 at the position 10A through the full channel scan is recorded. At this time, the network device information A includes network devices 01, 02, 03, 04 and 05, and the network device 01 accessed by the mobile phone 10 is used as the target network device, and the network devices 02 to 05 not accessed by the mobile phone 10 are used as associated network devices.
进一步地,当用户携带手机10移动位于位置10B时,网络设备01位于手机10的Wi-Fi扫描的区域10B1之外,即手机10与网络设备01断开连接,同时在手机10断开网络设备01所提供的Wi-Fi网络后,记录手机10在位置10B通过采集全信道扫描所获取的网络设备信息B。此时,网络设备信息B包括网络设备06和07,且将手机10接入后断开的网络设备01作为目标网络设备,将手机10未接入的网络设备06和07作为关联网络设备。Furthermore, when the user moves with the mobile phone 10 to the position 10B, the network device 01 is outside the Wi-Fi scanning area 10B1 of the mobile phone 10, that is, the mobile phone 10 is disconnected from the network device 01, and after the mobile phone 10 disconnects from the Wi-Fi network provided by the network device 01, the network device information B obtained by the mobile phone 10 at the position 10B through the full channel scanning is recorded. At this time, the network device information B includes network devices 06 and 07, and the network device 01 that is disconnected after the mobile phone 10 is connected is used as the target network device, and the network devices 06 and 07 that the mobile phone 10 is not connected to are used as the associated network devices.
在一些实施例中,可以理解,将上述位置10A作为用户住宅的客厅,位置10B作为用户住宅的卧室卫生间,网络设备01作为无线路由器被用户放置在客厅。则用户携带手机10位于客厅时,由于距离较近,可以扫描并接入网络设备01提供的Wi-Fi网络,同时手机10在扫描接入网络设备01时,还扫描到了邻居的网络设备,如网络设备02、03、04和05;在用户携带手机10移动至卧室卫生间后,由于卧室卫生间距离网络设备01较远,而无法扫描到网络设备01,即手机10与网络设备01提供的Wi-Fi网络断开,使得用户无法在卧室卫生间接入网络设备01提供的Wi-Fi网络,但与此同时,手机10在位置10B可以扫描到其他邻居的网络设备,例如网络设备06和07。In some embodiments, it can be understood that the above-mentioned position 10A is used as the living room of the user's residence, the position 10B is used as the bedroom bathroom of the user's residence, and the network device 01 is placed in the living room by the user as a wireless router. Then when the user carries the mobile phone 10 in the living room, due to the short distance, the user can scan and access the Wi-Fi network provided by the network device 01. At the same time, when the mobile phone 10 scans and accesses the network device 01, it also scans the neighbor's network devices, such as network devices 02, 03, 04 and 05; after the user carries the mobile phone 10 to the bedroom bathroom, the bedroom bathroom is far away from the network device 01, and the network device 01 cannot be scanned, that is, the mobile phone 10 is disconnected from the Wi-Fi network provided by the network device 01, so that the user cannot access the Wi-Fi network provided by the network device 01 in the bedroom bathroom, but at the same time, the mobile phone 10 can scan other neighbor's network devices at position 10B, such as network devices 06 and 07.
在一些实施例中,可以基于网络设备信息A和网络设备信息B包括有相同的目标网络设备,合并 网络设备信息A和网络设备信息B,进而生成对应二者所包括的相同的目标网络设备Wi-Fi指纹。即通过记录手机10接入网络设备01时的全信道扫描结果和手机10断开网络设备01时的全信道扫描结果生成对应网络设备01的Wi-Fi指纹。如图4所示,对应网络设备01的Wi-Fi指纹包括网络设备01至07,其中,网络设备01作为目标网络设备,网络设备02至07作为关联网络设备。In some embodiments, the network device information A and the network device information B may be combined based on the fact that the network device information A and the network device information B include the same target network device. Network device information A and network device information B are used to generate the same target network device Wi-Fi fingerprints included in the two. That is, the Wi-Fi fingerprint of the corresponding network device 01 is generated by recording the full channel scan results when the mobile phone 10 is connected to the network device 01 and the full channel scan results when the mobile phone 10 is disconnected from the network device 01. As shown in Figure 4, the Wi-Fi fingerprint corresponding to the network device 01 includes network devices 01 to 07, among which network device 01 is used as the target network device and network devices 02 to 07 are used as associated network devices.
在一些实施例中,可以通过记录手机10每次接入以及断开网络设备01时全信道扫描结果对网络设备01的Wi-Fi指纹进行更新。可以理解,如图4所示,手机10基于网络设备01至07生成对应网络设备01的Wi-Fi指纹后,手机10在后续重新接入以及断开网络设备01时还可能会扫描到了其他网络设备,如网络设备08和09等。则手机10在后续重新接入以及断开网络设备01时,可以将网络设备08和09作为关联网络设备并更新至对应网络设备01的Wi-Fi指纹中,使得网络设备01的Wi-Fi指纹中包括有网络设备01至09,进而使得网络设备01的Wi-Fi指纹更加完善,提高通过Wi-Fi指纹对网络设备01的标识性。In some embodiments, the Wi-Fi fingerprint of network device 01 can be updated by recording the full channel scanning results each time the mobile phone 10 accesses and disconnects the network device 01. It can be understood that, as shown in FIG4, after the mobile phone 10 generates the Wi-Fi fingerprint of the corresponding network device 01 based on network devices 01 to 07, the mobile phone 10 may also scan other network devices, such as network devices 08 and 09, when it subsequently re-accesses and disconnects the network device 01. Then, when the mobile phone 10 subsequently re-accesses and disconnects the network device 01, network devices 08 and 09 can be used as associated network devices and updated to the Wi-Fi fingerprint of the corresponding network device 01, so that the Wi-Fi fingerprint of the network device 01 includes network devices 01 to 09, thereby making the Wi-Fi fingerprint of the network device 01 more complete and improving the identification of the network device 01 through the Wi-Fi fingerprint.
在另一些实施例中,在手机10接入网络设备01后,还可以通过周期性采集手机10接入网络设备01时的全信道扫描结果对该Wi-Fi指纹进行更新。例如,在手机10接入网络设备01后,手机10每半小时或十五分钟进行一次全信道扫描,基于扫描结果针对网络设备01的Wi-Fi指纹进行更新。In other embodiments, after the mobile phone 10 is connected to the network device 01, the Wi-Fi fingerprint can be updated by periodically collecting the full channel scan results when the mobile phone 10 is connected to the network device 01. For example, after the mobile phone 10 is connected to the network device 01, the mobile phone 10 performs a full channel scan every half an hour or fifteen minutes, and updates the Wi-Fi fingerprint of the network device 01 based on the scan results.
在一些实施例中,手机10可以将历史接入多个网络设备作为手机10的不同目标网络设备;或手机10也可以将历史接入的多个网络设备中,超过预设接入次数的一个或多个网络设备作为手机10的目标网络设备,使得目标网络设备可以表示用户经常连接的网络设备;或用户也可以自定义从历史接入的多个网络设备中选择任意一个或多个网络设备作为手机10的目标网络设备,使得目标网络设备满足用户个性化需求,具体不作限制。In some embodiments, the mobile phone 10 can use multiple network devices that have been historically connected as different target network devices of the mobile phone 10; or the mobile phone 10 can also use one or more network devices that have been accessed more than a preset number of times among the multiple network devices that have been historically connected as the target network devices of the mobile phone 10, so that the target network device can represent the network device that the user frequently connects to; or the user can also customize the selection of any one or more network devices from the multiple network devices that have been historically connected as the target network device of the mobile phone 10, so that the target network device meets the user's personalized needs, without specific limitation.
在一些实施例中,用户可以将该Wi-Fi指纹上传至云服务器,用户可以通过云服务器将Wi-Fi指纹共享至用户的其他终端设备,使得用户在使用除手机10外的其他终端设备时,也可以使用该Wi-Fi指纹;或不同用户可以将所获取的Wi-Fi指纹上传至云服务器,云服务器可以基于Wi-Fi指纹中网络设备的媒体访问控制(Media Access Control,MAC)地址对各个Wi-Fi指纹进行分类,整合针对网络设备01的Wi-Fi指纹,使得网络设备01的Wi-Fi指纹更加完整,提高基于Wi-Fi指纹对网络设备01的标识性。In some embodiments, the user can upload the Wi-Fi fingerprint to a cloud server, and the user can share the Wi-Fi fingerprint to other terminal devices of the user through the cloud server, so that the user can also use the Wi-Fi fingerprint when using other terminal devices besides mobile phone 10; or different users can upload the obtained Wi-Fi fingerprint to the cloud server, and the cloud server can classify each Wi-Fi fingerprint based on the Media Access Control (MAC) address of the network device in the Wi-Fi fingerprint, and integrate the Wi-Fi fingerprint for network device 01, so that the Wi-Fi fingerprint of network device 01 is more complete, thereby improving the identification of network device 01 based on the Wi-Fi fingerprint.
在一些实施例中,可以对Wi-Fi指纹中的多个关联网络设备进行过滤筛选,例如多个关联网络设备中地理位置相似,例如手机10在同一位置接收到该多个关联网络设备的探测响应帧的信号强度(Received Signal Strength Indication,RSSI)相同或相似,则从多个关联网络设备中保留任意一个或预设数量的关联网络设备,提高Wi-Fi指纹中各个关联网络设备的单一性,在确保Wi-Fi指纹对目标网络设备进行标识的精准度情况下,降低Wi-Fi指纹的数据量,进而可以提高用户从云服务器中下载Wi-Fi指纹的效率。In some embodiments, multiple associated network devices in a Wi-Fi fingerprint may be filtered and screened. For example, if the geographical locations of the multiple associated network devices are similar, for example, the signal strengths (Received Signal Strength Indication, RSSI) of the detection response frames received by the mobile phone 10 at the same location from the multiple associated network devices are the same or similar, then any one or a preset number of associated network devices may be retained from the multiple associated network devices to improve the uniqueness of each associated network device in the Wi-Fi fingerprint. While ensuring the accuracy of the Wi-Fi fingerprint in identifying the target network device, the data volume of the Wi-Fi fingerprint may be reduced, thereby improving the efficiency of users downloading the Wi-Fi fingerprint from the cloud server.
以下结合图4所示Wi-Fi指纹的生成过程的场景,对本申请的一些实施例进行解释说明。Some embodiments of the present application are explained below in conjunction with the scenario of the Wi-Fi fingerprint generation process shown in FIG. 4 .
图5A根据本申请的一些实施例,示出了一种无线通信方法的流程步骤图,应用于手机10,具体包括如下步骤:FIG. 5A shows a flowchart of a wireless communication method according to some embodiments of the present application, which is applied to a mobile phone 10 and specifically includes the following steps:
S501:检测手机10的Wi-Fi连接模式。S501: Detect the Wi-Fi connection mode of the mobile phone 10.
在一些实施例中,可以通过检测手机10的Wi-Fi连接模式确定手机10是否需要发起Wi-Fi扫描。In some embodiments, whether the mobile phone 10 needs to initiate a Wi-Fi scan may be determined by detecting the Wi-Fi connection mode of the mobile phone 10 .
例如,检测到手机10的Wi-Fi连接模式为连接时,表示手机10已接入Wi-Fi网络,无需发起Wi-Fi扫描,跳转至步骤S501A,流程结束;或例如,检测到手机10的Wi-Fi连接模式为未连接时,表示手机10未接入Wi-Fi网络,需要发起Wi-Fi扫描,跳转至步骤S502。For example, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is connected, it means that the mobile phone 10 has been connected to the Wi-Fi network, and there is no need to initiate a Wi-Fi scan, jump to step S501A, and the process ends; or for example, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected, it means that the mobile phone 10 is not connected to the Wi-Fi network, and a Wi-Fi scan needs to be initiated, jump to step S502.
S502:获取手机10的信道集合,对信道集合中的各个扫描信道的扫描次数清零后,控制手机10通过周期001进行全信道扫描。S502: Acquire the channel set of the mobile phone 10, clear the scanning times of each scanning channel in the channel set, and then control the mobile phone 10 to perform full channel scanning through cycle 001.
在一些实施例中,结合上文图4,如图5B所示,当手机10位于位置10A时,手机10的Wi-Fi扫描区域为区域10A1;当手机10位于位置10B时,手机10的Wi-Fi扫描区域为区域10B1;当手机10位于位置10C时,手机10的Wi-Fi扫描区域为区域10C1;当手机10位于位置10D时,手机10的Wi-Fi扫描区域为区域10D1;网络设备01为手机10的目标网络设备。In some embodiments, in combination with FIG. 4 above, as shown in FIG. 5B , when mobile phone 10 is located at position 10A, the Wi-Fi scanning area of mobile phone 10 is area 10A1; when mobile phone 10 is located at position 10B, the Wi-Fi scanning area of mobile phone 10 is area 10B1; when mobile phone 10 is located at position 10C, the Wi-Fi scanning area of mobile phone 10 is area 10C1; when mobile phone 10 is located at position 10D, the Wi-Fi scanning area of mobile phone 10 is area 10D1; network device 01 is the target network device of mobile phone 10.
其中,网络设备01为手机10历史接入过的网络设备,手机10中存储有用于网络设备01连接的认证密码信息;当手机10扫描到网络设备01时,手机10可以自动获取网络设备01的密码信息向网络 设备01发起认证,无需用户输入密码,手机10可以自动接入网络设备01提供的Wi-Fi网络。网络设备02至09为手机10历史未接入过的网络设备,手机10未存储有认证密码信息,无法自动接入网络设备02至09提供的Wi-Fi网络,需通过用户手动输入对应密码信息后才能向对应网络设备发起认证连接。Among them, network device 01 is a network device that mobile phone 10 has accessed in the past, and mobile phone 10 stores authentication password information for connecting to network device 01; when mobile phone 10 scans network device 01, mobile phone 10 can automatically obtain the password information of network device 01 and send it to the network. Device 01 initiates authentication, and the mobile phone 10 can automatically access the Wi-Fi network provided by network device 01 without the user entering a password. Network devices 02 to 09 are network devices that the mobile phone 10 has never accessed before. The mobile phone 10 does not store authentication password information and cannot automatically access the Wi-Fi networks provided by network devices 02 to 09. The user needs to manually enter the corresponding password information before initiating an authentication connection to the corresponding network device.
以下以用户无法获得网络设备02至09的密码信息,手机10通过扫描到网络设备01后自动连接Wi-Fi网络作为示例进行解释说明。The following explanation is given by taking the case where the user cannot obtain the password information of the network devices 02 to 09 and the mobile phone 10 automatically connects to the Wi-Fi network after scanning the network device 01 as an example.
在一些实施例中,如图5B所示,当用户携带手机10位于位置10D时,手机10周围没有可以扫描的网络设备,即手机10的Wi-Fi连接模式为未连接。In some embodiments, as shown in FIG5B , when the user carries the mobile phone 10 to the position 10D, there is no network device that can be scanned around the mobile phone 10 , that is, the Wi-Fi connection mode of the mobile phone 10 is not connected.
进一步地,在确定手机10的Wi-Fi连接模式为未连接后,获取手机10的信道集合。其中,信道集合包括多个扫描信道,多个扫描信道可以是上述2.4GHz和5GHz工作频段中可使用的任意Wi-Fi信道的组合,或多个扫描信道也可以是手机10进行Wi-Fi扫描所支持的全部Wi-Fi信道,具体不作限制。控制手机10对信道集合中的各个扫描信道的扫描次数清零后,控制手机10通过周期001基于信道集合进行全信道扫描。Further, after determining that the Wi-Fi connection mode of the mobile phone 10 is not connected, the channel set of the mobile phone 10 is obtained. Among them, the channel set includes multiple scanning channels, and the multiple scanning channels can be a combination of any Wi-Fi channels that can be used in the above-mentioned 2.4GHz and 5GHz working frequency bands, or the multiple scanning channels can also be all Wi-Fi channels supported by the mobile phone 10 for Wi-Fi scanning, without specific restrictions. After controlling the mobile phone 10 to clear the scanning times of each scanning channel in the channel set, the mobile phone 10 is controlled to perform full channel scanning based on the channel set through cycle 001.
其中,周期001中每次进行Wi-Fi扫描所间隔的扫描时间较长,例如,每次间隔60秒进行一次Wi-Fi扫描,是由于当前手机10在位置10D通过区域10D1进行扫描时,没有可扫描的网络设备,即手机10无法连接Wi-Fi网络,故使用间隔扫描时间较长的周期001进行Wi-Fi扫描,可以降低手机10的扫描功耗。同时,由于此时手机10未连接Wi-Fi网络,故在周期001中采用全信道扫描方式可以提高手机10扫描到网络设备的效率。Among them, the scanning time interval between each Wi-Fi scan in cycle 001 is relatively long, for example, a Wi-Fi scan is performed every 60 seconds, because when the current mobile phone 10 is scanning through area 10D1 at position 10D, there is no network device that can be scanned, that is, the mobile phone 10 cannot connect to the Wi-Fi network, so using cycle 001 with a longer scanning interval to perform Wi-Fi scanning can reduce the scanning power consumption of the mobile phone 10. At the same time, since the mobile phone 10 is not connected to the Wi-Fi network at this time, the full channel scanning method in cycle 001 can improve the efficiency of the mobile phone 10 scanning network devices.
在一些实施例中,手机10在步骤S502通过全信道扫描到网络设备,且该网络设备是手机10历史接入的网络设备时,如扫描到网络设备01时,表示手机10与目标网络设备匹配,手机10可以自动接入网络设备01提供的Wi-Fi网络,即跳转至步骤S502A。In some embodiments, when the mobile phone 10 finds a network device through full channel scanning in step S502, and the network device is a network device that the mobile phone 10 has historically connected to, such as when the network device 01 is scanned, it means that the mobile phone 10 matches the target network device, and the mobile phone 10 can automatically connect to the Wi-Fi network provided by the network device 01, that is, jump to step S502A.
在另一些实施例中,手机10在步骤S502通过全信道扫描到网络设备,且该网络设备是手机10历史未接入的网络设备时,如未扫描到网络设备01时,表示手机10与目标网络设备不匹配,跳转至步骤S503。In other embodiments, when the mobile phone 10 finds a network device through full channel scanning in step S502, and the network device is a network device that the mobile phone 10 has not connected to in history, such as when the network device 01 is not scanned, it means that the mobile phone 10 does not match the target network device, and jumps to step S503.
S503:获取手机10的特征信息表,将全信道扫描的扫描结果与特征信息表进行匹配。S503: Obtain a feature information table of the mobile phone 10, and match the scanning result of the full channel scan with the feature information table.
在一些实施例中,如图5B所示,当用户携带手机10移动至位置10C时,手机10通过全信道扫描获取到了网络设备,如网络设备03、05、08和09,将扫描到的各个网络设备作为全信道扫描的扫描结果,通过该扫描结果与特征信息表进行匹配。In some embodiments, as shown in FIG5B , when the user carries the mobile phone 10 and moves to position 10C, the mobile phone 10 acquires network devices, such as network devices 03, 05, 08, and 09, through full-channel scanning, and uses each scanned network device as a scanning result of the full-channel scanning, which is then matched with the feature information table.
在一些实施例中,可以通过采集手机10历史接入以及断开目标网络设备时全信道扫描结果,确定对应不同目标网络设备的Wi-Fi指纹。具体确定过程可以参见上文图4,例如对应网络设备01的Wi-Fi指纹,至少包括一个目标网络设备为网络设备01,以及多个关联网络设备为网络设备02至07,在此不加以赘述。In some embodiments, the Wi-Fi fingerprints corresponding to different target network devices can be determined by collecting the full channel scanning results when the mobile phone 10 historically accesses and disconnects the target network device. The specific determination process can be seen in Figure 4 above. For example, the Wi-Fi fingerprint corresponding to network device 01 includes at least one target network device as network device 01, and multiple associated network devices as network devices 02 to 07, which will not be described in detail here.
进一步地,基于Wi-Fi指纹,结合手机10接入目标网络设备的Wi-Fi信道生成对应目标网络设备的特征信息表。Furthermore, based on the Wi-Fi fingerprint, in combination with the Wi-Fi channel through which the mobile phone 10 accesses the target network device, a feature information table corresponding to the target network device is generated.
例如图5C所示,特征信息表50包括目标网络设备的MAC地址、目标信道、Wi-Fi指纹及连接态。其中,对应手机10的目标网络设备为网络设备01时,目标网络设备的MAC地址用于表示网络设备01的MAC地址;目标信道用于表示手机10接入网络设备01的Wi-Fi信道;Wi-Fi指纹用于表示手机10接入和断开网络设备01时所采集到的多个网络设备的MAC地址,如网络设备01至07的MAC地址,且将手机10当前所接入的网络设备01的MAC地址作为目标网络设备的MAC地址;连接态用于表示手机10接入或断开网络设备01,如1表示手机10接入网络设备01,0表示手机10与网络设备01断开连接。For example, as shown in FIG5C , the characteristic information table 50 includes the MAC address, target channel, Wi-Fi fingerprint and connection status of the target network device. Among them, when the target network device corresponding to the mobile phone 10 is the network device 01, the MAC address of the target network device is used to indicate the MAC address of the network device 01; the target channel is used to indicate the Wi-Fi channel through which the mobile phone 10 accesses the network device 01; the Wi-Fi fingerprint is used to indicate the MAC addresses of multiple network devices collected when the mobile phone 10 accesses and disconnects the network device 01, such as the MAC addresses of network devices 01 to 07, and the MAC address of the network device 01 currently accessed by the mobile phone 10 is used as the MAC address of the target network device; the connection status is used to indicate that the mobile phone 10 accesses or disconnects the network device 01, such as 1 indicates that the mobile phone 10 accesses the network device 01, and 0 indicates that the mobile phone 10 is disconnected from the network device 01.
进一步地,在手机10获取到网络设备03、05、08和09的扫描结果后,将该扫描结果与特征信息表进行匹配。Furthermore, after the mobile phone 10 obtains the scanning results of the network devices 03, 05, 08 and 09, the scanning results are matched with the feature information table.
在一些实施例中,当扫描结果中多个网络设备的MAC地址与Wi-Fi指纹中多个关联网络设备的MAC地址均不相同时,确定扫描结果与Wi-Fi指纹不匹配,跳转至步骤S502。可以理解,当扫描结果与Wi-Fi指纹完全不匹配时,表示当前手机10所在位置周围没有历史接入过的目标网络设备,手机10无法自动接入Wi-Fi网络,故使用间隔扫描时间较长的周期001进行Wi-Fi扫描,进而降低手机10的扫描功耗。 In some embodiments, when the MAC addresses of multiple network devices in the scan result are not the same as the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint, it is determined that the scan result does not match the Wi-Fi fingerprint, and the process jumps to step S502. It can be understood that when the scan result does not match the Wi-Fi fingerprint at all, it means that there is no target network device that has been historically connected around the current location of the mobile phone 10, and the mobile phone 10 cannot automatically access the Wi-Fi network, so the Wi-Fi scan is performed using the cycle 001 with a longer interval scanning time, thereby reducing the scanning power consumption of the mobile phone 10.
在另一些实施例中,当扫描结果中多个网络设备的MAC地址与Wi-Fi指纹中多个关联网络设备的MAC地址部分相同时,确定扫描结果与Wi-Fi指纹匹配,跳转至步骤S504。In other embodiments, when the MAC addresses of multiple network devices in the scan result are partially identical to the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint, it is determined that the scan result matches the Wi-Fi fingerprint, and the process jumps to step S504.
S504:从特征信息表中获取目标信道,控制手机10基于目标信道并通过周期002进行部分信道扫描。S504: Acquire the target channel from the feature information table, and control the mobile phone 10 to perform partial channel scanning based on the target channel and through cycle 002.
在一些实施例中,由于Wi-Fi指纹为手机10历史接入目标网络设备时所采集的指纹,故Wi-Fi指纹可以用于对手机10历史接入目标网络设备时的位置进行标识。当扫描结果中多个网络设备的MAC地址与Wi-Fi指纹中多个关联网络设备的MAC地址部分相同时,如扫描结果中任意一个或多个网络设备的MAC地址可以从Wi-Fi指纹中查询到到时,表示手机10与历史接入目标网络设备时的位置较近,用户携带手机10可能在向靠近目标网络设备的方向移动。In some embodiments, since the Wi-Fi fingerprint is a fingerprint collected when the mobile phone 10 historically accesses the target network device, the Wi-Fi fingerprint can be used to identify the location of the mobile phone 10 when it historically accesses the target network device. When the MAC addresses of multiple network devices in the scan result are partially the same as the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint, if the MAC addresses of any one or more network devices in the scan result can be queried from the Wi-Fi fingerprint, it means that the mobile phone 10 is close to the location when it historically accessed the target network device, and the user carrying the mobile phone 10 may be moving in a direction close to the target network device.
进一步地,手机10从特征信息表获取对应匹配的Wi-Fi指纹所对应目标网络设备的目标信道,并控制手机10从全信道扫描切换至基于目标信道的单信道扫描方式,降低扫描功耗并确保对目标网络设备的扫描搜寻。同时,在手机10切换至单信道扫描后,可以缩短间隔扫描时间。相对于周期001,通过间隔扫描时间较短的周期002进行扫描,例如,每次间隔20秒进行一次Wi-Fi扫描,进而提高手机10回连目标网络设备所提供的Wi-Fi网络的速度,提高用户体验度。Furthermore, the mobile phone 10 obtains the target channel of the target network device corresponding to the matching Wi-Fi fingerprint from the feature information table, and controls the mobile phone 10 to switch from full-channel scanning to a single-channel scanning method based on the target channel, thereby reducing scanning power consumption and ensuring scanning and searching for the target network device. At the same time, after the mobile phone 10 switches to single-channel scanning, the interval scanning time can be shortened. Relative to cycle 001, scanning is performed through cycle 002 with a shorter interval scanning time, for example, a Wi-Fi scan is performed every 20 seconds, thereby increasing the speed at which the mobile phone 10 connects back to the Wi-Fi network provided by the target network device, thereby improving the user experience.
在一些实施例中,若手机10与多个目标网络设备的Wi-Fi指纹匹配,则可以基于对应多个目标网络设备所对应的多个目标信道进行部分信道扫描。可以理解,在确定扫描结果与Wi-Fi指纹匹配之后,通过所匹配的Wi-Fi指纹确定目标网络设备,如从Wi-Fi指纹中查询存在哪些网络设备是手机10历史接入过的网络设备,将该历史接入过的网络设备作为目标网络设备,并通过目标网络设备历史接入时所记录的目标信道从全信道扫描切换至单信道扫描或部分信道扫描。In some embodiments, if the mobile phone 10 matches the Wi-Fi fingerprints of multiple target network devices, partial channel scanning can be performed based on multiple target channels corresponding to the multiple target network devices. It can be understood that after determining that the scan result matches the Wi-Fi fingerprint, the target network device is determined by the matched Wi-Fi fingerprint, such as querying from the Wi-Fi fingerprint which network devices are network devices that the mobile phone 10 has accessed in the past, taking the network devices that have been accessed in the past as target network devices, and switching from full channel scanning to single channel scanning or partial channel scanning through the target channel recorded when the target network device was historically accessed.
以下以手机10的全信道扫描的扫描结果与网络设备01的Wi-Fi指纹匹配,手机10从全信道扫描切换至手机10历史接入网络设备01的目标信道的单信道扫描方式作为示例进行解释说明。The following explanation is given by taking the scanning result of the full channel scan of the mobile phone 10 matching the Wi-Fi fingerprint of the network device 01, and the mobile phone 10 switching from the full channel scan to the single channel scan mode of the target channel of the network device 01 that the mobile phone 10 historically accessed as an example.
例如,如5B所示,用户携带手机10在位置10C,使得手机10的全信道扫描结果与Wi-Fi指纹匹配后,手机10获取对应Wi-Fi指纹的目标网络设备的目标信道,如网络设备01的目标信道,基于目标信道进行单信道扫描,并相对于周期001缩短间隔扫描时间,通过间隔扫描时间较短的周期002进行Wi-Fi扫描。For example, as shown in 5B, the user carries mobile phone 10 at position 10C, so that after the full channel scan result of mobile phone 10 matches the Wi-Fi fingerprint, mobile phone 10 obtains the target channel of the target network device corresponding to the Wi-Fi fingerprint, such as the target channel of network device 01, performs a single channel scan based on the target channel, shortens the interval scanning time relative to period 001, and performs Wi-Fi scanning through period 002 with a shorter interval scanning time.
在一些实施例中,用户携带手机10从位置10C移动至位置10A后,手机10扫描到网络设备01,手机10可以自动接入网络设备01提供的Wi-Fi网络,则跳转至步骤S502A。In some embodiments, after the user carries the mobile phone 10 and moves from the position 10C to the position 10A, the mobile phone 10 scans the network device 01, and the mobile phone 10 can automatically access the Wi-Fi network provided by the network device 01, and then jumps to step S502A.
在另一些实施例中,若用户携带手机10从位置10C向远离位置10A的方向移动,如从位置10C移动至位置10D,则手机10无法扫描到网络设备01,手机10无法自动接入网络设备01提供的Wi-Fi网络,则跳转至步骤S505。In other embodiments, if the user carries the mobile phone 10 and moves from position 10C in a direction away from position 10A, such as from position 10C to position 10D, the mobile phone 10 cannot scan the network device 01, and the mobile phone 10 cannot automatically connect to the Wi-Fi network provided by the network device 01, then jump to step S505.
S505:记录目标信道的扫描次数,判断目标信道的扫描次数是否超过预设次数。S505: Record the number of scans of the target channel, and determine whether the number of scans of the target channel exceeds a preset number.
在一些实施例中,可以通过目标信道的扫描次数对手机10的扫描周期及扫描信道进行切换。In some embodiments, the scanning cycle and scanning channel of the mobile phone 10 can be switched according to the scanning times of the target channel.
例如,当手机10未扫描到网络设备01,且目标信道的扫描次数未超过预设次数时,可以表示用户携带手机10可能向靠近网络设备01的方向移动,跳转至步骤S504,手机10继续采用目标信道和周期002进行Wi-Fi扫描。For example, when the mobile phone 10 fails to scan the network device 01 and the target channel is scanned less than the preset number of times, it may indicate that the user carrying the mobile phone 10 may be moving towards the direction close to the network device 01, and the process jumps to step S504, where the mobile phone 10 continues to use the target channel and cycle 002 for Wi-Fi scanning.
又例如,当手机10未扫描到网络设备01,且目标信道的扫描次数超过预设次数时,表示用户携带手机10可能向远离网络设备01信号的方向移动,进而使得手机10短时间内无法自动接入网络设备01所提供的Wi-Fi网络,则跳转至步骤S502。手机10从单信道扫描切换至全信道扫描,提高手机10扫描到网络设备的效率,同时手机10从间隔扫描时间较短的周期002切换至间隔扫描时间较长的周期001进行扫描,降低手机10的扫描功耗。For another example, when the mobile phone 10 fails to scan the network device 01 and the number of scans of the target channel exceeds the preset number, it indicates that the user carrying the mobile phone 10 may move in a direction away from the signal of the network device 01, and thus the mobile phone 10 cannot automatically access the Wi-Fi network provided by the network device 01 in a short time, and then jumps to step S502. The mobile phone 10 switches from single-channel scanning to full-channel scanning to improve the efficiency of the mobile phone 10 in scanning the network device. At the same time, the mobile phone 10 switches from the cycle 002 with a shorter interval scanning time to the cycle 001 with a longer interval scanning time to scan, thereby reducing the scanning power consumption of the mobile phone 10.
在一些实施例中,如图5B所示,可以理解,将上述位置10A作为用户住宅的客厅,位置10C作为用户住宅的楼道,位置10D作为用户住宅的小区,网络设备01作为无线路由器被用户放置在客厅。In some embodiments, as shown in FIG. 5B , it can be understood that the above-mentioned position 10A is used as the living room of the user's residence, the position 10C is used as the corridor of the user's residence, the position 10D is used as the community of the user's residence, and the network device 01 is placed in the living room by the user as a wireless router.
当用户携带手机10进入小区时,由于距离客厅较远,故手机10无法扫描到网络设备01,手机10采用间隔扫描时间较长的周期001进行全信道Wi-Fi扫描,以确保可以扫描到网络设备;当用户携带手机10向客厅靠近,进入住宅的楼道时,手机10扫描到网络设备并与网络设备01的Wi-Fi指纹匹配,表示用户携带手机10可能在向客厅靠近,使得手机10从间隔扫描时间较长周期001切换至间隔扫描时间较短的周期002,提高扫描频率,并基于历史接入网络设备01时的Wi-Fi信道进行单信道扫描,以 降低扫描功耗;当用户在上楼或进入客厅之前,由于手机10采用高频且针对网络设备01接入信道的扫描方式,使得手机10可以在进入网络设备01的信号覆盖区时,手机10可以立即扫描到网络设备01并自动接入网络设备01所提供的Wi-Fi网络,提高手机10的Wi-Fi网络的回连速度,进而满足用户对手机10的连网需求。When the user carries the mobile phone 10 into the residential area, the mobile phone 10 cannot scan the network device 01 because it is far away from the living room. The mobile phone 10 uses the period 001 with a longer interval scanning time to perform a full-channel Wi-Fi scan to ensure that the network device can be scanned. When the user carries the mobile phone 10 to approach the living room and enters the corridor of the residence, the mobile phone 10 scans the network device and matches the Wi-Fi fingerprint of the network device 01, indicating that the user may be approaching the living room with the mobile phone 10, so that the mobile phone 10 switches from the period 001 with a longer interval scanning time to the period 002 with a shorter interval scanning time, increases the scanning frequency, and performs a single-channel scan based on the Wi-Fi channel when the network device 01 was accessed historically. Reduce scanning power consumption; before the user goes upstairs or enters the living room, because the mobile phone 10 adopts a high-frequency scanning method for the access channel of the network device 01, when the mobile phone 10 enters the signal coverage area of the network device 01, the mobile phone 10 can immediately scan the network device 01 and automatically connect to the Wi-Fi network provided by the network device 01, thereby improving the reconnection speed of the Wi-Fi network of the mobile phone 10, thereby meeting the user's networking needs for the mobile phone 10.
图5D根据本申请的一些实施例,示出了生成特征信息表的流程示意图,具体包括以下步骤:FIG5D shows a schematic diagram of a process of generating a feature information table according to some embodiments of the present application, which specifically includes the following steps:
S51A:手机10接入Wi-Fi网络。S51A: The mobile phone 10 accesses the Wi-Fi network.
在一些实施例中,检测到手机10接入Wi-Fi网络时,对手机是否需要生成特征信息表进行判断,并生成判断结果A。In some embodiments, when it is detected that the mobile phone 10 is connected to a Wi-Fi network, a determination is made as to whether the mobile phone needs to generate a feature information table, and a determination result A is generated.
S51B:手机10断开Wi-Fi网络。S51B: The mobile phone 10 disconnects from the Wi-Fi network.
在一些实施例中,检测到手机10断开Wi-Fi网络时,对手机是否需要生成特征信息表进行判断,并生成判断结果B。In some embodiments, when it is detected that the mobile phone 10 is disconnected from the Wi-Fi network, a determination is made as to whether the mobile phone needs to generate a feature information table, and a determination result B is generated.
S52:判断是否生成特征信息表。S52: Determine whether to generate a feature information table.
在一些实施例中,手机10可以在接入Wi-Fi网络和断开Wi-Fi网络时,通过信息弹窗提示用户是否需要生成特征信息表,进而用户可以通过信息弹窗确定是否需要生成特征信息表。例如,手机10接入Wi-Fi网络时,手机10检测到用户通过信息弹窗确定需要生成特征信息表,则判断结果A为需要生成特征信息表;或例如,手机10接入Wi-Fi网络时,手机10检测到用户通过信息弹窗确定不需要生成特征信息表,则判断结果A为不需要生成特征信息表。其中,判断结果B与判断结果A同理,在此不加以赘述。In some embodiments, the mobile phone 10 can prompt the user whether it is necessary to generate a feature information table through an information pop-up window when connecting to a Wi-Fi network or disconnecting from a Wi-Fi network, and the user can then determine whether it is necessary to generate a feature information table through the information pop-up window. For example, when the mobile phone 10 is connected to a Wi-Fi network, the mobile phone 10 detects that the user determines through the information pop-up window that a feature information table needs to be generated, then the judgment result A is that the feature information table needs to be generated; or for example, when the mobile phone 10 is connected to a Wi-Fi network, the mobile phone 10 detects that the user determines through the information pop-up window that a feature information table does not need to be generated, then the judgment result A is that the feature information table does not need to be generated. Among them, the judgment result B is the same as the judgment result A, and will not be repeated here.
在一些实施例中,当判断结果A与判断结果B中任意一个为需要生成特征信息表,跳转至步骤S53;当判断结果A与判断结果B均为不需要生成特征信息表,跳转至步骤S57,即流程结束。In some embodiments, when any one of the judgment results A and B requires generating a feature information table, jump to step S53; when both the judgment results A and B do not require generating a feature information table, jump to step S57, and the process ends.
S53:采集手机10全信道扫描的Wi-Fi指纹。S53: Collect Wi-Fi fingerprints of all-channel scanning by the mobile phone 10 .
在一些实施例中,由于手机10接入和断开Wi-Fi网络的时间不同,即判断结果A与判断结果B中任意一个为需要生成特征信息表,可以单独跳转至步骤S53。In some embodiments, since the time when the mobile phone 10 accesses and disconnects from the Wi-Fi network is different, that is, any one of the judgment results A and B requires the generation of a feature information table, the process can jump to step S53 separately.
例如,在手机10接入Wi-Fi网络时,判断结果A为需要生成特征信息表,则在手机10接入Wi-Fi网络时对手机10的全信道扫描的Wi-Fi指纹进行采集。进一步地,在手机10断开Wi-Fi网络时,判断结果B为需要生成特征信息表,则在手机10断开Wi-Fi网络时对手机10的全信道扫描的Wi-Fi指纹进行采集。即在手机10接入或断开Wi-Fi网络时,均对手机10的全信道扫描的Wi-Fi指纹进行采集。For example, when the mobile phone 10 accesses the Wi-Fi network, the judgment result A is that the feature information table needs to be generated, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 accesses the Wi-Fi network. Further, when the mobile phone 10 disconnects the Wi-Fi network, the judgment result B is that the feature information table needs to be generated, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 disconnects the Wi-Fi network. That is, when the mobile phone 10 accesses or disconnects the Wi-Fi network, the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected.
又例如,在手机10接入Wi-Fi网络时,判断结果A为不需要生成特征信息表,则在手机10接入Wi-Fi网络时不进行Wi-Fi指纹的采集。进一步地,在手机10断开Wi-Fi网络时,判断结果B为需要生成特征信息表,则在手机10断开Wi-Fi网络时对手机10的全信道扫描的Wi-Fi指纹进行采集。即仅在手机10断开Wi-Fi网络时,对手机10的全信道扫描的Wi-Fi指纹进行采集。For another example, when the mobile phone 10 is connected to a Wi-Fi network, the judgment result A is that it is not necessary to generate a feature information table, and the Wi-Fi fingerprint is not collected when the mobile phone 10 is connected to the Wi-Fi network. Further, when the mobile phone 10 is disconnected from the Wi-Fi network, the judgment result B is that it is necessary to generate a feature information table, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 is disconnected from the Wi-Fi network. That is, the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected only when the mobile phone 10 is disconnected from the Wi-Fi network.
或例如,在手机10接入Wi-Fi网络时,判断结果A为需要生成特征信息表,则在手机10接入Wi-Fi网络时对手机10的全信道扫描的Wi-Fi指纹进行采集。进一步地,在手机10断开Wi-Fi网络时,判断结果B为不需要生成特征信息表,则在手机10断开Wi-Fi网络时不进行Wi-Fi指纹的采集。即仅在手机10接入Wi-Fi网络时,对手机10的全信道扫描的Wi-Fi指纹进行采集。Or for example, when the mobile phone 10 accesses the Wi-Fi network, the judgment result A is that the feature information table needs to be generated, and the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected when the mobile phone 10 accesses the Wi-Fi network. Further, when the mobile phone 10 disconnects the Wi-Fi network, the judgment result B is that the feature information table does not need to be generated, and the Wi-Fi fingerprint is not collected when the mobile phone 10 disconnects the Wi-Fi network. That is, the Wi-Fi fingerprint of the full channel scan of the mobile phone 10 is collected only when the mobile phone 10 accesses the Wi-Fi network.
具体采集过程可参见上文图4所描述的Wi-Fi指纹的采集过程,在此不加以赘述。For the specific collection process, please refer to the Wi-Fi fingerprint collection process described in FIG. 4 above, which will not be described in detail here.
S54:采集手机10接入Wi-Fi网络的目标网络设备的MAC地址和目标信道。S54: Collect the MAC address and target channel of the target network device for the mobile phone 10 to access the Wi-Fi network.
在一些实施例中,将手机10接入Wi-Fi网络所对应的网络设备的MAC地址作为目标网络设备的MAC地址,将手机10接入Wi-Fi网络前扫描到对应网络设备的Wi-Fi信道作为目标信道。In some embodiments, the MAC address of the network device corresponding to the Wi-Fi network to which the mobile phone 10 accesses is used as the MAC address of the target network device, and the Wi-Fi channel of the corresponding network device scanned before the mobile phone 10 accesses the Wi-Fi network is used as the target channel.
S55:基于采集结果生成特征信息表。S55: Generate a feature information table based on the collection results.
在一些实施例中,基于Wi-Fi指纹、目标网络设备的MAC地址、目标信道以及手机10接入或断开Wi-Fi网络时的状态,生成特征信息表。例如,步骤S503中的特征信息表50。In some embodiments, a feature information table is generated based on the Wi-Fi fingerprint, the MAC address of the target network device, the target channel, and the state of the mobile phone 10 when it is connected to or disconnected from the Wi-Fi network. For example, the feature information table 50 in step S503.
S56:将特征信息表存储至云服务器。S56: Store the feature information table in the cloud server.
在一些实施例中,将该特征信息表传送到云服务器中,以便于用户可以通过云服务器将特征信息表共享至用户的其他终端设备,使得用户在使用除手机10外的其他终端设备时,也可以使用该特征信息表。In some embodiments, the feature information table is transmitted to a cloud server so that the user can share the feature information table to other terminal devices of the user through the cloud server, so that the user can also use the feature information table when using other terminal devices besides mobile phone 10.
S57:结束。在完成特征信息表的存储,或手机10接入以及断开Wi-Fi网络的任一判断结果为不 需要生成特征信息表时,生成特征信息表的流程结束。S57: End. After the storage of the characteristic information table is completed, or the result of any judgment that the mobile phone 10 is connected to or disconnected from the Wi-Fi network is not When it is necessary to generate the feature information table, the process of generating the feature information table ends.
在另一些实施例中,手机10接入或断开目标网络设备提供的Wi-Fi网络时,手机10可以同时采集手机10的Wi-Fi指纹和小区标识(Cellular Identity,cell id)信息,将小区标识集合、Wi-Fi指纹与手机10当前接入的目标网络设备的对应关系加载至特征信息表中,使得手机10可以进一步地通过检测小区标识的变化对手机10的扫描周期进行切换。In other embodiments, when the mobile phone 10 accesses or disconnects from the Wi-Fi network provided by the target network device, the mobile phone 10 can simultaneously collect the Wi-Fi fingerprint and cell identification (Cellular Identity, cell ID) information of the mobile phone 10, and load the correspondence between the cell identification set, the Wi-Fi fingerprint and the target network device currently accessed by the mobile phone 10 into the feature information table, so that the mobile phone 10 can further switch the scanning cycle of the mobile phone 10 by detecting the change of the cell identification.
以下结合上文图5A所示方法和5B所示场景,对本申请的另一些实施例进行解释说明。The following is an explanation of other embodiments of the present application in combination with the method shown in FIG. 5A and the scenario shown in FIG. 5B .
图6A根据本申请的一些实施例,示出了另一种无线通信方法的流程步骤图,应用于手机10,具体包括如下步骤:FIG6A shows a flowchart of another wireless communication method according to some embodiments of the present application, which is applied to a mobile phone 10 and specifically includes the following steps:
S601:检测手机10的Wi-Fi连接模式。S601: Detect the Wi-Fi connection mode of the mobile phone 10.
在一些实施例中,可以通过检测手机10的Wi-Fi连接模式确定手机10是否需要发起Wi-Fi扫描。In some embodiments, whether the mobile phone 10 needs to initiate a Wi-Fi scan may be determined by detecting the Wi-Fi connection mode of the mobile phone 10 .
例如,检测到手机10的Wi-Fi连接模式为连接时,表示手机10已接入Wi-Fi网络,无需发起Wi-Fi扫描,跳转至步骤S601A,流程结束;或例如,检测到手机10的Wi-Fi连接模式为未连接时,表示手机10未接入Wi-Fi网络,需要发起Wi-Fi扫描,跳转至步骤S602。For example, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is connected, it means that the mobile phone 10 has been connected to the Wi-Fi network, and there is no need to initiate a Wi-Fi scan, jump to step S601A, and the process ends; or for example, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected, it means that the mobile phone 10 is not connected to the Wi-Fi network, and a Wi-Fi scan needs to be initiated, jump to step S602.
S602:检测手机10的小区标识是否变化。S602: Detect whether the cell ID of the mobile phone 10 has changed.
在一些实施例中,检测到手机10的Wi-Fi连接模式为未连接时,且手机10的小区标识无变化,表示手机10可能停留在Wi-Fi连接模式为未连接时的位置,跳转至S602A步骤。In some embodiments, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected and the cell identifier of the mobile phone 10 has not changed, it means that the mobile phone 10 may stay at the location when the Wi-Fi connection mode is not connected, and jump to step S602A.
S602A:获取手机10的信道集合,控制手机10通过周期003进行全信道扫描。S602A: Acquire the channel set of the mobile phone 10 and control the mobile phone 10 to perform full channel scanning through cycle 003.
在一些实施例中,例如手机10停留在如图5B所示的位置10D上,手机10周围没有可以扫描的网络设备,则获取手机10的信道集合,控制手机10通过周期003基于信道集合进行全信道扫描。In some embodiments, for example, when the mobile phone 10 stays at the position 10D as shown in FIG. 5B and there is no network device that can be scanned around the mobile phone 10, the channel set of the mobile phone 10 is obtained and the mobile phone 10 is controlled to perform a full channel scan based on the channel set through period 003.
其中,周期003相对于上文图5A中的周期002和周期001,各个周期的扫描周期关系为周期003>周期001>周期002。可以理解,周期003的间隔扫描时间最长,例如,每次间隔120秒进行一次Wi-Fi扫描,是由于当前手机10未连接Wi-Fi网络,且手机10的小区标识无变化,表示手机10可能停留在该未连接Wi-Fi网络的位置,即手机10无法连接Wi-Fi网络,故使用间隔扫描时间最长的周期003进行Wi-Fi扫描,可以降低手机10的扫描功耗。同时,由于此时手机10未连接Wi-Fi网络,故采用全信道扫描方式可以提高手机10扫描到网络设备的效率。Among them, cycle 003 is relative to cycle 002 and cycle 001 in FIG. 5A above, and the scanning cycle relationship of each cycle is cycle 003>cycle 001>cycle 002. It can be understood that the interval scanning time of cycle 003 is the longest. For example, a Wi-Fi scan is performed every 120 seconds. This is because the mobile phone 10 is not currently connected to the Wi-Fi network, and the cell identification of the mobile phone 10 has not changed, indicating that the mobile phone 10 may stay at the location where the Wi-Fi network is not connected, that is, the mobile phone 10 cannot connect to the Wi-Fi network. Therefore, using the cycle 003 with the longest interval scanning time for Wi-Fi scanning can reduce the scanning power consumption of the mobile phone 10. At the same time, since the mobile phone 10 is not connected to the Wi-Fi network at this time, the full channel scanning method can improve the efficiency of the mobile phone 10 scanning network devices.
在另一些实施例中,检测到手机10的Wi-Fi连接模式为未连接时,且手机10的小区标识变化时,表示用户可能携带手机10从Wi-Fi连接模式为未连接时的位置移开,跳转至S602B步骤。In other embodiments, when it is detected that the Wi-Fi connection mode of the mobile phone 10 is not connected and the cell identifier of the mobile phone 10 changes, it means that the user may move the mobile phone 10 away from the location when the Wi-Fi connection mode is not connected, and jump to step S602B.
S602B:获取手机10的特征信息表,将小区标识的变化结果与特征信息表进行匹配。S602B: Obtain a feature information table of the mobile phone 10, and match the change result of the cell identifier with the feature information table.
在一些实施例中,在手机10接入或断开目标网络设备提供的Wi-Fi网络时,通过采集手机10的Wi-Fi指纹和小区标识集合,生成对应目标网络设备的特征信息表。In some embodiments, when the mobile phone 10 accesses or disconnects from the Wi-Fi network provided by the target network device, a feature information table corresponding to the target network device is generated by collecting the Wi-Fi fingerprint and cell identification set of the mobile phone 10 .
例如图6B所示,特征信息表60包括目标网络设备的MAC地址、目标信道、小区标识集合、Wi-Fi指纹及连接态。其中,对应手机10的目标网络设备为网络设备01时,目标网络设备的MAC地址用于表示网络设备01的MAC地址;目标信道用于表示手机10接入网络设备01的Wi-Fi信道;小区标识集合用于表示手机10接入和断开网络设备01时所采集的多个小区标识,如小区标识1A、1B和1C;Wi-Fi指纹用于表示手机10接入和断开网络设备01时所采集到的多个网络设备的MAC地址,如网络设备01至07的MAC地址,且将手机10当前所接入的网络设备01的MAC地址作为目标网络设备的MAC地址;连接态用于表示手机10接入或断开网络设备01,如1表示手机10接入网络设备01,0表示手机10与网络设备01断开连接。For example, as shown in FIG6B , the characteristic information table 60 includes the MAC address of the target network device, the target channel, the cell identifier set, the Wi-Fi fingerprint, and the connection state. Among them, when the target network device corresponding to the mobile phone 10 is the network device 01, the MAC address of the target network device is used to indicate the MAC address of the network device 01; the target channel is used to indicate the Wi-Fi channel of the mobile phone 10 to access the network device 01; the cell identifier set is used to indicate the multiple cell identifiers collected when the mobile phone 10 accesses and disconnects the network device 01, such as the cell identifiers 1A, 1B, and 1C; the Wi-Fi fingerprint is used to indicate the MAC addresses of the multiple network devices collected when the mobile phone 10 accesses and disconnects the network device 01, such as the MAC addresses of the network devices 01 to 07, and the MAC address of the network device 01 currently connected by the mobile phone 10 is used as the MAC address of the target network device; the connection state is used to indicate that the mobile phone 10 accesses or disconnects the network device 01, such as 1 indicates that the mobile phone 10 accesses the network device 01, and 0 indicates that the mobile phone 10 is disconnected from the network device 01.
在一些实施例中,在步骤S602B中,如图5B所示,用户携带手机10从位置10D移动至位置10C,手机从小区标识1D变化至小区标识1C,即变化结果为小区标识1C,且变化结果与特征信息表中小区标识集合匹配,表示手机10周围可能存在可以扫描的网络设备,跳转至步骤S603,即获取手机10的信道集合,对信道集合中的各个扫描信道的扫描次数清零后,控制手机10通过周期001进行全信道扫描,进而提高手机10扫描到网络设备的效率,确保手机10扫描到网络设备的效率。In some embodiments, in step S602B, as shown in FIG5B , the user carries the mobile phone 10 and moves from position 10D to position 10C, and the mobile phone changes from cell identifier 1D to cell identifier 1C, that is, the change result is cell identifier 1C, and the change result matches the cell identifier set in the feature information table, indicating that there may be network devices that can be scanned around the mobile phone 10, and jumps to step S603, that is, obtaining the channel set of the mobile phone 10, and after clearing the scanning times of each scanning channel in the channel set, controlling the mobile phone 10 to perform a full channel scan through cycle 001, thereby improving the efficiency of the mobile phone 10 in scanning network devices and ensuring the efficiency of the mobile phone 10 in scanning network devices.
在一些实施例中,在步骤S603中,手机10通过全信道扫描到网络设备,且该网络设备是手机10历史接入的网络设备时,如扫描到网络设备01时,表示手机10与目标网络设备匹配,跳转至步骤S603A,即手机10可以自动接入网络设备01提供的Wi-Fi网络。In some embodiments, in step S603, when the mobile phone 10 scans a network device through all channels and the network device is a network device that the mobile phone 10 has historically connected to, such as when the network device 01 is scanned, it indicates that the mobile phone 10 matches the target network device and jumps to step S603A, that is, the mobile phone 10 can automatically access the Wi-Fi network provided by the network device 01.
在一些实施例中,在步骤S603中,手机10通过全信道扫描到网络设备,且该网络设备是手机10 历史未接入的网络设备时,如未扫描到网络设备01时,表示手机10与目标网络设备不匹配,跳转至步骤S604,即获取手机10的特征信息表,将全信道扫描的扫描结果与特征信息表进行匹配。In some embodiments, in step S603, the mobile phone 10 scans the network device through all channels, and the network device is the mobile phone 10 When the network device has not been connected in the history, such as when the network device 01 is not scanned, it means that the mobile phone 10 does not match the target network device, and jumps to step S604, that is, obtaining the feature information table of the mobile phone 10, and matching the scanning result of the full channel scan with the feature information table.
在一些实施例中,在步骤S604中,手机10的全信道扫描的扫描结果中多个网络设备的MAC地址与Wi-Fi指纹中多个关联网络设备的MAC地址部分相同时,确定扫描结果与Wi-Fi指纹匹配,跳转至步骤S605,即从特征信息表中获取目标信道,控制手机10基于目标信道并通过周期002进行部分信道扫描。In some embodiments, in step S604, when the MAC addresses of multiple network devices in the scan results of the full channel scan of the mobile phone 10 are partially identical to the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint, it is determined that the scan result matches the Wi-Fi fingerprint, and the process jumps to step S605, that is, obtaining the target channel from the feature information table, and controlling the mobile phone 10 to perform partial channel scanning based on the target channel and through cycle 002.
在一些实施例中,在步骤S605中,如图5B所示,用户携带手机10从位置10C移动至位置10A后,手机10扫描到网络设备01,跳转至步骤S603A,手机10可以自动接入网络设备01提供的Wi-Fi网络。In some embodiments, in step S605, as shown in Figure 5B, after the user carries the mobile phone 10 and moves from position 10C to position 10A, the mobile phone 10 scans the network device 01 and jumps to step S603A. The mobile phone 10 can automatically access the Wi-Fi network provided by the network device 01.
在一些实施例中,在步骤S605中,如图5B所示,若用户携带手机10从位置10C向远离位置10A的方向移动,如从位置10C移动至位置10D,则手机10无法扫描到网络设备01,手机10无法自动接入网络设备01提供的Wi-Fi网络,则跳转至步骤S606,即记录目标信道的扫描次数,判断目标信道的扫描次数是否超过预设次数。In some embodiments, in step S605, as shown in FIG5B , if the user carries the mobile phone 10 and moves from position 10C in a direction away from position 10A, such as from position 10C to position 10D, the mobile phone 10 cannot scan the network device 01, and the mobile phone 10 cannot automatically access the Wi-Fi network provided by the network device 01, then the process jumps to step S606, i.e., recording the number of scans of the target channel and determining whether the number of scans of the target channel exceeds a preset number.
在一些实施例中,在步骤S606中,当手机10未扫描到网络设备01,且目标信道的扫描次数未超过预设次数时,可以表示用户携带手机10可能向靠近网络设备01的方向移动,跳转至步骤S605,手机10继续采用目标信道和周期002进行Wi-Fi扫描。In some embodiments, in step S606, when the mobile phone 10 fails to scan the network device 01 and the number of scans of the target channel does not exceed the preset number, it may indicate that the user carrying the mobile phone 10 may be moving in a direction close to the network device 01, and the process jumps to step S605, and the mobile phone 10 continues to use the target channel and cycle 002 for Wi-Fi scanning.
在另一些实施例中,在步骤S604中,当扫描结果中多个网络设备的MAC地址与Wi-Fi指纹中多个关联网络设备的MAC地址均不相同时,确定扫描结果与Wi-Fi指纹不匹配,跳转至步骤S607。In other embodiments, in step S604, when the MAC addresses of multiple network devices in the scan result are all different from the MAC addresses of multiple associated network devices in the Wi-Fi fingerprint, it is determined that the scan result does not match the Wi-Fi fingerprint, and the process jumps to step S607.
在另一些实施例中,在步骤S606中,当手机10未扫描到网络设备01,且目标信道的扫描次数超过预设次数时,表示用户携带手机10可能向远离网络设备01信号的方向移动,进而使得手机10短时间内无法自动接入网络设备01所提供的Wi-Fi网络,跳转至步骤S607。In other embodiments, in step S606, when the mobile phone 10 fails to scan the network device 01 and the number of scans of the target channel exceeds a preset number, it indicates that the user carrying the mobile phone 10 may be moving in a direction away from the signal of the network device 01, and thus the mobile phone 10 cannot automatically access the Wi-Fi network provided by the network device 01 in a short period of time, and the process jumps to step S607.
S607:检测手机10的状态模式。S607: Detect the status mode of the mobile phone 10.
在一些实施例中,当检测到手机10的状态模式为移动状态时,跳转至步骤S603,即获取手机10的信道集合,对信道集合中的各个扫描信道的扫描次数清零后,控制手机10通过周期001进行全信道扫描。In some embodiments, when it is detected that the state mode of the mobile phone 10 is a mobile state, jump to step S603, that is, obtain the channel set of the mobile phone 10, clear the scanning times of each scanning channel in the channel set, and control the mobile phone 10 to perform a full channel scan through cycle 001.
可以理解,虽然在步骤S604中,手机10的扫描结果与Wi-Fi指纹不匹配;但由于在步骤S602B中,手机10的小区标识的变化结果与小区标识集合匹配;且手机10处于移动状态,手机10可能在移动状态中获取到其他网络设备,进而对该扫描结果进行更新,使得扫描结果可能与Wi-Fi指纹匹配或与目标网络设备匹配,即手机10可以继续通过周期001进行全信道扫描,周期001的间隔扫描时间小于周期003的间隔扫描时间,手机10使用周期001的全信道扫描方式,可以提高手机10扫描到网络设备的效率。It can be understood that although in step S604, the scanning result of mobile phone 10 does not match the Wi-Fi fingerprint; however, since in step S602B, the change result of the cell identifier of mobile phone 10 matches the cell identifier set; and mobile phone 10 is in a mobile state, mobile phone 10 may obtain other network devices in the mobile state, and then update the scanning result, so that the scanning result may match the Wi-Fi fingerprint or the target network device, that is, mobile phone 10 can continue to perform full-channel scanning through cycle 001, and the interval scanning time of cycle 001 is less than the interval scanning time of cycle 003. Mobile phone 10 uses the full-channel scanning method of cycle 001, which can improve the efficiency of mobile phone 10 scanning network devices.
在另一些实施例中,当检测到手机10的状态模式为静止状态时,跳转至步骤S602A,即获取手机10的信道结合,控制手机10通过周期003进行全信道扫描。In other embodiments, when it is detected that the state mode of the mobile phone 10 is a stationary state, the process jumps to step S602A, that is, obtaining the channel combination of the mobile phone 10 and controlling the mobile phone 10 to perform a full channel scan through cycle 003.
可以理解,在步骤S604中,手机10的扫描结果与Wi-Fi指纹不匹配,且手机10处于静止状态,即手机10停留在扫描结果与Wi-Fi指纹不匹配的位置,即手机10无法连接Wi-Fi网络,故使用间隔扫描时间最长的周期003进行Wi-Fi扫描,可以降低手机10的扫描功耗。同时,由于此时手机10未连接Wi-Fi网络,故采用全信道扫描方式可以提高手机10扫描到网络设备的效率。It can be understood that in step S604, the scanning result of the mobile phone 10 does not match the Wi-Fi fingerprint, and the mobile phone 10 is in a stationary state, that is, the mobile phone 10 stays at a position where the scanning result does not match the Wi-Fi fingerprint, that is, the mobile phone 10 cannot connect to the Wi-Fi network, so the Wi-Fi scan is performed using the cycle 003 with the longest interval scanning time, which can reduce the scanning power consumption of the mobile phone 10. At the same time, since the mobile phone 10 is not connected to the Wi-Fi network at this time, the full channel scanning method can improve the efficiency of the mobile phone 10 scanning network devices.
在一些实施例中,在步骤S602A中,若检测到手机10从静止状态切换至移动状态,跳转至步骤S602,即检测手机10的小区标识是否变化。In some embodiments, in step S602A, if it is detected that the mobile phone 10 switches from a stationary state to a moving state, the process jumps to step S602, that is, detecting whether the cell identifier of the mobile phone 10 changes.
可以理解,在小区标识无变化,或小区变化的变化结果与小区标识集合不匹配,或全信道扫描结果与Wi-Fi指纹不匹配且手机10处于静止状态,或目标信道的扫描次数超过预设次数且手机10处于静止状态的手机10无法连接Wi-Fi网络的情况下,手机10采用间隔扫描时间最长的周期003进行Wi-Fi扫描。若在上述情况下检测到手机10从静止状态切换至移动状态,则表示用户可能携带手机10从该无法连接Wi-Fi网络的情况的位置移开,手机10可能在移动状态中获取到其他小区标识,则重新检测手机10的小区标识是否变化,跳转至步骤S602。It can be understood that when the cell identifier does not change, or the result of the cell change does not match the cell identifier set, or the full channel scan result does not match the Wi-Fi fingerprint and the mobile phone 10 is in a stationary state, or the number of scans of the target channel exceeds the preset number of times and the mobile phone 10 is in a stationary state and the mobile phone 10 cannot connect to the Wi-Fi network, the mobile phone 10 uses the cycle 003 with the longest interval scanning time to perform Wi-Fi scanning. If it is detected that the mobile phone 10 switches from a stationary state to a mobile state under the above circumstances, it means that the user may carry the mobile phone 10 away from the location where the Wi-Fi network cannot be connected, and the mobile phone 10 may obtain other cell identifiers in the mobile state, then re-detect whether the cell identifier of the mobile phone 10 has changed, and jump to step S602.
可以理解,相较于图5A所示流程,图6A所示流程增加了小区标识和手机10状态模式的检测,并基于该检测的结果对手机10的扫描周期进行切换的步骤,使得手机10可以在周期001至003进行切 换。同时,只要手机10处于开机状态,就可以获取到所在信号区域内的各个信号基站的小区标识,即手机10获取小区标识不会增加手机10的功耗。并且,在周期001至003中,周期003的间隔扫描时间最长。可以理解,通过小区标识检测使得手机10可以在周期001至003进行切换,可以有效降低手机10的扫描功耗。并且,手机10在回连扫描的过程中,通过特征信息表中多项特征匹配,使得手机10在周期001至003进行切换的同时,在全信道扫描方式、单信道或多信道扫描方式进行切换,进一步降低手机10的扫描功耗,并通过周期的切换提高手机10扫描到网络设备的效率。It can be understood that, compared with the process shown in FIG. 5A , the process shown in FIG. 6A adds the step of detecting the cell identification and the state mode of the mobile phone 10, and switching the scanning cycle of the mobile phone 10 based on the result of the detection, so that the mobile phone 10 can switch between cycles 001 to 003. At the same time, as long as the mobile phone 10 is in the power-on state, the cell identifiers of each signal base station in the signal area can be obtained, that is, the acquisition of the cell identifier by the mobile phone 10 will not increase the power consumption of the mobile phone 10. Moreover, in cycles 001 to 003, the interval scanning time of cycle 003 is the longest. It can be understood that the detection of the cell identifier allows the mobile phone 10 to switch between cycles 001 to 003, which can effectively reduce the scanning power consumption of the mobile phone 10. Moreover, during the reconnection scanning process, the mobile phone 10 matches multiple features in the feature information table, so that the mobile phone 10 switches between the full channel scanning mode, the single channel or the multi-channel scanning mode while switching between cycles 001 to 003, further reducing the scanning power consumption of the mobile phone 10, and improving the efficiency of the mobile phone 10 scanning the network equipment through the switching of the cycle.
可以理解,上述图6A所示流程图中的对手机10小区标识和状态模式的检测仅是一种示例,在另一些实施例中,对手机10小区标识和状态模式的检测还可以应用于前述图1至图5D任意一个场景或任意多个场景的结合中,具体不作限制。It can be understood that the detection of the cell identification and status mode of the mobile phone 10 in the flowchart shown in Figure 6A above is only an example. In other embodiments, the detection of the cell identification and status mode of the mobile phone 10 can also be applied to any one of the scenarios in Figures 1 to 5D above or a combination of any multiple scenarios, without specific limitation.
图7根据本申请的一些实施例,示出了手机10的结构示意图。FIG7 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
可以理解,本申请的实施例所示意的结构并不构成对手机10的具体限定。在本申请的另一些实施例中,手机10可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understood that the structures shown in the embodiments of the present application do not constitute a specific limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
如图7所示,手机10可以包括处理器110、外部存储器接口120、内部存储器121、通用串行总线(universal serial bus,USB)接口130、充电管理模块140、电源管理模块141、电池142、天线1、天线2、移动通信模块150、无线通信模块160、音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、传感器模块180、按键190、马达191、指示器192、摄像头193、显示屏194、以及用户标识模块(subscriber identification module,SIM)卡接口195等。传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M等。As shown in Figure 7, the mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在一些实施例中,处理器110可以执行前述各实施例提供的无线通信方法对应的指令。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. The controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. In some embodiments, the processor 110 can execute the instructions corresponding to the wireless communication methods provided in the aforementioned embodiments.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从上述存储器中直接调用。避免了重复存取,减少处理器110的等待时间,提高处理效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and improves processing efficiency.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口、集成电路内置音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、通用输入输出(general-purpose input/output,GPIO)接口、用户标识模块(subscriber identity module,SIM)接口、和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface 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.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K、充电器、闪光灯、摄像头193等。例如,处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现手机10的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the mobile phone 10.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样、量化和编码。在一些实施例中,音频模块170 与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. The wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via a PCM interface to implement the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如,处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194、摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI)、显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现手机10的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现手机10的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the mobile phone 10. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the mobile phone 10.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193、显示屏194、无线通信模块160、音频模块170、传感器模块180等。GPIO接口还可以被配置为I2C接口、I2S接口、UART接口、MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口130可以用于连接充电器为手机10充电,也可以用于手机10与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with USB standard specifications, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the mobile phone 10, and can also be used to transfer data between the mobile phone 10 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本申请的实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对手机10的结构限定。在本申请的另一些实施例中,手机10也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过手机10的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为手机10供电。The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the mobile phone 10. While the charging management module 140 is charging the battery 142, it may also power the mobile phone 10 through the power management module 141.
电源管理模块141用于连接电池142、充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110、内部存储器121、显示屏194、摄像头193、和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
手机10的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。手机10中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如,可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the mobile phone 10 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 10 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在手机10上的包括2G/3G/4G/5G/6G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器、开关、功率放大器、低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G/6G applied to the mobile phone 10. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A、受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。 在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在手机10上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(Bluetooth,BT)、全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions for the mobile phone 10, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. 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 the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
在一些实施例中,手机10的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机10可以通过无线通信技术与网络以及其他设备通信。该无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址接入(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、时分码分多址(time-division code division multiple access,TD-SCDMA)、长期演进(long term evolution,LTE)、5G以及后续演进标准、BT、GNSS、WLAN、NFC、FM、和/或IR技术等。其中GNSS可以包括全球卫星定位系统(global positioning system,GPS)、全球导航卫星系统(global navigation satellite system,GLONASS)、北斗卫星导航系统(beidou navigation satellite system,BDS)、准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite-based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the mobile phone 10 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 10 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), 5G and subsequent evolution standards, BT, GNSS, WLAN, NFC, FM, and/or IR technology. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and/or the satellite-based augmentation systems (SBAS).
手机10通过GPU、显示屏194、以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可以包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The mobile phone 10 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。在一些实施例中,手机10可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the mobile phone 10 may include 1 or N display screens 194, where N is a positive integer greater than 1.
手机10可以通过ISP、摄像头193、视频编解码器、GPU、显示屏194以及应用处理器等实现拍摄功能。ISP用于处理摄像头193反馈的数据。例如,在拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将该电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The mobile phone 10 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor. ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,手机10可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 10 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当手机10在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the mobile phone 10 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。手机10可以支持一种或多种视频编解码器。这样,手机10可以播放或录制多种编码格式的视频,例如,动态图像专家组(moving picture experts group,MPEG)1、MPEG2、MPEG3、MPEG4等。Video codecs are used to compress or decompress digital videos. Mobile phone 10 may support one or more video codecs. Thus, mobile phone 10 may play or record videos in a variety of coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现手机10的智能认知等应用,例如图像识别、人脸识别、语音识别、文本理解等。NPU is a neural network (NN) computing processor. It can quickly process input information by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, and can also continuously self-learn. NPU can realize applications such as intelligent cognition of the mobile phone 10, such as image recognition, face recognition, voice recognition, text understanding, etc.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐、视频等文件保存在外部存储卡中。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 terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。内部存储器 121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机10使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令、和/或存储在设置于处理器中的存储器的指令,执行手机10的各种功能应用以及数据处理。例如,在一些实施例中,内部存储器121可以用于临时存储前述各实施例提供的无线通信方法的指令。The internal memory 121 may be used to store computer executable program codes, which may include instructions. 121 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 10 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the mobile phone 10 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor. For example, in some embodiments, the internal memory 121 may be used to temporarily store instructions of the wireless communication method provided in the aforementioned embodiments.
手机10可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、以及应用处理器等实现音频功能。例如音乐播放,录音等。The mobile phone 10 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机10的接触和分离。手机10可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡、Micro SIM卡、SIM卡等。同一个SIM卡接口195可以同时插入多张卡。该多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。手机10通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,手机10采用eSIM,即嵌入式SIM卡。eSIM卡可以嵌在手机10中,不能和手机10分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or separated from the mobile phone 10 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The mobile phone 10 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The mobile phone 10 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the mobile phone 10 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile phone 10 and cannot be separated from the mobile phone 10.
图8根据本申请的一些实施例,示出了一种终端设备100的结构示意图。FIG8 shows a schematic structural diagram of a terminal device 100 according to some embodiments of the present application.
如图8所示,终端设备100包括主处理器100A、传感器100B、蜂窝芯片100C、Wi-Fi芯片100D、存储器件100E、其他组件100F等。As shown in FIG. 8 , the terminal device 100 includes a main processor 100A, a sensor 100B, a cellular chip 100C, a Wi-Fi chip 100D, a storage device 100E, other components 100F, and the like.
主处理器100A,用于检测终端设备100的Wi-Fi连接模式;用于检测终端设备100的小区标识是否变化;用于将终端设备100小区标识的变化结果与特征信息表进行匹配;用于对终端设备100的信道集合中的各个扫描信道的扫描次数清零;用于将终端设备100的全信道扫描的扫描结果与特征信息表进行匹配;用于判断终端设备100的目标信道的扫描次数是否超过预设次数;用于检测终端设备100从静止状态切换至移动状态等。主处理器100A的具体功能,以及实现该具体功能的方法,可以参考前述图5A和6A所示步骤的描述。The main processor 100A is used to detect the Wi-Fi connection mode of the terminal device 100; to detect whether the cell identification of the terminal device 100 changes; to match the change result of the cell identification of the terminal device 100 with the characteristic information table; to clear the scanning times of each scanning channel in the channel set of the terminal device 100; to match the scanning results of the full channel scanning of the terminal device 100 with the characteristic information table; to determine whether the scanning times of the target channel of the terminal device 100 exceeds the preset times; to detect the switching of the terminal device 100 from the static state to the mobile state, etc. The specific functions of the main processor 100A and the method for implementing the specific functions can refer to the description of the steps shown in the aforementioned Figures 5A and 6A.
传感器100B,用于获取终端设备100的状态模式,例如静止状态、移动状态等。The sensor 100B is used to obtain the state mode of the terminal device 100, such as a stationary state, a moving state, etc.
蜂窝芯片100C,用于获取终端设备100的小区标识,例如小区标识1A、1B、1C等。The cellular chip 100C is used to obtain the cell identifier of the terminal device 100, such as the cell identifiers 1A, 1B, 1C, etc.
Wi-Fi芯片100D,用于获取终端设备100的Wi-Fi扫描的扫描结果,例如扫描结果可以包括网络设备01至09等。The Wi-Fi chip 100D is used to obtain the scanning result of the Wi-Fi scanning of the terminal device 100. For example, the scanning result may include network devices 01 to 09, etc.
存储器件100E,用于存储终端设备100接入Wi-Fi网络的认证信息、信息特征表、信道集合等。The storage device 100E is used to store authentication information, information feature table, channel set, etc. for the terminal device 100 to access the Wi-Fi network.
可以理解,本申请的实施例所示意的结构并不构成对终端设备100的具体限定。在本申请的另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他 要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and descriptions of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed. Elements, or also include elements inherent to such processes, methods, articles or equipment. In the absence of more restrictions, elements defined by the sentence "including one" do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的范围。 Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims (23)

  1. 一种无线通信方法,其特征在于,包括:A wireless communication method, comprising:
    终端设备以第一扫描方式进行Wi-Fi扫描;The terminal device performs Wi-Fi scanning in a first scanning mode;
    所述终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系满足第一匹配条件;The matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint satisfies the first matching condition;
    所述终端设备以第二扫描方式进行Wi-Fi扫描,其中,所述第一扫描方式的扫描间隔大于所述第二扫描方式的扫描间隔。The terminal device performs Wi-Fi scanning in a second scanning mode, wherein a scanning interval of the first scanning mode is greater than a scanning interval of the second scanning mode.
  2. 根据权利要求1所述的方法,其特征在于,所述第一Wi-Fi指纹通过以下方法确定:The method according to claim 1, wherein the first Wi-Fi fingerprint is determined by:
    所述终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号;The terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device;
    获取所述终端设备扫描到的多个第二Wi-Fi设备;Acquire multiple second Wi-Fi devices scanned by the terminal device;
    基于所述第一Wi-Fi设备和所述多个第二Wi-Fi设备确定所述第一Wi-Fi指纹。The first Wi-Fi fingerprint is determined based on the first Wi-Fi device and the plurality of second Wi-Fi devices.
  3. 根据权利要求1所述的方法,其特征在于,所述第一Wi-Fi指纹通过以下方法确定:The method according to claim 1, wherein the first Wi-Fi fingerprint is determined by:
    所述终端设备在第一时间接入第一Wi-Fi设备提供的第一Wi-Fi信号;The terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device at a first time;
    获取所述终端设备在所述第一时间扫描到的多个第二Wi-Fi设备;Acquire multiple second Wi-Fi devices scanned by the terminal device at the first time;
    基于所述第一Wi-Fi设备和所述多个第二Wi-Fi设备确定所述第一Wi-Fi指纹。The first Wi-Fi fingerprint is determined based on the first Wi-Fi device and the plurality of second Wi-Fi devices.
  4. 根据权利要求2或3所述的方法,其特征在于,还包括:The method according to claim 2 or 3, characterized in that it also includes:
    所述终端设备在第二时间断开第一Wi-Fi设备提供的第一Wi-Fi信号;The terminal device disconnects the first Wi-Fi signal provided by the first Wi-Fi device at a second time;
    将所述终端设备在所述第二时间扫描到的多个Wi-Fi设备作为所述第二Wi-Fi设备以更新所述第一Wi-Fi指纹。The plurality of Wi-Fi devices scanned by the terminal device at the second time are used as the second Wi-Fi devices to update the first Wi-Fi fingerprint.
  5. 根据权利要求2或3所述的方法,其特征在于,所述终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系满足第一匹配条件,包括:The method according to claim 2 or 3, characterized in that the matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint satisfies the first matching condition, including:
    所述终端设备扫描到的Wi-Fi设备包括全部或部分所述多个第二Wi-Fi设备。The Wi-Fi devices scanned by the terminal device include all or part of the multiple second Wi-Fi devices.
  6. 根据权利要求1或2或3所述的方法,其特征在于,还包括:The method according to claim 1, 2 or 3, further comprising:
    对应于所述终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系不满足所述第一匹配条件,所述终端设备以所述第一扫描方式进行Wi-Fi扫描。Corresponding to the matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint not satisfying the first matching condition, the terminal device performs Wi-Fi scanning in the first scanning mode.
  7. 根据权利要求2或3所述的方法,其特征在于,所述终端设备以第一扫描方式进行Wi-Fi扫描,包括:The method according to claim 2 or 3, characterized in that the terminal device performs Wi-Fi scanning in a first scanning mode, comprising:
    当所述终端设备扫描到的Wi-Fi设备包括第一Wi-Fi设备时,所述终端设备接入所述第一Wi-Fi设备提供的第一Wi-Fi信号;When the Wi-Fi devices scanned by the terminal device include a first Wi-Fi device, the terminal device accesses a first Wi-Fi signal provided by the first Wi-Fi device;
    当所述终端设备扫描到的Wi-Fi设备未包括第一Wi-Fi设备时,判断所述终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系是否满足第一匹配条件。When the Wi-Fi devices scanned by the terminal device do not include the first Wi-Fi device, it is determined whether a matching relationship between the Wi-Fi devices scanned by the terminal device and the Wi-Fi devices in the stored first Wi-Fi fingerprint meets a first matching condition.
  8. 根据权利要求2或3所述的方法,其特征在于,所述终端设备以第二扫描方式进行Wi-Fi扫描,包括:The method according to claim 2 or 3, characterized in that the terminal device performs Wi-Fi scanning in the second scanning mode, comprising:
    对应于所述终端设备扫描到的Wi-Fi设备包括第一Wi-Fi设备,所述终端设备接入所述第一Wi-Fi设备提供的第一Wi-Fi信号。The Wi-Fi device scanned by the terminal device includes a first Wi-Fi device, and the terminal device accesses a first Wi-Fi signal provided by the first Wi-Fi device.
  9. 根据权利要求2或3所述的方法,其特征在于,所述终端设备的Wi-Fi扫描支持的Wi-Fi信道包括多个第一Wi-Fi信道;The method according to claim 2 or 3, characterized in that the Wi-Fi channels supported by the Wi-Fi scanning of the terminal device include multiple first Wi-Fi channels;
    所述第一扫描方式包括:基于多个所述第一Wi-Fi信道进行Wi-Fi扫描。 The first scanning method includes: performing Wi-Fi scanning based on multiple first Wi-Fi channels.
  10. 根据权利要求9所述的方法,其特征在于,所述终端设备接入所述第一Wi-Fi设备提供的第一Wi-Fi信号的Wi-Fi信道为第二Wi-Fi信道,其中,所述第二Wi-Fi信道为多个所述第一Wi-Fi信道中的任意一个;The method according to claim 9, characterized in that the Wi-Fi channel through which the terminal device accesses the first Wi-Fi signal provided by the first Wi-Fi device is a second Wi-Fi channel, wherein the second Wi-Fi channel is any one of the plurality of the first Wi-Fi channels;
    所述第二扫描方式包括:基于所述第二Wi-Fi信道进行Wi-Fi扫描。The second scanning mode includes: performing Wi-Fi scanning based on the second Wi-Fi channel.
  11. 根据权利要求10所述的方法,其特征在于,所述终端设备以第二扫描方式进行Wi-Fi扫描,包括:The method according to claim 10, wherein the terminal device performs Wi-Fi scanning in the second scanning mode, comprising:
    获取所述终端设备基于所述第二Wi-Fi信道进行Wi-Fi扫描的第一扫描次数;Obtaining a first scanning number of Wi-Fi scanning performed by the terminal device based on the second Wi-Fi channel;
    对应于所述第一扫描次数未超过第一阈值,所述终端设备以所述第二扫描方式进行Wi-Fi扫描;Corresponding to the first scanning number not exceeding the first threshold, the terminal device performs Wi-Fi scanning in the second scanning mode;
    对应于所述第一扫描次数超过所述第一阈值,所述终端设备以所述第一扫描方式进行Wi-Fi扫描。Corresponding to the first scanning number exceeding the first threshold, the terminal device performs Wi-Fi scanning in the first scanning mode.
  12. 根据权利要求11所述的方法,其特征在于,在所述终端设备以第一扫描方式进行Wi-Fi扫描之前,包括:The method according to claim 11, characterized in that before the terminal device performs Wi-Fi scanning in the first scanning mode, it comprises:
    所述终端设备接收到小区标识与已存储的第一小区标识集合中的小区标识之间的匹配关系满足第二匹配条件;A matching relationship between the cell identifier received by the terminal device and the cell identifiers in the stored first cell identifier set satisfies a second matching condition;
    所述终端设备以所述第一扫描方式进行Wi-Fi扫描。The terminal device performs Wi-Fi scanning in the first scanning mode.
  13. 根据权利要求1所述的方法,其特征在于,所述终端设备以第一扫描方式进行Wi-Fi扫描,包括:The method according to claim 1, wherein the terminal device performs Wi-Fi scanning in a first scanning mode, comprising:
    所述终端设备接收到小区标识与已存储的第一小区标识集合中的小区标识之间的匹配关系不满足第二匹配条件;The matching relationship between the cell identifier received by the terminal device and the cell identifiers in the stored first cell identifier set does not satisfy the second matching condition;
    所述终端设备以第三扫描方式进行Wi-Fi扫描;其中,所述第三扫描方式的扫描间隔大于所述第二扫描方式的扫描间隔。The terminal device performs Wi-Fi scanning in a third scanning mode; wherein a scanning interval of the third scanning mode is greater than a scanning interval of the second scanning mode.
  14. 根据权利要求13所述的方法,其特征在于,所述第一小区标识集合通过以下方法确定:The method according to claim 13, characterized in that the first cell identifier set is determined by the following method:
    所述终端设备接入第一Wi-Fi设备提供的第一Wi-Fi信号;The terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device;
    获取所述终端设备接收到的多个第一小区标识;Acquire multiple first cell identifiers received by the terminal device;
    基于所述多个第一小区标识确定所述第一小区标识集合。The first cell identifier set is determined based on the multiple first cell identifiers.
  15. 根据权利要求14所述的方法,其特征在于,所述第一小区标识集合通过以下方法确定:The method according to claim 14, characterized in that the first cell identifier set is determined by the following method:
    所述终端设备在第一时间接入第一Wi-Fi设备提供的第一Wi-Fi信号;The terminal device accesses a first Wi-Fi signal provided by a first Wi-Fi device at a first time;
    获取所述终端设备在所述第一时间接收到的多个第一小区标识;Acquire multiple first cell identifiers received by the terminal device at the first time;
    基于所述多个第一小区标识确定所述第一小区标识集合。The first cell identifier set is determined based on the multiple first cell identifiers.
  16. 根据权利要求14或15所述的方法,其特征在于,还包括:The method according to claim 14 or 15, characterized in that it also includes:
    所述终端设备在第二时间断开所述第一Wi-Fi设备提供的第一Wi-Fi信号;The terminal device disconnects the first Wi-Fi signal provided by the first Wi-Fi device at a second time;
    将所述终端设备在所述第二时间接收到的多个小区标识作为所述第一小区标识以更新所述第一小区标识集合。The multiple cell identifiers received by the terminal device at the second time are used as the first cell identifiers to update the first cell identifier set.
  17. 根据权利要求13所述的方法,其特征在于,还包括:所述第三扫描方式的扫描间隔大于或等于所述第一扫描方式的扫描间隔。The method according to claim 13 is characterized in that it also includes: a scanning interval of the third scanning mode is greater than or equal to a scanning interval of the first scanning mode.
  18. 根据权利要求13所述的方法,其特征在于,还包括:The method according to claim 13, further comprising:
    所述终端设备以第二扫描方式进行Wi-Fi扫描的Wi-Fi信道为第二Wi-Fi信道;The Wi-Fi channel on which the terminal device performs Wi-Fi scanning in the second scanning mode is a second Wi-Fi channel;
    所述终端设备基于所述第二Wi-Fi信道进行Wi-Fi扫描的第一扫描次数超过第一阈值时; When a first scanning number of the terminal device performing Wi-Fi scanning based on the second Wi-Fi channel exceeds a first threshold;
    对应于所述终端设备处于移动模式,所述终端设备以所述第二扫描方式进行Wi-Fi扫描;Corresponding to the terminal device being in mobile mode, the terminal device performs Wi-Fi scanning in the second scanning mode;
    对应于所述终端设备处于静止模式,所述终端设备以所述第三扫描方式进行Wi-Fi扫描。Corresponding to the terminal device being in the static mode, the terminal device performs Wi-Fi scanning in the third scanning mode.
  19. 根据权利要求13所述的方法,其特征在于,还包括:The method according to claim 13, further comprising:
    所述终端设备扫描到的Wi-Fi设备与已存储的第一Wi-Fi指纹中的Wi-Fi设备之间的匹配关系不满足第一匹配条件时;When the matching relationship between the Wi-Fi device scanned by the terminal device and the Wi-Fi device in the stored first Wi-Fi fingerprint does not meet the first matching condition;
    对应于所述终端设备处于移动模式,所述终端设备以所述第二扫描方式进行Wi-Fi扫描;Corresponding to the terminal device being in mobile mode, the terminal device performs Wi-Fi scanning in the second scanning mode;
    对应于所述终端设备处于静止模式,所述终端设备以所述第三扫描方式进行Wi-Fi扫描。Corresponding to the terminal device being in the static mode, the terminal device performs Wi-Fi scanning in the third scanning mode.
  20. 根据权利要求18或19所述的方法,其特征在于,所述终端设备以第三扫描方式进行Wi-Fi扫描,包括:The method according to claim 18 or 19, characterized in that the terminal device performs Wi-Fi scanning in a third scanning mode, comprising:
    所述终端设备从所述静止模式切换至所述移动模式,判断所述终端设备接收到小区标识与已存储的第一小区标识集合中的小区标识之间的匹配关系是否满足所述第二匹配条件。The terminal device switches from the stationary mode to the mobile mode, and determines whether a matching relationship between a cell identifier received by the terminal device and a cell identifier in the stored first cell identifier set satisfies the second matching condition.
  21. 根据权利要求12所述的方法,其特征在于,还包括:The method according to claim 12, further comprising:
    所述第一Wi-Fi指纹和/或所述第一小区标识集合存储在云服务器。The first Wi-Fi fingerprint and/or the first cell identifier set is stored in a cloud server.
  22. 一种计算机可读存储介质,其特征在于,所述可读存储介质上存储有指令,所述指令在终端设备上执行时使所述终端设备实现权利要求1至21中任一项所述的方法。A computer-readable storage medium, characterized in that instructions are stored on the readable storage medium, and when the instructions are executed on a terminal device, the terminal device implements the method described in any one of claims 1 to 21.
  23. 一种终端设备,其特征在于,包括:A terminal device, comprising:
    存储器,用于存储由终端设备的一个或多个处理器执行的指令;a memory for storing instructions to be executed by one or more processors of the terminal device;
    以及处理器,是所述终端设备的处理器之一,用于执行所述存储器中存储的指令以实现权利要求1至21中任一项所述方法。 And a processor, which is one of the processors of the terminal device, configured to execute instructions stored in the memory to implement the method described in any one of claims 1 to 21.
PCT/CN2023/129117 2022-11-18 2023-11-01 Wireless communication method, storage medium, and terminal device WO2024104173A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211448766.7A CN118102419A (en) 2022-11-18 2022-11-18 Wireless communication method, storage medium and terminal device
CN202211448766.7 2022-11-18

Publications (1)

Publication Number Publication Date
WO2024104173A1 true WO2024104173A1 (en) 2024-05-23

Family

ID=91083770

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/129117 WO2024104173A1 (en) 2022-11-18 2023-11-01 Wireless communication method, storage medium, and terminal device

Country Status (2)

Country Link
CN (1) CN118102419A (en)
WO (1) WO2024104173A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103813414A (en) * 2012-11-15 2014-05-21 中兴通讯股份有限公司 Mobile terminal Wi-Fi application and control method and mobile terminal
CN107820298A (en) * 2017-11-22 2018-03-20 广东欧珀移动通信有限公司 Wireless network management method, wireless network management device and intelligent terminal
CN113225787A (en) * 2021-04-06 2021-08-06 Oppo广东移动通信有限公司 Wi-Fi scanning method, terminal equipment and storage medium
US20210282075A1 (en) * 2016-08-01 2021-09-09 Samsung Electronics Co., Ltd. Scan method in near-field wireless communication network and electronic device for implementing same
CN114339698A (en) * 2020-09-30 2022-04-12 华为技术有限公司 Method for establishing wireless connection through equipment touch, electronic equipment and chip

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103813414A (en) * 2012-11-15 2014-05-21 中兴通讯股份有限公司 Mobile terminal Wi-Fi application and control method and mobile terminal
US20210282075A1 (en) * 2016-08-01 2021-09-09 Samsung Electronics Co., Ltd. Scan method in near-field wireless communication network and electronic device for implementing same
CN107820298A (en) * 2017-11-22 2018-03-20 广东欧珀移动通信有限公司 Wireless network management method, wireless network management device and intelligent terminal
CN114339698A (en) * 2020-09-30 2022-04-12 华为技术有限公司 Method for establishing wireless connection through equipment touch, electronic equipment and chip
CN113225787A (en) * 2021-04-06 2021-08-06 Oppo广东移动通信有限公司 Wi-Fi scanning method, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN118102419A (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN115209194B (en) Terminal equipment, method and system for realizing one touch screen through remote controller
CN114924682A (en) Content connection method and electronic equipment
CN110582109A (en) Wireless Local Area Network (WLAN) network access method and device
CN114499587B (en) Audio synchronization communication method, system, wireless earphone, terminal and storage medium
CN114125789B (en) Communication method, terminal device and storage medium
CN116114239B (en) Volume management method and electronic equipment
WO2021027623A1 (en) Device capability discovery method and p2p device
CN114610193A (en) Content sharing method, electronic device, and storage medium
CN111615177A (en) Cell search method and user equipment
WO2024104173A1 (en) Wireless communication method, storage medium, and terminal device
EP4102927A1 (en) Dual wifi connection method and electronic device
CN114915359B (en) Method, apparatus, electronic device and readable storage medium for selecting channel
CN112099741B (en) Display screen position identification method, electronic device and computer readable storage medium
CN113407076A (en) Method for starting application and electronic equipment
CN114980238B (en) Wi-Fi access method and related equipment
CN114285737B (en) Method and device for configuring device
CN113630823B (en) Network measurement method, device, terminal equipment and computer readable storage medium
CN116981108B (en) Wireless screen-throwing connection method, mobile terminal and computer readable storage medium
CN115734323B (en) Power consumption optimization method and device
WO2023236670A1 (en) Data transmission management method, electronic device and storage medium
CN115134402B (en) Equipment connection method and electronic equipment
WO2024022154A1 (en) Method for determining device user, and related apparatus
CN116744275A (en) Communication method, electronic equipment and device
CN114968163A (en) Audio playing method, electronic equipment, system and storage medium
CN117354955A (en) Network connection method, electronic device and storage medium