Network switching method and system, and electronic device and computer-readable storage medium

By establishing a communication connection between the terminal device and the smart device and directly sending the network replacement instruction, the cumbersome process problem when the network is abnormal in the whole house smart scenario is solved, and the network replacement is realized without resetting the device and re-configuring the network, which improves the convenience of operation and user experience.

WO2025161377A9PCT designated stage Publication Date: 2025-10-16HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/115947
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-29
Filing Date
2024-08-30
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

In a smart home scenario, when the network is faulty, the normal function of smart devices is affected. Existing technology requires resetting the device and reconfiguring the network to change the network, which is a cumbersome and time-consuming process. This is especially complicated for the elderly, who also find it difficult to distinguish between device faults and network faults.

Method used

By establishing a communication connection between the terminal device and the smart device, network replacement instructions can be directly sent without resetting the device or re-configuring the network. Multiple communication types are used to improve the connection success rate and provide operation guidance to the user, simplifying the network replacement process.

Benefits of technology

It greatly simplifies the network replacement process, saves time, improves operational convenience and user experience, especially for the elderly, and reduces the complexity of device resetting and network configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024115947_16102025_PF_FP_ABST
    Figure CN2024115947_16102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of the Internet of Things. Provided are a network switching method and system, and an electronic device and a computer-readable storage medium. In the present application, a communication connection is established between a terminal device and an intelligent device, such that the terminal device and the intelligent device can directly exchange network information by means of the communication connection, so as to complete the network switching of the intelligent device, without the need for resetting the intelligent device and performing network configuration, thereby greatly simplifying the network switching process, saving on time and improving the efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Network replacement method, system, electronic device and computer readable storage medium

[0001] The present application claims priority from the Chinese patent application No. 202410125360.8 filed on January 29, 2024, and entitled "Network replacement method, system, electronic device and computer readable storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of Internet of Things, and in particular to a network replacement method, system, electronic device and computer readable storage medium. BACKGROUND

[0003] In the whole-house intelligent scene, the basic functions of the intelligent device are strongly dependent on the connected network. When the network is abnormal, it will affect the normal functions of the intelligent device. Usually, after the network is abnormal, some users will replace the network, such as replacing the network device (such as a router) connected to the intelligent device, to ensure the normal functions of the intelligent device. However, the intelligent device needs to be reset and reconfigured to access the new network, which is a cumbersome process and takes a lot of time.

[0004] SUMMARY

[0005] The present application provides a network replacement method, system, electronic device and computer readable storage medium, which establishes a communication connection between the terminal device and the intelligent device, and completes the replacement of the network of the intelligent device based on the communication connection, without resetting and configuring the network of the intelligent device, thereby helping to solve the problem of cumbersome network replacement process and long time consumption.

[0006] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0007] In a first aspect, a network replacement method is provided, applied to a terminal device, and the method comprises: establishing a communication connection with an intelligent device when the intelligent device cannot connect to a first network through a gateway, the terminal device being capable of connecting to the first network; sending a network replacement instruction to the intelligent device through the communication connection, the network replacement instruction comprising network information of the first network, the network replacement instruction being used to instruct the intelligent device to replace the network connected by the intelligent device from a second network to the first network according to the network information of the first network.

[0008] The scheme provided in the first aspect above enables the terminal device and the smart device to directly interact with each other through the communication connection, and completes the network replacement of the smart device without resetting and network configuration of the smart device, greatly simplifying the network replacement process, saving time, and improving efficiency.

[0009] The smart device cannot connect to the first network through the gateway means that the smart device is in a state of being unable to access the first network through the gateway, that is, the smart device is in an offline state.

[0010] As a possible implementation, when the smart device cannot connect to the first network through the gateway by using the first communication type, the terminal device establishes a communication connection with the smart device by using a second communication type; the first communication type is the same as or different from the second communication type. In this way, the terminal device and the smart device can successfully establish a communication connection.

[0011] For example, the first communication type is one of the communication types supported by the terminal device and the smart device. In this way, the communication connection is established based on the communication types supported by the terminal device and the smart device, which can improve the success rate of establishing the communication connection.

[0012] As a possible implementation, when multiple smart devices cannot connect to the first network through the gateway by using the first communication type, the terminal device establishes a communication connection with a first smart device in the multiple smart devices by using a second communication type, and establishes a communication connection with a second smart device in the multiple smart devices by using a third communication type; the second communication type is the same as or different from the third communication type. In this way, when the multiple smart devices cannot connect to the first network through the gateway, the terminal device can establish a communication connection with each smart device by using different communication types, thereby improving the success rate.

[0013] As a possible implementation, before the communication connection with the smart device is established, the method further comprises: prompting the user with recommendation information according to the priority of the communication types supported by the terminal device and the smart device in common, the recommendation information being used to recommend the user with the communication type for which the terminal device and the smart device establish the communication connection; and establishing the communication connection with the smart device comprises: in response to the user input operation for the communication type of the recommendation information, establishing the communication connection of the target communication type with the smart device, the target communication type being the communication type input by the user. In this way, the user is prompted with the recommendation information according to the priority of the communication types supported by the terminal device and the smart device in common, so that the user can select the communication type with higher priority, so that the terminal device and the smart device can establish the communication connection by using the communication type with the highest priority in terms of operation convenience, which can further improve the convenience of network replacement, simplify the process of network replacement, save time, and improve efficiency.

[0014] As a possible implementation, before the communication connection with the smart device is established, the method further comprises: prompting the user with operation guidance corresponding to the target communication type, wherein the target communication type is the communication type for which the terminal device and the smart device are to establish the communication connection, and the operation guidance corresponding to different communication types is different; and establishing the communication connection with the smart device comprises: in response to the operation performed by the user based on the operation guidance corresponding to the target communication type, establishing the communication connection of the target communication type with the smart device. In this way, the user is guided through the operation guidance, which can further improve the convenience of user operation and improve user experience.

[0015] Exemplarily, the target communication type comprises a first communication type, a second communication type, and a third communication type.

[0016] As a possible implementation, the target communication type is a WiFi communication type, and establishing the communication connection of the target communication type with the smart device comprises: prompting the user with network setting information according to the network information of the second network to which the smart device is connected, the network setting information being used to instruct the user to turn on a hotspot and change the network information of the hotspot to the network information of the second network; and receiving the change operation of the user on the network information of the hotspot, and establishing the communication connection of the target communication type with the smart device through the changed hotspot. In this way, the communication connection between the terminal device and the smart device is successfully established through the hotspot, and the convenience of user operation and user experience are improved through the prompting of the user with the network setting information.

[0017] As a possible implementation, before sending the network replacement instruction to the smart device through the communication connection, the method further comprises: prompting one or more candidate networks to the user; and receiving a confirmation operation of the user on the one or more candidate networks to obtain the first network and network information of the first network. In this way, by prompting the candidate networks to the user, the user can specify the network to which the smart device is ready to connect, and the convenience of user operation is improved.

[0018] As a possible implementation, the method of establishing the communication connection with the smart device comprises: receiving a network replacement operation of the user, and establishing the communication connection with the smart device according to the network replacement operation. In this way, by receiving the network replacement operation of the user and establishing the communication connection with the smart device according to the network replacement operation, the convenience of the user in replacing the network of the smart device is improved.

[0019] As a possible implementation, before receiving the network replacement operation of the user, the method further comprises:

[0020] After receiving the network exception information from the server, the user is prompted about the network exception; and the network replacement operation of the user is received, which comprises: receiving the network replacement operation of the user on the network exception prompt. In this way, by prompting the user about the network exception, the user can discover the network problem in time and initiate the network replacement for the network problem, and the user experience is improved.

[0021] As a possible implementation, before receiving the network replacement operation of the user, the method further comprises: after receiving the device exception information from the server for the smart device, the user is prompted about the device network exception; and the network replacement operation of the user is received, which comprises: receiving the network replacement operation of the user for the smart device according to the device network exception prompt. In this way, by prompting the user about the device network exception, the user can discover the device problem in time and initiate the network replacement for the device problem, and the user experience is improved.

[0022] As a possible implementation, before establishing the communication connection with the smart device, the method further comprises: receiving the network replacement operation of the user, initiating a query request to the server, and the query request is used to request to query the communication type supported by the smart device; receiving the communication type supported by the smart device sent from the server, and establishing the communication connection with the smart device according to the communication type supported by the smart device. In this way, by obtaining the communication type supported by the smart device and establishing the communication connection with the smart device according to the communication capability supported by the smart device, the success rate of establishing the communication connection can be improved.

[0023] As a possible implementation, the method further comprises: receiving a device adding operation of the user, displaying a device adding interface, the device adding interface comprising a device reminding control and a network information input area; the device reminding control is used for the user to select whether to perform a device networking exception prompt when the smart device is in an offline state, and the network information input area is used for the user to input network information of a network to be connected by the smart device; and sending, to the smart device, reminding function setting information and network information of the network to be connected, wherein the reminding function setting information is obtained according to the device reminding control. In this way, the smart device can access the network to be connected according to the network information of the network to be connected, and send the reminding function setting information and a device identifier of the smart device to the server through the network to be connected, so that the server can feed back a device exception when detecting that the device is offline, thereby facilitating the user to discover a device problem in a timely manner and improving user experience.

[0024] As a possible implementation, the gateway corresponding to the second network is different from the gateway corresponding to the first network, or the network information of the second network is different from the network information of the first network. In this way, when the gateway is replaced or the network information of the network is replaced, the network connected by the smart device can be replaced, thereby improving the convenience of network replacement.

[0025] As a possible implementation, the communication type of the communication connection established between the terminal device and the smart device comprises any one of the following: Bluetooth, near field communication, and WiFi. In this way, by selecting multiple communication types, the terminal device and the smart device can successfully establish a communication connection, and the convenience of network replacement can be further improved.

[0026] As a possible implementation, before sending the network replacement instruction to the smart device through the communication connection, the method further comprises: sending, to the smart device, verification information, the verification information comprising network information of a second network connected by the smart device and a device identifier of the smart device, the network information of the second network connected by the smart device and the device identifier of the smart device being obtained from the server; and sending, to the smart device through the communication connection, the network replacement instruction, comprising: after receiving feedback information of the smart device indicating that the verification information is verified, sending, to the smart device through the communication connection, the network replacement instruction. In this way, by performing reliability verification through the verification information, the reliability of data transmission can be improved.

[0027] As a possible implementation, the method further comprises: sending, to the server, a network information request, and receiving, from the server, network information of a second network connected by the smart device and a device identifier of the smart device according to the network information request. In this way, the terminal device can perform reliability verification with the smart device according to the network information of the second network and the device identifier of the smart device, thereby improving the reliability of data transmission.

[0028] In a second aspect, a network replacement method is improved, applied to a server, and the method comprises the following steps. A query request is received from a terminal device, and the query request is used to request a communication type supported by a smart device. The communication type supported by the smart device is sent to the terminal device, so that the terminal device establishes a communication connection with the smart device according to the communication type supported by the smart device, and sends a network replacement instruction to the smart device through the communication connection. The network replacement instruction comprises network information of a first network, and the network replacement instruction is used to instruct the smart device to replace a network connected by the smart device from a second network to the first network according to the network information of the first network.

[0029] According to the scheme provided by the second aspect, the communication type supported by the smart device is sent to the terminal device, so that the terminal device can establish a communication connection with the smart device according to the communication type supported by the smart device, thereby enabling the terminal device and the smart device to directly exchange network information through the communication connection, completing the network replacement of the smart device, without resetting and network configuration of the smart device, greatly simplifying the network replacement process, saving time, and improving efficiency.

[0030] As a possible implementation, the method further comprises the following steps. After receiving the network information request sent by the terminal device, the network information of the second network connected by the smart device and the device identifier of the smart device are sent to the terminal device. In this way, the terminal device can perform reliability verification with the smart device according to the network information of the second network and the device identifier of the smart device, thereby improving the reliability of data transmission.

[0031] As a possible implementation, the method further comprises the following steps. The device replacement information sent by the smart device is received, the device replacement information comprises the network information of the first network and the device identifier of the smart device, and the device replacement information is used to instruct the server to store the association relationship between the device identifier of the smart device and the network information of the first network. The association relationship between the device identifier of the smart device and the network information of the first network is stored. The network state of the smart device is sent to the terminal device. In this way, through the device replacement information, the server can be instructed that the smart device has replaced the network to the first network and has recovered the online state, so as to timely notify the user that the smart device has recovered the network state. Meanwhile, the server stores the association relationship between the device identifier of the smart device and the network information of the first network, so as to facilitate subsequent detection of network abnormity.

[0032] As a possible implementation, the method further comprises: detecting whether one or more target devices having the same user information and network information as the smart device are in an online state when it is detected that the smart device is in an offline state; sending network exception information to the terminal device if the one or more target devices are all in an offline state; and sending device exception information for the smart device to the terminal device if at least one of the one or more target devices is in an online state. In this way, by analyzing the abnormal scenario based on the network information and user information corresponding to the smart device when the smart device is offline, the user can be accurately reminded of whether the device is abnormal or the network is abnormal, which facilitates user operation and improves user experience.

[0033] As a possible implementation, the method further comprises: detecting whether one or more target devices having the same user information and network information as the smart device are in an online state when it is detected that the smart device is in an offline state; sending network exception information to the terminal device if the one or more target devices are all in an offline state; and sending device exception information for the smart device to the terminal device if at least one of the one or more target devices is in an online state. In this way, by analyzing the abnormal scenario based on the network information and user information corresponding to the smart device when the smart device is offline, the user can be accurately reminded of whether the device is abnormal or the network is abnormal, which facilitates user operation and improves user experience.

[0034] As a possible implementation, the method further comprises: receiving the reminder function setting information and the device identifier of the smart device sent by the smart device, wherein the reminder function setting information is used by the server to determine whether to perform device network exception prompt when the smart device is in an offline state; and storing the association relationship between the reminder function setting information of the smart device and the device identifier of the smart device. In this way, by setting an abnormal prompt for the smart device, the smart device can be promptly prompted for an abnormality when the smart device is offline.

[0035] In a third aspect, a network replacement method is improved and applied to a smart device. The method comprises: establishing a communication connection with a terminal device; receiving a network replacement instruction from the terminal device through the communication connection, wherein the network replacement instruction comprises network information of a first network; and replacing a second network connected by the smart device with the first network according to the network information of the first network.

[0036] The scheme provided in the third aspect above establishes a communication connection between the terminal device and the smart device, so that the terminal device and the smart device can directly interact with network information through the communication connection to complete the replacement of the network of the smart device, without resetting and network configuration of the smart device, greatly simplifying the network replacement process, saving time, and improving efficiency.

