WO2022233210A1 - Network connection method and device, and storage medium - Google Patents

Network connection method and device, and storage medium Download PDF

Info

Publication number
WO2022233210A1
WO2022233210A1 PCT/CN2022/085087 CN2022085087W WO2022233210A1 WO 2022233210 A1 WO2022233210 A1 WO 2022233210A1 CN 2022085087 W CN2022085087 W CN 2022085087W WO 2022233210 A1 WO2022233210 A1 WO 2022233210A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
access point
stored
connection
channel
Prior art date
Application number
PCT/CN2022/085087
Other languages
French (fr)
Chinese (zh)
Inventor
许超杰
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022233210A1 publication Critical patent/WO2022233210A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Definitions

  • the present application relates to the field of electronic technology, and in particular, to a network connection method and device, and a storage medium.
  • More and more wearable devices or smart home devices have short-range wireless communication capabilities such as Bluetooth/Near Field Communication (NFC)/Ultra Wide Band (UWB), as well as Wi-Fi links. ability.
  • Wi-Fi transmission can complete the transmission of large data in a relatively short period of time, thereby increasing the data transmission rate, and the built-in Wi-Fi module is in a sleep and low-power listening state most of the time.
  • the wearable device After the wearable device is paired with the mobile phone through Bluetooth, the mobile phone sends the information of its own access point to the wearable device through the Bluetooth link, and the wearable device performs Wi-Fi scanning according to the access point information.
  • the wearable device needs to traverse all Wi-Fi channels. Since Wi-Fi channels include 13 channels of 2.4G, there are also more than a dozen channels on 5G. Assuming that the scanning time of each channel is 40ms, traversing All channels may take 1 or 2 seconds, affecting the Wi-Fi connection speed of the wearable device. Since scanning requires sending and receiving specific Wi-Fi management frames, the Wi-Fi module in the wearable device also consumes more power.
  • Embodiments of the present application provide a network connection method, device, and storage medium, which can improve the Wi-Fi connection speed of the device and reduce the power consumption of the Wi-Fi module.
  • an embodiment of the present application proposes a network connection method, which is applied to a slave device, and the method includes:
  • Wi-Fi information Receive wireless communication technology Wi-Fi information through the first transmission channel, and connect with the access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel of the access point Related Information.
  • an embodiment of the present application proposes a network connection method, and the method includes:
  • the Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
  • an embodiment of the present application provides a network connection device, and the device includes:
  • a receiving module for receiving Wi-Fi information through the first transmission channel
  • a connection module configured to connect with an access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • an embodiment of the present application provides a network connection device, and the device includes:
  • the acquisition module is used to acquire the Wi-Fi information of the access point
  • a sending module configured to send the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • an embodiment of the present application provides a network connection device, the device includes: a receiver, a first processor, a first memory, and a first communication bus; the first processor executes an operation stored in the first memory
  • the program time implements the method as described in any of the above.
  • an embodiment of the present application provides a network connection device, the device includes: a transmitter, a second processor, a second memory, and a second communication bus; the second processor executes an operation stored in the second memory
  • the program time implements the method as described in any of the above.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by the first processor, the method described in any of the foregoing is implemented.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by a second processor, implements the method described in any one of the foregoing.
  • FIG. 1 is a flowchart 1 of a network connection method provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a network structure of an exemplary master-slave device according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of the internal structure of an exemplary slave device provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an exemplary slave device scanning for access points according to an embodiment of the present application
  • FIG. 5 is a flowchart of selecting an access point from a device according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of an exemplary slave device performing an access point connection according to an embodiment of the present application
  • FIG. 7 is a flowchart of performing access point monitoring from a device according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of current comparison of an exemplary slave device provided by an embodiment of the present application.
  • FIG. 9 is a second flowchart of a network connection method provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram 1 of a network connection device 1 according to an embodiment of the present application.
  • FIG. 11 is a second schematic structural diagram of a network connection device 1 according to an embodiment of the application.
  • FIG. 12 is a schematic structural diagram 1 of a network connection device 2 according to an embodiment of the present application.
  • FIG. 13 is a second schematic structural diagram of a network connection device 2 according to an embodiment of the present application.
  • an embodiment of the present application provides a network connection method, and the method includes:
  • the Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
  • the method further includes:
  • the monitoring information of the access point currently connected by the main device is acquired from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the access point currently connected by the main device based on the monitoring information.
  • the receiving Wi-Fi information through the first transmission channel includes:
  • the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration, and the pre-stored Wi-Fi information is the Wi-Fi information sent by the master device in the past. Fi information collection;
  • the connecting with the access point based on the Wi-Fi information includes:
  • the connecting with the access point based on the Wi-Fi information includes:
  • the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration, selecting a first access point based on the pre-stored Wi-Fi information;
  • selecting the first access point based on the updated pre-stored Wi-Fi information or selecting the first access point based on the pre-stored Wi-Fi information includes:
  • connection parameters do not meet the preset connection conditions, select a first access point according to the updated pre-stored Wi-Fi information or channel-related information in the pre-stored Wi-Fi information;
  • the access point to which the master device is currently connected is determined as the first access point.
  • the Wi-Fi information includes at least one of the following:
  • Wi-Fi information of the access point currently connected by the master device and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
  • the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
  • the method further includes:
  • the method further includes:
  • the Wi-Fi information sent by the master device when the update condition is satisfied is received.
  • the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is adjusted according to the location and/or time period of the slave device .
  • the channel related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
  • the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
  • an embodiment of the present application proposes a network connection method, and the method includes:
  • the Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
  • the acquiring Wi-Fi information of the access point includes:
  • the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
  • an embodiment of the present application provides a network connection device, and the device includes:
  • a receiving module for receiving Wi-Fi information through the first transmission channel
  • a connection module configured to connect with an access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • the device further includes: an acquisition module;
  • the receiving module is further configured to, after connecting to the access point currently connected to the main device, receive the Wi-Fi of the access point currently connected to the main device sent by the main device through the first transmission channel information;
  • the obtaining module is configured to obtain the monitoring information of the access point currently connected by the main device from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the main device based on the monitoring information The currently connected access point.
  • the device further includes: a judging module and a sending module;
  • the obtaining module is also used to obtain the first distance between the master device and the slave device;
  • the judging module is configured to judge whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration under the condition that the first distance is less than the preset distance threshold, and the pre-stored Wi-Fi information is all historically received data.
  • the set of Wi-Fi information sent by the master device is configured to judge whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration under the condition that the first distance is less than the preset distance threshold, and the pre-stored Wi-Fi information is all historically received data.
  • the sending module is configured to send a Wi-Fi information request message to the master device through the first transmission channel when the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration;
  • the receiving module is further configured to receive Wi-Fi information sent by the master device through the first transmission channel.
  • the device further includes: an update module and a search module;
  • the updating module configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select a first access point based on the updated pre-stored Wi-Fi information
  • the search module is configured to search the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  • the device further includes: a selection module
  • the selection module is configured to select a first access point based on the pre-stored Wi-Fi information when the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration;
  • the search module is further configured to search the connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  • the device further includes: a determining module
  • the determining module is configured to determine the access point currently connected to the master device; in the case that the connection parameter satisfies the preset connection condition, determine the access point currently connected to the master device as the access point the first access point;
  • the obtaining module is further configured to obtain connection parameters of the access point currently connected to the master device;
  • the selection module is further configured to select the first Wi-Fi information according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information when the connection parameters do not meet the preset connection conditions. an access point.
  • the Wi-Fi information includes at least one of the following:
  • Wi-Fi information of the access point currently connected by the master device and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
  • the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
  • the device further comprises: a disconnection module
  • the disconnecting module is configured to disconnect the Wi-Fi connection of the first access point after connecting to the first access point and completing data transmission based on the first access point.
  • the receiving module is further configured to receive, through the first transmission channel, the Wi-Fi information sent by the master device under the condition that the update condition is satisfied.
  • the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is based on the location and/or time period of the slave device make adjustments.
  • the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
  • the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
  • an embodiment of the present application provides a network connection device, and the device includes:
  • the acquisition module is used to acquire the Wi-Fi information of the access point
  • a sending module configured to send the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • the obtaining module is further configured to obtain the Wi-Fi information of the currently connected access point; and/or obtain the Wi-Fi information of the scanned access point; and/or obtain the stored access point Wi-Fi information.
  • the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
  • an embodiment of the present application provides a network connection device, the device includes: a receiver, a first processor, a first memory, and a first communication bus; the first processor executes an operation stored in the first memory
  • the program implements the following methods:
  • the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • the first processor is further configured to, after being connected to the access point currently connected to the master device, receive through the first transmission channel the information sent by the master device that the master device is currently connected to Wi-Fi information of the access point; obtain the monitoring information of the access point currently connected by the main device from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the access point based on the monitoring information The access point to which the master device is currently connected.
  • the first processor is further configured to obtain the first distance between the master device and the slave device; in the case that the first distance is less than a preset distance threshold, determine the distance between the pre-stored Wi-Fi information Whether the storage duration is greater than the preset storage duration, the pre-stored Wi-Fi information is a collection of Wi-Fi information sent by the master device received in the past; if the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration In the case of , send a Wi-Fi information request message to the master device through the first transmission channel, and receive the Wi-Fi information sent by the master device through the first transmission channel.
  • the first processor is further configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select a first access point based on the updated pre-stored Wi-Fi information; Search for the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  • the first processor is further configured to select a first connection based on the pre-stored Wi-Fi information under the condition that the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration an access point; searching for the connection information of the first access point from the pre-stored Wi-Fi information, and connecting with the access point according to the connection information of the first access point.
  • the first processor is further configured to determine the access point to which the master device is currently connected; obtain connection parameters of the access point currently connected to the master device; In the case of setting connection conditions, select the first access point according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information; when the connection parameters satisfy the preset connection In the case of the condition, the access point currently connected to the master device is determined as the first access point.
  • the Wi-Fi information includes at least one of the following:
  • Wi-Fi information of the access point currently connected by the master device and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
  • the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
  • the first processor is further configured to disconnect the Wi-Fi of the first access point after connecting to the first access point and completing data transmission based on the first access point Fi connection.
  • the first processor is further configured to receive, through the first transmission channel, the Wi-Fi information sent by the master device when the update condition is satisfied.
  • the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is based on the location and/or time period of the slave device make adjustments.
  • the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
  • the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
  • an embodiment of the present application provides a network connection device, the device includes: a transmitter, a second processor, a second memory, and a second communication bus; the second processor executes an operation stored in the second memory
  • the program implements the following methods:
  • the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • the second processor is further configured to obtain the Wi-Fi information of the currently connected access point; and/or obtain the Wi-Fi information of the scanned access point; and/or obtain the stored access point Access point's Wi-Fi information.
  • the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by the first processor, the above-mentioned network connection method is implemented.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by a second processor, the foregoing network connection method is implemented.
  • Embodiments of the present application provide a network connection method, device, and storage medium, which are applied to slave devices.
  • the method includes: receiving Wi-Fi information through a first transmission channel, and connecting with an access point based on the Wi-Fi information ;
  • the Wi-Fi information includes at least the SSID, encryption information and channel related information of the access point.
  • the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel between the master device and the slave device, and the slave device is directly based on the Wi-Fi information sent by the master device.
  • the access point connection is realized without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
  • An embodiment of the present application provides a network connection method. As shown in FIG. 1 , the method may include:
  • Wi-Fi information Receive Wi-Fi information through a first transmission channel, and connect with an access point based on the Wi-Fi information; the Wi-Fi information at least includes an SSID of the access point, encryption information, and channel-related information.
  • the network connection method proposed in the embodiment of the present application is suitable for a scenario where a slave device with a built-in Wi-Fi module, such as a wearable device or a smart home device, performs a Wi-Fi connection.
  • the master device may be any device with communication and storage functions, such as a tablet computer, a mobile phone, a personal computer (Personal Computer, PC), a notebook computer, and other devices.
  • the information exchange between the master device and the slave device is carried out through a first transmission channel, wherein the first transmission channel may be a Bluetooth transmission channel, a near field communication (Near field communication, NFC) channel, an ultra wide band communication (Ultra Wide Band, UWB) Channels and other low-power transmission channels.
  • the Bluetooth transmission channel a Bluetooth connection is established between the master device and the slave device in advance, and information is exchanged through the Bluetooth transmission channel.
  • the network structure of the master and slave devices is shown in FIG. 2 , the master device and the slave devices are connected through Bluetooth, and the master device and the slave devices are respectively connected with the Wi-Fi access point through Wi-Fi.
  • the slave device includes a display module, a processing module, a storage module, a Wi-Fi module and a Bluetooth module, wherein the Bluetooth module of the slave device is used to communicate with the master device.
  • the Wi-Fi module of the slave device is used to connect with the Wi-Fi access point, so the master device also includes a Bluetooth module and a Wi-Fi module.
  • the master device may send Wi-Fi information to the slave device under the condition that the update conditions are met, where the Wi-Fi information includes at least one of the following: the Wi-Fi information of the access point currently connected to the master device information, and/or Wi-Fi information of access points scanned by the master device, and/or Wi-Fi information of access points stored by the master device.
  • the Wi-Fi information includes at least a wireless local area network identifier (Service Set Identifier, SSID) of an access point, encryption information, and channel-related information, where the channel-related information may include at least one of the following: channel, timing synchronization Function (Timing Synchronization Function, TSF), link rate, Basic Service Set-load (BSS-load), Received Signal Strength Indication (RSSI), Traffic Indication Management (Traffic Indication Management) , TIM), Channel Switch Announcement (CSA), Extended Channel Switch Announcement Information element (Extended Channel Switch Announcement Information element, ECSA IE).
  • TSF timing synchronization Function
  • BSS-load Basic Service Set-load
  • RSSI Received Signal Strength Indication
  • Traffic Indication Management Traffic Indication Management
  • TIM Traffic Indication Management
  • TIM Channel Switch Announcement
  • CSA Channel Switch Announcement
  • ECSA IE Extended Channel Switch Announcement Information element
  • the Wi-Fi information of the access point currently connected by the master device may include the SSID of the access point (Access Point, AP), the basic wireless local area network identifier (Basic Service Set Identifier, BSSID), the password (password), the channel ( channel), TSF, link speed (link-speed), etc., which can be selected according to the actual situation, which is not specifically limited in the embodiment of this application;
  • the Wi-Fi information of the access point stored by the master device may include: SSID, BSSID, password, channel;
  • Wi-Fi information of the access point scanned by the master device may include: SSID, BSSID, channel, RSSI, link-speed, BSS-load.
  • the update condition may be the preset update period and/or the number of Wi-Fi scans of the master device, that is, when the preset update period arrives, the master device sends the Wi-Fi data within the preset update period to the slave device. information; or when the number of Wi-Fi scans of the master device is greater than the preset number threshold, the master device sends the scanned Wi-Fi information to the slave device, and the specific update conditions can be selected according to the actual situation. specific restrictions.
  • the preset update period can be adjusted according to the location and/or time period of the slave device. For example, when the slave device is in an outdoor open scene, the slave device is not connected to the access point or has no access point that can be connected. At this time, the master device informs the slave device that it is in an outdoor open scene and reduces the frequency of Wi-Fi information sending; or, if it is at night, the slave device notifies the master device to reduce the frequency of Wi-Fi information sending or prohibit sending Wi-Fi information. Fi information.
  • the master device may first group and encode the Wi-Fi information, and then send the grouped and encoded Wi-Fi information to the slave device through the first transmission channel. In this case, the amount of data transmission can be reduced. It should be noted that the embodiments of the present application do not limit the manner of grouping and encoding the Wi-Fi information, and the specific method may be selected according to the actual situation, which will not be repeated here.
  • the Wi-Fi information can also carry other information in the beacon frame (beason), such as TIM/CSA/ECSA IE, etc.
  • the information carried in the specific Wi-Fi information can be The determination is performed according to a specific Wi-Fi function, and details are not described herein again.
  • the slave device after receiving the Wi-Fi information sent by the master device through the first transmission channel, stores the Wi-Fi information in the pre-stored Wi-Fi information. At this time, the slave device can use the pre-stored Wi-Fi information
  • the information implements the process of AP selection and AP connection, wherein the pre-stored Wi-Fi information is a collection of Wi-Fi information received from the device history and sent by the master device.
  • the slave device can also actively request the master device to send Wi-Fi information during the AP connection process. Specifically, the slave device obtains the first distance between the master device and the slave device, and compares the first distance with the preset Set a distance threshold for comparison, and when the slave device determines that the first distance is less than the preset distance, determine whether the storage duration of the pre-stored Wi-Fi information inside the slave device is greater than the preset storage duration, and then the storage duration of the pre-stored Wi-Fi information is determined. When the duration is longer than the preset storage duration, the slave device sends a Wi-Fi information request message to the master device through the first transmission channel. After receiving the Wi-Fi information request message, the master device sends Wi-Fi information to the slave device through the first transmission channel. -Fi info.
  • the slave device determines that the first distance is not less than the preset distance, the slave device continues to use the existing AP scanning method, and actively initiates scanning to obtain access point information.
  • the Wi-Fi information is updated to the pre-stored Wi-Fi information, and based on the updated pre-stored Wi-Fi information - Fi information selects the first access point, searches for the connection information of the first access point from the updated pre-stored Wi-Fi information, and connects the access point according to the connection information of the first access point.
  • the first Wi-Fi information corresponding to the first access point is searched from the updated pre-stored Wi-Fi information, and then the connection information of the first access point is extracted from the first Wi-Fi information.
  • the connection information of the first access point includes channel, SSID, and password in the first Wi-Fi information.
  • the first access point when the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration, the first access point is selected based on the pre-stored Wi-Fi information; The connection information of the first access point is searched, and the access point connection is performed according to the connection information of the first access point.
  • the slave device When the first distance is greater than the preset distance threshold, the slave device actively initiates scanning
  • the slave device determines whether the Wi-Fi information stored in the device has expired
  • the process of selecting the first access point based on the updated pre-stored Wi-Fi information or selecting the first access point based on the pre-stored Wi-Fi information from the device is shown in FIG. 5 :
  • S202 Acquire connection parameters of the access point currently connected to the master device.
  • connection parameters do not meet the preset connection conditions, select a first access point according to the updated pre-stored Wi-Fi information or channel-related information in the pre-stored Wi-Fi information.
  • connection parameter satisfies the preset connection condition, determine the access point to which the master device is currently connected as the first access point.
  • the slave device selects the access point, it first selects the access point that the master device is currently connected to, and then judges whether the connection parameters of the access point currently connected to the master device meet the preset connection conditions.
  • the connection parameter can be the connection result or the signal quality of the access point.
  • the connection of the access point currently connected by the master device fails or the signal quality of the access point is lower than the quality threshold, it indicates the connection parameter of the access point currently connected by the master device.
  • the slave device selects the first access point according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information. Specifically, the slave device determines the optimal first access point according to information such as channel, link-speed, bss-load, and RSSI.
  • the access point currently connected by the main device when the access point currently connected by the main device is successfully connected or the signal quality of the access point is higher than the quality threshold, it indicates that the connection parameter meets the preset connection condition, and the access point currently connected by the main device is determined as first access point.
  • the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel with the slave device, and the slave device is directly based on the Wi-Fi information sent by the master device.
  • the access point connection is realized without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
  • the process of connecting an access point from a device specifically includes:
  • the slave device determines whether the access point 1 is successfully connected or whether the signal quality of the access point 1 is greater than a preset threshold
  • the slave device may connect to the first access point based on the first access point. After the access point completes the data transmission, the Wi-Fi connection of the first access point is disconnected. In this case, the monitoring hold of the access point is not required, and the system power consumption of the slave device can be reduced.
  • the slave device after S101, that is, after the slave device realizes the access point connection based on the Wi-Fi information, the slave device also performs the process of monitoring the access point, as shown in Fig. 7 as shown,
  • the master device monitors the first access point in real time, and periodically sends the access point currently connected to the master device to the slave device through the first transmission channel.
  • the Wi-Fi information of the ingress point where the Wi-Fi information includes relevant information in the beamon frame, such as TSF information, TIM information, etc.
  • the slave device synchronizes its own internal storage according to the relevant information in the beamon frame, thereby realizing docking Ingress monitoring.
  • the slave device when the slave device is connected to an access point at the same time as the master device, it does not need to wake up at the target beam transmission time (Target Beacon Transmission Time, TBTT) to monitor the access point's beam, but Through the first transmission channel between the master device and the slave device, the Wi-Fi information of the access point sent by the master device is received. As shown in Figure 8, there is a reason interval between every two adjacent TBTTs. At each TBTT moment, a beason monitoring is triggered, and the receiving current of the slave device using the Wi-Fi module for beam monitoring is much greater than the receiving current of the slave device receiving the access point Wi-Fi information sent by the master device at the TBTT moment. Therefore, It can greatly reduce the power consumption of the slave device.
  • TBTT target Beacon Transmission Time
  • the embodiments of the present application further provide a network connection method, as shown in FIG. 9 , the method may include:
  • Wi-Fi information Acquire Wi-Fi information of an access point, and send the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes an SSID of the access point, encryption information, and channel-related information.
  • the main device acquires the Wi-Fi information of the access point, wherein the main device can acquire the Wi-Fi information of the currently connected access point; and/or the main device acquires the Wi-Fi information of the scanned access point Fi information; and/or the master device obtains stored Wi-Fi information of the access point.
  • the master device in the process of sending Wi-Fi information through the first transmission channel, can process the Wi-Fi information through a preset grouping and encoding method before sending it, which can reduce the amount of data transmission.
  • the application embodiments do not limit the specific grouping and encoding manner.
  • the frequency at which the master device sends Wi-Fi information can be a preset update period, or when the master device detects a large change in the sending of certain information, it can actively update the slave device, such as scanning for more information.
  • the master device can actively update the slave device, such as scanning for more information.
  • an AP can be connected, send the connectable AP scanned by the master device to the slave device.
  • the slave device actively requests the master device to obtain Wi-Fi information according to its own stored information or changes in other external conditions.
  • the embodiment of the present application provides a network connection device 1 .
  • the device 1 includes:
  • the receiving module 10 is used for receiving wireless communication technology Wi-Fi information through the first transmission channel;
  • the connection module 11 is configured to connect with the access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • the device further includes: an acquisition module;
  • the receiving module 10 is further configured to, after connecting to the access point currently connected to the main device, receive the Wi-Fi data of the access point currently connected to the main device sent by the main device through the first transmission channel. Fi information;
  • the obtaining module is configured to obtain the monitoring information of the access point currently connected by the main device from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the main device based on the monitoring information The currently connected access point.
  • the device further includes: a judging module and a sending module;
  • the obtaining module is also used to obtain the first distance between the master device and the slave device;
  • the judging module is configured to judge whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration under the condition that the first distance is less than the preset distance threshold, and the pre-stored Wi-Fi information is all historically received data.
  • the set of Wi-Fi information sent by the master device is configured to judge whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration under the condition that the first distance is less than the preset distance threshold, and the pre-stored Wi-Fi information is all historically received data.
  • the sending module is configured to send a Wi-Fi information request message to the master device through the first transmission channel when the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration;
  • the receiving module 10 is further configured to receive Wi-Fi information sent by the master device through the first transmission channel.
  • the device further includes: an update module and a search module;
  • the updating module configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select a first access point based on the updated pre-stored Wi-Fi information
  • the search module is configured to search the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  • the device further includes: a selection module
  • the selection module is configured to select a first access point based on the pre-stored Wi-Fi information when the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration;
  • the search module is further configured to search the connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  • the device further includes: a determining module
  • the determining module is configured to determine the access point currently connected to the master device; in the case that the connection parameter satisfies the preset connection condition, determine the access point currently connected to the master device as the access point the first access point;
  • the obtaining module is further configured to obtain connection parameters of the access point currently connected to the master device;
  • the selection module is further configured to select the first Wi-Fi information according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information when the connection parameters do not meet the preset connection conditions. an access point.
  • the Wi-Fi information includes at least one of the following:
  • Wi-Fi information of the access point currently connected by the master device and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
  • the Wi-Fi information is information processed by the main device in a preset grouping and encoding manner.
  • the device further includes: a disconnection module
  • the disconnecting module is configured to disconnect the Wi-Fi connection of the first access point after connecting to the first access point and completing data transmission based on the first access point.
  • the receiving module 10 is further configured to receive, through the first transmission channel, the Wi-Fi information sent by the master device when the update condition is satisfied.
  • the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is performed according to the location and/or time period of the slave device. Adjustment.
  • the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA , Extended Channel Switch Notification Information Element ECSA IE.
  • the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
  • a network connection device 1 receives Wi-Fi information through a first transmission channel, and connects with an access point based on the Wi-Fi information, where the Wi-Fi information at least includes the SSID of the access point, Encrypted information and channel related information. It can be seen that in the device 1 proposed in this embodiment, the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel between the master device and the slave device, and the slave device directly based on the master device The Wi-Fi information sent by the device realizes the connection of the access point without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
  • FIG. 11 is a second schematic diagram of the composition and structure of a network connection device 1 provided by an embodiment of the present application.
  • the device 1 in this embodiment includes: The receiver 12 , the first processor 13 , the first memory 14 and the first communication bus 15 .
  • the above-mentioned receiving module 10 , connecting module 11 , acquiring module, judging module, sending module, updating module, searching module, selecting module, determining module and disconnecting module can be controlled by the first module located on the device 1 .
  • the processor 13 is implemented, the above-mentioned receiving module 10 can be implemented by the receiver 12 located on the device 1, and the above-mentioned first processor 13 can be an application-specific integrated circuit (ASIC, Application Specific Integrated Circuit), a digital signal processor (DSP, Digital Signal Processor), Digital Signal Processing Image Processing Device (DSPD, Digital Signal Processing Device), Programmable Logic Image Processing Device (PLD, Programmable Logic Device), Field Programmable Gate Array (FPGA, Field Programmable Gate Array), CPU, controller , at least one of a microcontroller and a microprocessor.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Image Processing Device
  • PLD Programmable Logic Image Processing Device
  • FPGA Field Programmable Gate Array
  • CPU controller , at least one of a microcontroller and a microprocessor.
  • controller at least one of a microcontroller and a microprocessor.
  • the above-mentioned first communication bus 15 is used to realize the connection and communication between the receiver 12, the first processor 13 and the first memory 14; the above-mentioned receiver 12 is used to receive the data through the first transmission channel. Wi-Fi information; the first processor 13 implements the following network connection method when executing the running program stored in the first memory 14:
  • the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • the first processor 13 is further configured to, after connecting to the access point currently connected by the master device, receive the information sent by the master device through the first transmission channel Wi-Fi information of the access point currently connected to the master device; obtain the monitoring information of the access point currently connected to the master device from the Wi-Fi information of the access point currently connected to the master device, to obtain the monitoring information of the access point currently connected to the master device based on the The monitoring information monitors the access point that the master device is currently connected to.
  • the first processor 13 is further configured to acquire the first distance between the master device and the slave device; in the case that the first distance is less than a preset distance threshold, determine the pre-stored distance Whether the storage duration of the Wi-Fi information is greater than the preset storage duration, the pre-stored Wi-Fi information is a collection of Wi-Fi information sent by the master device received in the past; if the storage duration of the pre-stored Wi-Fi information is longer than all In the case of the preset storage duration, the Wi-Fi information request message is sent to the master device through the first transmission channel, and the Wi-Fi information sent by the master device is received through the first transmission channel.
  • the first processor 13 is further configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select the first processor based on the updated pre-stored Wi-Fi information An access point; searching for connection information of the first access point from the updated pre-stored Wi-Fi information, and connecting with the access point according to the connection information of the first access point.
  • the first processor 13 is further configured to, under the condition that the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration, based on the pre-stored Wi-Fi information information to select a first access point; search for connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  • the first processor 13 is further configured to determine the access point currently connected to the master device; acquire the connection parameters of the access point currently connected to the master device; If the connection parameters do not meet the preset connection conditions, select the first access point according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information; In the case of the preset connection condition, the access point to which the master device is currently connected is determined as the first access point.
  • the Wi-Fi information includes at least one of the following:
  • Wi-Fi information of the access point currently connected by the master device and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
  • the Wi-Fi information is the information processed by the main device in a preset grouping and encoding manner.
  • the first processor 13 is further configured to disconnect the first access point after connecting to the first access point and completing data transmission based on the first access point Wi-Fi connection at the ingress point.
  • the first processor 13 is further configured to receive, through the first transmission channel, Wi-Fi information sent by the master device under the condition that the update condition is satisfied.
  • the update conditions include: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is based on the location of the slave device and/or the number of Wi-Fi scans of the master device. / or time period to adjust.
  • the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, and traffic indication management TIM , Channel Switch Notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
  • the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near field communication NFC channel, and an ultra-wideband communication UWB channel.
  • An embodiment of the present application provides a storage medium on which a computer program is stored, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors and applied to a device In 1, the computer program implements the network connection method as described above.
  • An embodiment of the present application provides a network connection device 2. As shown in FIG. 12, the device 2 includes:
  • an acquisition module 20 configured to acquire Wi-Fi information of the access point
  • the sending module 21 is configured to send the Wi-Fi information through the first transmission channel; the Wi-Fi information at least includes the SSID of the access point, encryption information and channel related information.
  • the acquiring module 20 is further configured to acquire the Wi-Fi information of the currently connected access point; and/or acquire the Wi-Fi information of the scanned access point; and/or acquire the stored access point Wi-Fi information.
  • the Wi-Fi information is information processed by the main device in a preset grouping and encoding manner.
  • the embodiment of the present application provides a network connection device 2, which acquires Wi-Fi information of an access point and sends the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel of the access point Related Information.
  • the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel between the master device and the slave device, and the slave device directly based on the master device
  • the Wi-Fi information sent by the device realizes the connection of the access point without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
  • FIG. 13 is a second schematic diagram of the composition and structure of a network connection device 2 provided by an embodiment of the present application.
  • the device 2 in this embodiment includes: The transmitter 22 , the second processor 23 , the second memory 24 and the second communication bus 25 .
  • the above-mentioned obtaining module 20 may be implemented by the second processor 23 located on the device 2
  • the above-mentioned sending module 21 may be implemented by the transmitter 22 located on the device 2
  • the above-mentioned second processor 23 may be an ASIC , at least one of DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It can be understood that, for different devices, the electronic device used to implement the function of the processor may also be other, which is not specifically limited in this embodiment.
  • the above-mentioned second communication bus 25 is used to realize the connection and communication between the transmitter 22, the second processor 23 and the second memory 24; the above-mentioned transmitter 22 is used to transmit all data through the first transmission channel.
  • the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  • the second processor 23 is further configured to acquire the Wi-Fi information of the currently connected access point; and/or acquire the Wi-Fi information of the scanned access point; and/or Or get the Wi-Fi information of the stored access point.
  • the Wi-Fi information is the information processed by the main device in a preset grouping and encoding manner.
  • An embodiment of the present application provides a storage medium on which a computer program is stored, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors and applied to a device In 2, the computer program implements the network connection method as described above.
  • the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
  • the technical solutions of the present disclosure can be embodied in the form of software products in essence or the parts that make contributions to related technologies.
  • the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) ), including several instructions for causing an image display device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present disclosure.

