Network connection method and device and storage medium

By saving and restoring the WLAN direct connection network configuration between electronic devices, the problem of excessive power consumption caused by the device being kept connected is solved, and the effect of rapid recovery and reduced power loss is achieved.

CN119946906APending Publication Date: 2025-05-06BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311467097.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

After the electronic device is connected through WLAN direct connection technology, unless it is actively disconnected, the devices will remain connected, resulting in excessive power consumption and power loss.

Method used

By saving the network configuration of the connected network between the first device and the second device, when the device connection is disconnected and a data transmission request is detected, the network connection is restored based on the saved network configuration.

Benefits of technology

It realizes rapid recovery of network connections between devices, improves network reconnection speed, and reduces power consumption and power loss between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946906A_ABST
    Figure CN119946906A_ABST
Patent Text Reader

Abstract

The invention provides a network connection method and device and a storage medium, and the method comprises the steps: responding to a first device, building a network connection with a second device, and storing the network configuration of a connected network between the first device and the second device; and in response to the fact that the first equipment disconnects the connected network with the second equipment and detects a data transmission request, the data transmission request is used for requesting to transmit data to the second equipment, and network connection with the second equipment is recovered based on the stored network configuration. By storing the network configuration of the connected network of the first equipment and the second equipment, when the network connection of the first equipment and the second equipment is disconnected and the data transmission request is detected, the network connection between the first equipment and the second equipment can be quickly recovered according to the stored network configuration, so that the network reconnection speed between the equipment is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of electronic equipment, and in particular to a network connection method, device and storage medium. Background Art

[0002] With the development of science and technology, electronic devices have become widely popular, and the performance of electronic devices has been continuously improved with people's increasing demands. For example, electronic devices can realize data transmission between electronic devices through wireless local area network (WLAN) direct connection technology.

[0003] However, when a WLAN direct connection is established between electronic devices, unless the connection between the devices is actively disconnected, the devices will always remain connected, causing excessive power consumption of the electronic devices, thereby resulting in a large power loss of the electronic devices. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a network connection method, device and storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a network connection method is provided, comprising: in response to a first device establishing a network connection with a second device, saving a network configuration of a network connected to the second device; in response to the first device disconnecting from the network connected to the second device and detecting a data transmission request for requesting data transmission to the second device, restoring the network connection with the second device based on the saved network configuration.

[0006] In one embodiment, saving the network configuration of the network connected between the first device and the second device includes: generating a first identifier, wherein the first identifier is used to identify the network configuration of the network connected between the first device and the second device; and saving the first identifier and the network configuration.

[0007] In one embodiment, restoring the network connection with the second device based on the saved network configuration includes: sending the first identifier to the second device or receiving the first identifier sent by the second device, wherein the second device queries the network configuration based on the first identifier; querying the network configuration based on the first identifier, and based on the network configuration, restoring the network connection corresponding to the network configuration with the second device.

[0008] In one embodiment, sending the first identifier to the second device includes: sending a first message to the second device or receiving a first message sent by the second device via an out-of-band data OOB method, wherein the first message includes a first type identifier, and the first type identifier is used to identify that the first message is used to restore a network connection, and the first message carries the first identifier.

[0009] In one embodiment, the method also includes: in response to detecting that the data transmission volume in the network connection established between the first device and the second device is less than a data transmission volume threshold within a first time, sending a second message to the second device or receiving a second message sent by the second device via an out-of-band data OOB method, wherein the second message includes a second type identifier, and the second type identifier is used to identify that the second message is used to temporarily disconnect the connected network, and the second message carries the first identifier.

[0010] In one embodiment, the method also includes: in response to cessation of network connection between the first device and the second device, sending a third message to the second device via out-of-band data OOB, and deleting the first identifier and the network configuration, the third message including a third type identifier, the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier.

[0011] In one embodiment, the first device establishes a network connection with the second device, including: sending a fourth message to the second device via an out-of-band data OOB method, and establishing a network connection with the second device based on the fourth message; the fourth message includes a fourth type identifier, and the fourth type identifier is used to identify that the fourth message is used to establish a network connection with the second device.

[0012] According to a second aspect of an embodiment of the present disclosure, a network connection method is provided, comprising: in response to a second device receiving a first identifier sent by a first device, wherein the first identifier is used to identify a network configuration of a connected network between the first device and the second device; and saving the first identifier and the network configuration.

[0013] In one embodiment, the method also includes: in response to cessation of the network connection between the first device and the second device, and receiving a third message sent by the first device via out-of-band data OOB, the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier; based on the first identifier in the third message, querying the network configuration corresponding to the first identifier, and deleting the first identifier and the network configuration.

[0014] In one embodiment, the method also includes: in response to receiving a fourth message sent by the first device via out-of-band data OOB, establishing a network connection with the first device based on the fourth message; the fourth message includes a fourth type identifier, and the fourth type identifier is used to identify that the fourth message is used to establish a network connection with the first device.

[0015] According to a third aspect of an embodiment of the present disclosure, there is provided a network connection device, including:

[0016] A first storage unit, configured to, in response to the first device establishing a network connection with the second device, store a network configuration of the network connected to the second device;

[0017] A recovery unit is used to respond to the first device disconnecting the network connected to the second device and detecting a data transmission request, wherein the data transmission request is used to request data transmission to the second device, and based on the saved network configuration, restore the network connection with the second device.

