A communication system, network repair method and device

By introducing a communication system into smart homes, using secure sessions to transmit network configuration information, electronic devices automatically switch AP mode and assist in repairing network connections, solving the complex problem of user manual reconnection and improving network repair efficiency and user experience.

CN116095673BActive Publication Date: 2025-01-07HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111306571.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-05
Publication Date
2025-01-07
Estimated Expiration
2041-11-05

AI Technical Summary

Technical Problem

In existing smart homes, after users modify the network configuration, the electronic devices are disconnected, and they need to manually perform network distribution mode and scan each device to reconnect to the network. The process is complicated and cumbersome, affecting the user experience.

Method used

Design a communication system to transmit network configuration information through a secure conversation between the routing device and the electronic device, realize the automatic switching of electronic devices to AP mode and assist other devices in repairing network connections, simplifying the network repair process.

Benefits of technology

It improves the efficiency and user experience of smart home network repair, simplifies the multi-device network reconnection process, and ensures the secure transmission of network configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116095673B_ABST
    Figure CN116095673B_ABST
Patent Text Reader

Abstract

The present application provides a communication system, a network repair method and a device. The communication system includes a routing device, a first electronic device and a second electronic device; the first electronic device is associated with the second electronic device. The first electronic device receives a first network repair instruction, and the first network repair instruction is used to instruct to switch to access point mode and assist other electronic devices associated with the first electronic device to repair the network connection. The first electronic device turns on the first access point according to the first network repair instruction, the second electronic device accesses the first access point, and the first electronic device establishes a secure session with the second electronic device. The first electronic device sends the network configuration information of the target network to the second electronic device through the secure session, and the second electronic device accesses the target network according to the network configuration information. While ensuring the security of transmitting network configuration information, the present application quickly and efficiently completes the network repair of smart devices throughout the house, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a communication system, a network repair method and a device. Background Art

[0002] With the popularization of broadband services, smart home, as a basic application of the Internet of Things (IoT) technology, has been widely promoted in scenarios such as life and entertainment, learning and office. In the smart home scenario, the client of the IoT application can be installed in the device used by the user, and the user's multiple electronic devices can be bound to the user account of the IoT application. The user can control multiple electronic devices through the IoT application, thereby realizing the intelligent linkage between the device used by the user and multiple electronic devices. For example, the user can issue a music playing instruction to the smart speaker through the IoT application to control the smart speaker to play music.

[0003] The connection between electronic devices and IoT applications generally uses wireless connection technologies such as wireless fidelity (Wi-Fi), Bluetooth, Zig-bee, etc. Among them, electronic devices that support the Wi-Fi protocol can connect to the Internet through the Internet protocol (IP) protocol to access the IoT smart home platform. The IoT smart home platform can interact with the client of the IoT application installed on the device used by the user, thereby realizing the interaction between the electronic device and the IoT application.

[0004] Multiple electronic devices can access the same Wi-Fi, so different electronic devices can send messages via Wi-Fi. However, when the user modifies the Wi-Fi network configuration of the routing device, the electronic device will be disconnected from the network, and the electronic device that the user sees on the IoT application may be offline.

[0005] Currently, when multiple electronic devices are disconnected from the network, users are required to trigger the multiple electronic devices to enter the network configuration mode separately in the IoT application, and scan the device network configuration access point (AP) through the IoT application to reconfigure the network so that the multiple electronic devices can reconnect to the network.

[0006] It can be seen that the current method of repairing the network connection of electronic equipment is relatively complicated. Summary of the invention

[0007] The present application provides a communication system, a network repair method and a device, which are used to provide a fast and efficient smart home network repair method, improve the network repair efficiency of the smart home, and thus improve the user experience.

[0008] In a first aspect, the present application provides a communication system, which includes a routing device, a first electronic device, and a second electronic device; the first electronic device is associated with the second electronic device. The routing device in the communication system is used to provide a wireless connection to a target network. The first electronic device receives a first network repair instruction, which is used to instruct the first electronic device to switch to access point AP mode and assist other electronic devices associated with the first electronic device to repair the network connection. The first electronic device turns on the first AP according to the first network repair instruction, the second electronic device accesses the first AP turned on by the first electronic device, and the first electronic device establishes a secure session with the second electronic device. The first electronic device sends network configuration information of the target network to the second electronic device through the secure session, and the second electronic device can access the target network according to the network configuration information, thereby repairing the network connection.

[0009] In this system, a first electronic device can open an access point for assisting other electronic devices to repair network connections, and other electronic devices associated with the first electronic device, such as a second electronic device, can access the first AP opened by the first electronic device, so that the first electronic device can establish a secure session with the second electronic device, and send network configuration information of the target network through the secure session. Compared with the method in which users manually repair the network connection of electronic devices one by one, the network repair method provided by the present application improves the network repair efficiency of electronic devices while ensuring the security of transmitting network configuration information, quickly and efficiently completes the network repair of electronic devices throughout the house, and improves the user experience.

[0010] In one possible design, the first electronic device is specifically used to: encrypt the network configuration information according to the first session key to obtain the first encrypted information, and send the first encrypted information to the second electronic device. The second electronic device is specifically used to: receive the first encrypted information, decrypt the first encrypted information according to the first session key, and obtain the network configuration information. The first session key is negotiated between the first electronic device and the second electronic device during the process of establishing a secure session.

[0011] Through this design, the first electronic device and the second electronic device can negotiate a first session key during the process of establishing a secure session. The first session key can be used to encrypt information exchanged between the first electronic device and the second electronic device. For example, the first session key can be used to encrypt network configuration information of the target network, thereby ensuring that the first electronic device and the second electronic device can perform secure encrypted communication.

[0012] In one possible design, the first network repair instruction includes configuration information of the first AP; the first electronic device is specifically used to: turn on the first AP according to the configuration information of the first AP in the first network repair instruction; or the first network repair instruction includes an identifier of the first AP; the first electronic device is specifically used to: determine the configuration information of the first AP stored in the first electronic device according to the identifier of the first AP in the first network repair instruction, and turn on the first AP according to the configuration information of the first AP.

[0013] Through this design, the first electronic device can turn on the first AP according to the configuration information of the first AP in the first network repair instruction, or the configuration information of the first AP is pre-stored in the first electronic device. The first electronic device determines the configuration information of the first AP according to the identifier of the first AP in the first network repair instruction and turns on the first AP, thereby flexibly enabling the first electronic device to turn on the access point that assists other electronic devices in repairing network connections.

[0014] In one possible design, the system further includes a third electronic device, the first electronic device is associated with the third electronic device, and a distance between the third electronic device and the second electronic device is less than or equal to a preset distance threshold;

[0015] The first electronic device is also used to: send a second network repair instruction to the second electronic device, the second network repair instruction is used to instruct the second electronic device to switch to AP mode and assist other electronic devices associated with the first electronic device to repair the network connection; receive request information from the third electronic device forwarded by the second electronic device, the request information is used to request to repair the network connection of the third electronic device; determine a second session key based on the request information; encrypt the network configuration information based on the second session key to obtain second encrypted information; and send the second encrypted information to the second electronic device.

[0016] The second electronic device is also used to: receive a second network repair instruction sent by the first electronic device, disconnect from the target network, and turn on the first AP according to the second network repair instruction; accept access to the first AP by a third electronic device; receive a request message sent by the third electronic device, and forward the request message to the first electronic device; receive a second encrypted message sent by the first electronic device, and forward the second encrypted message to the third electronic device.

[0017] The third electronic device is used to: access the first AP turned on by the second electronic device; send a request message to the second electronic device; receive the second encrypted information from the first electronic device forwarded by the second electronic device, and determine the second session key according to the second encrypted information; decrypt the second encrypted information according to the second session key to obtain network configuration information; and access the target network according to the network configuration information.

[0018] Through this design, when the communication system includes an electronic device that is outside the coverage of the first AP turned on by the first electronic device, the first electronic device can instruct the second electronic device to turn on the first AP and assist other electronic devices to repair the network connection. If the distance between the third electronic device and the second electronic device is less than the preset distance threshold, the second electronic device turns on the first AP according to the second network repair instruction, and the third electronic device accesses the first AP turned on by the second electronic device. The second electronic device can serve as a message forwarding device for the first electronic device and the third electronic device to help the first electronic device and the third electronic device transmit information. For example, the second electronic device sends the request information sent by the third electronic device to the first electronic device, and forwards the second encrypted information sent by the first electronic device to the third electronic device, thereby assisting the third electronic device to obtain the network configuration information of the target network to repair the network connection of the third electronic device. This solution solves the problem of network repair of electronic devices that are far away from the first electronic device, and further improves the network repair efficiency of electronic devices.