Landscapes

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

Abstract

Embodiments of the present application provide a network connection method and device, and a storage medium. The method comprises: receiving wireless information technology Wi-Fi information by means of a first transmission channel, and connecting an access point on the basis of the Wi-Fi information, the Wi-Fi information at least comprising an SSID of the access point, encryption information, and information related to the channel.

Description

一种网络连接方法及设备、存储介质A network connection method and device, and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请基于申请号为202110491600.2、申请日为2021年05月06日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is based on the Chinese patent application with the application number of 202110491600.2 and the application date of May 6, 2021, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请涉及电子技术领域,尤其涉及一种网络连接方法及设备、存储介质。The present application relates to the field of electronic technology, and in particular, to a network connection method and device, and a storage medium.
背景技术Background technique
越来越多的穿戴式设备或智能家居设备除了具有蓝牙/近场通信(Near Field Communication,NFC)/超宽带通信(Ultra Wide Band,UWB)等短距离无线通信能力,也具备Wi-Fi链接能力。利用Wi-Fi传输可以在较短时间内完成大数据的传输,进而提高数据传输速率,且在大部分的时间内置Wi-Fi模块处于睡眠低功耗监听状态。More and more wearable devices or smart home devices have short-range wireless communication capabilities such as Bluetooth/Near Field Communication (NFC)/Ultra Wide Band (UWB), as well as Wi-Fi links. ability. The use of Wi-Fi transmission can complete the transmission of large data in a relatively short period of time, thereby increasing the data transmission rate, and the built-in Wi-Fi module is in a sleep and low-power listening state most of the time.
以穿戴式设备为例,在穿戴式设备与手机通过蓝牙配对之后,手机将自身连接接入点信息用过蓝牙链路发送给穿戴式设备,穿戴式设备根据接入点信息进行Wi-Fi扫描和Wi-Fi链接过程,穿戴式设备需要遍历所有Wi-Fi信道,由于Wi-Fi信道包括2.4G的13个信道,5G上也有十几个信道,假设每个信道的扫描时间是40ms,遍历所有信道可能会耗费1、2秒的时间,影响穿戴式设备的Wi-Fi连接速度。由于扫描需要发送和接收特定Wi-Fi管理帧,穿戴式设备中的Wi-Fi模块也会耗费较多的功耗。Taking the wearable device as an example, after the wearable device is paired with the mobile phone through Bluetooth, the mobile phone sends the information of its own access point to the wearable device through the Bluetooth link, and the wearable device performs Wi-Fi scanning according to the access point information. In the process of linking with Wi-Fi, the wearable device needs to traverse all Wi-Fi channels. Since Wi-Fi channels include 13 channels of 2.4G, there are also more than a dozen channels on 5G. Assuming that the scanning time of each channel is 40ms, traversing All channels may take 1 or 2 seconds, affecting the Wi-Fi connection speed of the wearable device. Since scanning requires sending and receiving specific Wi-Fi management frames, the Wi-Fi module in the wearable device also consumes more power.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种网络连接方法及设备、存储介质,能够提高设备的Wi-Fi连接速度,并减少Wi-Fi模块功耗。Embodiments of the present application provide a network connection method, device, and storage medium, which can improve the Wi-Fi connection speed of the device and reduce the power consumption of the Wi-Fi module.
本申请的技术方案是这样实现的:The technical solution of the present application is realized as follows:
第一方面,本申请实施例提出一种网络连接方法,应用于从设备,所述方法包括:In a first aspect, an embodiment of the present application proposes a network connection method, which is applied to a slave device, and the method includes:
通过第一传输通道,接收无线通信技术Wi-Fi信息,并基于所述Wi-Fi信息与接入点进行连接;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。Receive wireless communication technology Wi-Fi information through the first transmission channel, and connect with the access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel of the access point Related Information.
第二方面,本申请实施例提出一种网络连接方法,所述方法包括:In a second aspect, an embodiment of the present application proposes a network connection method, and the method includes:
获取接入点的Wi-Fi信息,并通过第一传输通道发送所述Wi-Fi信息;Acquire Wi-Fi information of the access point, and send the Wi-Fi information through the first transmission channel;
所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。The Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
第三方面,本申请实施例提出一种网络连接设备,所述设备包括:In a third aspect, an embodiment of the present application provides a network connection device, and the device includes:
接收模块,用于通过第一传输通道,接收Wi-Fi信息;a receiving module for receiving Wi-Fi information through the first transmission channel;
连接模块,用于基于所述Wi-Fi信息与接入点进行连接;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。A connection module, configured to connect with an access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
第四方面,本申请实施例提出一种网络连接设备,所述设备包括:In a fourth aspect, an embodiment of the present application provides a network connection device, and the device includes:
获取模块,用于获取接入点的Wi-Fi信息;The acquisition module is used to acquire the Wi-Fi information of the access point;
发送模块,用于通过第一传输通道发送所述Wi-Fi信息;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。A sending module, configured to send the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
第五方面,本申请实施例提出一种网络连接设备,所述设备包括:接收器、第一处理器、第一存储器及第一通信总线;所述第一处理器执行第一存储器存储的运行程序时实现如上述任一项所述的方法。In a fifth aspect, an embodiment of the present application provides a network connection device, the device includes: a receiver, a first processor, a first memory, and a first communication bus; the first processor executes an operation stored in the first memory The program time implements the method as described in any of the above.
第六方面,本申请实施例提出一种网络连接设备,所述设备包括:发送器、第二处理器、第二存储器及第二通信总线;所述第二处理器执行第二存储器存储的运行程序时实现如上述任一项所述的方法。In a sixth aspect, an embodiment of the present application provides a network connection device, the device includes: a transmitter, a second processor, a second memory, and a second communication bus; the second processor executes an operation stored in the second memory The program time implements the method as described in any of the above.
第七方面,本申请实施例提出一种存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时实现如上述任一项所述的方法。In a seventh aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by the first processor, the method described in any of the foregoing is implemented.
第八方面,本申请实施例提出一种存储介质,其上存储有计算机程序,该计算机程序被第二处理器执行时实现如上述任一项所述的方法。In an eighth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by a second processor, implements the method described in any one of the foregoing.
附图说明Description of drawings
图1为本申请实施例提供的一种网络连接方法的流程图一;FIG. 1 is a flowchart 1 of a network connection method provided by an embodiment of the present application;
图2为本申请实施例提供的一种示例性的主从设备的网络结构示意图;FIG. 2 is a schematic diagram of a network structure of an exemplary master-slave device according to an embodiment of the present application;
图3为本申请实施例提供的一种示例性的从设备的内部结构示意图;3 is a schematic diagram of the internal structure of an exemplary slave device provided by an embodiment of the present application;
图4为本申请实施例提供的一种示例性的从设备进行接入点扫描的流程示意图;FIG. 4 is a schematic flowchart of an exemplary slave device scanning for access points according to an embodiment of the present application;
图5为本申请实施例提供的一种从设备进行接入点选择的流程图;FIG. 5 is a flowchart of selecting an access point from a device according to an embodiment of the present application;
图6为本申请实施例提供的一种示例性的从设备进行接入点连接的流程示意图;FIG. 6 is a schematic flowchart of an exemplary slave device performing an access point connection according to an embodiment of the present application;
图7为本申请实施例提供的一种从设备执行接入点监听的流程图;FIG. 7 is a flowchart of performing access point monitoring from a device according to an embodiment of the present application;
图8为本申请实施例提供的一种示例性的从设备的电流对比示意图;FIG. 8 is a schematic diagram of current comparison of an exemplary slave device provided by an embodiment of the present application;
图9为本申请实施例提供的一种网络连接方法的流程图二;FIG. 9 is a second flowchart of a network connection method provided by an embodiment of the present application;
图10为本申请实施例提供的一种网络连接设备1的结构示意图一;FIG. 10 is a schematic structural diagram 1 of a network connection device 1 according to an embodiment of the present application;
图11为本申请实施例提供的一种网络连接设备1的结构示意图二;FIG. 11 is a second schematic structural diagram of a network connection device 1 according to an embodiment of the application;
图12为本申请实施例提供的一种网络连接设备2的结构示意图一;FIG. 12 is a schematic structural diagram 1 of a network connection device 2 according to an embodiment of the present application;
图13为本申请实施例提供的一种网络连接设备2的结构示意图二。FIG. 13 is a second schematic structural diagram of a network connection device 2 according to an embodiment of the present application.
具体实施方式Detailed ways
第一方面,本申请实施例提出一种网络连接方法,所述方法包括:In a first aspect, an embodiment of the present application provides a network connection method, and the method includes:
通过第一传输通道,接收无线信息技术Wi-Fi信息,并基于所述Wi-Fi信息与接入点进行连接;Receive wireless information technology Wi-Fi information through the first transmission channel, and connect with the access point based on the Wi-Fi information;
所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。The Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
在上述方法中,所述基于所述Wi-Fi信息与接入点进行连接之后,所述方法还包括:In the above method, after the connection with the access point based on the Wi-Fi information, the method further includes:
在连接至主设备当前连接的接入点之后,通过所述第一传输通道,接收所述主设备发送的所述主设备当前连接的接入点的Wi-Fi信息;After connecting to the access point currently connected to the main device, receive the Wi-Fi information of the access point currently connected to the main device sent by the main device through the first transmission channel;
从所述主设备当前连接的接入点的Wi-Fi信息中获取所述主设备当前连接的接入点的监听信息,以基于所述监听信息监听所述主设备当前连接的接入点。The monitoring information of the access point currently connected by the main device is acquired from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the access point currently connected by the main device based on the monitoring information.
在上述方法中,所述通过第一传输通道,接收Wi-Fi信息,包括:In the above method, the receiving Wi-Fi information through the first transmission channel includes:
获取主设备和从设备之间的第一距离;Get the first distance between the master device and the slave device;
在所述第一距离小于预设距离阈值的情况下,判断预存Wi-Fi信息的存储时长是否 大于预设存储时长,所述预存Wi-Fi信息为历史接收到所述主设备发送的Wi-Fi信息集合;In the case that the first distance is less than the preset distance threshold, it is determined whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration, and the pre-stored Wi-Fi information is the Wi-Fi information sent by the master device in the past. Fi information collection;
在所述预存Wi-Fi信息的存储时长大于所述预设存储时长的情况下,通过所述第一传输通道向所述主设备发送Wi-Fi信息请求消息,并通过所述第一传输通道,接收所述主设备发送的Wi-Fi信息。When the storage duration of the pre-stored Wi-Fi information is longer than the preset storage duration, send a Wi-Fi information request message to the master device through the first transmission channel, and send a Wi-Fi information request message through the first transmission channel , to receive the Wi-Fi information sent by the master device.
在上述方法中,所述基于所述Wi-Fi信息与接入点进行连接,包括:In the above method, the connecting with the access point based on the Wi-Fi information includes:
将所述Wi-Fi信息更新至所述预存Wi-Fi信息中,并基于更新后的预存Wi-Fi信息选择第一接入点;updating the Wi-Fi information to the pre-stored Wi-Fi information, and selecting a first access point based on the updated pre-stored Wi-Fi information;
从所述更新后的预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。Search for the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
在上述方法中,所述基于所述Wi-Fi信息与接入点进行连接,包括:In the above method, the connecting with the access point based on the Wi-Fi information includes:
在所述预存Wi-Fi信息的存储时长不大于所述预设存储时长的情况下,基于所述预存Wi-Fi信息选择第一接入点;In the case that the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration, selecting a first access point based on the pre-stored Wi-Fi information;
从所述预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。Search the connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
在上述方法中,所述基于更新后的预存Wi-Fi信息选择第一接入点或所述基于所述预存Wi-Fi信息选择第一接入点,包括:In the above method, selecting the first access point based on the updated pre-stored Wi-Fi information or selecting the first access point based on the pre-stored Wi-Fi information includes:
确定所述主设备当前连接的接入点;determining the access point to which the master device is currently connected;
获取所述主设备当前连接的接入点的连接参数;Obtain the connection parameters of the access point currently connected to the master device;
在所述连接参数不满足预设连接条件的情况下,根据所述更新后的预存Wi-Fi信息或所述预存Wi-Fi信息中的信道相关信息,选择第一接入点;In the case that the connection parameters do not meet the preset connection conditions, select a first access point according to the updated pre-stored Wi-Fi information or channel-related information in the pre-stored Wi-Fi information;
在所述连接参数满足所述预设连接条件的情况下,将所述主设备当前连接的接入点确定为所述第一接入点。In the case that the connection parameter satisfies the preset connection condition, the access point to which the master device is currently connected is determined as the first access point.
在上述方法中,所述Wi-Fi信息包括以下至少一种:In the above method, the Wi-Fi information includes at least one of the following:
主设备当前连接的接入点的Wi-Fi信息、和/或所述主设备扫描的接入点的Wi-Fi信息、和/或所述主设备存储的接入点的Wi-Fi信息。Wi-Fi information of the access point currently connected by the master device, and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
在上述方法中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。In the above method, the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
在上述方法中,所述基于所述Wi-Fi信息与接入点进行连接之后,所述方法还包括:In the above method, after the connection with the access point based on the Wi-Fi information, the method further includes:
在连接至第一接入点、且基于所述第一接入点完成数据传输之后,断开所述第一接入点的Wi-Fi连接。After connecting to the first access point and completing the data transfer based on the first access point, disconnecting the Wi-Fi connection of the first access point.
在上述方法中,所述方法还包括:In the above method, the method further includes:
通过所述第一传输通道,接收主设备在满足更新条件的情况下发送的Wi-Fi信息。Through the first transmission channel, the Wi-Fi information sent by the master device when the update condition is satisfied is received.
在上述方法中,所述更新条件包括:预设更新时段和/或所述主设备的Wi-Fi扫描数量,其中,所述预设更新时段根据从设备所处位置和/或时间段进行调整。In the above method, the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is adjusted according to the location and/or time period of the slave device .
在上述方法中,所述信道相关信息包括以下至少一种:信道、定时同步功能TSF、链路速率、基本服务集负载状态BSS-load、接收信号强度指示RSSI、流量指示管理TIM、信道切换通知CSA、扩展信道切换通知信息元素ECSA IE。In the above method, the channel related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
在上述方法中,所述第一传输通道包括以下至少一种:蓝牙传输通道、近场通信NFC通道、超宽带通信UWB通道。In the above method, the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
第二方面,本申请实施例提出一种网络连接方法,所述方法包括:In a second aspect, an embodiment of the present application proposes a network connection method, and the method includes:
获取接入点的Wi-Fi信息,并通过第一传输通道发送所述Wi-Fi信息;Acquire Wi-Fi information of the access point, and send the Wi-Fi information through the first transmission channel;
所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。The Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
在上述方法中,所述获取接入点的Wi-Fi信息,包括:In the above method, the acquiring Wi-Fi information of the access point includes:
获取当前连接的接入点的Wi-Fi信息;Get the Wi-Fi information of the currently connected access point;
和/或获取扫描的接入点的Wi-Fi信息;and/or obtain Wi-Fi information of scanned access points;
和/或获取存储的接入点的Wi-Fi信息。and/or obtain stored Wi-Fi information for the access point.
在上述方法中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。In the above method, the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
第三方面,本申请实施例提出一种网络连接设备,所述设备包括:In a third aspect, an embodiment of the present application provides a network connection device, and the device includes:
接收模块,用于通过第一传输通道,接收Wi-Fi信息;a receiving module for receiving Wi-Fi information through the first transmission channel;
连接模块,用于基于所述Wi-Fi信息与接入点进行连接;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。A connection module, configured to connect with an access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
在上述设备中,所述设备还包括:获取模块;In the above device, the device further includes: an acquisition module;
所述接收模块,还用于在连接至主设备当前连接的接入点之后,通过所述第一传输通道,接收所述主设备发送的所述主设备当前连接的接入点的Wi-Fi信息;The receiving module is further configured to, after connecting to the access point currently connected to the main device, receive the Wi-Fi of the access point currently connected to the main device sent by the main device through the first transmission channel information;
所述获取模块,用于从所述主设备当前连接的接入点的Wi-Fi信息中获取所述主设备当前连接的接入点的监听信息,以基于所述监听信息监听所述主设备当前连接的接入点。The obtaining module is configured to obtain the monitoring information of the access point currently connected by the main device from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the main device based on the monitoring information The currently connected access point.
在上述设备中,所述设备还包括:判断模块和发送模块;In the above device, the device further includes: a judging module and a sending module;
所述获取模块,还用于获取主设备和从设备之间的第一距离;The obtaining module is also used to obtain the first distance between the master device and the slave device;
所述判断模块,用于在所述第一距离小于预设距离阈值的情况下,判断预存Wi-Fi信息的存储时长是否大于预设存储时长,所述预存Wi-Fi信息为历史接收到所述主设备发送的Wi-Fi信息集合;The judging module is configured to judge whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration under the condition that the first distance is less than the preset distance threshold, and the pre-stored Wi-Fi information is all historically received data. The set of Wi-Fi information sent by the master device;
所述发送模块,用于在所述预存Wi-Fi信息的存储时长大于所述预设存储时长的情况下,通过所述第一传输通道向所述主设备发送Wi-Fi信息请求消息;The sending module is configured to send a Wi-Fi information request message to the master device through the first transmission channel when the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration;
所述接收模块,还用于通过所述第一传输通道,接收所述主设备发送的Wi-Fi信息。The receiving module is further configured to receive Wi-Fi information sent by the master device through the first transmission channel.
在上述设备中,所述设备还包括:更新模块和查找模块;In the above device, the device further includes: an update module and a search module;
所述更新模块,用于将所述Wi-Fi信息更新至所述预存Wi-Fi信息中,并基于更新后的预存Wi-Fi信息选择第一接入点;the updating module, configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select a first access point based on the updated pre-stored Wi-Fi information;
所述查找模块,用于从所述更新后的预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。The search module is configured to search the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
在上述设备中,所述设备还包括:选择模块;In the above device, the device further includes: a selection module;
所述选择模块,用于在所述预存Wi-Fi信息的存储时长不大于所述预设存储时长的情况下,基于所述预存Wi-Fi信息选择第一接入点;The selection module is configured to select a first access point based on the pre-stored Wi-Fi information when the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration;
所述查找模块,还用于从所述预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。The search module is further configured to search the connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
在上述设备中,所述设备还包括:确定模块;In the above device, the device further includes: a determining module;
所述确定模块,用于确定所述主设备当前连接的接入点;在所述连接参数满足所述预设连接条件的情况下,将所述主设备当前连接的接入点确定为所述第一接入点;The determining module is configured to determine the access point currently connected to the master device; in the case that the connection parameter satisfies the preset connection condition, determine the access point currently connected to the master device as the access point the first access point;
所述获取模块,还用于获取所述主设备当前连接的接入点的连接参数;The obtaining module is further configured to obtain connection parameters of the access point currently connected to the master device;
所述选择模块,还用于在所述连接参数不满足预设连接条件的情况下,根据所述更新后的预存Wi-Fi信息或所述预存Wi-Fi信息中的信道相关信息,选择第一接入点。The selection module is further configured to select the first Wi-Fi information according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information when the connection parameters do not meet the preset connection conditions. an access point.
在上述设备中,所述Wi-Fi信息包括以下至少一种:In the above device, the Wi-Fi information includes at least one of the following:
主设备当前连接的接入点的Wi-Fi信息、和/或所述主设备扫描的接入点的Wi-Fi信息、和/或所述主设备存储的接入点的Wi-Fi信息。Wi-Fi information of the access point currently connected by the master device, and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
在上述设备中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。In the above device, the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
在上述设备中,所述设备还包括:断开模块;In the above device, the device further comprises: a disconnection module;
所述断开模块,用于在连接至第一接入点、且基于所述第一接入点完成数据传输之后,断开所述第一接入点的Wi-Fi连接。The disconnecting module is configured to disconnect the Wi-Fi connection of the first access point after connecting to the first access point and completing data transmission based on the first access point.
在上述设备中,所述接收模块,还用于通过所述第一传输通道,接收主设备在满足更新条件的情况下发送的Wi-Fi信息。In the above device, the receiving module is further configured to receive, through the first transmission channel, the Wi-Fi information sent by the master device under the condition that the update condition is satisfied.
在上述设备中,所述更新条件包括:预设更新时段和/或所述主设备的Wi-Fi扫描数量,其中,所述预设更新时段根据所述从设备所处位置和/或时间段进行调整。In the above device, the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is based on the location and/or time period of the slave device make adjustments.
在上述设备中,所述信道相关信息包括以下至少一种:信道、定时同步功能TSF、链路速率、基本服务集负载状态BSS-load、接收信号强度指示RSSI、流量指示管理TIM、信道切换通知CSA、扩展信道切换通知信息元素ECSA IE。In the above device, the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
在上述设备中,所述第一传输通道包括以下至少一种:蓝牙传输通道、近场通信NFC通道、超宽带通信UWB通道。In the above device, the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
第四方面,本申请实施例提出一种网络连接设备,所述设备包括:In a fourth aspect, an embodiment of the present application provides a network connection device, and the device includes:
获取模块,用于获取接入点的Wi-Fi信息;The acquisition module is used to acquire the Wi-Fi information of the access point;
发送模块,用于通过第一传输通道发送所述Wi-Fi信息;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。A sending module, configured to send the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
在上述设备中,所述获取模块,还用于获取当前连接的接入点的Wi-Fi信息;和/或获取扫描的接入点的Wi-Fi信息;和/或获取存储的接入点的Wi-Fi信息。In the above device, the obtaining module is further configured to obtain the Wi-Fi information of the currently connected access point; and/or obtain the Wi-Fi information of the scanned access point; and/or obtain the stored access point Wi-Fi information.
在上述设备中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。In the above device, the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
第五方面,本申请实施例提出一种网络连接设备,所述设备包括:接收器、第一处理器、第一存储器及第一通信总线;所述第一处理器执行第一存储器存储的运行程序时实现以下方法:In a fifth aspect, an embodiment of the present application provides a network connection device, the device includes: a receiver, a first processor, a first memory, and a first communication bus; the first processor executes an operation stored in the first memory The program implements the following methods:
基于所述Wi-Fi信息与接入点进行连接;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。Connect with the access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
在上述设备中,所述第一处理器,还用于在连接至主设备当前连接的接入点之后,通过所述第一传输通道,接收所述主设备发送的所述主设备当前连接的接入点的Wi-Fi信息;从所述主设备当前连接的接入点的Wi-Fi信息中获取所述主设备当前连接的接入点的监听信息,以基于所述监听信息监听所述主设备当前连接的接入点。In the above device, the first processor is further configured to, after being connected to the access point currently connected to the master device, receive through the first transmission channel the information sent by the master device that the master device is currently connected to Wi-Fi information of the access point; obtain the monitoring information of the access point currently connected by the main device from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the access point based on the monitoring information The access point to which the master device is currently connected.
在上述设备中,所述第一处理器,还用于获取主设备和从设备之间的第一距离;在所述第一距离小于预设距离阈值的情况下,判断预存Wi-Fi信息的存储时长是否大于预设存储时长,所述预存Wi-Fi信息为历史接收到所述主设备发送的Wi-Fi信息集合;在所述预存Wi-Fi信息的存储时长大于所述预设存储时长的情况下,通过所述第一传输通道向所述主设备发送Wi-Fi信息请求消息,并通过所述第一传输通道,接收所述主设备发送的Wi-Fi信息。In the above device, the first processor is further configured to obtain the first distance between the master device and the slave device; in the case that the first distance is less than a preset distance threshold, determine the distance between the pre-stored Wi-Fi information Whether the storage duration is greater than the preset storage duration, the pre-stored Wi-Fi information is a collection of Wi-Fi information sent by the master device received in the past; if the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration In the case of , send a Wi-Fi information request message to the master device through the first transmission channel, and receive the Wi-Fi information sent by the master device through the first transmission channel.
在上述设备中,所述第一处理器,还用于将所述Wi-Fi信息更新至所述预存Wi-Fi信息中,并基于更新后的预存Wi-Fi信息选择第一接入点;从所述更新后的预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。In the above device, the first processor is further configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select a first access point based on the updated pre-stored Wi-Fi information; Search for the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
在上述设备中,所述第一处理器,还用于在所述预存Wi-Fi信息的存储时长不大于所述预设存储时长的情况下,基于所述预存Wi-Fi信息选择第一接入点;从所述预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。In the above device, the first processor is further configured to select a first connection based on the pre-stored Wi-Fi information under the condition that the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration an access point; searching for the connection information of the first access point from the pre-stored Wi-Fi information, and connecting with the access point according to the connection information of the first access point.
在上述设备中,所述第一处理器,还用于确定所述主设备当前连接的接入点;获取 所述主设备当前连接的接入点的连接参数;在所述连接参数不满足预设连接条件的情况下,根据所述更新后的预存Wi-Fi信息或所述预存Wi-Fi信息中的信道相关信息,选择第一接入点;在所述连接参数满足所述预设连接条件的情况下,将所述主设备当前连接的接入点确定为所述第一接入点。In the above device, the first processor is further configured to determine the access point to which the master device is currently connected; obtain connection parameters of the access point currently connected to the master device; In the case of setting connection conditions, select the first access point according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information; when the connection parameters satisfy the preset connection In the case of the condition, the access point currently connected to the master device is determined as the first access point.
在上述设备中,所述Wi-Fi信息包括以下至少一种:In the above device, the Wi-Fi information includes at least one of the following:
主设备当前连接的接入点的Wi-Fi信息、和/或所述主设备扫描的接入点的Wi-Fi信息、和/或所述主设备存储的接入点的Wi-Fi信息。Wi-Fi information of the access point currently connected by the master device, and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
在上述设备中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。In the above device, the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
在上述设备中,所述第一处理器,还用于在连接至第一接入点、且基于所述第一接入点完成数据传输之后,断开所述第一接入点的Wi-Fi连接。In the above device, the first processor is further configured to disconnect the Wi-Fi of the first access point after connecting to the first access point and completing data transmission based on the first access point Fi connection.
在上述设备中,所述第一处理器,还用于通过所述第一传输通道,接收主设备在满足更新条件的情况下发送的Wi-Fi信息。In the above device, the first processor is further configured to receive, through the first transmission channel, the Wi-Fi information sent by the master device when the update condition is satisfied.
在上述设备中,所述更新条件包括:预设更新时段和/或所述主设备的Wi-Fi扫描数量,其中,所述预设更新时段根据所述从设备所处位置和/或时间段进行调整。In the above device, the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is based on the location and/or time period of the slave device make adjustments.
在上述设备中,所述信道相关信息包括以下至少一种:信道、定时同步功能TSF、链路速率、基本服务集负载状态BSS-load、接收信号强度指示RSSI、流量指示管理TIM、信道切换通知CSA、扩展信道切换通知信息元素ECSA IE。In the above device, the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
在上述设备中,所述第一传输通道包括以下至少一种:蓝牙传输通道、近场通信NFC通道、超宽带通信UWB通道。In the above device, the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
第六方面,本申请实施例提出一种网络连接设备,所述设备包括:发送器、第二处理器、第二存储器及第二通信总线;所述第二处理器执行第二存储器存储的运行程序时实现以下方法:In a sixth aspect, an embodiment of the present application provides a network connection device, the device includes: a transmitter, a second processor, a second memory, and a second communication bus; the second processor executes an operation stored in the second memory The program implements the following methods:
获取接入点的Wi-Fi信息,并通过第一传输通道发送所述Wi-Fi信息;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。Acquire Wi-Fi information of the access point, and send the Wi-Fi information through the first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
在上述设备中,所述第二处理器,还用于获取当前连接的接入点的Wi-Fi信息;和/或获取扫描的接入点的Wi-Fi信息;和/或获取存储的接入点的Wi-Fi信息。In the above device, the second processor is further configured to obtain the Wi-Fi information of the currently connected access point; and/or obtain the Wi-Fi information of the scanned access point; and/or obtain the stored access point Access point's Wi-Fi information.
在上述设备中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。In the above device, the Wi-Fi information is processed by the main device through a preset grouping and encoding method.
第七方面,本申请实施例提出一种存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时实现如上述网络连接方法。In a seventh aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by the first processor, the above-mentioned network connection method is implemented.
第八方面,本申请实施例提出一种存储介质,其上存储有计算机程序,该计算机程序被第二处理器执行时实现上述网络连接方法。In an eighth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by a second processor, the foregoing network connection method is implemented.
本申请实施例提供了一种网络连接方法及设备、存储介质,应用于从设备,该方法包括:通过第一传输通道,接收Wi-Fi信息,并基于Wi-Fi信息与接入点进行连接;Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。采用上述实现方案,主设备将自身扫描、存储和/或当前连接的Wi-Fi信息通过与从设备之间的第一传输通道发送至从设备,从设备直接基于主设备发送的Wi-Fi信息实现接入点连接,无需遍历所有Wi-Fi信道,提高了设备的Wi-Fi连接速度,并减少了Wi-Fi模块因扫描所耗费的功耗。Embodiments of the present application provide a network connection method, device, and storage medium, which are applied to slave devices. The method includes: receiving Wi-Fi information through a first transmission channel, and connecting with an access point based on the Wi-Fi information ; The Wi-Fi information includes at least the SSID, encryption information and channel related information of the access point. With the above implementation solution, the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel between the master device and the slave device, and the slave device is directly based on the Wi-Fi information sent by the master device. The access point connection is realized without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
应当理解,此处描述的具体实施例仅仅用以解释本申请。并不用于限定本申请。It should be understood that the specific embodiments described herein are merely illustrative of the present application. It is not intended to limit this application.
本申请实施例提供一种网络连接方法,如图1所示,该方法可以包括:An embodiment of the present application provides a network connection method. As shown in FIG. 1 , the method may include:
S101、通过第一传输通道,接收Wi-Fi信息,并基于Wi-Fi信息与接入点进行连接;Wi-Fi信息至少包括接入点的SSID、加密信息以及信道相关信息。S101. Receive Wi-Fi information through a first transmission channel, and connect with an access point based on the Wi-Fi information; the Wi-Fi information at least includes an SSID of the access point, encryption information, and channel-related information.
本申请实施例提出的一种网络连接方法适用于穿戴式设备或者智能家居设备等内置Wi-Fi模块的从设备进行Wi-Fi连接的场景下。The network connection method proposed in the embodiment of the present application is suitable for a scenario where a slave device with a built-in Wi-Fi module, such as a wearable device or a smart home device, performs a Wi-Fi connection.
本申请实施例中,主设备可以为任何具备通信和存储功能的设备,例如:平板电脑、手机、个人计算机(Personal Computer,PC)、笔记本电脑等设备。主设备和从设备之间通过第一传输通道进行信息交互,其中,第一传输通道可以为蓝牙传输通道、近场通信(Near field communication,NFC)通道、超宽带通信(Ultra Wide Band,UWB)信道等低功耗传输通道。以蓝牙传输通道为例,主设备和从设备之间预先建立蓝牙连接,并通过蓝牙传输通道进行信息交互。In this embodiment of the present application, the master device may be any device with communication and storage functions, such as a tablet computer, a mobile phone, a personal computer (Personal Computer, PC), a notebook computer, and other devices. The information exchange between the master device and the slave device is carried out through a first transmission channel, wherein the first transmission channel may be a Bluetooth transmission channel, a near field communication (Near field communication, NFC) channel, an ultra wide band communication (Ultra Wide Band, UWB) Channels and other low-power transmission channels. Taking the Bluetooth transmission channel as an example, a Bluetooth connection is established between the master device and the slave device in advance, and information is exchanged through the Bluetooth transmission channel.
本申请实施例中,主从设备的网络结构如图2所示,主设备与从设备之间通过蓝牙进行连接,主设备和从设备分别与Wi-Fi接入点通过Wi-Fi进行连接。In the embodiment of the present application, the network structure of the master and slave devices is shown in FIG. 2 , the master device and the slave devices are connected through Bluetooth, and the master device and the slave devices are respectively connected with the Wi-Fi access point through Wi-Fi.
本申请实施例中,从设备的内部结构示意图如图3所示,从设备包括显示模块、处理模块、存储模块、Wi-Fi模块和蓝牙模块,其中,从设备的蓝牙模块用于与主设备进行蓝牙连接,从设备的Wi-Fi模块用于与Wi-Fi接入点进行连接,由此,主设备也包括蓝牙模块和Wi-Fi模块。In the embodiment of the present application, a schematic diagram of the internal structure of the slave device is shown in FIG. 3 , the slave device includes a display module, a processing module, a storage module, a Wi-Fi module and a Bluetooth module, wherein the Bluetooth module of the slave device is used to communicate with the master device. For Bluetooth connection, the Wi-Fi module of the slave device is used to connect with the Wi-Fi access point, so the master device also includes a Bluetooth module and a Wi-Fi module.
本申请实施例中,主设备可以在满足更新条件的情况下,向从设备发送Wi-Fi信息,其中,Wi-Fi信息包括以下至少一种:主设备当前连接的接入点的Wi-Fi信息、和/或主设备扫描的接入点的Wi-Fi信息、和/或主设备存储的接入点的Wi-Fi信息。In this embodiment of the present application, the master device may send Wi-Fi information to the slave device under the condition that the update conditions are met, where the Wi-Fi information includes at least one of the following: the Wi-Fi information of the access point currently connected to the master device information, and/or Wi-Fi information of access points scanned by the master device, and/or Wi-Fi information of access points stored by the master device.
本申请实施例中,Wi-Fi信息至少包括接入点的无线局域网标识(Service Set Identifier,SSID)、加密信息以及信道相关信息,其中,信道相关信息可以包括以下至少一种:信道、定时同步功能(Timing Synchronization Function,TSF)、链路速率、基本服务集负载状态(Basic Service Set-load,BSS-load)、接收信号强度指示(Received Signal Strength Indication,RSSI)、流量指示管理(Traffic Indication Management,TIM)、信道切换通知(Channel Switch Announcement,CSA)、扩展信道切换通知信息元素(Extended Channel Switch Announcement Information element,ECSA IE)。In this embodiment of the present application, the Wi-Fi information includes at least a wireless local area network identifier (Service Set Identifier, SSID) of an access point, encryption information, and channel-related information, where the channel-related information may include at least one of the following: channel, timing synchronization Function (Timing Synchronization Function, TSF), link rate, Basic Service Set-load (BSS-load), Received Signal Strength Indication (RSSI), Traffic Indication Management (Traffic Indication Management) , TIM), Channel Switch Announcement (CSA), Extended Channel Switch Announcement Information element (Extended Channel Switch Announcement Information element, ECSA IE).
具体的,主设备当前连接的接入点的Wi-Fi信息可以包括接入点(Access Point,AP)的SSID、基本无线局域网标识(Basic Service Set Identifier,BSSID)、密码(password)、信道(channel)、TSF和链路速率(link-speed)等,具体的可以根据实际情况进行选择,本申请实施例不做具体的限定;主设备所存储的接入点的Wi-Fi信息可以包括:SSID、BSSID、password、channel;主设备扫描的接入点的Wi-Fi信息可以包括:SSID、BSSID、channel、RSSI、link-speed、BSS-load。Specifically, the Wi-Fi information of the access point currently connected by the master device may include the SSID of the access point (Access Point, AP), the basic wireless local area network identifier (Basic Service Set Identifier, BSSID), the password (password), the channel ( channel), TSF, link speed (link-speed), etc., which can be selected according to the actual situation, which is not specifically limited in the embodiment of this application; the Wi-Fi information of the access point stored by the master device may include: SSID, BSSID, password, channel; Wi-Fi information of the access point scanned by the master device may include: SSID, BSSID, channel, RSSI, link-speed, BSS-load.
需要说明的是,更新条件可以为预设更新时段和/或主设备的Wi-Fi扫描数量,即在预设更新时段到达时,主设备向从设备发送预设更新时间段内的Wi-Fi信息;或者在主设备的Wi-Fi扫描数量大于预设数量阈值时,主设备向从设备发送扫描到的Wi-Fi信息,具体的更新条件可以根据实际情况进行选择,本申请实施例不做具体的限定。It should be noted that the update condition may be the preset update period and/or the number of Wi-Fi scans of the master device, that is, when the preset update period arrives, the master device sends the Wi-Fi data within the preset update period to the slave device. information; or when the number of Wi-Fi scans of the master device is greater than the preset number threshold, the master device sends the scanned Wi-Fi information to the slave device, and the specific update conditions can be selected according to the actual situation. specific restrictions.
需要说明的是,预设更新时段可以根据从设备所处位置和/或时间段进行调整,如在从设备处于户外空旷场景的情况下,从设备未连接接入点或者没有可以连接的接入点,此时,主设备通知从设备处于户外空旷场景,并减少Wi-Fi信息发送的频率;或者,如处于夜晚时段,从设备通知主设备减少Wi-Fi信息发送的频率或者禁止发送Wi-Fi信息。It should be noted that the preset update period can be adjusted according to the location and/or time period of the slave device. For example, when the slave device is in an outdoor open scene, the slave device is not connected to the access point or has no access point that can be connected. At this time, the master device informs the slave device that it is in an outdoor open scene and reduces the frequency of Wi-Fi information sending; or, if it is at night, the slave device notifies the master device to reduce the frequency of Wi-Fi information sending or prohibit sending Wi-Fi information. Fi information.
本申请实施例中,主设备可以先将Wi-Fi信息进行分组和编码,再将分组和编码后的Wi-Fi信息通过第一传输通道发送给从设备,此时,能够减少数据传输量。需要说明的是,本申请实施例不限制对Wi-Fi信息进行分组和编码的方式,具体的可以根据实际情况进行选择,在此不再赘述。In this embodiment of the present application, the master device may first group and encode the Wi-Fi information, and then send the grouped and encoded Wi-Fi information to the slave device through the first transmission channel. In this case, the amount of data transmission can be reduced. It should be noted that the embodiments of the present application do not limit the manner of grouping and encoding the Wi-Fi information, and the specific method may be selected according to the actual situation, which will not be repeated here.
需要说明的是,Wi-Fi信息中除了可以携带TSF信息,还可以携带信标帧(beason)中的其他信息,如TIM/CSA/ECSA IE等,具体的Wi-Fi信息中携带的信息可以根据具 体的Wi-Fi功能进行确定,在此不再赘述。It should be noted that, in addition to TSF information, the Wi-Fi information can also carry other information in the beacon frame (beason), such as TIM/CSA/ECSA IE, etc. The information carried in the specific Wi-Fi information can be The determination is performed according to a specific Wi-Fi function, and details are not described herein again.
本申请实施例中,从设备在接收到主设备通过第一传输通道发送的Wi-Fi信息之后,将Wi-Fi信息存储至预存Wi-Fi信息中,此时从设备可以基于预存Wi-Fi信息实现AP选择和AP连接的过程,其中,预存Wi-Fi信息为从设备历史接收到主设备发送的Wi-Fi信息集合。In this embodiment of the present application, after receiving the Wi-Fi information sent by the master device through the first transmission channel, the slave device stores the Wi-Fi information in the pre-stored Wi-Fi information. At this time, the slave device can use the pre-stored Wi-Fi information The information implements the process of AP selection and AP connection, wherein the pre-stored Wi-Fi information is a collection of Wi-Fi information received from the device history and sent by the master device.
进一步地,从设备还可以在进行AP连接的过程中,主动请求主设备发送Wi-Fi信息,具体的,从设备获取主设备和从设备之间的第一距离,并将第一距离和预设距离阈值进行比较,在从设备判断出第一距离小于预设距离的情况下,判断从设备内部的预存Wi-Fi信息的存储时长是否大于预设存储时长,在预存Wi-Fi信息的存储时长大于预设存储时长的情况下,从设备通过第一传输通道向主设备发送Wi-Fi信息请求消息,主设备接收到Wi-Fi信息请求消息之后,通过第一传输通道向从设备发送Wi-Fi信息。Further, the slave device can also actively request the master device to send Wi-Fi information during the AP connection process. Specifically, the slave device obtains the first distance between the master device and the slave device, and compares the first distance with the preset Set a distance threshold for comparison, and when the slave device determines that the first distance is less than the preset distance, determine whether the storage duration of the pre-stored Wi-Fi information inside the slave device is greater than the preset storage duration, and then the storage duration of the pre-stored Wi-Fi information is determined. When the duration is longer than the preset storage duration, the slave device sends a Wi-Fi information request message to the master device through the first transmission channel. After receiving the Wi-Fi information request message, the master device sends Wi-Fi information to the slave device through the first transmission channel. -Fi info.
进一步地,在从设备判断出第一距离不小于预设距离的情况下,从设备沿用现有的AP扫描方式,主动发起扫描,得到接入点信息。Further, in the case that the slave device determines that the first distance is not less than the preset distance, the slave device continues to use the existing AP scanning method, and actively initiates scanning to obtain access point information.
在一种可选的实施例中,从设备接收到响应Wi-Fi信息请求消息的Wi-Fi信息之后,将该Wi-Fi信息更新至预存Wi-Fi信息中,并基于更新后的预存Wi-Fi信息选择第一接入点,从更新后的预存Wi-Fi信息中查找第一接入点的连接信息,并根据第一接入点的连接信息进行接入点连接。In an optional embodiment, after receiving the Wi-Fi information in response to the Wi-Fi information request message from the device, the Wi-Fi information is updated to the pre-stored Wi-Fi information, and based on the updated pre-stored Wi-Fi information - Fi information selects the first access point, searches for the connection information of the first access point from the updated pre-stored Wi-Fi information, and connects the access point according to the connection information of the first access point.
具体的,先从更新后的预存Wi-Fi信息中查找第一接入点对应的第一Wi-Fi信息,之后,从第一Wi-Fi信息中提取出第一接入点的连接信息。在实际应用中,第一接入点的连接信息包括第一Wi-Fi信息中的channel、SSID、password。Specifically, the first Wi-Fi information corresponding to the first access point is searched from the updated pre-stored Wi-Fi information, and then the connection information of the first access point is extracted from the first Wi-Fi information. In practical applications, the connection information of the first access point includes channel, SSID, and password in the first Wi-Fi information.
在另一种可选的实施例中,在预存Wi-Fi信息的存储时长不大于预设存储时长的情况下,基于预存Wi-Fi信息选择第一接入点;从预存Wi-Fi信息中查找第一接入点的连接信息,并根据第一接入点的连接信息进行接入点连接。In another optional embodiment, when the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration, the first access point is selected based on the pre-stored Wi-Fi information; The connection information of the first access point is searched, and the access point connection is performed according to the connection information of the first access point.
需要说明的是,从预存Wi-Fi信息中查找第一接入点的连接信息的过程可以参考从更新后的预存Wi-Fi信息中查找第一接入点的连接信息。It should be noted that, for the process of searching for the connection information of the first access point from the pre-stored Wi-Fi information, reference may be made to searching for the connection information of the first access point from the updated pre-stored Wi-Fi information.
示例性的,从设备进行接入点扫描的过程如图4所示,Exemplarily, the process of scanning an access point from a device is shown in FIG. 4 ,
1、从设备获取与主设备之间的第一距离;1. Obtain the first distance between the slave device and the master device;
2、在第一距离大于预设距离阈值的情况下,从设备主动发起扫描;2. When the first distance is greater than the preset distance threshold, the slave device actively initiates scanning;
3、在第一距离不大于预设距离阈值的情况下,从设备判断其内部存储的Wi-Fi信息是否已经到期;3. In the case that the first distance is not greater than the preset distance threshold, the slave device determines whether the Wi-Fi information stored in the device has expired;
4、在判断出从设备内部存储的Wi-Fi信息已经到期的情况下,向主设备请求Wi-Fi信息,并在接收到主设备发送的Wi-Fi信息的情况下,将Wi-Fi信息更新到内部存储中,执行6;4. In the case of judging that the Wi-Fi information stored in the slave device has expired, request the Wi-Fi information from the master device, and after receiving the Wi-Fi information sent by the master device, send the Wi-Fi Update the information to the internal storage, go to 6;
5、在判断出从设备内部存储的Wi-Fi信息未到期的情况下,执行6;5. If it is determined that the Wi-Fi information stored in the slave device has not expired, go to 6;
6、利用内部存储的Wi-Fi信息进行接入点选择。6. Use the Wi-Fi information stored in the internal storage for access point selection.
本申请实施例中,从设备基于更新后的预存Wi-Fi信息选择第一接入点或者基于预存Wi-Fi信息选择第一接入点的过程如图5所示:In this embodiment of the present application, the process of selecting the first access point based on the updated pre-stored Wi-Fi information or selecting the first access point based on the pre-stored Wi-Fi information from the device is shown in FIG. 5 :
S201、确定主设备当前连接的接入点。S201. Determine the access point currently connected to the master device.
S202、获取主设备当前连接的接入点的连接参数。S202: Acquire connection parameters of the access point currently connected to the master device.
S203、在连接参数不满足预设连接条件的情况下,根据更新后的预存Wi-Fi信息或预存Wi-Fi信息中的信道相关信息,选择第一接入点。S203. In the case that the connection parameters do not meet the preset connection conditions, select a first access point according to the updated pre-stored Wi-Fi information or channel-related information in the pre-stored Wi-Fi information.
S204、在连接参数满足预设连接条件的情况下,将主设备当前连接的接入点确定为第一接入点。S204. In the case that the connection parameter satisfies the preset connection condition, determine the access point to which the master device is currently connected as the first access point.
需要说明的是,从设备在进行接入点选择的时候,先选择主设备当前正在连接的接 入点,然后判断主设备当前连接的接入点的连接参数是否满足预设连接条件,这里,连接参数可以为连接结果或者接入点的信号质量,在主设备当前连接的接入点连接失败或者接入点的信号质量低于质量阈值时,表征主设备当前连接的接入点的连接参数不满足预设连接条件,此时,从设备根据更新后的预存Wi-Fi信息或预存Wi-Fi信息中的信道相关信息,选择第一接入点。具体的,从设备根据channel、link-speed、bss-load、RSSI等信息,确定最优的第一接入点。It should be noted that when the slave device selects the access point, it first selects the access point that the master device is currently connected to, and then judges whether the connection parameters of the access point currently connected to the master device meet the preset connection conditions. Here, The connection parameter can be the connection result or the signal quality of the access point. When the connection of the access point currently connected by the master device fails or the signal quality of the access point is lower than the quality threshold, it indicates the connection parameter of the access point currently connected by the master device. If the preset connection condition is not met, at this time, the slave device selects the first access point according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information. Specifically, the slave device determines the optimal first access point according to information such as channel, link-speed, bss-load, and RSSI.
进一步地,在主设备当前连接的接入点连接成功或者接入点的信号质量高于质量阈值时,表征连接参数满足预设连接条件的情况下,将主设备当前连接的接入点确定为第一接入点。Further, when the access point currently connected by the main device is successfully connected or the signal quality of the access point is higher than the quality threshold, it indicates that the connection parameter meets the preset connection condition, and the access point currently connected by the main device is determined as first access point.
可以理解的是,主设备将自身扫描、存储和/或当前连接的Wi-Fi信息通过与从设备之间的第一传输通道发送至从设备,从设备直接基于主设备发送的Wi-Fi信息实现接入点连接,无需遍历所有Wi-Fi信道,提高了设备的Wi-Fi连接速度,并减少了Wi-Fi模块因扫描所耗费的功耗。It can be understood that the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel with the slave device, and the slave device is directly based on the Wi-Fi information sent by the master device. The access point connection is realized without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
示例性的,如图6所示,从设备进行接入点连接的过程具体包括:Exemplarily, as shown in FIG. 6 , the process of connecting an access point from a device specifically includes:
1、从设备选择主设备正在连接的接入点1;1. From the device, select the access point 1 that the master device is connecting to;
2、从设备判断接入点1是否连接成功或者接入点1的信号质量是否大于预设阈值;2. The slave device determines whether the access point 1 is successfully connected or whether the signal quality of the access point 1 is greater than a preset threshold;
3、在接入点1连接失败或者接入点1的信号质量小于预设阈值的情况下,根据Wi-Fi信息中的channel/link-spped/bss-load/rssi等信息选择最优接入点2;3. When the connection of access point 1 fails or the signal quality of access point 1 is lower than the preset threshold, select the optimal access according to the channel/link-spped/bss-load/rssi and other information in the Wi-Fi information point 2;
4、根据接入点2的channel/ssid/password直接发起接入点连接;4. Directly initiate an access point connection according to the channel/ssid/password of access point 2;
5、在接入点1连接成功或者接入点1的信号质量大于预设阈值的情况下,表征连接成功。5. In the case that the access point 1 is successfully connected or the signal quality of the access point 1 is greater than the preset threshold, it indicates that the connection is successful.
在一种可选的实施例中,基于上述实施例,在S101之后,即从设备基于Wi-Fi信息实现接入点连接之后,从设备可以在连接至第一接入点、且基于第一接入点完成数据传输之后,断开第一接入点的Wi-Fi连接。此时无需进行接入点的监听保持、能够减少从设备的系统功耗。In an optional embodiment, based on the foregoing embodiment, after S101, that is, after the slave device connects to the access point based on the Wi-Fi information, the slave device may connect to the first access point based on the first access point. After the access point completes the data transmission, the Wi-Fi connection of the first access point is disconnected. In this case, the monitoring hold of the access point is not required, and the system power consumption of the slave device can be reduced.
在另一种可选的实施例中,基于上述实施例,在S101之后,即从设备基于Wi-Fi信息实现接入点连接之后,从设备还执行接入点监听的过程,具体的如图7所示,In another optional embodiment, based on the above embodiment, after S101, that is, after the slave device realizes the access point connection based on the Wi-Fi information, the slave device also performs the process of monitoring the access point, as shown in Fig. 7 as shown,
S301、在连接至主设备当前连接的接入点之后,通过第一传输通道,接收主设备发送的主设备当前连接的接入点的主设备当前连接的接入点的Wi-Fi信息。S301. After connecting to the access point currently connected to the master device, receive Wi-Fi information of the access point currently connected to the master device of the access point currently connected to the master device sent by the master device through the first transmission channel.
S302、从主设备当前连接的接入点的Wi-Fi信息中获取主设备当前连接的接入点的监听信息,以基于监听信息监听主设备当前连接的接入点。S302. Obtain the monitoring information of the access point currently connected by the main device from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the access point currently connected by the main device based on the monitoring information.
本申请实施例中,在主设备和从设备同时连接上同一个接入点时,主设备实时监听第一接入点,并定期通过第一传输通道,向从设备发送主设备当前连接的接入点的Wi-Fi信息,其中该Wi-Fi信息中包括beason帧中的相关信息,如TSF信息、TIM信息等,从设备根据beason帧中的相关信息同步自身的内部存储,进而实现对接入点的监听。In the embodiment of the present application, when the master device and the slave device are connected to the same access point at the same time, the master device monitors the first access point in real time, and periodically sends the access point currently connected to the master device to the slave device through the first transmission channel. The Wi-Fi information of the ingress point, where the Wi-Fi information includes relevant information in the beamon frame, such as TSF information, TIM information, etc., the slave device synchronizes its own internal storage according to the relevant information in the beamon frame, thereby realizing docking Ingress monitoring.
可以理解的是,从设备在与主设备同时连接到一个接入点的时候,无需在目标beason帧的发送时刻(Target Beacon Transmission Time,TBTT)时刻唤醒来监听该接入点的beason,而是通过主设备和从设备之间的第一传输通道,接收主设备发送来的该接入点的Wi-Fi信息,由图8所示,每两个相邻的TBTT之间间隔一个beason间隔,在每个TBTT时刻触发一次beason的监听,从设备利用Wi-Fi模块进行beason监听的接收电流远大于从设备在TBTT时刻接收主设备发送的接入点Wi-Fi信息的接收电流,由此,能够极大的减少从设备的功耗。It can be understood that when the slave device is connected to an access point at the same time as the master device, it does not need to wake up at the target beam transmission time (Target Beacon Transmission Time, TBTT) to monitor the access point's beam, but Through the first transmission channel between the master device and the slave device, the Wi-Fi information of the access point sent by the master device is received. As shown in Figure 8, there is a reason interval between every two adjacent TBTTs. At each TBTT moment, a beason monitoring is triggered, and the receiving current of the slave device using the Wi-Fi module for beam monitoring is much greater than the receiving current of the slave device receiving the access point Wi-Fi information sent by the master device at the TBTT moment. Therefore, It can greatly reduce the power consumption of the slave device.
基于上述实施例,本申请实施例还提供一种网络连接方法,如图9所述,该方法可以包括:Based on the foregoing embodiments, the embodiments of the present application further provide a network connection method, as shown in FIG. 9 , the method may include:
S401、获取接入点的Wi-Fi信息,并通过第一传输通道发送Wi-Fi信息;Wi-Fi信息至少包括接入点的SSID、加密信息以及信道相关信息。S401. Acquire Wi-Fi information of an access point, and send the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes an SSID of the access point, encryption information, and channel-related information.
本申请实施例中,主设备获取接入点的Wi-Fi信息,其中,主设备可以获取当前连接的接入点的Wi-Fi信息;和/或主设备获取扫描的接入点的Wi-Fi信息;和/或主设备获取存储的接入点的Wi-Fi信息。In this embodiment of the present application, the main device acquires the Wi-Fi information of the access point, wherein the main device can acquire the Wi-Fi information of the currently connected access point; and/or the main device acquires the Wi-Fi information of the scanned access point Fi information; and/or the master device obtains stored Wi-Fi information of the access point.
需要说明的是,主设备可以在通过第一传输通道发送Wi-Fi信息的过程中,可以通过预设分组和编码方式对Wi-Fi信息进行处理之后再发送,可以减小数据传输量,本申请实施例不限制具体的分组和编码方式。It should be noted that, in the process of sending Wi-Fi information through the first transmission channel, the master device can process the Wi-Fi information through a preset grouping and encoding method before sending it, which can reduce the amount of data transmission. The application embodiments do not limit the specific grouping and encoding manner.
需要说明的是,主设备发送Wi-Fi信息的频率可以为预设的更新时段,或者当主设备侦测到某些信息发送较大变化时,可以主动向从设备进行更新,如扫描到更多可连接AP时,向从设备发送主设备所扫描到的可连接AP。或者从设备根据自身存储信息或者其他外部条件的变化,主动向主设备要求获取Wi-Fi信息。It should be noted that the frequency at which the master device sends Wi-Fi information can be a preset update period, or when the master device detects a large change in the sending of certain information, it can actively update the slave device, such as scanning for more information. When an AP can be connected, send the connectable AP scanned by the master device to the slave device. Or the slave device actively requests the master device to obtain Wi-Fi information according to its own stored information or changes in other external conditions.
本申请实施例提供一种网络连接设备1。如图10所示,该设备1包括:The embodiment of the present application provides a network connection device 1 . As shown in Figure 10, the device 1 includes:
接收模块10,用于通过第一传输通道,接收无线通信技术Wi-Fi信息;The receiving module 10 is used for receiving wireless communication technology Wi-Fi information through the first transmission channel;
连接模块11,用于并基于所述Wi-Fi信息与接入点进行连接;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。The connection module 11 is configured to connect with the access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
可选的,所述设备还包括:获取模块;Optionally, the device further includes: an acquisition module;
所述接收模块10,还用于在连接至主设备当前连接的接入点之后,通过所述第一传输通道,接收所述主设备发送的所述主设备当前连接的接入点的Wi-Fi信息;The receiving module 10 is further configured to, after connecting to the access point currently connected to the main device, receive the Wi-Fi data of the access point currently connected to the main device sent by the main device through the first transmission channel. Fi information;
所述获取模块,用于从所述主设备当前连接的接入点的Wi-Fi信息中获取所述主设备当前连接的接入点的监听信息,以基于所述监听信息监听所述主设备当前连接的接入点。The obtaining module is configured to obtain the monitoring information of the access point currently connected by the main device from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the main device based on the monitoring information The currently connected access point.
可选的,所述设备还包括:判断模块和发送模块;Optionally, the device further includes: a judging module and a sending module;
所述获取模块,还用于获取主设备和从设备之间的第一距离;The obtaining module is also used to obtain the first distance between the master device and the slave device;
所述判断模块,用于在所述第一距离小于预设距离阈值的情况下,判断预存Wi-Fi信息的存储时长是否大于预设存储时长,所述预存Wi-Fi信息为历史接收到所述主设备发送的Wi-Fi信息集合;The judging module is configured to judge whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration under the condition that the first distance is less than the preset distance threshold, and the pre-stored Wi-Fi information is all historically received data. The set of Wi-Fi information sent by the master device;
所述发送模块,用于在所述预存Wi-Fi信息的存储时长大于所述预设存储时长的情况下,通过所述第一传输通道向所述主设备发送Wi-Fi信息请求消息;The sending module is configured to send a Wi-Fi information request message to the master device through the first transmission channel when the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration;
所述接收模块10,还用于通过所述第一传输通道,接收所述主设备发送的Wi-Fi信息。The receiving module 10 is further configured to receive Wi-Fi information sent by the master device through the first transmission channel.
可选的,所述设备还包括:更新模块和查找模块;Optionally, the device further includes: an update module and a search module;
所述更新模块,用于将所述Wi-Fi信息更新至所述预存Wi-Fi信息中,并基于更新后的预存Wi-Fi信息选择第一接入点;the updating module, configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select a first access point based on the updated pre-stored Wi-Fi information;
所述查找模块,用于从所述更新后的预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。The search module is configured to search the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
可选的,所述设备还包括:选择模块;Optionally, the device further includes: a selection module;
所述选择模块,用于在所述预存Wi-Fi信息的存储时长不大于所述预设存储时长的情况下,基于所述预存Wi-Fi信息选择第一接入点;The selection module is configured to select a first access point based on the pre-stored Wi-Fi information when the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration;
所述查找模块,还用于从所述预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。The search module is further configured to search the connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
可选的,所述设备还包括:确定模块;Optionally, the device further includes: a determining module;
所述确定模块,用于确定所述主设备当前连接的接入点;在所述连接参数满足所述预设连接条件的情况下,将所述主设备当前连接的接入点确定为所述第一接入点;The determining module is configured to determine the access point currently connected to the master device; in the case that the connection parameter satisfies the preset connection condition, determine the access point currently connected to the master device as the access point the first access point;
所述获取模块,还用于获取所述主设备当前连接的接入点的连接参数;The obtaining module is further configured to obtain connection parameters of the access point currently connected to the master device;
所述选择模块,还用于在所述连接参数不满足预设连接条件的情况下,根据所述更新后的预存Wi-Fi信息或所述预存Wi-Fi信息中的信道相关信息,选择第一接入点。The selection module is further configured to select the first Wi-Fi information according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information when the connection parameters do not meet the preset connection conditions. an access point.
可选的,所述Wi-Fi信息包括以下至少一种:Optionally, the Wi-Fi information includes at least one of the following:
主设备当前连接的接入点的Wi-Fi信息、和/或所述主设备扫描的接入点的Wi-Fi信息、和/或所述主设备存储的接入点的Wi-Fi信息。Wi-Fi information of the access point currently connected by the master device, and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
可选的,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。Optionally, the Wi-Fi information is information processed by the main device in a preset grouping and encoding manner.
可选的,所述设备还包括:断开模块;Optionally, the device further includes: a disconnection module;
所述断开模块,用于在连接至第一接入点、且基于所述第一接入点完成数据传输之后,断开所述第一接入点的Wi-Fi连接。The disconnecting module is configured to disconnect the Wi-Fi connection of the first access point after connecting to the first access point and completing data transmission based on the first access point.
可选的,所述接收模块10,还用于通过所述第一传输通道,接收主设备在满足更新条件的情况下发送的Wi-Fi信息。Optionally, the receiving module 10 is further configured to receive, through the first transmission channel, the Wi-Fi information sent by the master device when the update condition is satisfied.
可选的,所述更新条件包括:预设更新时段和/或所述主设备的Wi-Fi扫描数量,其中,所述预设更新时段根据所述从设备所处位置和/或时间段进行调整。Optionally, the update condition includes: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is performed according to the location and/or time period of the slave device. Adjustment.
可选的,所述信道相关信息包括以下至少一种:信道、定时同步功能TSF、链路速率、基本服务集负载状态BSS-load、接收信号强度指示RSSI、流量指示管理TIM、信道切换通知CSA、扩展信道切换通知信息元素ECSA IE。Optionally, the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, traffic indication management TIM, channel switching notification CSA , Extended Channel Switch Notification Information Element ECSA IE.
可选的,所述第一传输通道包括以下至少一种:蓝牙传输通道、近场通信NFC通道、超宽带通信UWB通道。Optionally, the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near-field communication NFC channel, and an ultra-wideband communication UWB channel.
本申请实施例提供的一种网络连接设备1,通过第一传输通道,接收Wi-Fi信息,并基于Wi-Fi信息与接入点进行连接,Wi-Fi信息至少包括接入点的SSID、加密信息以及信道相关信息。由此可见,本实施例提出的设备1,主设备将自身扫描、存储和/或当前连接的Wi-Fi信息通过与从设备之间的第一传输通道发送至从设备,从设备直接基于主设备发送的Wi-Fi信息实现接入点连接,无需遍历所有Wi-Fi信道,提高了设备的Wi-Fi连接速度,并减少了Wi-Fi模块因扫描所耗费的功耗。A network connection device 1 provided by an embodiment of the present application receives Wi-Fi information through a first transmission channel, and connects with an access point based on the Wi-Fi information, where the Wi-Fi information at least includes the SSID of the access point, Encrypted information and channel related information. It can be seen that in the device 1 proposed in this embodiment, the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel between the master device and the slave device, and the slave device directly based on the master device The Wi-Fi information sent by the device realizes the connection of the access point without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
图11为本申请实施例提供的一种网络连接设备1的组成结构示意图二,在实际应用中,基于上述实施例的同一公开构思下,如图11所示,本实施例的设备1包括:接收器12、第一处理器13、第一存储器14及第一通信总线15。FIG. 11 is a second schematic diagram of the composition and structure of a network connection device 1 provided by an embodiment of the present application. In practical applications, based on the same disclosed concept of the above embodiment, as shown in FIG. 11 , the device 1 in this embodiment includes: The receiver 12 , the first processor 13 , the first memory 14 and the first communication bus 15 .
在具体的实施例的过程中,上述接收模块10、连接模块11、获取模块、判断模块、发送模块、更新模块、查找模块、选择模块、确定模块和断开模块可由位于设备1上的第一处理器13实现,上述接收模块10可由位于设备1上的接收器12实现,上述第一处理器13可以为特定用途集成电路(ASIC,Application Specific Integrated Circuit)、数字信号处理器(DSP,Digital Signal Processor)、数字信号处理图像处理装置(DSPD,Digital Signal Processing Device)、可编程逻辑图像处理装置(PLD,Programmable Logic Device)、现场可编程门阵列(FPGA,Field Programmable Gate Array)、CPU、控制器、微控制器、微处理器中的至少一种。可以理解地,对于不同的设备,用于实现上述处理器功能的电子器件还可以为其它,本实施例不作具体限定。In the process of the specific embodiment, the above-mentioned receiving module 10 , connecting module 11 , acquiring module, judging module, sending module, updating module, searching module, selecting module, determining module and disconnecting module can be controlled by the first module located on the device 1 . The processor 13 is implemented, the above-mentioned receiving module 10 can be implemented by the receiver 12 located on the device 1, and the above-mentioned first processor 13 can be an application-specific integrated circuit (ASIC, Application Specific Integrated Circuit), a digital signal processor (DSP, Digital Signal Processor), Digital Signal Processing Image Processing Device (DSPD, Digital Signal Processing Device), Programmable Logic Image Processing Device (PLD, Programmable Logic Device), Field Programmable Gate Array (FPGA, Field Programmable Gate Array), CPU, controller , at least one of a microcontroller and a microprocessor. It can be understood that, for different devices, the electronic device used to implement the function of the processor may also be other, which is not specifically limited in this embodiment.
在本申请实施例中,上述第一通信总线15用于实现接收器12、第一处理器13和第一存储器14之间的连接通信;上述接收器12,用于通过第一传输通道,接收Wi-Fi信息;上述第一处理器13执行第一存储器14中存储的运行程序时实现如下的网络连接方法:In the embodiment of the present application, the above-mentioned first communication bus 15 is used to realize the connection and communication between the receiver 12, the first processor 13 and the first memory 14; the above-mentioned receiver 12 is used to receive the data through the first transmission channel. Wi-Fi information; the first processor 13 implements the following network connection method when executing the running program stored in the first memory 14:
基于所述Wi-Fi信息与接入点进行连接;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。Connect with the access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
进一步地,在上述实施例中,所述第一处理器13,还用于在连接至主设备当前连接 的接入点之后,通过所述第一传输通道,接收所述主设备发送的所述主设备当前连接的接入点的Wi-Fi信息;从所述主设备当前连接的接入点的Wi-Fi信息中获取所述主设备当前连接的接入点的监听信息,以基于所述监听信息监听所述主设备当前连接的接入点。Further, in the above-mentioned embodiment, the first processor 13 is further configured to, after connecting to the access point currently connected by the master device, receive the information sent by the master device through the first transmission channel Wi-Fi information of the access point currently connected to the master device; obtain the monitoring information of the access point currently connected to the master device from the Wi-Fi information of the access point currently connected to the master device, to obtain the monitoring information of the access point currently connected to the master device based on the The monitoring information monitors the access point that the master device is currently connected to.
进一步地,在上述实施例中,所述第一处理器13,还用于获取主设备和从设备之间的第一距离;在所述第一距离小于预设距离阈值的情况下,判断预存Wi-Fi信息的存储时长是否大于预设存储时长,所述预存Wi-Fi信息为历史接收到所述主设备发送的Wi-Fi信息集合;在所述预存Wi-Fi信息的存储时长大于所述预设存储时长的情况下,通过所述第一传输通道向所述主设备发送Wi-Fi信息请求消息,并通过所述第一传输通道,接收所述主设备发送的Wi-Fi信息。Further, in the above embodiment, the first processor 13 is further configured to acquire the first distance between the master device and the slave device; in the case that the first distance is less than a preset distance threshold, determine the pre-stored distance Whether the storage duration of the Wi-Fi information is greater than the preset storage duration, the pre-stored Wi-Fi information is a collection of Wi-Fi information sent by the master device received in the past; if the storage duration of the pre-stored Wi-Fi information is longer than all In the case of the preset storage duration, the Wi-Fi information request message is sent to the master device through the first transmission channel, and the Wi-Fi information sent by the master device is received through the first transmission channel.
进一步地,在上述实施例中,所述第一处理器13,还用于将所述Wi-Fi信息更新至所述预存Wi-Fi信息中,并基于更新后的预存Wi-Fi信息选择第一接入点;从所述更新后的预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。Further, in the above embodiment, the first processor 13 is further configured to update the Wi-Fi information to the pre-stored Wi-Fi information, and select the first processor based on the updated pre-stored Wi-Fi information An access point; searching for connection information of the first access point from the updated pre-stored Wi-Fi information, and connecting with the access point according to the connection information of the first access point.
进一步地,在上述实施例中,所述第一处理器13,还用于在所述预存Wi-Fi信息的存储时长不大于所述预设存储时长的情况下,基于所述预存Wi-Fi信息选择第一接入点;从所述预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。Further, in the above-mentioned embodiment, the first processor 13 is further configured to, under the condition that the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration, based on the pre-stored Wi-Fi information information to select a first access point; search for connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
进一步地,在上述实施例中,所述第一处理器13,还用于确定所述主设备当前连接的接入点;获取所述主设备当前连接的接入点的连接参数;在所述连接参数不满足预设连接条件的情况下,根据所述更新后的预存Wi-Fi信息或所述预存Wi-Fi信息中的信道相关信息,选择第一接入点;在所述连接参数满足所述预设连接条件的情况下,将所述主设备当前连接的接入点确定为所述第一接入点。Further, in the above embodiment, the first processor 13 is further configured to determine the access point currently connected to the master device; acquire the connection parameters of the access point currently connected to the master device; If the connection parameters do not meet the preset connection conditions, select the first access point according to the updated pre-stored Wi-Fi information or the channel-related information in the pre-stored Wi-Fi information; In the case of the preset connection condition, the access point to which the master device is currently connected is determined as the first access point.
进一步地,在上述实施例中,所述Wi-Fi信息包括以下至少一种:Further, in the above embodiment, the Wi-Fi information includes at least one of the following:
主设备当前连接的接入点的Wi-Fi信息、和/或所述主设备扫描的接入点的Wi-Fi信息、和/或所述主设备存储的接入点的Wi-Fi信息。Wi-Fi information of the access point currently connected by the master device, and/or Wi-Fi information of the access point scanned by the master device, and/or Wi-Fi information of the access point stored by the master device.
进一步地,在上述实施例中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。Further, in the above-mentioned embodiment, the Wi-Fi information is the information processed by the main device in a preset grouping and encoding manner.
进一步地,在上述实施例中,所述第一处理器13,还用于在连接至第一接入点、且基于所述第一接入点完成数据传输之后,断开所述第一接入点的Wi-Fi连接。Further, in the above embodiment, the first processor 13 is further configured to disconnect the first access point after connecting to the first access point and completing data transmission based on the first access point Wi-Fi connection at the ingress point.
进一步地,在上述实施例中,所述第一处理器13,还用于通过所述第一传输通道,接收主设备在满足更新条件的情况下发送的Wi-Fi信息。Further, in the above embodiment, the first processor 13 is further configured to receive, through the first transmission channel, Wi-Fi information sent by the master device under the condition that the update condition is satisfied.
进一步地,在上述实施例中,所述更新条件包括:预设更新时段和/或所述主设备的Wi-Fi扫描数量,其中,所述预设更新时段根据所述从设备所处位置和/或时间段进行调整。Further, in the above embodiment, the update conditions include: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is based on the location of the slave device and/or the number of Wi-Fi scans of the master device. / or time period to adjust.
进一步地,在上述实施例中,所述信道相关信息包括以下至少一种:信道、定时同步功能TSF、链路速率、基本服务集负载状态BSS-load、接收信号强度指示RSSI、流量指示管理TIM、信道切换通知CSA、扩展信道切换通知信息元素ECSA IE。Further, in the above embodiment, the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength indication RSSI, and traffic indication management TIM , Channel Switch Notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
进一步地,在上述实施例中,所述第一传输通道包括以下至少一种:蓝牙传输通道、近场通信NFC通道、超宽带通信UWB通道。Further, in the above embodiment, the first transmission channel includes at least one of the following: a Bluetooth transmission channel, a near field communication NFC channel, and an ultra-wideband communication UWB channel.
本申请实施例提供一种存储介质,其上存储有计算机程序,上述计算机可读存储介质存储有一个或者多个程序,上述一个或者多个程序可被一个或者多个处理器执行,应用于设备1中,该计算机程序实现如上述的网络连接方法。An embodiment of the present application provides a storage medium on which a computer program is stored, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors and applied to a device In 1, the computer program implements the network connection method as described above.
本申请实施例提供一种网络连接设备2,如图12所示,所述设备2包括:An embodiment of the present application provides a network connection device 2. As shown in FIG. 12, the device 2 includes:
获取模块20,用于获取接入点的Wi-Fi信息;an acquisition module 20, configured to acquire Wi-Fi information of the access point;
发送模块21,用于通过第一传输通道发送所述Wi-Fi信息;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。The sending module 21 is configured to send the Wi-Fi information through the first transmission channel; the Wi-Fi information at least includes the SSID of the access point, encryption information and channel related information.
可选的,所述获取模块20,还用于获取当前连接的接入点的Wi-Fi信息;和/或获取扫描的接入点的Wi-Fi信息;和/或获取存储的接入点的Wi-Fi信息。Optionally, the acquiring module 20 is further configured to acquire the Wi-Fi information of the currently connected access point; and/or acquire the Wi-Fi information of the scanned access point; and/or acquire the stored access point Wi-Fi information.
可选的,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。Optionally, the Wi-Fi information is information processed by the main device in a preset grouping and encoding manner.
本申请实施例提供一种网络连接设备2,获取接入点的Wi-Fi信息,并通过第一传输通道发送Wi-Fi信息;Wi-Fi信息至少包括接入点的SSID、加密信息以及信道相关信息。由此可见,本实施例提出的设备2,主设备将自身扫描、存储和/或当前连接的Wi-Fi信息通过与从设备之间的第一传输通道发送至从设备,从设备直接基于主设备发送的Wi-Fi信息实现接入点连接,无需遍历所有Wi-Fi信道,提高了设备的Wi-Fi连接速度,并减少了Wi-Fi模块因扫描所耗费的功耗。The embodiment of the present application provides a network connection device 2, which acquires Wi-Fi information of an access point and sends the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel of the access point Related Information. It can be seen that, in the device 2 proposed in this embodiment, the master device sends the Wi-Fi information scanned, stored and/or currently connected to the slave device through the first transmission channel between the master device and the slave device, and the slave device directly based on the master device The Wi-Fi information sent by the device realizes the connection of the access point without traversing all Wi-Fi channels, which improves the Wi-Fi connection speed of the device and reduces the power consumption of the Wi-Fi module due to scanning.
图13为本申请实施例提供的一种网络连接设备2的组成结构示意图二,在实际应用中,基于上述实施例的同一公开构思下,如图13所示,本实施例的设备2包括:发送器22、第二处理器23、第二存储器24及第二通信总线25。FIG. 13 is a second schematic diagram of the composition and structure of a network connection device 2 provided by an embodiment of the present application. In practical applications, based on the same disclosed concept of the above embodiment, as shown in FIG. 13 , the device 2 in this embodiment includes: The transmitter 22 , the second processor 23 , the second memory 24 and the second communication bus 25 .
在具体的实施例的过程中,上述获取模块20可由位于设备2上的第二处理器23实现,上述发送模块21可由位于设备2上的发送器22实现,上述第二处理器23可以为ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微处理器中的至少一种。可以理解地,对于不同的设备,用于实现上述处理器功能的电子器件还可以为其它,本实施例不作具体限定。In the process of the specific embodiment, the above-mentioned obtaining module 20 may be implemented by the second processor 23 located on the device 2, the above-mentioned sending module 21 may be implemented by the transmitter 22 located on the device 2, and the above-mentioned second processor 23 may be an ASIC , at least one of DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It can be understood that, for different devices, the electronic device used to implement the function of the processor may also be other, which is not specifically limited in this embodiment.
在本申请实施例中,上述第二通信总线25用于实现发送器22、第二处理器23和第二存储器24之间的连接通信;上述发送器22,用于通过第一传输通道发送所述Wi-Fi信息;上述第二处理器23执行第二存储器24中存储的运行程序时实现如下的网络连接方法:In the embodiment of the present application, the above-mentioned second communication bus 25 is used to realize the connection and communication between the transmitter 22, the second processor 23 and the second memory 24; the above-mentioned transmitter 22 is used to transmit all data through the first transmission channel. The Wi-Fi information; the second processor 23 implements the following network connection method when executing the running program stored in the second memory 24:
获取接入点的Wi-Fi信息,并通过第一传输通道发送所述Wi-Fi信息;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。Acquire Wi-Fi information of the access point, and send the Wi-Fi information through the first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
进一步地,在上述实施例中,所述第二处理器23,还用于获取当前连接的接入点的Wi-Fi信息;和/或获取扫描的接入点的Wi-Fi信息;和/或获取存储的接入点的Wi-Fi信息。Further, in the above embodiment, the second processor 23 is further configured to acquire the Wi-Fi information of the currently connected access point; and/or acquire the Wi-Fi information of the scanned access point; and/or Or get the Wi-Fi information of the stored access point.
进一步地,在上述实施例中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。Further, in the above-mentioned embodiment, the Wi-Fi information is the information processed by the main device in a preset grouping and encoding manner.
本申请实施例提供一种存储介质,其上存储有计算机程序,上述计算机可读存储介质存储有一个或者多个程序,上述一个或者多个程序可被一个或者多个处理器执行,应用于设备2中,该计算机程序实现如上述的网络连接方法。An embodiment of the present application provides a storage medium on which a computer program is stored, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors and applied to a device In 2, the computer program implements the network connection method as described above.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台图像显示设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本公开各个实施例所述的方 法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present disclosure can be embodied in the form of software products in essence or the parts that make contributions to related technologies. The computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) ), including several instructions for causing an image display device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present disclosure.
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application.