[0018] In one embodiment, the first saving unit saves the network configuration of the network connected to the second device in the following manner: generating a first identifier, wherein the first identifier is used to identify the network configuration of the network connected between the first device and the second device; and saving the first identifier and the network configuration.

[0019] In one embodiment, the recovery unit restores the network connection with the second device based on the saved network configuration in the following manner: sending the first identifier to the second device or receiving the first identifier sent by the second device, so that the second device queries the network configuration based on the first identifier; querying the network configuration based on the first identifier, and based on the network configuration, restoring the network connection corresponding to the network configuration with the second device.

[0020] In one embodiment, the recovery unit sends the first identifier to the second device in the following manner: sending a first message to the second device or receiving a first message sent by the second device through an out-of-band data OOB method, wherein the first message includes a first type identifier, and the first type identifier is used to identify that the first message is used to restore a network connection, and the first message carries the first identifier.

[0021] In one embodiment, the recovery unit is also used to: in response to detecting that the data transmission volume in the network connection established between the first device and the second device is less than a data transmission volume threshold within a first time, send a second message to the second device or receive a second message sent by the second device via an out-of-band data OOB method, wherein the second message includes a second type identifier, and the second type identifier is used to identify that the second message is used to temporarily disconnect the connected network, and the second message carries the first identifier.

[0022] In one embodiment, the recovery unit is also used to: in response to cessation of network connection between the first device and the second device, send a third message to the second device via out-of-band data OOB, and delete the first identifier and the network configuration, the third message includes a third type identifier, the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier.

[0023] In one implementation, the first storage unit establishes a network connection between the first device and the second device in the following manner: sending a fourth message to the second device in an out-of-band data OOB manner, and establishing a network connection with the second device based on the fourth message;

[0024] The fourth message includes a fourth type identifier, where the fourth type identifier is used to identify that the fourth message is used to establish a network connection with the second device.

[0025] According to a fourth aspect of an embodiment of the present disclosure, there is provided a network connection device, including:

[0026] a receiving unit, configured to, in response to the second device receiving a first identifier sent by the first device, wherein the first identifier is used to identify a network configuration of a network connected between the first device and the second device;

[0027] The second saving unit is used to save the first identifier and the network configuration.

[0028] In one embodiment, the receiving unit is also used to: in response to cessation of the network connection between the first device and the second device, and receiving a third message sent by the first device via out-of-band data OOB, the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier; based on the first identifier in the third message, query the network configuration corresponding to the first identifier, and delete the first identifier and the network configuration.

[0029] In one embodiment, the receiving unit is also used to: in response to receiving a fourth message sent by the first device via out-of-band data OOB, establish a network connection with the first device based on the fourth message; the fourth message includes a fourth type identifier, and the fourth type identifier is used to identify that the fourth message is used to establish a network connection with the first device.

[0030] According to a fifth aspect of an embodiment of the present disclosure, there is provided a network connection device, including:

[0031] processor;

[0032] a memory for storing processor-executable instructions;

[0033] The processor is configured to: execute the method described in the first aspect or any one of the embodiments of the first aspect; or execute the method described in the second aspect or any one of the embodiments of the second aspect.

[0034] According to a sixth aspect of an embodiment of the present disclosure, a storage medium is provided, wherein instructions are stored in the storage medium. When the instructions in the storage medium are executed by a processor of a terminal, the method described in the first aspect or any one of the embodiments of the first aspect is executed; or the method described in the second aspect or any one of the embodiments of the second aspect is executed.

[0035] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by saving the network configuration of the network to which the first device and the second device are connected, when the network connection between the first device and the second device is disconnected and a data transmission request is detected, the network connection between the first device and the second device can be quickly restored according to the saved network configuration, thereby improving the network reconnection speed between the devices.

[0036] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0038] Figure 1 The figure is a flow chart of a network connection method according to an exemplary embodiment.

[0039] Figure 2 The figure is a flow chart of a network connection method according to an exemplary embodiment.

[0040] Figure 3 The figure is a flow chart of a network connection method according to an exemplary embodiment.

[0041] Figure 4 The figure is a flowchart of a network connection method based on first information according to an exemplary embodiment.

[0042] Figure 5 The present invention is a flowchart showing a method for temporarily disconnecting a network connection according to an exemplary embodiment.

[0043] Figure 6 The invention is a flowchart showing a complete network connection method according to an exemplary embodiment.

[0044] Figure 7 The present invention is a flowchart of a method for establishing a network connection according to an exemplary embodiment.

[0045] Figure 8 The figure is a flowchart showing a network connection method based on a second device according to an exemplary embodiment.

[0046] Fig. 9 The figure is a flowchart showing a network connection method based on a second device according to an exemplary embodiment.

[0047] Fig.10 The diagram is a schematic diagram showing a network connection method according to an exemplary embodiment.

[0048] Fig.11 The figure is a block diagram of a network connection device according to an exemplary embodiment.

[0049] Fig.12 The figure is a block diagram of a network connection device according to an exemplary embodiment.

[0050] Fig.13 The invention is a block diagram showing a device for network connection according to an exemplary embodiment. DETAILED DESCRIPTION

[0051] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0052] The network connection method provided in the present disclosure is applied to a scenario where a network connection is performed between electronic devices, for example, it is applied to a scenario where electronic devices perform a WLAN direct connection.