[0019] Optionally, the first electronic device can also instruct the third electronic device to turn on the first AP and assist other electronic devices to repair the network connection. For example, if the fourth electronic device is not located in the range covered by the first AP turned on by the first electronic device or the second electronic device, but the fourth electronic device is located in the range covered by the first AP turned on by the third electronic device, then the third electronic device can assist the first electronic device in repairing the network connection of the fourth electronic device. Similarly, the first electronic device can repair the electronic devices within the range of the first AP of the first electronic device, and then use the electronic devices whose network connections have been repaired to repair the network connections of peripheral devices layer by layer, thereby completing the network repair of all electronic devices in the house.

[0020] In one possible design, the second electronic device is specifically used to: access the target network according to the network configuration information and establish a secure session with the first electronic device; send a request message to the first electronic device through the secure session between the second electronic device and the first electronic device, and receive the second encrypted information sent by the first electronic device; or accept the first electronic device to access the first AP turned on by the second electronic device, send a request message to the first electronic device, and receive the second encrypted information sent by the first electronic device.

[0021] Through this design, when the second electronic device forwards a request message sent by a third electronic device to the first electronic device, or when the second electronic device receives the second encrypted information sent by the first electronic device, the second electronic device can access the target network and establish a secure session with the first electronic device for communication, and can also accept the first electronic device accessing the first AP opened by the second electronic device for communication, thereby flexibly realizing communication between the first electronic device and the second electronic device.

[0022] In one possible design, the first electronic device is also used to: before sending a second network repair instruction to the second electronic device, determine that the time length for which the first electronic device turns on the first AP is greater than a preset time threshold, and / or determine that at least one electronic device associated with the first electronic device has not repaired the network connection.

[0023] Through this design, if the first electronic device keeps turning on the first AP for longer than a preset time threshold, or the first electronic device determines that at least one electronic device associated with the first electronic device has not repaired the network connection, and the electronic device that has not repaired the network connection may be located in an area that cannot be covered by the first AP turned on by the first electronic device, the first electronic device can instruct the second electronic device to turn on the first AP and assist other electronic devices to repair the network connection, thereby preventing the first electronic device from turning on the first AP for a long time but failing to further repair other electronic devices, thereby further improving the efficiency of network repair.

[0024] In one possible design, the second network repair instruction includes a target number, which is used to indicate the number of electronic devices whose network connections are to be repaired; the second electronic device is also used to: determine that the time length for which the second electronic device turns on the first AP is greater than a preset time threshold, and / or, when it is determined that the number of electronic devices whose network connections have been repaired is the target number, turn off the first AP and access the target network according to the network configuration information.

[0025] Through this design, the first electronic device can carry the target number of electronic devices whose network connections need to be repaired in the second network repair instruction. When the second electronic device determines that the time for turning on the first AP is greater than a preset time threshold, or the number of electronic devices whose network connections have been repaired is the target number, it will promptly turn off the first AP and end the task of assisting in repairing the network connection, thereby preventing the second electronic device from turning on the first AP when there is no need to assist other electronic devices in repairing the network connection.

[0026] In one possible design, the first electronic device stores a device identification and authentication credentials of at least one electronic device associated with the first electronic device; the second session key is determined based on a first random number randomly generated by a third electronic device, a second random number randomly generated by the first electronic device, and the authentication credentials of the third electronic device.

[0027] Through this design, the first electronic device can store the device identification and authentication credentials of at least one electronic device associated with the first electronic device, so that when the first electronic device receives the request information from the third electronic device forwarded by the second electronic device, it can obtain the first random number generated by the third electronic device, and determine the authentication credentials of the third electronic device according to the device identification of the third electronic device. After the first electronic device randomly generates the second random number, it can determine the second session key according to the first random number, the second random number and the authentication credentials of the third electronic device, and carry the second random number in the second encrypted information, so that when the third electronic device receives the second encrypted information, it can also determine the second session key according to the first random number, the second random number and the authentication credentials of the third electronic device, thereby completing the key negotiation between the first electronic device and the third electronic device, and securely transmitting the network configuration information of the target network according to the second session key, ensuring the security of the electronic device repairing the network.

[0028] In one possible design, the first electronic device is also used to: determine that the second electronic device is connected to the target network and establish a secure session with the first electronic device, and then send the configuration information of the second AP to the second electronic device, and the configuration information of the second AP is used by the second electronic device to find an access point for assisting in repairing the network connection in the next network repair.

[0029] Through this design, when the first electronic device detects that the electronic device associated with the first electronic device is back online, it can randomly regenerate the configuration information of the AP for repairing the network, and send the regenerated AP configuration information to the electronic device that is back online, thereby updating the configuration of the AP for repairing the network and preventing security issues caused by long-term use of the same AP configuration.

[0030] In one possible design, the first electronic device is a home hub device.

[0031] In one possible design, the routing device is a device with routing functions, and the routing device includes a router.

[0032] In a second aspect, the present application provides a network repair method, which is applied to a first electronic device. The method includes: receiving a first network repair instruction; the first network repair instruction is used to instruct the first electronic device to switch to access point AP mode and assist other electronic devices associated with the first electronic device to repair network connections; turning on the first AP according to the first network repair instruction; accepting the second electronic device to access the first AP and establishing a secure session with the second electronic device; the first electronic device is associated with the second electronic device; sending network configuration information of the target network to the second electronic device through the secure session, so that the second electronic device can access the target network according to the network configuration information.

[0033] In one possible design, network configuration information of a target network is sent to a second electronic device via a secure session, including: encrypting the network configuration information according to a first session key to obtain first encrypted information, and sending the first encrypted information to the second electronic device; wherein the first session key is negotiated between the first electronic device and the second electronic device during the process of establishing the secure session.

[0034] In one possible design, the first repair network instruction includes configuration information of the first AP; turning on the first AP according to the first repair network instruction includes: turning on the first AP according to the configuration information of the first AP in the first repair network instruction; or the first repair network instruction includes an identifier of the first AP; turning on the first AP according to the first repair network instruction includes: determining the configuration information of the first AP stored in the first electronic device according to the identifier of the first AP in the first repair network instruction, and turning on the first AP according to the configuration information of the first AP.

[0035] In one possible design, the method also includes: sending a second network repair instruction to the second electronic device, the second network repair instruction is used to instruct the second electronic device to switch to AP mode and assist other electronic devices associated with the first electronic device to repair the network connection; receiving request information from the third electronic device forwarded by the second electronic device, the request information is used to request to repair the network connection of the third electronic device; the first electronic device is associated with the third electronic device, and the distance between the third electronic device and the second electronic device is less than or equal to a preset distance threshold; determining a second session key based on the request information; encrypting the network configuration information based on the second session key to obtain second encrypted information, and sending the second encrypted information to the second electronic device, so that the third electronic device can access the target network based on the second encrypted information forwarded by the second electronic device.

[0036] In one possible design, receiving the request information from the third electronic device forwarded by the second electronic device includes: receiving the request information sent by the second electronic device through a secure session between the first electronic device and the second electronic device; or accessing a first AP opened by the second electronic device to receive the request information sent by the second electronic device;

[0037] Sending the second encrypted information to the second electronic device includes: sending the second encrypted information to the second electronic device through a secure session between the first electronic device and the second electronic device; or accessing a first AP opened by the second electronic device to send the second encrypted information to the second electronic device;

[0038] The secure session between the first electronic device and the second electronic device is established after the second electronic device accesses the target network according to the network configuration.

[0039] In one possible design, before sending a second network repair instruction to the second electronic device, the method also includes: determining that the time length for which the first electronic device turns on the first AP is greater than a preset time threshold, and / or determining that at least one electronic device associated with the first electronic device has not repaired the network connection.

[0040] In one possible design, the second repair network instruction includes a target number, where the target number is used to indicate the number of electronic devices whose network connections are to be repaired.

[0041] In one possible design, the first electronic device stores a device identification and authentication credentials of at least one electronic device associated with the first electronic device; the second session key is determined based on a first random number randomly generated by a third electronic device, a second random number randomly generated by the first electronic device, and the authentication credentials of the third electronic device.

[0042] In one possible design, the method also includes: after determining that the second electronic device is connected to the target network and establishes a secure session with the first electronic device, sending the configuration information of the second AP to the second electronic device, and the configuration information of the second AP is used by the second electronic device to find an access point for assisting in repairing the network connection in the next network repair.

[0043] In one possible design, the first electronic device is a home hub device.