Claims (22)

  1. 一种网络连接方法,所述方法包括:A network connection method, the method comprising:
    通过第一传输通道,接收无线信息技术Wi-Fi信息,并基于所述Wi-Fi信息与接入点进行连接;Receive wireless information technology Wi-Fi information through the first transmission channel, and connect with the access point based on the Wi-Fi information;
    所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。The Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
  2. 根据权利要求1所述的方法,其中,所述基于所述Wi-Fi信息与接入点进行连接之后,所述方法还包括:The method according to claim 1, wherein after the connection with the access point based on the Wi-Fi information, the method further comprises:
    在连接至主设备当前连接的接入点之后,通过所述第一传输通道,接收所述主设备发送的所述主设备当前连接的接入点的Wi-Fi信息;After connecting to the access point currently connected to the main device, receive the Wi-Fi information of the access point currently connected to the main device sent by the main device through the first transmission channel;
    从所述主设备当前连接的接入点的Wi-Fi信息中获取所述主设备当前连接的接入点的监听信息,以基于所述监听信息监听所述主设备当前连接的接入点。The monitoring information of the access point currently connected by the main device is acquired from the Wi-Fi information of the access point currently connected by the main device, so as to monitor the access point currently connected by the main device based on the monitoring information.
  3. 根据权利要求1所述的方法,其中,所述通过第一传输通道,接收Wi-Fi信息,包括:The method according to claim 1, wherein the receiving Wi-Fi information through the first transmission channel comprises:
    获取主设备和从设备之间的第一距离;Get the first distance between the master device and the slave device;
    在所述第一距离小于预设距离阈值的情况下,判断预存Wi-Fi信息的存储时长是否大于预设存储时长,所述预存Wi-Fi信息为历史接收到所述主设备发送的Wi-Fi信息集合;In the case that the first distance is less than the preset distance threshold, it is determined whether the storage duration of the pre-stored Wi-Fi information is greater than the preset storage duration, and the pre-stored Wi-Fi information is the Wi-Fi information sent by the master device in the past. Fi information collection;
    在所述预存Wi-Fi信息的存储时长大于所述预设存储时长的情况下,通过所述第一传输通道向所述主设备发送Wi-Fi信息请求消息,并通过所述第一传输通道,接收所述主设备发送的Wi-Fi信息。When the storage duration of the pre-stored Wi-Fi information is longer than the preset storage duration, send a Wi-Fi information request message to the master device through the first transmission channel, and send a Wi-Fi information request message through the first transmission channel , to receive the Wi-Fi information sent by the master device.
  4. 根据权利要求1或3所述的方法,其中,所述基于所述Wi-Fi信息与接入点进行连接,包括:The method according to claim 1 or 3, wherein the connecting with the access point based on the Wi-Fi information comprises:
    将所述Wi-Fi信息更新至所述预存Wi-Fi信息中,并基于更新后的预存Wi-Fi信息选择第一接入点;updating the Wi-Fi information to the pre-stored Wi-Fi information, and selecting a first access point based on the updated pre-stored Wi-Fi information;
    从所述更新后的预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。Search for the connection information of the first access point from the updated pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  5. 根据权利要求3所述的方法,其中,所述基于所述Wi-Fi信息与接入点进行连接,包括:The method of claim 3, wherein the connecting with an access point based on the Wi-Fi information comprises:
    在所述预存Wi-Fi信息的存储时长不大于所述预设存储时长的情况下,基于所述预存Wi-Fi信息选择第一接入点;In the case that the storage duration of the pre-stored Wi-Fi information is not greater than the preset storage duration, selecting a first access point based on the pre-stored Wi-Fi information;
    从所述预存Wi-Fi信息中查找所述第一接入点的连接信息,并根据所述第一接入点的连接信息与接入点进行连接。Search the connection information of the first access point from the pre-stored Wi-Fi information, and connect with the access point according to the connection information of the first access point.
  6. 根据权利要求4或5所述的方法,其中,所述基于更新后的预存Wi-Fi信息选择第一接入点或所述基于所述预存Wi-Fi信息选择第一接入点,包括:The method according to claim 4 or 5, wherein the selecting the first access point based on the updated pre-stored Wi-Fi information or the selecting the first access point based on the pre-stored Wi-Fi information comprises:
    确定所述主设备当前连接的接入点;determining the access point to which the master device is currently connected;
    获取所述主设备当前连接的接入点的连接参数;Obtain the connection parameters of the access point currently connected to the master device;
    在所述连接参数不满足预设连接条件的情况下,根据所述更新后的预存Wi-Fi信息或所述预存Wi-Fi信息中的信道相关信息,选择第一接入点;In the case that the connection parameters do not meet the preset connection conditions, select a first access point according to the updated pre-stored Wi-Fi information or channel-related information in the pre-stored Wi-Fi information;
    在所述连接参数满足所述预设连接条件的情况下,将所述主设备当前连接的接入点确定为所述第一接入点。In the case that the connection parameter satisfies the preset connection condition, the access point to which the master device is currently connected is determined as the first access point.
  7. 根据权利要求1所述的方法,其中,所述Wi-Fi信息包括以下至少一种:The method of claim 1, wherein the Wi-Fi information includes at least one of the following:
    主设备当前连接的接入点的Wi-Fi信息、和/或所述主设备扫描的接入点的Wi-Fi信 息、和/或所述主设备存储的接入点的Wi-Fi信息。The Wi-Fi information of the access point currently connected by the master device, and/or the Wi-Fi information of the access point scanned by the master device, and/or the Wi-Fi information of the access point stored by the master device.
  8. 根据权利要求1所述的方法,其中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。The method according to claim 1, wherein the Wi-Fi information is information processed by the main device in a preset grouping and encoding manner.
  9. 根据权利要求1所述的方法,其中,所述基于所述Wi-Fi信息与接入点进行连接之后,所述方法还包括:The method according to claim 1, wherein after the connection with the access point based on the Wi-Fi information, the method further comprises:
    在连接至第一接入点、且基于所述第一接入点完成数据传输之后,断开所述第一接入点的Wi-Fi连接。After connecting to the first access point and completing the data transfer based on the first access point, disconnecting the Wi-Fi connection of the first access point.
  10. 根据权利要求1或7所述的方法,其中,所述方法还包括:The method according to claim 1 or 7, wherein the method further comprises:
    通过所述第一传输通道,接收主设备在满足更新条件的情况下发送的Wi-Fi信息。Through the first transmission channel, the Wi-Fi information sent by the master device when the update condition is satisfied is received.
  11. 根据权利要求10所述的方法,其中,所述更新条件包括:预设更新时段和/或所述主设备的Wi-Fi扫描数量,其中,所述预设更新时段根据从设备所处位置和/或时间段进行调整。The method according to claim 10, wherein the update condition comprises: a preset update period and/or the number of Wi-Fi scans of the master device, wherein the preset update period is based on the location of the slave device and the / or time period to adjust.
  12. 根据权利要求1-10任一项所述的方法,其中,所述信道相关信息包括以下至少一种:信道、定时同步功能TSF、链路速率、基本服务集负载状态BSS-load、接收信号强度指示RSSI、流量指示管理TIM、信道切换通知CSA、扩展信道切换通知信息元素ECSA IE。The method according to any one of claims 1-10, wherein the channel-related information includes at least one of the following: channel, timing synchronization function TSF, link rate, basic service set load status BSS-load, received signal strength Indication RSSI, Traffic Indication Management TIM, Channel Switch Notification CSA, Extended Channel Switch Notification Information Element ECSA IE.
  13. 根据权利要求1所述的方法,其中,所述第一传输通道包括以下至少一种:蓝牙传输通道、近场通信NFC通道、超宽带通信UWB通道。The method according to claim 1, wherein the first transmission channel comprises at least one of the following: a Bluetooth transmission channel, a near field communication (NFC) channel, and an ultra-wideband communication (UWB) channel.
  14. 一种网络连接方法,所述方法包括:A network connection method, the method comprising:
    获取接入点的Wi-Fi信息,并通过第一传输通道发送所述Wi-Fi信息;Acquire Wi-Fi information of the access point, and send the Wi-Fi information through the first transmission channel;
    所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。The Wi-Fi information includes at least the SSID of the access point, encryption information and channel related information.
  15. 根据权利要求14所述的方法,其中,所述获取接入点的Wi-Fi信息,包括:The method according to claim 14, wherein the acquiring Wi-Fi information of the access point comprises:
    获取当前连接的接入点的Wi-Fi信息;Get the Wi-Fi information of the currently connected access point;
    和/或获取扫描的接入点的Wi-Fi信息;and/or obtain Wi-Fi information of scanned access points;
    和/或获取存储的接入点的Wi-Fi信息。and/or obtain stored Wi-Fi information for the access point.
  16. 根据权利要求14所述的方法,其中,所述Wi-Fi信息为主设备通过预设分组和编码方式进行处理后的信息。The method according to claim 14, wherein the Wi-Fi information is the information processed by the main device in a preset grouping and encoding manner.
  17. 一种网络连接设备,所述设备包括:A network connection device comprising:
    接收模块,用于通过第一传输通道,接收Wi-Fi信息;a receiving module for receiving Wi-Fi information through the first transmission channel;
    连接模块,用于基于所述Wi-Fi信息与接入点进行连接;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。A connection module, configured to connect with an access point based on the Wi-Fi information; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  18. 一种网络连接设备,所述设备包括:A network connection device comprising:
    获取模块,用于获取接入点的Wi-Fi信息;The acquisition module is used to acquire the Wi-Fi information of the access point;
    发送模块,用于通过第一传输通道发送所述Wi-Fi信息;所述Wi-Fi信息至少包括所述接入点的SSID、加密信息以及信道相关信息。A sending module, configured to send the Wi-Fi information through a first transmission channel; the Wi-Fi information at least includes the SSID, encryption information and channel related information of the access point.
  19. 一种网络连接设备,所述设备包括:接收器、第一处理器、第一存储器及第一通信总线;所述第一处理器执行第一存储器存储的运行程序时实现如权利要求1-13任一项所述的方法。A network connection device, the device comprises: a receiver, a first processor, a first memory and a first communication bus; when the first processor executes a running program stored in the first memory, the implementation of claims 1-13 The method of any one.
  20. 一种网络连接设备,所述设备包括:发送器、第二处理器、第二存储器及第二通信总线;所述第二处理器执行第二存储器存储的运行程序时实现如权利要求14-16任一项所述的方法。A network connection device, the device comprises: a transmitter, a second processor, a second memory and a second communication bus; when the second processor executes a running program stored in the second memory, the implementation of claims 14-16 The method of any one.
  21. 一种存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时实现如权利要求1-13任一项所述的方法。A storage medium having a computer program stored thereon, the computer program implementing the method according to any one of claims 1-13 when executed by a first processor.
  22. 一种存储介质,其上存储有计算机程序,该计算机程序被第二处理器执行时实 现如权利要求14-16任一项所述的方法。A storage medium having a computer program stored thereon, the computer program implementing the method of any one of claims 14-16 when executed by a second processor.