[0053] With the development of science and technology, electronic devices have become widely popular, and more and more users use electronic devices to handle various affairs in daily life and work. And with the development of electronic device technology and people's growing demand for use, the functions of electronic devices are also constantly improving. For example, in order to realize data transmission between electronic devices, a related WLAN direct connection protocol has been introduced. The WLAN direct connection protocol can realize data transmission between devices, that is, through point-to-point direct connection technology (Peer-to-Peer, P2P) or through software (Soft) on electronic devices to achieve wireless access point (Access Point, AP) function to realize point-to-point direct connection technology (SoftAp-P2P), and then data transmission between devices can be realized.

[0054] The scenario of data interaction between devices supporting P2P technology (P2P Device) through WLAN direct connection can be understood as data interaction between multiple devices based on the same Wireless Fidelity (Wi-Fi). P2P direct connection technology can be applied between electronic devices. The device that provides a wireless access point (AP) for other devices can be used as an access point (P2P Group Owner, GO), and the other end device connected to the GO device can be used as a site (P2P Client, GC), and a P2P group (P2P Group) is established to transmit data between electronic devices in the P2P group. In addition, P2P technology also includes SoftAp-P2P direct connection technology. SoftAp-P2P direct connection technology can be applied between electronic devices and personal computers (Personal Computer, PC). The PC starts a soft AP (Soft AP) as the CO end in P2P, and the electronic device as the GC end can be connected to the PC, thereby establishing a P2P group and realizing data interaction.

[0055] In the related art, after a P2P group is established, the GC end and the GO end in the P2P group will always remain connected unless the user actively requests to disconnect. When there is less business data for interaction in the P2P group, the devices at both ends will still interact by regularly sending and receiving beacon frames, resulting in excessive power consumption. Therefore, the P2P connection can be disconnected when it is detected that the data flow in the P2P is lower than the threshold for a long time, thereby reducing power consumption losses. However, when the P2P connection is disconnected, when the device detects that it needs to connect again, it still needs to perform a series of actions such as P2P device discovery, role negotiation, and connection, which takes a long time.

[0056] Therefore, the present disclosure saves the network configuration of the network to which the first device and the second device are connected. When the network connection between the first device and the second device is disconnected and a data transmission request is detected, the network connection between the first device and the second device can be quickly restored according to the saved network configuration, thereby improving the network reconnection speed between the devices.

[0057] Figure 1 is a flow chart of a network connection method according to an exemplary embodiment. Figure 1 As shown, the network connection method is used in a terminal and includes the following steps.

[0058] In step S11 , in response to the first device establishing a network connection with the second device, a network configuration of the network connected to the second device is saved.

[0059] In the implementation of the present disclosure, the network connection established between the first device and the second device may be a peer-to-peer (P2P) network connection established based on WLAN direct connection technology.

[0060] In the implementation of the present disclosure, the first device may be a device for providing a wireless connection in a P2P direct connection, and the second device may be a device for receiving a message in a P2P direct connection.

[0061] In the embodiment of the present disclosure, the first device saves the network configuration connected to the second device, which may be network configuration information such as role, channel, service set identifier (SSID), address resolution protocol (ARP), and static Internet Protocol address (IP).

[0062] In step S12, in response to the first device disconnecting the network connected to the second device and detecting a data transmission request, the network connection with the second device is restored based on the saved network configuration.

[0063] The data transmission request is used to request data transmission to the second device.

[0064] In the embodiment of the present disclosure, the first device disconnects from the connected network with the second device, and the first device detects a data transmission request and restores the network connection with the second device based on the saved network configuration.

[0065] In the embodiment of the present disclosure, when the first device establishes a network connection with the second device through the WLAN direct connection technology, the first device saves the network configuration connected with the second device. When the network connected between the first device and the second device is disconnected, and the first device detects a data transmission request to send data to the second device, the network connection with the second device is restored based on the saved network configuration.

[0066] In the embodiment of the present disclosure, by saving the network configuration of the network to which the first device and the second device are connected, when the network connection between the first device and the second device is disconnected and a data transmission request is detected, the network connection between the first device and the second device can be quickly restored based on the saved network configuration, thereby improving the network reconnection speed between the devices.

[0067] In the embodiment of the present disclosure, the network configuration of the connected network between the first device and the second device may be represented by an identifier.

[0068] Figure 2 is a flow chart of a network connection method according to an exemplary embodiment. Figure 2 As shown, the network connection method is used in a terminal and includes the following steps.

[0069] In step S21 , in response to the first device establishing a network connection with the second device, a first identifier is generated.

[0070] The first identifier is used to identify the network configuration of the network connected between the first device and the second device.

[0071] In the embodiment of the present disclosure, the first identifier is unique to the network configuration of the network connected between the first device and the second device. For example, when the first device establishes a network connection with multiple second devices at the same time, the first device generates different first identifiers based on the network configurations of the network connections with different second devices.

[0072] In step S22, the first identifier and the network configuration are saved.

[0073] In the embodiment of the present disclosure, the first device saves the first identifier and the network configuration of the connected network corresponding to the first identifier.

[0074] In step S23, in response to the first device disconnecting the network connected to the second device and detecting a data transmission request, the network connection with the second device is restored based on the saved network configuration.