[0044] In a third aspect, the present application provides a network repair method, which is applied to a second electronic device. The method includes: accessing a first AP opened by a first electronic device, establishing a secure session with the first electronic device; associating the first electronic device with the second electronic device; the first AP is an access point opened by the first electronic device for assisting other electronic devices associated with the first electronic device to repair network connections; receiving network configuration information of a target network sent by the first electronic device through a secure session; and accessing the target network according to the network configuration information.

[0045] In one possible design, network configuration information of a target network sent by a first electronic device through a secure session is received, including: receiving first encrypted information sent by the first electronic device, decrypting the first encrypted information according to a first session key, and obtaining network configuration information; wherein the first session key is negotiated between the first electronic device and the second electronic device during the process of establishing a secure session.

[0046] In one possible design, the method also includes: receiving a second network repair instruction sent by the first electronic device, the second network repair instruction is used to instruct the second electronic device to switch to AP mode and assist other electronic devices associated with the first electronic device to repair the network connection; turning on the first AP according to the second network repair instruction; accepting the third electronic device to access the first AP; the third electronic device is associated with the first electronic device; receiving a request message sent by the third electronic device, the request message is used to request to repair the network connection of the third electronic device; forwarding the request message to the first electronic device; receiving a second encrypted message sent by the first electronic device, forwarding the second encrypted message to the third electronic device, so that the third electronic device obtains the network configuration information in the second encrypted message, and accesses the target network according to the network configuration information; wherein the second encrypted information is obtained by the first electronic device encrypting the network configuration information according to the second session key.

[0047] In one possible design, forwarding the request information to the first electronic device includes: accessing the target network according to the network configuration information and establishing a secure session with the first electronic device; sending the request information to the first electronic device through the secure session between the second electronic device and the first electronic device; or accepting the first electronic device accessing the first AP opened by the second electronic device, and sending the request information to the first electronic device.

[0048] Receiving the second encrypted information sent by the first electronic device includes: accessing the target network according to the network configuration information and establishing a secure session with the first electronic device; receiving the second encrypted information sent by the first electronic device through the secure session between the second electronic device and the first electronic device; or accepting the first electronic device accessing the first AP opened by the second electronic device and receiving the second encrypted information sent by the first electronic device.

[0049] In one possible design, the second network repair instruction includes a target number, which is used to indicate the number of electronic devices whose network connections are to be repaired; the method also includes: determining that the time length for which the second electronic device turns on the first AP is greater than a preset time threshold, and / or, when determining that the number of electronic devices whose network connections have been repaired is the target number, turning off the first AP and accessing the target network according to the network configuration information.

[0050] In one possible design, the first electronic device stores a device identification and authentication credentials of at least one electronic device associated with the first electronic device; the second session key is determined based on a first random number randomly generated by a third electronic device, a second random number randomly generated by the first electronic device, and the authentication credentials of the third electronic device.

[0051] In one possible design, after accessing the target network according to the network configuration information, the method also includes: establishing a secure session with the first electronic device, receiving configuration information of a second AP sent by the first electronic device, and the configuration information of the second AP is used by the second electronic device to find an access point for assisting in repairing the network connection in the next network repair.

[0052] In a fourth aspect, the present application provides an electronic device. The electronic device includes multiple functional modules; the multiple functional modules interact with each other to implement the method in the second aspect or the third aspect and each embodiment thereof. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on the specific implementation.

[0053] In a fifth aspect, the present application provides an electronic device, comprising at least one processor and at least one memory. The at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the method executed by the storage device in the second aspect or the third aspect and each embodiment thereof.

[0054] In a sixth aspect, the present application further provides a computer program. When the computer program is run on a computer, the computer is enabled to execute the method in any one of the above aspects and in each of its embodiments.

[0055] In a seventh aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the computer executes the method in any one of the above aspects and its respective embodiments.

[0056] In an eighth aspect, the present application further provides a chip, which is used to read a computer program stored in a memory and execute a method in any one of the above aspects and its various embodiments.

[0057] In a ninth aspect, the present application also provides a chip system. The chip system includes a processor for supporting a computer device to implement any of the above aspects and methods in each of its embodiments. In a possible design, the chip system also includes a memory for storing programs and data necessary for the computer device. The chip system may be composed of a chip, or may include a chip and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A schematic diagram of a smart home scenario provided in an embodiment of the present application;

[0059] Figure 2 A schematic diagram of a user manually repairing a network connection of an electronic device;

[0060] Figure 3A schematic diagram of a communication system provided in an embodiment of the present application;

[0061] Figure 4 A flowchart of a network repair method provided in an embodiment of the present application;

[0062] Figure 5 A schematic diagram of a method for establishing a secure session between a first electronic device and a second electronic device provided in an embodiment of the present application;

[0063] Figure 6 A schematic diagram of the positions of a first electronic device, a second electronic device, and a third electronic device provided in an embodiment of the present application;

[0064] Figure 7 A schematic diagram of a network repair scenario applicable to an embodiment of the present application;

[0065] Figure 8 A flowchart of a network repair method provided in an embodiment of the present application;

[0066] Fig. 9 A flowchart of a network repair method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The Internet of Things (IoT), which can be understood as "the Internet of Everything Connected", is a network extended and expanded on the basis of the Internet. It is a huge network formed by combining various information sensing devices with the network. It can realize the interconnection of people, machines and things at any time and any place.

[0068] Smart home is the basic application of the Internet of Things in the home. With the popularization of broadband services, smart products involve all aspects of users' lives. Figure 1 A schematic diagram of a smart home scenario provided in an embodiment of the present application. Figure 1 The scenario includes a routing device, a home hub device, at least one electronic device, and a device used by a user. The home hub device and at least one electronic device can be connected to the routing device to establish a network connection.

[0069] The routing device may be a device with routing function, such as a router. The electronic device may be a smart home device, such as a smart doorbell, smart door lock, refrigerator, washing machine, smart speaker, smart TV and other IoT devices. The home hub device may integrate home business services to control at least one electronic device in the smart home scene. The home hub device may be a long-term electrical device that resides in the home, such as a smart speaker, smart TV, smart routing device, set-top box and other devices.

[0070] exist Figure 1In the scenario shown, an IoT application can be installed on the device used by the user, and at least one electronic device can be bound to a user account in the IoT application. The user can operate the IoT application to configure the network for at least one electronic device. When the electronic device is bound to the user account and the network configuration is completed, the user can view the status of the electronic device and other information in the IoT application, and the user can control the electronic device through the IoT application. For example, after the smart speaker is bound to the user account and the network configuration is completed, the user can view the status of the smart speaker as "online" in the IoT application, and the user can click on the shortcut command entry in the IoT application. The device used by the user responds to the operation triggered by the user and sends a control instruction to the smart speaker, such as controlling the smart speaker to play music.

[0071] The IoT application installed on the device used by the user can be the client of the IoT application. Many electronic device manufacturers or IoT solution providers also provide smart home server platforms or IoT cloud servers. The IoT cloud server can obtain information about electronic devices bound to the user account from the IoT application client installed on the device used by the user, thereby performing data analysis and management on multiple electronic devices.

[0072] In some scenarios, the IoT application can synchronize the device identification, authentication credentials and other information of at least one electronic device bound to the user account to the home hub device. Among them, the authentication credentials of the electronic device are the information obtained by the IoT application for establishing a secure session with the electronic device. After the home hub device receives the device identification, authentication credentials and other information of at least one electronic device, it can be considered that the home hub device is associated with at least one electronic device. At this time, at least one electronic device can connect to the IoT application or IoT cloud server through the home hub device agent, and then connect to the home hub device through convergence to achieve unified control, unified data analysis, cross-device intelligent linkage and other services. Optionally, the home hub device can act as a control device to control the operation of at least one electronic device, or it can act as a controlled device to accept the control of the IoT application.

[0073] Figure 1 The smart home scenario shown can be realized through two methods: pre-installation and post-installation. Post-installation means that the user first decorates the house, and then purchases electronic devices and binds them to his own user account; pre-installation means that the IoT solution provider cooperates with the real estate company to complete the installation and commissioning of the electronic equipment during the decoration stage when the real estate project is delivered to the final residents. After the user moves in, the electronic equipment can be directly bound to his own user account.

[0074] refer to Figure 1, the home hub device and at least one electronic device can access the routing device to establish a network connection. At this time, the home hub device and at least one electronic device are connected to the same wireless local area network, and the home hub device can interact with at least one electronic device. In some cases, the user may modify the configuration information of the current network. For example, when pre-installing the whole house intelligence, the decorator may have set up the network of the home routing device. For example, the decorator has set up the network name and password. After the user receives the house, the network configuration information will generally be changed for security reasons; or during daily use, the user may also modify the network configuration information. When the user modifies the network configuration information, the home hub device and at least one electronic device will disconnect from the network, and the status of each device viewed by the user on the IoT application is, for example, "not online". At this time, the user cannot control each device through the IoT application.

