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 network replacement instructions, the cumbersome process problems in the network abnormality of the smart device are solved, and efficient network replacement is achieved without resetting the device and redistributing the network, improving user experience and operation convenience.
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-08-07
AI Technical Summary
In the whole-house smart scenario, when the network of smart devices is abnormal, the existing technology requires resetting the device and redistribution of the network to replace the network. The process is cumbersome and time-consuming, especially for the elderly, and it is difficult to distinguish between device abnormalities and network abnormalities.
By establishing a communication connection between the terminal device and the smart device, sending network replacement instructions directly, eliminating the need to reset the device and redistribute the network, utilizing multiple communication types to improve the connection success rate, and simplifying the operation process through user interaction and server support.
It simplifies the network replacement process, saves time, improves operational convenience and user experience, especially for the elderly, and reduces the complexity of device reset and distribution network.
Smart Images

Figure CN2024115947_07082025_PF_FP_ABST
Abstract
Description
Network replacement method, system, electronic device and computer-readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 29, 2024, with application number 202410125360.8 and application name “Network replacement method, system, electronic device and computer-readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of Internet of Things technology, and in particular to a network replacement method, system, electronic device, and computer-readable storage medium. Background Art
[0003] In the whole-house smart scenario, the basic functions of smart devices are highly dependent on the connected network. When the network is abnormal, it will affect the normal function of the smart device. Usually, after the network is abnormal, some users will take measures such as changing the network device connected to the smart device (such as a router) to ensure the normal function of the smart device. However, changing the network to which the smart device is connected usually requires a series of steps such as resetting the device and re-configuring the network before it can be connected to the new network. The process is cumbersome and time-consuming.
[0004] Summary of the Invention
[0005] The present application provides a network replacement method, system, electronic device and computer-readable storage medium. By establishing a communication connection between a terminal device and a smart device, the network replacement of the smart device is completed based on the communication connection, without the need to reset the smart device and configure the network, which helps to solve the problem of cumbersome and time-consuming network replacement process.
[0006] To achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a network replacement method is provided, which is applied to a terminal device, and 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; sending 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 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.
[0008] The solution provided in the first aspect above establishes a communication connection between the terminal device and the smart device when the smart device cannot connect to the first network through the gateway, so that the terminal device and the smart device can directly interact with network information through the communication connection, thereby completing the network replacement of the smart device without resetting and configuring the network for the smart device, greatly simplifying the network replacement process, saving time and improving efficiency.
[0009] The fact that the smart device is unable to connect to the first network through the gateway means that the smart device is in a state where it cannot 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 via 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 and the second communication type are the same, or the first communication type and the second communication type are different. In this way, the terminal device and the smart device can successfully establish a communication connection.
[0011] Exemplarily, the first communication type is one of the communication types supported by both the terminal device and the smart device. Thus, establishing a communication connection based on the communication type supported by both the terminal device and the smart device can improve the success rate of establishing the communication connection.
[0012] As one possible implementation, when multiple smart devices are unable to connect to the first network through the gateway using a first communication type, the terminal device establishes a communication connection with a first smart device among the multiple smart devices using a second communication type, and establishes a communication connection with a second smart device among the multiple smart devices using a third communication type; the second communication type and the third communication type are the same, or the second communication type and the third communication type are different. In this way, when multiple smart devices are unable to connect to the first network through the gateway, the terminal device can use different communication types to establish a communication connection with each smart device, thereby improving the success rate.
[0013] As a possible implementation, before establishing a communication connection with a 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, the recommendation information being used to recommend to the user a communication type for establishing a communication connection between the terminal device and the smart device; and establishing a communication connection with the smart device includes: in response to the user inputting an operation for the communication type in the recommendation information, establishing a communication connection with the smart device of a target communication type, the target communication type being the communication type input by the user. In this way, by prompting the user with recommendation information based on the priority of the communication types supported by both the terminal device and the smart device, the user can select a communication type with a higher priority, allowing the terminal device and the smart device to establish a communication connection using the communication type with the highest priority for operational convenience. This can further improve the convenience of network switching, simplify the network switching process, save time, and improve efficiency.
[0014] As a possible implementation, 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; and establishing a communication connection with the smart device includes: responding to an operation performed by the user based on the operation guide corresponding to the target communication type, establishing a communication connection of the target communication type with the smart device. In this way, guiding the user through the operation guide can further improve the convenience of user operation and enhance the user experience.
[0015] Exemplarily, the target communication type includes a first communication type, a second communication type, and a third communication type.
[0016] As a possible implementation, the target communication type is WiFi communication type, and establishing a communication connection of the target communication type with a 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, the network setting information being used to instruct the user to enable a hotspot and change the hotspot's network information to that of the second network; receiving a user's operation to change the hotspot's network information, and establishing a communication connection of the target communication type with the smart device via the changed hotspot. Thus, establishing a communication connection with the smart device via the hotspot allows the terminal device to successfully establish a communication connection with the smart device. Prompting the user with the network setting information also improves user convenience and user experience.
[0017] As a possible implementation, before sending a network change instruction to a smart device via a communication connection, the method includes: prompting a user with one or more candidate networks; receiving a user confirmation operation for the one or more candidate networks, and obtaining the first network and network information of the first network. Thus, by prompting the user with the candidate networks, it is easier for the user to specify the network to which the smart device is to connect, thereby improving user convenience.
[0018] In one possible implementation, establishing a communication connection with the smart device includes: receiving a network change operation from the user, and establishing a communication connection with the smart device based on the network change operation. Thus, by receiving the network change operation from the user and establishing a communication connection with the smart device based on the network change operation, the user can more conveniently change the network of the smart device.
[0019] As a possible implementation manner, before receiving the network change operation from the user, the method further includes:
[0020] After receiving network anomaly information from the server, the user is prompted with a network anomaly notification; and the user's network change operation is received, including: receiving the user's network change operation in response to the network anomaly notification. Thus, by prompting the user with network anomaly notifications, the user is facilitated to promptly identify network problems and initiate network changes to address them, thereby improving the user experience.
[0021] As a possible implementation, before accepting a user's network change operation, the method further includes: after receiving device abnormality information regarding the smart device from the server, providing a device network abnormality notification to the user; and receiving the user's network change operation includes receiving a user-initiated network change operation for the smart device in response to the device network abnormality notification. Thus, by providing the user with a device network abnormality notification, the user can promptly identify device issues and initiate a network change to address them, thereby improving the user experience.
[0022] As a possible implementation, before establishing a communication connection with a smart device, the method further includes: receiving a network change operation from a user, initiating a query request to a server for the communication types supported by the smart device; receiving the communication types supported by the smart device from the server, and establishing a communication connection with the smart device based on the communication types supported by the smart device. In this way, by obtaining the communication types supported by the smart device and establishing a communication connection with the smart device based on the communication capabilities supported by the smart device, the success rate of establishing a communication connection can be improved.
[0023] As a possible implementation method, the method further includes: receiving a device addition operation from a user, displaying 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 by the user to select whether to issue a device connection anomaly prompt when the smart device is offline, and the network information input area is used by the user to input the network information of the network to be connected to the smart device; and sending reminder function setting information and the network information of the network to be connected to the smart device, wherein the reminder function setting information is information obtained based on the device reminder control. In this way, the smart device can access the network to be connected based on the network information of the network to be connected, and send the reminder function setting information and the device identification of the smart device to the server via the network to be connected, so that the server can feedback device anomalies when detecting that the device is offline, so that the user can promptly discover device problems and improve the 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 that of the first network. In this way, when the gateway or network information is changed, the network connected to the smart device can be changed, thereby improving the convenience of network change.
[0025] As a possible implementation, 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. Thus, by selecting a variety of communication types, the terminal device and the smart device can successfully establish a communication connection, and the convenience of network switching can be further improved.
[0026] As a possible implementation, before sending the network change instruction to the smart device via the communication connection, the method further includes: sending verification information to the smart device, the verification information including network information of the second network to which the smart device is connected and a device identifier of the smart device, where 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 a server; and sending the network change instruction to the smart device via the communication connection includes: after receiving feedback information from the smart device indicating that verification of the verification information has passed, sending the network change instruction to the smart device via the communication connection. In this way, reliability verification using verification information can improve the reliability of data transmission.
[0027] As one possible implementation, the method further includes sending a network information request to a server, and receiving network information of a second network to which the smart device is connected and a device identifier of the smart device, sent by the server in response to the network information request. In this manner, the terminal device can perform a reliability check with the smart device based on 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 provided, which is applied to a server, and the method includes: receiving a query request sent by a terminal device, the query request is used to request to query the communication type supported by the smart device; sending 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 includes network information of the first network, and the network replacement 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.
[0029] The solution provided in the second aspect above, by sending the communication type supported by the smart device to the terminal device, enables the terminal device to establish a communication connection with the smart device according to the communication type supported by the smart device, so that the terminal device and the smart device can directly interact with network information through the communication connection, thereby completing the network replacement of the smart device without resetting and configuring the network of the smart device, greatly simplifying the network replacement process, saving time and improving efficiency.
[0030] As a possible implementation, the method further includes: after receiving a network information request from the terminal device, sending network information of a second network to which the smart device is connected and a device identifier of the smart device to the terminal device. This allows the terminal device to perform a reliability check with the smart device based on 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 includes: receiving device replacement information sent by the smart device, the device replacement information including the network information of the first network and the device identifier of the smart device, the device replacement information being used to instruct the server to store the association between the device identifier of the smart device and the network information of the first network; storing the association between the device identifier of the smart device and the network information of the first network; and transmitting the network status of the smart device to the terminal device. In this way, the device replacement information can indicate to the server that the smart device has switched to the first network and has resumed online status, thereby promptly notifying the user that the smart device has resumed online status. Simultaneously, the server stores the association between the device identifier of the smart device and the network information of the first network to facilitate subsequent detection of network anomalies.
[0032] As a possible implementation, the method further includes: upon detecting that the smart device is offline, detecting whether one or more target devices with the same user information and network information as the smart device are online; if one or more target devices are offline, sending network anomaly information to the terminal device; and if at least one of the one or more target devices is online, sending device anomaly information specific to the smart device to the terminal device. In this way, by analyzing the anomaly scenario based on the smart device's corresponding network and user information when the smart device is offline, the user can be accurately informed of whether the anomaly is a device or network anomaly, facilitating user operation and improving the user experience.
[0033] As a possible implementation, sending device abnormality information about the smart device to the terminal device includes: when the reminder function setting information corresponding to the smart device is set to be in an offline state, issuing a device network abnormality prompt, and sending the device abnormality information to the terminal device. In this way, by setting an abnormality prompt for the smart device, the smart device can be promptly notified of abnormalities when it is offline.
[0034] As a possible implementation, the method further includes: receiving reminder function setting information and a 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 issue a device connection abnormality notification when the smart device is offline; and storing an association between the reminder function setting information and the device identifier of the smart device. Thus, by setting an abnormality notification for the smart device, the smart device can be promptly notified of abnormalities when the smart device is offline.
[0035] On the third aspect, a network replacement method is provided, which is applied to smart devices, and the method includes: establishing a communication connection with a terminal device; receiving a network replacement instruction from the terminal device through the communication connection, the network replacement instruction including network information of a first network; and replacing the connected second network with the first network according to the network information of the first network.
[0036] The solution 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, thereby completing the network replacement of the smart device without resetting the smart device and configuring the network. This greatly simplifies the network replacement process, saves time and improves efficiency.
[0037] As a possible implementation, before receiving a network change instruction from a terminal device via a communication connection, the method further includes: receiving verification information sent by the terminal device; and when the network information and device identifier in the verification information match the network information and device identifier stored by the smart device, sending feedback information to the terminal device, wherein the network change instruction is sent by the terminal device to the smart device after receiving the feedback information. In this way, reliability verification using verification information can improve the reliability of data transmission.
[0038] As a possible implementation, after the connected second network is replaced with the first network, the method further includes: sending device replacement information to the server via the first network, the device replacement information including the network information of the first network and the device identifier of the smart device, the device replacement information being used to instruct the server to store the association between the device identifier of the smart device and the network information of the first network. Thus, by sending the device replacement information to the server, it is possible to indicate to the server that the smart device has switched to the first network and has resumed its online status, thereby promptly notifying the user that the smart device has resumed its online status. Simultaneously, the server stores the association between the device identifier of the smart device and the network information of the first network to facilitate subsequent detection of network anomalies.
[0039] As a possible implementation, the method further includes: receiving reminder function setting information and network information of the network to be connected sent by the terminal device; accessing the network to be connected based on the network information of the network to be connected, and sending the reminder function setting information and the device identification to the server via the network to be connected, thereby instructing the server to store the association between the reminder function setting information of the smart device and the device identification of the smart device. The reminder function setting information is used by the server to determine whether to issue a device connection anomaly notification when the smart device is offline. This enables the server to provide feedback on device anomalies when the device is detected to be offline, allowing users to promptly identify device problems and improve the user experience.
[0040] As a possible implementation, the method further includes: sending the communication types supported by the smart device to the server. This allows the terminal device to obtain the communication types supported by the smart device from the server and establish a communication connection with the smart device based on the communication capabilities supported by the smart device, thereby improving the success rate of establishing the communication connection.
[0041] In a fourth aspect, an Internet of Things system is provided, which includes a terminal device and a smart device; 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 used to send a network change instruction to the smart device through the communication connection, and the network change instruction includes network information of the first network; the smart device is used to receive the 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.
[0042] The solution provided in the fourth aspect above establishes a communication connection between the terminal device and the smart device when the smart device cannot connect to the first network through the gateway, so that the terminal device and the smart device can directly interact with network information through the communication connection, thereby completing the network replacement of the smart device without resetting and configuring the network for the smart device, greatly simplifying the network replacement process, saving time and improving efficiency.
[0043] As a possible implementation, the IoT system further includes a server; the terminal device is configured to initiate a query request to the server, the query request being configured to inquire about the communication types supported by the smart device; the server is configured to send the communication types supported by the smart device to the terminal device in response to the query request; and the terminal device is configured to establish a communication connection with the smart device based on the communication types supported by the smart device when the smart device is unable to connect to the first network via the gateway. In this manner, by obtaining the communication types supported by the smart device and establishing a communication connection with the smart device based on the communication capabilities supported by the smart device, the success rate of establishing a communication connection can be improved.
[0044] As a possible implementation, the terminal device is configured to: prompt a user with recommendation information based on the priority of the communication types supported by both the terminal device and the smart device, the recommendation information being used to recommend a communication type for establishing a communication connection between the terminal device and the smart device; and, in response to the user inputting a communication type in response to the recommended communication type, establish a communication connection with the smart device using a target communication type, the target communication type being the communication type input by the user. In this manner, prompting the user with recommendation information based on the priority of the communication types supported by both the terminal device and the smart device allows the user to select a higher-priority communication type, enabling the terminal device and the smart device to establish a communication connection using the communication type with the highest priority for operational convenience. This further improves the convenience of network switching, simplifies the network switching process, saves time, and improves efficiency.
[0045] As a possible implementation, after switching from the second network to the first network, the smart device is further configured to send device change information to a server via the first network. The device change information includes the network information of the first network and the device identifier of the smart device. The server is configured to receive the device change information sent by the smart device, store the 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 a terminal device. The terminal device is configured to notify the user of the network status of the smart device. Thus, by sending the device change information to the server, the server is informed that the smart device has switched to the first network and has resumed online status, thereby promptly notifying the user that the smart device has resumed online status. Furthermore, the server stores the association between the device identifier of the smart device and the network information of the first network to facilitate subsequent detection of network anomalies.
[0046] As a possible implementation, the terminal device is configured to receive a user's network change operation and establish a communication connection with the smart device based on the network change operation. Thus, by receiving the user's network change operation and establishing a communication connection with the smart device based on the network change operation, the user can more conveniently change the network of the smart device.
[0047] As one possible implementation, upon detecting an anomaly in the network to which the smart device is connected, the server is configured to send network anomaly information to the terminal device. Upon receiving the network anomaly information from the server, the terminal device is configured to notify the user of the network anomaly and accept the user's request to change the network in response to the network anomaly notification. This facilitates user identification of network issues and the initiation of network changes, improving the user experience.
[0048] As one possible implementation, the server is configured to send device anomaly information to the terminal device upon detecting that the smart device is offline. Upon receiving the anomaly information from the server, the terminal device is configured to notify the user of the device's network anomaly and accept user-initiated network change operations for the smart device in response to the anomaly information. This facilitates user identification of device issues and the initiation of network changes, thereby improving the user experience.
[0049] As one possible implementation, the server is configured to: upon detecting that a smart device is offline, detect whether one or more target devices with the same user and network information as the smart device are online; if one or more target devices are offline, send network anomaly information to the terminal device; and if at least one of the one or more target devices is online, send device anomaly information specific to the smart device to the terminal device. This allows the server to analyze anomaly scenarios based on the smart device's corresponding network and user information when the smart device is offline, accurately alerting the user to whether the anomaly is a device or network anomaly, facilitating user operation and improving the user experience.
[0050] As a possible implementation, the server is configured to provide a device connection anomaly notification when the smart device's corresponding reminder function setting information is set to be offline, and to send a device anomaly notification to the terminal device. Thus, by setting an anomaly notification for the smart device, an anomaly notification can be provided to the smart device in a timely manner when the smart device is offline.
[0051] As a possible implementation, a 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 by the user to select whether to issue a device network abnormality prompt when the smart device is offline; the network information input area is used by the user to input the network information of the network to be connected to the smart device; the terminal device is used to respond to the user's operation on the device reminder control and the network information input area and send reminder function setting information and the network information of the network to be connected to the smart device, wherein the reminder function setting information is information obtained based on 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, connect to the network to be connected based on the network information of the network to be connected, and send the reminder function setting information and the device identification to the server via 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 offline. In this way, by setting an abnormality prompt for the smart device, the smart device can be promptly prompted with an abnormality when it is offline.
[0052] In a fifth aspect, an electronic device is provided, comprising a first communication unit and a first processing unit; wherein the first communication unit is used 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 used to send a network change instruction to the smart device through the communication connection, the network change instruction including 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.
[0053] The beneficial effects of the electronic device provided in the fifth aspect can be found in the description of any embodiment of the first aspect and will not be repeated here. The electronic device has the function of implementing the behavior in the method example of any embodiment of the first 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.
[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 query the communication types supported by the smart device; the data sending unit is configured to send the communication types supported by the smart device to the terminal device, so that the terminal device establishes a communication connection with the smart device based on the communication types supported by the smart device, and sends a network change instruction to the smart device via the communication connection; the network change instruction includes network information of a first network, and the network change instruction is configured to instruct the smart device to change the network to which the smart device is connected from a second network to the first network based on the network information of the first network.
[0055] The beneficial effects of the server provided in the sixth aspect can be found in the description of any embodiment of the second aspect and will not be repeated here. The server has the function of implementing the behavior of the method example of any embodiment of the second 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.
[0056] In a seventh aspect, an electronic device is provided, comprising a second communication unit and a network change unit; wherein the second communication unit is used to establish a communication connection with a terminal device; the network change unit is used to receive a network change instruction from the terminal device through the communication connection, the network change instruction including network information of the first network, and change the connected second network to the first network according to the network information of the first network.
[0057] The beneficial effects of the electronic device provided in the seventh aspect can be found in the description of any embodiment of the third aspect and will not be repeated here. The electronic device has the function of implementing the behavior in the method example of any embodiment 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 for storing computer program instructions; a processor for executing the computer program instructions to support the electronic device to implement a method as described in any possible implementation of the first aspect, or to implement a method as described in any possible implementation of the second aspect, or to implement a method as described in any possible implementation of the third aspect.
[0059] In a ninth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processing circuit, the method described in any possible embodiment of the first aspect is implemented, or the method described in any possible embodiment of the second aspect is implemented, or the method described in any possible embodiment of the third aspect is implemented.
[0060] In the tenth aspect, a chip system is provided, which includes a processing circuit and a storage medium, in which computer program instructions are stored; when the computer program instructions are executed by the processing circuit, a method as in any possible implementation method of the first aspect is implemented, or a method as in any possible implementation method of the second aspect is implemented, or a method as in any possible implementation method of the third aspect is implemented.
[0061] In the eleventh aspect, a computer program product comprising instructions is provided, which, when the computer program product is run on a computer, enables the computer to execute a method as described in any possible implementation of the first aspect, or to implement a method as described in any possible implementation of the second aspect, or to implement a method as described in any possible implementation of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 shows the interface display of each smart device on the terminal device in the whole house smart scene;
[0063] FIG2 is a schematic diagram of the interface for preference settings of a smart light;
[0064] FIG3 is a schematic structural diagram of an Internet of Things system provided in an embodiment of the present application;
[0065] FIG4 is a schematic diagram of an interface for a device adding process according to an embodiment of the present application;
[0066] FIG5 is a schematic diagram of an interaction for adding a device according to an embodiment of the present application;
[0067] FIG6 is a schematic diagram of a device adding interface according to an embodiment of the present application;
[0068] FIG7 is a second schematic diagram of the device adding interface provided in an embodiment of the present application;
[0069] FIG8 is a schematic diagram of device registration provided in an embodiment of the present application;
[0070] FIG9 is a schematic diagram showing the principle of an abnormality prompt provided in an embodiment of the present application;
[0071] FIG10 is a schematic diagram of an abnormal prompt interface provided in an embodiment of the present application;
[0072] FIG11 is a schematic diagram of a process for abnormal prompting provided in an embodiment of the present application;
[0073] FIG12 is one of the interactive diagrams of the network replacement method provided in an embodiment of the present application;
[0074] FIG13 is a schematic diagram of one of the interfaces for network replacement provided in an embodiment of the present application;
[0075] FIG14 is a second schematic diagram of a network replacement interface provided in an embodiment of the present application;
[0076] FIG15 is a third schematic diagram of a network replacement interface provided in an embodiment of the present application;
[0077] FIG16 is a fourth schematic diagram of a network replacement interface provided in an embodiment of the present application;
[0078] FIG17 is a schematic diagram of a candidate network interface provided in an embodiment of the present application;
[0079] FIG18 is a second interactive diagram of the network replacement method provided in an embodiment of the present application;
[0080] FIG19 is a schematic diagram of a network replacement scenario provided in an embodiment of the present application;
[0081] FIG20 is a third interactive diagram of the network replacement method provided in an embodiment of the present application;
[0082] FIG21 is a schematic diagram of one of the communication type recommendation interfaces provided in an embodiment of the present application;
[0083] FIG22 is a second schematic diagram of a communication type recommendation interface provided in an embodiment of the present application;
[0084] FIG23 is a fourth interactive diagram of the network replacement method provided in an embodiment of the present application;
[0085] FIG24 is a schematic diagram of a network setting prompt interface provided in an embodiment of the present application;
[0086] FIG25 is a schematic diagram of a scenario for providing operation guidance to a user according to an embodiment of the present application;
[0087] FIG26 is a comparative diagram of network replacement provided in an embodiment of the present application;
[0088] FIG27 is a schematic structural diagram of an electronic device 700 provided in an embodiment of the present application;
[0089] FIG28 is a schematic structural diagram of an electronic device 800 provided in an embodiment of the present application;
[0090] FIG29 is a schematic structural diagram of an electronic device 900 provided in an embodiment of the present application;
[0091] FIG30 is a schematic structural diagram of an electronic device 1000 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0092] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0093] The terms "including," "having," and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.
[0094] In the following, the terms "first," "second," etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the quantity of the technical features indicated. Therefore, a feature specified as "first," "second," etc. may explicitly or implicitly include one or more of the features.
[0095] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0096] In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more. "And / or" in this document is simply a description of the association relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.
[0097] As described in the background technology, in the whole-house smart scene, the basic functions of smart devices are strongly dependent on the connected network. When the network is abnormal, it will affect the normal function of the smart device. As shown in Figure 1, Figure 1 shows the interface display of each smart device in the whole-house smart scene (such as device 1, device 2, device 3, device 4, device 5, device 6 in Figure 1) on the terminal device. When the network is abnormal, each smart device will display an offline status, indicating that the function of the device cannot be used normally.
[0098] Usually, after a network anomaly occurs, some users will change the network, such as changing the network device (such as a router) to which the smart device is connected, to ensure the normal function of the smart device. However, changing the network to which the smart device is connected usually requires a series of steps such as resetting the device and re-configuring the network before it can be connected to the new network. After resetting the device and re-configuring the network, the user's preferences and personalized settings saved in the smart device, terminal application (application, APP), and cloud server will be cleared. If you want to restore to the previously set preference state, you need to reconfigure it. As shown in Figure 2, Figure 2 is a schematic diagram of the preference setting interface of the smart light. After changing the network, if you want to restore to the preference setting shown in Figure 2, the user needs to reconfigure the smart light, such as reconfiguring the brightness, color temperature, RGB color, and some custom settings. The process is cumbersome and time-consuming.
[0099] Furthermore, the process for resetting and configuring the network varies depending on the smart device. For example, security equipment installed at height requires users to climb up to reset the device and configure the network, which is a complex operation. Furthermore, resetting and configuring smart devices requires a basic understanding of Internet of Things (IoT) devices and Wi-Fi technologies. Therefore, for some special groups, such as the elderly, the process of resetting and configuring smart devices is particularly complex.
[0100] In addition, when the smart device is offline, the user cannot determine whether the abnormality is in the device or the network, so all recovery methods will be tried, resulting in a poor experience.
[0101] Based on the above problems, an embodiment of the present application provides a network replacement method. When the smart device cannot connect to the first network through the gateway, a communication connection is established between the terminal device and the smart device. Through the established communication connection, the terminal device can send a network replacement instruction to the smart device, so that the smart device changes the network without resetting the device. The process is simple and time-saving.
[0102] The network replacement method provided in the embodiments of the present application can be applied to an Internet of Things system. For example, the Internet of Things system can be, but is not limited to, a smart home system, a smart medical system, or an intelligent transportation system.
[0103] For easier understanding, please refer to Figure 3, which shows a schematic diagram of the structure of an Internet of Things system. As shown in Figure 3, the Internet of Things system may include multiple devices and a server 130.
[0104] In the embodiment of the present application, the plurality of devices include at least one terminal device 110 and at least one smart device 120. The terminal device 110 may be a control instruction input device, such as a mobile phone, a tablet, a control panel, and the like.
[0105] Smart devices 120 refer to IoT smart devices. For example, in a smart home scenario, smart devices 120 may be home appliances such as smart door locks, smart speakers, smart curtains, smart air conditioners, smart cameras, smart TVs, robot vacuums, smart sockets, smart desk lamps, smart refrigerators, and smart water heaters.
[0106] As an example, the terminal device 110 may provide a human-computer interaction interface, where the user can view the network status (offline or online) of each smart device 120, the operating information of the smart device 120, etc. The user can also control the operation of each smart device 120 by clicking on the screen or inputting control commands through voice, etc. The user can also complete the configuration of preferences for each smart device 120 through the human-computer interaction interface.
[0107] As an example, the terminal device 110 has a device application installed. When the terminal device 110 starts the device application, the human-computer interaction interface can be displayed. For example, the terminal device is a mobile phone, and the device application is a smart life application. 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 may be interconnected via a communication network. The communication network may be implemented using any known network communication protocol, such as Bluetooth, WiFi, Near Field Communication (NFC), or any other suitable communication protocol.
[0109] In an embodiment of the present application, the terminal device 110 and the smart device 120 may be located in the same local area network. For example, the terminal device 110 and the smart device 120 may be connected to the same WiFi network.
[0110] In the embodiment of the present application, the server 130 may be a cloud server that can be used to manage the smart devices 120. The server 130 stores configuration information of the smart devices 120, such as supported communication types and device identifiers. The server 130 may also obtain operating information and network status of each smart device 120 and send the operating 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 fourth generation mobile communication technology (4G) network, a fifth generation mobile communication technology (5G) network, etc. 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 Figure 3 is only one implementation method of the embodiment of the present application. In actual applications, the Internet of Things system may also include more or fewer devices, which is not limited here.
[0113] The following will describe the network replacement method provided in the embodiment of the present application in detail with reference to the accompanying drawings, taking a smart home system as an example.
[0114] To facilitate understanding of the network replacement method provided in the embodiment of the present application, the network configuration and registration process of the smart device will be specifically described below. As an example, when the terminal device is installed with a device application, the user can start the device application through the terminal device. After the terminal device starts the device application, the terminal device displays the device display interface to the user. As shown in (a) in Figure 4, the device display interface includes the smart devices that the user has added (such as device 1, device 3, device 5, device 4, device 6, etc. in (a)). The device display interface includes function controls. When the user clicks the function controls, the terminal device responds to the user's operation and displays a function prompt box to the user. Among them, the function prompt box includes a function prompt for adding a device. When the user needs to add a smart device, the function prompt for adding a device is operated. The terminal device responds to the user's operation and performs a device scan. As shown in (b) in Figure 4, when the terminal device scans the smart device, the terminal device displays the device connection interface to the user. The device connection interface includes the device name of the scanned smart device (such as device XXXX in (b)) 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 scanned smart device is confirmed to be correct, the user can click the connection control of the smart device. The terminal device responds to the user's operation, establishes a connection with the smart device, and displays the device adding interface to the user.
[0115] As shown in (c) of Figure 4, the device addition interface includes the device name of the smart device and a network information input area. The network information includes the network name and 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). The user can select the network to which the smart device is to connect from the displayed network names. After the user selects the network to which the smart device is to connect, the user can enter the network password of the selected network in the network password input area.
[0116] As an example, a terminal device can search for networks in its environment to find all networks provided by gateways in the environment. After the user clicks a selection control, the terminal device can display all found networks. Optionally, the gateway can be a router, switch, etc. In some examples, the gateway can also be a wireless access point, WiFi hotspot, etc. This is not a limitation and can be set according to actual needs.
[0117] In some examples, the user may also directly enter the network to which the smart device is to be connected in the network name input area, and enter 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 enters the network information (network name and network password) of the network to be connected to the smart device in the network information input area, the terminal device can send the network information of the network to be connected to the smart device.
[0119] As an example, the device adding interface also includes a confirmation control. After the user enters the network information of the network to be connected to the smart device in the network information input area, the user can click the confirmation control. The terminal device responds to the user's operation and sends the network information of the network to be connected to the smart device.
[0120] To facilitate successful smart device registration, the terminal device can also send user information to the smart device. This user information can include a user ID. When a user first uses a device application or adds a device, they must register an account. After registering an account, the user will have a user ID. All devices added by the user are associated with the user's user ID. For example, all devices added by the user on the device display are associated with the user's user ID.
[0121] After receiving the network information and 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 may initiate a 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 thus use network services through the network.
[0123] In an embodiment of the present application, after the smart device is connected to a network, it can send a registration request to the server through the network, where the registration request includes the device information of the smart device, the network information of the currently connected network (i.e., the network information of the network to be connected), and user information. The device information of the smart device includes the device name and device identifier of the smart device. The device identifier refers to the unique identification code of the device. For example, the device identifier can be the SN code of the device.
[0124] After receiving the registration request from the smart device, the server responds to the registration request by adding the smart device to the user information and associating the device information with the user information to complete the registration of the smart device. At the same time, the server also associates and stores the network information of the network currently connected to the smart device and the device ID of the smart device.
[0125] In some examples, the registration request sent by the smart device to the server via the network may also include device information and user information of the smart device. After completing the registration on the server side through the registration request, the smart device sends the server the currently connected network information, so that the server associates and stores the currently connected network information with the device identifier of the smart device.
[0126] When the terminal device obtains the information that the smart device has been added and registered from the server, a prompt message can be provided to the user indicating that the smart device has been successfully added. Optionally, the terminal device queries the server to obtain the information that the smart device has been added and registered, or the server sends the information that the smart device has been added and registered to the terminal device after completing the registration of the smart device.
[0127] It is understandable 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 this 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 receiving network information and user information from the terminal device, the smart device sends the device information to the terminal device.
[0129] After receiving the device information of the smart device, the terminal device sends a registration request to the server. 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 receiving the registration request from the terminal device, the server responds to the registration request by adding the smart device to the user information, associating the device information with the user information to complete the registration of the smart device, and storing the network information and device identifier in an associated manner. When the terminal device receives the information from the server that the smart device has been added and registered, it can prompt the user with a prompt indicating that the smart device has been successfully added.
[0130] In order to facilitate the provision of exception prompts for smart devices when they are offline, i.e., when they cannot connect to the network through the gateway, in an embodiment of the present application, exception prompts can be set for smart devices during the network configuration and registration process. Please refer to Figure 5, which is an interactive diagram of adding smart devices provided in an embodiment of the present application. The method shown in Figure 5 can be applied to the Internet of Things system shown in Figure 3. As shown in Figure 5, the process of adding a device may include steps S201 to S205.
[0131] S201, the terminal device receives the user's device adding operation and displays the device adding interface, which includes a device reminder control and a network information input area.
[0132] After receiving the user's device adding operation, the terminal device responds to the device adding operation and displays the device adding interface to the user. The specific process is referred to the above process and will not be described in detail here.
[0133] In an embodiment of the present application, as shown in FIG6 , the device adding interface includes a device reminder control, a device name of the smart device, and a network information input area.
[0134] The device reminder control refers to a selection control for whether a reminder is required when the smart device is offline.
[0135] The device reminder control allows users to select whether to receive notifications about device connection anomalies when their smart device is offline. If you want to be notified when your smart device is offline, select the device reminder control. If you do not want to be notified when your smart device is offline, leave it unchecked.
[0136] S202: The terminal device sends reminder function setting information and network information of the network to be connected to the smart device.
[0137] As an example, as shown in (a) in Figure 7, the device adding interface also includes a confirmation control. After the user enters the network information of the network to which the smart device is to be connected in the network information input area and selects the device reminder control, the user can click the confirmation control, and the terminal device responds to the user's operation and sends the network information and reminder function setting information to the smart device.
[0138] As an example, as shown in (b) of Figure 7, the device reminder control includes a device offline reminder control and a device offline non-reminder control. When the user needs to remind the smart device when it is offline, the device offline reminder control can be selected. When the user does not need to remind the smart device when it is offline, the device offline non-reminder control can be selected. After the user enters the network information of the network to which the smart device is to connect in the network information input area and selects between the device offline reminder control and the device offline non-reminder control, the terminal device can send the network information and reminder function setting information to the smart device.
[0139] The reminder function setting information refers to information obtained from the device reminder control. When the user selects the device reminder control or the device offline reminder control, the reminder function setting information includes information for prompting device connection anomalies when the smart device is offline. When the user deselects the device reminder control or selects the device offline no reminder control, the reminder function setting information includes information for not prompting device connection anomalies when the smart device is offline.
[0140] As an example, the reminder function setting information includes a reminder field, which uses different field values to indicate whether to issue a device network abnormality prompt. For example, when the smart device is offline and a device network abnormality prompt is required, the field value is 1; when the smart device is offline and a device network abnormality prompt is not required, the field value is 0.
[0141] It is understandable that in order to facilitate successful registration of the smart device, the terminal device will also send user information to the smart device when sending reminder function setting information and network information to the smart device.
[0142] 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, network information and user information, the smart device can connect to the network to be connected through the network information, that is, initiate a network connection to the gateway through the network information to connect to the network to be connected through the gateway.
[0144] After 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, 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.
[0145] S204, the server responds to the registration request of the smart device, registers the device, and stores the association between the reminder function setting information of the smart device and the device identification of the smart device, and stores the association between the network information of the network to be connected and the device identification of the smart device.
[0146] After receiving a registration request from a smart device, the server responds to the registration request by adding the smart device to the user's information and associating the device information with the user's information to complete the registration of the smart device. Accordingly, the server also stores the association between the smart device's reminder function settings and its device identifier, and the association between the network information of the network to be connected and its device identifier. Furthermore, the server checks the network status of the added smart device, specifically whether it is offline.
[0147] As shown in Figure 8, the registration request sent by the smart device to the server contains the device name as Device1, the device identifier as SN1, the user information as userid, the network name as Wi-Fi SSID, the network password as Wi-Fi Password, and the reminder function setting information as isNotify = 1 (indicating that when in offline state, a device network abnormality reminder is required). After receiving the registration request from the smart 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 smart device with the device name as device1 and the device identifier as SN1 under the user information userid. The server associates the reminder function setting information isNotify = 1 of the smart device with SN1, and associates the network name as Wi-Fi SSID and the network password as Wi-Fi Password with SN1, and then detects the network status of the smart device. It can be understood that the smart device named Device2 with the device identifier as SN2 in Figure 8 is the smart device previously associated with the user information userid.
[0148] In some embodiments, the smart device can also send reminder function setting information and network information of the network to be connected to the server after completing the addition registration on the server side, so that the server can store the association between the reminder function setting information of the smart device and the device identification of the smart device, as well as the association between the network information of the network to be connected and the device identification of the smart device.
[0149] It can be understood that when the smart device is connected to the network to be connected, the network to be connected is the network to which the smart device is currently connected.
[0150] S205: The terminal device prompts the user with a prompt message indicating that the smart device has been successfully added.
[0151] When the terminal device obtains information from the server that the smart device has been added and registered, it can prompt the user that the smart device has been successfully added, and can display the smart device on the device display interface.
[0152] As an example, the terminal device can also send a registration request for the smart device to the server. For example, after receiving the network information of the network to be connected from the terminal device, the smart device detects whether it can successfully connect to the network based on the network information. If the smart device can successfully connect to the network based on the network information, it sends a connection feedback to the terminal device.
[0153] The connection feedback includes the 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 the device information of the smart device, the network information of the network to be connected, the reminder function setting information, and the user information. After receiving the registration request sent by the terminal device, the server responds to the registration request and adds the smart device to the user information, and associates the device information of the smart device with the user information to realize the addition and registration of the smart device. Correspondingly, the server will also store the association relationship between the reminder function setting information of the smart device and the device identification of the smart device, as well as the association relationship between the network information of the network to be connected and the device identification 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. For example, after the terminal device sends the network information and user information of the network to be connected to the smart device, the smart device can connect to the network to be connected through the network information. After 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 the device information and user information of the smart device. After the terminal device obtains the information that the smart device has been added and registered from the server, it 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 can store the association between the reminder function setting information of the smart device and the device identification of the smart device, and the association between the network information of the network to be connected and the device identification of the smart device.
[0155] It can be understood that the above is only an example of adding smart devices to the embodiments of the present application and is not intended to be a specific limitation. In some embodiments, there may be other implementation methods, which can be set according to actual needs.
[0156] In an embodiment of the present application, the server will detect the network status of each added smart device. When it is detected that the smart device is offline, that is, the smart device cannot connect to the network, it will determine whether to issue a device network abnormality prompt to the smart device based on the reminder function setting information corresponding to the smart device.
[0157] In order to enable the user to locate whether the abnormality occurs in the smart device connection or the network, in an embodiment of the present application, when the server detects that the smart device is in an offline state, it will detect whether one or more target devices with the same user information and network information as the smart device are in an online state. If one or more target devices are all offline, network abnormality information is sent to the terminal device. If at least one of the one or more target devices is online, device abnormality information for the smart device is sent to the terminal device.
[0158] The target device refers to another smart device that is associated with the smart device that is currently offline and has the same user information and network information.
[0159] In the embodiment of the present application, when the server sends device abnormality information for a smart device to a terminal device, it detects the reminder function setting information of the smart device. If the reminder function setting information corresponding to the smart device indicates that the device is in an offline state, a device network abnormality prompt is issued. The server then sends the device abnormality information for the smart device to the terminal device. It is understood that if the reminder function setting information corresponding to the smart device indicates that the device is in an offline state, no device network abnormality prompt is issued, and the server does not need to send the device abnormality information for the smart device to the terminal device.
[0160] For example, let's use device A as an example. The user information associated with device A is set to userID, and the network name of the network information is set to wifi ssID. When the server detects that device A is offline, it checks whether other smart devices associated with the userID and wifi ssID are online. If all other smart devices associated with the userID and wifi ssID are offline, the server sends a network anomaly message to the terminal device. If any of the other smart devices associated with the userID and wifi ssID are online, the server checks the reminder function settings corresponding to device A. If the reminder function settings corresponding to device A indicate a device connection anomaly when offline, the server sends a device anomaly message for device A to the terminal device. If the reminder function settings corresponding to device A indicate no device connection anomaly when offline, the server does not send a device anomaly message for device A to the terminal device. As shown in Figure 9 (a), the server detects that other smart devices associated with the userID and wifi ssID include device B and smart device C. Devices B and C are also offline, and the server sends a network anomaly message to the terminal device. As shown in Figure 9 (b), the server detects that devices B and C are online, and the isNotify field value of device A's reminder function setting information is 1, indicating that when in an offline state, a device network abnormality notification is required. Therefore, the server sends a device abnormality message to the terminal device for device A. As shown in Figure 9 (c), the server detects that devices B and C are online, and the reminder function setting information of device A is 0, indicating that when in an offline state, a device network abnormality notification is not required. Therefore, the server does not send a device abnormality message to the terminal device for device A.
[0161] For example, when the server detects that one or more target devices with the same user information and network information as the smart device are offline, it checks whether the offline time of one or more target devices is within the same time range as the smart device. If so, it sends a network anomaly message to the terminal device, thereby improving detection accuracy.
[0162] In the embodiment of the present application, when the terminal device receives network abnormality information from the server, it prompts the user of the network abnormality. Correspondingly, when the terminal device receives device abnormality information from the server for the smart device, it prompts the user of the device network abnormality.
[0163] In an embodiment of the present application, the terminal device can provide the user with a network anomaly prompt or a device connection anomaly prompt through voice, pop-up windows, etc. The following is an example of a pop-up prompt. As shown in (a) in Figure 10, after the terminal device receives the network anomaly information from the server, the device application pops up a network anomaly prompt "Detected an anomaly in the network wifi ssID, click to confirm". As shown in (b) in Figure 10, after the terminal device receives the device anomaly information from the server for device A, the device application pops up a device connection anomaly prompt "Detected that device A is offline, click to view".
[0164] By setting an abnormality prompt for the smart device, the embodiment of the present application can promptly notify the smart device of an abnormality when the smart device is offline. In addition, by analyzing the abnormality scenario based on the network information corresponding to the smart device and user information when the smart device is offline, the embodiment of the present application can accurately remind the user whether it is a smart device connection abnormality or a network abnormality, thereby facilitating user operation and improving the user experience.
[0165] It is understandable that when the user receives a device connection anomaly prompt, the user can detect the abnormal smart device to connect the offline smart device to the network. When the user receives a network anomaly prompt, the user can restore the network by changing the network or other means.
[0166] Please refer to Figure 11, which is a schematic diagram of the abnormality prompt process of an embodiment of the present application. As shown in Figure 11, taking device a as an example, when the server detects that device a is offline, it checks whether other smart devices with the same user information and network information are offline. If there are any online devices among the other smart devices, the server checks whether the reminder function setting information of device a indicates that the device is offline and issues a device network abnormality prompt. If the device network abnormality prompt is not issued when the device is offline, no action is taken. If the device network abnormality prompt is issued when the device is offline, the device abnormality information is sent to the terminal device, and the terminal device issues a device network abnormality prompt to the user. If all other devices are offline, the network abnormality is determined to be a network abnormality, and the network abnormality information is sent to the terminal device. The terminal device issues a network abnormality prompt to the user. The terminal device responds to the user's operation on the network abnormality prompt and asks the user whether to change the network. If the user needs to change the network, the device network is changed. If not, the user is prompted to repair the network.
[0167] Considering that after the user changes the network, the smart device needs to be reset and re-configured before it can access the new network environment, the process is relatively complicated. In order to simplify the process, in the embodiment of the present application, the network change of the smart device is achieved through the interaction between the terminal device and the smart device.
[0168] The following example illustrates the switching of a smart device from the second network to the first network. The second network refers to the historical network to which the smart device was connected, and the first network refers to the new network to which the smart device is to connect, i.e., the new network to which it is to be switched. Please refer to Figure 12, which is one of the interactive diagrams of the network switching method provided in an embodiment of the present application. The method shown in Figure 12 can be applied to the IoT system shown in Figure 3. As shown in Figure 12, the network switching method provided in an embodiment of the present application includes steps S301 to S305.
[0169] S301: When the smart device cannot be connected to the first network through the gateway, the terminal device communicates 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, if a user replaces the gateway in the smart device's environment, the network in the smart device's environment will also change, making it impossible for the smart device to connect to the new network through the gateway. For example, the gateway corresponding to the second network is Gateway A, and the gateway corresponding to the first network is Gateway B. The user first uses Gateway A to provide the second network, and the network in the smart device's environment is the second network. The smart device first connects to the second network through Gateway A. If Gateway A fails, the smart device will no longer be able to connect to the second network through Gateway A. The user replaces Gateway A with Gateway B, and the network in the smart device's environment is now changed to the first network provided by Gateway B.
[0172] As an example, if a user changes the network information of a network, the network in the smart device's environment will also change, and the smart device will be unable to connect to the new network through the gateway. For example, the gateway in the smart device's environment is Gateway A, and the network information of the second network provided by Gateway A is X1. The smart device accesses the second network through network information X1. If the user changes the network information of the network provided by Gateway A to X2, the network provided by Gateway A will change from the second network to the first network, and the network information of the first network will be X2.
[0173] It can be understood that the above is only an example of the network change scenario in the embodiment of the present application. The network change scenario is not limited to the examples given in the embodiment of the present application. For example, when the user changes the network operator, it will also cause the network in the environment of the smart device to change. The embodiment of the present application does not impose specific restrictions.
[0174] In an embodiment of the present application, after a smart device is registered for network configuration, the network information of the configured network is stored in the smart device. When the smart device is offline, i.e., not connected to the configured network, it will continue to attempt to connect to the configured network based on the stored network information. When the user changes the network in the smart device's environment to a first network, the smart device is not configured for the first network and does not have the network information of the first network. Consequently, the smart device cannot connect to the first network through the gateway. In other words, the smart device cannot initiate a connection to the gateway using the network information of the first network to access the first network.
[0175] Therefore, in the embodiment 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 where it cannot access the first network through the gateway, that is, the smart device is in an offline state.
[0176] It is understandable that for the terminal device, since the terminal device has a high configuration capability, after the network in the environment is changed to the first network, the terminal device can also find the first network and can connect to the first network.
[0177] In an embodiment of the present application, when the smart device cannot connect to the first network through the gateway, in order to connect the smart device to the network, the terminal device can initiate a network change for the smart device.
[0178] For example, the terminal device may receive a network change operation from the user and initiate a network change for the smart device according to the network change operation.
[0179] As an example, a terminal device receives a user's network change operation in response to a network anomaly prompt. For example, after the terminal device prompts the user with a network anomaly, the user performs an operation on the prompt, sending a network change operation to the terminal device, which then receives the network change operation. As shown in Figure 13, after the terminal device displays a network anomaly prompt via a device application stating "An anomaly has been detected in the network Wi-Fi SSID. Click to confirm," the user clicks on the prompt. The terminal device then responds to the user's operation by displaying a network anomaly prompt box on the device application's device display interface. The prompt box includes a network anomaly prompt, a change control, and a close control. The network anomaly prompt informs the user that the network Wi-Fi SSID is anomaly and asks whether to update the network information of the smart devices on that network. If the user does not want to update the network information of the smart devices on that network, they click the close control. The terminal device responds to the user's operation and closes the prompt box. If the user does want to update the network information of the smart devices on that network, they click the change control. The terminal device then receives the user's network change operation in response to the network anomaly prompt and changes the network information of all smart devices on that network.
[0180] As an example, a terminal device can also receive a user-initiated network change operation for a smart device based on a device network anomaly prompt. For example, after the terminal device prompts the user about a device network anomaly, the user clicks on the prompt. The terminal device can respond to the user's action by displaying a device display interface to the user through the device application. The device display interface includes the smart device with the network anomaly. The user can then operate the smart device with the network anomaly to initiate a network change operation for the terminal device. As shown in Figure 14, after the terminal device displays a device network anomaly prompt via the device application stating "Device A is offline, click to view," the user clicks on the prompt. The terminal device can respond to the user's action by displaying a device display interface to the user. The device display interface includes the user's added smart devices, including device A. When the user needs to change the network connected to device A, they perform an operation on device A on the device display interface (such as long-pressing device A or clicking device A, etc.). The terminal device responds to the user's action and displays an operation prompt box for device A. The operation prompt box includes an operation prompt for changing the network. When the user selects the operation prompt, the terminal device responds to the user's selection operation and initiates the network change of device A.
[0181] As an example, the user can also actively initiate a network change operation for a single smart device. As shown in Figure 15, the terminal device displays the device display interface to the user through the device application, and the device display interface includes the smart devices that the user has added. When the user needs to change the network connected to 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 and displays the operation prompt box of device 5 to the user. Among them, the operation prompt box includes an operation prompt for changing the network. When the user selects the operation prompt, the terminal device responds to the user's selection operation and initiates the network change of device 5.
[0182] As an example, a user can also proactively initiate a network change operation for multiple smart devices. As shown in Figure 16, the terminal device displays a device display interface to the user through the device application. The device display interface includes function controls. The user clicks on the function controls, and the terminal device responds to the user's operation by displaying a function prompt box to the user. The function prompt box includes a one-click change function prompt. When the user selects the function prompt, the terminal device responds to the user's operation and initiates a network change for multiple smart devices. For example, a network change is initiated for all smart devices on the device display interface.
[0183] It is understandable that the above is only an example of the terminal device receiving the user's network change operation and initiating the network change of the smart device in the embodiment of the present application, and is not intended to be a specific limitation. In some embodiments, other implementations can be implemented, and the specific implementation can be set according to actual needs.
[0184] As an example, the terminal device can also proactively detect the network status of the network to which the smart device is connected, and proactively initiate a network change for the smart device upon detecting that the network to which the smart device is connected is offline. The present embodiment of the application does not impose any specific restrictions on the process by which the terminal device initiates a network change for the smart device, and can be configured based on actual circumstances.
[0185] In an embodiment of the present application, after receiving the user's network change operation, the terminal device initiates a network change for the smart device according to the network change 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 an embodiment of the present application, 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.
[0187] The first communication type and the second communication type may be the same, or may be different.
[0188] As an example, the first communication type is a WiFi communication type, and the second communication type may be, but is not limited to, one of a Bluetooth communication type, a near field communication (NFC) type, and a WiFi communication type.
[0189] If a smart device uses WiFi communication and cannot connect to the network provided by the gateway, the terminal device can establish a communication connection with the smart device via Bluetooth, near-field communication, or WiFi. This allows the terminal device to successfully establish a communication connection with the smart device by selecting a communication type that is most convenient for the smart device, further improving the convenience of network switching.
[0190] It can be understood that when a network abnormality occurs and multiple smart devices cannot connect to the first network through the gateway using the first communication type, the terminal device can establish communication connections with multiple smart devices, and the communication types of the communication connections established between the terminal device and multiple smart devices can be the same or different.
[0191] Exemplarily, when 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 the first smart device among the multiple smart devices through the second communication type, and the terminal device establishes a communication connection with the second smart device among the multiple smart devices through the third communication type.
[0192] The third communication type may 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 the third communication type, or the second communication type is different from the third communication type. The first smart device is any one of a 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 via Bluetooth, and the terminal device can establish a communication connection with the second smart device via near field communication (NFC).
[0195] In the embodiment of the present application, since the smart device can access the network using the WiFi communication type, that is, the smart device at least supports the WiFi communication type, the terminal device can at least establish a communication connection with the smart device through the WiFi communication type.
[0196] It can be understood that the first smart device and the second smart device are merely examples of the embodiments of the present application and do not serve as a limitation to multiple smart devices. In some examples, multiple smart devices may also include a third smart device and a fourth smart device, and the terminal device uses the same or different communication types to establish a communication connection with the third smart device and the fourth smart device.
[0197] S302, the terminal device sends a network change instruction to the smart device through a 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.
[0198] In an embodiment of the present application, after the terminal device establishes a communication connection with the smart device, the terminal device can send a network change instruction including network information of the first network to the smart device through the communication connection, so that the smart device changes the connected network from the second network to the first network.
[0199] As an example, the user may specify, through the terminal device, the first network to which the smart device is to connect.
[0200] Exemplarily, the terminal device prompts the user with one or more candidate networks, receives a confirmation operation of the user on the one or more candidate networks, and obtains the first network and network information of the first network.
[0201] A candidate network refers to a network that the smart device can currently connect to. For example, the terminal device can search for networks in the smart device's environment and identify the searched networks as candidate networks. For example, the terminal device can also identify previously connected and saved networks as candidate networks.
[0202] For example, the terminal device prompts the user with one or more candidate networks through voice or interface display. After prompting the user with one or more candidate networks, the user can then determine the first network to which the smart device is to connect from the one or more candidate networks. The terminal device obtains the first network upon receiving the user's confirmation operation.
[0203] For example, an interface display prompting a user with one or more candidate networks is used. As shown in FIG17 , the terminal device displays a candidate network interface to the user. The candidate network interface includes one or more candidate networks (such as Network 1, Network 2, and Network 3 in FIG17 ). The user selects a candidate network in the candidate network interface, such as by clicking, to select a first network from the candidate networks. The terminal device responds to the user's selection of one or more candidate networks on the candidate network interface and obtains the first network.
[0204] It is 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 a network change instruction to the smart device via the communication connection. If the terminal device does not store the network information of the first network, such as the network password of the first network, the terminal device, after receiving the user's selection of the first network from one or more candidate networks, displays a network information input interface to the user, and the user can enter the network information of the first network on the network information input interface. After receiving the network information of the first network entered by the user, the terminal device sends a network change instruction to the smart device via the communication connection.
[0205] As an example, a user can also input the network information of the first network to which the smart device is to connect through a terminal device. For example, after establishing a communication connection with the smart device, the terminal device can provide the user with a network input interface, where the user can directly input the network information of the first network to which the smart device is to connect. The terminal device receives the network information of the first network input by the user and sends a network change instruction to the smart device via the communication connection.
[0206] The embodiment of the present application prompts the user with candidate networks, making it easier for the user to specify the network to which the smart device is to connect, thereby improving 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 establishing a communication connection with the smart device, the terminal device can also determine the currently connected network as the first network, and then send a network change instruction to the smart device through the communication connection.
[0208] It is understandable that the above is only an example of the first network in the embodiment of the present application and is not intended to be a specific limitation. In some embodiments, other implementations may be provided according to actual needs.
[0209] S303: The smart device receives a network change instruction from the terminal device through a communication connection, and changes the connected second network to the first network according to the network information of the first network.
[0210] Among them, after receiving the network change instruction sent by the terminal device, the smart device can respond to the network change instruction, and initiate a connection to the gateway to access the first network according to the network information of the first network in the network change instruction, thereby replacing the connected second network with the first network.
[0211] It is understandable that after the smart device is connected to the first network, the smart device is in an online state, and the smart device can exchange information with other devices through the first network. For example, the smart device can exchange information with a 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 network information of the first network and a device identifier of the smart device. The device replacement information is 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.
[0213] In order to enable the server to update the network status of the smart device in a timely manner, in an embodiment of the present application, after the smart device changes the network to the first network, the smart device sends device change information to the server through the first network. The device change information includes the network information of the first network and the device identification of the smart device.
[0214] In an embodiment of the present application, the smart device sends device replacement information to the server through the first network, and can indicate to the server through the device replacement information that the smart device has changed the network to the first network and has restored the online status, and can instruct the server through the device replacement information to associate the device identification of the smart device with the network information of the first network and store it.
[0215] S305: The server receives the device replacement information sent by the smart device, stores the association between the device identification of the smart device and the network information of the first network, and sends the network status of the smart device to the terminal device.
[0216] Among them, after receiving the device replacement information sent by the smart device, the server stores the association 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 replacement of the network of the smart device, so that the terminal device can obtain the network information of the smart device.
[0217] As an example, after receiving the device replacement information sent by the smart device, the server queries and obtains the network information of the historical network (such as the second network) associated with the smart device based on the device identification of the smart device in the device replacement information. After finding the network information of the historical network associated with the smart device, the server replaces the network information of the historical network based on the network information of the first network, that is, updates the network information of the historical network associated with the smart device to the network information of the first network, thereby storing the association between the device identification of the smart device and the network information of the first network.
[0218] In the embodiment of the present application, after receiving the device change information sent by the smart device, the server can obtain the information that the smart device has resumed online and can exchange information. Therefore, after receiving the device change information sent by the smart device, the server can update the network status of the smart device to the online state.
[0219] As an example, after the smart device changes the second network it is connected to to the first network, the smart device sends connection feedback to the terminal device. After receiving the connection feedback sent by the smart device, the terminal device sends device change information of the smart device to the server, so that the server stores the association between the device identification of the smart device and the network information of the first network, and updates the network status of the smart device to an online status.
[0220] In order to inform the user in time that the smart device has recovered the network status, the server may send the network status of the smart device to the terminal device after updating the network status of the smart device to the online status.
[0221] In an embodiment of the present application, after receiving the network status of the smart device from the server, the terminal device can prompt the user of the network status of the smart device to indicate to the user that the smart device has returned to an online state and the network change has been completed. As an example, the terminal device updates the network status of the smart device to an online state on the device display interface to indicate to the user that the smart device has returned to an online state. As an example, the terminal device can also indicate to the user that the smart device has returned to an online state through a voice prompt.
[0222] As an example, the terminal device can also actively obtain the network status of the smart device from the server. For example, the terminal device monitors the network status changes of the smart device in the server, and obtains the network status of the smart device from the server after monitoring the change in the network status of the smart device.
[0223] The embodiment of the present application 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 each other through the communication connection to complete the replacement of the network of the smart device. There is no need to reset the smart device or re-configure the network for the smart device, which greatly simplifies the network replacement process, saves time and improves efficiency.
[0224] To improve the reliability of data transmission, in an embodiment of the present application, after the terminal device and the smart device establish a communication connection, a data transmission reliability check can be performed between the terminal device and the smart device. After the check is successful, the terminal device sends a network change instruction to the smart device. Please refer to Figure 18, which is a second interactive diagram of the network change method provided in an embodiment of the present application. The method shown in Figure 18 can be applied to the Internet of Things system shown in Figure 3. As shown in Figure 18, the network change method provided in an embodiment of the present application includes steps S401 to S407.
[0225] S401: When the smart device cannot be connected to the first network through the gateway, the terminal device establishes a communication connection with the smart device.
[0226] The process of step S401 refers to step S301 and is not described in detail here.
[0227] S402: The terminal device sends verification information to the smart device. The verification information includes network information of the second network to which the smart device is connected and a device identifier of the smart device.
[0228] The network information of the second network to which the smart device is connected and the device identification of the smart device can be obtained from the server. For example, after initiating a network change 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 identification of the smart device. After receiving the network information request from the terminal device, the server responds to the network information request and sends the network information of the second network to which the smart device is connected and the device identification of the smart device to the terminal device.
[0229] As an example, the terminal device can also store the network information to which the smart device is connected and the device identification of the smart device. For example, after completing the registration of the smart device or completing the network change, the terminal device stores the network information and device identification to which the smart device is connected. After the terminal device initiates the network change for the smart device, the network information and device identification of the second network to which the smart device is connected 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 identification of the smart device, the terminal device sends 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 identification 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 device identification in the verification information are consistent with the network information and device identification stored in the smart device.
[0232] After receiving the verification information sent by the terminal device, the smart device compares the network information in the verification information with its own stored network information, specifically comparing the network information in the verification information with the network information to which it is currently connected, and comparing the device identifier in the verification information with its own device identifier. If the network information in the verification information matches the network information to which it is currently connected, and the device identifier in the verification information matches its own device identifier, the smart device sends feedback to the terminal device, indicating that the terminal device information is correct and that the network can be changed.
[0233] If the network information in the verification information is inconsistent with the network information to which the device is currently connected, and / or the device identification in the verification information is inconsistent with the device identification of the device itself, there is no need to send feedback information to the terminal device.
[0234] In the embodiment of the present application, if there are multiple smart devices, the terminal device will send verification information to each smart device. Each smart device will only send feedback information to the terminal device after receiving verification information that is consistent with its own network information and device identification.
[0235] S404: After receiving feedback information from the smart device indicating that verification of the verification information has passed, the terminal device sends a network change instruction to the smart device through a communication connection.
[0236] Among them, after the terminal device receives the feedback information that the smart device has passed the verification of the verification information, it can obtain a result indicating that the smart device is capable of network change. Therefore, after receiving the feedback information from the smart device, the terminal device can send a network change instruction to the smart device through the communication connection.
[0237] It can be understood that the process of sending the network change instruction to the smart device through the communication connection refers to step S302 and is not described in detail here.
[0238] S405: The smart device receives a network change instruction from the terminal device through a communication connection, and changes 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 network information of the first network and a device identifier of the smart device. The device replacement information is 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.
[0240] S407: The server receives the device replacement information sent by the smart device, stores the association between the device identification of the smart device and the network information of the first network, and sends the network status of the smart device to the terminal device.
[0241] The process of step S405 to step S407 refers to step S303 to step S305 and will not be described in detail here.
[0242] For ease of understanding, an example will be given below with reference to Figure 19. Figure 19 is a schematic diagram of the network replacement scenario provided in an embodiment of the present application. As shown in Figure 19, the terminal device first obtains the network information and device identification of the second network to which the smart device is connected from the cloud server, and the cloud server feeds back the network information and device identification of the second network to which the smart device is connected to the terminal device. The terminal device performs a reliability check with the smart device based on the network information and device identification of the second network to which the smart device is connected 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 changes the network according to the network replacement instruction, it sends device replacement information to the cloud server to end the replacement process.
[0243] The embodiment of the present application can improve the reliability of data transmission by performing a reliability check between the terminal device and the smart device after the terminal device and the smart device establish a communication connection.
[0244] Taking into account the different communication capabilities supported by different smart devices, for example, some smart devices support Bluetooth communication types, 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 an embodiment of the present application, the type of communication for establishing a communication connection with the smart device can be determined based on the communication capabilities supported by the smart device. Please refer to Figure 20, which is the third interactive schematic diagram of the network replacement method provided in an embodiment of the present application. The method shown in Figure 20 can be applied to the Internet of Things system shown in Figure 3. As shown in Figure 20, the network replacement method provided in an 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 types supported by the smart device can be obtained from the configuration information of the smart device. For example, if the smart device is configured with a Bluetooth module, the smart device supports Bluetooth communication. For another example, if the smart device is configured with a near field communication (NFC) module, the smart device supports near field communication (NFC) communication.
[0247] As an example, the configuration information of the smart device is stored on a server, and the terminal device obtains the communication types supported by the smart device from the server. Optionally, the configuration information stored on the server is actively uploaded by the smart device. For example, after completing the registration, the smart device sends its own configuration information to the server, that is, the communication types supported by the smart device. In some embodiments, the configuration information stored on the server is uploaded by an administrator.
[0248] For example, a terminal device receives a user's network change operation and initiates a query request to a server for the communication types supported by the smart device. The server receives the query request from the terminal device, reads the configuration information of the smart device, obtains the communication types supported by the smart device, and sends the communication types supported by the smart device to the terminal device.
[0249] The process of the terminal device receiving the user's network change operation can refer to step S301, which will not be described in detail here.
[0250] After receiving the user's network change request, the terminal device sends a query request to the server, requesting the communication types supported by the smart device. Upon receiving the query request, the server responds by reading the smart device's configuration information, obtaining the supported communication types, and then providing feedback 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 can obtain the communication type supported by the smart device from the local storage. For example, the terminal device receives the user's network change operation and obtains the communication type supported by the smart device from the locally stored configuration information of the smart device. The specific configuration is based on actual needs and is not limited in the embodiments of this application.
[0252] S502: The terminal device obtains a target communication type for establishing a communication connection with the smart device according to the communication types supported by the smart device.
[0253] As an example, after obtaining the communication types supported by the smart device, the terminal device may determine any one of the communication types supported by the smart device as the target communication type. For example, if the communication types supported by the smart device include Bluetooth communication type, Near Field Communication (NFC) type, and WiFi communication type, then any one of the Bluetooth communication type, Near Field Communication (NFC) type, and WiFi communication type may be determined as the target communication type.
[0254] To ensure a successful communication connection between the terminal device and the smart device, the target communication type is, for example, one of the communication types supported by both the terminal device and the smart device. 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 select one of the commonly supported communication types as the target communication type. In this way, establishing a communication connection based on the communication types supported by both the terminal device and the smart device can improve the success rate of establishing the communication connection.
[0255] For example, the communication types supported by the smart device include Bluetooth communication type and WiFi communication type, and the communication types supported by the terminal device include Bluetooth communication type, near field communication (NFC) type, and WiFi communication type. The terminal device matches the communication types supported by the smart device with the communication types supported by itself, and the communication types supported by the terminal device and the smart device include Bluetooth communication type and WiFi communication type. The terminal device can then determine any one of the Bluetooth communication type and the WiFi communication type as the target communication type.
[0256] To further improve the convenience of network switching, in an embodiment of the present application, communication types are prioritized based on their operational convenience. 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 operational 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 operational convenience priority, the convenience of network switching can be further improved, the network switching process can be simplified, time can be saved, and efficiency can be improved.
[0257] For example, the communication types commonly supported by the terminal device and the smart device include Bluetooth communication type and WiFi communication type, wherein the priority of Bluetooth communication type is higher than that of WiFi communication type, and the target communication type is Bluetooth communication type.
[0258] As an example, the priority of the 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] Taking into account that users have preferences for communication types, in some examples, the terminal device can also prompt recommended information to the user based on the priority of the communication types supported by both the terminal device and the smart device. The recommended information is used to recommend to the user the communication type for establishing a communication connection between the terminal device and the smart device.
[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 the terminal device 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 recommended information based on 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 recommended information through voice or interface display.
[0262] Taking the example of an interface display prompting a user with recommended information, 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 based on the priority of the communication types supported by both the terminal device and the smart device. The communication type recommendation interface includes the recommended communication types, where the recommended communication type is the communication type with the highest priority among the commonly supported communication types. As shown in (a) of Figure 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 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 may 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) in Figure 21, assuming that the communication types commonly supported by the terminal device and the smart device include Bluetooth communication type and WiFi communication type, where the priority of Bluetooth communication type is higher than that of WiFi communication type, the terminal device may display the recommendation information "It is recommended to use Bluetooth connection. When Bluetooth connection is not available, it is recommended to use WiFi connection" in the communication type recommendation interface. Or as shown in (c) in Figure 21, the terminal device may display the recommendation information "Bluetooth connection is recommended first, and WiFi connection is recommended secondly" 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 impose specific restrictions.
[0264] After the user is prompted with the recommended information, the user can then input the target communication type for establishing a communication connection between the terminal device and the smart device based on the recommended information. The terminal device responds to the user's input operation for the communication type in the recommended information and obtains the target communication type for establishing a communication connection with the smart device. It is understood that the target communication type is the communication type input by the user. The target communication type includes a first communication type, a second communication type, and a third communication type, and can be any one of the first, second, and third communication types.
[0265] As an example, a user can input a target communication type through voice or interface input. For example, the interface display prompts the user with recommended information. As shown in FIG22 , the communication type recommendation interface can also include a selection control for the recommended communication type. The user can select the target communication type through the selection control, and the terminal device responds to the user's operation to obtain the target communication type.
[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 a communication connection with the smart device, the terminal device can establish a communication connection of the first communication type with the smart device.
[0268] For example, when the target communication type is near field communication (NFC), the terminal device establishes near field communication with the smart device. When the target communication type is Bluetooth, the terminal device establishes Bluetooth communication with the smart device. When the target communication type is WiFi, the terminal device establishes WiFi communication with the smart device.
[0269] S504: The terminal device sends a network change instruction to the smart device through a communication connection.
[0270] After the terminal device establishes a communication connection of the target communication type with the smart device, the terminal device may send a network change instruction to the smart device through the communication connection.
[0271] To improve data transmission reliability, after the terminal device and the smart device establish a communication connection of the target communication type, the terminal device may also send verification information to the smart device. 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 device identification in the verification information match the network information and device identification stored by the smart device. After receiving feedback information indicating that the verification information has been verified by the smart device, the terminal device sends a network change instruction to the smart device via the communication connection. For details, please refer to steps S402 to S404, and the details are not repeated here.
[0272] S505: The smart device receives a network change instruction from the terminal device through a communication connection, and changes 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 via the first network. The device replacement information includes network information of the first network and a device identifier of the smart device. The device replacement information is 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.
[0274] S507: The server receives the device replacement information sent by the smart device, stores the association between the device identification of the smart device and the network information of the first network, and sends the network status of the smart device to the terminal device.
[0275] The process of step S504 to step S507 refers to step S302 to step S305 and will not be described in detail here.
[0276] In the embodiment of the present application, the terminal device establishes a communication connection with the smart device based on the communication type supported by the smart device, which can improve the success rate of establishing the communication connection. By selecting the communication type with the highest priority to establish a communication connection with the smart device, the convenience of user operation can be further improved, which can enhance the user experience.
[0277] To further enhance user convenience, in an embodiment of the present application, after obtaining the target communication type for establishing a communication connection with a smart device, the terminal device may provide the user with an operation guide based on the target communication type, so that the user can operate the terminal device and the smart device according to the operation guide to establish a communication connection between the terminal device and the smart device. Please refer to FIG23 , which is a fourth interactive diagram of the network replacement method provided in an embodiment of the present application. The method shown in FIG23 can be applied to the Internet of Things system shown in FIG3 . As shown in FIG23 , the network replacement method provided in an embodiment of the present application includes steps S601 to S607.
[0278] S601: The terminal device obtains the communication type supported by the smart device.
[0279] S602: The terminal device obtains a target communication type for establishing a communication connection with the smart device according to the communication types supported by the smart device.
[0280] The process from step S601 to step S602 refers to step S501 to step S502 and will not be described in detail here.
[0281] S603, the terminal device prompts the user with an operation guide corresponding to the target communication type, and establishes a communication connection of the target communication type with the smart device in response to the user's operation performed based on the operation guide corresponding to the target communication type, where different operation guides correspond to different communication types.
[0282] Among them, after the terminal device obtains the target communication type for establishing a communication connection with the smart device, it prompts the user with operation guidance according to the target communication type, so that the user can operate the terminal device and the smart device according to the operation guidance to establish a communication connection of the target communication type between the terminal device and the smart device.
[0283] In the embodiment of the present application, different operation guides correspond to different communication types.
[0284] Exemplarily, when the target communication type is a Bluetooth communication type, the operation guidance prompted by the terminal device to the user is to turn on the Bluetooth switches of the terminal device and the smart device, so that the terminal device and the smart device remain within a certain range.
[0285] When the target communication type is a near field communication (NFC) type, the terminal device prompts the user to operate in such a way as to turn on the near field communication switch between the terminal device and the smart device, so that the terminal device and the smart device come into contact with each other.
[0286] When the target communication type is a WiFi communication type, the terminal device prompts the user to operate the hotspot to turn on 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 user's operation and establishes a communication connection of the first communication type with the smart device.
[0288] For example, when the target communication type is Bluetooth communication type, the user turns on the Bluetooth switches of the terminal device and the smart device according to the operation guidance, so that the terminal device and the smart device are kept within a certain range. The terminal device can respond to the user's operation and establish a Bluetooth communication type communication connection with the smart device.
[0289] It is understood that when a smart device has established a Bluetooth channel with a terminal device during registration, and when the Bluetooth switches of the terminal device and the smart device are turned on and the terminal device and the smart device are within a certain range, the terminal device and the smart device can communicate with each other via the previously established Bluetooth channel. If a Bluetooth channel has not been established between the terminal device and the smart device, when the terminal device and the smart device establish a Bluetooth communication type communication connection, the terminal device can pair with the smart device via Bluetooth, establish a Bluetooth channel, and then communicate via Bluetooth via the Bluetooth channel.
[0290] Exemplarily, when the target communication type is near field communication (NFC) type, the user turns on the near field communication switch between the terminal device and the smart device according to the operation guidance, so that the terminal device contacts the smart device, and the terminal device can respond to the user's operation and establish a near field communication (NFC) type communication connection with the smart device.
[0291] For example, when the target communication type is WiFi communication type, after the user turns on the hotspot of the terminal device according to the operation guidance and changes the network information of the hotspot to the network information of the second network, the terminal device can respond to the user's operation and establish a communication connection with the smart device through the hotspot.
[0292] Taking the target communication type as WiFi communication type as an example, the process of establishing a communication connection between the terminal device and the smart device is specifically described.
[0293] (1) The terminal device prompts the user with network setting information based on 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 a network change for the smart device, the terminal device initiates a network information request to the server to query 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 changed.
[0295] 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 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 registration of the smart device or completing the network change, the terminal device stores the network information to which the smart device is connected. After the terminal device initiates the network change for 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 connected to the smart device, the terminal device prompts the user with network setting information based on the network information of the second network connected to the smart device, wherein 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] For example, the terminal device can prompt the user with network setting information through voice, interface display, etc. There is no specific limitation and it is 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 to change the name of the hotspot to the network name of the second network, and to change the password of the hotspot to the network password of the second network. Please refer to Figure 24, which is a network setting information prompt interface provided in an embodiment of the present application. As shown in Figure 24, after obtaining the network information of the second network to which the smart device is connected, the terminal device can display a 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". Among them, A is the network name of the second network, and B is the network password of the second network.
[0300] The embodiments of the present application can improve the convenience of user operations and enhance user experience by prompting users with network setting information.
[0301] (2) The terminal device receives the user's operation to change the network information of the hotspot, and establishes a communication connection with the smart device through the changed hotspot.
[0302] After the terminal device prompts the user with network setting information, the user can then turn on the terminal device's hotspot and modify the hotspot's network information according to the terminal device's prompt. The terminal device receives the user's modification of the hotspot's network information and establishes a communication connection with the smart device based on the modified hotspot.
[0303] It can be understood that the network information of the changed hotspot is consistent with the network information of the second network. Therefore, the smart device can access the changed hotspot of the terminal device through the network information of the second network, thereby establishing a communication connection with the terminal device through the changed hotspot.
[0304] It can be understood that when the terminal device establishes a communication connection with the smart device through the changed hotspot, the terminal device can send a network change instruction to the smart device through the changed hotspot.
[0305] The embodiments of the present application guide users through operation guidance, which can further improve the convenience of user operations and enhance user experience.
[0306] To further enhance operational convenience, in an embodiment of the present application, when multiple smart devices are switching networks, the terminal device can determine the target communication type corresponding to each smart device based on the priority of the communication type. The terminal device then classifies each smart device according to its target communication type, obtaining smart devices of the same communication type. For smart devices of the same communication type, the user is prompted with the corresponding operation instructions for that communication type.
[0307] Exemplarily, for each smart device, first check whether the smart device supports the highest priority communication type. If it supports the highest priority communication type, determine that the target communication type corresponding to the smart device is the highest priority communication type, and classify the smart device into the list of communication types corresponding to the highest priority. If it does not support the highest priority communication type, check whether the smart device supports the second priority communication type. If it supports the second priority communication type, determine that the target communication type corresponding to the smart device is the second priority communication type, and classify the smart device into the list of communication types corresponding to the second priority. If it does not support the second priority communication type, check whether the smart device supports the third priority communication type, and so on, to obtain smart devices under the same communication type.
[0308] After obtaining smart devices under the same communication type, the smart devices included in each communication type and the corresponding operation guides can be displayed to the user to instruct the user to operate according to the operation guides corresponding to each communication type to establish a communication connection between the terminal device and the smart devices included in each communication type.
[0309] Taking the communication types including Bluetooth communication, near-field communication (NFC), and WiFi communication as an example, NFC has a higher priority than Bluetooth communication, which in turn has a higher priority than WiFi communication. Each smart device is capable of connecting to at least a WiFi network. As shown in (a) of FIG25 , a terminal device displays a network anomaly prompt box on the device display interface of the device application. If the user clicks the change control in the prompt box, the terminal device receives the user's network change operation in response to the network anomaly prompt and queries the server for all smart devices under the network WiFi ssID and the communication types supported by the smart device. As shown in (b) of FIG25 , for each smart device, the system first checks whether the smart device supports near-field communication (NFC). If so, the smart device is classified into the near-field communication (NFC) type list. If not, the system checks whether the smart device supports Bluetooth communication. If so, the smart device is classified into the Bluetooth communication type list. If not, the system classifies the smart device into the WiFi communication type list. After the classification is completed, the operation guidance interface is displayed to the user, as shown in (c) in Figure 25. The operation guidance page includes the smart devices included in the near field communication (NFC) type list and the operation guidance corresponding to the near field communication (NFC) type, the smart devices included in the Bluetooth communication type list and the operation guidance corresponding to the Bluetooth communication type, and the smart devices included in the WiFi communication type list and the operation guidance corresponding to the WiFi communication type.
[0310] It can be understood that after the operation guidance interface is displayed to the user, for each smart device in the communication type list, the user can operate the terminal device and the smart device according to the operation guidance corresponding to the communication type, and the terminal device responds to the user's operation and establishes a communication connection with the smart device.
[0311] The embodiment of the present application obtains the target communication type corresponding to the smart device according to the priority of operation portability, and instructs the user to perform operations based on the operation guidance corresponding to the target communication type, which can further improve the convenience of network replacement and enable the user to change the network to which the device is connected without feeling.
[0312] S604: The terminal device sends a network change instruction to the smart device through a communication connection.
[0313] After the terminal device establishes a communication connection of the target communication type with the smart device, the terminal device may send a network change instruction to the smart device through the communication connection.
[0314] To improve data transmission reliability, after the terminal device and the smart device establish a communication connection of the target communication type, the terminal device may also send verification information to the smart device. 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 device identification in the verification information match the network information and device identification stored by the smart device. After receiving feedback information indicating that the verification information has been verified by the smart device, the terminal device sends a network change instruction to the smart device via the communication connection. For details, please refer to steps S402 to S404, and the details are not repeated here.
[0315] S605: The smart device receives a network change instruction from the terminal device through a communication connection, and changes 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 network information of the first network and a device identifier of the smart device. The device replacement information is 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.
[0317] S607: The server receives the device replacement information sent by the smart device, stores the association between the device identification of the smart device and the network information of the first network, and sends the network status of the smart device to the terminal device.
[0318] The process of step S604 to step S607 refers to step S302 to step S305 and will not be described in detail here.
[0319] The embodiment of the present application can further improve the convenience of the user's operation when changing the network and enhance the user experience by prompting the user with an operation guide of the target communication type and instructing the user to perform operations according to the operation guide.
[0320] The embodiment of the present application establishes 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 each other through the communication connection to complete the replacement of the network of the smart device, without resetting the smart device and re-configuring the network. As shown in (a) in Figure 26, in conventional technology, the smart device needs to reset the device, configure the network, and re-initiate registration and add to the server, and the three ends need to interact to achieve the network replacement of the smart device. As shown in (b) in Figure 26, the embodiment of the present application can enable the smart device to complete the network replacement through the interaction between the terminal device and the smart device, without resetting the smart device and re-configuring the network, and the preference settings and personalized settings retained by the server, terminal device, and smart device will not be cleared, which greatly simplifies the process of network replacement, saves time, and improves efficiency.
[0321] Based on the same inventive concept, an embodiment of the present application further provides an electronic device. FIG27 is a schematic structural diagram of an electronic device 700 provided in an embodiment of the present application. The electronic device 700 shown in FIG27 is, for example, the terminal device in the embodiments corresponding to FIG5 , FIG12 , FIG18 , FIG20 , and FIG23 , or the terminal device in FIG3 .
[0322] As shown in Figure 27, the electronic device 700 includes a first communication unit 701 and a first processing unit 702; wherein, the first communication unit 701 is used to establish a communication connection with the smart device when the smart device cannot connect to the first network through the gateway, so that the terminal device can connect to the first network; the first processing unit 702 is used to send a network change instruction to the smart device through the communication connection, and the network change instruction includes network information of the first network. 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.
[0323] Optionally, when the smart device cannot connect to the first network through the gateway using the first communication type, the first communication unit 701 is used to establish a communication connection with the smart device through 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.
[0324] Optionally, when multiple smart devices cannot connect to the first network through the gateway using the first communication type, the first communication unit 701 is used to establish a communication connection with the first smart device among the multiple smart devices through the second communication type, and to establish a communication connection with the second smart device among the multiple smart devices through the 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.
[0325] Optionally, the electronic device 700 includes a second processing unit 703. Before establishing a communication connection with the smart device, the second processing unit 703 is used to receive the user's network change operation and initiate a query request to the server, where the query request is used to request the communication type supported by the smart device; receive the communication type supported by the smart device sent from the server, and establish a communication connection with the smart device based on the communication type supported by the smart device.
[0326] Optionally, the electronic device 700 includes an abnormality prompt unit 704. Before receiving the user's network change operation, the abnormality prompt unit 704 is used to provide the user with a network abnormality prompt after receiving the network abnormality information from the server; the second processing unit 703 is used to receive the user's network change operation in response to the network abnormality prompt.
[0327] Optionally, the abnormality prompt unit 704 is used to prompt the user of the device network abnormality after receiving the device abnormality information for the smart device from the server; the second processing unit 703 is used to receive the network replacement operation initiated by the user for the smart device based on the device network abnormality prompt.
[0328] Optionally, before establishing a communication connection with the smart device, the first processing unit 702 is used to prompt the user with an operation guide corresponding to the 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 communication types correspond to different operation guides; establishing a communication connection with the smart device includes: in response to the operation performed by the user based on the operation guide corresponding to the target communication type, establishing a communication connection of the target communication type with the smart device.
[0329] Optionally, the target communication type is a WiFi communication type, and the first processing unit 702 is used to prompt the user with network setting information based on the network information of the second network to which the smart device is connected, and 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; receive the user's change operation on the network information of the hotspot, and establish a 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 a network change instruction to the smart device via the replaced hotspot.
[0331] Optionally, the first processing unit 702 is configured to prompt the user with one or more candidate networks before sending a network change instruction to the smart device via a communication connection; receive a user confirmation operation on the one or more candidate networks, and obtain the first network and network information of the first network.
[0332] Optionally, before sending a network change instruction to the smart device through a communication connection, the first processing unit 702 is used to send verification information to the smart device, where the verification information includes network information of the second network to which the smart device is connected and the device identification of the smart device, and the network information of the second network to which the smart device is connected and the device identification of the smart device are obtained from the server; the first processing unit 702 is used to send a network change instruction to the smart device through a communication connection after receiving feedback information indicating that the smart device has passed the verification of the verification information.
[0333] Optionally, the second processing unit 703 is used to receive the user's device addition operation and display the 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 choose whether to issue 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 be connected to the smart device; reminder function setting information and network information of the network to be connected are sent to the smart device, so that the smart device can access the network to be connected according to the network information of the network to be connected, and send reminder function setting information and the device identification of the smart device to the server through the network to be connected, wherein the reminder function setting information is information obtained according to the device reminder 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 that of the first network.
[0335] Optionally, 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. 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 switching can be further improved.
[0336] Please refer to Figure 28, which is a structural diagram of an electronic device 800 provided in an embodiment of the present application. The electronic device 800 shown in Figure 28 is, for example, the smart device in the embodiments corresponding to Figures 5, 12, 18, 20, and 23, or the smart device in Figure 3. As shown in Figure 28, the electronic device 800 includes a second communication unit 801 and a network replacement unit 802; the second communication unit 801 is used to establish a communication connection with the terminal device; the network replacement unit 802 is used to receive a network replacement instruction from the terminal device through the communication connection, the network replacement instruction including the network information of the first network, and according to the network information of the first network, the connected second network is replaced with the first network.
[0337] Optionally, the electronic device 800 includes a processing unit 803, which is used to receive verification information sent by the terminal device before receiving a network change instruction from the terminal device through a communication connection; when the network information and device identification in the verification information are consistent with the network information and device identification stored in the smart device, feedback information is sent to the terminal device, and the network change instruction is sent to the smart device after the terminal device receives the feedback information.
[0338] Optionally, after the connected second network is replaced with the first network, the processing unit 803 is used to send 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 identification of the smart device. The device replacement information is used to indicate the server to store the association relationship between the device identification of the smart device and the network information of the first network.
[0339] Optionally, the processing unit 803 is used to receive reminder function setting information and 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, which is used to instruct the server to store the association relationship 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 offline.
[0340] Optionally, the processing unit 803 is configured to send the communication type supported by the smart device to the server.
[0341] Please refer to Figure 29, which is a structural diagram of an electronic device 900 provided in an embodiment of the present application. The electronic device 900 shown in Figure 29 is, for example, the server in the embodiments corresponding to Figures 5, 12, 18, 20, and 23, or the server in Figure 3. As shown in Figure 29, the electronic device 900 includes a data receiving unit 901 and a data sending unit 902. The data receiving unit 901 is used to receive a query request sent by a terminal device, and the query request is used to request to query the communication type supported by the smart device; the data sending unit 902 sends 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 based on the communication type supported by the smart device, and sends a network change instruction to the smart device through the communication connection; wherein 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 based on the network information of the first network.
[0342] Optionally, the data sending unit 902 is further configured to send the network information of the second network to which the smart device is connected and the device identification of the smart device to the terminal device after receiving the network information request sent by the terminal device.
[0343] Optionally, the electronic device 900 also includes a storage unit 903, and the data receiving unit 901 is used to receive device replacement information sent by the smart device, the device replacement information includes the network information of the first network and the device identification of the smart device, and the device replacement information is used to indicate to the server to store the association relationship between the device identification of the smart device and the network information of the first network; the storage unit 903 is used to store the association relationship between the device identification of the smart device and the network information of the first network; the data sending unit 902 is used to send the network status of the smart device to the terminal device.
[0344] Optionally, the electronic device 900 also includes a detection unit 904, which is used to detect whether one or more target devices with the same user information and network information as the smart device are online when it is detected that the smart device is in an offline state; if one or more target devices are all offline, send network abnormality information to the terminal device; if at least one of the one or more target devices is online, send device abnormality information for the smart device to the terminal device.
[0345] Optionally, the detection unit 904 is configured 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.
[0346] Optionally, the data receiving unit 901 is used to receive reminder function setting information and the device identification of the smart device sent by 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 offline; the storage unit 903 is used to store the association between the reminder function setting information of the smart device and the device identification of the smart device.
[0347] Please refer to Figure 30, which is a schematic diagram of the structure of an electronic device 1000 provided in an embodiment of the present application. The electronic device 1000 shown in Figure 30 can execute the steps executed by any of the above-mentioned terminal devices, smart devices, and servers.
[0348] As shown in Figure 30, 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 via a double data rate (DDR) bus or other types of buses. The network interface 1003 is used to communicate with other devices, for example, to receive data sent by other devices or to send data to other devices via the network interface 1003.
[0349] Processor 1001 may be a central processing unit (CPU) or other specific integrated circuit. Processor 1001 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. In practical applications, electronic devices may also include multiple processors, each of which may include one or more processor cores.
[0350] Memory 1002 is typically used to store computer program executable code. Executable code includes instructions. Processor 1001 executes the instructions stored in memory to execute various functional applications and data processing of electronic device 1000. Memory 1002 includes a program storage area and a data storage area. The program storage area can store the operating system, at least one application required for a function, and the data storage area can store data generated during the use of electronic device 1000.
[0351] In addition, the memory 1002 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0352] It is understood that the structure shown in FIG30 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 may include more or fewer components than shown in the figure, or combine or separate certain components, or arrange the components differently, and the components may be implemented in hardware, software, or a combination of software and hardware.
[0353] In addition, embodiments of the present application further provide an electronic device. The electronic device includes a memory and a processor in communication with the memory. The memory includes computer-readable instructions; the processor is configured to execute the computer-readable instructions, causing the electronic device to perform the methods performed by a terminal device, smart device, or server in the above embodiments.
[0354] In addition, an embodiment of the present application also provides an Internet of Things intelligent system, including a terminal device, an intelligent device and a server; the terminal device, the intelligent device and the server are used to execute the method in the above embodiment.
[0355] An embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processing circuit, the functions or steps in the above-mentioned network replacement method are implemented.
[0356] In addition, an embodiment of the present application can also provide a chip system, which includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions. When the computer program instructions are executed by the processing circuit, the functions or steps in the above-mentioned network replacement method are implemented.
[0357] In addition, an embodiment of the present application may also provide a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the functions or steps in the above-mentioned network replacement method.
[0358] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working processes of the chip system, electronic device, computer-readable storage medium, computer program product containing instructions, and Internet of Things intelligent system described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0359] It is understandable that the steps of the method or algorithm described in conjunction with the embodiments of the present application can be implemented in a hardware manner, 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 can 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 be present in an electronic device as discrete components.
[0360] In an optional manner, when software is used for implementation, it 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 process or function described in the embodiment of the present application is implemented in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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 via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disk (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)).
[0361] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection 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, wherein: 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 is 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.
Citation Information
Patent Citations
Method for controlling networking of smart home equipment, and equipment
CN111491297A
Intelligent device network distribution method, apparatus, electronic device and storage medium
CN113169991A
Equipment wireless network information configuration method and device
CN113286294A
Network configuration method, user terminal, intelligent hardware equipment and storage medium
CN116170832A
Mobile device pass through for signaling messages
US20150172879A1