[0075] In an embodiment of the present disclosure, when the network connection between a first device and a second device is disconnected and the first device detects the presence of a data transmission request to send data to the second device, the first device determines the network configuration corresponding to the second device based on the first identifier, and restores the network connection with the second device based on the network configuration corresponding to the second device.

[0076] In the embodiment of the present disclosure, by generating a first identifier that is uniquely used to identify the network configuration of the connected network between the first device and the second device, when the network connection between the second device needs to be restored, the corresponding network configuration can be quickly obtained through the first identifier, thereby achieving rapid restoration of the network connection between the devices.

[0077] In the embodiment of the present disclosure, the first device and the second device need to restore corresponding network configurations at the same time, so that the network connection between the first device and the second device can be restored.

[0078] In the disclosed embodiment, the first identifier corresponding to the network configuration of the network connected between the second device and stored by the first device may be the same as the first identifier corresponding to the network configuration of the network connected between the first device and stored by the second device.

[0079] In the embodiment of the present disclosure, a first identifier may be generated by a first device and sent to a second device.

[0080] Figure 3 is a flow chart of a network connection method according to an exemplary embodiment. Figure 3 As shown, the network connection method is used in a terminal and includes the following steps.

[0081] In step S31, a first identifier is sent to a second device, so that the second device can query a network configuration based on the first identifier.

[0082] In the embodiment of the present disclosure, the first device sends a first identifier to the second device, wherein the first identifier may be an identifier uniquely corresponding to the network configuration between the first device and the second device. The second device may query the network configuration when the second device is connected to the first device based on the first identifier.

[0083] In the embodiment of the present disclosure, the first identifier may be a universally unique identifier (Universally Unique Identifier, UUID), for example, the first identifier may be a 32-bit UUID.

[0084] In step S32, the network configuration is queried based on the first identifier, and based on the network configuration, a network connection corresponding to the network configuration is restored with the second device.

[0085] In the embodiment of the present disclosure, the first device determines the network configuration for establishing a network connection with the second device based on the first identifier, and the second device determines the network configuration for establishing a network connection with the first device based on the first identifier. When both the first device and the second device complete the network configuration, the network connection between the first device and the second device is restored.

[0086] In the implementation of the present disclosure, by sending a first identifier to a second device, the second device can match the network configuration for the network connection with the first device with the first identifier, so that when it is necessary to restore the network connection between the first device and the second device, the network configuration for the connection between the first device and the second device can be quickly determined in the first device and the second device, thereby achieving rapid connection between the devices.

[0087] In the embodiment of the present disclosure, the first identifier may be carried in the first message.

[0088] Figure 4 is a flowchart of a network connection method based on first information according to an exemplary embodiment. Figure 4 As shown, the network connection method is used in a terminal and includes the following steps.

[0089] In step S41, a first message is sent to a second device or a first message sent by a second device is received through an out-of-band data OOB manner.

[0090] The first message includes a first type identifier.

[0091] The first type identifier is used to identify that the first message is used to restore the network connection, and the first message carries the first identifier.

[0092] In the embodiment of the present disclosure, the first message may be transmitted between the first device and the second device in an out-of-band (OOB) manner, wherein the OOB manner may be transmitted in a Bluetooth or Bluetooth Low Energy (BLE) manner.

[0093] In the implementation of the present disclosure, a first device may send a first message to a second device, wherein the first message includes a first type identifier, and the first type identifier may be used to indicate that the first message may be used to restore a network connection between the first device and the second device.

[0094] In the embodiment of the present disclosure, a first device may receive a first message sent by a second device, and the first device may determine that the first message is used to restore a network configuration between the first device and the second device based on a first type identifier in the first message, and determine a network configuration of a network connection with the second device based on a first identifier carried in the first message.

[0095] In step S42, based on the first information, a network connection corresponding to the network configuration is restored with the second device.

[0096] In an implementation of the present disclosure, the first device may determine, through a first type identifier in the first information, that the first information can be used to restore a network connection, and determine a network configuration of a network connection with the second device based on the first identifier in the first information.

[0097] In the disclosed embodiment, the message interaction between the first device and the second device is implemented in an OOB manner, thereby avoiding occupying the service transmission channel between the devices during message interaction, thereby preventing interference with normal data transmission between the devices.

[0098] In the embodiment of the present disclosure, when the data transmission volume between devices is less than the data transmission volume threshold within the first time, the network connection between the devices can be temporarily disconnected.

[0099] Figure 5 is a flow chart showing a method for temporarily disconnecting a network connection according to an exemplary embodiment. Figure 5 As shown, the network connection method is used in a terminal and includes the following steps.

[0100] In step S51, in response to detecting that a data transmission volume in a network connection established between a first device and a second device is less than a data transmission volume threshold within a first time.

[0101] In the embodiment of the present disclosure, the first device may detect that the data transmission volume in the network connection established between the first device and the second device is less than the data transmission volume threshold within the first time.

[0102] In the embodiment of the present disclosure, it can be detected by the second device that the data transmission volume in the network connection established between the first device and the second device is less than the data transmission volume threshold within the first time.

[0103] In one example, the first device detects that the amount of data transmission in the network connection established between the first device and the second device is less than a data transmission threshold within a first time. This may be that the first device detects that the amount of data transmission in the network connection established between the first device and the second device is less than the data transmission threshold within a first time, for example, 10 minutes, or there is no data transmission.

