WO2023078214A1 - Communication system, network repair method, and device - Google Patents

Communication system, network repair method, and device Download PDF

Info

Publication number
WO2023078214A1
WO2023078214A1 PCT/CN2022/128711 CN2022128711W WO2023078214A1 WO 2023078214 A1 WO2023078214 A1 WO 2023078214A1 CN 2022128711 W CN2022128711 W CN 2022128711W WO 2023078214 A1 WO2023078214 A1 WO 2023078214A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
network
access point
configuration information
repair
Prior art date
Application number
PCT/CN2022/128711
Other languages
French (fr)
Chinese (zh)
Inventor
甘璐
王德海
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023078214A1 publication Critical patent/WO2023078214A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L2012/284Home automation networks characterised by the type of medium used
    • H04L2012/2841Wireless

Definitions

  • the present application relates to the technical field of the Internet of Things, and in particular to a communication system, a network repair method and equipment.
  • the IoT application client can be installed in the device used by the user, and multiple electronic devices of the user can be bound to the user account of the IoT application. Users can control multiple electronic devices through IoT applications, and then realize the intelligent linkage between the device used by the user and multiple electronic devices. For example, a user can issue an instruction to play music to a smart speaker through an IoT application, so as to control the smart speaker to play music.
  • the connection between electronic devices and IoT applications generally adopts wireless connection technologies such as wireless fidelity (Wi-Fi), Bluetooth, and Zig-bee (Zig-Bee).
  • Wi-Fi wireless fidelity
  • Bluetooth Bluetooth
  • Zig-bee Zig-bee
  • electronic devices supporting the Wi-Fi protocol can connect to the Internet through the Internet protocol (IP) protocol to access the IoT smart home platform, and the IoT smart home platform can communicate with the client of the IoT application installed on the device used by the user. Interaction, so as to realize the interaction between electronic devices and IoT applications.
  • IP Internet protocol
  • Wi-Fi Wi-Fi
  • the electronic device will be disconnected from the network. At this time, the electronic device that the user sees on the IoT application may be offline.
  • the user needs to trigger multiple electronic devices to enter the distribution network mode in the IoT application, and scan the device distribution network access point (access point, AP) through the IoT application to re-configure. network to allow multiple electronic devices to reconnect to the network.
  • the device distribution network access point access point, AP
  • the present application provides a communication system, a network repair method and equipment, which are used to provide a fast and efficient smart home network repair method, improve the efficiency of smart home network repair, and further improve user experience.
  • the present application provides a communication system, where the 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 routing device in the communication system is used to provide the wireless connection of the target network.
  • the first electronic device receives a first repairing network instruction, and the first repairing network instruction is used to instruct the first electronic device to switch to an AP mode and assist other electronic devices associated with the first electronic device to restore network connections.
  • the first electronic device opens the first AP according to the first repair network instruction, the second electronic device accesses the first AP opened by the first electronic device, 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 can access the target network according to the network configuration information, thereby repairing the network connection.
  • the first electronic device can open an access point for assisting other electronic devices to repair the network connection, and other electronic devices associated with the first electronic device, such as the second electronic device, can access the first electronic device opened by the first electronic device.
  • An AP 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.
  • the network repair method provided by this application not only ensures the security of transmitting network configuration information, but also improves the efficiency of network repair of electronic devices, and quickly and efficiently completes the repair of electronic devices in the whole house. Network repair to improve user experience.
  • the first electronic device is specifically configured to: 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 configured to: receive the first encrypted information, decrypt the first encrypted information according to the first session key, and acquire network configuration information.
  • the first session key is obtained through negotiation between the first electronic device and the second electronic device during the establishment of the secure session.
  • the first electronic device and the second electronic device can negotiate a first session key during the process of establishing a secure session, and the first session key can be used to encrypt the interaction between the first electronic device and the second electronic device Information, such as the first session key, may be used to encrypt network configuration information of the target network, thereby ensuring secure encrypted communication between the first electronic device and the second electronic device.
  • the first repair network instruction includes configuration information of the first AP; the first electronic device is specifically configured to: enable the first AP according to the configuration information of the first AP in the first repair network instruction; or An instruction for repairing the network includes the identifier of the first AP; the first electronic device is specifically configured to: determine the configuration information of the first AP stored by the first electronic device according to the identifier of the first AP in the first repairing network instruction; The configuration information of the AP enables the first AP.
  • the first electronic device can start the first AP according to the configuration information of the first AP in the first repair network command, or the configuration information of the first AP is pre-stored in the first electronic device, and the first electronic device can use the first AP configuration information according to the first
  • the identification of the first AP in the network repair instruction determines the configuration information of the first AP and enables the first AP, flexibly realizing that the first electronic device activates an access point that assists other electronic devices in repairing network connections.
  • the system further includes a 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;
  • the first electronic device is also used to: send a second repair network instruction to the second electronic device, the second repair network instruction is used to instruct the second electronic device to switch to the AP mode and assist other electronic devices associated with the first electronic device to repair the network Connect; 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 the second session key according to the request information; encrypt the network according to the second session key Obtain second encrypted information from the configuration information; and send the second encrypted information to the second electronic device.
  • the second electronic device is also used to: receive the second repair network instruction sent by the first electronic device, disconnect the connection with the target network, and open the first AP according to the second repair network instruction; accept the third electronic device to access the first AP ; receiving the request information sent by the third electronic device, and forwarding the request information to the first electronic device; receiving the second encrypted information sent by the first electronic device, and forwarding the second encrypted information to the third electronic device.
  • the third electronic device is used for: accessing the first AP opened by the second electronic device; sending request information to the second electronic device; receiving the second encrypted information from the first electronic device forwarded by the second electronic device, according to the second encrypted
  • the information determines the second session key; decrypts the second encrypted information according to the second session key to obtain network configuration information; and accesses the target network according to the network configuration information.
  • the first electronic device can instruct the second electronic device to turn on the first AP and assist other electronic devices to restore 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 repair network instruction, and the third electronic device accesses the first AP turned on by the second electronic device , the second electronic device may 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 transfer information.
  • the second electronic device sends the request information sent by the third electronic device to the first electronic device, forwards the second encrypted information sent by the first electronic device to the third electronic device, and then assists the third electronic device to obtain the information of the target network.
  • Network configuration information to repair the network connection of the third electronic device.
  • the first electronic device may also instruct the third electronic device to start the first AP and assist other electronic devices to restore the network connection, for example, the fourth electronic device is not located at the first AP opened by the first electronic device or the second electronic device. However, 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 to restore the network connection of the fourth electronic device.
  • the first electronic device can repair the electronic devices within the range of the first AP of the first electronic device, and then repair the network connection of the peripheral device layer by layer with the help of the electronic device that has repaired the network connection, and then complete the entire network connection. Network repair of house electronic equipment.
  • the second electronic device is specifically configured to: access the target network according to network configuration information, and establish a secure session with the first electronic device; through the secure session between the second electronic device and the first electronic device, Send the request information to 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 opened by the second electronic device, and send the request information to the first electronic device , and receive the second encrypted information sent by the first electronic device.
  • the second electronic device when the second electronic device forwards the request message sent by the third electronic device to the first electronic device, or the second electronic device receives the second encrypted information sent by the first electronic device, the second electronic device can access the target After establishing a secure session with the first electronic device for communication after the network, it is also acceptable for the first electronic device to access the first AP opened by the second electronic device for communication, thereby flexibly realizing the communication between the first electronic device and the second electronic device.
  • the first electronic device is further configured to: before sending the second network repair instruction to the second electronic device, determine that the duration for the first electronic device to turn on the first AP is 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.
  • the first electronic device fails to repair the network connection when the market for opening the first AP is greater than the 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.
  • the electronic device may be located in an area that cannot be covered by the first AP enabled by the first electronic device, then the first electronic device can instruct the second electronic device to turn on the first AP and assist other electronic devices to restore the network connection, preventing the first electronic device from being connected for a long time Turn on the first AP but cannot further repair other electronic devices, further improving the efficiency of network repair.
  • the second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired; the second electronic device is also used to: determine the duration for the second electronic device to turn on the first AP is greater than the preset time threshold, and/or, when it is determined that the number of electronic devices connected to the repaired network is the target number, shut down the first AP, and access the target network according to the network configuration information.
  • the first electronic device can carry the target number of electronic devices connected to the network to be repaired in the second repair network instruction.
  • the number of connected electronic devices reaches the target number, turn off the first AP in time, end the task of assisting in repairing the network connection, and prevent the second electronic device from still turning on the first AP when there is no need to assist other electronic devices in repairing the network connection.
  • 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 a first random number randomly generated by the third electronic device, The second random number randomly generated by the first electronic device is determined by the authentication credential of the third electronic device.
  • 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 the first electronic device receives the request from the third electronic device forwarded by the second electronic device information, the first random number generated by the third electronic device may be obtained, and the authentication credential of the third electronic device may be determined according to the device identifier of the third electronic device.
  • the first 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 credential of the third electronic device, thereby completing the first electronic device and Key negotiation between the third electronic devices, and secure transfer of network configuration information of the target network according to the second session key, to ensure the security of the electronic device repair network.
  • the first electronic device is further configured to: after determining that the second electronic device is connected to the target network and establishing a secure session with the first electronic device, send configuration information of the second AP to the second electronic device, The configuration information of the second AP is used for the second electronic device to search for an access point for assisting in repairing the network connection in the next network repair.
  • the first electronic device when the first electronic device detects that the electronic device associated with the first electronic device is online again, it can randomly regenerate the configuration information of the AP used to repair the network, and send the regenerated AP configuration information to the The electronic equipment that goes online again updates the configuration of the AP used to repair the network, preventing security issues caused by using the same AP configuration for a long time.
  • the first electronic device is a home hub device.
  • the routing device is a device with a routing function, and the routing device includes a router.
  • the present application provides a network repair method applied to a first electronic device.
  • the method includes: receiving a first repair network instruction; the first repair network instruction is used to instruct the first electronic device to switch to the access point AP mode and assist other electronic devices associated with the first electronic device to repair the network connection; according to the first repair
  • the network command opens the first AP; accepts the second electronic device to access the first AP, and establishes a secure session with the second electronic device; associates the first electronic device with the second electronic device; sends the target network information to the second electronic device through the secure session Network configuration information, so that the second electronic device accesses the target network according to the network configuration information.
  • sending the network configuration information of the target network to the second electronic device through a secure session includes: encrypting the network configuration information according to the first session key to obtain first encrypted information, and sending the first encrypted information to the second electronic device An electronic device; wherein, 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.
  • the first repair network instruction includes configuration information of the first AP; starting the first AP according to the first repair network instruction includes: starting the first AP according to the configuration information of the first AP in the first repair network instruction AP; or the first repair network instruction includes the identifier of the first AP; according to the first repair network instruction, enabling the first AP includes: determining the first AP stored in the first electronic device according to the identifier of the first AP in the first repair network instruction configuration information of an AP, and enable the first AP according to the configuration information of the first AP.
  • the method further 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 the AP mode and assist other devices associated with the first electronic device
  • the electronic device repairs the network connection; receives the request information from the third electronic device forwarded by the second electronic device, and 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 third electronic device
  • the distance between the electronic device and the second electronic device is less than or equal to a preset distance threshold; the second session key is determined 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 encrypted and send it to the second electronic device, so that the third electronic device accesses the target network according to the second encrypted information forwarded by the second electronic device.
  • 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 access the first AP enabled by the second electronic device, and receive the request information sent by the second electronic device;
  • 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 second electronic device to open The first AP sends 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.
  • the method before sending the second network repair instruction to the second electronic device, the method further includes: determining that the time period for the first electronic device to turn on the first AP is greater than a preset time threshold, and/or, determining the same time as the first AP At least one electronic device associated with an electronic device has not repaired the network connection.
  • the second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired.
  • 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 a first random number randomly generated by the third electronic device, The second random number randomly generated by the first electronic device is determined by the authentication credential of the third electronic device.
  • the method further includes: after determining that the second electronic device is connected to the target network and establishing a secure session with the first electronic device, sending configuration information of the second AP to the second electronic device, and the second AP The configuration information is used by the second electronic device to find an access point for assisting in repairing the network connection in the next network repair.
  • the first electronic device is a home hub device.
  • the present application provides a network repair method applied to a second electronic device.
  • the method includes: accessing the first AP opened by the first electronic device, establishing a secure session with the first electronic device; associating the first electronic device with the second electronic device; Other electronic devices associated with the first electronic device repair the access point of the network connection; receive the network configuration information of the target network sent by the first electronic device through the secure session; and access the target network according to the network configuration information.
  • receiving the network configuration information of the target network sent by the first electronic device through a secure session includes: receiving first encrypted information sent by the first electronic device, and performing encryption on the first encrypted information according to the first session key Decrypt to obtain network configuration information; wherein, 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.
  • the method further 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 the AP mode and assist the Other electronic devices repair the network connection; open the first AP according to the second repair network instruction; accept the third electronic device to access the first AP; the third electronic device is associated with the first electronic device; receive the request sent by the third electronic device information, the request information is used to request to repair the network connection of the third electronic device; 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, so that the third electronic device obtains the 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 encrypting the network configuration information by the first electronic device according to the second session key .
  • 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; the secure session, and send the request information to the first electronic device; or accept the first electronic device to access the first AP opened by the second electronic device, and send the request information to the first electronic device.
  • 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 encrypted message through the secure session between the second electronic device and the first electronic device The second encrypted information sent by the first electronic device; or accepting the first electronic device's access to the first AP enabled by the second electronic device, and receiving the second encrypted information sent by the first electronic device.
  • the second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired; the method also includes: determining that the time for the second electronic device to turn on the first AP is longer than the preset The time threshold, and/or, when it is determined that the number of electronic devices connected to the repaired network is the target number, shut down the first AP, and access the target network according to the network configuration information.
  • 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 a first random number randomly generated by the third electronic device, The second random number randomly generated by the first electronic device is determined by the authentication credential of the third electronic device.
  • the method further includes: establishing a secure session with the first electronic device, receiving the configuration information of the second AP sent by the first electronic device, and the second AP's The configuration information is used for the second electronic device to find an access point for assisting in repairing the network connection in the next network repair.
  • the present application provides an electronic device.
  • the electronic device includes a plurality of functional modules; the plurality of functional modules interact to implement the method in the second aspect or the third aspect and the implementation manners thereof.
  • Multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and multiple functional modules can be combined or divided arbitrarily based on specific implementations.
  • the present application provides an electronic device, including at least one processor and at least one memory.
  • Computer program instructions are stored in at least one memory, and when the electronic device is running, at least one processor executes the method executed by the storage device in the second aspect or the third aspect and various implementations thereof.
  • the present application further provides a computer program.
  • the computer program runs on the computer, it causes the computer to execute the method in any one of the above aspects and its implementations.
  • the present application further provides a computer-readable storage medium.
  • a computer program is stored in a computer-readable storage medium, and when the computer program is executed by a computer, the computer is made to perform the methods in any one of the above aspects and implementations thereof.
  • the present application further provides a chip.
  • the chip is used to read the computer program stored in the memory, and execute the methods in any one of the above-mentioned aspects and its implementations.
  • the present application further provides a chip system.
  • the system-on-a-chip includes a processor, configured to support a computer device to implement any one of the above-mentioned aspects and the methods in each implementation manner thereof.
  • the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • FIG. 1 is a schematic diagram of a smart home scene provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a user manually repairing a network connection of an electronic device
  • FIG. 3 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • FIG. 4 is a flow chart of a network repair method provided in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a method for establishing a secure session between a first electronic device and a second electronic device according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of positions of a first electronic device, a second electronic device, and a third electronic device provided by an embodiment of the present application;
  • FIG. 7 is a schematic diagram of a network repair scenario applicable to an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a network repair method provided in an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a network repair method provided by an embodiment of the present application.
  • the Internet of Things which can be understood as “the Internet where everything is connected”, is an extended and expanded network based on the Internet. It is a huge network formed by combining various information sensing devices with the network. Realize the interconnection of people, machines and things at any time and any place.
  • FIG. 1 is a schematic diagram of a smart home scene provided by an embodiment of the present application.
  • the scene includes a routing device, a home hub device, at least one electronic device, and devices 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.
  • the routing device may be a device having a routing function, such as a router.
  • the electronic device may be a smart home device, such as an IoT device such as a smart doorbell, a smart door lock, a refrigerator, a washing machine, a smart speaker, and a smart TV.
  • the home hub device can integrate home business services to control at least one electronic device in a smart home scene.
  • the home hub device may be a long-term power device that is resident in the home, such as smart speakers, smart TVs, smart routing devices, set-top boxes, and other devices.
  • an IoT application can be installed on a device used by a 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.
  • the user can view information such as the status of the electronic device in the IoT application, and the user can control it through the IoT application.
  • Electronic equipment can be installed on a device used by a user, and at least one electronic device can be bound to a user account in the IoT application.
  • control instructions are sent to the smart speaker, such as controlling the smart speaker to play music.
  • the IoT application installed on the device used by the user can be the client of the IoT application.
  • Many electronic equipment manufacturers or IoT solution providers also provide smart home server platforms or IoT cloud servers.
  • the information of the electronic devices bound to the user account is acquired on the application client, so as to perform data analysis and management on multiple electronic devices.
  • the IoT application can synchronize information such as device identification and authentication credentials of at least one electronic device bound to the user account to the home hub device.
  • the authentication credential of the electronic device is information obtained by the IoT application for establishing a secure session with the electronic device.
  • the home hub device receives information such as the device identification and authentication credentials of at least one electronic device, it can be considered that the home hub device is associated with at least one electronic device.
  • at least one electronic device can connect to the IoT application or IoT cloud server through the home hub device agent , so as to achieve unified control, unified data analysis, and cross-device intelligent linkage and other services through converging and connecting to the home central equipment.
  • the home hub device can be used as a control device to control the operation of at least one electronic device, and can also be controlled by an IoT application as a controlled device.
  • the smart home scene shown in Figure 1 can be realized in two ways: pre-installation and post-installation.
  • the post-installation means that the user first decorates the house, and then purchases electronic equipment by himself and binds it to his user account; IoT solution providers cooperate with real estate companies to complete the installation and commissioning of electronic equipment during the decoration stage of real estate projects delivered to final residents. After users move in, they can directly bind electronic equipment to their user accounts.
  • the home hub device and at least one electronic device can be connected to the routing device to establish a network connection.
  • the home hub device and the at least one electronic device are connected to the same wireless local area network, and the home hub device can interact with the at least one electronic device.
  • the user may modify the configuration information of the current network.
  • the decoration personnel may have set up the network of the home routing equipment.
  • the decoration personnel have set the network name and password, and the user receives the house Afterwards, the network configuration information is generally changed for security reasons; or in the course of daily use, the user may also modify the network configuration information.
  • the home hub device and at least one electronic device 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 it through the IoT application individual devices.
  • FIG. 2 is a schematic diagram of a user manually repairing a network connection of an electronic device.
  • electronic device A, electronic device B, and electronic device C all disconnect from the network. The user needs to repair the network connections of electronic device A, electronic device B, and electronic device C respectively.
  • the user can press the network distribution button of electronic device A to trigger electronic device A to enter the network distribution mode, or after electronic device A disconnects from the network, if it reconnects to Wi- If Fi fails, it will automatically enter the network distribution mode.
  • the user can scan the device in the IoT application, select electronic device A in the device list obtained by scanning the device, and perform network configuration for electronic device A.
  • the user also needs to manually configure the network for the electronic device B and the electronic device C, so as to repair the network connection of multiple electronic devices.
  • an embodiment of the present application provides a network restoration method.
  • 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 deliver network configuration information to other electronic devices through the secure session, so as to assist other electronic devices to restore network connections.
  • FIG. 3 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • 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
  • the second electronic device is an electronic device associated with the first electronic device.
  • this embodiment of the present application does not limit the number of second electronic devices, and there may be only one second electronic device, or there may be multiple second electronic devices.
  • FIG. 3 shows that the system includes three second electronic devices as an example.
  • the communication system shown in FIG. 3 may further include a third electronic device, the third electronic device is associated with the first electronic device, and the physical distance between the third electronic device and the first electronic device is relatively long.
  • sub-routing can be set to expand the coverage of the Wi-Fi network.
  • FIG. 4 is a flow chart of a network repair method provided by an embodiment of the present application, wherein the second electronic device may be any second electronic device shown in FIG. 3 .
  • this method comprises the following steps:
  • the first electronic device turns on the first AP in response to a first network repair instruction.
  • the network connection of the first electronic device can be manually restored.
  • the user may trigger a first repair network instruction for instructing the first electronic device to switch to an AP mode to restore network connections of other electronic devices.
  • the first electronic device 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 an AP mode, and turns on the first AP.
  • the first repair network 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.
  • the first electronic device may start the first AP according to the configuration information of the first AP in the first network repair instruction.
  • the first repair network instruction may include the identifier of the first AP. After the first electronic device receives the first repair network instruction, it can determine the configuration information of the first AP stored in the first electronic device according to the first AP identification in the first repair network instruction, and according to the configuration information of the first AP The information turns on the first AP.
  • the switching of the first electronic device to the AP mode means that the first electronic device can serve as the first AP to accept access from other devices at this time.
  • the configuration information of the first AP may be randomly generated by the first electronic device in advance, 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 the At least one online electronic device associated with the first electronic device.
  • the electronic device being online may refer to that the electronic device is connected to a network and a secure session has been established between the electronic device and the first electronic device.
  • the second electronic device accesses the first AP enabled by the first electronic device.
  • the second electronic device is an electronic device associated with the first electronic device, and the second electronic device may periodically try to reconnect to the target network after being disconnected from the network. Since the network configuration information of the target network has changed at this time, the second electronic device cannot reconnect to the network according to the expired network configuration information.
  • the second electronic device may access the first AP according to the stored configuration information of the first AP, wherein the configuration information of the first AP may be received from the first electronic device when the second electronic device went online last time.
  • the second electronic device may periodically reconnect to the last connected wireless network, and may periodically connect to the first AP, thereby continuously trying to reconnect to the last connected wireless network, and at the same time Continuously trying to access the first AP for assisting the second electronic device to repair the network, improving the efficiency of the second electronic device re-connecting to the network.
  • S403 The first electronic device establishes a secure session with the second electronic device.
  • FIG. 5 is a schematic diagram of a method for establishing a secure session between a first electronic device and a second electronic device according to an embodiment of the present application.
  • the second electronic device is an electronic device associated with the first electronic device, and the first electronic device and the second electronic device may store a device identifier and an authentication credential of the second electronic device.
  • the authentication credential of the second electronic device stored in the second electronic device may 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 second electronic device stored in the first electronic device
  • the authentication credential of the device may be sent to the first electronic device by the IoT application.
  • the method for establishing a secure session between the first electronic device and the second electronic device includes the following steps:
  • S501 The first electronic device sends a multicast signal, and the second electronic device receives the multicast signal of the first electronic device.
  • the second electronic device sends the device identifier of the second electronic device to the first electronic device.
  • the first electronic device determines, according to the received device identifier of the second electronic device, that the second electronic device is a device associated with the first electronic device.
  • S504 The first electronic device generates a random number RN1.
  • S505 The first electronic device sends RN1 to the second electronic device.
  • the second electronic device generates a random number RN2, and determines the first session key according to the authentication credentials of the second electronic device, RN1 and RN2.
  • the first session key and the authentication credentials of the second electronic device, RN1 and RN2 may satisfy the following formula:
  • KEY1 AuthCode2+RN1+RN2
  • KEY1 is the first session key
  • AuthCode2 is the authentication credential of the second electronic device.
  • S507 The second electronic device sends RN2 to the first electronic device.
  • the first electronic device determines the first session key according to the authentication credential of the second electronic device, RN1 and RN2.
  • S509 The first electronic device and the second electronic device perform encrypted communication according to the first session key.
  • the first electronic device may use the first session key to encrypt the control instruction, and send the encrypted control instruction to the second electronic device.
  • the second electronic device may use the first session key to encrypt the sensing event, and report the encrypted sensing event to the first electronic device.
  • S404 The first electronic device sends the network configuration information of the target network to the second electronic device through the secure session.
  • the first electronic device may use the first session key to encrypt the network configuration information of the target network to obtain the first encrypted information, and The first encrypted information is sent to the second electronic device.
  • the second electronic device may decrypt the first encrypted information according to the first session key to obtain network configuration information.
  • S405 The second electronic device accesses the target network according to the network configuration information.
  • the network configuration information may include a network ID and a password.
  • the network identifier may be, for example, a service set identifier (service set identifier, SSID).
  • the second electronic device scans the network, determines the target network corresponding to the network identifier from currently scannable networks, and connects to the target network according to the password in the network configuration information, thereby re-establishing the network connection.
  • the communication system shown in FIG. 3 may further 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. Within the coverage of an AP, but the distance between the third electronic device and the second electronic device is less than or equal to the preset distance threshold, where the preset distance threshold can be covered by the first AP enabled by the second electronic device scope. That is to say, the third electronic device is located 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 third electronic device, or there may be multiple third electronic devices.
  • FIG. 3 shows that the system includes two third electronic devices as an example.
  • the third electronic device is associated with the first electronic device, and the device identification and authentication credential of the third electronic device are stored in the first electronic device and the third electronic device.
  • the authentication credential of the third electronic device stored in the third electronic device may be generated by the IoT application when the third electronic device is bound to the user account and sent to the third electronic device, and the third electronic device stored in the first electronic device
  • the authentication credential of the device may be sent to the first electronic device by the IoT application.
  • the first electronic device when the first electronic device turns on the first AP for a period greater than or equal to the preset time threshold and determines that there are still electronic devices that are not online, the first electronic device may report to the online second The electronic device sends the second network repair instruction, so that the online second electronic device assists other offline electronic devices to restore the network connection.
  • the electronic device that has not repaired the network may be an electronic device that cannot be covered by the first AP.
  • the first electronic device sends a second network repair instruction to the second electronic device.
  • the second repairing network instruction is used to instruct the second electronic device to activate the first AP, so as to assist in repairing the network connection of the electronic devices within the coverage of the first AP of the second electronic device.
  • the second electronic device may assist in repairing the network connection of the third electronic device.
  • the configuration information of the first AP is stored in the second electronic device. Since the electronic device is placed in a different location, or the electronic device can move its location, after the second electronic device turns on the first AP, the second electronic device turns on The range covered by the first AP of the first electronic device is different from the range covered by the first AP of the first electronic device, then 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.
  • FIG. 6 is a schematic diagram of locations of a first electronic device, a second electronic device, and a third electronic device provided in an embodiment of the present application. Referring to FIG.
  • the second electronic device is located in the range covered by the first AP of the first electronic device, and the third electronic device is not located in the range covered by the first AP of the first electronic device.
  • the third electronic device is located in the first AP of the second electronic device.
  • a first electronic device, a second electronic device, and a third electronic device are shown as examples in FIG. This will not be repeated here.
  • the first electronic device stores the device identification of the electronic device 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 The second electronic device does not store the device identifier of the third electronic device. Therefore, after the first AP is turned on, the second electronic device can serve as a message forwarding device for the first electronic device and the third electronic device, so as to assist the first electronic device to restore the network connection of the third electronic device.
  • the second electronic device may assist the first electronic device and the third electronic device to establish a secure session. Specifically, after the second electronic device turns on the first AP, the third electronic device connects to the first AP of the second electronic device. The third electronic device sends request information to the second electronic device, where the request information may be used to request to restore the network connection of the third electronic device.
  • the request information may include the device identifier of the third electronic device and the random number RN3. After receiving the request information, the second electronic device forwards the request information to the first electronic device.
  • 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 information, it determines the authentication credential of the third electronic device according to the device identifier of the third electronic device, and Generate random number RN4.
  • the first electronic device generates a second session key according to the authentication credentials of the third electronic device, RN3 and RN4.
  • the first electronic device encrypts the network configuration information according to the second session key to obtain second encrypted information.
  • the second encrypted information may include 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, and the third electronic device generates a second session according to the authentication credentials, RN3 and RN4 of the third electronic device key, and decrypt the encrypted network configuration information according to the second session key to obtain the network configuration information.
  • the third electronic device may access the target network according to the network configuration information to re-establish the network connection.
  • the second electronic device After the second electronic device receives the request information, since the second electronic device is in the AP mode at this time, no session is established between the first electronic device and the second electronic device.
  • the second electronic device needs to close the AP mode, reconnect to the network according to the network configuration information and 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 second electronic device's When within the coverage of the first AP, the first electronic device may be connected to the first AP of the second electronic device as a station (station, STA), and at this time, the second electronic device may send request information to the first electronic device.
  • station station
  • the second network repair instruction sent by the first electronic device to the second electronic device may include the number of electronic devices connected to the network 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, then the number of electronic devices to be repaired in the second network repair instruction may be 4. After the second electronic device receives the second repair network instruction and turns on the first AP, if the second electronic device determines that it has assisted in repairing the network connections of the four electronic devices, then the second electronic device can turn off the first AP and restart Connect to the routing device, ending the auxiliary repair network connection task.
  • the second electronic device may also turn off the first AP and reconnect to the routing device. If it is not within the coverage of the first AP of the second electronic device, the second electronic device may turn off the first AP and end the task of assisting in repairing the network connection.
  • the first electronic device when it detects a newly online electronic device, it can send the configuration information of the second AP to the electronic device through a secure session, and the electronic device can use the configuration information of the second AP when the next time the network is disconnected.
  • the configuration information searches for the second AP and connects to the second AP to complete the network repair.
  • the configuration information of the APs used in each network repair can be updated to prevent security problems caused by long-term use of the same AP.
  • FIG. 7 is a schematic diagram of a network repair scenario applicable to the embodiment of the present application.
  • the second electronic device is in the range covered by the first AP of the first electronic device, and the first round of network repair may be The first electronic device may directly restore the network connection of the second electronic device according to the manner shown in the foregoing embodiments.
  • the third electronic device is not located in the range covered by the first AP of the first electronic device, and the third electronic device is located in the first AP of the second electronic device, then the second round of network repair can assist the second electronic device An electronic device restores the network connection of the third electronic device. If the fourth electronic device is not located in the range covered by the first AP of the first electronic device or the second electronic device, but the fourth electronic device is located in the range covered by the first AP of the third electronic device, then the third round of network The repairing may assist the first electronic device in repairing the network connection of the fourth electronic device for the third electronic device.
  • the first electronic device can repair the electronic devices within the range of the first AP of the first electronic device, and then repair the network connection of the peripheral device layer by layer with the help of the electronic device that has repaired the network connection, and then complete the entire network connection.
  • Network repair of house electronic equipment can be performed by the first electronic device.
  • FIG. 8 is a schematic flowchart of a network repair method provided by an embodiment of the present application, and the method may be applied to the communication system shown in FIG. 3 .
  • the method comprises the following steps:
  • S801 Connect the first electronic device, the second electronic device, and the third electronic device to the routing device.
  • 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.
  • S803 The first electronic device randomly generates configuration information of the first AP.
  • the first electronic device sends configuration information of the first AP to the second electronic device and the third electronic device.
  • S805 The user modifies the network configuration information of the target network of the routing device.
  • the user modifies the SSID and password of the Wi-Fi network of the routing device.
  • S806 The user manually restores the network connection of the first electronic device, and the first electronic device reconnects to the target network.
  • the second electronic device scans to the first AP of the first electronic device, and accesses the first AP enabled by the first electronic device according to the saved configuration information of the first AP.
  • the first electronic device establishes a secure session with the second electronic device.
  • S810 The first electronic device sends the network configuration information of the target network to the second electronic device through the secure session.
  • the first electronic device and the second electronic device may negotiate a first session key, and the first electronic device encrypts the network configuration information according to the first session key, and sends the encrypted network configuration information to The information is sent to the second electronic device.
  • 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.
  • S811 The second electronic device reconnects to the routing device to access the target network according to the acquired network configuration information, so as to restore the network connection.
  • S812 The first electronic device establishes a secure session with the second electronic device.
  • the first electronic device and the second electronic device may establish a secure session in the same manner, but in S809 and S812, since the first electronic device and the second electronic device are negotiating the session key Different random numbers are randomly generated during the process, and session keys obtained through negotiation between 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 session is not permanently valid, and when the first electronic device and the second electronic device establish a new round of secure session again, the two devices will restart Negotiate a new session key to keep the session secure.
  • S813 The first electronic device randomly generates configuration information of the second AP.
  • S814 The first electronic device sends configuration information of the second AP to the second electronic device.
  • S815 The second electronic device saves configuration information of the second AP.
  • the first electronic device when the first electronic device detects that the electronic device associated with the first electronic device is online again, it can randomly regenerate the configuration information of the AP used to repair the network, and send the regenerated AP configuration information For the re-online electronic equipment, the configuration of the AP used to repair the network is updated to prevent security problems caused by using the same AP configuration for a long time.
  • 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.
  • the first electronic device determines that the duration of turning on the first AP is longer than a preset time threshold, and the first electronic device determines that there are still devices that are not online.
  • S817 The first electronic device sends a second network repair instruction to the second electronic device.
  • 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 enable the first AP, so as to assist other electronic devices to restore network connections.
  • S818 The second electronic device switches to an AP mode, and turns on the first AP.
  • the connection between the second electronic device and the routing device will be disconnected, that is, the second electronic device will disconnect from the network.
  • the third electronic device scans to 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.
  • the third electronic device sends the device identifier of the third electronic device and the first random number to the second electronic device.
  • S821 The second electronic device reconnects to the routing device to access the target network according to the network configuration information.
  • S822 The first electronic device establishes a secure session with the second electronic device.
  • the second electronic device sends the device identifier of the third electronic device and the first random number to the first electronic device.
  • the first electronic device determines that the third electronic device is a device associated with the first electronic device according to the identification of the third electronic device, and determines the second session according to the authentication credential, the first random number, and the second random number of the third electronic device key.
  • the second random number is randomly generated by the first electronic device.
  • 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 the first electronic device obtains the device identification of the third electronic device, according to the The device identification determines authentication credentials of the third electronic device.
  • S825 The first electronic device encrypts the network configuration information according to the second session key.
  • S826 The first electronic device sends the encrypted network configuration information and the second random number to the second electronic device.
  • S827 The second electronic device switches to an AP mode, and turns on the first AP.
  • the third electronic device scans to the first AP of the second electronic device, and accesses the first AP enabled by the second electronic device according to the saved configuration information of the first AP.
  • S829 The second electronic device sends the encrypted network configuration information and the second random number to the third electronic device.
  • the third electronic device determines the second session key according to the authentication credential 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. configuration information.
  • 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, so as to repair the network connection.
  • S832 The second electronic device and the third electronic device respectively establish secure sessions with the first electronic device.
  • the first electronic device may send configuration information of the second AP to the third electronic device after detecting that the third electronic device completes network repair and goes online.
  • the first electronic device 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 enabled by the second electronic device, so as to obtain the network used to repair the network connection from the first electronic device with the assistance of the second electronic device configuration information.
  • the second electronic device Since the second electronic device has obtained the network configuration information before assisting the third electronic device to repair the network connection, when the second electronic device forwards the message of the third electronic device, it can access the routing device according to the obtained network configuration information to connect The network forwards the message after establishing a secure session with the first electronic device, so as to ensure the security of the network repair process.
  • the first electronic device can generate a session key according to 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 forging Impersonating the home hub device to modify the network configuration of the third electronic device.
  • FIG. 9 is a schematic flowchart of a network repair method provided by an embodiment of the present application, and the method may be applied to the communication system shown in FIG. 3 .
  • the first electronic device is located within the coverage of the first AP of the second electronic device.
  • this method comprises the following steps:
  • S901 Connect the first electronic device, the second electronic device, and the third electronic device to the routing device.
  • 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.
  • S903 The first electronic device randomly generates configuration information of the first AP.
  • the first electronic device sends configuration information of the first AP to the second electronic device and the third electronic device.
  • S905 The user modifies the network configuration information of the target network of the routing device.
  • the user modifies the SSID and password of the Wi-Fi network of the routing device.
  • S906 The user manually restores the network connection of the first electronic device, and the first electronic device reconnects to the target network.
  • the second electronic device scans to the first AP of the first electronic device, and accesses the first AP enabled by the first electronic device according to the saved configuration information of the first AP.
  • S909 The first electronic device establishes a secure session with the second electronic device.
  • S910 The first electronic device sends the network configuration information of the target network to the second electronic device through the secure session.
  • the first electronic device and the second electronic device may negotiate a first session key, and the first electronic device encrypts the network configuration information according to the first session key, and sends the encrypted network configuration information to The information is sent to the second electronic device.
  • 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.
  • S911 The second electronic device reconnects to the routing device to access the target network according to the acquired network configuration information, so as to restore the network connection.
  • S912 The first electronic device establishes a secure session with the second electronic device.
  • the first electronic device and the second electronic device may establish a secure session in the same manner, but in S909 and S912, since the first electronic device and the second electronic device are negotiating session keys Different random numbers are randomly generated during the process, and session keys obtained through negotiation between 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 session is not permanently valid, and when the first electronic device and the second electronic device establish a new round of secure session again, the two devices will restart Negotiate a new session key to keep the session secure.
  • S913 The first electronic device randomly generates configuration information of the second AP.
  • the first electronic device sends configuration information of the second AP to the second electronic device.
  • S915 The second electronic device saves configuration information of the second AP.
  • the first electronic device when the first electronic device detects that the electronic device associated with the first electronic device is online again, it can randomly regenerate the configuration information of the AP used to repair the network, and send the regenerated AP configuration information For the re-online electronic equipment, the configuration of the AP used to repair the network is updated to prevent security problems caused by using the same AP configuration for a long time.
  • 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.
  • the first electronic device determines that the duration of turning on the first AP is longer than a preset time threshold, and the first electronic device determines that there are still devices that are not online.
  • S917 The first electronic device sends a second network repair instruction to the second electronic device.
  • the second repair network instruction sent by the first electronic device to the second electronic device is used to instruct the second electronic device to start the first AP to assist other electronic devices to repair the network connection.
  • S918 The second electronic device switches to an AP mode, and turns on the first AP.
  • the connection between the second electronic device and the routing device will be disconnected, that is, the second electronic device will disconnect from the network.
  • the third electronic device scans to the first AP of the second electronic device, and accesses the first AP enabled by the second electronic device according to the saved configuration information of the first AP.
  • the first electronic device scans to the first AP of the second electronic device, and accesses the first AP enabled by the second electronic device according to the saved configuration information of the first AP.
  • the third electronic device sends the device identifier of the third electronic device and the first random number to the second electronic device.
  • the second electronic device sends the device identifier of the third electronic device and the first random number to the first electronic device.
  • 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.
  • the second random number is randomly generated by the first electronic device.
  • 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 the first electronic device obtains the device identification of the third electronic device, according to the third electronic device The device identification of the third electronic device determines authentication credentials.
  • the first electronic device encrypts the network configuration information according to the second session key.
  • S925 The first electronic device sends the encrypted network configuration information and the second random number to the second electronic device.
  • S926 The second electronic device sends the encrypted network configuration information and the second random number to the third electronic device.
  • the third electronic device determines the second session key according to the authentication credential 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 target Network configuration information for the network.
  • 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, so as to repair the network connection.
  • S929 The second electronic device and the third electronic device respectively establish secure sessions with the first electronic device.
  • the first electronic device may send configuration information of the second AP to the third electronic device after detecting that the third electronic device completes network repair and goes online.
  • the first electronic device 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 enabled by the second electronic device, so as to obtain the network used to repair the network connection from the first electronic device with the assistance of the second electronic device configuration information. Since the first electronic device is within the coverage of the first AP of the second electronic device in this example, the first electronic device can also access the first AP of the second electronic device to receive the information forwarded by the second electronic device from the first AP. Three electronic devices for messages. This avoids the process of the second electronic device repeatedly switching to enable the AP mode and reconnecting the routing device, and improves the network repair efficiency.
  • the present application also provides an electronic device, the electronic device includes multiple functional modules; the multiple functional modules interact to implement the first electronic device, the second electronic device in the methods 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 combined or divided arbitrarily based on specific implementations.
  • the present application also provides an electronic device, which includes at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the electronic device is running, the at least one processing The device performs the functions performed by the first electronic device, the second electronic device, or the third electronic device in the methods described in the embodiments of the present application.
  • the present application further provides a computer program that, when the computer program is run on a computer, causes the computer to execute the methods described in the embodiments of the present application.
  • the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a computer, the computer executes the computer program described in the embodiments of the present application. methods described.
  • the present application also provides a chip, the chip is used to read the computer program stored in the memory, and implement the methods described in the embodiments of the present application.
  • the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor, configured to support a computer device to implement the methods described in the embodiments of the present application.
  • the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Provided in the present application are a communication system, a network repair method, and a device. The communication system comprises a routing device, a first electronic device and a second electronic device, wherein the first electronic device is associated with the second electronic device. The first electronic device receives a first network repair instruction, wherein the first network repair instruction is used for instructing to switch to an access point mode and assist another electronic device associated with the first electronic device in repairing a network connection. The first electronic device starts a 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 network configuration information of a target network to the second electronic device by means of the secure session, and the second electronic device accesses the target network according to the network configuration information. By means of the present application, network repair for whole-house smart devices is completed quickly and efficiently while the security of network configuration information transfer is ensured, thereby improving the user experience.