[0037] As a possible implementation, before receiving the network replacement instruction from the terminal device through the communication connection, the method further comprises: receiving the verification information sent by the terminal device; when the network information and the device identifier in the verification information are consistent with the network information and the device identifier stored by the smart device, sending feedback information to the terminal device; and the network replacement instruction is sent by the terminal device to the smart device after receiving the feedback information. In this way, the reliability of data transmission can be improved by performing reliability verification through the verification information.

[0038] As a possible implementation, after replacing the connected second network with the first network, the method further comprises: sending device replacement information to the server through the first network, the device replacement information comprising the network information of the first network and the device identifier of the smart device, and the device replacement information being used to indicate the server to store the association between the device identifier of the smart device and the network information of the first network. In this way, by sending the device replacement information to the server, it can be indicated that the smart device has replaced the network with the first network and has restored the online state, so that the user can be notified in time that the smart device has restored the network state, and meanwhile, the server stores the association between the device identifier of the smart device and the network information of the first network, so as to facilitate subsequent detection of network abnormalities.

[0039] As a possible implementation, the method further comprises: receiving the reminder function setting information sent by the terminal device and the network information of the network to be connected; accessing the network to be connected according to the network information of the network to be connected, and sending the reminder function setting information and the device identifier to the server through the network to be connected, so as to indicate the server to store the association between the reminder function setting information of the smart device and the device identifier of the smart device, wherein the reminder function setting information is used for the server to determine whether to perform device network abnormality prompting when the smart device is in an offline state. In this way, the server can feed back device abnormalities when detecting device offline, so as to facilitate the user to discover device problems in time and improve user experience.

[0040] As a possible implementation, the method further comprises: sending the communication type supported by the smart device to the server. In this way, the terminal device can obtain the communication type supported by the smart device from the server, and establish a communication connection with the smart device according to the communication capability supported by the smart device, so as to improve the success rate of communication connection establishment.

[0041] In a fourth aspect, an Internet of Things system is provided, and the Internet of Things system includes a terminal device and a smart device. The terminal device is configured to establish a communication connection with the smart device when the smart device cannot connect to a first network through a gateway. The terminal device is capable of connecting to the first network. The terminal device is configured to send a network replacement instruction to the smart device through the communication connection. The network replacement instruction includes network information of the first network. The smart device is configured to receive the network replacement instruction from the terminal device through the communication connection. The smart device is configured to replace a second network connected by the smart device with the first network according to the network information of the first network.

[0042] The fourth aspect provides the above scheme. When the smart device cannot connect to the first network through the gateway, the terminal device establishes a communication connection with the smart device. The terminal device and the smart device can directly exchange network information through the communication connection. The network of the smart device is replaced without resetting and network configuration of the smart device. The network replacement process is greatly simplified. Time is saved. Efficiency is improved.

[0043] As a possible implementation, the Internet of Things system further includes a server. The terminal device is configured to initiate a query request to the server. The query request is used to query a communication type supported by the smart device. The server is configured to send the communication type supported by the smart device to the terminal device according to the query request. The terminal device is configured to establish a communication connection with the smart device according to the communication type supported by the smart device when the smart device cannot connect to the first network through the gateway. In this way, the success rate of establishing the communication connection is improved by obtaining the communication type supported by the smart device and establishing the communication connection according to the communication capability of the smart device.

[0044] As a possible implementation, the terminal device is configured to: prompt a recommendation information to a user according to a priority of a communication type supported by the terminal device and the smart device. The recommendation information is used to recommend the communication type for the terminal device to establish the communication connection with the smart device. The terminal device is configured to establish a communication connection of a target communication type with the smart device in response to a user input operation on the communication type of the recommendation information. The target communication type is the communication type input by the user. In this way, the user can select the communication type with a higher priority according to the priority of the communication type supported by the terminal device and the smart device. The terminal device and the smart device can establish the communication connection by using the communication type with the highest priority in terms of operation convenience. The network replacement convenience is further improved. The network replacement process is simplified. Time is saved. Efficiency is improved.

[0045] As a possible implementation, after the connected second network is replaced by the first network, the smart device is further configured to send device replacement information to the server through the first network, the device replacement information comprising network information of the first network and a device identifier of the smart device; the server is configured to receive the device replacement information sent by the smart device, store an association between the device identifier of the smart device and the network information of the first network, and send a network status of the smart device to the terminal device; and the terminal device is configured to prompt the user about the network status of the smart device. In this way, by sending the device replacement information to the server, it can be indicated to the server that the smart device has replaced the network to the first network and has restored the online state, so that the user can be promptly notified that the smart device has restored the network status. At the same time, the server stores the association between the device identifier of the smart device and the network information of the first network, so as to facilitate subsequent detection of network abnormalities.

[0046] As a possible implementation, the terminal device is configured to receive a network replacement operation of the user, and establish a communication connection with the smart device according to the network replacement operation. In this way, by receiving the network replacement operation of the user and establishing a communication connection with the smart device according to the network replacement operation, the convenience of the user in replacing the network of the smart device is improved.

[0047] As a possible implementation, the server is configured to send network abnormality information to the terminal device after detecting that the network connected by the smart device is abnormal; and the terminal device is configured to prompt the user about the network abnormality after receiving the network abnormality information from the server, and receive a network replacement operation of the user in response to the network abnormality prompt. In this way, by prompting the user about the network abnormality, the user can promptly discover network problems and initiate network replacement in response to the network problems, thereby improving the user experience.

[0048] As a possible implementation, the server is configured to send device abnormality information to the terminal device after detecting that the smart device is in an offline state; and the terminal device is configured to prompt the user about a device network connection abnormality after receiving the device abnormality information from the server, and receive a network replacement operation of the user in response to the device network connection abnormality prompt for the smart device. In this way, by prompting the user about the device network connection abnormality, the user can promptly discover device problems and initiate network replacement in response to the device problems, thereby improving the user experience.

[0049] As a possible implementation, the server is configured to: when detecting that the smart device is in an offline state, detect whether one or more target devices having the same user information and network information as the smart device are in an online state; if the one or more target devices are all in an offline state, send network exception information to the terminal device; and if at least one of the one or more target devices is in an online state, send device exception information for the smart device to the terminal device. In this way, by analyzing the abnormal scenario based on the network information and user information corresponding to the smart device when the smart device is offline, the user can be accurately reminded of whether the device is abnormal or the network is abnormal, facilitating user operation and improving user experience.

[0050] As a possible implementation, the server is configured to send device exception information to the terminal device when the smart device corresponding reminder function setting information is in an offline state. In this way, by setting an abnormal prompt for the smart device, the smart device can be promptly prompted when it is offline.

[0051] As a possible implementation, the terminal device is configured to receive a device addition operation of a user, display a device addition interface, the device addition interface including a device reminder control and a network information input area; the device reminder control is used for the user to select whether to perform a device network connection abnormal prompt when the smart device is in an offline state; and the network information input area is used for the user to input network information of a network to be connected by the smart device. The terminal device is configured to send reminder function setting information and network information of the network to be connected to the smart device in response to an operation of the user on the device reminder control and the network information input area, wherein the reminder function setting information is obtained according to the device reminder control. The smart device is configured to receive the reminder function setting information and the network information of the network to be connected sent by the terminal device, access the network to be connected according to the network information of the network to be connected, and send the reminder function setting information and a device identifier of the smart device to the server through the network to be connected. The server is configured to receive the reminder function setting information and the device identifier of the smart device sent by the smart device, and store an association relationship between the reminder function setting information of the smart device and the device identifier of the smart device, wherein the reminder function setting information is used by the server to determine whether to perform a device network connection abnormal prompt when the smart device is in an offline state. In this way, by setting an abnormal prompt for the smart device, the smart device can be promptly prompted when it is offline.

[0052] In a fifth aspect, an electronic device is provided, comprising a first communication unit and a first processing unit; the first communication unit is configured to establish a communication connection with the smart device when the smart device cannot connect to the first network through the gateway; the first processing unit is configured to send a network replacement instruction to the smart device through the communication connection, the network replacement instruction comprising network information of the first network, and the network replacement instruction being configured to instruct the smart device to replace a network connected by the smart device from a second network to the first network according to the network information of the first network.

[0053] The electronic device provided in the fifth aspect has the advantages described with reference to any one of the embodiments of the first aspect, which will not be described herein again. The electronic device has the functions of implementing the behaviors in the method embodiments of any one of the first aspect. The functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software comprises one or more modules corresponding to the above functions.

[0054] In a sixth aspect, a server is provided, comprising a data receiving unit and a data sending unit. The data receiving unit is configured to receive a query request sent by a terminal device, the query request being configured to request to query a communication type supported by a smart device; and the data sending unit is configured to send the communication type supported by the smart device to the terminal device, so that the terminal device establishes a communication connection with the smart device according to the communication type supported by the smart device, and sends a network replacement instruction to the smart device through the communication connection; wherein the network replacement instruction comprises network information of a first network, and the network replacement instruction is configured to instruct the smart device to replace a network connected by the smart device from a second network to the first network according to the network information of the first network.

[0055] The server provided in the sixth aspect has the advantages described with reference to any one of the embodiments of the second aspect, which will not be described herein again. The server has the functions of implementing the behaviors in the method embodiments of any one of the second aspect. The functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software comprises one or more modules corresponding to the above functions.

[0056] In a seventh aspect, an electronic device is provided, comprising a second communication unit and a network replacement unit; the second communication unit is configured to establish a communication connection with a terminal device; and the network replacement unit is configured to receive a network replacement instruction from the terminal device through the communication connection, the network replacement instruction comprising network information of a first network, and the network replacement unit is configured to replace a second network connected by the electronic device to the first network according to the network information of the first network.

[0057] The electronic device provided in the seventh aspect has the advantages of any of the embodiments of the third aspect, which will not be described herein. The electronic device has a function of implementing the behaviors in the method embodiments of any of the third aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0058] In an eighth aspect, an electronic device is provided, comprising: a memory configured to store computer program instructions; and a processor configured to execute the computer program instructions to support the electronic device to implement the method according to any of the possible implementation manners of the first aspect, or implement the method according to any of the possible implementation manners of the second aspect, or implement the method according to any of the possible implementation manners of the third aspect.

[0059] In a ninth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions. The computer program instructions are executed by a processing circuit to implement the method according to any of the possible implementation manners of the first aspect, or implement the method according to any of the possible implementation manners of the second aspect, or implement the method according to any of the possible implementation manners of the third aspect.

[0060] In a tenth aspect, a chip system is provided, comprising a processing circuit, and a storage medium. The storage medium stores computer program instructions. The computer program instructions are executed by the processing circuit to implement the method according to any of the possible implementation manners of the first aspect, or implement the method according to any of the possible implementation manners of the second aspect, or implement the method according to any of the possible implementation manners of the third aspect.

[0061] In an eleventh aspect, a computer program product is provided, comprising instructions. When the computer program product is run on a computer, the computer is caused to execute the method according to any of the possible implementation manners of the first aspect, or execute the method according to any of the possible implementation manners of the second aspect, or execute the method according to any of the possible implementation manners of the third aspect. BRIEF DESCRIPTION OF DRAWINGS

[0062] FIG. 1 is an interface display diagram of each smart device on a terminal device in a whole-house intelligent scenario;

[0063] FIG. 2 is an interface diagram of a preference setting of a smart lamp;

[0064] FIG. 3 is a structural diagram of an Internet of Things system provided by an embodiment of the present application;

[0065] FIG. 4 is an interface diagram of a device adding process provided by an embodiment of the present application;

[0066] FIG. 5 is an interaction diagram of adding a device according to an embodiment of the present application;

[0067] FIG. 6 is a diagram of a device adding interface according to an embodiment of the present application;

[0068] FIG. 7 is a diagram of a device adding interface according to an embodiment of the present application;

[0069] FIG. 8 is a diagram of device registration according to an embodiment of the present application;

[0070] FIG. 9 is a diagram of an abnormality prompt according to an embodiment of the present application;

[0071] FIG. 10 is a diagram of an abnormality prompt interface according to an embodiment of the present application;

[0072] FIG. 11 is a flow diagram of an abnormality prompt according to an embodiment of the present application;

[0073] FIG. 12 is an interaction diagram of a network changing method according to an embodiment of the present application;

[0074] FIG. 13 is a diagram of a network changing interface according to an embodiment of the present application;

[0075] FIG. 14 is a diagram of a network changing interface according to an embodiment of the present application;

[0076] FIG. 15 is a diagram of a network changing interface according to an embodiment of the present application;

[0077] FIG. 16 is a diagram of a network changing interface according to an embodiment of the present application;

[0078] FIG. 17 is a diagram of a candidate network interface according to an embodiment of the present application;

[0079] FIG. 18 is an interaction diagram of a network changing method according to an embodiment of the present application;

[0080] FIG. 19 is a diagram of a network changing scenario according to an embodiment of the present application;

[0081] FIG. 20 is an interaction diagram of a network changing method according to an embodiment of the present application;

[0082] FIG. 21 is a diagram of a communication type recommendation interface according to an embodiment of the present application;

[0083] FIG. 22 is a diagram of a communication type recommendation interface according to an embodiment of the present application;

[0084] FIG. 23 is an interaction diagram of a network changing method according to an embodiment of the present application;

[0085] FIG. 24 is a schematic diagram of a network setting prompt interface according to an embodiment of the present application;

[0086] FIG. 25 is a schematic diagram of a scenario of prompting a user with operation guidance according to an embodiment of the present application;

[0087] FIG. 26 is a schematic diagram of a comparison of network replacement according to an embodiment of the present application;

[0088] FIG. 27 is a schematic diagram of a structure of an electronic device 700 according to an embodiment of the present application;

[0089] FIG. 28 is a schematic diagram of a structure of an electronic device 800 according to an embodiment of the present application;

[0090] FIG. 29 is a schematic diagram of a structure of an electronic device 900 according to an embodiment of the present application;

[0091] FIG. 30 is a schematic diagram of a structure of an electronic device 1000 according to an embodiment of the present application. DETAILED DESCRIPTION

[0092] The technical solutions in the embodiments of the present application will be described below with reference to the drawings.

[0093] The terms “comprising” and “having” and any variations thereof in the description of the embodiments of the present application are intended to cover the non-exclusive inclusion. For example, a process, method, system, product, or device including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device.

[0094] Hereinafter, the terms “first”, “second”, and the like are used only for the purpose of description, and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with “first”, “second”, and the like can explicitly or implicitly include one or more of the features.

[0095] In the embodiments of the present application, the words “exemplary” or “for example” are used to mean serving as an example, instance, or illustration. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of the words “exemplary” or “for example” is intended to present concepts in a specific way.

[0096] In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise specified. "And / or" in this paper is only a description of the relationship between the associated objects, which means that there are three relationships, for example, A and / or B, which means that there are three cases: A alone, A and B together, and B alone.