[0075] Currently, when a home hub device and at least one electronic device lose network connection, the user is required to manually repair the network connection of each device through the IoT application. Figure 2 A schematic diagram of a user manually repairing the network connection of an electronic device. Figure 2 , after the user modifies the network configuration information, electronic device A, electronic device B, and electronic device C are all disconnected from the network. The user needs to repair the network connections of electronic device A, electronic device B, and electronic device C respectively. Taking the example of a user manually repairing the network connection of electronic device A, the user can press the network configuration button of electronic device A to trigger electronic device A to enter the network configuration mode, or after electronic device A is disconnected from the network, if it fails to reconnect to Wi-Fi, it will automatically enter the network configuration mode. After electronic device A enters the network configuration mode, the user can scan the device in the IoT application, select electronic device A from the device list obtained by the scanned device, and configure the network for electronic device A. Similarly, the user also needs to manually configure the network for electronic device B and electronic device C to repair the network connection of multiple electronic devices.

[0076] It can be seen that the current method of repairing the network connection of electronic devices is relatively complicated, requiring users to manually repair the network connections of multiple devices, which is cumbersome to operate and has a poor user experience.

[0077] Based on the above problems, an embodiment of the present application provides a network repair method, in which after the user manually repairs the network connection of the home hub device, the home hub device can be triggered to perform network repair for other electronic devices. The home hub device can establish a secure session with other electronic devices and send network configuration information to other electronic devices through the secure session to assist other electronic devices in repairing the network connection.

[0078] Figure 3 A schematic diagram of a communication system provided in an embodiment of the present application, referring to Figure 3 The system includes a routing device, a first electronic device, and a second electronic device. The first electronic device may be a home hub device, the first electronic device stores an identifier of at least one electronic device associated with the first electronic device, and the second electronic device is an electronic device associated with the first electronic device. Optionally, the embodiment of the present application does not limit the number of second electronic devices, and there may be only one or more second electronic devices. For example, Figure 3 In the example, the system includes three second electronic devices. Figure 3 The communication system shown may further include a third electronic device, which is associated with the first electronic device and is physically far away from the first electronic device.

[0079] Optionally, when the coverage of a single routing device cannot meet the network connection requirements of all electronic devices in the house, sub-routers can be set up to expand the coverage of the Wi-Fi network.

[0080] Combine the following Figure 3 The communication system shown introduces the network repair method provided in the embodiment of the present application. Figure 4 A flowchart of a network repair method provided in an embodiment of the present application, wherein the second electronic device can be Figure 3 Any second electronic device shown. Figure 4 , the method comprises the following steps:

[0081] S401: The first electronic device turns on the first AP in response to the first network repair instruction.

[0082] After the user modifies the network configuration information of the target network, the network connection of the first electronic device can be manually repaired. After the first electronic device is reconnected to the routing device, the user can trigger a first network repair instruction for instructing the first electronic device to switch to AP mode to repair the network connection of other electronic devices. The first electronic device responds to the first network repair instruction and determines that there is currently an electronic device associated with the first electronic device that is not online, then the first electronic device switches to AP mode and turns on the first AP.

[0083] In an optional implementation, the first network repair instruction may include configuration information of the first AP, and the configuration information of the first AP may include an identifier and a password of the first AP. After receiving the first network repair instruction, the first electronic device may turn on the first AP according to the configuration information of the first AP in the first network repair instruction.

[0084] In another optional implementation, the first network repair instruction may include an identifier of the first AP. After receiving the first network repair instruction, the first electronic device may determine the configuration information of the first AP stored in the first electronic device according to the identifier of the first AP in the first network repair instruction, and turn on the first AP according to the configuration information of the first AP.

[0085] The switching of the first electronic device to the AP mode indicates that the first electronic device can now accept access from other devices as the first AP. Optionally, the configuration information of the first AP can be randomly generated in advance by the first electronic device, and after the first electronic device randomly generates the configuration information of the first AP, it sends the configuration information of the first AP to at least one online electronic device associated with the first electronic device through a secure session.

[0086] It should be noted that the electronic device being online may mean that the electronic device has been connected to a network and a secure session has been established between the electronic device and the first electronic device.

[0087] S402: The second electronic device accesses the first AP turned on by the first electronic device.

[0088] The second electronic device is an electronic device associated with the first electronic device. After the second electronic device is disconnected from the network, it can periodically try to reconnect to the target network. Since the network configuration information of the target network has changed at this time, the second electronic device cannot reconnect to the network based on the invalid network configuration information. The second electronic device can access the first AP based on the stored first AP configuration information, wherein the configuration information of the first AP can be received by the second electronic device from the first electronic device when it was last online.

[0089] Optionally, after determining that the network connection is disconnected, the second electronic device can periodically reconnect to the last connected wireless network and can periodically connect to the first AP, thereby continuously trying to reconnect to the last connected wireless network, while continuously trying to access the first AP used to assist the second electronic device in repairing the network, thereby improving the efficiency of the second electronic device in reconnecting to the network.

[0090] S403: The first electronic device establishes a secure session with the second electronic device.

[0091] For example, Figure 5A schematic diagram of a method for establishing a secure session between a first electronic device and a second electronic device provided in an embodiment of the present application. According to the foregoing introduction, the second electronic device is an electronic device associated with the first electronic device, and the device identification and authentication credentials of the second electronic device can be stored in the first electronic device and the second electronic device. Among them, the authentication credentials of the second electronic device stored in the second electronic device can be generated and sent to the second electronic device by the IoT application when the second electronic device is bound to the user account, and the authentication credentials of the second electronic device stored in the first electronic device can be sent to the first electronic device by the IoT application. Reference Figure 5 The method for establishing a secure session between a first electronic device and a second electronic device comprises the following steps:

[0092] S501: A first electronic device sends a multicast signal, and a second electronic device receives the multicast signal of the first electronic device.

[0093] S502: The second electronic device sends a device identification of the second electronic device to the first electronic device.

[0094] S503: The first electronic device determines, according to the received device identification of the second electronic device, that the second electronic device is a device associated with the first electronic device.

[0095] S504: The first electronic device generates a random number RN1.

[0096] S505: The first electronic device sends RN1 to the second electronic device.

[0097] S506: The second electronic device generates a random number RN2, and determines a first session key according to the authentication credential of the second electronic device, RN1, and RN2.

[0098] For example, the first session key and the authentication credential of the second electronic device, RN1 and RN2 may satisfy the following formula:

[0099] KEY1=AuthCode2+RN1+RN2

[0100] Among them, KEY1 is the first session key, and AuthCode2 is the authentication credential of the second electronic device.

[0101] S507: The second electronic device sends RN2 to the first electronic device.

[0102] S508: The first electronic device determines a first session key according to the authentication credentials of the second electronic device, RN1 and RN2.

[0103] S509: The first electronic device and the second electronic device perform encrypted communication according to the first session key.

[0104] For example, the first electronic device may encrypt a control instruction using the first session key and send the encrypted control instruction to the second electronic device. For another example, the second electronic device may encrypt a sensor event using the first session key and report the encrypted sensor event to the first electronic device.

[0105] S404: The first electronic device sends the network configuration information of the target network to the second electronic device through a secure session.

[0106] In an optional implementation, after the first electronic device establishes a secure session with the second electronic device, the first electronic device may use the first session key to encrypt the network configuration information of the target network to obtain first encrypted information, and send the first encrypted information to the second electronic device. After obtaining the first encrypted information, the second electronic device may decrypt the first encrypted information according to the first session key to obtain the network configuration information.

[0107] In this way, the security of the transmission of network configuration information from the first electronic device to the second electronic device can be guaranteed.

[0108] S405: The second electronic device accesses the target network according to the network configuration information.

[0109] Optionally, the network configuration information may include a network identifier and a password. The network identifier may be, for example, a service set identifier (SSID). After acquiring the network configuration information, the second electronic device scans the network, determines the target network corresponding to the network identifier from the currently scannable networks, and connects to the target network according to the password in the network configuration information, thereby reestablishing the network connection.