[0104] In step S52, a second message is sent to the second device or a second message sent by the second device is received through an out-of-band data OOB manner.

[0105] The second message includes a second type identifier.

[0106] The second type identifier is used to identify that the second message is used to temporarily disconnect the connected network, and the second message carries the first identifier.

[0107] In the embodiment of the present disclosure, the first device or the second device can determine that the second message is used to temporarily disconnect the connected network based on the second type identifier in the second message. The first device or the second device can determine the network connection that needs to be disconnected based on the first identifier in the second message. For example, when device 1 establishes a network connection with device 2 and device 1 establishes a network connection with device 3, wherein there is identifier 1 between device 1 and device 2, and there is identifier 2 between device 1 and device 3, device 1 can determine that it needs to temporarily disconnect the connected network with device 2 based on identifier 1 in the first message.

[0108] In an embodiment of the present disclosure, when a first device detects that a data transmission volume in a network connection established between the first device and the second device is less than a data transmission volume threshold within a first time, the first device may send second information to the second device to temporarily disconnect the network connection between the first device and the second device.

[0109] In an embodiment of the present disclosure, when the second device detects that the data transmission volume in the network connection established between the first device and the second device is less than the data transmission volume threshold within a first time, the first device can receive second information sent by the second device and temporarily disconnect the network connection between the first device and the second device based on the second information.

[0110] In an embodiment of the present disclosure, when it is detected that the data transmission volume between the first device and the second device is less than the data transmission volume threshold within the first time, the network device connected between the first device and the second device is temporarily disconnected through the second information, thereby reducing the power consumption consumed in establishing the network connection between the devices.

[0111] In the embodiment of the present disclosure, when the first device detects an instruction from the user to completely disconnect the established network connection, the network connection between the devices may be deleted, thereby completely disconnecting the network connection between the devices.

[0112] Figure 6 is a flow chart showing a complete network connection method according to an exemplary embodiment. Figure 6 As shown, the network connection method is used in a terminal and includes the following steps.

[0113] In step S61, in response to the first device and the second device stopping the network connection.

[0114] In the embodiment of the present disclosure, the first device may detect an instruction from a user to completely disconnect the established network connection. The first device is a GO terminal in the P2P direct connection group.

[0115] In the embodiment of the present disclosure, stopping the network connection between the first device and the second device may be that the first device and the second device temporarily stop the network connection based on the second message, or it may be when the first device detects that the user needs to stop the network connection between the first device and the second device.

[0116] In step S62, a third message is sent to the second device through an out-of-band data OOB manner, and the first identifier and the network configuration are deleted.

[0117] The third message includes a third type identifier.

[0118] The third type identifier is used to identify a third message, the third message is used to disconnect the connected network, and the third message carries the first identifier.

[0119] In the implementation of the present disclosure, when the first device detects that the user needs to completely disconnect the established network connection, a third message can be sent to the second device. The third message includes a third type identifier, and the third type identifier is used to determine that the third message is used to disconnect the connected network and delete the first identifier and the network configuration. The first identifier is carried in the third message.

[0120] In an embodiment of the present disclosure, when the network connection between the first device and the second device stops, third information is sent to the second device, so that the second device can delete the stored first identifier and the network configuration connected to the first device based on the third information, thereby completely disconnecting the network connection between the first device and the second device and preventing the first identifier from occupying device storage space as a network configuration.

[0121] In the embodiment of the present disclosure, the first device may send a fourth message in an out-of-band data OOB manner, thereby determining a second device that can establish a network connection with the first device.

[0122] Figure 7 is a flow chart showing a method for establishing a network connection according to an exemplary embodiment. Figure 7 As shown, the network connection method is used in a terminal and includes the following steps.

[0123] In step S71, in response to the first device establishing a network connection with the second device.

[0124] In the implementation of the present disclosure, after it is determined that a network connection is established between the first device and the second device, the first device saves the first identifier and the network configuration corresponding to the first device.

[0125] In step S72, a fourth message is sent to the second device via an out-of-band data OOB manner.

[0126] The fourth message may enable the second device to save the network configuration based on the first identifier.

[0127] The fourth message includes a fourth type identifier, the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

[0128] In the disclosed embodiment, the first device sends a first identifier generated by the first device to the second device, so that the second device can save the network configuration for establishing a network connection with the first device in the second device based on the first identifier, thereby ensuring that in the entire P2P direct connection group, the network connection established between the first device and the second device corresponds to a unique identifier, so that when the device needs to restore the network connection, it can quickly and accurately obtain the network configuration required for the network connection based on the unique identifier, thereby quickly rebuilding the network connection between the devices.

[0129] In an embodiment of the present disclosure, the first device may be a GO terminal in a P2P direct connection group for providing a wireless network, and the second device may be a GC terminal in the P2P direct connection group for receiving a message sent by the GO terminal.

[0130] In the embodiment of the present disclosure, the second device can be used to receive different types of messages sent by the first device.

[0131] Figure 8 is a flow chart showing a network connection method based on a second device according to an exemplary embodiment. Figure 8 As shown, the network connection method is used in a terminal and includes the following steps.

[0132] In step S81, in response to the network connection between the first device and the second device being stopped, a third message sent by the first device in an out-of-band data OOB manner is received.