[0097] As described in the background, in the whole-house intelligent scene, the basic function of the intelligent device depends on the connected network. When the network is abnormal, it will affect the normal function of the intelligent device. As shown in FIG. 1, FIG. 1 is an interface display diagram of each intelligent device (such as device 1, device 2, device 3, device 4, device 5, device 6 in FIG. 1) in the whole-house intelligent scene on the terminal device. When the network is abnormal, each intelligent device will display an offline state, indicating that the function of the device cannot be normally used.

[0098] Generally, after the network is abnormal, some users will replace the network, such as replacing the network device (such as a router) connected to the intelligent device, to ensure the normal function of the intelligent device. However, the intelligent device needs to be reset and reconfigured after a series of steps such as re-networking before it can be connected to the new network. After resetting the device and reconfiguring the network, the preference settings and personalized settings saved by the user in the application (APP) of the intelligent device, the terminal, and the cloud server will be cleared. If you want to restore the previous preference settings, you need to configure them again. As shown in FIG. 2, FIG. 2 is an interface diagram of the preference settings of the intelligent lamp. After replacing the network, if you want to restore the preference settings shown in FIG. 2, you need to reconfigure the intelligent lamp, such as reconfiguring the brightness, color temperature, RGB color, and some custom settings. The process is complicated and time-consuming.

[0099] In addition, the process of resetting the device and reconfiguring the network is different for different intelligent devices. For example, security devices installed in high places need users to climb to a high place to reset the device and reconfigure the network, which is complicated. In addition, resetting and reconfiguring the intelligent device requires users to have a basic understanding of Internet of Things (IoT) devices and WIFI technology, so for some special groups such as the elderly, the process of resetting and reconfiguring the intelligent device is very complex.

[0100] In addition, when the intelligent device is offline, the user cannot determine whether the device is abnormal or the network is abnormal, so various recovery methods will be tried, resulting in a poor experience.

[0101] Based on the above problems, the embodiment of the present application provides a network replacement method. When the smart device cannot be connected with the first network through the gateway, the terminal device is connected with the smart device to establish a communication connection. The terminal device can send a network replacement instruction to the smart device through the established communication connection, so that the smart device replaces the network, without resetting the device, and the process is simple and time-consuming.

[0102] The network replacement method provided by the embodiment of the present application can be applied to an Internet of Things system. Exemplarily, the Internet of Things system can be, but is not limited to, a smart home system, a smart medical system, and a smart traffic system.

[0103] For ease of understanding, please refer to FIG. 3, which shows a structural schematic diagram of an Internet of Things system. As shown in FIG. 3, the Internet of Things system can include a plurality of devices and a server 130.

[0104] In the embodiment of the present application, the plurality of devices at least includes a terminal device 110 and at least one smart device 120. The terminal device 110 can be a control instruction input device, such as a mobile phone, a tablet, a control panel, etc.

[0105] The smart device 120 refers to an Internet of Things smart device. For example, in a smart home scenario, the smart device 120 can be a home device, such as a smart door lock, a smart sound box, a smart curtain, a smart air conditioner, a smart camera, a smart television, a sweeping robot, a smart socket, a smart table lamp, a smart refrigerator, a smart water heater, etc.

[0106] As an example, the terminal device 110 can provide a human-computer interaction interface. A user can view the network status (offline or online) of each smart device 120, the running information of the smart device 120, etc. on the human-computer interaction interface. The user can also input a control instruction on the human-computer interaction interface by clicking the screen or voice, etc. to control the running of each smart device 120. The user can also complete the preference configuration of each smart device 120 on the human-computer interaction interface, etc.

[0107] As an example, the terminal device 110 is installed with a device application. The terminal device 110 starts the device application to display the human-computer interaction interface. Taking a mobile phone as the terminal device and a smart life application as the device application as an example, when the mobile phone starts the smart life application, the human-computer interaction interface of the smart home system can be displayed.

[0108] In the embodiment of the present application, the terminal device 110 and the smart device 120 can be interconnected through a communication network. The communication network can use any known network communication protocol, such as Bluetooth, WiFi, near field communication (NFC), or any other suitable communication protocol.

[0109] In the embodiments of the present application, the terminal device 110 and the smart device 120 can be located in the same local area network, for example, the terminal device 110 and the smart device 120 can be connected to the same WiFi network.

[0110] In the embodiments of the present application, the server 130 can be a cloud server, and the server 130 can be used to manage the smart device 120. The server 130 stores configuration information of the smart device 120, such as supported communication types, device identifiers, and the like. The server 130 can also obtain running information and network status of each smart device 120, and send the running information and network status of each smart device 120 to the terminal device 110 for the user to view.

[0111] As an example, the terminal device 110 and the server 130 can establish a connection through a WiFi network, a 4th generation mobile communication technology (4G) network, a 5th generation mobile communication technology (5G) network, and the like. As an example, the smart device 120 and the server 130 can establish a connection through a WiFi network.

[0112] It should be noted that the architecture of the Internet of Things system shown in FIG. 3 is only one implementation manner of the embodiments of the present application, and in actual applications, the Internet of Things system can also include more or fewer devices, which is not limited herein.

[0113] The network replacement method provided by the embodiments of the present application will be described in detail below with reference to the drawings, taking a smart home system as an example.

[0114] To facilitate understanding of the network replacement method provided by the embodiments of the present application, the network configuration and the adding registration process of the smart device are first described in detail below. As an example, the terminal device is installed with a device application, and the user can start the device application through the terminal device. After the terminal device starts the device application, the terminal device displays a device display interface to the user. As shown in (a) of FIG. 4, the device display interface includes the smart devices (such as device 1, device 3, device 5, device 4, device 6, etc. in (a)) that have been added by the user. The device display interface includes a function control, and the user clicks the function control. The terminal device responds to the operation of the user and displays a function prompt box to the user. The function prompt box includes a function prompt for adding a device. When the user needs to add a smart device, the user operates the function prompt for adding a device, and the terminal device responds to the operation of the user and performs device scanning. As shown in (b) of FIG. 4, when the terminal device scans the smart device, the terminal device displays a device connection interface to the user, and the device connection interface includes the device name (such as device XXXX in (b)) of the scanned smart device and the connection control corresponding to the smart device. The user confirms whether the scanned smart device is correct based on the device name of the smart device in the device connection interface. If the user confirms that the scanned smart device is correct, the user can click the connection control of the smart device, the terminal device responds to the operation of the user, establishes a connection with the smart device, and displays a device adding interface to the user.

[0115] As shown in (c) of FIG. 4, the device adding interface includes the device name of the smart device and a network information input area. The network information includes a network name and a network password, and the network information input area includes a network name input area and a network password input area. The network name input area includes a selection control. When the user clicks the selection control, the terminal device displays the network names of all current networks (WiFi networks), and the user can select the network to which the smart device is to be connected from the network names of all the displayed networks. After the user selects the network to which the smart device is to be connected, the user can input the network password of the selected network in the network password input area.

[0116] As an example, the terminal device can search and query the network of the environment in which the terminal device is located to find all the networks provided by the gateway in the environment. Thus, after the user clicks the selection control, the terminal device can display all the found networks. Optionally, the gateway can be a router, a switch, etc. In some examples, the gateway can also be a wireless access point, a WiFi hotspot, etc., and the specific implementation is not limited and can be set according to actual needs.

[0117] In some examples, the user can also directly input the network to which the smart device is to be connected in the network name input area and input the network password of the network to which the smart device is to be connected in the network password input area.

[0118] When the user inputs the network information (network name and network password) of the network to which the smart device is to be connected in the network information input area, the terminal device can send the network information of the network to which the smart device is to be connected to the smart device.

[0119] As an example, the device adding interface further includes a determination control. When the user inputs the network information of the network to which the smart device is to be connected in the network information input area, the user can click the determination control, and the terminal device sends the network information of the network to which the smart device is to be connected to the smart device in response to the operation of the user.

[0120] To facilitate successful registration of the smart device, the terminal device can further send user information to the smart device. The user information can be a user ID. The user needs to register an account when using the device application for the first time or when adding a device for the first time. After the account registration, the user has a user ID. The devices added by the user are all associated with the user ID of the user, for example, the devices added by the user on the device display interface are all associated with the user ID of the user.

[0121] After receiving the network information and the user information, the smart device can connect to the network through the network information.

[0122] As an example, after receiving the network information, the smart device can initiate network connection to the gateway through the network information, so as to connect to the network provided by the gateway, such as a WiFi network, and use the network service through the network.

[0123] In the embodiment of the present application, after the smart device connects to the network, the smart device can send a registration request to the server through the network, wherein the registration request includes device information of the smart device, network information of the currently connected network (i.e. network information of the network to which the smart device is to be connected) and user information. The device information of the smart device includes a device name and a device identifier of the smart device. The device identifier refers to a unique identification code of the device. For example, the device identifier can be an SN code of the device.

[0124] After receiving the registration request sent by the smart device, the server adds the smart device to the user information in response to the registration request, associates the device information of the smart device with the user information, so as to realize the adding registration of the smart device. At the same time, the server stores the network information of the network currently connected by the smart device and the device identifier of the smart device in association.

[0125] In some examples, the smart device can further include device information of the smart device and user information in the registration request sent to the server through the network. After the smart device completes the addition registration on the server side through the registration request, the smart device sends current network information connected to the server, so that the server stores the current network information connected and the device identification of the smart device in association.

[0126] When the terminal device obtains the information that the smart device has been added to the registration from the server, the terminal device can prompt the user with prompt information that the smart device has been added successfully. Alternatively, the terminal device queries the information that the smart device has been added to the registration from the server, or the server sends the information that the smart device has been added to the registration to the terminal device after completing the addition registration of the smart device.

[0127] It can be understood that after the smart device is successfully added, the terminal device can display the smart device on the device display interface.

[0128] In some examples of the present application, the terminal device can also send a registration request for the smart device to the server. For example, after the terminal device establishes a connection with the smart device, the smart device can send device information of the smart device to the terminal device. For example, after the smart device receives the network information and the user information sent by the terminal device, the smart device sends the device information to the terminal device.

[0129] After the terminal device receives the device information of the smart device, the terminal device sends a registration request to the server, and the registration request includes the device information of the smart device, the network information of the network to be connected, and the user information. After the server receives the registration request sent by the terminal device, the server adds the smart device to the user information in response to the registration request, associates the device information of the smart device with the user information, to realize the addition registration of the smart device, and stores the network information and the device identification in association. When the terminal device obtains the information that the smart device has been added to the registration from the server, the terminal device can prompt the user with prompt information that the smart device has been added successfully.

[0130] In order to facilitate the abnormal prompt of the smart device when the smart device is offline, i.e., the smart device cannot connect to the network through the gateway, in the process of network configuration and addition registration of the smart device, the abnormal prompt can be set for the smart device. Please refer to FIG. 5, which is an interaction diagram of the addition of a smart device provided in an embodiment of the present application. The method shown in FIG. 5 can be applied to the Internet of Things system shown in FIG. 3. As shown in FIG. 5, the process of device addition can include steps S201 to S205.

[0131] S201, the terminal device receives a device addition operation of the user, displays a device addition interface, and the device addition interface includes a device prompt control and a network information input area.

[0132] The terminal device displays a device adding interface for the user in response to the device adding operation after receiving the device adding operation of the user. The specific process is described above and will not be repeated here.

[0133] In the embodiments of the present application, as shown in FIG. 6, the device adding interface includes a device reminding control, a device name of the smart device, and a network information input area.

[0134] The device reminding control refers to a selection control for whether to remind when the smart device is in an offline state.

[0135] The device reminding control is used for the user to select whether to perform device network connection exception prompt when the smart device is in an offline state. When the user needs to remind the smart device when the smart device is in an offline state, the device reminding control can be selected. When the user does not need to remind the smart device when the smart device is in an offline state, the device reminding control can not be selected.

[0136] In S202, the terminal device sends reminding function setting information and network information of a network to be connected to the smart device.

[0137] As an example, as shown in (a) of FIG. 7, the device adding interface further includes a determination control. When the user inputs the network information of the network to be connected by the smart device in the network information input area and selects the device reminding control, the user can click the determination control. The terminal device responds to the operation of the user and sends the network information and the reminding function setting information to the smart device.

[0138] As an example, as shown in (b) of FIG. 7, the device reminding control includes a device offline reminding control and a device offline non-reminding control. When the user needs to remind the smart device when the smart device is in an offline state, the device offline reminding control can be selected. When the user does not need to remind the smart device when the smart device is in an offline state, the device offline non-reminding control can be selected. After the user inputs the network information of the network to be connected by the smart device in the network information input area and selects the device offline reminding control and the device offline non-reminding control, the terminal device can send the network information and the reminding function setting information to the smart device.

[0139] The reminding function setting information refers to information obtained according to the device reminding control. When the user selects the device reminding control or selects the device offline reminding control, the reminding function setting information includes information for performing device network connection exception prompt when the smart device is in an offline state. When the user does not select the device reminding control or selects the device offline non-reminding control, the reminding function setting information includes information for not performing device network connection exception prompt when the smart device is in an offline state.

[0140] As an example, the reminder function setting information includes a reminder field, which represents whether to perform device network abnormality prompt through different field values. For example, when the smart device is in an offline state, if device network abnormality prompt is needed, the field value is 1; if device network abnormality prompt is not needed, the field value is 0.

[0141] It can be understood that, in order to facilitate the successful registration of the smart device, the terminal device also sends user information to the smart device when sending the reminder function setting information and the network information to the smart device.

[0142] In S203, the smart device receives the reminder function setting information and the network information of the network to be connected, accesses the network to be connected according to the network information, and sends a registration request to the server through the network to be connected.

[0143] After receiving the reminder function setting information, the network information, and the user information, the smart device can connect to the network to be connected through the network information, that is, initiate network connection to the gateway through the network information to connect to the network to be connected through the gateway.

[0144] When the smart device is connected to the network to be connected, the smart device can send a registration request to the server through the network to be connected, wherein the registration request includes device information of the smart device, network information of the network to be connected, reminder function setting information, and user information.

[0145] In S204, the server responds to the registration request of the smart device, performs device registration, and stores the association relationship between the reminder function setting information of the smart device and the device identifier of the smart device, and stores the association relationship between the network information of the network to be connected and the device identifier of the smart device.

[0146] After receiving the registration request sent by the smart device, the server responds to the registration request, adds the smart device under the user information, associates the device information of the smart device with the user information, to realize the addition registration of the smart device. Correspondingly, the server also stores the association relationship between the reminder function setting information of the smart device and the device identifier of the smart device, and stores the association relationship between the network information of the network to be connected and the device identifier of the smart device. In addition, the server also detects the network state of the added smart device, that is, detects whether the added smart device is offline.