[0110] Furthermore, Figure 3 The communication system shown may also include a third electronic device. The third electronic device is an electronic device associated with the first electronic device, and the distance between the third electronic device and the second electronic device is less than or equal to a preset distance threshold. The third electronic device may be an IoT device that cannot be connected to the first AP, such as when the third electronic device is set at a location that is physically far away from the first electronic device. At this time, the third electronic device is not within the coverage of the first AP turned on by the first electronic device, but the distance between the third electronic device and the second electronic device is less than or equal to the preset distance threshold, wherein the preset distance threshold may be the range that can be covered by the first AP turned on by the second electronic device. In other words, the third electronic device is within the coverage of the first AP turned on by the second electronic device. The embodiment of the present application does not limit the number of third electronic devices, and there may be only one or more third electronic devices. For example, Figure 3 The example in which the system includes two third electronic devices is shown.

[0111] The third electronic device is associated with the first electronic device, and the first electronic device and the third electronic device store the device identification and authentication credentials of the third electronic device. The authentication credentials of the third electronic device stored in the third electronic device may be generated and sent to the third electronic device by the IoT application when the third electronic device is bound to the user account, and the authentication credentials of the third electronic device stored in the first electronic device may be sent to the first electronic device by the IoT application.

[0112] In some embodiments of the present application, when the first electronic device turns on the first AP for a time period greater than or equal to a preset time threshold and determines that there are still electronic devices that are not online, the first electronic device can send a second network repair instruction to the second electronic device that is online, so that the second electronic device that is online assists other electronic devices that are not online to repair the network connection.

[0113] In an optional implementation, since the time length of the first electronic device turning on the first AP is greater than the preset time threshold, it can be considered that the electronic device whose network has not been repaired may be an electronic device that is not covered by the first AP, such as a third electronic device. At this time, the first electronic device sends a second network repair instruction to the second electronic device. The second network repair instruction is used to instruct the second electronic device to start the first AP to assist in repairing the network connection of the electronic device within the coverage of the first AP of the second electronic device. For example, when the third electronic device is within the coverage of the first AP of the second electronic device, the second electronic device can assist in repairing the network connection of the third electronic device.

[0114] It is understandable that the second electronic device stores the configuration information of the first AP. Since the electronic devices are placed in different locations or can be moved, after the second electronic device turns on the first AP, the range that the first AP turned on by the second electronic device can cover is different from the range covered by the first AP of the first electronic device. When the third electronic device is within the range covered by the first AP of the second electronic device, the third electronic device can connect to the first AP of the second electronic device. For example, Figure 6 A schematic diagram of the positions of a first electronic device, a second electronic device, and a third electronic device provided in an embodiment of the present application. Figure 6 , the second electronic device is located in the coverage of the first AP of the first electronic device, and the third electronic device is not located in the coverage of the first AP of the first electronic device. When the second electronic device turns on the first AP, the third electronic device is located in the first AP of the second electronic device. For ease of explanation, Figure 6 A first electronic device, a second electronic device and a third electronic device are used as examples. Of course, there may be more devices in actual implementation. For specific implementation, please refer to the above embodiments, which will not be described in detail.

[0115] It should be noted that the first electronic device stores the device identification of the electronic devices associated with the first electronic device, such as the first electronic device stores the device identification of the second electronic device and the device identification of the third electronic device, but the second electronic device does not store the device identification of the third electronic device. Therefore, after the second electronic device turns on the first AP, it can serve as a message forwarding device for the first electronic device and the third electronic device to assist the first electronic device in repairing the network connection of the third electronic device.

[0116] In an optional implementation, the second electronic device can assist the first electronic device and the third electronic device in establishing a secure session. Specifically, after the second electronic device turns on the first AP, the third electronic device is connected to the first AP of the second electronic device. The third electronic device sends a request message to the second electronic device, and the request message can be used to request to repair the network connection of the third electronic device. Optionally, the request message may include a device identifier and a random number RN3 of the third electronic device. After receiving the request message, the second electronic device forwards the request message to the first electronic device. After the first electronic device determines that the third electronic device is an electronic device associated with the first electronic device according to the device identifier of the third electronic device in the request message, it determines the authentication credentials of the third electronic device according to the device identifier of the third electronic device, and generates a random number RN4. The first electronic device generates a second session key according to the authentication credentials, RN3 and RN4 of the third electronic device. The first electronic device encrypts the network configuration information according to the second session key to obtain the second encrypted information. Among them, the second encrypted information may include the encrypted network configuration information and RN4. The first electronic device sends the encrypted information to the second electronic device, the second electronic device forwards the second encrypted information to the third electronic device, the third electronic device generates a second session key according to the authentication credentials, RN3 and RN4 of the third electronic device, and decrypts the encrypted network configuration information according to the second session key to obtain the network configuration information. The third electronic device can access the target network according to the network configuration information to re-establish the network connection.

[0117] After receiving the request information, the second electronic device is in AP mode at this time, so no session is established between the first electronic device and the second electronic device. The second electronic device needs to turn off the AP mode, reconnect to the network according to the network configuration information, establish a secure session with the first electronic device, and then send the request information to the first electronic device; or, when the first electronic device is in the coverage of the first AP of the second electronic device, the first electronic device can be connected to the first AP of the second electronic device as a station (STA), and the second electronic device can send the request information to the first electronic device.

[0118] Optionally, the second network repair instruction sent by the first electronic device to the second electronic device may include the number of electronic devices whose network connections are to be repaired. For example, if the first electronic device determines that 4 of the 10 electronic devices associated with the first electronic device are not online, the number of electronic devices whose network connections are to be repaired in the second network repair instruction may be 4. After the second electronic device receives the second network repair instruction and turns on the first AP, if the second electronic device determines that it has assisted in repairing the network connections of the 4 electronic devices, then the second electronic device can turn off the first AP and reconnect to the routing device to end the task of assisting in repairing the network connection. Alternatively, after the second electronic device determines that the time length for turning on the first AP is greater than a preset time threshold, it can also turn off the first AP and reconnect to the routing device. At this time, the electronic device that the second electronic device fails to assist in repairing the network connection may not be within the coverage range of the first AP of the second electronic device, then the second electronic device can turn off the first AP to end the task of assisting in repairing the network connection.

[0119] In some embodiments, when the first electronic device detects a newly online electronic device, it can send the configuration information of the second AP to the electronic device through a secure session. When the electronic device is disconnected from the network next time, it can find the second AP according to the configuration information of the second AP and access the second AP to complete network repair. Through this method, the configuration information of the AP used in each network repair can be updated to prevent security problems caused by long-term use of the same AP.

[0120] It is understandable that the first electronic device repairs the network connection of the second electronic device, and the second electronic device assists in repairing the network connection of the third electronic device, which can be regarded as two rounds of network connection repair, which is only an example of the network repair method provided in the embodiment of the present application and is not limited. In a specific implementation, the network repair process may have more or fewer repair rounds. For example, Figure 7This is a schematic diagram of a network repair scenario applicable to an embodiment of the present application. In this scenario, the second electronic device is within the coverage of the first AP of the first electronic device. The first round of network repair can be that the first electronic device can directly repair the network connection of the second electronic device according to the method shown in the above embodiment. The third electronic device is not within the coverage of the first AP of the first electronic device, and the third electronic device is located in the first AP of the second electronic device. In this case, the second round of network repair can be that the second electronic device assists the first electronic device in repairing the network connection of the third electronic device. The fourth electronic device is not within the coverage of the first AP of the first electronic device or the second electronic device, but the fourth electronic device is within the coverage of the first AP of the third electronic device. In this case, the third round of network repair can be that the third electronic device assists the first electronic device in repairing the network connection of the fourth electronic device. By analogy, the first electronic device can repair the electronic device within the range of the first AP of the first electronic device, and then repair the network connection of the peripheral devices layer by layer outward with the help of the electronic device whose network connection has been repaired, thereby completing the network repair of all the electronic devices in the house.

[0121] The network repair method provided by the embodiment of the present application is further introduced with several examples below:

[0122] Example 1

[0123] Figure 8 A flowchart of a network repair method provided in an embodiment of the present application, which can be applied to Figure 3 The communication system shown. Figure 8 , the method comprises the following steps:

[0124] S801: The first electronic device, the second electronic device, and the third electronic device are connected to a routing device.

[0125] S802: The first electronic device establishes a secure session with the second electronic device, and the first electronic device establishes a secure session with the third electronic device.

[0126] S803: The first electronic device randomly generates configuration information of the first AP.

[0127] S804: The first electronic device sends the configuration information of the first AP to the second electronic device and the third electronic device.

[0128] S805: The user modifies the network configuration information of the target network of the routing device.

[0129] For example, the user changes the SSID and password of the Wi-Fi network of the routing device.

[0130] After the user modifies the configuration information of the network of the routing device, all electronic devices are disconnected from the target network.