[0133] The third type identifier is used to identify a third message, the third message is used to disconnect the connected network, and the third message carries the first identifier.

[0134] In step S82, based on the first identifier in the third message, the network configuration corresponding to the first identifier is queried, and the first identifier and the network configuration are deleted.

[0135] In the implementation of the present disclosure, the second device receives the third message sent by the first device, determines based on the first identifier in the third message that the network configuration corresponding to the first identifier is needed, and deletes the network configuration corresponding to the first identifier.

[0136] In the disclosed embodiment, the second device, i.e., the GC end device in the P2P direct connection group, receives the third message sent by the first device, and determines the network configuration that needs to be deleted based on the first identifier in the third message, thereby deleting the network configuration corresponding to the first identifier and the first identifier, thereby avoiding the network configuration and the first identifier occupying the device storage space.

[0137] In an implementation of the present disclosure, the second device may store a network configuration of a network connection established with the first device based on the first identifier in a fourth message sent by the first device.

[0138] Fig. 9 is a flow chart showing a network connection method based on a second device according to an exemplary embodiment. Fig. 9 As shown, the network connection method is used in a terminal and includes the following steps.

[0139] In step S91, a fourth message sent by the first device in an out-of-band data OOB manner is received.

[0140] The fourth message includes a fourth type identifier, the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

[0141] In step S92, based on the first identifier in the fourth message, the network configuration is saved;

[0142] In the embodiment of the present disclosure, the second device may receive the fourth message sent by the first device, and save the first identifier as a network device corresponding to the first identifier, wherein the network configuration saved by the second device based on the first identifier may be different from the network configuration saved by the first device based on the first identifier.

[0143] In the embodiment of the present disclosure, the network configuration stored in the first device is used to restore the configuration information of the network connection on the first device side, and the network configuration stored in the second device is used to restore the configuration information of the network connection on the second device side.

[0144] In the embodiment of the present disclosure, the network configuration of the first device side and the network configuration of the second device side can be corresponded to the same identifier, so that the network device can quickly determine the network configuration of the first device and the network configuration of the second device under the same network connection based on the same identifier, and then can quickly restore the network connection between the devices.

[0145] In the embodiments of the present disclosure, the network connection method is described in conjunction with the following examples.

[0146] In the disclosed embodiment, Fig.10 is a schematic diagram showing a network connection method according to an exemplary embodiment. Fig.10 As shown, a WLAN direct connection is established between device 1 and device 2, wherein device 1 may be a GO end in a P2P group established based on the WLAN direct connection, and device 2 may be a GC end in a P2P group established based on the WLAN direct connection, wherein device 1 may provide a wireless connection for device 2. A P2P connection based on the WLAN direct connection between device 1 and device 2 may be established in the following manner.

[0147] In the implementation of the present disclosure, when device 1 detects a user's instruction to establish a WLAN direct connection, a message is sent, wherein the Z message can be sent to other devices in the form of a broadcast. Among them, the message between device 1 and device 2 can be sent and received through out-of-band data (OOB), for example, messages can be sent and received through Bluetooth, Bluetooth Low Energy (BLE), and Near Field Communication (NFC).

[0148] In the implementation of the present disclosure, when device 2 receives the Z message sent by device 1, it replies to device 1. Device 2 may send device information to device 1 as reply information to device 1, wherein the device information at least includes the device name of device 2 and various capability information required for P2P channel establishment negotiation, for example, the capability information may include information on whether device 2 supports database system (DBS), whether device 2 supports multiple-input multiple-output (MIMO) technology, and whether device 2 supports 160M bandwidth.

[0149] In the embodiment of the present disclosure, in device 1, the user can select the corresponding second device to establish a WLAN direct connection based on the device information replied by device 2. It can be understood that device 1 sends information in the form of broadcast, and there may be multiple devices 2 that reply to the Z information. The user selects based on the device information replied by different devices 2, thereby establishing a WLAN direct connection.

[0150] In the disclosed embodiment, after a WLAN direct connection is established between device 1 and device 2, device 1 determines the network configuration between the devices for establishing the WLAN direct connection based on the capabilities of the devices at both ends, wherein the network configuration includes at least the role, channel, service set identifier (SSID), address resolution protocol (ARP), and static Internet Protocol address (IP). And device 1 generates a unique identifier to represent the network and sends the identifier to device 2. The identifier may be a 32-bit Universally Unique Identifier (UUID). Device 2 receives the identifier sent by device 1.

[0151] In the embodiment of the present disclosure, when device 1 detects that the data flow in the WLAN direct link is less than the flow threshold for a first time, for example, the first time may be 10 minutes, a C message is sent to device 2, the network configuration is stored, and the connection with device 2 is disconnected. When device 2 receives the C message sent by device 1, it stores the corresponding WLAN direct network configuration and disconnects from device 1.

[0152] In the embodiment of the present disclosure, when device 1 detects a data transmission request, it sends a D message to device 2, and restores the network settings in device 1 according to the network configuration. The D message contains an identifier that uniquely corresponds to the network. Device 2 receives the D message sent by device 1, searches for the network configuration corresponding to the identifier based on the identifier in the D message, and restores the network configuration of device 2, thereby realizing rapid reconstruction of the network connection between device 1 and device 2.

[0153] Based on the same concept, an embodiment of the present disclosure also provides a network connection device.