[0147] As shown in FIG. 8, the device name of the registration request sent by the intelligent device to the server is Device1, the device identifier is SN1, the user information is userid, the network name is wifi ssid, the network password is wifi password, and the reminder function setting information is isNotify = 1 (indicating that the device needs to be prompted for network connection exception when in an offline state). After receiving the registration request of the intelligent device, the server associates the user information userid with device1 and SN1, and updates the devices associated with the same user information, i.e., adds the intelligent device with the device name device1 and the device identifier SN1 under the user information userid. The server stores the reminder function setting information isNotify = 1 of the intelligent device in association with SN1, and stores the network name wifi ssid and the network password wifi password in association with SN1, and then detects the network state of the intelligent device. It can be understood that the intelligent device with the name Device2 and the device identifier SN2 in FIG. 8 is an intelligent device associated with the user information userid before.

[0148] In some embodiments, after the intelligent device completes the addition registration on the server side, the intelligent device can also send the reminder function setting information and the network information of the network to be connected to the server, so as to store, by the server, the association relationship between the reminder function setting information of the intelligent device and the device identifier of the intelligent device, and the association relationship between the network information of the network to be connected and the device identifier of the intelligent device.

[0149] It can be understood that when the intelligent device is connected to the network to be connected, the network to be connected is the network currently connected by the intelligent device.

[0150] S205, the terminal device prompts the user with prompt information that the intelligent device is added successfully.

[0151] When the terminal device obtains the information that the intelligent device has been added and registered from the server, the terminal device can prompt the user with the prompt information that the intelligent device is added successfully, and can display the intelligent device on the device display interface.

[0152] As an example, the terminal device can also send a registration request for the intelligent device to the server. As an example, after receiving the network information of the network to be connected sent by the terminal device, the intelligent device detects whether it can successfully connect to the network according to the network information. If the intelligent device can successfully connect to the network according to the network information, the intelligent device sends a connection feedback to the terminal device.

[0153] The connection feedback includes device information of the smart device. After receiving the connection feedback, the terminal device sends a registration request for the smart device to the server, where the registration request includes device information of the smart device, network information of the network to be connected, reminder function setting information, and user information. After receiving the registration request sent by the terminal device, the server adds the smart device to the user information in response to the registration request, associates the device information of the smart device with the user information, to realize the addition registration of the smart device. Correspondingly, the server also stores the association relationship between the reminder function setting information of the smart device and the device identifier of the smart device, and the association relationship between the network information of the network to be connected and the device identifier of the smart device.

[0154] As an example, the terminal device can also send the reminder function setting information corresponding to the smart device and the network information of the network to be connected to the server after the smart device completes the addition registration on the server side. As an example, after the terminal device sends the network information of the network to be connected and the user information to the smart device, the smart device can connect to the network to be connected through the network information. When the smart device connects to the network to be connected, the smart device can send a registration request to the server through the network to be connected, where the registration request includes device information of the smart device and user information. After the terminal device obtains the information that the smart device has been added and registered from the server, the terminal device can send the reminder function setting information corresponding to the smart device and the network information of the network to be connected to the server, so that the server stores the association relationship between the reminder function setting information of the smart device and the device identifier of the smart device, and the association relationship between the network information of the network to be connected and the device identifier of the smart device.

[0155] It can be understood that the above is only an example of the addition of the smart device by the embodiments of the present application, and is not specifically limited. In some embodiments, other implementation manners can also be provided according to actual needs.

[0156] In the embodiments of the present application, the server detects the network state for each added smart device, and when detecting that the smart device is offline, that is, the smart device cannot be connected to the network, the server determines whether to perform device network exception prompting on the smart device according to the reminder function setting information corresponding to the smart device.

[0157] In order to enable the user to determine whether the smart device is in a network exception or the network is in an exception, in the embodiments of the present application, when detecting that the smart device is in an offline state, the server detects whether one or more target devices having the same user information and network information as the smart device are in an online state, and if the one or more target devices are all in an offline state, sends network exception information to the terminal device, and if at least one of the one or more target devices is in an online state, sends device exception information for the smart device to the terminal device.

[0158] The target device refers to other smart devices associated with the same user information and network information as the smart device currently in an offline state.

[0159] In the embodiments of the present application, when the server sends device abnormal information of the smart device to the terminal device, the server detects the reminder function setting information of the smart device, and performs device networking abnormality prompting when the reminder function setting information of the smart device is in an offline state. The server sends device abnormal information of the smart device to the terminal device. It can be understood that when the reminder function setting information of the smart device is in an offline state, the server does not need to send device abnormal information of the smart device to the terminal device.

[0160] Taking the smart device A as an example, the user information associated with the device A is set as userID, and the network name of the network information is set as wifi ssID. When the server detects that the device A is in an offline state, the server detects whether other smart devices associated with the userID and the wifi ssID are in an online state. If all the other smart devices associated with the userID and the wifi ssID are in an offline state, the server sends network abnormal information to the terminal device. If there is a device in an online state among the other smart devices associated with the userID and the wifi ssID, the server detects the reminder function setting information corresponding to the device A. If the reminder function setting information corresponding to the device A is in an offline state, the server sends device abnormal information of the device A to the terminal device. If the reminder function setting information corresponding to the device A is in an offline state, the server does not send device abnormal information of the device A to the terminal device. As shown in (a) of FIG. 9, the server detects that the other smart devices associated with the userID and the wifi ssID include the device B and the device C, and the device B and the device C are also in an offline state. The server sends network abnormal information to the terminal device. As shown in (b) of FIG. 9, the server detects that the device B and the device C are in an online state, and the reminder function setting information isNotify corresponding to the device A is in a field value 1, that is, in an offline state, device networking abnormality prompting is needed. Therefore, the server sends device abnormal information of the device A to the terminal device. As shown in (c) of FIG. 9, the server detects that the device B and the device C are in an online state, and the reminder function setting information corresponding to the device A is in a field value 0, that is, in an offline state, device networking abnormality prompting is not needed. Therefore, the server does not send device abnormal information of the device A to the terminal device.

[0161] As an example, the server detects whether the offline time of the one or more target devices is in the same time range as the smart device when detecting that the one or more target devices have the same user information as the smart device and are offline, and sends network anomaly information to the terminal device if the offline time is in the same time range. In this way, the accuracy of detection is improved.

[0162] In the embodiments of the present application, the terminal device prompts the user of a network anomaly after receiving the network anomaly information from the server. Correspondingly, the terminal device prompts the user of a device networking anomaly after receiving the device anomaly information from the server.

[0163] In the embodiments of the present application, the terminal device can prompt the user of a network anomaly or a device networking anomaly through voice, a pop-up window, or the like. The following takes a pop-up window as an example. As shown in (a) of FIG. 10, the terminal device pops up a network anomaly prompt of "Detected network wifi SSID anomaly, click to confirm" through a device application after receiving the network anomaly information from the server. As shown in (b) of FIG. 10, the terminal device pops up a device networking anomaly prompt of "Detected device A offline, click to view" through a device application after receiving the device anomaly information from the server.

[0164] The embodiments of the present application can prompt the smart device in a timely manner when the smart device is offline by setting an anomaly prompt for the smart device. In addition, the embodiments of the present application can accurately remind the user whether the smart device is in a device networking anomaly or a network anomaly based on the network information and user information corresponding to the smart device when the smart device is offline, which facilitates user operation and improves user experience.

[0165] It can be understood that the user can detect the abnormal smart device after receiving the device networking anomaly prompt, so that the offline smart device can be connected to the network. The user can restore the network by replacing the network or the like after receiving the network anomaly prompt.

[0166] Please refer to Fig. 11, which is a flowchart of the abnormality prompt according to an embodiment of the present application. As shown in Fig. 11, taking the smart device as device a as an example, the server detects whether other smart devices under the same user information and network information are offline after detecting that device a is offline. If there is a device in online state among the other smart devices, the server detects the prompt function setting information of device a and performs device networking abnormality prompt when device a is in offline state. If device a is not in offline state, the server does not perform device networking abnormality prompt. If device a is in offline state, the server sends device abnormality information to the terminal device, and the terminal device performs device networking abnormality prompt to the user. If all the other devices are in offline state, the server determines that the network is abnormal, sends network abnormality information to the terminal device, and the terminal device performs network abnormality prompt to the user. The terminal device inquires whether the user needs to replace the network in response to the operation of the user on the network abnormality prompt. If the user needs to replace the network, the server initiates replacement of the network of the device. If the user does not need to replace the network, the server prompts the user to repair the network.

[0167] After the user replaces the network, the smart device needs to be reset and reconfigured to access the new network environment, which is a complex process. In order to simplify the process, in the embodiment of the present application, the network replacement of the smart device is realized through the interaction between the terminal device and the smart device.

[0168] The following describes the replacement of the smart device from the second network to the first network as an example, wherein the second network refers to the historical network connected by the smart device, and the first network refers to the new network to be connected by the smart device, i.e. the new network to be replaced. Please refer to Fig. 12, which is one of the interaction diagrams of the network replacement method according to an embodiment of the present application. The method shown in Fig. 12 can be applied to the Internet of Things system shown in Fig. 3. As shown in Fig. 12, the network replacement method provided by the embodiment of the present application includes steps S301 to S305.

[0169] S301, when the smart device cannot connect to the first network through the gateway, the terminal device is in communication connection with the smart device.

[0170] In the embodiment of the present application, the gateway of the first network is different from the gateway of the second network, or the network information of the first network is different from the network information of the second network.

[0171] As an example, after the user replaces the gateway of the environment where the smart device is located, the network of the environment where the smart device is located is replaced, and the smart device cannot connect to the new network through the gateway. For example, the gateway corresponding to the second network is gateway A, the gateway corresponding to the first network is gateway B, the user first uses gateway A to provide the second network, the network of the environment where the smart device is located is the second network, and the smart device first accesses the second network through gateway A. When gateway A fails, the smart device cannot access the second network through gateway A, and the user replaces gateway A with gateway B. At this time, the network of the environment where the smart device is located is changed to the first network provided by gateway B.

[0172] As an example, when the user changes the network information of the network, the network of the environment where the smart device is located is replaced, and the smart device cannot connect to the new network through the gateway. For example, the gateway of the environment where the smart device is located is gateway A, the network information of the second network provided by gateway A is X1, and the smart device accesses the second network through the network information X1. When the user changes the network information of the network provided by gateway A to X2, the network provided by gateway A is changed from the second network to the first network, and the network information of the first network is X2.

[0173] It can be understood that the above is only an example of the network replacement scenario in the embodiments of the present application, and the network replacement scenario is not limited to the example in the embodiments of the present application. For example, when the user changes the network operator, the network of the environment where the smart device is located is replaced, and the embodiments of the present application do not make specific limitations.

[0174] In the embodiments of the present application, after the smart device is added and registered in the network configuration, the network information of the configured network is stored in the smart device. When the smart device is in an offline state, that is, not connected to the configured network, the smart device will continue to attempt to connect to the configured network based on the stored network information. When the user replaces the network of the environment where the smart device is located with the first network, the smart device is not configured for the first network, the smart device does not have the network information of the first network, and the smart device cannot connect to the first network through the gateway, that is, the smart device cannot initiate a connection to the gateway through the network information of the first network to access the first network.

[0175] Therefore, in the embodiments of the present application, when the smart device cannot connect to the first network through the gateway, it means that the smart device is in a state of being unable to access the first network through the gateway, that is, the smart device is in an offline state.

[0176] It can be understood that for the terminal device, since the terminal device has high configuration capability, after the network of the environment where the terminal device is located is replaced with the first network, the terminal device can also find the first network and connect to the first network.

[0177] In the embodiments of the present application, when the smart device cannot be connected to the first network through the gateway, in order to make the smart device connect to the network, the terminal device can initiate the network replacement of the smart device.

[0178] For example, the terminal device can initiate the network replacement of the smart device according to the network replacement operation by receiving the network replacement operation of the user.

[0179] For example, the terminal device receives the network replacement operation of the user for the network exception prompt. For example, after the terminal device prompts the user for the network exception, the user operates the network exception prompt, sends the network replacement operation to the terminal device, and the terminal device receives the network replacement operation. As shown in FIG. 13, after the terminal device pops up the network exception prompt of “detecting that the network wifi SSID has an exception, click to confirm” through the device application, the user clicks the prompt, and the terminal device can respond to the operation of the user to display the prompt box of the network exception on the device display interface of the device application. The prompt box includes the prompt of the network exception, the replacement control and the close control. The prompt of the network exception is used to prompt the user that the network wifi SSID is abnormal, whether to update the network information of the smart device under the network. If the user does not need to update the network information of the smart device under the network, click the close control, and the terminal device responds to the operation of the user to close the prompt box. If the user needs to update the network information of the smart device under the network, click the replacement control, and the terminal device can receive the network replacement operation of the user for the network exception prompt to replace the network information of all smart devices under the network.

[0180] As an example, the terminal device can also receive a network replacement operation initiated by the user for the smart device according to a device networking exception prompt. For example, after the terminal device prompts the user for a device networking exception, the user clicks the prompt, and the terminal device can respond to the user's operation to display a device display interface to the user through the device application, and the device display interface includes the smart device with a networking exception. The user can operate the smart device with a networking exception to initiate a network replacement operation for the smart device with a networking exception to the terminal device. As shown in FIG. 14, after the terminal device pops up a device networking exception prompt of "Device A is detected to be offline, click to view" through the device application, the user clicks the prompt, and the terminal device can respond to the user's operation to display a device display interface to the user, and the device display interface includes the smart device added by the user, and the smart device added by the user includes device A. When the user needs to replace the network connected by device A, the user operates device A on the device display interface (such as long pressing device A or clicking device A, etc.), and the terminal device responds to the user's operation to display an operation prompt box of device A to the user. The operation prompt box includes an operation prompt of replacing the network, and when the user selects the operation prompt, the terminal device responds to the user's selection operation to initiate a network replacement for device A.

[0181] As an example, the user can also actively initiate a network replacement operation for a single smart device. As shown in FIG. 15, the terminal device displays a device display interface to the user through the device application, and the device display interface includes the smart device added by the user. When the user needs to replace the network connected by a smart device (such as device 5 in the figure), the user operates device 5 on the device display interface (such as long pressing device 5 or clicking device 5, etc.), and the terminal device responds to the user's operation to display an operation prompt box of device 5 to the user. The operation prompt box includes an operation prompt of replacing the network, and when the user selects the operation prompt, the terminal device responds to the user's selection operation to initiate a network replacement for device 5.

[0182] As an example, the user can also actively send a network replacement operation for multiple smart devices. As shown in FIG. 16, the terminal device displays a device display interface to the user through the device application, and the device display interface includes a function control. The user clicks the function control, and the terminal device responds to the user's operation to display a function prompt box to the user. The function prompt box includes a one-key replacement function prompt, and when the user selects the function prompt, the terminal device responds to the user's operation to initiate a network replacement for multiple smart devices. For example, a network replacement is initiated for all smart devices on the device display interface.