[0131] S806: The user manually repairs the network connection of the first electronic device, and the first electronic device reconnects to the target network.

[0132] S807: The first electronic device disconnects from the target network and turns on the first AP in response to the first network repair instruction triggered by the user.

[0133] S808: The second electronic device scans the first AP of the first electronic device, and accesses the first AP turned on by the first electronic device according to the saved configuration information of the first AP.

[0134] S809: The first electronic device establishes a secure session with the second electronic device.

[0135] S810: The first electronic device sends network configuration information of the target network to the second electronic device through a secure session.

[0136] In an optional implementation, the first electronic device and the second electronic device may negotiate a first session key, the first electronic device encrypts the network configuration information according to the first session key, and sends the encrypted network configuration information to the second electronic device. After receiving the encrypted network configuration information, the second electronic device decrypts the encrypted network configuration information according to the first session key to obtain the network configuration information.

[0137] S811: The second electronic device reconnects to the routing device to access the target network according to the acquired network configuration information to repair the network connection.

[0138] S812: The first electronic device establishes a secure session with the second electronic device.

[0139] It should be noted that in S809 and S812, the first electronic device and the second electronic device can establish a secure session in the same manner, but in S809 and S812, since the first electronic device and the second electronic device randomly generate different random numbers in the process of negotiating the session key, the session keys negotiated by the first electronic device and the second electronic device are different. It can be seen that the session key used by the first electronic device and the second electronic device in a round of conversation is not permanently valid. When the first electronic device and the second electronic device establish a new round of secure conversation again, the two devices will renegotiate a new session key to ensure the security of the conversation.

[0140] S813: The first electronic device randomly generates configuration information of the second AP.

[0141] S814: The first electronic device sends the configuration information of the second AP to the second electronic device.

[0142] S815: The second electronic device saves configuration information of the second AP.

[0143] Through S813-S815, when the first electronic device detects that the electronic device associated with the first electronic device is back online, it can randomly regenerate the configuration information of the AP for repairing the network, and send the regenerated AP configuration information to the electronic device that is back online, thereby updating the configuration of the AP for repairing the network and preventing security issues caused by long-term use of the same AP configuration.

[0144] In another optional implementation, the first electronic device may also periodically update the configuration information of the AP used to repair the network, so as to further ensure the security of the network repair function.

[0145] S816: The first electronic device determines that the duration of opening the first AP is greater than a preset time threshold, and the first electronic device determines that there are still devices that are not online.

[0146] S817: The first electronic device sends a second network repair instruction to the second electronic device.

[0147] Optionally, the second network repair instruction sent by the first electronic device to the second electronic device is used to instruct the second electronic device to turn on the first AP to assist other electronic devices in repairing network connections.

[0148] S818: The second electronic device switches to AP mode and turns on the first AP.

[0149] It is understandable that after the second electronic device switches to the AP mode, the connection between the second electronic device and the routing device will be disconnected, that is, the second electronic device is disconnected from the network.

[0150] S819: The third electronic device scans the first AP of the second electronic device, and accesses the first AP of the second electronic device according to the saved configuration information of the first AP.

[0151] S820: The third electronic device sends a device identification of the third electronic device and a first random number to the second electronic device.

[0152] S821: The second electronic device reconnects to the routing device to access the target network according to the network configuration information.

[0153] S822: The first electronic device establishes a secure session with the second electronic device.

[0154] S823: The second electronic device sends the device identification of the third electronic device and the first random number to the first electronic device.

[0155] S824: The first electronic device determines, based on the identifier of the third electronic device, that the third electronic device is a device associated with the first electronic device, and determines a second session key based on the authentication credentials of the third electronic device, the first random number, and the second random number.

[0156] The second random number is randomly generated by the first electronic device.

[0157] Optionally, the first electronic device pre-saves the device identification and authentication credentials of at least one electronic device associated with the first electronic device; after obtaining the device identification of the third electronic device, the first electronic device determines the authentication credentials of the third electronic device based on the device identification of the third electronic device.

[0158] S825: The first electronic device encrypts the network configuration information according to the second session key.

[0159] S826: The first electronic device sends the encrypted network configuration information and the second random number to the second electronic device.

[0160] S827: The second electronic device switches to AP mode and turns on the first AP.

[0161] S828: The third electronic device scans the first AP of the second electronic device, and accesses the first AP turned on by the second electronic device according to the saved configuration information of the first AP.

[0162] S829: The second electronic device sends the encrypted network configuration information and the second random number to the third electronic device.

[0163] S830: The third electronic device determines a second session key according to the authentication credentials of the third electronic device, the first random number and the second random number, and decrypts the encrypted network configuration information according to the second session key to obtain the network configuration information.

[0164] S831: The second electronic device and the third electronic device reconnect to the routing device to access the target network according to the acquired network configuration information to repair the network connection.

[0165] S832: The second electronic device and the third electronic device respectively establish a secure session with the first electronic device.

[0166] Optionally, similar to S814-S815, after detecting that the third electronic device has completed network repair and is online, the first electronic device may send the configuration information of the second AP to the third electronic device.

[0167] Through the network repair method shown in this example, after the first electronic device re-establishes the network connection, it can turn on the first AP and repair the network connection of the second electronic device connected to the first AP. For a third electronic device that is not within the coverage of the first AP, it can access the first AP turned on by the second electronic device to obtain network configuration information for repairing the network connection from the first electronic device with the assistance of the second electronic device. Since the second electronic device has obtained the network configuration information before assisting the third electronic device in repairing the network connection, when forwarding the message of the third electronic device, the second electronic device can access the routing device to connect to the network according to the obtained network configuration information, and forward the message after establishing a secure session with the first electronic device to ensure the security of the network repair process. At the same time, when the second electronic device assists the third electronic device in repairing the network connection, the first electronic device can generate a session key based on the randomly generated random number and the authentication credentials of the third electronic device to encrypt the network configuration information to prevent other devices from impersonating the home hub device to modify the network configuration of the third electronic device.

[0168] Example 2

[0169] Fig. 9 A flowchart of a network repair method provided in an embodiment of the present application, which can be applied to Figure 3 The communication system shown. Fig. 9 In the example 2 shown, the first electronic device is located within the coverage of the first AP of the second electronic device. Fig. 9 , the method comprises the following steps:

[0170] S901: The first electronic device, the second electronic device, and the third electronic device are connected to a routing device.

[0171] S902: The first electronic device establishes a secure session with the second electronic device, and the first electronic device establishes a secure session with the third electronic device.

[0172] S903: The first electronic device randomly generates configuration information of the first AP.

[0173] S904: The first electronic device sends the configuration information of the first AP to the second electronic device and the third electronic device.

[0174] S905: The user modifies the network configuration information of the target network of the routing device.

[0175] For example, the user changes the SSID and password of the Wi-Fi network of the routing device.

[0176] After the user modifies the configuration information of the network of the routing device, all electronic devices are disconnected from the target network.

[0177] S906: The user manually repairs the network connection of the first electronic device, and the first electronic device reconnects to the target network.

[0178] S907: The first electronic device disconnects from the target network and turns on the first AP in response to the first network repair instruction triggered by the user.

[0179] S908: The second electronic device scans the first AP of the first electronic device, and accesses the first AP turned on by the first electronic device according to the saved configuration information of the first AP.

[0180] S909: The first electronic device establishes a secure session with the second electronic device.

[0181] S910: The first electronic device sends network configuration information of the target network to the second electronic device through a secure session.

[0182] In an optional implementation, the first electronic device and the second electronic device may negotiate a first session key, the first electronic device encrypts the network configuration information according to the first session key, and sends the encrypted network configuration information to the second electronic device. After receiving the encrypted network configuration information, the second electronic device decrypts the encrypted network configuration information according to the first session key to obtain the network configuration information.

[0183] S911: The second electronic device reconnects to the routing device to access the target network according to the acquired network configuration information to repair the network connection.

[0184] S912: The first electronic device establishes a secure session with the second electronic device.

[0185] It should be noted that in S909 and S912, the first electronic device and the second electronic device can establish a secure session in the same manner, but in S909 and S912, since the first electronic device and the second electronic device randomly generate different random numbers in the process of negotiating the session key, the session keys negotiated by the first electronic device and the second electronic device are different. It can be seen that the session key used by the first electronic device and the second electronic device in a round of conversation is not permanently valid. When the first electronic device and the second electronic device establish a new round of secure conversation again, the two devices will renegotiate a new session key to ensure the security of the conversation.

[0186] S913: The first electronic device randomly generates configuration information of the second AP.

[0187] S914: The first electronic device sends the configuration information of the second AP to the second electronic device.