[0154] It is understandable that the network connection device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0155] Fig.11is a block diagram of a network connection device according to an exemplary embodiment. Fig.11 The device 100 includes a first saving unit 101 and a recovery unit 102.

[0156] A first storage unit 101 is used for storing a network configuration of a network connected to the second device in response to the first device establishing a network connection with the second device;

[0157] The recovery unit 102 is used to respond to the first device disconnecting the network connected to the second device and detecting a data transmission request for requesting data transmission to the second device, and based on the saved network configuration, recover the network connection with the second device.

[0158] In one implementation, the first saving unit 101 saves the network configuration of the network connected to the second device in the following manner: generating a first identifier, wherein the first identifier is used to identify the network configuration of the network connected between the first device and the second device; and saving the first identifier and the network configuration.

[0159] In one embodiment, the recovery unit 102 restores the network connection with the second device based on the saved network configuration in the following manner: sending a first identifier to the second device or receiving a first identifier sent by the second device, wherein the second device queries the network configuration based on the first identifier; querying the network configuration based on the first identifier, and based on the network configuration, restoring the network connection corresponding to the network configuration with the second device.

[0160] In one embodiment, the recovery unit 102 sends the first identifier to the second device in the following manner: sending a first message to the second device or receiving a first message sent by the second device through an out-of-band data OOB method, the first message includes a first type identifier, the first type identifier is used to identify that the first message is used to restore the network connection, and the first message carries the first identifier.

[0161] In one embodiment, the recovery unit 102 is also used to: in response to detecting that the data transmission volume in the network connection established between the first device and the second device is less than the data transmission volume threshold within a first time, send a second message to the second device or receive a second message sent by the second device via an out-of-band data OOB method, the second message including a second type identifier, the second type identifier is used to identify that the second message is used to temporarily disconnect the connected network, and the second message carries the first identifier.

[0162] In one embodiment, the recovery unit 102 is also used to: in response to cessation of the network connection between the first device and the second device, send a third message to the second device via out-of-band data OOB, and delete the first identifier and the network configuration, the third message includes a third type identifier, the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier.

[0163] In one implementation, the first storage unit 101 establishes a network connection between the first device and the second device in the following manner: sending a fourth message to the second device in an out-of-band data OOB manner, wherein the fourth message is used to enable the second device to save the network configuration based on the first identifier;

[0164] The fourth message includes a fourth type identifier, where the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

[0165] Fig.12 is a block diagram of a network connection device according to an exemplary embodiment. Fig.12 The device includes a receiving unit 201 and a second storage unit 202.

[0166] A receiving unit 201, configured to respond to a second device receiving a first identifier sent by a first device, wherein the first identifier is used to identify a network configuration of a network connected between the first device and the second device;

[0167] The second storage unit 202 is used to store the first identifier and the network configuration.

[0168] In one embodiment, the receiving unit is also used for: in response to cessation of the network connection between the first device and the second device, and receiving a third message sent by the first device via out-of-band data OOB, the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier; based on the first identifier in the third message, querying the network configuration corresponding to the first identifier, and deleting the first identifier and the network configuration.

[0169] In one implementation, the second storage unit 202 is further configured to: in response to receiving a fourth message sent by the first device in an out-of-band data OOB manner, save the network configuration based on the first identifier in the fourth message;

[0170] The fourth message includes a fourth type identifier, where the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

[0171] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0172] Fig.13 1 is a block diagram of a device 300 for network connection according to an exemplary embodiment. For example, the device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0173] Reference Fig.13 , the device 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output (I / O) interface 312 , a sensor component 314 , and a communication component 316 .

[0174] The processing component 302 generally controls the overall operation of the device 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.

[0175] The memory 304 is configured to store various types of data to support operations on the device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0176] The power component 306 provides power to the various components of the device 300. The power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 300.

[0177] The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0178] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the device 300 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.

[0179] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0180] The sensor assembly 314 includes one or more sensors for providing various aspects of the status assessment of the device 300. For example, the sensor assembly 314 can detect the open / closed state of the device 300, the relative positioning of components, such as the display and keypad of the device 300, the sensor assembly 314 can also detect the position change of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the device 300. The sensor assembly 314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0181] The communication component 316 is configured to facilitate wired or wireless communication between the device 300 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0182] In an exemplary embodiment, the apparatus 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0183] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the instructions can be executed by the processor 320 of the device 300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0184] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0185] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0186] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.

[0187] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0188] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0189] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0190] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims

1. A network connection method, characterized in that: include: In response to the first device establishing a network connection with the second device, saving a network configuration of the network connected to the second device; In response to the first device disconnecting from the network connected to the second device and detecting a data transmission request for requesting data transmission to the second device, the network connection with the second device is restored based on the saved network configuration.

2. The network connection method according to claim 1, characterized in that: The saving of the network configuration of the network connected to the second device includes: generating a first identifier, wherein the first identifier is used to identify a network configuration of a network connected between the first device and the second device; The first identifier and the network configuration are saved.

3. The method according to claim 2, characterized in that The restoring the network connection with the second device based on the saved network configuration includes: sending the first identifier to the second device, so that the second device queries the network configuration based on the first identifier; The network configuration is queried based on the first identifier, and based on the network configuration, a network connection corresponding to the network configuration is restored with the second device.