Description

一种通信系统、网络修复方法及设备Communication system, network repair method and device
相关申请的交叉引用Cross References to Related Applications
本申请要求在2021年11月05日提交中华人民共和国知识产权局、申请号为202111306571.4、申请名称为“一种通信系统、网络修复方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the Intellectual Property Office of the People's Republic of China on November 05, 2021, the application number is 202111306571.4, and the application title is "a communication system, network repair method and equipment", the entire content of which is passed References are incorporated in this application.
技术领域technical field
本申请涉及物联网技术领域,尤其涉及一种通信系统、网络修复方法及设备。The present application relates to the technical field of the Internet of Things, and in particular to a communication system, a network repair method and equipment.
背景技术Background technique
随着宽带业务的普及,智能家居作为物联网(internet of thing,IoT)技术的基础应用,在生活娱乐、学习办公等场景中得到广泛推广。智能家居场景中,用户使用的设备中可以安装IoT应用的客户端,用户的多个电子设备支持绑定到IoT应用的用户账户中。用户可以通过IoT应用控制多个电子设备,进而实现用户使用的设备与多个电子设备的智能联动。例如,用户可以通过IoT应用向智能音箱下达播放音乐的指令,以控制智能音箱播放音乐。With the popularization of broadband services, smart home, as the basic application of Internet of things (IoT) technology, has been widely promoted in scenarios such as life entertainment, study and office. In the smart home scenario, the IoT application client can be installed in the device used by the user, and multiple electronic devices of the user can be bound to the user account of the IoT application. Users can control multiple electronic devices through IoT applications, and then realize the intelligent linkage between the device used by the user and multiple electronic devices. For example, a user can issue an instruction to play music to a smart speaker through an IoT application, so as to control the smart speaker to play music.
电子设备与IoT应用之间的连接一般采用无线保真(wireless fidelity,Wi-Fi)、蓝牙、Zig-bee(紫蜂)等无线连接技术。其中,支持Wi-Fi协议的电子设备可以通过网际互连(internet protocol,IP)协议连接互联网从而接入IoT智能家居平台,IoT智能家居平台可以与用户使用的设备上安装的IoT应用的客户端进行交互,从而实现电子设备与IoT应用的交互。The connection between electronic devices and IoT applications generally adopts wireless connection technologies such as wireless fidelity (Wi-Fi), Bluetooth, and Zig-bee (Zig-Bee). Among them, electronic devices supporting the Wi-Fi protocol can connect to the Internet through the Internet protocol (IP) protocol to access the IoT smart home platform, and the IoT smart home platform can communicate with the client of the IoT application installed on the device used by the user. Interaction, so as to realize the interaction between electronic devices and IoT applications.
多个电子设备可以接入相同的Wi-Fi,从而不同的电子设备之间可以通过Wi-Fi发送消息。但当用户修改了路由设备的Wi-Fi网络配置时,电子设备会与网络断开连接,此时用户在IoT应用上看到的电子设备可能为离线状态。Multiple electronic devices can access the same Wi-Fi, so that different electronic devices can send messages through 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. At this time, the electronic device that the user sees on the IoT application may be offline.
目前当多个电子设备与网络断开连接时,需要用户在IoT应用中分别触发多个电子设备进入配网模式,并通过IoT应用扫描设备配网接入点(access point,AP)重新进行配网,以使多个电子设备重新连接网络。At present, when multiple electronic devices are disconnected from the network, the user needs to trigger multiple electronic devices to enter the distribution network mode in the IoT application, and scan the device distribution network access point (access point, AP) through the IoT application to re-configure. network to allow multiple electronic devices to reconnect to the network.
可见,目前的修复电子设备网络连接的方式较为复杂。It can be seen that the current method for repairing the network connection of electronic equipment is relatively complicated.
发明内容Contents of the invention
本申请提供一种通信系统、网络修复方法及设备,用以提供一种快捷高效的智能家居网络修复方式,提升智能家居的网络修复效率,进而提升用户体验。The present application provides a communication system, a network repair method and equipment, which are used to provide a fast and efficient smart home network repair method, improve the efficiency of smart home network repair, and further improve user experience.
第一方面,本申请提供一种通信系统,该系统包括路由设备、第一电子设备和第二电子设备;第一电子设备与第二电子设备关联。其中,通信系统中的路由设备用于提供目标网络的无线连接。第一电子设备接收第一修复网络指令,第一修复网络指令用于指示第一电子设备切换至接入点AP模式并辅助与第一电子设备关联的其它电子设备修复网络连接。第一电子设备根据第一修复网络指令开启第一AP,第二电子设备接入第一电子设备开启的第一AP,第一电子设备与第二电子设备建立安全会话。第一电子设备通过该安全会话 向第二电子设备发送目标网络的网络配置信息,第二电子设备可以根据该网络配置信息接入目标网络,从而修复网络连接。In a first aspect, the present application provides a communication system, where the 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. Wherein, the routing device in the communication system is used to provide the wireless connection of the target network. The first electronic device receives a first repairing network instruction, and the first repairing network instruction is used to instruct the first electronic device to switch to an AP mode and assist other electronic devices associated with the first electronic device to restore network connections. The first electronic device opens the first AP according to the first repair network instruction, the second electronic device accesses the first AP opened by the first electronic device, 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 can access the target network according to the network configuration information, thereby repairing the network connection.
在该系统中,第一电子设备可以开启用于辅助其它电子设备修复网络连接的接入点,与第一电子设备关联的其它电子设备如第二电子设备可以接入第一电子设备开启的第一AP,从而第一电子设备可以与第二电子设备建立安全会话,并通过该安全会话发送目标网络的网络配置信息。相比于用户依次手动修复电子设备网络连接的方式,本申请提供的网络修复方法在保证传递网络配置信息的安全性的同时,提升电子设备的网络修复效率,快捷高效地完成全屋电子设备的网络修复,提升用户体验。In this system, the first electronic device can open an access point for assisting other electronic devices to repair the network connection, and other electronic devices associated with the first electronic device, such as the second electronic device, can access the first electronic device opened by the first electronic device. An AP, 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 in sequence, the network repair method provided by this application not only ensures the security of transmitting network configuration information, but also improves the efficiency of network repair of electronic devices, and quickly and efficiently completes the repair of electronic devices in the whole house. Network repair to improve user experience.
在一个可能的设计中,第一电子设备具体用于:根据第一会话密钥加密网络配置信息得到第一加密信息,将第一加密信息发送给第二电子设备。第二电子设备具体用于:接收第一加密信息,根据第一会话密钥对第一加密信息进行解密,获取网络配置信息。其中,第一会话密钥为第一电子设备与第二电子设备在建立安全会话过程中协商得到的。In a possible design, the first electronic device is specifically configured to: 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 configured to: receive the first encrypted information, decrypt the first encrypted information according to the first session key, and acquire network configuration information. Wherein, the first session key is obtained through negotiation between the first electronic device and the second electronic device during the establishment of the secure session.
通过该设计,第一电子设备与第二电子设备在建立安全会话过程中,可以协商第一会话密钥,第一会话密钥可以用于加密第一电子设备和第二电子设备之间交互的信息,如第一会话密钥可以用于加密目标网络的网络配置信息,从而保证第一电子设备与第二电子设备可以进行安全的加密通信。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, and the first session key can be used to encrypt the interaction between the first electronic device and the second electronic device Information, such as the first session key, may be used to encrypt network configuration information of the target network, thereby ensuring secure encrypted communication between the first electronic device and the second electronic device.
在一个可能的设计中,第一修复网络指令中包括第一AP的配置信息;第一电子设备具体用于:根据第一修复网络指令中的第一AP的配置信息开启第一AP;或者第一修复网络指令中包括第一AP的标识;第一电子设备具体用于:根据第一修复网络指令中的第一AP的标识确定第一电子设备存储的第一AP的配置信息,根据第一AP的配置信息开启第一AP。In a possible design, the first repair network instruction includes configuration information of the first AP; the first electronic device is specifically configured to: enable the first AP according to the configuration information of the first AP in the first repair network instruction; or An instruction for repairing the network includes the identifier of the first AP; the first electronic device is specifically configured to: determine the configuration information of the first AP stored by the first electronic device according to the identifier of the first AP in the first repairing network instruction; The configuration information of the AP enables the first AP.
通过该设计,第一电子设备可以根据第一修复网络指令中的第一AP的配置信息开启第一AP,或者第一电子设备中预先存储第一AP的配置信息,第一电子设备根据第一修复网络指令中第一AP的标识确定第一AP的配置信息并开启第一AP,灵活实现第一电子设备开启辅助其它电子设备修复网络连接的接入点。Through this design, the first electronic device can start the first AP according to the configuration information of the first AP in the first repair network command, or the configuration information of the first AP is pre-stored in the first electronic device, and the first electronic device can use the first AP configuration information according to the first The identification of the first AP in the network repair instruction determines the configuration information of the first AP and enables the first AP, flexibly realizing that the first electronic device activates an access point that assists other electronic devices in repairing network connections.
在一个可能的设计中,该系统还包括第三电子设备,第一电子设备与第三电子设备关联,第三电子设备与第二电子设备之间的距离小于或等于预设距离阈值;In a possible design, the system further includes a 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;
第一电子设备还用于:向第二电子设备发送第二修复网络指令,第二修复网络指令用于指示第二电子设备切换至AP模式并辅助与第一电子设备关联的其它电子设备修复网络连接;接收第二电子设备转发的来自第三电子设备的请求信息,请求信息用于请求修复第三电子设备的网络连接;根据请求信息确定第二会话密钥;根据第二会话密钥加密网络配置信息得到第二加密信息;将第二加密信息发送给第二电子设备。The first electronic device is also used to: send a second repair network instruction to the second electronic device, the second repair network instruction is used to instruct the second electronic device to switch to the AP mode and assist other electronic devices associated with the first electronic device to repair the network Connect; 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 the second session key according to the request information; encrypt the network according to the second session key Obtain second encrypted information from the configuration information; and send the second encrypted information to the second electronic device.
第二电子设备还用于:接收第一电子设备发送的第二修复网络指令,断开与目标网络的连接,根据第二修复网络指令开启第一AP;接受第三电子设备接入第一AP;接收第三电子设备发送的请求信息,将该请求信息转发至第一电子设备;接收第一电子设备发送的第二加密信息,将第二加密信息转发至第三电子设备。The second electronic device is also used to: receive the second repair network instruction sent by the first electronic device, disconnect the connection with the target network, and open the first AP according to the second repair network instruction; accept the third electronic device to access the first AP ; receiving the request information sent by the third electronic device, and forwarding the request information to the first electronic device; receiving the second encrypted information sent by the first electronic device, and forwarding the second encrypted information to the third electronic device.
第三电子设备用于:接入第二电子设备开启的第一AP;向第二电子设备发送请求信息;接收第二电子设备转发的来自第一电子设备的第二加密信息,根据第二加密信息确定第二会话密钥;根据第二会话密钥对第二加密信息进行解密,获取网络配置信息;根据网络配置信息接入目标网络。The third electronic device is used for: accessing the first AP opened by the second electronic device; sending request information to the second electronic device; receiving the second encrypted information from the first electronic device forwarded by the second electronic device, according to the second encrypted The information determines the second session key; decrypts the second encrypted information according to the second session key to obtain network configuration information; and accesses the target network according to the network configuration information.
通过该设计,当通信系统中包括位于第一电子设备开启的第一AP覆盖范围之外的电子设备时,第一电子设备可以指示第二电子设备开启第一AP并辅助其它电子设备修复网络连接。如第三电子设备与第二电子设备之间的距离小于预设距离阈值,第二电子设备根据第二修复网络指令开启第一AP,第三电子设备接入第二电子设备开启的第一AP,第二电子设备可以作为第一电子设备和第三电子设备的消息转发设备帮助第一电子设备和第三电子设备传递信息。如第二电子设备将第三电子设备发送的请求信息发送给第一电子设备,将第一电子设备发送的第二加密信息转发给第三电子设备,进而辅助第三电子设备获取到目标网络的网络配置信息以修复第三电子设备的网络连接。该方案解决了与第一电子设备距离较远的电子设备的网络修复问题,进一步提升电子设备的网络修复效率。With this design, when the communication system includes an electronic device that is outside the coverage of the first AP that the first electronic device has turned on, the first electronic device can instruct the second electronic device to turn on the first AP and assist other electronic devices to restore 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 repair network instruction, and the third electronic device accesses the first AP turned on by the second electronic device , the second electronic device may 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 transfer information. For example, the second electronic device sends the request information sent by the third electronic device to the first electronic device, forwards the second encrypted information sent by the first electronic device to the third electronic device, and then assists the third electronic device to obtain the information of the target network. Network configuration information to repair the network connection of the third electronic device. The solution solves the problem of network restoration of the electronic equipment that is far away from the first electronic equipment, and further improves the network restoration efficiency of the electronic equipment.
可选的,第一电子设备还可以指示第三电子设备开启第一AP并辅助其它电子设备修复网络连接,例如第四电子设备未位于第一电子设备或第二电子设备开启的第一AP所覆盖的范围中,但第四电子设备位于第三电子设备开启的第一AP所覆盖的范围中,则第三电子设备可以辅助第一电子设备修复第四电子设备的网络连接。以此类推,第一电子设备可以修复处于第一电子设备的第一AP范围内的电子设备,再借助已修复好网络连接的电子设备一层层向外修复外围设备的网络连接,进而完成全屋电子设备的网络修复。Optionally, the first electronic device may also instruct the third electronic device to start the first AP and assist other electronic devices to restore the network connection, for example, the fourth electronic device is not located at the first AP opened by the first electronic device or the second electronic device. However, 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 to restore the network connection of the fourth electronic device. By analogy, the first electronic device can repair the electronic devices within the range of the first AP of the first electronic device, and then repair the network connection of the peripheral device layer by layer with the help of the electronic device that has repaired the network connection, and then complete the entire network connection. Network repair of house electronic equipment.
在一个可能的设计中,第二电子设备具体用于:根据网络配置信息接入目标网络,并与第一电子设备建立安全会话;通过第二电子设备与第一电子设备之间的安全会话,将请求信息发送给第一电子设备,并接收第一电子设备发送的第二加密信息;或者接受第一电子设备接入第二电子设备开启的第一AP,将请求信息发送给第一电子设备,并接收第一电子设备发送的第二加密信息。In a possible design, the second electronic device is specifically configured to: access the target network according to network configuration information, and establish a secure session with the first electronic device; through the secure session between the second electronic device and the first electronic device, Send the request information to 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 opened by the second electronic device, and send the request information to the first electronic device , and receive the second encrypted information sent by the first electronic device.
通过该设计,第二电子设备在向第一电子设备转发第三电子设备发送的请求消息,或第二电子设备接收第一电子设备发送的第二加密信息时,第二电子设备可以接入目标网络后与第一电子设备建立安全会话进行通信,还可以接受第一电子设备接入第二电子设备开启的第一AP进行通信,进而灵活实现第一电子设备与第二电子设备的通信。Through this design, when the second electronic device forwards the request message sent by the third electronic device to the first electronic device, or the second electronic device receives the second encrypted information sent by the first electronic device, the second electronic device can access the target After establishing a secure session with the first electronic device for communication after the network, it is also acceptable for the first electronic device to access the first AP opened by the second electronic device for communication, thereby flexibly realizing the communication between the first electronic device and the second electronic device.
在一个可能的设计中,第一电子设备还用于:在向第二电子设备发送第二修复网络指令之前,确定第一电子设备开启第一AP的时长大于预设时间阈值,和/或,确定与第一电子设备关联的至少一个电子设备未修复网络连接。In a possible design, the first electronic device is further configured to: before sending the second network repair instruction to the second electronic device, determine that the duration for the first electronic device to turn on the first AP is 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.
通过该设计,第一电子设备在开启第一AP的市场大于预设时间阈值,或者第一电子设备确定与第一电子设备关联的至少一个电子设备未修复网络连接,此时未能修复网络连接的电子设备可能位于第一电子设备开启的第一AP无法覆盖的区域,则第一电子设备可以指示第二电子设备开启第一AP并辅助其它电子设备修复网络连接,防止第一电子设备长时间开启第一AP但无法进一步修复其它电子设备,进一步提升网络修复的效率。Through this design, the first electronic device fails to repair the network connection when the market for opening the first AP is greater than the 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. The electronic device may be located in an area that cannot be covered by the first AP enabled by the first electronic device, then the first electronic device can instruct the second electronic device to turn on the first AP and assist other electronic devices to restore the network connection, preventing the first electronic device from being connected for a long time Turn on the first AP but cannot further repair other electronic devices, further improving the efficiency of network repair.
在一个可能的设计中,第二修复网络指令包含目标数量,目标数量用于指示待修复网络连接的电子设备的数量;第二电子设备还用于:确定第二电子设备开启第一AP的时长大于预设时间阈值,和/或,确定已修复网络连接的电子设备数量为目标数量时,关闭第一AP,并根据网络配置信息接入目标网络。In a possible design, the second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired; the second electronic device is also used to: determine the duration for the second electronic device to turn on the first AP is greater than the preset time threshold, and/or, when it is determined that the number of electronic devices connected to the repaired network is the target number, shut down the first AP, and access the target network according to the network configuration information.
通过该设计,第一电子设备可以在第二修复网络指令中携带待修复网络连接的电子设备的目标数量,第二电子设备在确定开启第一AP的时长大于预设时间阈值,或者已修复网络连接的电子设备的数量为目标数量时,及时关闭第一AP,结束辅助修复网络连接的任务,防止第二电子设备在无需辅助其它电子设备修复网络连接时仍开启第一AP。Through this design, the first electronic device can carry the target number of electronic devices connected to the network to be repaired in the second repair network instruction. When the number of connected electronic devices reaches the target number, turn off the first AP in time, end the task of assisting in repairing the network connection, and prevent the second electronic device from still turning on the first AP when there is no need to assist other electronic devices in repairing the network connection.
在一个可能的设计中,第一电子设备中存储与第一电子设备关联的至少一个电子设备的设备标识和认证凭据;第二会话密钥是根据第三电子设备随机生成的第一随机数、第一电子设备随机生成的第二随机数和第三电子设备的认证凭据确定的。In a possible design, 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 a first random number randomly generated by the third electronic device, The second random number randomly generated by the first electronic device is determined by the authentication credential of the third electronic device.
通过该设计,第一电子设备中可以存储与第一电子设备关联的至少一个电子设备的设备标识和认证凭据,从而第一电子设备在接受到第二电子设备转发的来自第三电子设备的请求信息时,可以获取第三电子设备生成的第一随机数,并根据第三电子设备的设备标识确定第三电子设备的认证凭据。第一电子设备随机生成第二随机数后,可以根据第一随机数、第二随机数和第三电子设备的认证凭据确定第二会话密钥,并在第二加密信息中携带第二随机数,以使第三电子设备在接收到第二加密信息时,也可以根据第一随机数、第二随机数和第三电子设备的认证凭据确定第二会话密钥,从而完成第一电子设备和第三电子设备之间的密钥协商,并根据第二会话密钥安全传递目标网络的网络配置信息,保证电子设备修复网络的安全性。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 the first electronic device receives the request from the third electronic device forwarded by the second electronic device information, the first random number generated by the third electronic device may be obtained, and the authentication credential of the third electronic device may be determined according to the device identifier 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 credential of the third electronic device, thereby completing the first electronic device and Key negotiation between the third electronic devices, and secure transfer of network configuration information of the target network according to the second session key, to ensure the security of the electronic device repair network.
在一个可能的设计中,第一电子设备还用于:确定第二电子设备连接到目标网络,并与第一电子设备建立安全会话后,将第二AP的配置信息发送给第二电子设备,第二AP的配置信息用于第二电子设备在下一次网络修复中查找用于辅助修复网络连接的接入点。In a possible design, the first electronic device is further configured to: after determining that the second electronic device is connected to the target network and establishing a secure session with the first electronic device, send configuration information of the second AP to the second electronic device, The configuration information of the second AP is used for the second electronic device to search for an access point for assisting in repairing the network connection in the next network repair.
通过该设计,第一电子设备在检测到与第一电子设备关联的电子设备重新上线时,可以重新随机生成用于修复网络的AP的配置信息,并将重新生成的AP的配置信息下发给重新上线的电子设备,从而更新用于修复网络的AP的配置,防止长时间使用相同AP配置带来安全问题。Through this design, when the first electronic device detects that the electronic device associated with the first electronic device is online again, it can randomly regenerate the configuration information of the AP used to repair the network, and send the regenerated AP configuration information to the The electronic equipment that goes online again updates the configuration of the AP used to repair the network, preventing security issues caused by using the same AP configuration for a long time.
在一个可能的设计中,第一电子设备为家居中枢设备。In a possible design, the first electronic device is a home hub device.
在一个可能的设计中,路由设备为具有路由功能的设备,路由设备包括路由器。In a possible design, the routing device is a device with a routing function, and the routing device includes a router.
第二方面,本申请提供一种网络修复方法,应用于第一电子设备。该方法包括:接收第一修复网络指令;第一修复网络指令用于指示第一电子设备切换至接入点AP模式并辅助与第一电子设备关联的其它电子设备修复网络连接;根据第一修复网络指令开启第一AP;接受第二电子设备接入第一AP,与第二电子设备建立安全会话;第一电子设备与第二电子设备关联;通过安全会话向第二电子设备发送目标网络的网络配置信息,以使第二电子设备根据网络配置信息接入目标网络。In a second aspect, the present application provides a network repair method applied to a first electronic device. The method includes: receiving a first repair network instruction; the first repair network instruction is used to instruct the first electronic device to switch to the access point AP mode and assist other electronic devices associated with the first electronic device to repair the network connection; according to the first repair The network command opens the first AP; accepts the second electronic device to access the first AP, and establishes a secure session with the second electronic device; associates the first electronic device with the second electronic device; sends the target network information to the second electronic device through the secure session Network configuration information, so that the second electronic device accesses the target network according to the network configuration information.
在一个可能的设计中,通过安全会话向第二电子设备发送目标网络的网络配置信息,包括:根据第一会话密钥加密网络配置信息得到第一加密信息,将第一加密信息发送给第二电子设备;其中,第一会话密钥为第一电子设备与第二电子设备在建立安全会话过程中协商得到的。In a possible design, sending the network configuration information of the target network to the second electronic device through a secure session includes: encrypting the network configuration information according to the first session key to obtain first encrypted information, and sending the first encrypted information to the second electronic device An electronic device; wherein, 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.
在一个可能的设计中,第一修复网络指令包括第一AP的配置信息;根据第一修复网络指令开启第一AP,包括:根据第一修复网络指令中的第一AP的配置信息开启第一AP;或者第一修复网络指令中包括第一AP的标识;根据第一修复网络指令开启第一AP,包括:根据第一修复网络指令中的第一AP的标识确定第一电子设备存储的第一AP的配置信息,根据第一AP的配置信息开启第一AP。In a possible design, the first repair network instruction includes configuration information of the first AP; starting the first AP according to the first repair network instruction includes: starting the first AP according to the configuration information of the first AP in the first repair network instruction AP; or the first repair network instruction includes the identifier of the first AP; according to the first repair network instruction, enabling the first AP includes: determining the first AP stored in the first electronic device according to the identifier of the first AP in the first repair network instruction configuration information of an AP, and enable the first AP according to the configuration information of the first AP.
在一个可能的设计中,该方法还包括:向第二电子设备发送第二修复网络指令,第二修复网络指令用于指示第二电子设备切换至AP模式并辅助与第一电子设备关联的其它电子设备修复网络连接;接收第二电子设备转发的来自第三电子设备的请求信息,该请求信息用于请求修复第三电子设备的网络连接;第一电子设备与第三电子设备关联,第三电子 设备与第二电子设备之间的距离小于或等于预设距离阈值;根据请求信息确定第二会话密钥;根据第二会话密钥加密网络配置信息得到第二加密信息,将第二加密信息发送给第二电子设备,以使第三电子设备根据第二电子设备转发的第二加密信息接入目标网络。In a possible design, the method further 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 the AP mode and assist other devices associated with the first electronic device The electronic device repairs the network connection; receives the request information from the third electronic device forwarded by the second electronic device, and 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 third electronic device The distance between the electronic device and the second electronic device is less than or equal to a preset distance threshold; the second session key is determined 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 encrypted and send it to the second electronic device, so that the third electronic device accesses the target network according to the second encrypted information forwarded by the second electronic device.
在一个可能的设计中,接收第二电子设备转发的来自第三电子设备的请求信息,包括:通过第一电子设备与第二电子设备之间的安全会话,接收第二电子设备发送的请求信息;或者接入第二电子设备开启的第一AP,接收第二电子设备发送的请求信息;In a 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 access the first AP enabled by the second electronic device, and receive the request information sent by the second electronic device;
将第二加密信息发送给第二电子设备,包括:通过第一电子设备与第二电子设备之间的安全会话,将第二加密信息发送给第二电子设备;或者接入第二电子设备开启的第一AP,将第二加密信息发送给第二电子设备;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 second electronic device to open The first AP sends the second encrypted information to the second electronic device;
其中,第一电子设备与第二电子设备之间的安全会话为第二电子设备根据网络配置接入目标网络后建立的。Wherein, 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.
在一个可能的设计中,在向第二电子设备发送第二修复网络指令之前,该方法还包括:确定第一电子设备开启第一AP的时长大于预设时间阈值,和/或,确定与第一电子设备关联的至少一个电子设备未修复网络连接。In a possible design, before sending the second network repair instruction to the second electronic device, the method further includes: determining that the time period for the first electronic device to turn on the first AP is greater than a preset time threshold, and/or, determining the same time as the first AP At least one electronic device associated with an electronic device has not repaired the network connection.
在一个可能的设计中,第二修复网络指令包含目标数量,目标数量用于指示待修复网络连接的电子设备的数量。In a possible design, the second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired.
在一个可能的设计中,第一电子设备中存储与第一电子设备关联的至少一个电子设备的设备标识和认证凭据;第二会话密钥是根据第三电子设备随机生成的第一随机数、第一电子设备随机生成的第二随机数和第三电子设备的认证凭据确定的。In a possible design, 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 a first random number randomly generated by the third electronic device, The second random number randomly generated by the first electronic device is determined by the authentication credential of the third electronic device.
在一个可能的设计中,该方法还包括:确定第二电子设备连接到目标网络,并与第一电子设备建立安全会话后,将第二AP的配置信息发送给第二电子设备,第二AP的配置信息用于第二电子设备在下一次网络修复中查找用于辅助修复网络连接的接入点。In a possible design, the method further includes: after determining that the second electronic device is connected to the target network and establishing a secure session with the first electronic device, sending configuration information of the second AP to the second electronic device, and the second AP The configuration information is used by the second electronic device to find an access point for assisting in repairing the network connection in the next network repair.
在一个可能的设计中,第一电子设备为家居中枢设备。In a possible design, the first electronic device is a home hub device.
第三方面,本申请提供一种网络修复方法,应用于第二电子设备。该方法包括:接入第一电子设备开启的第一AP,与第一电子设备建立安全会话;第一电子设备与第二电子设备关联;第一AP为第一电子设备开启的用于辅助与第一电子设备关联的其它电子设备修复网络连接的接入点;接收第一电子设备通过安全会话发送的目标网络的网络配置信息;根据网络配置信息接入目标网络。In a third aspect, the present application provides a network repair method applied to a second electronic device. The method includes: accessing the first AP opened by the first electronic device, establishing a secure session with the first electronic device; associating the first electronic device with the second electronic device; Other electronic devices associated with the first electronic device repair the access point of the network connection; receive the network configuration information of the target network sent by the first electronic device through the secure session; and access the target network according to the network configuration information.
在一个可能的设计中,接收第一电子设备通过安全会话发送的目标网络的网络配置信息,包括:接收第一电子设备发送的第一加密信息,根据第一会话密钥对第一加密信息进行解密,获取网络配置信息;其中,第一会话密钥为第一电子设备与第二电子设备在建立安全会话过程中协商得到的。In a possible design, receiving the network configuration information of the target network sent by the first electronic device through a secure session includes: receiving first encrypted information sent by the first electronic device, and performing encryption on the first encrypted information according to the first session key Decrypt to obtain network configuration information; wherein, 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.
在一个可能的设计中,该方法还包括:接收第一电子设备发送的第二修复网络指令,第二修复网络指令用于指示第二电子设备切换至AP模式并辅助与第一电子设备关联的其它电子设备修复网络连接;根据第二修复网络指令开启第一AP;接受第三电子设备接入第一AP;所述第三电子设备与第一电子设备关联;接收第三电子设备发送的请求信息,请求信息用于请求修复第三电子设备的网络连接;将请求信息转发至第一电子设备;接收第一电子设备发送的第二加密信息,将第二加密信息转发至第三电子设备,以使第三电子设备获取第二加密信息中的网络配置信息,并根据网络配置信息接入目标网络;其中,第二加密信息为第一电子设备根据第二会话密钥加密网络配置信息得到的。In a possible design, the method further 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 the AP mode and assist the Other electronic devices repair the network connection; open the first AP according to the second repair network instruction; accept the third electronic device to access the first AP; the third electronic device is associated with the first electronic device; receive the request sent by the third electronic device information, the request information is used to request to repair the network connection of the third electronic device; 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, so that the third electronic device obtains the 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 encrypting the network configuration information by the first electronic device according to the second session key .
在一个可能的设计中,将请求信息转发至第一电子设备,包括:根据网络配置信息接入目标网络,并与第一电子设备建立安全会话;通过第二电子设备与第一电子设备之间的安全会话,将请求信息发送给第一电子设备;或者接受第一电子设备接入第二电子设备开启的第一AP,将请求信息发送给第一电子设备。In a 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; the secure session, and send the request information to the first electronic device; or accept the first electronic device to access the first AP opened by the second electronic device, and send the request information to the first electronic device.
接收第一电子设备发送的第二加密信息,包括:根据网络配置信息接入目标网络,并与第一电子设备建立安全会话;通过第二电子设备与第一电子设备之间的安全会话,接收第一电子设备发送的第二加密信息;或者接受第一电子设备接入第二电子设备开启的第一AP,接收第一电子设备发送的第二加密信息。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 encrypted message through the secure session between the second electronic device and the first electronic device The second encrypted information sent by the first electronic device; or accepting the first electronic device's access to the first AP enabled by the second electronic device, and receiving the second encrypted information sent by the first electronic device.
在一个可能的设计中,第二修复网络指令包含目标数量,目标数量用于指示待修复网络连接的电子设备的数量;该方法还包括:确定第二电子设备开启第一AP的时长大于预设时间阈值,和/或,确定已修复网络连接的电子设备数量为目标数量时,关闭第一AP,并根据网络配置信息接入目标网络。In a possible design, the second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired; the method also includes: determining that the time for the second electronic device to turn on the first AP is longer than the preset The time threshold, and/or, when it is determined that the number of electronic devices connected to the repaired network is the target number, shut down the first AP, and access the target network according to the network configuration information.
在一个可能的设计中,第一电子设备中存储与第一电子设备关联的至少一个电子设备的设备标识和认证凭据;第二会话密钥是根据第三电子设备随机生成的第一随机数、第一电子设备随机生成的第二随机数和第三电子设备的认证凭据确定的。In a possible design, 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 a first random number randomly generated by the third electronic device, The second random number randomly generated by the first electronic device is determined by the authentication credential of the third electronic device.
在一个可能的设计中,在根据网络配置信息接入目标网络之后,该方法还包括:与第一电子设备建立安全会话,接收第一电子设备发送的第二AP的配置信息,第二AP的配置信息用于第二电子设备在下一次网络修复中查找用于辅助修复网络连接的接入点。In a possible design, after accessing the target network according to the network configuration information, the method further includes: establishing a secure session with the first electronic device, receiving the configuration information of the second AP sent by the first electronic device, and the second AP's The configuration information is used for the second electronic device to find an access point for assisting in repairing the network connection in the next network repair.
第四方面,本申请提供一种电子设备。电子设备包括多个功能模块;多个功能模块相互作用,实现上述第二方面或第三方面及其各实施方式中的方法。多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且多个功能模块可以基于具体实现进行任意组合或分割。In a fourth aspect, the present application provides an electronic device. The electronic device includes a plurality of functional modules; the plurality of functional modules interact to implement the method in the second aspect or the third aspect and the implementation manners thereof. Multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and multiple functional modules can be combined or divided arbitrarily based on specific implementations.
第五方面,本申请提供一种电子设备,包括至少一个处理器和至少一个存储器。至少一个存储器中存储计算机程序指令,当电子设备运行时,至少一个处理器执行上述第二方面或第三方面及其各实施方式中存储设备执行的方法。In a fifth aspect, the present application provides an electronic device, including at least one processor and at least one memory. Computer program instructions are stored in at least one memory, and when the electronic device is running, at least one processor executes the method executed by the storage device in the second aspect or the third aspect and various implementations thereof.
第六方面,本申请还提供一种计算机程序。当计算机程序在计算机上运行时,使得计算机执行上述任一方面及其各实施方式中的方法。In a sixth aspect, the present application further provides a computer program. When the computer program runs on the computer, it causes the computer to execute the method in any one of the above aspects and its implementations.
第七方面,本申请还提供一种计算机可读存储介质。计算机可读存储介质中存储有计算机程序,当计算机程序被计算机执行时,使得计算机执行上述任一方面及其各实施方式中的方法。In a seventh aspect, the present application further provides a computer-readable storage medium. A computer program is stored in a computer-readable storage medium, and when the computer program is executed by a computer, the computer is made to perform the methods in any one of the above aspects and implementations thereof.
第八方面,本申请还提供一种芯片。芯片用于读取存储器中存储的计算机程序,执行上述任一方面及其各实施方式中的方法。In an eighth aspect, the present application further provides a chip. The chip is used to read the computer program stored in the memory, and execute the methods in any one of the above-mentioned aspects and its implementations.
第九方面,本申请还提供一种芯片系统。该芯片系统包括处理器,用于支持计算机装置实现上述任一方面及其各实施方式中的方法。在一种可能的设计中,芯片系统还包括存储器,存储器用于保存该计算机装置必要的程序和数据。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。In a ninth aspect, the present application further provides a chip system. The system-on-a-chip includes a processor, configured to support a computer device to implement any one of the above-mentioned aspects and the methods in each implementation manner thereof. In a possible design, the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device. The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
附图说明Description of drawings
图1为本申请实施例提供的一种智能家居场景的示意图;FIG. 1 is a schematic diagram of a smart home scene provided by an embodiment of the present application;
图2为一种用户手动修复电子设备的网络连接的示意图;FIG. 2 is a schematic diagram of a user manually repairing a network connection of an electronic device;
图3为本申请实施例提供的一种通信系统的示意图;FIG. 3 is a schematic diagram of a communication system provided by an embodiment of the present application;
图4为本申请实施例提供的一种网络修复方法的流程图;FIG. 4 is a flow chart of a network repair method provided in an embodiment of the present application;
图5为本申请实施例提供的一种第一电子设备与第二电子设备建立安全会话的方法示意图;FIG. 5 is a schematic diagram of a method for establishing a secure session between a first electronic device and a second electronic device according to an embodiment of the present application;
图6为本申请实施例提供的一种第一电子设备、第二电子设备和第三电子设备的位置示意图;FIG. 6 is a schematic diagram of positions of a first electronic device, a second electronic device, and a third electronic device provided by an embodiment of the present application;
图7为本申请实施例适用的一种网络修复场景的示意图;FIG. 7 is a schematic diagram of a network repair scenario applicable to an embodiment of the present application;
图8为本申请实施例提供的一种网络修复方法的流程示意图;FIG. 8 is a schematic flowchart of a network repair method provided in an embodiment of the present application;
图9为本申请实施例提供的一种网络修复方法的流程示意图。FIG. 9 is a schematic flowchart of a network repair method provided by an embodiment of the present application.
具体实施方式Detailed ways
物联网(internet of thing,IoT),可以理解为“万物相连的互联网”,是互联网基础上延伸和扩展的网络,是将各种信息传感设备与网络结合起来而形成的一个巨大网络,可以实现任何时间、任何地点,人、机、物的互联互通。The Internet of Things (IoT), which can be understood as "the Internet where everything is connected", is an extended and expanded network based on the Internet. It is a huge network formed by combining various information sensing devices with the network. Realize the interconnection of people, machines and things at any time and any place.
智能家居是物联网在家庭中的基础应用,随着宽带业务的普及,智能产品涉及到用户生活中的方方面面。图1为本申请实施例提供的一种智能家居场景的示意图。参考图1,该场景包括路由设备、家居中枢设备、至少一个电子设备以及用户使用的设备。家居中枢设备和至少一个电子设备可以接入路由设备中以建立网络连接。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. FIG. 1 is a schematic diagram of a smart home scene provided by an embodiment of the present application. Referring to FIG. 1 , the scene includes a routing device, a home hub device, at least one electronic device, and devices 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.
其中,路由设备可以为具有路由功能的设备,例如路由器。电子设备可以为智能家居设备,例如智能门铃、智能门锁、电冰箱、洗衣机、智能音箱、智能电视等IoT设备。家居中枢设备可以集成家居业务服务,对智能家居场景中的至少一个电子设备进行控制。家居中枢设备可以为常驻在家庭中的长电设备,如智能音箱、智能电视、智能路由设备、机顶盒等设备。Wherein, the routing device may be a device having a routing function, such as a router. The electronic device may be a smart home device, such as an IoT device such as a smart doorbell, a smart door lock, a refrigerator, a washing machine, a smart speaker, and a smart TV. The home hub device can integrate home business services to control at least one electronic device in a smart home scene. The home hub device may be a long-term power device that is resident in the home, such as smart speakers, smart TVs, smart routing devices, set-top boxes, and other devices.
在图1所示的场景中,用户使用的设备上可以安装IoT应用,至少一个电子设备可以绑定到该IoT应用中的用户账户上。用户可以操作IoT应用为至少一个电子设备进行配网,当电子设备绑定到用户账户且完成配网时,用户可以在IoT应用中查看到电子设备的状态等信息,并且用户可以通过IoT应用控制电子设备。例如,智能音箱在绑定到用户账户,并且完成配网后,用户可以在IoT应用中查看智能音箱的状态为“已上线”,用户可以点击IoT应用中的快捷指令入口,用户使用的设备响应于用户触发的操作,向智能音箱发送控制指令,如控制智能音箱播放音乐。In the scenario shown in FIG. 1 , an IoT application can be installed on a device used by a 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 information such as the status of the electronic device in the IoT application, and the user can control it through the IoT application. Electronic equipment. 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 the shortcut command entry in the IoT application, and the device used by the user responds Based on the operation triggered by the user, control instructions are sent to the smart speaker, such as controlling the smart speaker to play music.
用户使用的设备上安装的IoT应用可以为IoT应用的客户端,许多电子设备厂家或IoT解决方案商还提供智能家居服务器平台或IoT云服务器,IoT云服务器可以从用户使用的设备上安装的IoT应用客户端上获取绑定到用户账户的电子设备的信息,从而对多个电子设备进行数据分析和管理。The IoT application installed on the device used by the user can be the client of the IoT application. Many electronic equipment manufacturers or IoT solution providers also provide smart home server platforms or IoT cloud servers. The information of the electronic devices bound to the user account is acquired on the application client, so as to perform data analysis and management on multiple electronic devices.
在一些场景中,IoT应用可以将与用户账户绑定的至少一个电子设备的设备标识、认证凭据等信息同步至家居中枢设备。其中,电子设备的认证凭据为IoT应用获取到的用于与电子设备建立安全会话的信息。家居中枢设备接收到至少一个电子设备的设备标识、认证凭据等信息后,可以认为家居中枢设备与至少一个电子设备关联,此时至少一个电子设备可以通过家居中枢设备代理连接IoT应用或IoT云服务器,从而通过汇聚连接到家居中枢设备,实现统一控制、数据统一分析、跨设备智能联动等业务。可选地,家居中枢设备 可以作为控制设备控制至少一个电子设备运行,也可以作为被控设备接受IoT应用的控制。In some scenarios, the IoT application can synchronize information such as device identification and authentication credentials of at least one electronic device bound to the user account to the home hub device. Wherein, the authentication credential of the electronic device is information obtained by the IoT application for establishing a secure session with the electronic device. After the home hub device receives information such as the device identification and authentication credentials 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 , so as to achieve unified control, unified data analysis, and cross-device intelligent linkage and other services through converging and connecting to the home central equipment. Optionally, the home hub device can be used as a control device to control the operation of at least one electronic device, and can also be controlled by an IoT application as a controlled device.
图1所示的智能家居场景可以通过前装和后装两种方式实现,其中,后装是指用户先装修房屋,然后自行购买电子设备并绑定到自己的用户账户中;前装是指IoT解决方案商与地产公司合作,在地产项目交付给最终住户的装修阶段,就完成电子设备的安装和调测,在用户入住后可以直接将电子设备绑定到自己的用户账户中。The smart home scene shown in Figure 1 can be realized in two ways: pre-installation and post-installation. The post-installation means that the user first decorates the house, and then purchases electronic equipment by himself and binds it to his user account; IoT solution providers cooperate with real estate companies to complete the installation and commissioning of electronic equipment during the decoration stage of real estate projects delivered to final residents. After users move in, they can directly bind electronic equipment to their user accounts.
参考图1,家居中枢设备和至少一个电子设备可以接入路由设备以建立网络连接,此时家居中枢设备和至少一个电子设备接入相同的无线局域网,家居中枢设备可以和至少一个电子设备交互。在有些情况下,用户可能会修改当前网络的配置信息,如在前装全屋智能时,装修人员可能已经设置好家庭路由设备的网络,如装修人员已设置好网络名称以及密码,用户收房后,一般出于安全考虑会更改网络的配置信息;或者在日常使用过程中,用户也可能会对网络配置信息进行修改。当用户修改了网络配置信息时,家居中枢设备和至少一个电子设备会断开网络连接,用户在IoT应用上查看到的各个设备的状态例如为“未上线”,此时用户无法通过IoT应用控制各个设备。Referring to FIG. 1, the home hub device and at least one electronic device can be connected to the routing device to establish a network connection. At this time, the home hub device and the at least one electronic device are connected to the same wireless local area network, and the home hub device can interact with the at least one electronic device. In some cases, the user may modify the configuration information of the current network. For example, when the whole house is installed smartly, the decoration personnel may have set up the network of the home routing equipment. For example, the decoration personnel have set the network name and password, and the user receives the house Afterwards, the network configuration information is generally changed for security reasons; or in the course of 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 it through the IoT application individual devices.
目前在家居中枢设备和至少一个电子设备断开网络连接时,需要用户通过IoT应用手动修复每个设备的网络连接。图2为一种用户手动修复电子设备的网络连接的示意图。参考图2,用户修改网络配置信息后,电子设备A、电子设备B以及电子设备C均断开网络连接。用户需要分别修复电子设备A、电子设备B以及电子设备C的网络连接。以用户手动修复电子设备A的网络连接为例,用户可以按下电子设备A的配网按钮,触发电子设备A进入配网模式,或者电子设备A在断开网络连接后,若重新连接Wi-Fi失败,则自动进入配网模式。在电子设备A进入配网模式后,用户可以在IoT应用中扫描设备,在扫描设备获取到的设备列表中选择电子设备A,并为电子设备A进行配网。类似的,用户还需要手动为电子设备B以及电子设备C进行配网,以修复多个电子设备的网络连接。Currently, when the home hub device and at least one electronic device are disconnected from the network, the user is required to manually restore the network connection of each device through the IoT application. FIG. 2 is a schematic diagram of a user manually repairing a network connection of an electronic device. Referring to FIG. 2 , after the user modifies the network configuration information, electronic device A, electronic device B, and electronic device C all disconnect 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 user manually repairing the network connection of electronic device A as an example, the user can press the network distribution button of electronic device A to trigger electronic device A to enter the network distribution mode, or after electronic device A disconnects from the network, if it reconnects to Wi- If Fi fails, it will automatically enter the network distribution mode. After electronic device A enters the network configuration mode, the user can scan the device in the IoT application, select electronic device A in the device list obtained by scanning the device, and perform network configuration for electronic device A. Similarly, the user also needs to manually configure the network for the electronic device B and the electronic device C, so as to repair the network connection of multiple electronic devices.
可见,目前的修复电子设备的网络连接的方式较为复杂,需要用户手动修复多个设备的网络连接,操作繁琐,用户体验差。It can be seen that the current method for repairing the network connection of electronic devices is relatively complicated, and requires the user to manually repair the network connections of multiple devices, which is cumbersome to operate and poor in user experience.
基于上述问题,本申请实施例提供一种网络修复方法,在该方法中,用户手动修复家居中枢设备的网络连接后,可以触发家居中枢设备为其它电子设备进行网络修复。家居中枢设备可以与其它电子设备建立安全会话,并通过安全会话向其它电子设备下发网络配置信息,以辅助其它电子设备修复网络连接。Based on the above problems, an embodiment of the present application provides a network restoration method. In this method, after the user manually restores 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 deliver network configuration information to other electronic devices through the secure session, so as to assist other electronic devices to restore network connections.
图3为本申请实施例提供的一种通信系统的示意图,参考图3,该系统包括路由设备、第一电子设备和第二电子设备。其中,第一电子设备可以为家居中枢设备,第一电子设备中存储有与第一电子设备关联的至少一个电子设备的标识,第二电子设备为与第一电子设备关联的电子设备。可选的,本申请实施例对第二电子设备的数量并不进行限定,第二电子设备可以只有一个,也可以存在多个。例如,图3中以该系统中包括3个第二电子设备为例示出。进一步地,图3所示的通信系统还可以包括第三电子设备,第三电子设备与第一电子设备关联,且第三电子设备与第一电子设备的物理距离较远。FIG. 3 is a schematic diagram of a communication system provided by an embodiment of the present application. Referring to FIG. 3 , the system includes a routing device, a first electronic device, and a second electronic device. Wherein, 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, this embodiment of the present application does not limit the number of second electronic devices, and there may be only one second electronic device, or there may be multiple second electronic devices. For example, FIG. 3 shows that the system includes three second electronic devices as an example. Further, the communication system shown in FIG. 3 may further include a third electronic device, the third electronic device is associated with the first electronic device, and the physical distance between the third electronic device and the first electronic device is relatively long.
可选的,当单个路由设备的覆盖范围不能满足全屋电子设备的网络连接需求时,可以设置子路由以扩大Wi-Fi网络的覆盖范围。Optionally, when the coverage of a single routing device cannot meet the network connection requirements of electronic devices in the whole house, sub-routing can be set to expand the coverage of the Wi-Fi network.
下面结合图3所示的通信系统对本申请实施例提供的网络修复方法进行介绍。图4为本申请实施例提供的一种网络修复方法的流程图,其中,第二电子设备可以为图3所示的任一个第二电子设备。参考图4,该方法包括以下步骤:The following describes the network repair method provided by the embodiment of the present application with reference to the communication system shown in FIG. 3 . FIG. 4 is a flow chart of a network repair method provided by an embodiment of the present application, wherein the second electronic device may be any second electronic device shown in FIG. 3 . With reference to Fig. 4, this method comprises the following steps:
S401:第一电子设备响应于第一修复网络指令,开启第一AP。S401: The first electronic device turns on the first AP in response to a first network repair instruction.
用户修改目标网络的网络配置信息后,可以手动修复第一电子设备的网络连接。第一电子设备在重新连接到路由设备后,用户可以触发用于指示第一电子设备切换至AP模式修复其它电子设备的网络连接的第一修复网络指令。第一电子设备响应于第一修复网络指令,确定当前存在与第一电子设备关联的电子设备未上线,则第一电子设备切换为AP模式,开启第一AP。After the user modifies the network configuration information of the target network, the network connection of the first electronic device can be manually restored. After the first electronic device is reconnected to the routing device, the user may trigger a first repair network instruction for instructing the first electronic device to switch to an AP mode to restore network connections of other electronic devices. In response to the first repair network instruction, the first electronic device 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 an AP mode, and turns on the first AP.
一种可选的实施方式中,第一修复网络指令中可以包括第一AP的配置信息,第一AP的配置信息可以包括第一AP的标识与密码。第一电子设备在接收到第一修复网络指令之后,可以根据第一修复网络指令中的第一AP的配置信息开启第一AP。In an optional implementation manner, the first repair network 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 start the first AP according to the configuration information of the first AP in the first network repair instruction.
又一种可选的实施方式中,第一修复网络指令中可以包括第一AP的标识。第一电子设备在接收到第一修复网络指令之后,可以根据第一修复网络指令中的第一AP的标识确定第一电子设备中存储的第一AP的配置信息,并根据第一AP的配置信息开启第一AP。In yet another optional implementation manner, the first repair network instruction may include the identifier of the first AP. After the first electronic device receives the first repair network instruction, it can determine the configuration information of the first AP stored in the first electronic device according to the first AP identification in the first repair network instruction, and according to the configuration information of the first AP The information turns on the first AP.
其中,第一电子设备切换为AP模式表示此时第一电子设备可以作为第一AP接受其它设备的接入。可选地,第一AP的配置信息可以是第一电子设备预先随机生成的,并且第一电子设备在随机生成第一AP的配置信息后,将第一AP的配置信息通过安全会话下发给至少一个在线的与第一电子设备关联的电子设备。Wherein, the switching of the first electronic device to the AP mode means that the first electronic device can serve as the first AP to accept access from other devices at this time. Optionally, the configuration information of the first AP may be randomly generated by the first electronic device in advance, 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 the At least one online electronic device associated with the first electronic device.
需要说明的是,电子设备在线可以指该电子设备已连接网络且该电子设备与第一电子设备已建立安全会话。It should be noted that the electronic device being online may refer to that the electronic device is connected to a network and a secure session has been established between the electronic device and the first electronic device.
S402:第二电子设备接入第一电子设备开启的第一AP。S402: The second electronic device accesses the first AP enabled by the first electronic device.
其中,第二电子设备为与第一电子设备关联的电子设备,第二电子设备在断开网络连接后,可以周期性尝试重新连接目标网络。由于此时目标网络的网络配置信息已发生变化,第二电子设备根据已失效的网络配置信息无法重新连接网络。第二电子设备可以根据存储的第一AP配置信息接入到第一AP中,其中,第一AP的配置信息可以为第二电子设备在最近一次上线时从第一电子设备接收到的。Wherein, the second electronic device is an electronic device associated with the first electronic device, and the second electronic device may periodically try to reconnect to the target network after being disconnected from the network. Since the network configuration information of the target network has changed at this time, the second electronic device cannot reconnect to the network according to the expired network configuration information. The second electronic device may access the first AP according to the stored configuration information of the first AP, wherein the configuration information of the first AP may be received from the first electronic device when the second electronic device went online last time.
可选的,第二电子设备在确定断开网络连接后,可以周期性重新连接上一次连接的无线网络,并且可以周期性连接第一AP,从而不断尝试重连上一次连接的无线网络,同时不断尝试接入用于辅助第二电子设备修复网络的第一AP,提升第二电子设备重新接入网络的效率。Optionally, after the second electronic device determines to be disconnected from the network, it may periodically reconnect to the last connected wireless network, and may periodically connect to the first AP, thereby continuously trying to reconnect to the last connected wireless network, and at the same time Continuously trying to access the first AP for assisting the second electronic device to repair the network, improving the efficiency of the second electronic device re-connecting to the network.
S403:第一电子设备与第二电子设备建立安全会话。S403: The first electronic device establishes a secure session with the second electronic device.
例如,图5为本申请实施例提供的一种第一电子设备与第二电子设备建立安全会话的方法示意图。根据前述介绍可知,第二电子设备是与第一电子设备关联的电子设备,第一电子设备与第二电子设备中可以存储第二电子设备的设备标识以及认证凭据。其中,第二电子设备中存储的第二电子设备的认证凭据可以为IoT应用在第二电子设备绑定到用户账户时生成并发给第二电子设备的,第一电子设备中存储的第二电子设备的认证凭据可以为IoT应用发送给第一电子设备的。参考图5,第一电子设备与第二电子设备建立安全会话的方法包括以下步骤:For example, FIG. 5 is a schematic diagram of a method for establishing a secure session between a first electronic device and a second electronic device according to an embodiment of the present application. According to the foregoing introduction, it can be seen that the second electronic device is an electronic device associated with the first electronic device, and the first electronic device and the second electronic device may store a device identifier and an authentication credential of the second electronic device. Wherein, the authentication credential of the second electronic device stored in the second electronic device may 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 second electronic device stored in the first electronic device The authentication credential of the device may be sent to the first electronic device by the IoT application. Referring to FIG. 5, the method for establishing a secure session between the first electronic device and the second electronic device includes the following steps:
S501:第一电子设备发送组播信号,第二电子设备接收到第一电子设备的组播信号。S501: The first electronic device sends a multicast signal, and the second electronic device receives the multicast signal of the first electronic device.
S502:第二电子设备向第一电子设备发送第二电子设备的设备标识。S502: The second electronic device sends the device identifier of the second electronic device to the first electronic device.
S503:第一电子设备根据接收到的第二电子设备的设备标识确定第二电子设备为与第一电子设备关联的设备。S503: The first electronic device determines, according to the received device identifier of the second electronic device, that the second electronic device is a device associated with the first electronic device.
S504:第一电子设备生成随机数RN1。S504: The first electronic device generates a random number RN1.
S505:第一电子设备向第二电子设备发送RN1。S505: The first electronic device sends RN1 to the second electronic device.
S506:第二电子设备生成随机数RN2,并根据第二电子设备的认证凭据、RN1和RN2确定第一会话密钥。S506: The second electronic device generates a random number RN2, and determines the first session key according to the authentication credentials of the second electronic device, RN1 and RN2.
例如,第一会话密钥与第二电子设备的认证凭据、RN1和RN2可以满足以下公式:For example, the first session key and the authentication credentials of the second electronic device, RN1 and RN2 may satisfy the following formula:
KEY1=AuthCode2+RN1+RN2KEY1=AuthCode2+RN1+RN2
其中,KEY1为第一会话密钥,AuthCode2为第二电子设备的认证凭据。Wherein, KEY1 is the first session key, and AuthCode2 is the authentication credential of the second electronic device.
S507:第二电子设备向第一电子设备发送RN2。S507: The second electronic device sends RN2 to the first electronic device.
S508:第一电子设备根据第二电子设备的认证凭据、RN1和RN2确定第一会话密钥。S508: The first electronic device determines the first session key according to the authentication credential of the second electronic device, RN1 and RN2.
S509:第一电子设备与第二电子设备根据第一会话密钥进行加密通信。S509: The first electronic device and the second electronic device perform encrypted communication according to the first session key.
例如,第一电子设备可以使用第一会话密钥加密控制指令,并将加密后的控制指令发送给第二电子设备。又例如,第二电子设备可以使用第一会话密钥加密传感事件,并将加密后的传感事件上报给第一电子设备。For example, the first electronic device may use the first session key to encrypt the control instruction, and send the encrypted control instruction to the second electronic device. For another example, the second electronic device may use the first session key to encrypt the sensing event, and report the encrypted sensing event to the first electronic device.
S404:第一电子设备通过安全会话将目标网络的网络配置信息发送给第二电子设备。S404: The first electronic device sends the network configuration information of the target network to the second electronic device through the secure session.
一种可选的实施方式中,在第一电子设备与第二电子设备建立安全会话后,第一电子设备可以使用第一会话密钥加密目标网络的网络配置信息得到第一加密信息,并将第一加密信息发送给第二电子设备。第二电子设备在获取到第一加密信息后,可以根据第一会话密钥对第一加密信息进行解密,得到网络配置信息。In an optional implementation manner, 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 the first encrypted information, and The first encrypted information is sent 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 network configuration information.
通过该方式,可以保证第一电子设备向第二电子设备传递网络配置信息的安全性。In this way, the security of the network configuration information transmitted by the first electronic device to the second electronic device can be guaranteed.
S405:第二电子设备根据网络配置信息接入目标网络。S405: The second electronic device accesses the target network according to the network configuration information.
可选的,网络配置信息中可以包括网络标识和密码。其中,网络标识例如可以为服务集标识(service set identifier,SSID)。第二电子设备在获取到网络配置信息后扫描网络,从当前可扫描到的网络中确定网络标识对应的目标网络,并根据网络配置信息中的密码连接该目标网络,从而重新建立网络连接。Optionally, the network configuration information may include a network ID and a password. Wherein, the network identifier may be, for example, a service set identifier (service set identifier, SSID). After obtaining the network configuration information, the second electronic device scans the network, determines the target network corresponding to the network identifier from currently scannable networks, and connects to the target network according to the password in the network configuration information, thereby re-establishing the network connection.
进一步的,图3所示的通信系统还可以包括第三电子设备。第三电子设备为与第一电子设备关联的电子设备,且第三电子设备与第二电子设备之间的距离小于或等于预设距离阈值。第三电子设备可以为无法连接到第一AP的IoT设备,如第三电子设备设置在与第一电子设备物理距离较远的位置,此时第三电子设备未位于第一电子设备开启的第一AP的覆盖范围内,但第三电子设备与第二电子设备之间的距离小于或等于预设距离阈值,其中,预设距离阈值可以为第二电子设备开启的第一AP所能覆盖的范围。也就是说,第三电子设备位于第二电子设备开启的第一AP的覆盖范围内。本申请实施例对第三电子设备的数量不做限定,第三电子设备可以只有一个,也可以存在多个。例如,图3中以该系统中包括2个第三电子设备为例示出。Further, the communication system shown in FIG. 3 may further 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. Within the coverage of an AP, but the distance between the third electronic device and the second electronic device is less than or equal to the preset distance threshold, where the preset distance threshold can be covered by the first AP enabled by the second electronic device scope. That is to say, the third electronic device is located 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 third electronic device, or there may be multiple third electronic devices. For example, FIG. 3 shows that the system includes two third electronic devices as an example.
第三电子设备与第一电子设备关联,第一电子设备和第三电子设备中存储有第三电子设备的设备标识和认证凭据。其中,第三电子设备中存储的第三电子设备的认证凭据可以为IoT应用在第三电子设备绑定到用户账户时生成并发给第三电子设备的,第一电子设备中存储的第三电子设备的认证凭据可以为IoT应用发送给第一电子设备的。The third electronic device is associated with the first electronic device, and the device identification and authentication credential of the third electronic device are stored in the first electronic device and the third electronic device. Wherein, the authentication credential of the third electronic device stored in the third electronic device may be generated by the IoT application when the third electronic device is bound to the user account and sent to the third electronic device, and the third electronic device stored in the first electronic device The authentication credential of the device may be sent to the first electronic device by the IoT application.
在本申请一些实施例中,当第一电子设备在开启第一AP的时长大于或等于预设时间阈值并确定当前仍存在未上线的电子设备时,第一电子设备可以向已上线的第二电子设备 发送第二修复网络指令,以使已上线的第二电子设备辅助其它未上线的电子设备修复网络连接。In some embodiments of the present application, when the first electronic device turns on the first AP for a period greater than or equal to the preset time threshold and determines that there are still electronic devices that are not online, the first electronic device may report to the online second The electronic device sends the second network repair instruction, so that the online second electronic device assists other offline electronic devices to restore the network connection.
一种可选的实施方式中,由于此时第一电子设备开启第一AP的时长大于预设时间阈值,则可以认为未修复网络的电子设备可能为第一AP无法覆盖范围中的电子设备,如第三电子设备。此时,第一电子设备向第二电子设备发送第二修复网络指令。该第二修复网络指令用于指示第二电子设备启动第一AP,以辅助修复第二电子设备的第一AP覆盖范围内的电子设备的网络连接。例如,当第三电子设备处于第二电子设备的第一AP的覆盖范围内时,第二电子设备可以辅助修复第三电子设备的网络连接。In an optional implementation manner, since the time the first electronic device has turned on the first AP at this time is longer than the preset time threshold, it can be considered that the electronic device that has not repaired the network may be an electronic device that cannot be covered by the first AP. Such as a third electronic device. At this point, the first electronic device sends a second network repair instruction to the second electronic device. The second repairing network instruction is used to instruct the second electronic device to activate the first AP, so as to assist in repairing the network connection of the electronic devices 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 may assist in repairing the network connection of the third electronic device.
可以理解的是,第二电子设备中存储有第一AP的配置信息,由于电子设备在不同位置放置,或者电子设备可以移动位置,则第二电子设备开启第一AP后,第二电子设备开启的第一AP能够覆盖的范围与第一电子设备的第一AP所覆盖的范围不同,则第三电子设备在第二电子设备的第一AP覆盖的范围时,第三电子设备可以连接到第二电子设备的第一AP上。例如,图6为本申请实施例提供的一种第一电子设备、第二电子设备和第三电子设备的位置示意图。参考图6,第二电子设备位于第一电子设备的第一AP所覆盖的范围中,第三电子设备并没有位于第一电子设备的第一AP所覆盖的范围中。当第二电子设备开启第一AP时,第三电子设备位于第二电子设备的第一AP中。为便于说明,图6中以一个第一电子设备、一个第二电子设备和一个第三电子设备为例示出,当然,实际实施中可以具有更多的设备,具体实施可以参见上述实施例,对此不再赘述。It can be understood that the configuration information of the first AP is stored in the second electronic device. Since the electronic device is placed in a different location, or the electronic device can move its location, after the second electronic device turns on the first AP, the second electronic device turns on The range covered by the first AP of the first electronic device is different from the range covered by the first AP of the first electronic device, then 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. On the first AP of the second electronic device. For example, FIG. 6 is a schematic diagram of locations of a first electronic device, a second electronic device, and a third electronic device provided in an embodiment of the present application. Referring to FIG. 6 , the second electronic device is located in the range covered by the first AP of the first electronic device, and the third electronic device is not located in the range covered by 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 description, a first electronic device, a second electronic device, and a third electronic device are shown as examples in FIG. This will not be repeated here.
需要注意的是,第一电子设备中存储有与第一电子设备关联的电子设备的设备标识,如第一电子设备存储有第二电子设备的设备标识和第三电子设备的设备标识,但第二电子设备并未存储第三电子设备的设备标识。因此第二电子设备在开启第一AP后,可以作为第一电子设备和第三电子设备的消息转发设备,以辅助第一电子设备修复第三电子设备的网络连接。It should be noted that the first electronic device stores the device identification of the electronic device 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 The second electronic device does not store the device identifier of the third electronic device. Therefore, after the first AP is turned on, the second electronic device can serve as a message forwarding device for the first electronic device and the third electronic device, so as to assist the first electronic device to restore the network connection of the third electronic device.
一种可选的实施方式中,第二电子设备可以辅助第一电子设备和第三电子设备建立安全会话。具体来说,第二电子设备开启第一AP后,第三电子设备连接到第二电子设备的第一AP上。第三电子设备向第二电子设备发送请求信息,该请求信息可以用于请求修复第三电子设备的网络连接。可选地,请求信息可以包括第三电子设备的设备标识和随机数RN3。第二电子设备在接收请求信息后,将该请求信息转发给第一电子设备。第一电子设备根据请求信息中第三电子设备的设备标识确定第三电子设备为与第一电子设备关联的电子设备后,根据第三电子设备的设备标识确定第三电子设备的认证凭据,并生成随机数RN4。第一电子设备根据第三电子设备的认证凭据、RN3和RN4生成第二会话密钥。第一电子设备根据第二会话密钥对网络配置信息进行加密,得到第二加密信息。其中,第二加密信息中可以包括加密后的网络配置信息和RN4。第一电子设备将加密信息发送给第二电子设备,第二电子设备将第二加密信息转发给第三电子设备,第三电子设备根据第三电子设备的认证凭据、RN3和RN4生成第二会话密钥,并根据第二会话密钥对加密后的网络配置信息进行解密,得到网络配置信息。第三电子设备可以根据网络配置信息接入目标网络以重新建立网络连接。In an optional implementation manner, the second electronic device may assist the first electronic device and the third electronic device to establish a secure session. Specifically, after the second electronic device turns on the first AP, the third electronic device connects to the first AP of the second electronic device. The third electronic device sends request information to the second electronic device, where the request information may be used to request to restore the network connection of the third electronic device. Optionally, the request information may include the device identifier of the third electronic device and the random number RN3. After receiving the request information, the second electronic device forwards the request information 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 information, it determines the authentication credential of the third electronic device according to the device identifier of the third electronic device, and Generate random number RN4. The first electronic device generates a second session key according to the authentication credentials of the third electronic device, RN3 and RN4. The first electronic device encrypts the network configuration information according to the second session key to obtain second encrypted information. Wherein, the second encrypted information may include 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, and the third electronic device generates a second session according to the authentication credentials, RN3 and RN4 of the third electronic device key, and decrypt the encrypted network configuration information according to the second session key to obtain the network configuration information. The third electronic device may access the target network according to the network configuration information to re-establish the network connection.
其中,第二电子设备在接收到请求信息后,由于此时第二电子设备为AP模式,第一电子设备与第二电子设备之间没有建立会话。第二电子设备需要关闭AP模式,根据网络配置信息重新连接网络并与第一电子设备建立安全会话,再将请求信息发送给第一电子设 备;或者,当第一电子设备处于第二电子设备的第一AP的覆盖范围中时,第一电子设备可以作为站点(station,STA)连接到第二电子设备的第一AP上,此时第二电子设备可以将请求信息发送给第一电子设备。Wherein, after the second electronic device receives the request information, since the second electronic device is in the AP mode at this time, no session is established between the first electronic device and the second electronic device. The second electronic device needs to close the AP mode, reconnect to the network according to the network configuration information and 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 second electronic device's When within the coverage of the first AP, the first electronic device may be connected to the first AP of the second electronic device as a station (station, STA), and at this time, the second electronic device may send request information to the first electronic device.
可选地,第一电子设备发送给第二电子设备的第二修复网络指令中可以包括待修复网络连接的电子设备数量。例如,第一电子设备确定与第一电子设备关联的10个电子设备中的4个电子设备未上线,则第二修复网络指令中待修复网络连接的电子设备的数量可以为4个。第二电子设备在接收到第二修复网络指令并开启第一AP后,若第二电子设备确定已辅助修复4个电子设备的网络连接,则此时第二电子设备可以关闭第一AP并重新连接至路由设备,结束辅助修复网络连接任务。或者,第二电子设备在确定开启第一AP的时长大于预设时间阈值后,也可以关闭第一AP并重新连接至路由设备,此时第二电子设备未能辅助修复网络连接的电子设备可能未处于第二电子设备的第一AP覆盖范围内,则第二电子设备可以关闭第一AP,结束辅助修复网络连接的任务。Optionally, the second network repair instruction sent by the first electronic device to the second electronic device may include the number of electronic devices connected to the network 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, then the number of electronic devices to be repaired in the second network repair instruction may be 4. After the second electronic device receives the second repair network instruction and turns on the first AP, if the second electronic device determines that it has assisted in repairing the network connections of the four electronic devices, then the second electronic device can turn off the first AP and restart Connect to the routing device, ending the auxiliary repair network connection task. Alternatively, after the second electronic device determines that the time for which the first AP has been turned on is greater than the preset time threshold, it may also turn off the first AP and reconnect to the routing device. If it is not within the coverage of the first AP of the second electronic device, the second electronic device may turn off the first AP and end the task of assisting in repairing the network connection.
在一些实施例中,第一电子设备在检测到新上线的电子设备时,可以通过安全会话向该电子设备发送第二AP的配置信息,电子设备在下一次网络断连时,可以根据第二AP的配置信息查找第二AP并接入第二AP以完成网络修复。通过该方法,可以对每次网络修复中的使用的AP的配置信息进行更新,防止长期使用相同的AP带来安全问题。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, and the electronic device can use the configuration information of the second AP when the next time the network is disconnected. The configuration information searches for the second AP and connects to the second AP to complete the network repair. Through this method, the configuration information of the APs used in each network repair can be updated to prevent security problems caused by long-term use of the same AP.
可以理解的是,第一电子设备修复第二电子设备的网络连接,第二电子设备辅助修复第三电子设备的网络连接,可以看作两轮网络连接修复,仅作为本申请实施例所提供的网络修复方法的示例而非限定。具体实施中,网络修复过程可以具有更多或更少的修复轮次。例如,图7为本申请实施例适用的一种网络修复场景的示意图,在该场景中,第二电子设备处于第一电子设备的第一AP所覆盖的范围中,第一轮网络修复可以为第一电子设备可以直接根据上述实施例所示方式修复第二电子设备的网络连接。第三电子设备未位于第一电子设备的第一AP所覆盖的范围中,且第三电子设备位于第二电子设备的第一AP中,则第二轮网络修复可以为第二电子设备辅助第一电子设备修复第三电子设备的网络连接。第四电子设备未位于第一电子设备或第二电子设备的第一AP所覆盖的范围中,但第四电子设备位于第三电子设备的第一AP所覆盖的范围中,则第三轮网络修复可以为第三电子设备辅助第一电子设备修复第四电子设备的网络连接。以此类推,第一电子设备可以修复处于第一电子设备的第一AP范围内的电子设备,再借助已修复好网络连接的电子设备一层层向外修复外围设备的网络连接,进而完成全屋电子设备的网络修复。It can be understood 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 are only provided by the embodiment of this application. Examples and not limitations of network repair methods. In a specific implementation, the network repair process may have more or fewer repair rounds. For example, FIG. 7 is a schematic diagram of a network repair scenario applicable to the embodiment of the present application. In this scenario, the second electronic device is in the range covered by the first AP of the first electronic device, and the first round of network repair may be The first electronic device may directly restore the network connection of the second electronic device according to the manner shown in the foregoing embodiments. The third electronic device is not located in the range covered by the first AP of the first electronic device, and the third electronic device is located in the first AP of the second electronic device, then the second round of network repair can assist the second electronic device An electronic device restores the network connection of the third electronic device. If the fourth electronic device is not located in the range covered by the first AP of the first electronic device or the second electronic device, but the fourth electronic device is located in the range covered by the first AP of the third electronic device, then the third round of network The repairing may assist the first electronic device in repairing the network connection of the fourth electronic device for the third electronic device. By analogy, the first electronic device can repair the electronic devices within the range of the first AP of the first electronic device, and then repair the network connection of the peripheral device layer by layer with the help of the electronic device that has repaired the network connection, and then complete the entire network connection. Network repair of house electronic equipment.
下面以几个示例对本申请实施例提供的网络修复方法进行进一步介绍:The following is a further introduction to the network repair method provided by the embodiment of the present application with several examples:
示例1Example 1
图8为本申请实施例提供的一种网络修复方法的流程示意图,该方法可以应用于图3所示的通信系统。参考图8,该方法包括以下步骤:FIG. 8 is a schematic flowchart of a network repair method provided by an embodiment of the present application, and the method may be applied to the communication system shown in FIG. 3 . Referring to Figure 8, the method comprises the following steps:
S801:第一电子设备、第二电子设备以及第三电子设备与路由设备连接。S801: Connect the first electronic device, the second electronic device, and the third electronic device to the routing device.
S802:第一电子设备与第二电子设备建立安全会话,第一电子设备与第三电子设备建立安全会话。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.
S803:第一电子设备随机生成第一AP的配置信息。S803: The first electronic device randomly generates configuration information of the first AP.
S804:第一电子设备将第一AP的配置信息发送给第二电子设备和第三电子设备。S804: The first electronic device sends configuration information of the first AP to the second electronic device and the third electronic device.
S805:用户修改路由设备的目标网络的网络配置信息。S805: The user modifies the network configuration information of the target network of the routing device.
例如,用户修改了路由设备的Wi-Fi网络的SSID和密码。For example, the user modifies the SSID and password of the Wi-Fi network of the routing device.
在用户修改路由设备的网络的配置信息后,所有电子设备与目标网络断开连接。After the user modifies the configuration information of the network of the routing device, all electronic devices are disconnected from the target network.
S806:用户手动修复第一电子设备的网络连接,第一电子设备重新接入目标网络。S806: The user manually restores the network connection of the first electronic device, and the first electronic device reconnects to the target network.
S807:第一电子设备响应于用户触发的第一修复网络指令,断开与目标网络的连接,开启第一AP。S807: In response to the first network repair instruction triggered by the user, the first electronic device disconnects from the target network, and turns on the first AP.
S808:第二电子设备扫描到第一电子设备的第一AP,并根据保存的第一AP的配置信息接入第一电子设备开启的第一AP。S808: The second electronic device scans to the first AP of the first electronic device, and accesses the first AP enabled by the first electronic device according to the saved configuration information of the first AP.
S809:第一电子设备与第二电子设备建立安全会话。S809: The first electronic device establishes a secure session with the second electronic device.
S810:第一电子设备通过安全会话将目标网络的网络配置信息发送给第二电子设备。S810: The first electronic device sends the network configuration information of the target network to the second electronic device through the secure session.
一种可选的实施方式中,第一电子设备与第二电子设备可以协商第一会话密钥,第一电子设备根据第一会话密钥对网络配置信息进行加密,并将加密后的网络配置信息发送给第二电子设备。第二电子设备在接收到加密后的网络配置信息后,根据第一会话密钥对加密后的网络配置信息进行解密,获取网络配置信息。In an optional implementation manner, the first electronic device and the second electronic device may negotiate a first session key, and the first electronic device encrypts the network configuration information according to the first session key, and sends the encrypted network configuration information to The information is sent 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.
S811:第二电子设备根据获取到的网络配置信息重新连接到路由设备接入目标网络,以修复网络连接。S811: The second electronic device reconnects to the routing device to access the target network according to the acquired network configuration information, so as to restore the network connection.
S812:第一电子设备与第二电子设备建立安全会话。S812: The first electronic device establishes a secure session with the second electronic device.
需要说明的是,在S809与S812中,第一电子设备与第二电子设备建立安全会话的方式可以相同,但在S809与S812中,由于第一电子设备与第二电子设备在协商会话密钥过程中随机生成不同的随机数,第一电子设备与第二电子设备协商得到的会话密钥不同。可见,第一电子设备与第二电子设备在一轮会话中使用的会话密钥并不是永久有效,在第一电子设备与第二电子设备再次建立新一轮安全会话时,两个设备会重新协商新的会话密钥,以保证会话的安全性。It should be noted that, in S809 and S812, the first electronic device and the second electronic device may establish a secure session in the same manner, but in S809 and S812, since the first electronic device and the second electronic device are negotiating the session key Different random numbers are randomly generated during the process, and session keys obtained through negotiation between 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 session is not permanently valid, and when the first electronic device and the second electronic device establish a new round of secure session again, the two devices will restart Negotiate a new session key to keep the session secure.
S813:第一电子设备随机生成第二AP的配置信息。S813: The first electronic device randomly generates configuration information of the second AP.
S814:第一电子设备将第二AP的配置信息发送给第二电子设备。S814: The first electronic device sends configuration information of the second AP to the second electronic device.
S815:第二电子设备保存第二AP的配置信息。S815: The second electronic device saves configuration information of the second AP.
通过S813-S815,第一电子设备在检测到与第一电子设备关联的电子设备重新上线时,可以重新随机生成用于修复网络的AP的配置信息,并将重新生成的AP的配置信息下发给重新上线的电子设备,从而更新用于修复网络的AP的配置,防止长时间使用相同AP配置带来安全问题。Through S813-S815, when the first electronic device detects that the electronic device associated with the first electronic device is online again, it can randomly regenerate the configuration information of the AP used to repair the network, and send the regenerated AP configuration information For the re-online electronic equipment, the configuration of the AP used to repair the network is updated to prevent security problems caused by using the same AP configuration for a long time.
另一种可选的实施方式中,第一电子设备还可以周期性更新用于修复网络的AP的配置信息,进一步保证网络修复功能的安全性。In another optional implementation manner, 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.
S816:第一电子设备确定开启第一AP的时长大于预设时间阈值,且第一电子设备确定当前仍存在未上线的设备。S816: The first electronic device determines that the duration of turning on the first AP is longer than a preset time threshold, and the first electronic device determines that there are still devices that are not online.
S817:第一电子设备向第二电子设备发送第二修复网络指令。S817: The first electronic device sends a second network repair instruction to the second electronic device.
可选地,第一电子设备向第二电子设备发送的第二修复网络指令用于指示第二电子设备开启第一AP,以辅助其它电子设备修复网络连接。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 enable the first AP, so as to assist other electronic devices to restore network connections.
S818:第二电子设备切换为AP模式,开启第一AP。S818: The second electronic device switches to an AP mode, and turns on the first AP.
可以理解的是,第二电子设备切换为AP模式后,第二电子设备与路由设备之间的连接会断开,也就是说,第二电子设备断开网络连接。It can be understood 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 will disconnect from the network.
S819:第三电子设备扫描到第二电子设备的第一AP,并根据保存的第一AP的配置信 息接入第二电子设备的第一AP。S819: The third electronic device scans to 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.
S820:第三电子设备向第二电子设备发送第三电子设备的设备标识和第一随机数。S820: The third electronic device sends the device identifier of the third electronic device and the first random number to the second electronic device.
S821:第二电子设备根据网络配置信息重新连接到路由设备接入目标网络。S821: The second electronic device reconnects to the routing device to access the target network according to the network configuration information.
S822:第一电子设备与第二电子设备建立安全会话。S822: The first electronic device establishes a secure session with the second electronic device.
S823:第二电子设备将第三电子设备的设备标识和第一随机数发送给第一电子设备。S823: The second electronic device sends the device identifier of the third electronic device and the first random number to the first electronic device.
S824:第一电子设备根据第三电子设备的标识确定第三电子设备为与第一电子设备关联的设备,根据第三电子设备的认证凭据、第一随机数和第二随机数确定第二会话密钥。S824: The first electronic device determines that the third electronic device is a device associated with the first electronic device according to the identification of the third electronic device, and determines the second session according to the authentication credential, the first random number, and the second random number of the third electronic device key.
其中,第二随机数为第一电子设备随机生成的。Wherein, the second random number is randomly generated by the first electronic device.
可选地,第一电子设备预先保存与第一电子设备关联的至少一个电子设备的设备标识和认证凭据;第一电子设备在获取到第三电子设备的设备标识后,根据第三电子设备的设备标识确定第三电子设备的认证凭据。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 the first electronic device obtains the device identification of the third electronic device, according to the The device identification determines authentication credentials of the third electronic device.
S825:第一电子设备根据第二会话密钥对网络配置信息进行加密。S825: The first electronic device encrypts the network configuration information according to the second session key.
S826:第一电子设备将加密后的网络配置信息和第二随机数发送给第二电子设备。S826: The first electronic device sends the encrypted network configuration information and the second random number to the second electronic device.
S827:第二电子设备切换为AP模式,开启第一AP。S827: The second electronic device switches to an AP mode, and turns on the first AP.
S828:第三电子设备扫描到第二电子设备的第一AP,并根据保存的第一AP的配置信息接入第二电子设备开启的第一AP。S828: The third electronic device scans to the first AP of the second electronic device, and accesses the first AP enabled by the second electronic device according to the saved configuration information of the first AP.
S829:第二电子设备将加密后的网络配置信息和第二随机数发送给第三电子设备。S829: The second electronic device sends the encrypted network configuration information and the second random number to the third electronic device.
S830:第三电子设备根据第三电子设备的认证凭据、第一随机数和第二随机数确定第二会话密钥,并根据第二会话密钥对加密后的网络配置信息进行解密,得到网络配置信息。S830: The third electronic device determines the second session key according to the authentication credential 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. configuration information.
S831:第二电子设备、第三电子设备根据获取到的网络配置信息重新连接到路由设备接入目标网络,以修复网络连接。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, so as to repair the network connection.
S832:第二电子设备、第三电子设备分别与第一电子设备建立安全会话。S832: The second electronic device and the third electronic device respectively establish secure sessions with the first electronic device.
可选地,与S814-S815类似,第一电子设备在检测到第三电子设备完成网络修复并上线后,可以将第二AP的配置信息下发给第三电子设备。Optionally, similar to S814-S815, the first electronic device may send configuration information of the second AP to the third electronic device after detecting that the third electronic device completes network repair and goes online.
通过该示例示出的网络修复方法,第一电子设备在重新建立网络连接后,可以开启第一AP并修复接入第一AP的第二电子设备的网络连接。对于未处于第一AP覆盖范围内的第三电子设备,可以接入第二电子设备开启的第一AP,以通过第二电子设备的辅助,从第一电子设备获取用于修复网络连接的网络配置信息。由于第二电子设备在辅助第三电子设备修复网络连接之前已获取到网络配置信息,第二电子设备在转发第三电子设备的消息时,可以根据获取到的网络配置信息接入路由设备以连接网络,与第一电子设备建立安全会话后转发消息,保证网络修复过程的安全性。同时,第二电子设备在辅助第三电子设备修复网络连接时,第一电子设备可以根据随机生成的随机数以及第三电子设备的认证凭据生成会话密钥以加密网络配置信息,防止其它设备伪冒家居中枢设备修改第三电子设备的网络配置。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 enabled by the second electronic device, so as to obtain the network used to repair the network connection from the first electronic device with the assistance of the second electronic device configuration information. Since the second electronic device has obtained the network configuration information before assisting the third electronic device to repair the network connection, when the second electronic device forwards the message of the third electronic device, it can access the routing device according to the obtained network configuration information to connect The network forwards the message after establishing a secure session with the first electronic device, so as to ensure the security of the network repair process. At the same time, when the second electronic device is assisting the third electronic device to restore the network connection, the first electronic device can generate a session key according to 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 forging Impersonating the home hub device to modify the network configuration of the third electronic device.
示例2Example 2
图9为本申请实施例提供的一种网络修复方法的流程示意图,该方法可以应用于图3所示的通信系统。在图9所示的示例2中,第一电子设备位于第二电子设备的第一AP的覆盖范围内。参考图9,该方法包括以下步骤:FIG. 9 is a schematic flowchart of a network repair method provided by an embodiment of the present application, and the method may be applied to the communication system shown in FIG. 3 . In Example 2 shown in FIG. 9 , the first electronic device is located within the coverage of the first AP of the second electronic device. With reference to Fig. 9, this method comprises the following steps:
S901:第一电子设备、第二电子设备以及第三电子设备与路由设备连接。S901: Connect the first electronic device, the second electronic device, and the third electronic device to the routing device.
S902:第一电子设备与第二电子设备建立安全会话,第一电子设备与第三电子设备建立安全会话。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.
S903:第一电子设备随机生成第一AP的配置信息。S903: The first electronic device randomly generates configuration information of the first AP.
S904:第一电子设备将第一AP的配置信息发送给第二电子设备和第三电子设备。S904: The first electronic device sends configuration information of the first AP to the second electronic device and the third electronic device.
S905:用户修改路由设备的目标网络的网络配置信息。S905: The user modifies the network configuration information of the target network of the routing device.
例如,用户修改了路由设备的Wi-Fi网络的SSID和密码。For example, the user modifies the SSID and password of the Wi-Fi network of the routing device.
在用户修改路由设备的网络的配置信息后,所有电子设备与目标网络断开连接。After the user modifies the configuration information of the network of the routing device, all electronic devices are disconnected from the target network.
S906:用户手动修复第一电子设备的网络连接,第一电子设备重新接入目标网络。S906: The user manually restores the network connection of the first electronic device, and the first electronic device reconnects to the target network.
S907:第一电子设备响应于用户触发的第一修复网络指令,断开与目标网络的连接,开启第一AP。S907: In response to the first network repair instruction triggered by the user, the first electronic device disconnects from the target network, and turns on the first AP.
S908:第二电子设备扫描到第一电子设备的第一AP,并根据保存的第一AP的配置信息接入第一电子设备开启的第一AP。S908: The second electronic device scans to the first AP of the first electronic device, and accesses the first AP enabled by the first electronic device according to the saved configuration information of the first AP.
S909:第一电子设备与第二电子设备建立安全会话。S909: The first electronic device establishes a secure session with the second electronic device.
S910:第一电子设备通过安全会话将目标网络的网络配置信息发送给第二电子设备。S910: The first electronic device sends the network configuration information of the target network to the second electronic device through the secure session.
一种可选的实施方式中,第一电子设备与第二电子设备可以协商第一会话密钥,第一电子设备根据第一会话密钥对网络配置信息进行加密,并将加密后的网络配置信息发送给第二电子设备。第二电子设备在接收到加密后的网络配置信息后,根据第一会话密钥对加密后的网络配置信息进行解密,获取网络配置信息。In an optional implementation manner, the first electronic device and the second electronic device may negotiate a first session key, and the first electronic device encrypts the network configuration information according to the first session key, and sends the encrypted network configuration information to The information is sent 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.
S911:第二电子设备根据获取到的网络配置信息重新连接到路由设备接入目标网络,以修复网络连接。S911: The second electronic device reconnects to the routing device to access the target network according to the acquired network configuration information, so as to restore the network connection.
S912:第一电子设备与第二电子设备建立安全会话。S912: The first electronic device establishes a secure session with the second electronic device.
需要说明的是,在S909与S912中,第一电子设备与第二电子设备建立安全会话的方式可以相同,但在S909与S912中,由于第一电子设备与第二电子设备在协商会话密钥过程中随机生成不同的随机数,第一电子设备与第二电子设备协商得到的会话密钥不同。可见,第一电子设备与第二电子设备在一轮会话中使用的会话密钥并不是永久有效,在第一电子设备与第二电子设备再次建立新一轮安全会话时,两个设备会重新协商新的会话密钥,以保证会话的安全性。It should be noted that in S909 and S912, the first electronic device and the second electronic device may establish a secure session in the same manner, but in S909 and S912, since the first electronic device and the second electronic device are negotiating session keys Different random numbers are randomly generated during the process, and session keys obtained through negotiation between 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 session is not permanently valid, and when the first electronic device and the second electronic device establish a new round of secure session again, the two devices will restart Negotiate a new session key to keep the session secure.
S913:第一电子设备随机生成第二AP的配置信息。S913: The first electronic device randomly generates configuration information of the second AP.
S914:第一电子设备将第二AP的配置信息发送给第二电子设备。S914: The first electronic device sends configuration information of the second AP to the second electronic device.
S915:第二电子设备保存第二AP的配置信息。S915: The second electronic device saves configuration information of the second AP.
通过S913-S915,第一电子设备在检测到与第一电子设备关联的电子设备重新上线时,可以重新随机生成用于修复网络的AP的配置信息,并将重新生成的AP的配置信息下发给重新上线的电子设备,从而更新用于修复网络的AP的配置,防止长时间使用相同AP配置带来安全问题。Through S913-S915, when the first electronic device detects that the electronic device associated with the first electronic device is online again, it can randomly regenerate the configuration information of the AP used to repair the network, and send the regenerated AP configuration information For the re-online electronic equipment, the configuration of the AP used to repair the network is updated to prevent security problems caused by using the same AP configuration for a long time.
另一种可选的实施方式中,第一电子设备还可以周期性更新用于修复网络的AP的配置信息,进一步保证网络修复功能的安全性。In another optional implementation manner, 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.
S916:第一电子设备确定开启第一AP的时长大于预设时间阈值,且第一电子设备确定当前仍存在未上线的设备。S916: The first electronic device determines that the duration of turning on the first AP is longer than a preset time threshold, and the first electronic device determines that there are still devices that are not online.
S917:第一电子设备向第二电子设备发送第二修复网络指令。S917: The first electronic device sends a second network repair instruction to the second electronic device.
可选地,第一电子设备向第二电子设备发送的第二修复网络指令用于指示第二电子设 备开启第一AP,以辅助其它电子设备修复网络连接。Optionally, the second repair network instruction sent by the first electronic device to the second electronic device is used to instruct the second electronic device to start the first AP to assist other electronic devices to repair the network connection.
S918:第二电子设备切换为AP模式,开启第一AP。S918: The second electronic device switches to an AP mode, and turns on the first AP.
可以理解的是,第二电子设备切换为AP模式后,第二电子设备与路由设备之间的连接会断开,也就是说,第二电子设备断开网络连接。It can be understood 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 will disconnect from the network.
S919:第三电子设备扫描到第二电子设备的第一AP,并根据保存的第一AP的配置信息接入第二电子设备开启的第一AP。S919: The third electronic device scans to the first AP of the second electronic device, and accesses the first AP enabled by the second electronic device according to the saved configuration information of the first AP.
S920:第一电子设备扫描到第二电子设备的第一AP,并根据保存的第一AP的配置信息接入第二电子设备开启的第一AP。S920: The first electronic device scans to the first AP of the second electronic device, and accesses the first AP enabled by the second electronic device according to the saved configuration information of the first AP.
S921:第三电子设备向第二电子设备发送第三电子设备的设备标识和第一随机数。S921: The third electronic device sends the device identifier of the third electronic device and the first random number to the second electronic device.
S922:第二电子设备将第三电子设备的设备标识和第一随机数发送给第一电子设备。S922: The second electronic device sends the device identifier of the third electronic device and the first random number to the first electronic device.
S923:第一电子设备根据第三电子设备的标识确定第三电子设备为与第一电子设备绑定的设备,根据第三电子设备的认证凭据、第一随机数和第二随机数确定第二会话密钥。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.
其中,第二随机数为第一电子设备随机生成的。Wherein, the second random number is randomly generated by the first electronic device.
可选地,第一电子设备预先保存与第一电子设备绑定的至少一个电子设备的设备标识和认证凭据;第一电子设备在获取到第三电子设备的设备标识后,根据第三电子设备的设备标识确定第三电子设备的认证凭据。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 the first electronic device obtains the device identification of the third electronic device, according to the third electronic device The device identification of the third electronic device determines authentication credentials.
S924:第一电子设备根据第二会话密钥对网络配置信息进行加密。S924: The first electronic device encrypts the network configuration information according to the second session key.
S925:第一电子设备将加密后的网络配置信息和第二随机数发送给第二电子设备。S925: The first electronic device sends the encrypted network configuration information and the second random number to the second electronic device.
S926:第二电子设备将加密后的网络配置信息和第二随机数发送给第三电子设备。S926: The second electronic device sends the encrypted network configuration information and the second random number to the third electronic device.
S927:第三电子设备根据第三电子设备的认证凭据、第一随机数和第二随机数确定第二会话密钥,并根据第二会话密钥对加密后的网络配置信息进行解密,得到目标网络的网络配置信息。S927: The third electronic device determines the second session key according to the authentication credential 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 target Network configuration information for the network.
S928:第二电子设备、第三电子设备根据获取到的网络配置信息重新连接到路由设备接入目标网络,以修复网络连接。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, so as to repair the network connection.
S929:第二电子设备、第三电子设备分别与第一电子设备建立安全会话。S929: The second electronic device and the third electronic device respectively establish secure sessions with the first electronic device.
可选地,与S914-S915类似,第一电子设备在检测到第三电子设备完成网络修复并上线后,可以将第二AP的配置信息下发给第三电子设备。Optionally, similar to S914-S915, the first electronic device may send configuration information of the second AP to the third electronic device after detecting that the third electronic device completes network repair and goes online.
通过该示例示出的网络修复方法,第一电子设备在重新建立网络连接后,可以开启第一AP并修复接入第一AP的第二电子设备的网络连接。对于未处于第一AP覆盖范围内的第三电子设备,可以接入第二电子设备开启的第一AP,以通过第二电子设备的辅助,从第一电子设备获取用于修复网络连接的网络配置信息。由于该示例中第一电子设备处于第二电子设备的第一AP的覆盖范围内,则第一电子设备也可以接入第二电子设备的第一AP,以接收第二电子设备转发的来自第三电子设备的消息。避免第二电子设备多次切换开启AP模式和重连路由设备的过程,提高网络修复效率。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 enabled by the second electronic device, so as to obtain the network used to repair the network connection from the first electronic device with the assistance of the second electronic device configuration information. Since the first electronic device is within the coverage of the first AP of the second electronic device in this example, the first electronic device can also access the first AP of the second electronic device to receive the information forwarded by the second electronic device from the first AP. Three electronic devices for messages. This avoids the process of the second electronic device repeatedly switching to enable the AP mode and reconnecting the routing device, and improves the network repair efficiency.
基于以上实施例,本申请还提供一种电子设备,所述电子设备包括多个功能模块;所述多个功能模块相互作用,实现本申请实施例所描述的各方法中第一电子设备、第二电子设备或第三电子设备所执行的功能。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。Based on the above embodiments, the present application also provides an electronic device, the electronic device includes multiple functional modules; the multiple functional modules interact to implement the first electronic device, the second electronic device in the methods described in the embodiments of the present application. The function performed by the second electronic device or the third electronic device. 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 combined or divided arbitrarily based on specific implementations.
基于以上实施例,本申请还提供一种电子设备,该电子设备包括至少一个处理器和至 少一个存储器,所述至少一个存储器中存储计算机程序指令,所述电子设备运行时,所述至少一个处理器执行本申请实施例所描述的各方法中第一电子设备、第二电子设备或第三电子设备所执行的功能。Based on the above embodiments, the present application also provides an electronic device, which includes at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the electronic device is running, the at least one processing The device performs the functions performed by the first electronic device, the second electronic device, or the third electronic device in the methods described in the embodiments of the present application.
基于以上实施例,本申请还提供一种计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行本申请实施例所描述的各方法。Based on the above embodiments, the present application further provides a computer program that, when the computer program is run on a computer, causes the computer to execute the methods described in the embodiments of the present application.
基于以上实施例,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行本申请实施例所描述的各方法。Based on the above embodiments, the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a computer, the computer executes the computer program described in the embodiments of the present application. methods described.
基于以上实施例,本申请还提供了一种芯片,所述芯片用于读取存储器中存储的计算机程序,实现本申请实施例所描述的各方法。Based on the above embodiments, the present application also provides a chip, the chip is used to read the computer program stored in the memory, and implement the methods described in the embodiments of the present application.
基于以上实施例,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机装置实现本申请实施例所描述的各方法。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。Based on the above embodiments, the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor, configured to support a computer device to implement the methods described in the embodiments of the present application. In a possible design, the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device. The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Apparently, those skilled in the art can make various changes and modifications to this application without departing from the protection scope of this application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims (30)

  1. 一种通信系统,其特征在于,所述系统包括路由设备、第一电子设备和第二电子设备;所述第一电子设备与所述第二电子设备关联;A communication system, characterized in that the 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 routing device is configured to provide a wireless connection to the target network;
    所述第一电子设备,用于接收第一修复网络指令,所述第一修复网络指令用于指示所述第一电子设备切换至接入点模式并辅助与所述第一电子设备关联的其它电子设备修复网络连接;根据所述第一修复网络指令开启第一接入点;接受所述第二电子设备接入所述第一接入点,与所述第二电子设备建立安全会话;通过所述安全会话向所述第二电子设备发送所述目标网络的网络配置信息;The first electronic device is configured to receive a first repair network instruction, the first repair network instruction is used to instruct the first electronic device to switch to an access point mode and assist other devices associated with the first electronic device The electronic device repairs the network connection; opens the first access point according to the first repair network instruction; accepts the second electronic device to access the first access point, and establishes a secure session with the second electronic device; sending, by the secure session, network configuration information of the target network to the second electronic device;
    所述第二电子设备,用于接入所述第一电子设备开启的所述第一接入点,与所述第一电子设备建立安全会话;接收所述第一电子设备通过所述安全会话发送的所述网络配置信息,并根据所述网络配置信息接入所述目标网络。The second electronic device is configured to access the first access point enabled by the first electronic device, and establish a secure session with the first electronic device; receive the first electronic device through the secure session Send the network configuration information, and access the target network according to the network configuration information.
  2. 如权利要求1所述的系统,其特征在于,The system of claim 1, wherein
    所述第一电子设备具体用于:The first electronic device is specifically used for:
    根据第一会话密钥加密所述网络配置信息得到第一加密信息,将所述第一加密信息发送给所述第二电子设备;Encrypting the network configuration information according to the first session key to obtain first encrypted information, and sending 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 obtaining the network configuration information;
    其中,所述第一会话密钥为所述第一电子设备与所述第二电子设备在建立安全会话过程中协商得到的。Wherein, the first session key is obtained through negotiation between the first electronic device and the second electronic device during establishing a secure session.
  3. 如权利要求1或2所述的系统,其特征在于,所述第一修复网络指令中包括所述第一接入点的配置信息;所述第一电子设备具体用于:根据所述第一修复网络指令中的所述第一接入点的配置信息开启所述第一接入点;The system according to claim 1 or 2, wherein the first repair network instruction includes configuration information of the first access point; the first electronic device is specifically configured to: according to the first Repairing the configuration information of the first access point in the network instruction to enable the first access point;
    或者or
    所述第一修复网络指令中包括所述第一接入点的标识;所述第一电子设备具体用于:根据所述第一修复网络指令中的所述第一接入点的标识确定所述第一电子设备存储的所述第一接入点的配置信息,根据所述第一接入点的配置信息开启所述第一接入点。The first repair network instruction includes the identifier of the first access point; the first electronic device is specifically configured to: determine the first access point identifier according to the first repair network instruction configuration information of the first access point stored in the first electronic device, and enable the first access point according to the configuration information of the first access point.
  4. 如权利要求1-3任一项所述的系统,其特征在于,所述系统还包括第三电子设备,所述第一电子设备与所述第三电子设备关联,所述第三电子设备与所述第二电子设备之间的距离小于或等于预设距离阈值;The system according to any one of claims 1-3, wherein the system further comprises a third electronic device, the first electronic device is associated with the third electronic device, and the third electronic device is associated with the third electronic device. The distance between the second electronic devices is less than or equal to a preset distance threshold;
    所述第一电子设备还用于:向所述第二电子设备发送第二修复网络指令,所述第二修复网络指令用于指示所述第二电子设备切换至接入点模式并辅助与所述第一电子设备关联的其它电子设备修复网络连接;接收所述第二电子设备转发的来自所述第三电子设备的请求信息,所述请求信息用于请求修复所述第三电子设备的网络连接;根据所述请求信息确定第二会话密钥;根据所述第二会话密钥加密所述网络配置信息得到第二加密信息;将所述第二加密信息发送给所述第二电子设备;The first electronic device is further configured to: send a second repair network instruction to the second electronic device, the second repair network instruction is used to instruct the second electronic device to switch to the access point mode and assist with the Repairing the network connection of other electronic devices associated with the first electronic device; receiving the request information from the third electronic device forwarded by the second electronic device, the request information is used to request repairing the network of the third electronic device Connect; determine 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; send the second encrypted information to the second electronic device;
    所述第二电子设备还用于:接收所述第一电子设备发送的所述第二修复网络指令,断开与所述目标网络的连接,根据所述第二修复网络指令开启所述第一接入点;接受所述第 三电子设备接入所述第一接入点;接收所述第三电子设备发送的所述请求信息,将所述请求信息转发至所述第一电子设备;接收所述第一电子设备发送的所述第二加密信息,将所述第二加密信息转发至所述第三电子设备;The second electronic device is further configured to: receive the second repair network instruction sent by the first electronic device, disconnect the connection with the target network, and open the first repair network according to the second repair network instruction. access point; 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 For the second encrypted information sent by the first electronic device, forward the second encrypted information to the third electronic device;
    所述第三电子设备用于:接入所述第二电子设备开启的所述第一接入点;向所述第二电子设备发送所述请求信息;接收所述第二电子设备转发的来自所述第一电子设备的所述第二加密信息,根据所述第二加密信息确定所述第二会话密钥;根据所述第二会话密钥对所述第二加密信息进行解密,获取所述网络配置信息;根据所述网络配置信息接入所述目标网络。The third electronic device is configured to: access the first access point enabled by the second electronic device; send the request information to the second electronic device; receive the request information forwarded by the second electronic device from The second encrypted information of the first electronic device, determining the second session key according to the second encrypted information; decrypting the second encrypted information according to the second session key, and obtaining the the network configuration information; and access the target network according to the network configuration information.
  5. 如权利要求4所述的系统,其特征在于,所述第二电子设备具体用于:The system according to claim 4, wherein the second electronic device is specifically used for:
    根据所述网络配置信息接入所述目标网络,并与所述第一电子设备建立安全会话;通过所述第二电子设备与所述第一电子设备之间的安全会话,将所述请求信息发送给所述第一电子设备,并接收所述第一电子设备发送的所述第二加密信息;或者Access the target network according to the network configuration information, and establish a secure session with the first electronic device; pass the request information through the secure session between the second electronic device and the first electronic device Send to the first electronic device, and receive the second encrypted information sent by the first electronic device; or
    接受所述第一电子设备接入所述第二电子设备开启的所述第一接入点,将所述请求信息发送给所述第一电子设备,并接收所述第一电子设备发送的所述第二加密信息。Accepting that the first electronic device accesses the first access point opened by the second electronic device, sending the request information to the first electronic device, and receiving the information sent by the first electronic device The second encrypted information.
  6. 如权利要求4或5所述的系统,其特征在于,所述第一电子设备还用于:The system according to claim 4 or 5, wherein the first electronic device is further used for:
    在向所述第二电子设备发送第二修复网络指令之前,确定所述第一电子设备开启所述第一接入点的时长大于预设时间阈值,和/或,确定与所述第一电子设备关联的至少一个电子设备未修复网络连接。Before sending the second network repair instruction to the second electronic device, it is determined that the time period for the first electronic device to turn on the first access point is longer than a preset time threshold, and/or, At least one electronic device associated with the device did not repair the network connection.
  7. 如权利要求4-6任一项所述的系统,其特征在于,所述第二修复网络指令包含目标数量,所述目标数量用于指示待修复网络连接的电子设备的数量;The system according to any one of claims 4-6, wherein the second repairing network instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired;
    所述第二电子设备还用于:The second electronic device is also used for:
    确定所述第二电子设备开启所述第一接入点的时长大于预设时间阈值,和/或,确定已修复网络连接的电子设备数量为目标数量时,关闭所述第一接入点,并根据所述网络配置信息接入所述目标网络。Determining that the duration of the second electronic device opening the first access point is greater than a preset time threshold, and/or, when determining that the number of electronic devices having repaired network connections is the target number, closing the first access point, and accessing the target network according to the network configuration information.
  8. 如权利要求4-7任一项所述的系统,其特征在于,所述第一电子设备中存储与所述第一电子设备关联的至少一个电子设备的设备标识和认证凭据;所述第二会话密钥是根据所述第三电子设备随机生成的第一随机数、所述第一电子设备随机生成的第二随机数和所述第三电子设备的认证凭据确定的。The system according to any one of claims 4-7, 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 The session key is determined according to 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 credential of the third electronic device.
  9. 如权利要求1-8任一项所述的系统,其特征在于,所述第一电子设备还用于:The system according to any one of claims 1-8, wherein the first electronic device is further 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, sending the configuration information of the second access point to the second electronic device, and the second access point The configuration information of the access point is used for the second electronic device to search for an access point for assisting in repairing the network connection in the next network repair.
  10. 如权利要求1-9任一项所述的系统,其特征在于,所述第一电子设备为家居中枢设备。The system according to any one of claims 1-9, wherein the first electronic device is a home hub device.
  11. 一种网络修复方法,应用于第一电子设备,其特征在于,所述方法包括:A network repair method applied to a first electronic device, characterized in that the method includes:
    接收第一修复网络指令;所述第一修复网络指令用于指示所述第一电子设备切换至接入点模式并辅助与所述第一电子设备关联的其它电子设备修复网络连接;Receive a first repair network instruction; the first repair network 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 network connections;
    根据所述第一修复网络指令开启第一接入点;enabling the first access point according to the first repair network instruction;
    接受第二电子设备接入所述第一接入点,与所述第二电子设备建立安全会话;所述第一电子设备与所述第二电子设备关联;Accepting a second electronic device to access 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 the 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.
  12. 如权利要求11所述的方法,其特征在于,所述通过所述安全会话向所述第二电子设备发送目标网络的网络配置信息,包括:The method according to claim 11, wherein the sending the network configuration information of the target network to the second electronic device through the secure session comprises:
    根据第一会话密钥加密所述网络配置信息得到第一加密信息,将所述第一加密信息发送给所述第二电子设备;Encrypting the network configuration information according to the 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 obtained through negotiation between the first electronic device and the second electronic device during establishing a secure session.
  13. 如权利要求11或12所述的方法,其特征在于,所述第一修复网络指令中包括所述第一接入点的配置信息;所述根据所述第一修复网络指令开启第一接入点,包括:根据所述第一修复网络指令中的所述第一接入点的配置信息开启所述第一接入点;The method according to claim 11 or 12, wherein the first repair network instruction includes configuration information of the first access point; and the opening of the first access point according to the first repair network instruction point, including: enabling the first access point according to the configuration information of the first access point in the first repair network instruction;
    或者or
    所述第一修复网络指令中包括所述第一接入点的标识;所述根据所述第一修复网络指令开启第一接入点,包括:根据所述第一修复网络指令中的所述第一接入点的标识确定所述第一电子设备存储的所述第一接入点的配置信息,根据所述第一接入点的配置信息开启所述第一接入点。The first repair network instruction includes the identifier of the first access point; the enabling of the first access point according to the first repair network instruction includes: according to the first repair network instruction The identifier of the first access point determines the configuration information of the first access point stored in the first electronic device, and the first access point is enabled according to the configuration information of the first access point.
  14. 如权利要求11-13任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 11-13, further comprising:
    向所述第二电子设备发送第二修复网络指令,所述第二修复网络指令用于指示所述第二电子设备切换至接入点模式并辅助与所述第一电子设备关联的其它电子设备修复网络连接;Sending a second repair network instruction to the second electronic device, the second repair network 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 repair network connection;
    接收所述第二电子设备转发的来自第三电子设备的请求信息,所述请求信息用于请求修复所述第三电子设备的网络连接;所述第一电子设备与所述第三电子设备关联,所述第三电子设备与所述第二电子设备之间的距离小于或等于预设距离阈值;receiving request information from a third electronic device forwarded by the second electronic device, where 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 , 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 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, so that the third electronic device according to the second electronic device The second encrypted information forwarded by the device accesses the target network.
  15. 如权利要求14所述的方法,其特征在于,The method of claim 14, wherein,
    所述接收所述第二电子设备转发的来自第三电子设备的请求信息,包括: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 enabled 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 enabled by the second electronic device, and sending the second encrypted information to the second electronic device;
    其中,所述第一电子设备与所述第二电子设备之间的安全会话为所述第二电子设备根据所述网络配置接入所述目标网络后建立的。Wherein, 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.
  16. 如权利要求14或15所述的方法,其特征在于,在向所述第二电子设备发送第二修复网络指令之前,所述方法还包括:The method according to claim 14 or 15, wherein before sending the second repair network instruction to the second electronic device, the method further comprises:
    确定所述第一电子设备开启所述第一接入点的时长大于预设时间阈值,和/或,确定与所述第一电子设备关联的至少一个电子设备未修复网络连接。It is determined that the time period during which the first electronic device turns on the first access point is longer 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.
  17. 如权利要求14-16任一项所述的方法,其特征在于,所述第二修复网络指令包含目标数量,所述目标数量用于指示待修复网络连接的电子设备的数量。The method according to any one of claims 14-16, wherein the second network repair instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired.
  18. 如权利要求14-17任一项所述的方法,其特征在于,所述第一电子设备中存储与所述第一电子设备关联的至少一个电子设备的设备标识和认证凭据;所述第二会话密钥是根据所述第三电子设备随机生成的第一随机数、所述第一电子设备随机生成的第二随机数和所述第三电子设备的认证凭据确定的。The method according to any one of claims 14-17, 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 The session key is determined according to 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 credential of the third electronic device.
  19. 如权利要求11-18任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 11-18, further comprising:
    确定所述第二电子设备连接到所述目标网络,并与所述第一电子设备建立安全会话后,将第二接入点的配置信息发送给所述第二电子设备,所述第二接入点的配置信息用于所述第二电子设备在下一次网络修复中查找用于辅助修复网络连接的接入点。After determining that the second electronic device is connected to the target network and establishing a secure session with the first electronic device, sending the configuration information of the second access point to the second electronic device, and the second access point The configuration information of the access point is used for the second electronic device to search for an access point for assisting in repairing the network connection in the next network repair.
  20. 如权利要求11-19任一项所述的方法,其特征在于,所述第一电子设备为家居中枢设备。The method according to any one of claims 11-19, wherein the first electronic device is a home hub device.
  21. 一种网络修复方法,应用于第二电子设备,其特征在于,所述方法包括:A method for repairing a network, applied to a second electronic device, characterized in that the method includes:
    接入第一电子设备开启的第一接入点,与所述第一电子设备建立安全会话;所述第一电子设备与所述第二电子设备关联;所述第一接入点为所述第一电子设备开启的用于辅助与所述第一电子设备关联的其它电子设备修复网络连接的接入点;access the first access point opened by the first electronic device, and establish a secure session with the first electronic device; the first electronic device is associated with the second electronic device; the first access point is the an access point enabled by the first electronic device to assist other electronic devices associated with the first electronic device to restore network connections;
    接收所述第一电子设备通过所述安全会话发送的目标网络的网络配置信息;receiving network configuration information of the target network sent by the first electronic device through the secure session;
    根据所述网络配置信息接入所述目标网络。Accessing the target network according to the network configuration information.
  22. 如权利要求21所述的方法,其特征在于,所述接收所述第一电子设备通过所述安全会话发送的目标网络的网络配置信息,包括:The method according to claim 21, wherein the receiving the network configuration information of the target network sent by the first electronic device through the secure session comprises:
    接收所述第一电子设备发送的第一加密信息,根据第一会话密钥对所述第一加密信息进行解密,获取所述网络配置信息;其中,所述第一会话密钥为所述第一电子设备与所述第二电子设备在建立安全会话过程中协商得到的。receiving the first encrypted information sent by the first electronic device, decrypting the first encrypted information according to a first session key, and obtaining the network configuration information; wherein the first session key is the first session key It is obtained through negotiation between an electronic device and the second electronic device during the process of establishing a secure session.
  23. 如权利要求21或22所述的方法,其特征在于,所述方法还包括:The method according to claim 21 or 22, further comprising:
    接收所述第一电子设备发送的所述第二修复网络指令,所述第二修复网络指令用于指示所述第二电子设备切换至接入点模式并辅助与所述第一电子设备关联的其它电子设备修复网络连接;receiving the second repair network instruction sent by the first electronic device, the second repair network instruction is used to instruct the second electronic device to switch to the access point mode and assist the network associated with the first electronic device Restoring network connections for other electronic devices;
    根据所述第二修复网络指令开启所述第一接入点;enabling 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 request information sent by the third electronic device, where the request information is used to request to repair the network connection of the third electronic device;
    将所述请求信息转发至所述第一电子设备;forwarding the request information to the first electronic device;
    接收所述第一电子设备发送的第二加密信息,将所述第二加密信息转发至所述第三电子设备,以使所述第三电子设备获取所述第二加密信息中的网络配置信息,并根据所述网络配置信息接入所述目标网络;其中,所述第二加密信息为所述第一电子设备根据第二会话密钥加密所述网络配置信息得到的。receiving the second encrypted information sent by the first electronic device, forwarding the second encrypted information to the third electronic device, so that the third electronic device obtains the network configuration information in the second encrypted information , and access 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 a second session key.
  24. 如权利要求23所述的方法,其特征在于,The method of claim 23, wherein,
    所述将所述请求信息转发至所述第一电子设备,包括:The forwarding the request information to the first electronic device includes:
    根据所述网络配置信息接入所述目标网络,并与所述第一电子设备建立安全会话;通过所述第二电子设备与所述第一电子设备之间的安全会话,将所述请求信息发送给所述第一电子设备;或者Access the target network according to the network configuration information, and establish a secure session with the first electronic device; pass the request information through the secure session between the second electronic device and the first electronic device sent to said first electronic device; or
    接受所述第一电子设备接入所述第二电子设备开启的所述第一接入点,将所述请求信息发送给所述第一电子设备;Accepting that the first electronic device accesses the first access point enabled 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:
    根据所述网络配置信息接入所述目标网络,并与所述第一电子设备建立安全会话;通过所述第二电子设备与所述第一电子设备之间的安全会话,接收所述第一电子设备发送的所述第二加密信息;或者Access the target network according to the network configuration information, and establish a secure session with the first electronic device; receive the first electronic device through the secure session between the second electronic device and the first electronic device said second encrypted message sent by the electronic device; or
    接受所述第一电子设备接入所述第二电子设备开启的所述第一接入点,接收所述第一电子设备发送的所述第二加密信息。accepting the first electronic device to access the first access point opened by the second electronic device, and receiving the second encrypted information sent by the first electronic device.
  25. 如权利要求23或24所述的方法,其特征在于,所述第二修复网络指令包含目标数量,所述目标数量用于指示待修复网络连接的电子设备的数量;所述方法还包括:The method according to claim 23 or 24, wherein the second repairing network instruction includes a target number, and the target number is used to indicate the number of electronic devices connected to the network to be repaired; the method also includes:
    确定所述第二电子设备开启所述第一接入点的时长大于预设时间阈值,和/或,确定已修复网络连接的电子设备数量为目标数量时,关闭所述第一接入点,并根据所述网络配置信息接入所述目标网络。Determining that the duration of the second electronic device opening the first access point is greater than a preset time threshold, and/or, when determining that the number of electronic devices having repaired network connections is the target number, closing the first access point, and accessing the target network according to the network configuration information.
  26. 如权利要求23-25任一项所述的方法,其特征在于,所述第一电子设备中存储与所述第一电子设备关联的至少一个电子设备的设备标识和认证凭据;所述第二会话密钥是根据所述第三电子设备随机生成的第一随机数、所述第一电子设备随机生成的第二随机数和所述第三电子设备的认证凭据确定的。The method according to any one of claims 23-25, 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 The session key is determined according to 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 credential of the third electronic device.
  27. 如权利要求21-26任一项所述的方法,其特征在于,在根据所述网络配置信息接入所述目标网络之后,所述方法还包括:The method according to any one of claims 21-26, wherein after accessing the target network according to the network configuration information, the method further comprises:
    与所述第一电子设备建立安全会话,接收所述第一电子设备发送的第二接入点的配置信息,所述第二接入点的配置信息用于所述第二电子设备在下一次网络修复中查找用于辅助修复网络连接的接入点。Establish a secure session with the first electronic device, and receive the configuration information of the second access point sent by the first electronic device, the configuration information of the second access point is used for the second electronic device in the next network Find access points in Repair to assist with repairing network connections.
  28. 一种电子设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求11-20中任一所述的方法,或执行如权利要求21-27中任一所述的方法。An electronic device, characterized in that it includes at least one processor, the at least one processor is coupled with at least one memory, and the at least one processor is used to read the computer program stored in the at least one memory to execute The method according to any one of claims 11-20, or performing the method according to any one of claims 21-27.
  29. 一种电子设备,其特征在于,所述电子设备包括多个功能模块;所述多个功能模块相互作用,以执行如权利要求11-20中任一所述的方法,或执行如权利要求21-27中任一所述的方法。An electronic device, characterized in that the electronic device includes a plurality of functional modules; the plurality of functional modules interact to perform the method according to any one of claims 11-20, or to perform the method according to claim 21 - The method described in any one of 27.
  30. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求11-20中任一所述的方法,或执行如权利要求21-27中任一所述的方法。A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, it causes the computer to execute the method according to any one of claims 11-20, or Performing the method as claimed in any one of claims 21-27.