[0188] S915: The second electronic device saves configuration information of the second AP.

[0189] Through S913-S915, when the first electronic device detects that the electronic device associated with the first electronic device is back online, it can randomly regenerate the configuration information of the AP for repairing the network, and send the regenerated AP configuration information to the electronic device that is back online, thereby updating the configuration of the AP for repairing the network and preventing security issues caused by long-term use of the same AP configuration.

[0190] In another optional implementation, the first electronic device may also periodically update the configuration information of the AP used to repair the network, so as to further ensure the security of the network repair function.

[0191] S916: The first electronic device determines that the duration of opening the first AP is greater than a preset time threshold, and the first electronic device determines that there are still devices that are not online.

[0192] S917: The first electronic device sends a second network repair instruction to the second electronic device.

[0193] Optionally, the second network repair instruction sent by the first electronic device to the second electronic device is used to instruct the second electronic device to turn on the first AP to assist other electronic devices in repairing network connections.

[0194] S918: The second electronic device switches to AP mode and turns on the first AP.

[0195] It is understandable that after the second electronic device switches to the AP mode, the connection between the second electronic device and the routing device will be disconnected, that is, the second electronic device is disconnected from the network.

[0196] S919: The third electronic device scans the first AP of the second electronic device, and accesses the first AP turned on by the second electronic device according to the saved configuration information of the first AP.

[0197] S920: The first electronic device scans the first AP of the second electronic device, and accesses the first AP turned on by the second electronic device according to the saved configuration information of the first AP.

[0198] S921: The third electronic device sends a device identification of the third electronic device and a first random number to the second electronic device.

[0199] S922: The second electronic device sends the device identification of the third electronic device and the first random number to the first electronic device.

[0200] S923: The first electronic device determines that the third electronic device is a device bound to the first electronic device according to the identifier of the third electronic device, and determines the second session key according to the authentication credentials of the third electronic device, the first random number and the second random number.

[0201] The second random number is randomly generated by the first electronic device.

[0202] Optionally, the first electronic device pre-saves the device identification and authentication credentials of at least one electronic device bound to the first electronic device; after obtaining the device identification of the third electronic device, the first electronic device determines the authentication credentials of the third electronic device based on the device identification of the third electronic device.

[0203] S924: The first electronic device encrypts the network configuration information according to the second session key.

[0204] S925: The first electronic device sends the encrypted network configuration information and the second random number to the second electronic device.

[0205] S926: The second electronic device sends the encrypted network configuration information and the second random number to the third electronic device.

[0206] S927: The third electronic device determines the second session key according to the authentication credentials of the third electronic device, the first random number and the second random number, and decrypts the encrypted network configuration information according to the second session key to obtain the network configuration information of the target network.

[0207] S928: The second electronic device and the third electronic device reconnect to the routing device to access the target network according to the acquired network configuration information to repair the network connection.

[0208] S929: The second electronic device and the third electronic device respectively establish a secure session with the first electronic device.

[0209] Optionally, similar to S914-S915, after detecting that the third electronic device completes network repair and comes online, the first electronic device may send the configuration information of the second AP to the third electronic device.

[0210] Through the network repair method shown in this example, after the first electronic device re-establishes the network connection, it can turn on the first AP and repair the network connection of the second electronic device connected to the first AP. For a third electronic device that is not within the coverage of the first AP, it can access the first AP turned on by the second electronic device to obtain network configuration information for repairing the network connection from the first electronic device with the assistance of the second electronic device. Since the first electronic device in this example is within the coverage of the first AP of the second electronic device, the first electronic device can also access the first AP of the second electronic device to receive a message from the third electronic device forwarded by the second electronic device. This avoids the process of the second electronic device switching to turn on the AP mode and reconnecting to the routing device multiple times, thereby improving the efficiency of network repair.

[0211] Based on the above embodiments, the present application further provides an electronic device, the electronic device includes multiple functional modules; the multiple functional modules interact with each other to implement the functions performed by the first electronic device, the second electronic device or the third electronic device in each method described in the embodiments of the present application. The multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0212] Based on the above embodiments, the present application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the functions performed by the first electronic device, the second electronic device or the third electronic device in each method described in the embodiments of the present application.

[0213] Based on the above embodiments, the present application further provides a computer program. When the computer program is run on a computer, the computer executes the methods described in the embodiments of the present application.

[0214] Based on the above embodiments, the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the methods described in the embodiments of the present application.

[0215] Based on the above embodiments, the present application further provides a chip, which is used to read a computer program stored in a memory to implement the methods described in the embodiments of the present application.

[0216] Based on the above embodiments, the present application provides a chip system, which includes a processor for supporting a computer device to implement the methods described in the embodiments of the present application. In one possible design, the chip system also includes a memory, which is used to store the necessary programs and data for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0217] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0218] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0219] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0220] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0221] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of protection of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A communication system, characterized in that: The system includes a routing device, a first electronic device, a second electronic device and a third electronic device; the first electronic device is associated with the second electronic device, the first electronic device is associated with the third electronic device, and the distance between the third electronic device and the second electronic device is less than or equal to a preset distance threshold; The routing device is used to provide a wireless connection to the target network; The first electronic device is configured to receive a first network repair instruction, wherein the first network repair instruction is configured to instruct the first electronic device to switch to an access point mode and assist other electronic devices associated with the first electronic device to repair network connections; enable a first access point according to the first network repair instruction; and accept access by the second electronic device to the first access point, and establish a secure session with the second electronic device; sending the network configuration information of the target network to the second electronic device through the secure session; The second electronic device is configured to access the first access point opened by the first electronic device according to the first access point configuration information stored in the second electronic device, and establish a secure session with the first electronic device; receive the network configuration information sent by the first electronic device through the secure session, and access the target network according to the network configuration information; The first electronic device is further used to: send a second network repair instruction to the second electronic device, the second network repair instruction is used to instruct the second electronic device to switch to the access point mode and assist other electronic devices associated with the first electronic device to repair the network connection; receive request information from the third electronic device forwarded by the second electronic device, the request information is used to request to repair the network connection of the third electronic device; determining a second session key according to the request information; Encrypt the network configuration information according to the second session key to obtain second encrypted information; and send the second encrypted information to the second electronic device; The second electronic device is further used to: receive the second network repair instruction sent by the first electronic device, disconnect from the target network, and open the first access point according to the second network repair instruction; accept the third electronic device to access the first access point; receive the request information sent by the third electronic device, and forward the request information to the first electronic device; receive the second encrypted information sent by the first electronic device, and forward the second encrypted information to the third electronic device; The third electronic device is used to: access the first access point opened by the second electronic device; and send the request information to the second electronic device; receiving the second encrypted information from the first electronic device and forwarded by the second electronic device, and determining the second session key according to the second encrypted information; decrypting the second encrypted information according to the second session key to obtain the network configuration information; Access the target network according to the network configuration information.

2. The system according to claim 1, characterized in that The first electronic device is specifically used for: Encrypt the network configuration information according to the first session key to obtain first encrypted information, and send the first encrypted information to the second electronic device; The second electronic device is specifically used for: receiving the first encrypted information, decrypting the first encrypted information according to the first session key, and acquiring the network configuration information; The first session key is obtained through negotiation between the first electronic device and the second electronic device during the process of establishing a secure session.

3. The system according to claim 1 or 2, characterized in that: The first network repair instruction includes configuration information of the first access point; the first electronic device is specifically configured to: enable the first access point according to the configuration information of the first access point in the first network repair instruction; or The first network repair instruction includes an identifier of the first access point; and the first electronic device is specifically configured to: determine configuration information of the first access point stored in the first electronic device according to the identifier of the first access point in the first network repair instruction, and enable the first access point according to the configuration information of the first access point.

4. The system according to claim 1, characterized in that The second electronic device is specifically used for: Accessing the target network according to the network configuration information and establishing a secure session with the first electronic device; sending the request information to the first electronic device through the secure session between the second electronic device and the first electronic device, and receiving the second encrypted information sent by the first electronic device; or The first electronic device is allowed to access the first access point opened by the second electronic device, the request information is sent to the first electronic device, and the second encrypted information sent by the first electronic device is received.

5. The system according to claim 1, wherein: The first electronic device is also used for: Before sending the second network repair instruction to the second electronic device, it is determined that the first electronic device has enabled the first access point for a time period greater than a preset time threshold, and / or it is determined that at least one electronic device associated with the first electronic device has not repaired the network connection.