[0183] It can be understood that the above is only an example of the terminal device receiving the user's network replacement operation and initiating the network replacement of the smart device, and is not a specific limitation. In some embodiments, other implementations can be implemented, and the specific settings can be made according to actual needs.

[0184] As an example, the terminal device can also actively detect the network state of the network connected by the smart device, and actively initiate the network replacement of the smart device when detecting that the network state of the network connected by the smart device is disconnected. The process of the terminal device initiating the network replacement of the smart device is not specifically limited in the embodiments of the present application, and can be set according to actual conditions.

[0185] In the embodiments of the present application, after the terminal device receives the user's network replacement operation, the terminal device initiates the network replacement of the smart device according to the network replacement operation, and then establishes a communication connection with the smart device.

[0186] In order to enable the terminal device and the smart device to successfully establish a communication connection, in the embodiments of the present application, when the smart device cannot be connected to the network provided by the gateway through the first communication type, the terminal device establishes a communication connection with the smart device through the second communication type.

[0187] The first communication type and the second communication type can be the same, and the first communication type and the second communication type can also be different.

[0188] As an example, the first communication type is a WiFi communication type, and the second communication type can be, but is not limited to, one of a Bluetooth communication type, a near field communication (NFC) type, and a WiFi communication type.

[0189] When the smart device cannot be connected to the network provided by the gateway through the WiFi communication type, the terminal device can establish a communication connection with the smart device through Bluetooth, near field communication, or WiFi. In this way, by selecting multiple communication types, the terminal device and the smart device can successfully establish a communication connection, and the communication type with convenient operation can be selected for the smart device to establish a communication connection, further improving the convenience of network replacement.

[0190] It can be understood that when the network is abnormal and multiple smart devices cannot be connected to the first network through the gateway by using the first communication type, the terminal device can establish a communication connection with the multiple smart devices, and the communication types used by the terminal device and the multiple smart devices to establish the communication connection can be the same or different.

[0191] Exemplarily, when the plurality of smart devices cannot be connected to the first network by the gateway in the first communication type, the terminal device establishes a communication connection with a first smart device in the plurality of smart devices in a second communication type, and establishes a communication connection with a second smart device in the plurality of smart devices in a third communication type.

[0192] The third communication type can be, but is not limited to, one of a Bluetooth communication type, a near field communication (NFC) type, and a WiFi communication type.

[0193] The second communication type is the same as or different from the third communication type. The first smart device is any one of the plurality of smart devices, and the second smart device is any one of the smart devices except the first smart device.

[0194] For example, when the second communication type is Bluetooth and the third communication type is near field communication (NFC), the terminal device can establish a communication connection with the first smart device in Bluetooth, and establish a communication connection with the second smart device in near field communication (NFC).

[0195] In the embodiment of the present application, since the smart device can access to the network in the WiFi communication type, that is, the smart device at least supports the WiFi communication type, the terminal device can establish a communication connection with the smart device in the WiFi communication type.

[0196] It can be understood that the first smart device and the second smart device are only examples of the embodiment of the present application, and are not a limitation on the plurality of smart devices. In some examples, the plurality of smart devices can further include a third smart device and a fourth smart device, and the terminal device establishes a communication connection with the third smart device and the fourth smart device in the same or different communication types.

[0197] S302, the terminal device sends a network replacement instruction to the smart device through the communication connection, the network replacement instruction including network information of the first network, and the network replacement instruction being used to instruct the smart device to replace the network connected by the smart device from the second network to the first network according to the network information of the first network.

[0198] In the embodiment of the present application, after the terminal device establishes a communication connection with the smart device, the terminal device can send the network replacement instruction including the network information of the first network to the smart device through the communication connection, so as to make the smart device replace the connected network from the second network to the first network.

[0199] As an example, the user can specify the first network to which the smart device is ready to connect through the terminal device.

[0200] Exemplarily, the terminal device prompts one or more candidate networks to the user, receives a confirmation operation of the user on the one or more candidate networks, and obtains the first network and the network information of the first network.

[0201] The candidate network refers to a network that the smart device can currently connect to. As an example, the terminal device can search for the network of the environment where the smart device is located, and determine the searched network as the candidate network. As an example, the terminal device can also determine the network that the terminal device has connected to and saved as the candidate network.

[0202] Exemplarily, the terminal device prompts one or more candidate networks to the user through voice or interface display. After prompting the one or more candidate networks to the user, the user can determine the first network that the smart device is ready to connect from the one or more candidate networks. The terminal device obtains the first network by receiving the confirmation operation of the user.

[0203] Taking prompting the one or more candidate networks to the user through interface display as an example, as shown in FIG. 17, the terminal device shows the candidate network interface to the user, and the candidate network interface includes one or more candidate networks (such as network 1, network 2, network 3, etc. in FIG. 17). The user selects the candidate network in the candidate network interface, such as selecting the candidate network in the candidate network interface through clicking or other operations, to select the first network from the candidate network. The terminal device obtains the first network in response to the selection operation of the user on one or more candidate networks in the candidate network interface.

[0204] It can be understood that after the user selects the first network, if the terminal device stores the network information of the first network, the terminal device can directly send the network replacement instruction to the smart device through the communication connection. If the terminal device does not store the network information of the first network, such as the terminal device does not store the network password of the first network, the terminal device shows the network information input interface to the user after receiving the selection operation of the user on the first network in the one or more candidate networks, and the user can input the network information of the first network in the network information input interface. The terminal device sends the network replacement instruction to the smart device through the communication connection after receiving the network information of the first network input by the user.

[0205] As an example, the user can also input the network information of the first network that the smart device is ready to connect through the terminal device. Exemplarily, the terminal device can provide the network input interface to the user after establishing the communication connection with the smart device, and the user can directly input the network information of the first network that the smart device is ready to connect in the network input interface. The terminal device receives the network information of the first network input by the user, and sends the network replacement instruction to the smart device through the communication connection.

[0206] The embodiment of the present application prompts the candidate network to the user, facilitates the user to specify the network to which the smart device is ready to connect, and improves the convenience of user operation.

[0207] In some examples, considering that the terminal device and the smart device need to be in the same local area network, after the communication connection is established with the smart device, the terminal device can also determine the currently connected network as the first network, and then send the network replacement instruction to the smart device through the communication connection.

[0208] It can be understood that the above is only an example of the first network of the embodiment of the present application, and is not a specific limitation. In some embodiments, other implementation manners can also be implemented, and are set according to actual needs.

[0209] S303, the smart device receives the network replacement instruction from the terminal device through the communication connection, and replaces the connected second network to the first network according to the network information of the first network.

[0210] The smart device can initiate connection to the gateway to access the first network according to the network information of the first network in the network replacement instruction in response to the network replacement instruction after receiving the network replacement instruction sent by the terminal device, so as to replace the connected second network to the first network.

[0211] It can be understood that after the smart device accesses the first network, the smart device is in an online state, and the smart device can interact with other devices through the first network. For example, the smart device can interact with the server through the first network.

[0212] S304, the smart device sends device replacement information to the server through the first network, the device replacement information includes the network information of the first network and the device identifier of the smart device, and the device replacement information is used to indicate that the server stores the association relationship between the device identifier of the smart device and the network information of the first network.

[0213] In order to update the network state of the smart device in time, in the embodiment of the present application, after the network is replaced to the first network, the smart device sends the device replacement information to the server through the first network, and the device replacement information includes the network information of the first network and the device identifier of the smart device.

[0214] In the embodiment of the present application, the smart device sends the device replacement information to the server through the first network, can indicate the server that the smart device has replaced the network to the first network, has restored the online state, and can indicate the server to associate and store the device identifier of the smart device and the network information of the first network through the device replacement information.

[0215] S305, the server receives the device replacement information sent by the intelligent device, stores the association relationship between the device identifier of the intelligent device and the network information of the first network, and sends the network state of the intelligent device to the terminal device.

[0216] Wherein, after receiving the device replacement information sent by the intelligent device, the server stores the association relationship between the device identifier in the device replacement information and the network information of the first network, so as to facilitate the subsequent detection of network anomalies and the subsequent network replacement of the intelligent device, and facilitate the terminal device to obtain the network information of the intelligent device.

[0217] As an example, after receiving the device replacement information sent by the intelligent device, the server queries the network information of the historical network (such as the second network) associated with the intelligent device according to the device identifier of the intelligent device in the device replacement information, and after finding the network information of the historical network associated with the intelligent device, replaces the network information of the historical network with the network information of the first network, that is, updates the network information of the historical network associated with the intelligent device to the network information of the first network, so as to store the association relationship between the device identifier of the intelligent device and the network information of the first network.

[0218] In the embodiment of the application, after receiving the device replacement information sent by the intelligent device, the server can obtain that the intelligent device has recovered the online state through the device replacement information, and can interact information. Therefore, after receiving the device replacement information sent by the intelligent device, the server can update the network state of the intelligent device to the online state.

[0219] As an example, after the intelligent device replaces the connected second network with the first network, the intelligent device sends a connection feedback to the terminal device, and the terminal device sends the device replacement information of the intelligent device to the server after receiving the connection feedback sent by the intelligent device, so that the server stores the association relationship between the device identifier of the intelligent device and the network information of the first network, and updates the network state of the intelligent device to the online state.

[0220] In order to make the user know that the intelligent device has recovered the network state in time, the server can send the network state of the intelligent device to the terminal device after updating the network state of the intelligent device to the online state.

[0221] In the embodiments of the present application, after receiving the network status of the smart device sent from the server, the terminal device can prompt the user with the network status of the smart device to indicate the user that the smart device has recovered the online state and the network replacement has been completed. As an example, the terminal device updates the network status of the smart device to the online state in the device display interface to indicate the user that the smart device has recovered the online state. As an example, the terminal device can also indicate the user that the smart device has recovered the online state through voice prompt.

[0222] As an example, the terminal device can also actively acquire the network status of the smart device from the server. For example, the terminal device listens to the change of the network status of the smart device in the server, and acquires the network status of the smart device from the server after listening to the change of the network status of the smart device.

[0223] The embodiments of the present application establish the communication connection between the terminal device and the smart device, so that the terminal device and the smart device can directly interact the network information through the communication connection, complete the network replacement of the smart device, and do not need to reset the smart device and reconfigure the network of the smart device, which greatly simplifies the network replacement process, saves time, and improves efficiency.

[0224] In order to improve the reliability of data transmission, in the embodiments of the present application, after the terminal device and the smart device establish the communication connection, the terminal device and the smart device can first perform the reliability check of data transmission, and after the check is passed, the terminal device sends the network replacement instruction to the smart device. Please refer to FIG. 18, which is the second interaction schematic diagram of the network replacement method provided by the embodiments of the present application, and the method shown in FIG. 18 can be applied to the Internet of Things system shown in FIG. 3. As shown in FIG. 18, the network replacement method provided by the embodiments of the present application includes steps S401 to S407.

[0225] S401, when the smart device cannot connect to the first network through the gateway, the terminal device establishes a communication connection with the smart device.

[0226] The process of step S401 is referred to step S301, and will not be repeated here.

[0227] S402, the terminal device sends the check information to the smart device, and the check information includes the network information of the second network connected by the smart device and the device identifier of the smart device.

[0228] The network information of the second network to which the smart device is connected and the device identifier of the smart device can be obtained from the server. For example, after the terminal device initiates the network replacement for the smart device, the terminal device can send a network information request to the server to request the network information of the second network to which the smart device is connected and the device identifier of the smart device. After receiving the network information request sent by the terminal device, the server sends the network information of the second network to which the smart device is connected and the device identifier of the smart device to the terminal device in response to the network information request.

[0229] As an example, the terminal device can also store the network information of the network to which the smart device is connected and the device identifier of the smart device. For example, after completing the addition registration of the smart device or completing the network replacement, the terminal device stores the network information of the network to which the smart device is connected and the device identifier of the smart device. After the terminal device initiates the network replacement for the smart device, the network information of the second network to which the smart device is connected and the device identifier of the smart device are obtained from the stored network information.

[0230] After obtaining the network information of the second network to which the smart device is connected and the device identifier of the smart device, the terminal device sends the verification information to the smart device according to the network information of the second network to which the smart device is connected and the device identifier of the smart device.

[0231] S403, the smart device receives the verification information sent by the terminal device, and sends feedback information to the terminal device when the network information and the device identifier in the verification information are consistent with the network information and the device identifier stored by the smart device.

[0232] The smart device compares the network information in the verification information with the network information stored by the smart device, that is, compares the network information in the verification information with the network information currently connected by the smart device, and compares the device identifier in the verification information with the device identifier of the smart device. If the network information in the verification information is consistent with the network information currently connected by the smart device, and the device identifier in the verification information is consistent with the device identifier of the smart device, the smart device sends feedback information to the terminal device to indicate that the terminal device information is correct and the network replacement can be performed.

[0233] If the network information in the verification information is inconsistent with the network information currently connected by the smart device, and / or the device identifier in the verification information is inconsistent with the device identifier of the smart device, the feedback information does not need to be sent to the terminal device.

[0234] In the embodiment of the present application, if the smart device has multiple, the terminal device will send verification information for each smart device. For each smart device, feedback information will be sent to the terminal device only after receiving verification information consistent with the network information and the device identifier of the smart device.

[0235] S404, after receiving the feedback information of the smart device that the check information is checked through, the terminal device sends a network replacement instruction to the smart device through the communication connection.

[0236] Wherein, after receiving the feedback information of the smart device that the check information is checked through, the terminal device can obtain the result that the smart device can replace the network, therefore, after receiving the feedback information of the smart device, the terminal device can send a network replacement instruction to the smart device through the communication connection.

[0237] It can be understood that the process of sending a network replacement instruction to the smart device through the communication connection refers to step S302, which will not be repeated here.

[0238] S405, the smart device receives the network replacement instruction from the terminal device through the communication connection, and replaces the connected second network to the first network according to the network information of the first network.

[0239] S406, the smart device sends device replacement information to the server through the first network, the device replacement information includes the network information of the first network and the device identifier of the smart device, and the device replacement information is used to indicate the server to store the association relationship between the device identifier of the smart device and the network information of the first network.

[0240] S407, the server receives the device replacement information sent by the smart device, stores the association relationship between the device identifier of the smart device and the network information of the first network, and sends the network state of the smart device to the terminal device.

[0241] Wherein, the process of steps S405 to S407 refers to steps S303 to S305, which will not be repeated here.