PCT/CN2022/128711 2021-11-05 2022-10-31 Communication system, network repair method, and device WO2023078214A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111306571.4A CN116095673A (en) 2021-11-05 2021-11-05 Communication system, network repair method and device
CN202111306571.4 2021-11-05

Publications (1)

Publication Number Publication Date
WO2023078214A1 true WO2023078214A1 (en) 2023-05-11

Family

ID=86199671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/128711 WO2023078214A1 (en) 2021-11-05 2022-10-31 Communication system, network repair method, and device

Country Status (2)

Country Link
CN (1) CN116095673A (en)
WO (1) WO2023078214A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120417A1 (en) * 2006-11-22 2008-05-22 Gopal Harikumar Network-Initiated Session Recovery
CN111343695A (en) * 2020-02-27 2020-06-26 维沃移动通信有限公司 Network connection method, first electronic device, and medium
CN112272118A (en) * 2020-11-13 2021-01-26 Oppo广东移动通信有限公司 Network repairing method, device, storage medium and electronic equipment
CN113596792A (en) * 2021-07-07 2021-11-02 青岛海尔科技有限公司 Binding method and device of electronic equipment, storage medium and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112566113B (en) * 2019-09-06 2023-04-07 阿里巴巴集团控股有限公司 Key generation and terminal network distribution method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120417A1 (en) * 2006-11-22 2008-05-22 Gopal Harikumar Network-Initiated Session Recovery
CN111343695A (en) * 2020-02-27 2020-06-26 维沃移动通信有限公司 Network connection method, first electronic device, and medium
CN112272118A (en) * 2020-11-13 2021-01-26 Oppo广东移动通信有限公司 Network repairing method, device, storage medium and electronic equipment
CN113596792A (en) * 2021-07-07 2021-11-02 青岛海尔科技有限公司 Binding method and device of electronic equipment, storage medium and electronic device