6. The system according to claim 1, wherein: The second network repair instruction includes a target number, where the target number is used to indicate the number of electronic devices whose network connections are to be repaired; The second electronic device is further used for: When it is determined that the time length during which the second electronic device turns on the first access point is greater than a preset time threshold, and / or when it is determined that the number of electronic devices whose network connections have been repaired is a target number, the first access point is turned off, and the target network is accessed according to the network configuration information.

7. The system according to claim 1, characterized in that The first electronic device stores the device identification and authentication credentials of at least one electronic device associated with the first electronic device; the second session key is determined based on the first random number randomly generated by the third electronic device, the second random number randomly generated by the first electronic device and the authentication credentials of the third electronic device.

8. The system according to any one of claims 1-2, 4-7, characterized in that: The first electronic device is also used for: After determining that the second electronic device is connected to the target network and establishing a secure session with the first electronic device, the configuration information of the second access point is sent to the second electronic device. The configuration information of the second access point is used by the second electronic device to search for an access point for assisting in repairing the network connection during the next network repair.

9. The system according to any one of claims 1-2, 4-7, characterized in that: The first electronic device is a home hub device.

10. A network repair method, applied to a first electronic device, characterized in that: The method comprises: receiving a first network repair instruction; the first network repair instruction is used to instruct the first electronic device to switch to an access point mode and assist other electronic devices associated with the first electronic device to repair a network connection; Turning on the first access point according to the first repair network instruction; Accepting access of a second electronic device to the first access point and establishing a secure session with the second electronic device; the first electronic device is associated with the second electronic device; Sending network configuration information of the target network to the second electronic device through the secure session, so that the second electronic device accesses the target network according to the network configuration information; Sending a second network repair instruction to the second electronic device, where the second network repair instruction is used to instruct the second electronic device to switch to the access point mode and assist other electronic devices associated with the first electronic device to repair the network connection; receiving a request message from a third electronic device forwarded by the second electronic device, the request message being used to request repairing a network connection of the third electronic device; the first electronic device is associated with the third electronic device, and a distance between the third electronic device and the second electronic device is less than or equal to a preset distance threshold; determining a second session key according to the request information; The network configuration information is encrypted according to the second session key to obtain second encrypted information, and the second encrypted information is sent to the second electronic device, so that the third electronic device can access the target network according to the second encrypted information forwarded by the second electronic device.

11. The method according to claim 10, characterized in that The sending the network configuration information of the target network to the second electronic device through the secure session includes: Encrypt the network configuration information according to the first session key to obtain first encrypted information, and send the first encrypted information to the second electronic device; The first session key is obtained through negotiation between the first electronic device and the second electronic device during the process of establishing a secure session.

12. The method according to claim 10 or 11, characterized in that The first repair network instruction includes configuration information of the first access point; and enabling the first access point according to the first repair network instruction includes: enabling the first access point according to the configuration information of the first access point in the first repair network instruction; or The first network repair instruction includes an identifier of the first access point; and enabling the first access point according to the first network repair instruction includes: determining configuration information of the first access point stored in the first electronic device according to the identifier of the first access point in the first network repair instruction, and enabling the first access point according to the configuration information of the first access point.

13. The method according to claim 10, characterized in that The receiving the request information from the third electronic device forwarded by the second electronic device includes: Receiving the request information sent by the second electronic device through a secure session between the first electronic device and the second electronic device; or Accessing the first access point opened by the second electronic device, and receiving the request information sent by the second electronic device; The sending the second encrypted information to the second electronic device includes: sending the second encrypted information to the second electronic device through a secure session between the first electronic device and the second electronic device; or Accessing the first access point opened by the second electronic device, and sending the second encrypted information to the second electronic device; The secure session between the first electronic device and the second electronic device is established after the second electronic device accesses the target network according to the network configuration.

14. The method according to claim 10, characterized in that Before sending the second network repair instruction to the second electronic device, the method further includes: It is determined that the first electronic device has enabled the first access point for a time period greater than a preset time threshold, and / or it is determined that at least one electronic device associated with the first electronic device has not repaired the network connection.

15. The method according to claim 10, characterized in that The second network repair instruction includes a target number, where the target number is used to indicate the number of electronic devices whose network connections are to be repaired.

16. The method according to claim 10, characterized in that The first electronic device stores the device identification and authentication credentials of at least one electronic device associated with the first electronic device; the second session key is determined based on the first random number randomly generated by the third electronic device, the second random number randomly generated by the first electronic device and the authentication credentials of the third electronic device.

17. The method according to any one of claims 10-11, 13-16, characterized in that The method further comprises: After determining that the second electronic device is connected to the target network and establishing a secure session with the first electronic device, the configuration information of the second access point is sent to the second electronic device. The configuration information of the second access point is used by the second electronic device to search for an access point for assisting in repairing the network connection during the next network repair.

18. The method according to any one of claims 10-11, 13-16, characterized in that: The first electronic device is a home hub device.

19. A network repair method, applied to a second electronic device, characterized in that: The method comprises: accessing a first access point opened by a first electronic device according to the first access point configuration information stored by the second electronic device, and establishing a secure session with the first electronic device; the first electronic device is associated with the second electronic device; the first access point is an access point opened by the first electronic device for assisting other electronic devices associated with the first electronic device to repair network connections; Receiving network configuration information of a target network sent by the first electronic device through the secure session; Accessing the target network according to the network configuration information; receiving a second network repair instruction sent by the first electronic device, where the second network repair instruction is used to instruct the second electronic device to switch to an access point mode and assist other electronic devices associated with the first electronic device to repair a network connection; opening the first access point according to the second repair network instruction; accepting a third electronic device to access the first access point; the third electronic device is associated with the first electronic device; receiving a request message sent by the third electronic device, wherein the request message is used to request to repair the network connection of the third electronic device; forwarding the request information to the first electronic device; Receive second encrypted information sent by the first electronic device, and forward the second encrypted information to the third electronic device, so that the third electronic device obtains network configuration information in the second encrypted information and accesses the target network according to the network configuration information; wherein the second encrypted information is obtained by the first electronic device encrypting the network configuration information according to the second session key.

20. The method of claim 19, wherein: The receiving the network configuration information of the target network sent by the first electronic device through the secure session includes: Receive first encrypted information sent by the first electronic device, decrypt the first encrypted information according to a first session key, and obtain the network configuration information; wherein the first session key is negotiated between the first electronic device and the second electronic device during the process of establishing a secure session.

21. The method of claim 19, wherein: The forwarding the request information to the first electronic device includes: accessing the target network according to the network configuration information and establishing a secure session with the first electronic device; sending the request information to the first electronic device through the secure session between the second electronic device and the first electronic device; or accepting the first electronic device accessing the first access point opened by the second electronic device, and sending the request information to the first electronic device; The receiving the second encrypted information sent by the first electronic device includes: accessing the target network according to the network configuration information and establishing a secure session with the first electronic device; receiving the second encrypted information sent by the first electronic device through the secure session between the second electronic device and the first electronic device; or The first electronic device is allowed to access the first access point opened by the second electronic device, and the second encrypted information sent by the first electronic device is received.

22. The method of claim 19, wherein: The second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices whose network connections are to be repaired; the method further includes: When it is determined that the time length during which the second electronic device turns on the first access point is greater than a preset time threshold, and / or when it is determined that the number of electronic devices whose network connections have been repaired is a target number, the first access point is turned off, and the target network is accessed according to the network configuration information.

23. The method of claim 19, wherein: The first electronic device stores the device identification and authentication credentials of at least one electronic device associated with the first electronic device; the second session key is determined based on the first random number randomly generated by the third electronic device, the second random number randomly generated by the first electronic device and the authentication credentials of the third electronic device.

24. The method according to any one of claims 19 to 23, characterized in that After accessing the target network according to the network configuration information, the method further includes: A secure session is established with the first electronic device, and configuration information of a second access point sent by the first electronic device is received, where the configuration information of the second access point is used by the second electronic device to search for an access point for assisting in repairing the network connection during the next network repair.

25. An electronic device, characterized in that: The method comprises at least one processor coupled to at least one memory, wherein the at least one processor is used to read a computer program stored in the at least one memory to execute the method as claimed in any one of claims 10 to 18, or to execute the method as claimed in any one of claims 19 to 24.

26. An electronic device, characterized in that: The electronic device comprises a plurality of functional modules; the plurality of functional modules interact with each other to execute the method as claimed in any one of claims 10 to 18, or to execute the method as claimed in any one of claims 19 to 24.

27. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method described in any one of claims 10 to 18, or to execute the method described in any one of claims 19 to 24.

Citation Information

Patent Citations

  • Network connection method, first electronic device and medium

    CN111343695A

  • Key generation and terminal network distribution method, device and equipment

    CN112566113A