PCT/CN2022/085087 2021-05-06 2022-04-02 Network connection method and device, and storage medium WO2022233210A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110491600.2 2021-05-06
CN202110491600.2A CN115314976A (en) 2021-05-06 2021-05-06 Network connection method and device, and storage medium

Publications (1)

Publication Number Publication Date
WO2022233210A1 true WO2022233210A1 (en) 2022-11-10

Family

ID=83853122

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/085087 WO2022233210A1 (en) 2021-05-06 2022-04-02 Network connection method and device, and storage medium

Country Status (2)

Country Link
CN (1) CN115314976A (en)
WO (1) WO2022233210A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105636174A (en) * 2016-03-03 2016-06-01 青岛海信电器股份有限公司 Wi-Fi access method and system, server and terminal
CN106851648A (en) * 2017-02-17 2017-06-13 上海掌门科技有限公司 A kind of method for sharing the access information of WAP, device and system
CN108668277A (en) * 2018-04-17 2018-10-16 上海连尚网络科技有限公司 For sharing information, the method and apparatus for obtaining information
CN109587720A (en) * 2018-01-31 2019-04-05 上海连尚网络科技有限公司 A method of wireless access point information is prompted at wireless device end
CN110113802A (en) * 2018-05-18 2019-08-09 上海连尚网络科技有限公司 A kind of method of the configuration information of shared wireless access point
WO2020216231A1 (en) * 2019-04-24 2020-10-29 上海连尚网络科技有限公司 Method of sharing wireless access point by means of instant messaging software

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105636174A (en) * 2016-03-03 2016-06-01 青岛海信电器股份有限公司 Wi-Fi access method and system, server and terminal
CN106851648A (en) * 2017-02-17 2017-06-13 上海掌门科技有限公司 A kind of method for sharing the access information of WAP, device and system
CN109587720A (en) * 2018-01-31 2019-04-05 上海连尚网络科技有限公司 A method of wireless access point information is prompted at wireless device end
CN108668277A (en) * 2018-04-17 2018-10-16 上海连尚网络科技有限公司 For sharing information, the method and apparatus for obtaining information
CN110113802A (en) * 2018-05-18 2019-08-09 上海连尚网络科技有限公司 A kind of method of the configuration information of shared wireless access point
WO2020216231A1 (en) * 2019-04-24 2020-10-29 上海连尚网络科技有限公司 Method of sharing wireless access point by means of instant messaging software

