Network distribution and binding method and device of intelligent equipment and electronic equipment
By launching multiple network configuration modules on the mobile device and using long connections to detect device status, the incompatibility issues of smart device network configuration methods and MQTT communication problems were resolved, achieving an efficient network configuration and binding process and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU ROBAM APPLIANCES CO LTD
- Filing Date
- 2024-10-18
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, there are various and incompatible network configuration methods for smart devices, leading to network configuration failures; packet loss and unpredictable order of MQTT communication messages cause binding failures.
The mobile device starts multiple network configuration modules, each with a different network configuration method. After the smart device successfully connects to the server, it sends network configuration data to the target module and checks whether the device has been added to the database through a long connection, thus avoiding reliance on MQTT message order and packet loss issues.
It integrates multiple network configuration methods, saves resources, improves network configuration success rate and user experience, and avoids binding failures caused by MQTT message packet loss and order uncertainty.
Smart Images

Figure CN121908252A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method, apparatus, and electronic device for network configuration and binding of intelligent devices. Background Technology
[0002] With the rapid development of mobile internet, smart devices have also seen significant improvements in network configuration. Initially, range hoods, electric ovens, steam ovens, and microwave ovens used EasyLink for network configuration. Later, softAP (soft access point) network configuration was introduced for smart speakers. Gradually, as the number of smart products increased, Bluetooth network configuration was also introduced. Because Bluetooth network configuration offers relatively better performance, the network configuration modules of some older models were upgraded and replaced, resulting in multiple network configuration methods for the same model of device. Currently, it's not possible to differentiate between different network configuration methods based on specific models, thus requiring the integration of network configuration methods.
[0003] Furthermore, regardless of the type of network configuration device, current systems all require MQTT (Message Queuing Telemetry Transport) communication. After the device connects to WiFi (mobile hotspot) or a hotspot router, the device's WiFi module also needs to connect to the cloud server's MQTT server. Finally, according to the communication protocol, a network configuration completion MQTT message is broadcast. Upon receiving the message, the cloud server stores the device information in its database. The mobile device, upon receiving the message, then calls the cloud server service to bind the current network configuration device to the mobile client (the phone's application). However, due to packet loss and the inability to guarantee the order of MQTT messages, the final device binding may still fail, resulting in the final network configuration process failing. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for network configuration and binding of intelligent devices, so as to integrate multiple network configuration methods, save resources and realize network configuration of intelligent devices.
[0005] In a first aspect, embodiments of the present invention provide a method for configuring and binding a smart device, the method comprising: a mobile terminal sending configuration information to a smart device; the mobile terminal activating multiple configuration modules; wherein each configuration module has a different configuration method; the smart device entering a configuration state based on the configuration information; after the smart device successfully connects to a server, sending configuration data to a target configuration module on the mobile terminal; after the target configuration module receives the configuration data, the mobile terminal shuts down other configuration modules except the target configuration module, and the mobile terminal binding the smart device based on the configuration data.
[0006] In optional embodiments of this application, the above-mentioned network configuration method includes at least one of the following: Easylink network configuration method, softAP network configuration method, Bluetooth network configuration method, and IoT device network configuration method.
[0007] In an optional embodiment of this application, the step of the smart device successfully connecting to the server includes: the smart device's WiFi module successfully connecting to the server's MQTT service.
[0008] In an optional embodiment of this application, the step of binding a smart device to a mobile terminal based on network configuration data includes: the target network configuration module of the mobile terminal sending a notification indicating successful network configuration of the smart device to the application of the mobile terminal; the application of the mobile terminal waiting for a network configuration binding instruction based on the notification; the WiFi module of the smart device broadcasting a binding instruction to the server; the server forwarding the binding instruction broadcast to the mobile terminal; and the application of the mobile terminal binding the smart device based on the broadcast binding instruction.
[0009] In an optional embodiment of this application, after the step of the WiFi module of the smart device broadcasting a binding instruction to the server, the method further includes: the server adding the smart device to the database based on the binding instruction broadcast.
[0010] In an optional embodiment of this application, after the step of the mobile application broadcasting a binding instruction to bind a smart device, the method further includes: the mobile application calling the server's interface to bind the smart device.
[0011] In an optional embodiment of this application, after the step of the mobile terminal sending network configuration information to the smart device, the method further includes: the mobile terminal and the server establishing a long connection; the long connection is used to detect whether the smart device has been added to the database.
[0012] In an optional embodiment of this application, after the step of the server adding the smart device to the database based on the binding instruction broadcast, the method further includes: the mobile terminal determining that the smart device has been added to the database based on the long connection, and binding the smart device.
[0013] Secondly, embodiments of the present invention also provide a network configuration and binding device for a smart device. The device includes: a network configuration module activation module, used by a mobile terminal to send network configuration information to the smart device, and the mobile terminal to activate multiple network configuration modules; wherein each network configuration module has a different network configuration method; a smart device network configuration module, used by the smart device to enter the network configuration state based on the network configuration information; after the smart device successfully connects to the server, it sends network configuration data to the target network configuration module of the mobile terminal; and a smart device binding module, used by the mobile terminal to close other network configuration modules except the target network configuration module after the target network configuration module receives the network configuration data, and the mobile terminal to bind the smart device based on the network configuration data.
[0014] Thirdly, embodiments of the present invention also provide an electronic device, which includes a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-described method for configuring and binding smart devices.
[0015] The embodiments of the present invention bring the following beneficial effects:
[0016] This invention provides a method, apparatus, and electronic device for network configuration and binding of smart devices. A mobile terminal sends network configuration information to the smart device and activates multiple network configuration modules, each with a different configuration method. The smart device enters a network configuration state based on the configuration information. After successfully connecting to a server, the smart device sends network configuration data to the target network configuration module on the mobile terminal. After receiving the data, the target module closes all other network configuration modules except the target module, and the mobile terminal binds the smart device based on the configuration data. This method integrates multiple network configuration methods, saves resources, and enables network configuration for smart devices.
[0017] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0018] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a method for configuring and binding a smart device according to an embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram illustrating the integration of multiple power distribution network methods according to an embodiment of the present invention;
[0022] Figure 3 A flowchart illustrating another method for configuring and binding a smart device according to an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram of an App network configuration and binding process provided in an embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram illustrating how a smart device is monitored via a long connection to be added to a database, as provided in an embodiment of the present invention.
[0025] Figure 6 This is a schematic diagram of the structure of a network configuration and binding device for a smart device provided in an embodiment of the present invention;
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] Currently, mobile apps have a one-to-one pairing system for their network configuration methods and device models. Each device model has only one pairing method. If the smart device model and pairing method don't match, the user will be unable to successfully pair the device. Even if the app prioritizes Bluetooth pairing during interaction, the user will still be unable to pair smart devices using other pairing methods.
[0029] In addition, after a smart device successfully connects to the cloud server via MQTT, it sends an MQTT message to the cloud server. The cloud server then forwards the message to the mobile device (mobile app). This process is affected by the network and is prone to packet loss. Even with packet loss and duplication mechanisms in place, this problem cannot be avoided. As a result, the mobile device cannot receive the notification that the smart device has successfully connected to the cloud server, and therefore cannot properly bind the smart device to the mobile user. Consequently, the mobile device displays a message indicating that the smart device has failed to connect to the cloud server.
[0030] Furthermore, MQTT itself cannot guarantee the order of messages. Therefore, after a smart device is successfully configured to the network, the message broadcasting the notification to the cloud server to add the smart device information to the database and the message notifying the mobile terminal (mobile app) to bind the device cannot be executed in the correct order. This can result in the message notifying the mobile terminal to bind being sent first and received first. In this case, the mobile terminal will call the cloud server service to bind the device. However, the cloud server has not yet received the notification message that the smart device information has been added to the database. Since the smart device does not exist, the binding will fail, and the mobile terminal will display a message indicating that the smart device has failed to configure to the network.
[0031] Based on this, the present invention provides a method, apparatus, and electronic device for configuring and binding smart devices. Specifically, it provides a method for configuring devices and binding mobile users, which can solve the problem of multiple configuration modes coexisting, make up for the defect that the configuration modes of the same model of smart devices need to correspond one-to-one; and address the defects of MQTT communication message packet loss and uncertain message order, which ultimately lead to the failure of mobile users and devices to configure and bind to the network.
[0032] To facilitate understanding of this embodiment, a detailed description of a smart device configuration and binding method disclosed in this embodiment of the invention will be provided first.
[0033] Example 1:
[0034] This invention provides a method for configuring and binding smart devices to a network. This binding method is achieved through the joint operation of a mobile terminal (mobile app), a cloud server, and the smart device's Wi-Fi module. See also... Figure 1 The flowchart shown illustrates a method for configuring and binding a smart device to a network. This method includes the following steps:
[0035] In step S102, the mobile terminal sends network distribution information to the smart device, and the mobile terminal starts multiple network distribution modules; each network distribution module has a different network distribution method.
[0036] See also Figure 2 The diagram shows an integration of multiple network configuration methods. When the mobile app selects the model and enters the network configuration page, according to the text prompts on the app page, the user needs to first trigger the network configuration button on the smart device to put the device into network configuration mode; at the same time, the app sends network configuration information such as WiFi account and password.
[0037] In some embodiments, the above-mentioned network configuration methods include at least one of the following: Easylink network configuration method, softAP network configuration method, Bluetooth network configuration method, and IoT device network configuration method.
[0038] like Figure 2 As shown, the mobile device can activate the corresponding network configuration modules for Easylink, SoftAP, Bluetooth, and IoT device network configuration methods. Although there are multiple network configuration methods for the same model of smart device, any given smart device model will only have one of the above four network configuration methods available.
[0039] In step S104, the smart device enters the distribution network state based on the distribution network information; after the smart device successfully connects to the server, it sends distribution network data to the target distribution network module on the mobile terminal.
[0040] like Figure 2As shown, once a smart device successfully connects to the server (i.e., the smart device is successfully configured for network), among the various network configuration modules on the mobile device, there will inevitably be one target network configuration module. Figure 2 The distribution module (which is a softAP distribution network module) can receive distribution network data.
[0041] In step S106, after the target distribution network module receives the distribution network data, the mobile terminal shuts down other distribution network modules except for the target distribution network module, and the mobile terminal binds the smart device based on the distribution network data.
[0042] like Figure 2 As shown, as long as the network configuration method that receives the target network configuration data continues to be executed, other network configuration modules should be turned off to save resources. Once the smart device is connected to the WiFi router and the MQTT server, the network configuration binding command is sent through the cloud. After the App receives the command, it binds the smart device, and the network configuration process is completed.
[0043] This invention provides a method for configuring and binding smart devices. A mobile terminal sends configuration information to the smart device and activates multiple configuration modules, each with a different configuration method. The smart device enters a configuration state based on the configuration information. After successfully connecting to a server, the smart device sends configuration data to the target configuration module on the mobile terminal. After receiving the configuration data, the target configuration module closes all other configuration modules except the target module, and the mobile terminal binds the smart device based on the configuration data. This method integrates multiple configuration methods, saves resources, and enables configuration of smart devices.
[0044] Example 2:
[0045] This embodiment provides another method for configuring and binding smart devices to the network. This method is implemented based on the above embodiment. See [link to documentation]. Figure 3 The flowchart shown represents another method for configuring and binding a smart device to the network. This method includes the following steps:
[0046] In step S302, the mobile terminal sends network distribution information to the smart device, and the mobile terminal starts multiple network distribution modules; each network distribution module has a different network distribution method.
[0047] See also Figure 4 The diagram illustrates a network configuration and binding process for an app. The mobile app sends network configuration information (WiFi account and password, etc.) to several network configuration modules. These modules can be SDKs (Software Development Kits). The network configuration modules can send network configuration information to the WiFi module of a smart device.
[0048] Step S304: The smart device enters the distribution network state based on the distribution network information; after the smart device successfully connects to the server, it sends distribution network data to the target distribution network module on the mobile terminal; after the target distribution network module receives the distribution network data, the mobile terminal shuts down other distribution network modules except for the target distribution network module.
[0049] In some embodiments, the WiFi module of the smart device successfully connects to the MQTT service of the server.
[0050] like Figure 4 As shown, once the WiFi module of a smart device successfully connects to the server's MQTT service, one of the target network configuration modules will receive the corresponding response (i.e., network configuration data).
[0051] In step S306, the target network configuration module on the mobile terminal sends a notification indicating successful network configuration of the smart device to the application on the mobile terminal; the application on the mobile terminal waits for the network configuration binding instruction based on the notification; the WiFi module of the smart device broadcasts the binding instruction to the server; the server forwards the binding instruction broadcast to the mobile terminal; the application on the mobile terminal binds the smart device based on the broadcast binding instruction.
[0052] like Figure 4 As shown, the WiFi module will connect to the MQTT service of the cloud server. After the connection is successful, it will return notifications to the configuration SDK (i.e., the target configuration module) layer by layer. After receiving the MQTT connection success notification, the configuration SDK will send the configuration binding command, and then send it to the cloud server layer by layer.
[0053] In some embodiments, after the WiFi module of the smart device broadcasts a binding instruction to the server, the server adds the smart device to the database based on the binding instruction broadcast.
[0054] like Figure 4 As shown, after receiving the binding instruction, the cloud server will add the device to the database and forward the binding instruction to the mobile app.
[0055] In some embodiments, after a mobile application broadcasts a binding instruction to bind a smart device, the mobile application calls the server's interface to bind the smart device.
[0056] like Figure 4 As shown, after the APP receives the binding instruction, it will call the cloud interface to bind the device. The cloud receives the interface call and executes the account and device binding operation to complete the network configuration process.
[0057] The method provided in this invention can realize network configuration for smart devices. During the network configuration process, the information verification and exchange mechanism between the mobile APP, the mobile Bluetooth module, the WiFi module of the smart device, and the cloud server is strengthened, which increases the success rate of network configuration for user devices and improves the user's experience with smart device products.
[0058] Example 3:
[0059] This embodiment provides another method for configuring and binding smart devices, which is implemented based on the above embodiments. In some embodiments, after the mobile terminal sends configuration information to the smart device, the mobile terminal and the server establish a long connection; the long connection is used to detect whether the smart device has been added to the database.
[0060] See also Figure 5 The diagram illustrates a method for monitoring whether a smart device has been added to the database via a persistent connection. Following the configuration prompts on the mobile app, the user initiates network configuration on the smart device (this could be Easylink, SoftAP, or Bluetooth configuration). Simultaneously, the user's mobile app sends the currently connected Wi-Fi information to the smart device via the configuration SDK. This configuration information includes the Wi-Fi's SSID (Service Set Identifier), password, user identifier, and other necessary parameters. Furthermore, the mobile app establishes a persistent connection with the cloud server to monitor whether the smart device configured by the cloud server has been added to the database.
[0061] like Figure 5 As shown, after receiving the network configuration information, the smart device will connect to the current WiFi router based on the WiFi SSID and password. Once the router connection is successful, the smart device's WiFi module will then connect to the cloud server MQTT. If any step fails, the mobile device will ultimately fail to configure the network.
[0062] like Figure 5 As shown, after a smart device connects to the MQTT cloud server, it will send two broadcast messages in succession (a retransmission mechanism can be set). One message is to notify the cloud server to enter the information of the smart devices currently configured into the database, and the other message is to be forwarded by the cloud server to the mobile terminal (mobile app).
[0063] like Figure 5As shown, the order of these two messages is uncertain. Current binding methods rely on the cloud server receiving the smart device information entry broadcast message first, followed by the app receiving the smart device binding broadcast message, in order to complete the binding process. If the app receives the smart device binding broadcast message first, and the cloud server receives the smart device information entry broadcast message later, or if the app does not receive the smart device binding broadcast message at all, the binding will fail, resulting in the smart device network configuration binding failing.
[0064] like Figure 5 As shown, this embodiment no longer relies on the smart device sending two broadcast messages after connecting to the MQTT cloud server. Instead, it directly establishes a long connection between the mobile terminal and the server to monitor the status of smart device information being entered into the database. When the smart device connects to the MQTT cloud server, it queries the corresponding smart device information based on the MQTT connection information and stores it in the database. If the app detects the smart device information and its existence in the database through the long connection, it indicates that the smart device has been successfully configured and is ready to be bound to the mobile user. At this point, the mobile terminal only needs to call the server-side service to bind the user to the currently configured smart device.
[0065] The method provided in this embodiment of the invention adds a way to directly connect with the cloud server to determine whether the smart device can be bound during the current network configuration process, based on the existing reliance on receiving a broadcast message indicating successful network configuration and waiting for binding. This successfully avoids the problems of network configuration failure and user binding failure caused by packet loss during MQTT forwarding and uncertain order of broadcast notification messages. It greatly improves the success rate of network configuration and binding for users and enhances the user experience of smart device products.
[0066] The network configuration and binding method for smart devices provided in this embodiment of the invention can integrate multiple network configuration methods and can also directly connect the smart device network configuration with the cloud server to detect whether the network configuration is successful and bind it. As long as the mobile terminal user receives the message that the device is available and can be bound, it means that the device network configuration has been successful and it can be used after binding.
[0067] The network configuration and binding method for smart devices provided in this invention eliminates the need for users to solely rely on MQTT notification messages during the network configuration process. Leveraging the advantage of the App including multiple network configuration SDKs, and combining this with interactive design, the App no longer needs to differentiate network configuration methods based on device model. This successfully avoids the problem of packet loss during MQTT message forwarding leading to the mobile terminal not receiving communication messages and ultimately failing to perform binding. It also successfully avoids the problem of the mobile terminal receiving the notification message before the cloud server receives the smart device information entry message due to the uncertain order of MQTT messages, causing the mobile terminal to fail to connect to the cloud server service to bind the smart device. Therefore, this significantly improves the success rate of user network configuration and binding.
[0068] Example 4:
[0069] Corresponding to the above method embodiments, this invention provides a network configuration and binding device for smart devices, see [link to relevant documentation]. Figure 6 The diagram shows a structural schematic of a network configuration and binding device for a smart device. The network configuration and binding device for the smart device includes:
[0070] The distribution network module startup module 61 is used for the mobile terminal to send distribution network information to the smart device, and the mobile terminal to start multiple distribution network modules; among them, each distribution network module has a different distribution network method;
[0071] The intelligent device network distribution module 62 is used for intelligent devices to enter the network distribution state based on network distribution information; after the intelligent device successfully connects to the server, it sends network distribution data to the target network distribution module on the mobile terminal.
[0072] The smart device binding module 63 is used to bind smart devices based on the distribution network data after the target distribution network module receives the distribution network data and the mobile terminal closes other distribution network modules except the target distribution network module.
[0073] This invention provides a network configuration and binding device for smart devices. A mobile terminal sends network configuration information to the smart device and activates multiple network configuration modules, each with a different configuration method. The smart device enters a network configuration state based on the configuration information. After successfully connecting to a server, the smart device sends network configuration data to the target network configuration module on the mobile terminal. After receiving the data, the target module closes all other network configuration modules except the target module, and the mobile terminal binds the smart device based on the configuration data. This method integrates multiple network configuration methods, saves resources, and enables network configuration for smart devices.
[0074] The above-mentioned network configuration methods include at least one of the following: Easylink network configuration method, softAP network configuration method, Bluetooth network configuration method, and IoT device network configuration method.
[0075] The aforementioned smart device network configuration module is used to ensure that the smart device's WiFi module successfully connects to the server's MQTT service.
[0076] The aforementioned smart device binding module is used for the target network configuration module on the mobile terminal to send a notification indicating successful network configuration of the smart device to the mobile application; the mobile application waits for the network configuration binding instruction based on the notification; the WiFi module of the smart device broadcasts the binding instruction to the server; the server forwards the binding instruction broadcast to the mobile terminal; and the mobile application binds the smart device based on the broadcast binding instruction.
[0077] The aforementioned smart device binding module is also used by the server to add smart devices to the database based on binding instructions broadcast.
[0078] The aforementioned smart device binding module is also used for mobile applications to call the server's interface to bind smart devices.
[0079] The aforementioned smart device binding module is also used to establish a long connection between the mobile terminal and the server; the long connection is used to detect whether the smart device has been added to the database.
[0080] The aforementioned smart device binding module is also used by the mobile terminal to determine whether a smart device is added to the database based on a long connection, and to bind the smart device.
[0081] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the network configuration and binding device for the smart device described above can be referred to the corresponding process in the aforementioned embodiments of the network configuration and binding method for smart devices, and will not be repeated here.
[0082] Example 5:
[0083] This invention also provides an electronic device for running the above-described intelligent device's network configuration and binding method; see [link to related documentation]. Figure 7 The diagram shows the structure of an electronic device, which includes a memory 100 and a processor 101. The memory 100 stores one or more computer instructions, which are executed by the processor 101 to implement the above-mentioned network configuration and binding method of the smart device.
[0084] Furthermore, Figure 7 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 101, the communication interface 103 and the memory 100 connected via the bus 102.
[0085] The memory 100 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0086] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. Processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 100, and processor 101 reads information from memory 100 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0087] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the above-described method for configuring and binding smart devices. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0088] The network configuration and binding method, apparatus, and computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0089] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0090] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0091] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0093] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for configuring and binding smart devices, characterized in that, The method includes: The mobile terminal sends network configuration information to the smart device, and the mobile terminal activates multiple network configuration modules; wherein each network configuration module has a different network configuration method; The smart device enters the distribution network state based on the distribution network information; after successfully connecting to the server, the smart device sends distribution network data to the target distribution network module of the mobile terminal. After the target distribution network module receives the distribution network data, the mobile terminal shuts down other distribution network modules except the target distribution network module, and the mobile terminal binds to the smart device based on the distribution network data.
2. The method according to claim 1, characterized in that, The network configuration method includes at least one of the following: Easylink network configuration method, softAP network configuration method, Bluetooth network configuration method, and IoT device network configuration method.
3. The method according to claim 1, characterized in that, The steps for the smart device to successfully connect to the server include: The smart device's WiFi module successfully connected to the server's MQTT service.
4. The method according to claim 1, characterized in that, The step of binding the mobile terminal to the smart device based on the distribution network data includes: The target network configuration module on the mobile terminal sends a notification indicating that the smart device has successfully configured its network to the mobile terminal application. The mobile application waits for the network configuration binding instruction based on the notification; The WiFi module of the smart device broadcasts a binding command to the server. The server broadcasts and forwards the binding instruction to the mobile device. The mobile application binds to the smart device based on the binding instruction broadcast.
5. The method according to claim 4, characterized in that, After the step of the smart device's WiFi module broadcasting a binding command to the server, the method further includes: The server adds the smart device to the database based on the binding instruction broadcast.
6. The method according to claim 4, characterized in that, After the step of the mobile application broadcasting the binding instruction to bind the smart device, the method further includes: The mobile application calls the server's interface to bind to the smart device.
7. The method according to claim 5, characterized in that, After the step of sending network configuration information from the mobile terminal to the smart device, the method further includes: The mobile device establishes a long connection with the server; the long connection is used to detect whether the smart device has been added to the database.
8. The method according to claim 7, characterized in that, After the step of the server adding the smart device to the database based on the binding instruction broadcast, the method further includes: The mobile device determines that the smart device is added to the database and binds the smart device based on the long connection.
9. A network configuration and binding device for intelligent devices, characterized in that, The device includes: A network distribution module startup module is used for a mobile terminal to send network distribution information to a smart device, wherein the mobile terminal starts multiple network distribution modules; wherein each network distribution module has a different network distribution method; The intelligent device network configuration module is used for the intelligent device to enter the network configuration state based on the network configuration information; after the intelligent device successfully connects to the server, it sends network configuration data to the target network configuration module of the mobile terminal. A smart device binding module is used so that after the target distribution network module receives the distribution network data, the mobile terminal closes other distribution network modules besides the target distribution network module, and the mobile terminal binds the smart device based on the distribution network data.
10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the network configuration and binding method of the smart device according to any one of claims 1 to 8.