[0242] For ease of understanding, the following will be illustrated by combining with FIG. 19. FIG. 19 is a schematic diagram of the network replacement scene provided by the embodiment of the application. As shown in FIG. 19, the terminal device first obtains the network information of the second network connected by the smart device and the device identifier from the cloud server, and the cloud server feeds back the network information of the second network connected by the smart device and the device identifier to the terminal device. The terminal device performs reliability check with the smart device according to the network information of the second network connected by the smart device and the device identifier fed back by the cloud server. After the check is passed, the terminal device sends a network replacement instruction to the smart device. After the smart device successfully replaces the network according to the network replacement instruction, the smart device sends device replacement information to the cloud server, and ends the replacement process.

[0243] The embodiment of the application can improve the reliability of data transmission by performing reliability check between the terminal device and the smart device after the communication connection is established between the terminal device and the smart device.

[0244] Considering that different smart devices support different communication capabilities, for example, some smart devices support Bluetooth communication type, some smart devices support near field communication (NFC), and some devices support WiFi communication. In order to further improve the convenience of network replacement, in the embodiment of the present application, the communication type for establishing a communication connection with the smart device can be determined according to the communication capability supported by the smart device. Please refer to FIG. 20, which is the third interactive schematic diagram of the network replacement method provided by the embodiment of the present application. The method shown in FIG. 20 can be applied to the Internet of Things system shown in FIG. 3. As shown in FIG. 20, the network replacement method provided by the embodiment of the present application includes steps S501 to S507.

[0245] S501, the terminal device obtains the communication type supported by the smart device.

[0246] The communication type supported by the smart device can be obtained through the configuration information of the smart device. For example, the smart device is configured with a Bluetooth module, so the smart device supports Bluetooth communication. For another example, the smart device is configured with a near field communication (NFC) module, so the smart device supports near field communication (NFC) communication.

[0247] As an example, the configuration information of the smart device is stored in the server, and the terminal device obtains the communication type supported by the smart device from the server. Optionally, the configuration information stored in the server is uploaded by the smart device, for example, after the smart device completes the addition registration, it sends its own configuration information to the server, that is, it sends the communication type supported by the smart device to the server. In some embodiments, the configuration information stored in the server is uploaded by the administrator.

[0248] For example, the terminal device receives the network replacement operation of the user, initiates a query request to the server, and the query request is used to request to query the communication type supported by the smart device. The server receives the query request of the terminal device, reads the configuration information of the smart device, obtains the communication type supported by the smart device, and sends the communication type supported by the smart device to the terminal device.

[0249] The process in which the terminal device receives the network replacement operation of the user can refer to step S301, which will not be described here.

[0250] When the terminal device receives the network replacement operation of the user, it initiates a query request to the server, requesting to query the communication type supported by the smart device. After receiving the query request sent by the terminal device, the server reads the configuration information of the smart device in response to the query request, obtains the communication type supported by the smart device, and feeds back the communication type supported by the smart device to the terminal device.

[0251] As an example, the configuration information of the smart device can also be stored in the terminal device, and the terminal device obtains the communication type supported by the smart device from the local. For example, the terminal device receives the network replacement operation of the user, and obtains the communication type supported by the smart device from the locally stored configuration information of the smart device. The actual requirement is set, and the embodiment of the application is not limited.

[0252] In S502, the terminal device obtains a target communication type for establishing a communication connection with the smart device according to the communication type supported by the smart device.

[0253] As an example, after the terminal device obtains the communication type supported by the smart device, the terminal device can determine any one of the communication types supported by the smart device as the target communication type. For example, the communication types supported by the smart device include a Bluetooth communication type, a near field communication (NFC) type, and a WiFi communication type, and any one of the Bluetooth communication type, the near field communication (NFC) type, and the WiFi communication type can be determined as the target communication type.

[0254] In order to ensure that the terminal device and the smart device can successfully establish a communication connection, as an example, the target communication type is one of the communication types supported by the terminal device and the smart device. For example, after the terminal device obtains the communication type supported by the smart device, the terminal device matches the communication type supported by the smart device with the communication type supported by the terminal device to obtain the communication type supported by the terminal device and the smart device. After obtaining the communication type supported by the terminal device and the smart device, the terminal device can select one of the communication types supported by the terminal device and the smart device as the target communication type. In this way, the communication connection is established based on the communication type supported by the terminal device and the smart device, which can improve the success rate of establishing the communication connection.

[0255] For example, the communication types supported by the smart device include a Bluetooth communication type and a WiFi communication type, and the communication types supported by the terminal device include a Bluetooth communication type, a near field communication (NFC) type, and a WiFi communication type. The terminal device matches the communication type supported by the smart device with the communication type supported by the terminal device to obtain the communication types supported by the terminal device and the smart device, which include the Bluetooth communication type and the WiFi communication type. Then, the terminal device can determine any one of the Bluetooth communication type and the WiFi communication type as the target communication type.

[0256] In order to further improve the convenience of network replacement, in the embodiments of the present application, the communication types are prioritized according to the operation convenience of the communication types. The target communication type is the one with the highest priority among the communication types supported by both the terminal device and the smart device, that is, the target communication type is the one with the highest operation convenience among the communication types supported by both the terminal device and the smart device. In this way, by establishing a communication connection using the communication type with the highest operation convenience priority, the convenience of network replacement can be further improved, the process of network replacement is simplified, time is saved, and efficiency is improved.

[0257] For example, the communication types supported by the terminal device and the smart device include a Bluetooth communication type and a WiFi communication type, and the priority of the Bluetooth communication type is higher than that of the WiFi communication type, and the target communication type is the Bluetooth communication type.

[0258] As an example, the priority of a near field communication (NFC) type is higher than that of the Bluetooth communication type, and the priority of the Bluetooth communication type is higher than that of the WiFi communication type.

[0259] In view of the user's preference requirements for communication types, in some examples, the terminal device can also prompt the user with recommendation information according to the priority of the communication types supported by both the terminal device and the smart device, and the recommendation information is used to recommend the communication type for the terminal device and the smart device to establish a communication connection.

[0260] For example, after obtaining the communication types supported by the smart device, the terminal device matches the communication types supported by the smart device with the communication types supported by itself to obtain the communication types supported by both the terminal device and the smart device. After obtaining the communication types supported by both the terminal device and the smart device, the terminal device can prompt the user with recommendation information according to the priority of the communication types supported by both the terminal device and the smart device.

[0261] As an example, the terminal device prompts the user with the recommendation information through voice or interface display, etc.

[0262] Taking the interface display as an example, after receiving the communication types supported by both the terminal device and the smart device, the terminal device can display a communication type recommendation interface to the user according to the priority of the communication types supported by both the terminal device and the smart device, and the communication type recommendation interface includes the recommended communication type, wherein the recommended communication type is the one with the highest priority among the communication types supported by both the terminal device and the smart device. As shown in (a) of FIG. 21, assuming that the communication type with the highest priority among the communication types supported by both the terminal device and the smart device is a near field communication (NFC), the terminal device can display the recommendation information "recommended to use NFC to establish a communication connection with the smart device" to the user on the communication type recommendation interface.

[0263] In some examples, the terminal device can also display the commonly supported communication types in the communication type recommendation interface according to the priority of the commonly supported communication types. As shown in (b) of FIG. 21, assuming that the communication types commonly supported by the terminal device and the smart device include a Bluetooth communication type and a WiFi communication type, and the priority of the Bluetooth communication type is higher than that of the WiFi communication type, the terminal device can display the recommendation information “recommend using Bluetooth connection, and recommend using WiFi connection when Bluetooth connection is unavailable” in the communication type recommendation interface. Alternatively, as shown in (c) of FIG. 21, the terminal device can display the recommendation information “preferentially recommend Bluetooth connection, and secondarily recommend WiFi connection” in the communication type recommendation interface. The specific content of the recommendation information can be set according to actual needs, and the embodiments of the present application do not make specific limitations.

[0264] After prompting the user with the recommendation information, the user can input the target communication type for establishing the communication connection between the terminal device and the smart device based on the recommendation information. The terminal device can obtain the target communication type for establishing the communication connection with the smart device in response to the user's communication type input operation on the recommendation information. It can be understood that the target communication type is the communication type input by the user. The target communication type includes the first communication type, the second communication type, and the third communication type, and can be one of the first communication type, the second communication type, and the third communication type.

[0265] As an example, the user can input the target communication type through voice or interface input, etc. Taking the interface display for prompting the user with the recommendation information as an example, as shown in FIG. 22, the communication type recommendation interface can further include a selection control of the recommended communication type, and the user can select the target communication type through the selection control. The terminal device obtains the target communication type in response to the user's operation.

[0266] S503, the terminal device establishes a communication connection of the target communication type with the smart device.

[0267] After obtaining the target communication type for establishing the communication connection with the smart device, the terminal device can establish a communication connection of the first communication type with the smart device.

[0268] Exemplarily, when the target communication type is a near field communication (NFC) type, the terminal device establishes a near field communication with the smart device. When the target communication type is a Bluetooth communication type, the terminal device establishes a Bluetooth communication with the smart device. When the target communication type is a WiFi communication type, the terminal device establishes a WiFi communication with the smart device.

[0269] S504, the terminal device sends a network replacement instruction to the smart device through the communication connection.

[0270] After the terminal device and the smart device establish the communication connection of the target communication type, the terminal device can send a network replacement instruction to the smart device through the communication connection.

[0271] In order to improve the reliability of data transmission, after the terminal device and the smart device establish the communication connection of the target communication type, the terminal device can also send verification information to the smart device. The smart device receives the verification information sent by the terminal device, and when the network information and the device identifier in the verification information are consistent with the network information and the device identifier stored by the smart device, the smart device sends feedback information to the terminal device. After receiving the feedback information of the verification pass of the smart device for the verification information, the terminal device sends a network replacement instruction to the smart device through the communication connection. For details, refer to steps S402 to S404, which are not described here.

[0272] S505, the smart device receives the network replacement instruction from the terminal device through the communication connection, and replaces the connected second network to the first network according to the network information of the first network.

[0273] S506, the smart device sends device replacement information to the server through the first network, the device replacement information includes the network information of the first network and the device identifier of the smart device, and the device replacement information is used to indicate the server to store the association relationship between the device identifier of the smart device and the network information of the first network.

[0274] S507, the server receives the device replacement information sent by the smart device, stores the association relationship between the device identifier of the smart device and the network information of the first network, and sends the network state of the smart device to the terminal device.

[0275] The processes of steps S504 to S507 refer to steps S302 to S305, which are not described here.

[0276] The terminal device according to the smart device supported communication type, and the smart device establishes a communication connection, which can improve the success rate of communication connection establishment. By selecting the communication type with the highest priority to establish a communication connection with the smart device, the user operation convenience can be further improved, and the user experience can be improved.

[0277] To further improve the convenience of user operation, in the embodiment of the present application, after obtaining the target communication type for establishing the communication connection with the smart device, the terminal device can prompt the user with operation guidance according to the target communication type, so as to facilitate the user to operate the terminal device and the smart device according to the operation guidance, and establish the communication connection between the terminal device and the smart device. Please refer to FIG. 23, which is the fourth interactive diagram of the network replacement method provided by the embodiment of the present application. The method shown in FIG. 23 can be applied to the Internet of Things system shown in FIG. 3. As shown in FIG. 23, the network replacement method provided by the embodiment of the present application includes steps S601 to S607.

[0278] S601, the terminal device acquires the communication types supported by the smart device.

[0279] S602, the terminal device obtains the target communication type for establishing the communication connection with the smart device according to the communication types supported by the smart device.

[0280] The processes of steps S601 to S602 refer to steps S501 to S502, which will not be repeated here.

[0281] S603, the terminal device prompts the user with the operation guidance corresponding to the target communication type, and establishes the communication connection of the target communication type with the smart device in response to the operation performed by the user based on the operation guidance corresponding to the target communication type, wherein the operation guidance corresponding to different communication types is different.

[0282] After obtaining the target communication type for establishing the communication connection with the smart device, the terminal device prompts the user with the operation guidance according to the target communication type, so as to facilitate the user to operate the terminal device and the smart device according to the operation guidance, and establish the communication connection of the target communication type between the terminal device and the smart device.

[0283] In the embodiment of the present application, the operation guidance corresponding to different communication types is different.

[0284] For example, when the target communication type is the Bluetooth communication type, the operation guidance prompted by the terminal device to the user is to turn on the Bluetooth switch of the terminal device and the smart device, so that the terminal device and the smart device are kept within a certain range.

[0285] When the target communication type is the near field communication (NFC) type, the operation guidance prompted by the terminal device to the user is to turn on the near field communication switch of the terminal device and the smart device, so that the terminal device and the smart device are in contact.

[0286] When the target communication type is the WiFi communication type, the operation guidance prompted by the terminal device to the user is to turn on the hotspot of the terminal device, and change the network information of the hotspot to the network information of the second network to which the smart device is connected.

[0287] After the user is prompted with the operation guide corresponding to the target communication type, the user can operate the terminal device and the smart device according to the operation guide. The terminal device responds to the operation of the user and establishes a communication connection of the first communication type with the smart device.

[0288] For example, when the target communication type is a Bluetooth communication type, the user turns on the Bluetooth switches of the terminal device and the smart device according to the operation guide, and makes the terminal device and the smart device stay within a certain range. The terminal device can then respond to the operation of the user and establish a communication connection of the Bluetooth communication type with the smart device.

[0289] It can be understood that when the smart device has established a Bluetooth channel with the terminal device in the registration and addition, when the Bluetooth switches of the terminal device and the smart device are turned on and the terminal device and the smart device stay within a certain range, the terminal device and the smart device can perform Bluetooth communication through the previously established Bluetooth channel. If the terminal device and the smart device have not established a Bluetooth channel before, when the terminal device and the smart device establish a communication connection of the Bluetooth communication type, the terminal device can perform Bluetooth pairing with the smart device to establish a Bluetooth channel, so as to perform Bluetooth communication through the Bluetooth channel.

[0290] For example, when the target communication type is a near field communication (NFC) type, the user turns on the near field communication switches of the terminal device and the smart device according to the operation guide, and makes the terminal device and the smart device contact. The terminal device can then respond to the operation of the user and establish a communication connection of the near field communication (NFC) type with the smart device.

[0291] For example, when the target communication type is a WiFi communication type, the user turns on the hotspot of the terminal device according to the operation guide, and changes the network information of the hotspot to the network information of the second network. The terminal device can then respond to the operation of the user and establish a communication connection with the smart device through the hotspot.

[0292] For example, when the target communication type is a WiFi communication type, the user turns on the hotspot of the terminal device according to the operation guide, and changes the network information of the hotspot to the network information of the second network. The terminal device can then respond to the operation of the user and establish a communication connection with the smart device through the hotspot.

[0293] (1) The terminal device prompts the user with network setting information according to the network information of the second network to which the smart device is connected. The network setting information is used to instruct the user to turn on the hotspot and change the network information of the hotspot to the network information of the second network.