Also Published As

Publication number Publication date
CN115314976A (en) 2022-11-08

Similar Documents

Publication Publication Date Title
US10341944B2 (en) Access point, wireless terminal, storage medium, and method utilizing pointer signal to communicate in available channel
JP6386188B2 (en) Scan channel reduction to improve Wi-Fi system power
US20220167256A1 (en) MLD Privacy and Operation Enhancements
US7558567B2 (en) BSS-switch module for wireless devices
EP1891751B1 (en) Using mini-beacons in a wireless network
US11064437B2 (en) Power saving for wireless device
US11218961B2 (en) Power saving for wireless device
KR101763171B1 (en) Apparatus and method for connecting peer to peer between a mobile terminal
KR102162958B1 (en) Method and apparatus for handover in wireless lan system and system therefor
US10993149B2 (en) Operating a terminal device in a cellular mobile communication network
US20160302152A1 (en) Communication control method, user terminal, and processor
US9998902B2 (en) Mobile communication system, user terminal, base station, and processor transmitting a discovery-use signal
JP5390300B2 (en) Wireless device and method for switching operation mode of wireless device
WO2019125425A1 (en) Power saving for wireless device
WO2022233210A1 (en) Network connection method and device, and storage medium
EP3493612A1 (en) Wireless system domain management method, terminal, and base station
CN111757381B (en) Transmission method, network equipment and terminal
CN115175229A (en) Communication method and communication device
CN114938507B (en) Access method, device, system and readable storage medium
JP4890476B2 (en) Communication terminal
EP2140585A1 (en) Method for managing wireless network and wireless device employing the same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22798551

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22798551

Country of ref document: EP

Kind code of ref document: A1