Also Published As

Publication number Publication date
CN116095673A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN110611905B (en) Information sharing method, terminal device, storage medium, and computer program product
EP3794853B1 (en) Secure systems and methods for establishing wireless audio sharing connection
JP6571676B2 (en) Safe and simplified procedure for joining a social Wi-Fi mesh network
US8375207B2 (en) Method and apparatus for authenticating a network device
US9445273B2 (en) Establishing WLAN association
US8423772B2 (en) Multi-hop wireless network system and authentication method thereof
WO2018090829A1 (en) Method and apparatus for allowing intelligent terminal device to access internet
WO2019137030A1 (en) Safety certification method, related device and system
CN110912880A (en) Network distribution method and device, electronic equipment and storage medium
CN110099427A (en) A kind of method and system to distribution net equipment access network hotspot equipment
CN107567017B (en) Wireless connection system, device and method
CN110891299A (en) Network distribution method and device, electronic equipment and storage medium
CN112291787B (en) Network connection method, device and system
WO2018196686A1 (en) Service response method and middleware thereof
Suomalainen Smartphone assisted security pairings for the Internet of Things
WO2018108022A1 (en) Multi-network integration security and authentication method and system
JP6453351B2 (en) Authentication of network elements in communication networks
WO2023078214A1 (en) Communication system, network repair method, and device
JP2007074180A (en) Communication system and communication method
US20230107045A1 (en) Method and system for self-onboarding of iot devices
JP2005064686A (en) User terminal changeover method and user authentication method
US10869345B1 (en) Systems and methods for provisioning devices for WLAN
US20220361261A1 (en) Method for connecting a communication node and communication node
JP6153031B2 (en) Communication system and communication method
JP6415865B2 (en) Network system, communication control device, and communication device

Legal Events

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

Ref document number: 22889239

Country of ref document: EP

Kind code of ref document: A1