[0294] As an example, after initiating the network replacement of the smart device, the terminal device initiates a network information request to the server to request the network information of the second network to which the smart device is connected. The second network refers to the historical network to which the smart device is connected, i.e., the network to be replaced.

[0295] The server receives the network information request sent by the terminal device, and sends network information of a second network to which the smart device is connected to the terminal device in response to the network information request.

[0296] As an example, the terminal device can also store the network information to which the smart device is connected, for example, after completing the addition registration of the smart device or completing the network replacement, the terminal device stores the network information to which the smart device is connected. After the terminal device initiates the network replacement of the smart device, the network information of the second network to which the smart device is connected is obtained from the stored network information.

[0297] After the terminal device obtains the network information of the second network to which the smart device is connected, the terminal device prompts the user with network setting information according to the network information of the second network to which the smart device is connected. The network setting information is used to instruct the user to turn on the hotspot and change the network information of the hotspot to the network information of the second network.

[0298] As an example, the terminal device can prompt the user with the network setting information through voice, interface display, etc. The specific implementation is not limited and can be set according to actual needs.

[0299] It can be understood that changing the network information of the hotspot to the network information of the second network can be changing the name of the hotspot to the network name of the second network and changing the password of the hotspot to the network password of the second network. Please refer to FIG. 24, which is a network setting information prompt interface provided by an embodiment of the present application. As shown in FIG. 24, after obtaining the network information of the second network to which the smart device is connected, the terminal device can display the network setting information prompt interface to the user. The network setting information prompt interface includes the prompt content "please turn on the hotspot, set the name of the hotspot to A, and set the password of the hotspot to B". A is the network name of the second network, and B is the network password of the second network.

[0300] The embodiment of the present application can improve the convenience of user operation and improve user experience by prompting the user with the network setting information.

[0301] (2) The terminal device receives the user's change operation on the network information of the hotspot, and establishes a communication connection with the smart device through the changed hotspot.

[0302] The terminal device prompts the user with the network setting information, and the user can turn on the hotspot of the terminal device and change the network information of the hotspot of the terminal device according to the prompt of the terminal device. The terminal device receives the user's change operation on the network information of the hotspot, and establishes a communication connection with the smart device according to the changed hotspot.

[0303] Understandably, the network information of the changed hotspot is consistent with the network information of the second network, and therefore the smart device can access the changed hotspot of the terminal device through the network information of the second network, so as to establish a communication connection with the terminal device through the changed hotspot.

[0304] Understandably, when the terminal device establishes a communication connection with the smart device through the changed hotspot, the terminal device can send a network changing instruction to the smart device through the changed hotspot.

[0305] The embodiments of the present application can further improve the convenience of user operation and improve user experience by guiding the user.

[0306] To further improve the convenience of operation, when there are multiple smart devices changing networks, the terminal device can obtain a target communication type corresponding to each smart device according to the priority of the communication type in the embodiments of the present application. The smart devices under the same communication type are obtained by dividing each smart device according to the target communication type corresponding to the smart device. For the smart devices under the same communication type, the user is prompted with the operation guide corresponding to the communication type.

[0307] For example, for each smart device, it is first detected whether the smart device supports the communication type with the highest priority. If the smart device supports the communication type with the highest priority, the target communication type corresponding to the smart device is determined to be the communication type with the highest priority, and the smart device is divided into the communication type list corresponding to the highest priority. If the smart device does not support the communication type with the highest priority, it is detected whether the smart device supports the communication type with the second priority. If the smart device supports the communication type with the second priority, the target communication type corresponding to the smart device is determined to be the communication type with the second priority, and the smart device is divided into the communication type list corresponding to the second priority. If the smart device does not support the communication type with the second priority, it is detected whether the smart device supports the communication type with the third priority, and so on, to obtain the smart devices under the same communication type.

[0308] After obtaining the smart devices under the same communication type, the smart devices included in each communication type and the corresponding operation guide can be displayed to the user, so as to instruct the user to operate according to the operation guide corresponding to each communication type, to establish a communication connection between the terminal device and the smart devices included in each communication type.

[0309] For example, the communication types include Bluetooth communication, near field communication (NFC), and WiFi communication, wherein the priority of the near field communication (NFC) is higher than that of the Bluetooth communication, and the priority of the Bluetooth communication is higher than that of the WiFi communication. Each smart device can be connected to at least a WiFi network. As shown in (a) of FIG. 25, the terminal device displays a prompt box for network anomaly on a device display interface of a device application. If the user clicks the replacement control in the prompt box, the terminal device receives the network replacement operation of the user for the network anomaly prompt, queries all smart devices under the network WiFi SSID from the server, and queries the communication types supported by the smart devices. As shown in (b) of FIG. 25, for each smart device, it is first detected whether the smart device supports near field communication (NFC). If the smart device supports near field communication (NFC), the smart device is divided into a near field communication (NFC) type list. If the smart device does not support near field communication (NFC), it is detected whether the smart device supports Bluetooth communication. If the smart device supports Bluetooth communication, the smart device is divided into a Bluetooth communication type list. If the smart device does not support Bluetooth communication, the smart device is divided into a WiFi communication type list. After the classification is completed, an operation guide interface is displayed to the user, as shown in (c) of FIG. 25. The operation guide page includes the smart devices included in the near field communication (NFC) type list and the operation guide corresponding to the near field communication (NFC) type, the smart devices included in the Bluetooth communication type list and the operation guide corresponding to the Bluetooth communication type, and the smart devices included in the WiFi communication type list and the operation guide corresponding to the WiFi communication type.

[0310] It can be understood that after the operation guide interface is displayed to the user, for the smart devices in each communication type list, the user can operate the terminal device and the smart device according to the operation guide corresponding to the communication type, and the terminal device responds to the operation of the user to establish a communication connection with the smart device.

[0311] The embodiments of the present application obtain the target communication type corresponding to the smart device according to the priority of operation portability, instruct the user to operate based on the operation guide corresponding to the target communication type, and can further improve the convenience during network replacement, and realize the user's unconscious replacement of the network connected by the device.

[0312] In S604, the terminal device sends a network replacement instruction to the smart device through the communication connection.

[0313] After the terminal device and the smart device establish the communication connection of the target communication type, the terminal device can send a network replacement instruction to the smart device through the communication connection.

[0314] In order to improve the reliability of data transmission, after the terminal device and the smart device establish a communication connection of the target communication type, the terminal device can further send verification information to the smart device. The smart device receives the verification information sent by the terminal device, and when the network information and the device identifier in the verification information are consistent with the network information and the device identifier stored by the smart device, the smart device sends feedback information to the terminal device. After receiving the feedback information of the verification passed by the smart device for the verification information, the terminal device sends a network replacement instruction to the smart device through the communication connection. For details, refer to steps S402 to S404, which are not described here.

[0315] S605, the smart device receives the network replacement instruction from the terminal device through the communication connection, and replaces the connected second network to the first network according to the network information of the first network.

[0316] S606, the smart device sends device replacement information to the server through the first network, the device replacement information includes the network information of the first network and the device identifier of the smart device, and the device replacement information is used to indicate the server to store the association relationship between the device identifier of the smart device and the network information of the first network.

[0317] S607, the server receives the device replacement information sent by the smart device, stores the association relationship between the device identifier of the smart device and the network information of the first network, and sends the network state of the smart device to the terminal device.

[0318] The processes of steps S604 to S607 refer to steps S302 to S305, which are not described here.

[0319] The embodiments of the present application can further improve the convenience of the user's operation when replacing the network and improve the user experience by prompting the user with the operation guide of the target communication type and instructing the user to operate according to the operation guide.

[0320] The embodiments of the present application can establish a communication connection of the target communication type between the terminal device and the smart device, so that the terminal device and the smart device can directly interact with the network information through the communication connection to complete the replacement of the network of the smart device without resetting and reconfiguring the network of the smart device. As shown in (a) of FIG. 26, in the conventional technology, the smart device needs to be reset, reconfigured, and reinitiated to register and add to the server, and three ends need to interact to realize the replacement of the network of the smart device. As shown in (b) of FIG. 26, the embodiments of the present application can make the smart device complete the replacement of the network through the interaction between the terminal device and the smart device, without resetting and reconfiguring the network of the smart device, so that the preference settings and personalized settings reserved by the server, the terminal device and the smart device are not cleared, greatly simplifying the process of network replacement, saving time and improving efficiency.

[0321] Based on the same inventive concept, the embodiments of the present application further provide an electronic device. FIG. 27 is a structural schematic diagram of an electronic device 700 according to an embodiment of the present application. The electronic device 700 shown in FIG. 27 is, for example, a terminal device in the embodiments corresponding to FIG. 5, FIG. 12, FIG. 18, FIG. 20, and FIG. 23, or the terminal device in FIG. 3.

[0322] As shown in FIG. 27, the electronic device 700 includes a first communication unit 701 and a first processing unit 702. The first communication unit 701 is configured to establish a communication connection with the smart device when the smart device cannot connect to the first network through the gateway, and the terminal device can connect to the first network. The first processing unit 702 is configured to send a network replacement instruction to the smart device through the communication connection, the network replacement instruction including network information of the first network, and the network replacement instruction being used to instruct the smart device to replace the network connected by the smart device from the second network to the first network according to the network information of the first network.

[0323] Optionally, when the smart device cannot connect to the first network through the gateway by using a first communication type, the first communication unit 701 is configured to establish a communication connection with the smart device by using a second communication type. The first communication type can be the same as the second communication type, or the first communication type can be different from the second communication type.

[0324] Optionally, when a plurality of smart devices cannot connect to the first network through the gateway by using a first communication type, the first communication unit 701 is configured to establish a communication connection with a first smart device in the plurality of smart devices by using a second communication type, and establish a communication connection with a second smart device in the plurality of smart devices by using a third communication type. The second communication type can be the same as the third communication type, or the second communication type can be different from the third communication type.

[0325] Optionally, the electronic device 700 includes a second processing unit 703. Before the communication connection with the smart device is established, the second processing unit 703 is configured to receive a network replacement operation of a user, initiate a query request to a server, the query request being used to request to query a communication type supported by the smart device, receive the communication type supported by the smart device sent from the server, and establish the communication connection with the smart device according to the communication type supported by the smart device.

[0326] Optionally, the electronic device 700 includes an exception prompt unit 704. Before the network replacement operation of the user is received, the exception prompt unit 704 is configured to perform a network exception prompt to the user after receiving network exception information from the server. The second processing unit 703 is configured to receive the network replacement operation of the user performed in response to the network exception prompt.

[0327] Optionally, the exception prompt unit 704 is configured to prompt the user of the device networking exception after receiving the device exception information from the server for the smart device; and the second processing unit 703 is configured to receive a network replacement operation initiated by the user for the smart device according to the device networking exception prompt.

[0328] Optionally, before establishing the communication connection with the smart device, the first processing unit 702 is configured to prompt the user with operation guidance corresponding to a target communication type, wherein the target communication type is a communication type of the communication connection to be established between the terminal device and the smart device, and the operation guidance corresponding to different communication types is different; and the first processing unit 702 is configured to establish the communication connection of the target communication type with the smart device in response to the operation performed by the user based on the operation guidance corresponding to the target communication type.

[0329] Optionally, the target communication type is a WiFi communication type, and the first processing unit 702 is configured to prompt the user with network setting information according to the network information of the second network to which the smart device is connected, the network setting information being used to instruct the user to turn on a hotspot and change the network information of the hotspot to the network information of the second network; and the first processing unit 702 is configured to receive a change operation of the network information of the hotspot by the user and establish the communication connection of the target communication type with the smart device through the changed hotspot.

[0330] Optionally, the first processing unit 702 is configured to send the network replacement instruction to the smart device through the changed hotspot.

[0331] Optionally, the first processing unit 702 is configured to prompt the user with one or more candidate networks before sending the network replacement instruction to the smart device through the communication connection; and the first processing unit 702 is configured to receive a confirmation operation of the one or more candidate networks by the user, and obtain the first network and the network information of the first network.

[0332] Optionally, the first processing unit 702 is configured to send verification information to the smart device before sending the network replacement instruction to the smart device through the communication connection, the verification information including the network information of the second network to which the smart device is connected and the device identifier of the smart device, the network information of the second network to which the smart device is connected and the device identifier of the smart device being obtained from the server; and the first processing unit 702 is configured to send the network replacement instruction to the smart device through the communication connection after receiving feedback information of the smart device indicating that the verification information is verified.

[0333] Optionally, the second processing unit 703 is configured to receive a device adding operation of the user, display a device adding interface, the device adding interface comprising a device prompting control and a network information input area; the device prompting control is configured to enable the user to select whether to perform device network connection exception prompting when the smart device is in an offline state; the network information input area is configured to enable the user to input network information of a network to which the smart device is to be connected; and the second processing unit 703 is configured to send, to the smart device, prompting function setting information and the network information of the network to which the smart device is to be connected, so that the smart device accesses the network to which the smart device is to be connected according to the network information of the network to which the smart device is to be connected, and sends the prompting function setting information and a device identifier of the smart device to the server via the network to which the smart device is to be connected, wherein the prompting function setting information is obtained according to the device prompting control.

[0334] Optionally, the gateway corresponding to the second network is different from the gateway corresponding to the first network, or the network information of the second network is different from the network information of the first network.

[0335] Optionally, the communication type of the communication connection established between the terminal device and the smart device comprises any one of the following: Bluetooth, near field communication, and WiFi. In this way, the terminal device and the smart device can successfully establish the communication connection, and the convenience of network replacement can be further improved.

[0336] Please refer to FIG. 28, which is a structural schematic diagram of an electronic device 800 provided by an embodiment of the present application. The electronic device 800 shown in FIG. 28 is, for example, a smart device in the corresponding embodiments of FIG. 5, FIG. 12, FIG. 18, FIG. 20, and FIG. 23, or a smart device in FIG. 3. As shown in FIG. 28, the electronic device 800 comprises a second communication unit 801 and a network replacement unit 802; the second communication unit 801 is configured to establish a communication connection with a terminal device; and the network replacement unit 802 is configured to receive a network replacement instruction from the terminal device via the communication connection, the network replacement instruction comprising network information of a first network, and replace a second network connected by the smart device with the first network according to the network information of the first network.

[0337] Optionally, the electronic device 800 comprises a processing unit 803, which is configured to receive verification information sent by the terminal device before receiving the network replacement instruction from the terminal device via the communication connection; send feedback information to the terminal device when the network information and the device identifier in the verification information are consistent with the network information and the device identifier stored by the smart device; and the network replacement instruction is sent by the terminal device to the smart device after receiving the feedback information.