4. The method according to claim 3, characterized in that The sending the first identifier to the second device includes: A first message is sent to the second device or a first message sent by the second device is received through an out-of-band data OOB method, wherein the first message includes a first type identifier, and the first type identifier is used to identify that the first message is used to restore a network connection, and the first message carries the first identifier.

5. The method according to claim 1, characterized in that: The method further comprises: In response to detecting that the amount of data transmission in the network connection established between the first device and the second device is less than a data transmission threshold within a first time, a second message is sent to the second device or a second message sent by the second device is received via an out-of-band data OOB method, wherein the second message includes a second type identifier, and the second type identifier is used to identify that the second message is used to temporarily disconnect the connected network, and the second message carries a first identifier.

6. The method according to claim 1, characterized in that The method further comprises: In response to cessation of the network connection between the first device and the second device, a third message is sent to the second device via out-of-band data OOB, and the first identifier and the network configuration are deleted. The third message includes a third type identifier, and the third type identifier is used to identify the third message. The third message is used to disconnect the connected network, and the first identifier is carried in the third message.

7. The method according to claim 1, characterized in that The first device establishes a network connection with the second device, including: Sending a fourth message to the second device in an out-of-band data OOB manner, where the fourth message is used to enable the second device to save the network configuration based on the first identifier; The fourth message includes a fourth type identifier, where the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

8. A network connection method, characterized in that: include: In response to stopping the network connection between the first device and the second device, and receiving a third message sent by the first device in an out-of-band data OOB manner, the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier; Based on the first identifier in the third message, a network configuration corresponding to the first identifier is queried, and the first identifier and the network configuration are deleted.

9. The method according to claim 8, characterized in that The method further comprises: In response to receiving a fourth message sent by the first device in an out-of-band data OOB manner, saving the network configuration based on a first identifier in the fourth message; The fourth message includes a fourth type identifier, where the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

10. A network connection device, characterized in that: include: A first storage unit, configured to, in response to the first device establishing a network connection with the second device, store a network configuration of the network connected to the second device; A recovery unit is used to respond to the first device disconnecting the network connected to the second device and detecting a data transmission request, wherein the data transmission request is used to request data transmission to the second device, and based on the saved network configuration, restore the network connection with the second device.

11. The network connection device according to claim 10, characterized in that: The first storage unit stores the network configuration of the network connected to the second device in the following manner: generating a first identifier, wherein the first identifier is used to identify a network configuration of a network connected between the first device and the second device; The first identifier and the network configuration are saved.

12. The device according to claim 11, characterized in that The recovery unit recovers the network connection with the second device based on the saved network configuration in the following manner: sending the first identifier to the second device, so that the second device queries the network configuration based on the first identifier; The network configuration is queried based on the first identifier, and based on the network configuration, a network connection corresponding to the network configuration is restored with the second device.

13. The device according to claim 12, characterized in that The recovery unit sends the first identifier to the second device in the following manner: A first message is sent to the second device or a first message sent by the second device is received through an out-of-band data OOB method, wherein the first message includes a first type identifier, and the first type identifier is used to identify that the first message is used to restore a network connection, and the first message carries the first identifier.

14. The device according to claim 10, characterized in that The recovery unit is also used for: In response to detecting that the amount of data transmission in the network connection established between the first device and the second device is less than a data transmission threshold within a first time, a second message is sent to the second device or a second message sent by the second device is received via an out-of-band data OOB method, wherein the second message includes a second type identifier, and the second type identifier is used to identify that the second message is used to temporarily disconnect the connected network, and the second message carries a first identifier.

15. The device according to claim 10, characterized in that The recovery unit is also used for: In response to cessation of the network connection between the first device and the second device, a third message is sent to the second device via out-of-band data OOB, and the first identifier and the network configuration are deleted. The third message includes a third type identifier, and the third type identifier is used to identify the third message. The third message is used to disconnect the connected network, and the first identifier is carried in the third message.

16. The device according to claim 10, characterized in that The first storage unit establishes a network connection between the first device and the second device in the following manner: Sending a fourth message to the second device in an out-of-band data OOB manner, where the fourth message is used to enable the second device to save the network configuration based on the first identifier; The fourth message includes a fourth type identifier, where the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

17. A network connection device, characterized in that: include: a receiving unit, configured to respond to the cessation of the network connection between the first device and the second device, and receive a third message sent by the first device in an out-of-band data OOB manner, wherein the third type identifier is used to identify the third message, the third message is used to disconnect the connected network, and the third message carries the first identifier; A deleting unit is used to query the network configuration corresponding to the first identifier based on the first identifier in the third message, and delete the first identifier and the network configuration.

18. The device according to claim 17, characterized in that The receiving unit is also used for: In response to receiving a fourth message sent by the first device in an out-of-band data OOB manner, saving the network configuration based on a first identifier in the fourth message; The fourth message includes a fourth type identifier, where the fourth type identifier is used to identify that the fourth message is used to enable the second device to save the network configuration based on the fourth message, and the fourth message carries the first identifier.

19. A network connection device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to: execute the network connection method described in any one of claims 1-7; or execute the network connection method described in any one of claims 8-9.

20. A storage medium, characterized in that: The storage medium stores instructions. When the instructions in the storage medium are executed by a processor of the terminal, the terminal is enabled to execute the method described in any one of claims 1 to 7; or the terminal is enabled to execute the method described in any one of claims 8 to 9.