[0338] Optionally, after the connected second network is replaced by the first network, the processing unit 803 is configured to send device replacement information to the server through the first network, the device replacement information comprising network information of the first network and the device identifier of the smart device, and the device replacement information being used to instruct the server to store an association between the device identifier of the smart device and the network information of the first network.

[0339] Optionally, the processing unit 803 is configured to receive the reminder function setting information sent by the terminal device and network information of a network to be connected; access the network to be connected according to the network information of the network to be connected, and send the reminder function setting information and the device identifier to the server through the network to be connected, so as to instruct the server to store an association between the reminder function setting information of the smart device and the device identifier of the smart device, wherein the reminder function setting information is used to instruct the server to determine whether to perform device networking exception prompting when the smart device is in an offline state.

[0340] Optionally, the processing unit 803 is configured to send, to the server, a communication type supported by the smart device.

[0341] Please refer to FIG. 29, which is a structural schematic diagram of an electronic device 900 provided by an embodiment of the present application. The electronic device 900 shown in FIG. 29 is, for example, the server in the corresponding embodiments of FIG. 5, FIG. 12, FIG. 18, FIG. 20, and FIG. 23, or the server in FIG. 3. As shown in FIG. 29, the electronic device 900 comprises a data receiving unit 901 and a data sending unit 902. The data receiving unit 901 is configured to receive a query request sent by a terminal device, the query request being used to request to query a communication type supported by a smart device; and the data sending unit 902 is configured to send, to the terminal device, the communication type supported by the smart device, so as to enable the terminal device to establish a communication connection with the smart device according to the communication type supported by the smart device, and send a network replacement instruction to the smart device through the communication connection; wherein the network replacement instruction comprises network information of a first network, and the network replacement instruction is used to instruct the smart device to replace a network connected by the smart device from a second network to the first network according to the network information of the first network.

[0342] Optionally, the data sending unit 902 is further configured to send, to the terminal device, network information of a second network connected by the smart device and a device identifier of the smart device after receiving a network information request sent by the terminal device.

[0343] Optionally, the electronic device 900 further includes a storage unit 903, the data receiving unit 901 is configured to receive device replacement information sent by the smart device, the device replacement information includes network information of the first network and device identification of the smart device, and the device replacement information is used to indicate that the server stores an association relationship between the device identification of the smart device and the network information of the first network; the storage unit 903 is configured to store the association relationship between the device identification of the smart device and the network information of the first network; and the data sending unit 902 is configured to send network status of the smart device to the terminal device.

[0344] Optionally, the electronic device 900 further includes a detection unit 904, the detection unit 904 is configured to, when detecting that the smart device is in an offline state, detect whether one or more target devices having the same user information and network information as the smart device are in an online state; if the one or more target devices are all in an offline state, send network exception information to the terminal device; and if at least one of the one or more target devices is in an online state, send device exception information for the smart device to the terminal device.

[0345] Optionally, the detection unit 904 is configured to, when the smart device corresponding reminder function setting information is in an offline state, perform device networking exception prompt, and send device exception information to the terminal device.

[0346] Optionally, the data receiving unit 901 is configured to receive reminder function setting information and device identification of the smart device sent by the smart device, wherein the reminder function setting information is used for the server to determine whether to perform device networking exception prompt when the smart device is in an offline state; and the storage unit 903 is configured to store an association relationship between the reminder function setting information of the smart device and the device identification of the smart device.

[0347] Please refer to FIG. 30, which is a structural schematic diagram of an electronic device 1000 provided by an embodiment of the present application. The electronic device 1000 shown in FIG. 30 can perform steps performed by any one of the terminal device, the smart device, and the server.

[0348] As shown in FIG. 30, the electronic device 1000 includes a processor 1001, a memory 1002, and a network interface 1003. The processor 1001, the memory 1002, and the network interface 1003 are connected through a double data rate (DDR) bus or other types of buses. The network interface 1003 is configured to communicate with other devices, for example, receive data sent by other devices or send data to other devices through the network interface 1003.

[0349] The processor 1001 can be a central processing unit (CPU), or other specific integrated circuits. The processor 1001 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc. In practical applications, the electronic device can also include multiple processors, and the processors can include one or more processor cores.

[0350] The memory 1002 is generally used to store computer-executable program codes. The computer-executable program codes include instructions, and the processor 1001 executes various function applications and data processing of the electronic device 1000 by running the instructions stored in the memory. The memory 1002 includes a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function, etc., and the data storage area can store data created during use of the electronic device 1000, etc.

[0351] In addition, the memory 1002 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0352] It can be understood that the structure shown in FIG. 30 of the present application does not constitute a specific limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 can include more or fewer components than those shown, or combine certain components, or split certain components, or different component arrangements, which can be implemented in hardware, software or a combination of software and hardware.

[0353] In addition, the embodiments of the present application also provide an electronic device. The electronic device includes a memory and a processor in communication with the memory. The memory includes computer-readable instructions, and the processor is configured to execute the computer-readable instructions, so that the electronic device executes the method performed by the terminal device, the smart device or the server side in the above embodiments.

[0354] In addition, the embodiments of the present application also provide an Internet of Things smart system, including a terminal device, a smart device and a server. The terminal device, the smart device and the server are configured to execute the method in the above embodiments.

[0355] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores computer program instructions. When the computer program instructions are executed by a processing circuit, the functions or steps in the network replacement method are realized.

[0356] In addition, the embodiment of the present application further provides a chip system, which comprises a processing circuit and a storage medium. The storage medium stores computer program instructions. When the computer program instructions are executed by the processing circuit, the functions or steps in the network replacement method are realized.

[0357] In addition, the embodiment of the present application further provides a computer program product containing instructions. When the computer program product is run on a computer, the computer is enabled to execute the functions or steps in the network replacement method.

[0358] Through the above description of the embodiments, those skilled in the art can clearly understand the specific working processes of the chip system, the electronic device, the computer readable storage medium, the computer program product containing instructions, and the Internet of Things intelligent system described above for the convenience and brevity of description. Refer to the corresponding processes in the foregoing method embodiments, which will not be described here.

[0359] It can be understood that the steps of the method or algorithm described with reference to the embodiments of the present application can be implemented in the form of hardware, or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory, a flash memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a read-only optical disc or any other form of storage medium. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). In addition, the ASIC can be located in an electronic device. Of course, the processor and the storage medium can also exist as discrete components in the electronic device.

[0360] In an alternative, when implemented by using software, the embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments are implemented in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disk (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0361] The above is only a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the embodiments of the present application should be covered in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims

1. A network replacement method, characterized in that: Applied to a terminal device, the method includes: When the smart device cannot connect to the first network through the gateway, establishing a communication connection with the smart device so that the terminal device can connect to the first network; A network change instruction is sent to the smart device through the communication connection, where the network change instruction includes network information of the first network, and the network change instruction is used to instruct the smart device to change the network to which the smart device is connected from the second network to the first network according to the network information of the first network.

2. The method according to claim 1, characterized in that When the smart device cannot connect to the first network through the gateway using the first communication type, the terminal device establishes a communication connection with the smart device using the second communication type; The first communication type is the same as the second communication type, or the first communication type is different from the second communication type.

3. The method according to claim 2, characterized in that When the multiple smart devices cannot connect to the first network through the gateway using the first communication type, the terminal device establishes a communication connection with a first smart device among the multiple smart devices using the second communication type, and the terminal device establishes a communication connection with a second smart device among the multiple smart devices using a third communication type; The second communication type is the same as the third communication type, or the second communication type is different from the third communication type.

4. The method according to any one of claims 1 to 3, characterized in that Before establishing a communication connection with the smart device, the method further includes: Prompting a user with recommendation information based on the priority of the communication types supported by both the terminal device and the smart device, wherein the recommendation information is used to recommend to the user a communication type for establishing a communication connection between the terminal device and the smart device; The establishing of a communication connection with the smart device includes: In response to the user inputting a communication type for the recommendation information, a communication connection of a target communication type is established with the smart device, where the target communication type is the communication type input by the user.

5. The method according to any one of claims 1 to 4, characterized in that Before establishing a communication connection with the smart device, the method further includes: Prompting the user with an operation guide corresponding to a target communication type, wherein the target communication type is the communication type of the communication connection to be established between the terminal device and the smart device, and different operation guides correspond to different communication types; The establishing of a communication connection with the smart device includes: In response to an operation performed by the user based on the operation guidance corresponding to the target communication type, the communication connection of the target communication type is established with the smart device.

6. The method according to claim 5, characterized in that The target communication type is a WiFi communication type, and establishing the communication connection of the target communication type with the smart device includes: Prompting the user with network setting information based on the network information of the second network to which the smart device is connected, wherein the network setting information is used to instruct the user to turn on a hotspot and change the network information of the hotspot to the network information of the second network; Receive the user's operation of changing the network information of the hotspot, and establish a communication connection of the target communication type with the smart device through the changed hotspot.

7. The method according to any one of claims 1 to 6, characterized in that Before sending the network change instruction to the smart device through the communication connection, the method includes: Prompting the user with one or more candidate networks; A confirmation operation of the user on the one or more candidate networks is received, and the first network and network information of the first network are obtained.

8. The method according to any one of claims 1 to 7, characterized in that The establishing of a communication connection with the smart device includes: A network change operation of the user is received, and a communication connection is established with the smart device according to the network change operation.

9. The method according to claim 8, characterized in that Before receiving the user's network change operation, the method further includes: After receiving network abnormality information from the server, prompt the user of the network abnormality; The receiving user's network change operation includes: A network change operation performed by the user in response to the network abnormality prompt is received.

10. The method according to claim 8, characterized in that Before receiving the user's network change operation, the method further includes: After receiving device abnormality information for the smart device from the server, prompting the user of the device network abnormality; The receiving user's network change operation includes: Receive a network change operation initiated by the user for the smart device based on the device network abnormality prompt.

11. The method according to claim 10, characterized in that The method further comprises: Receive a device adding operation from the user and display a device adding interface, the device adding interface including a device reminder control and a network information input area; the device reminder control is used for the user to select whether to receive a device network abnormality prompt when the smart device is offline, and the network information input area is used for the user to input the network information of the network to which the smart device is to be connected; Sending reminder function setting information and network information of the network to be connected to the smart device, wherein the reminder function setting information is information obtained according to the device reminder control.

12. The method according to any one of claims 1 to 11, characterized in that The gateway corresponding to the second network is different from the gateway corresponding to the first network, or the network information of the second network is different from that of the first network.

13. The method according to any one of claims 1 to 12, characterized in that The communication type of the communication connection established between the terminal device and the smart device includes any one of the following: Bluetooth, near field communication, and WiFi.

14. An Internet of Things system, characterized in that: The Internet of Things system includes terminal devices and smart devices; The terminal device is used to establish a communication connection with the smart device when the smart device cannot connect to the first network through the gateway, and the terminal device can connect to the first network; The terminal device is configured to send a network change instruction to the smart device via the communication connection, wherein the network change instruction includes network information of the first network; The smart device is configured to receive a network change instruction from the terminal device through the communication connection, and change the connected second network to the first network according to the network information of the first network.

15. The system according to claim 14, wherein: The Internet of Things system also includes a server; The terminal device is used to initiate a query request to the server, wherein the query request is used to request to query the communication type supported by the smart device; The server is configured to send the communication type supported by the smart device to the terminal device according to the query request; The terminal device is used to establish a communication connection with the smart device according to the communication type supported by the smart device when the smart device cannot be connected to the first network through the gateway.

16. The system according to claim 15, characterized in that The terminal device is used for: Prompting a user with recommendation information based on the priority of the communication types supported by both the terminal device and the smart device, wherein the recommendation information is used to recommend to the user a communication type for establishing a communication connection between the terminal device and the smart device; In response to the user inputting a communication type for the recommendation information, a communication connection of a target communication type is established with the smart device, where the target communication type is the communication type input by the user.

17. The system according to any one of claims 14 to 16, characterized in that: After the connected second network is changed to the first network, the smart device is further configured to send device change information to the server via the first network, the device change information including network information of the first network and a device identifier of the smart device; The server is configured to receive device replacement information sent by the smart device, store an association between the device identifier of the smart device and the network information of the first network, and send the network status of the smart device to the terminal device; The terminal device is used to prompt the user of the network status of the smart device.

18. The system according to any one of claims 14 to 17, characterized in that: The terminal device is used to receive a network change operation from a user, and establish a communication connection with the smart device according to the network change operation.

19. The system according to claim 18, wherein: The server is configured to send network anomaly information to the terminal device after detecting that an anomaly occurs in the network to which the smart device is connected; The terminal device is used to provide a network anomaly prompt to the user after receiving the network anomaly information from the server, and receive a network change operation performed by the user in response to the network anomaly prompt.

20. The system according to claim 18, wherein The server is configured to send device abnormality information to the terminal device after detecting that the smart device is in an offline state; The terminal device is used to provide the user with a device network abnormality prompt after receiving the device abnormality information from the server, and receive a network replacement operation initiated by the user for the smart device based on the device network abnormality prompt.

21. The system according to claim 19 or 20, characterized in that The server is used to: When it is detected that the smart device is in an offline state, detecting whether one or more target devices having the same user information and network information as the smart device are in an online state; If the one or more target devices are all offline, sending network abnormality information to the terminal device; If at least one of the one or more target devices is in an online state, device abnormality information for the smart device is sent to the terminal device.

22. The system according to claim 21, wherein: The server is used to provide a device network abnormality prompt when the reminder function setting information corresponding to the smart device is in an offline state, and send device abnormality information to the terminal device.

23. The system according to any one of claims 14 to 22, characterized in that: The terminal device is used to receive a user's device addition operation and display a device addition interface, which includes a device reminder control and a network information input area; the device reminder control is used for the user to select whether to receive a device network abnormality prompt when the smart device is offline, and the network information input area is used for the user to input the network information of the network to which the smart device is to be connected; The terminal device is configured to send reminder function setting information and network information of the network to be connected to the smart device in response to the user's operation on the device reminder control and the network information input area, wherein the reminder function setting information is information obtained according to the device reminder control; The smart device is used to receive the reminder function setting information and the network information of the network to be connected sent by the terminal device, access the network to be connected according to the network information of the network to be connected, and send the reminder function setting information and the device identification to the server through the network to be connected; The server is used to receive the reminder function setting information and the device identification of the smart device sent by the smart device, and store the association between the reminder function setting information of the smart device and the device identification of the smart device, wherein the reminder function setting information is used by the server to determine whether to issue a device network abnormality prompt when the smart device is in an offline state.

24. An electronic device, characterized in that: include: a memory for storing computer program instructions; A processor, configured to execute the computer program instructions to support the electronic device in implementing the method according to any one of claims 1 to 13.

25. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which implement the method according to any one of claims 1 to 13 when executed by a processing circuit.