Equipment control method and device, equipment, medium and product

By directly establishing a network connection between module devices and public network routers, problems such as ease of failure and large network latency caused by smart home devices relying on gateways are solved, and higher network speed and lower latency are achieved, reducing costs and reducing the risk of single point of failure.

CN119854059APending Publication Date: 2025-04-18SHENZHEN JIUNIU YIMAO INTELLIGENT IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411983052.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Existing smart home devices rely on gateways for communication, resulting in easy system failure, large network latency, poor compatibility, high cost and complex use.

Method used

By identifying the broadcast messages of the module device, a network connection between the module device and the public network router is directly established, without the need for data transit of the gateway, and remote control, data storage and device management are realized.

Benefits of technology

Improves the response speed of smart home devices, reduces network latency, saves the cost of configuring gateways, and reduces the risk of single point of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854059A_ABST
    Figure CN119854059A_ABST
Patent Text Reader

Abstract

The invention discloses a device control method and device, a device, a medium and a product, and relates to the technical field of smart home, and the method comprises the steps: building a network connection between a module device and a public network router according to a broadcast message through responding to the broadcast message of the recognized module device; at least one of remote control, data storage and equipment management is executed on the module equipment based on the network connection, the network connection between the module equipment and the public network router is directly established, data transfer does not need to be carried out by means of a gateway, higher network speed and lower network delay can be enjoyed, and the user experience is improved. Therefore, the response speed of the smart home equipment is improved, and the cost of configuring the gateway can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and in particular to a device control method, apparatus, equipment, medium and product. Background Art

[0002] With the development of Internet of Things technology, smart home systems have gradually become an important part of family life. Smart home systems use various sensors and communication technologies to improve the intelligence of home life and realize remote control, automatic operation and data monitoring.

[0003] Existing smart home devices usually rely on gateways for communication. If the gateway fails, the entire system may fail. Communicating through the gateway may introduce network delays, affecting the response speed of the device. Summary of the invention

[0004] The main purpose of this application is to provide a device control method, apparatus, device, medium and product, aiming to improve the response speed of smart home devices.

[0005] To achieve the above object, the present application provides a device control method, which is applied to a smart terminal and includes:

[0006] In response to identifying a broadcast message of a module device, establishing a network connection between the module device and a public network router according to the broadcast message;

[0007] At least one of remote control, data storage, and device management is performed on the module device based on the network connection.

[0008] In one embodiment, the broadcast message includes a first broadcast message and / or a second broadcast message, the module device includes a Bluetooth module and / or a wireless module, and the step of establishing a network connection between the module device and a public network router according to the broadcast message in response to identifying the broadcast message of the module device includes:

[0009] In response to identifying the first broadcast message, establishing a Bluetooth connection with the module device according to the first broadcast message, and establishing a network connection between the module device and a public network router based on the Bluetooth connection; and / or,

[0010] In response to identifying the second broadcast message, a user datagram protocol connection is established with the module device according to the second broadcast message, and a network connection between the module device and a public network router is established based on the user datagram protocol connection.

[0011] In one embodiment, the first broadcast message is sent by the module device after the general attribute profile server function is enabled through the Bluetooth module, and the steps of establishing a Bluetooth connection with the module device according to the first broadcast message and establishing a network connection between the module device and a public network router based on the Bluetooth connection include:

[0012] Establishing a Bluetooth connection with the general attribute profile server as a general attribute profile client;

[0013] Sending a data negotiation data frame to the module device using an encryption algorithm based on the Bluetooth connection to determine a shared key, and sending a setting security mode control frame to the module device to determine a security policy, wherein the shared key and the security policy are used to encrypt and / or decrypt communication data between the module device and the smart terminal;

[0014] A wireless connection request control frame is sent to the module device to enable the module device to establish a network connection with the public network router, and a wireless connection status report control frame is sent to the smart terminal to report the connection status of the network connection.

[0015] In one embodiment, the second broadcast message is sent after the module device enters the network configuration mode and creates a wireless hotspot through the wireless module, and the steps of establishing a user datagram protocol connection with the module device according to the second broadcast message, and establishing a network connection between the module device and a public network router based on the user datagram protocol connection include:

[0016] After connecting to the wireless hotspot, the module device as a user datagram protocol client establishes a user datagram protocol connection with the module device as a user datagram protocol server;

[0017] Sending a data negotiation data frame to the module device using an encryption algorithm based on the user datagram protocol connection to determine a shared key, and sending a setting security mode control frame to the module device to determine a security policy, wherein the shared key and the security policy are used to encrypt and / or decrypt communication data between the module device and the smart terminal;

[0018] The network configuration information is sent to the module device so that the module device establishes a network connection with the public network router, and a wireless connection status report control frame is sent to the smart terminal to report the connection status of the network connection.

[0019] In one embodiment, before the step of performing at least one of remote control, data storage, and device management on the module device based on the network connection, the step further includes:

[0020] The module device registers with the cloud platform through the hypertext transfer protocol to obtain message queue telemetry transmission parameter information to connect to the message queue telemetry transmission server;

[0021] The module device reports device status data via the message queue telemetry transmission server, and the device status data is used for at least one of remote control, data storage, and device management of the module device.

[0022] In one embodiment, the module device includes a first module device and / or a second module device of a first user, and also includes a third module device of a second user, and the step of performing at least one of remote control, data storage, and device management on the module device based on the network connection includes at least one of the following:

[0023] Acquiring device status data and historical user data of the module device from the cloud platform based on the network connection, and remotely controlling the module device according to the device status data and historical user data;

[0024] Setting access rights and / or control rights for the first module device, so that the second user can access device status data of the first module device through the access rights and / or remotely control the first module device through the control rights;

[0025] configuring a linkage rule for at least one of the first module device, the second module device, and the third module device, so that at least one of the first module device, the second module device, and the third module device performs a linkage behavior according to the linkage rule;

[0026] Wherein, at least one of the first module device, the second module device and the third module device is connected to a smart appliance and / or a non-smart appliance.

[0027] In addition, to achieve the above-mentioned purpose, the present application also proposes a device control apparatus, which is applied to a smart terminal and includes:

[0028] A network configuration module, configured to establish a network connection between the module device and a public network router according to the broadcast message in response to identifying the broadcast message of the module device;

[0029] A control module is used to perform at least one of remote control, data storage and device management on the module device based on the network connection.

[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a device control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the device control method described above.

[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the device control method described above are implemented.

[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the device control method described above are implemented.

[0033] One or more technical solutions proposed in this application have at least the following technical effects:

[0034] In response to identifying a broadcast message of a module device, a network connection between the module device and a public network router is established according to the broadcast message; at least one of remote control, data storage and device management is performed on the module device based on the network connection, and a network connection between the module device and a public network router is directly established without the need for data transfer via a gateway. This allows for higher network speeds and lower network latency, thereby improving the response speed of smart home devices and saving the cost of configuring a gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0037] Figure 1 It is a schematic diagram of the control principle of the smart home terminal in the prior art;

[0038] Figure 2 It is a schematic diagram of the principle of the network distribution method in the prior art;

[0039] Figure 3 A flowchart of the first embodiment of the device control method of the present application is provided;

[0040] Figure 4 A flow chart of the second embodiment of the device control method of the present application;

[0041] Figure 5 A schematic diagram of a chip structure of a module device according to a second embodiment of the present application;

[0042] Figure 6 It is a schematic diagram of the functional architecture of a module device according to the second embodiment of the present application;

[0043] Figure 7 A schematic diagram of a Bluetooth network pairing process according to a second embodiment of the present application;

[0044] Figure 8 Schematic diagram of the AP network configuration process according to the second embodiment of the present application;

[0045] Fig. 9 A flowchart of the third embodiment of the device control method of the present application is provided;

[0046] Fig.10 This is a schematic diagram of a platform registration process according to the third embodiment of the present application;

[0047] Fig.11 It is a schematic diagram of the overall principle according to the third embodiment of the present application;

[0048] Fig.12 This is a schematic diagram of the module structure of the device control device according to the embodiment of the present application;

[0049] Fig.13 Schematic diagram of the device structure of the hardware operating environment involved in the device control method in the embodiment of the present application.

[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0052] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0053] The main solution of the embodiment of the present application is: by responding to the broadcast message of the module device identified, a network connection between the module device and the public network router is established according to the broadcast message; based on the network connection, at least one of remote control, data storage and device management is performed on the module device, and a network connection between the module device and the public network router is directly established without the need for data transfer via a gateway, thereby enjoying higher network speed and lower network latency, thereby improving the response speed of smart home devices and saving the cost of configuring a gateway.

[0054] In this embodiment, for the convenience of description, the following description is made with the device control device as the execution subject.

[0055] Technical terms involved in the embodiments of this application:

[0056] BLE (Bluetooth Low Energy): A type of Bluetooth technology.

[0057] WiFi (Wireless Fidelity, wireless compatibility certification): is a commercial certification and also a wireless networking technology.

[0058] IOT (Internet of Things): refers to the network of physical devices and objects that are connected and communicate through the Internet.

[0059] AP (Access Point) is a special node in a wireless network. Through this node, other types of nodes in the wireless network can communicate with the outside and inside of the wireless network.

[0060] MQTT (Message Queuing Telemetry Transport): is a message protocol based on the publish / subscribe paradigm under the ISO standard (ISO / IEC PRF 20922).

[0061] APP (APPlication): It is a software program designed for mobile devices such as smartphones and tablets.

[0062] SDK (Software Development Kit): A collection of tools, libraries, sample codes, and documents for developing software.

[0063] MCU (Microcontroller Unit): is a compact processor.

[0064] HTTP (HyperText Transfer Protocol): a network protocol used for distributed, collaborative, hypermedia information systems, mainly used to transmit information between web browsers and website servers.

[0065] GATT (Generic Attribute Profile): It is a common profile in Bluetooth technology that defines how Bluetooth low-power devices exchange data through attributes and characteristics.

[0066] UDP (User Datagram Protocol Client): is a connectionless, simple, datagram-oriented transport layer communication protocol.

[0067] SSID (Service Set Identifier): It is the name used to uniquely identify a wireless network. It is used to distinguish different wireless networks so that wireless devices (such as smartphones, laptops, etc.) can identify and connect to the correct network.

[0068] With the development of Internet of Things technology, smart home systems have gradually become an important part of family life. Smart home systems use various sensors and communication technologies to improve the intelligence of home life and realize remote control, automated operation and data monitoring. In the embodiment of the present application, a smart home system based on WiFi and BLE (Bluetooth Low Energy) modules is provided, which includes hardware modules, cloud platform network configuration, and APP interaction. The hardware module is designed based on a Bluetooth WiFi dual-mode IOT chip, and the BLE and WiFi communication modules are integrated inside the chip, and a variety of functional modules are developed based on this chip. The cloud platform network configuration includes Bluetooth network configuration and AP network configuration, and encryption algorithms are added during the network configuration process. APP interaction realizes the control and connection between users and hardware devices.

[0069] Reference Figure 1 , Figure 1 FIG. 1 is a schematic diagram of the control principle of a smart home terminal in the prior art. Figure 1 As shown, the solutions of the prior art mainly include: cloud services, smart home gateway devices, and smart home terminals. Smart home terminals can be any smart home devices, such as smart air conditioners, refrigerators, washing machines, etc. Smart home gateway devices serve as a communication bridge between smart home appliance terminals and cloud servers. Cloud servers store and process data from smart home appliance terminals, perform data analysis and other intelligent operations, and realize device connection and remote control. The control methods in the prior art have the following problems:

[0070] (1) Existing smart home devices usually rely on gateways for communication. If the gateway fails, the entire system may fail.

[0071] (2) The gateway may become a target of hacker attacks. If it is not properly protected, it may lead to user privacy leakage or device control;

[0072] (3) Devices of different brands or types may have compatibility issues, resulting in the inability to be controlled through the same gateway;

[0073] (4) Communication through a gateway may introduce network delays, affecting the response speed of the device;

[0074] (5) Gateways are usually expensive, and purchasing and maintaining gateway devices may increase the cost of the overall smart home system;

[0075] (6) Setting up and managing the gateway may be complicated for ordinary users, increasing the threshold for use;

[0076] (7) The gateway requires regular updates and maintenance to ensure security and functionality, which may impose additional burdens on users.

[0077] Reference Figure 2 , Figure 2 It is a schematic diagram of the principle of the distribution network method in the prior art, such as Figure 2 As shown, the existing network configuration method receives the router service set identifier SSID and password sent by the mobile terminal (such as a smart phone) through the Bluetooth module of the network configuration module. The network configuration module forwards this information to home appliances, such as a washing machine, so that the home appliances are connected to the corresponding router through the wireless communication module of the network configuration module according to the SSID and password of the router. The network configuration method in the prior art has the following problems:

[0078] (1) Directly transmitting sensitive information (such as router passwords) via Bluetooth may pose security risks, such as information interception or man-in-the-middle attacks;

[0079] (2) Relying on a single communication protocol for network distribution leads to deficiencies in aspects such as device compatibility.

[0080] This application provides a solution that can achieve the following effects:

[0081] (1) In response to the problems of using home gateways to connect device terminals, the module device in this application is directly connected to the public network router, so that users only need to enter the WiFi password and the device can quickly configure the network without the need for additional configuration of the home gateway. Devices directly connected to the router can enjoy higher network speeds and lower latency because data transmission does not need to be transferred through the home gateway, and avoid compatibility issues with specific gateways. When the home gateway fails, the device connected to the gateway may not work properly, while the direct device will not be affected, reducing single points of failure. Under this solution, users do not need additional home gateway devices, saving costs;

[0082] (2) In response to the current problem that there may be security risks in directly transmitting sensitive information via Bluetooth, this application supports encryption functions such as DH / RSA / ECC during the network configuration process, allowing two devices to generate a shared key without directly transmitting the key. This means that even if the communication is eavesdropped, the attacker cannot easily obtain the key used for encryption, thereby improving the security of data transmission. By using key exchange, devices can ensure that the communication between them is secure and prevent man-in-the-middle attacks. Attackers cannot insert themselves and steal or tamper with information without being detected. The encryption protocol allows a new shared key to be generated each time a connection is made, so that even if the key is leaked, the attacker can only use the key for a short period of time, reducing long-term security risks. By encrypting the user's network configuration information, the user's privacy can be effectively protected and sensitive information can be prevented from being leaked;

[0083] (3) In view of the problem that the BLE communication range is relatively small when the BLE technology is used to connect smart home devices and realize control and monitoring through mobile phone APP, it is only suitable for close-range operation, does not support cross-regional control, and is difficult to achieve multi-device collaboration. This application configures the network for the device to connect to the cloud, realizes long-distance transmission control and multi-device multi-user collaboration;

[0084] (4) In view of the single function of the current smart home system in which users use mobile phone APP to simply monitor and control the status of devices, the smart home system in this application can not only enable users to interact with their own devices, but also interact with other users' devices after being authorized by other users, and devices can also interact with each other;

[0085] (5) In response to the problem that some non-intelligent household appliances cannot be connected to the smart home system, this application connects non-intelligent household appliances to module sockets or strips to achieve functions such as switch control and timing of the appliances.

[0086] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a device control device, etc. The following takes the device control device as an example to illustrate this embodiment and the following embodiments.

[0087] Based on this, the present application embodiment provides a device control method, referring to Figure 3 , Figure 3 This is a flow chart of the first embodiment of the device control method of the present application.

[0088] In this embodiment, the device control method includes steps S10 to S20:

[0089] Step S10: in response to identifying the broadcast message of the module device, establishing a network connection between the module device and a public network router according to the broadcast message;

[0090] Specifically, the module device in the embodiment of the present application can be a smart home device, can be connected to a smart home device, and can also be connected to a non-smart appliance as a module socket or socket strip. The module device is designed based on WiFi and / or Ble hardware modules, that is, the module device includes a wireless module and / or a Bluetooth module, and the broadcast message includes a first broadcast message and / or a second broadcast message.

[0091] Exemplarily, the device control method in the embodiments of the present application can be applied to smart terminals (such as mobile phones, tablet computers, and smart watches, etc.), and users control the device by operating the APP and / or mini-programs installed in the smart terminal. The embodiments of the present application are described using the APP in the mobile phone as an example.

[0092] Exemplarily, the module device is connected through Bluetooth network configuration and / or AP network configuration. Whether it is Bluetooth network configuration or AP network configuration, the user's mobile phone or other smart terminal first needs to discover the existence of smart home devices. In Bluetooth network configuration, this is achieved by searching for specific broadcasts; in AP network configuration, this is achieved by searching for specific WiFi hotspot SSID. After discovering the device, both network configuration methods need to establish a connection. In Bluetooth network configuration, the mobile phone establishes a Bluetooth connection with the GATT Server as a GATT Client; in AP network configuration, the mobile phone connects to the WiFi hotspot created by the device and establishes a UDP connection. Both network configuration methods involve key negotiation and security mode settings to ensure the security of data transmission. Bluetooth network configuration may use encryption algorithms such as DH / RSA / ECC for key negotiation; AP network configuration also involves key negotiation to achieve encrypted data transmission. After establishing a secure connection, both network configuration methods need to transmit network configuration information (such as WiFi SSID and password) to the smart home device so that the device can connect to the user's network. After receiving the network configuration information, the smart home device will try to connect to the user's WiFi network. After the module device is successfully connected to the network, it can send a feedback signal to the mobile phone or other smart terminal to report the connection status and complete the network configuration process.

[0093] Step S20: performing at least one of remote control, data storage, and device management on the module device based on the network connection.

[0094] Furthermore, in response to identifying a broadcast message of a module device, after a network connection between the module device and a public network router is established according to the broadcast message, at least one of remote control, data storage, and device management can be performed on the module device based on the network connection.

[0095] For example, after the module device is successfully connected to the network, it can call HTTP to register with the cloud platform, obtain MQTT parameter information, and connect to the MQTT server. The module device regularly reports heartbeat, power, voltage, current and other data. The cloud platform issues OTA upgrade tasks and instructions. Users interact with devices through the APP, set permissions, create sharing groups, and manage and control devices. Users view and control the status of shared devices through the APP, such as adjusting the temperature, turning on and off lights, etc. The APP provides a real-time notification function. When the status of a shared device changes, all authorized users can receive update notifications. Users can create a sharing group, and members of the group can jointly manage and control module devices. Module devices can interact with each other through the APP, configure linkage rules, and realize data sharing and collaboration. Users create automation scenarios in the APP and define the linkage behavior of multiple module devices. Users can monitor device status changes in real time and obtain interaction history records between module devices.

[0096] Through the above scheme, this embodiment specifically establishes a network connection between the module device and the public network router according to the broadcast message in response to identifying the broadcast message of the module device; performs at least one of remote control, data storage and device management on the module device based on the network connection, and directly establishes a network connection between the module device and the public network router without the need for data transfer via a gateway, thereby enjoying a higher network speed and lower network latency, thereby improving the response speed of smart home devices and saving the cost of configuring a gateway.

[0097] Based on the first embodiment of the present application, a second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar contents as those of the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated later.

[0098] On this basis, please refer to Figure 4 , step S10 includes step S101 and / or step S102:

[0099] Step S101: in response to identifying the first broadcast message, establishing a Bluetooth connection with the module device according to the first broadcast message, and establishing a network connection between the module device and a public network router based on the Bluetooth connection;

[0100] Exemplarily, the first broadcast message is sent by the module device after the general attribute profile server function is enabled through the Bluetooth module, and the steps of establishing a Bluetooth connection with the module device according to the first broadcast message, and establishing a network connection between the module device and a public network router based on the Bluetooth connection include:

[0101] Establishing a Bluetooth connection with the general attribute profile server as a general attribute profile client;

[0102] Sending a data negotiation data frame to the module device using an encryption algorithm based on the Bluetooth connection to determine a shared key, and sending a setting security mode control frame to the module device to determine a security policy, wherein the shared key and the security policy are used to encrypt and / or decrypt communication data between the module device and the smart terminal;

[0103] A wireless connection request control frame is sent to the module device to enable the module device to establish a network connection with the public network router, and a wireless connection status report control frame is sent to the smart terminal to report the connection status of the network connection.

[0104] Reference Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a chip structure of a module device according to a second embodiment of the present application, as shown in FIG. Figure 5As shown in the figure, the module device uses a highly integrated WiFi and BLE combination chip, in which the wireless subsystem includes WiFi 802.11b / g / n and BLE baseband. The microcontroller (MCU) subsystem includes a low-power 32-bit ARM Cortex M4F CPU, cache (Cache) and memory (SRAM, FLASH).

[0105] Reference Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a functional architecture of a module device according to a second embodiment of the present application, such as Figure 6 As shown, the basic functional architecture of the module includes: WiFi module, user module, user SDK development module, Bluetooth module, button module, current voltage power module and log module. The WiFi module includes AP mode and SAT mode; the user module includes initialization, function setting and MQTT communication; the user SDK development module includes http initialization, MQTT subscription and publishing topic, Json parsing and MQTT information sending; the Bluetooth module includes Bluetooth start, stop Bluetooth broadcast and Bluetooth hotspot name configuration; the button module includes button start and button setting; the current voltage power module includes current voltage power initialization, current voltage power measurement and current voltage power calibration; the log module includes printing log information and printing detailed log information.

[0106] Reference Figure 7 , Figure 7 FIG. 1 is a schematic diagram of a Bluetooth network configuration process according to a second embodiment of the present application, as shown in FIG. Figure 7As shown, first, the module device turns on the GATT Server function and sends a broadcast with specific adv data. The broadcast can be customized and does not belong to the BluFi Profile. Use the mobile phone APP to search for the specific broadcast, and the mobile phone connects to the Bluetooth chip as a GATT Client. After the GATT connection is successfully established, the mobile phone sends a "negotiation process" data frame to the device. After the device receives the "negotiation process" data frame, it will parse it according to the user-defined negotiation process. The mobile phone and the device negotiate keys. The negotiation process can be carried out using encryption algorithms such as DH / RSA / ECC. After the negotiation is completed, the mobile phone sends a "set security mode" control frame to the device. After the device receives the "set security mode" control frame, it uses the negotiated shared key and the configured security policy to encrypt and decrypt the communication data. The mobile phone sends the SSID, Password and other necessary information for WiFi connection defined in the "BluFi transmission format" to the device. The mobile phone sends a "WiFi connection request" control frame to the device. After the device receives it, it recognizes that the mobile phone has completed the transmission of the necessary information and is ready to connect to WiFi. After the device is connected to WiFi, it sends a "WiFi connection status report" control frame to the mobile phone to report the connection status and complete the network configuration.

[0107] Step S102: In response to identifying the second broadcast message, a user datagram protocol connection is established with the module device according to the second broadcast message, and a network connection is established between the module device and a public network router based on the user datagram protocol connection.

[0108] Exemplarily, the second broadcast message is sent after the module device enters the network configuration mode and creates a wireless hotspot through the wireless module, and the steps of establishing a user datagram protocol connection with the module device according to the second broadcast message, and establishing a network connection between the module device and a public network router based on the user datagram protocol connection include:

[0109] After connecting to the wireless hotspot, the module device as a user datagram protocol client establishes a user datagram protocol connection with the module device as a user datagram protocol server;

[0110] Sending a data negotiation data frame to the module device using an encryption algorithm based on the user datagram protocol connection to determine a shared key, and sending a setting security mode control frame to the module device to determine a security policy, wherein the shared key and the security policy are used to encrypt and / or decrypt communication data between the module device and the smart terminal;

[0111] The network configuration information is sent to the module device so that the module device establishes a network connection with the public network router, and a wireless connection status report control frame is sent to the smart terminal to report the connection status of the network connection.

[0112] Reference Figure 8 , Figure 8 FIG. 1 is a schematic diagram of an AP network configuration process according to a second embodiment of the present application, as shown in FIG. Figure 8 As shown, first, the module device enters the network configuration mode, creates a WiFi hotspot and broadcasts the SSID. The mobile phone APP searches for devices that are currently in the network configuration state according to the specific hotspot. After connecting to the hotspot, the mobile phone acts as a UDP Client, and the module device acts as a UDP Server for UDP communication, monitoring the local port 8887. After the APP associates the device hotspot, the APP actively establishes a UDP connection with the device's port 8887. After the mobile phone connects to the hotspot released by the device, it also sends data frames to the device for key negotiation and setting the security mode to achieve encryption. The mobile phone APP sends the WiFi name and password to the module device through UDP communication, and the module device sends its own Snid information to the APP.

[0113] For example, during the network configuration process of the module device, encryption functions such as DH / RSA / ECC are supported, allowing two devices to generate a shared key without directly transmitting the key. This means that even if the communication is eavesdropped, the attacker cannot easily obtain the key used for encryption, thereby improving the security of data transmission. By using key exchange, devices can ensure that the communication between them is secure and prevent man-in-the-middle attacks. Attackers cannot insert themselves and steal or tamper with information without being discovered. The encryption protocol allows a new shared key to be generated each time a connection is made, so that even if the key is leaked, the attacker can only use the key for a short time, reducing long-term security risks. By encrypting the user's network configuration information, the user's privacy can be effectively protected and sensitive information can be prevented from being leaked.

[0114] This embodiment uses the above scheme, specifically by responding to the identification of the first broadcast message, establishing a Bluetooth connection with the module device according to the first broadcast message, and establishing a network connection between the module device and the public network router based on the Bluetooth connection; and / or, in response to the identification of the second broadcast message, establishing a user datagram protocol connection with the module device according to the second broadcast message, and establishing a network connection between the module device and the public network router based on the user datagram protocol connection. The module device in this application is directly connected to the public network router, so that the user only needs to enter the WiFi password, and the device can quickly configure the network without additional configuration of the home gateway. Devices directly connected to the router can enjoy higher network speeds and lower delays because data transmission does not need to be transferred through the home gateway, and avoid compatibility issues with specific gateways. When the home gateway fails, the device connected to the gateway may not work properly, while the direct device is not affected by this, reducing single point failures. Under this scheme, users do not need additional home gateway devices, saving costs.

[0115] Based on any of the foregoing embodiments of the present application, a third embodiment of the present application is proposed. In the third embodiment of the present application, the same or similar contents as any of the foregoing embodiments can be referred to the above introduction and will not be described in detail later. Fig. 9 Before step S20, the device control method further includes steps S01 to S02:

[0116] Step S01: the module device registers with the cloud platform through the hypertext transfer protocol to obtain message queue telemetry transmission parameter information to connect to the message queue telemetry transmission server;

[0117] Step S02: the module device reports device status data via the message queue telemetry transmission server, and the device status data is used for at least one of remote control, data storage, and device management of the module device.

[0118] Reference Fig.10 , Fig.10 FIG. 1 is a schematic diagram of a platform registration process according to a third embodiment of the present application. Fig.10 As shown in the figure, after the module device is successfully connected to the network, it immediately calls HTTP to register with the IoT platform (i.e., cloud platform), obtains MQTT parameter information, and connects to the MQTT server.

[0119] Exemplarily, the module device includes a first module device and / or a second module device of a first user, and also includes a third module device of a second user, and the step of performing at least one of remote control, data storage, and device management on the module device based on the network connection includes at least one of the following:

[0120] Acquiring device status data and historical user data of the module device from the cloud platform based on the network connection, and remotely controlling the module device according to the device status data and historical user data;

[0121] Setting access rights and / or control rights for the first module device, so that the second user can access device status data of the first module device through the access rights and / or remotely control the first module device through the control rights;

[0122] configuring a linkage rule for at least one of the first module device, the second module device, and the third module device, so that at least one of the first module device, the second module device, and the third module device performs a linkage behavior according to the linkage rule;

[0123] Wherein, at least one of the first module device, the second module device and the third module device is connected to a smart appliance and / or a non-smart appliance.

[0124] Reference Fig.11 , Fig.11 FIG. 1 is a schematic diagram showing the overall principle according to the third embodiment of the present application. Fig.11As shown in the figure, in the smart home system, the APP can send control instructions to the cloud platform. The cloud platform and the module device publish and subscribe messages through the MQTT protocol. Through the MQTT server, the module device can regularly report heartbeat, power, voltage, current and other data, and the platform can issue OTA upgrade tasks and instructions. The APP displays various data of the device and remotely controls the device. The cloud platform sends, receives and parses json data, collects the user's APP daily usage data, and uses data analysis, deep learning and other technologies combined with historical data stored in the cloud to analyze the daily usage status of the module device. In this system, each user has several module devices, such as sockets, power strips, various lamps, thermostats, humidifiers, etc. Users can interact with the devices through the APP, and users can set permissions through the APP so that the devices can be accessed and controlled by other users. Authorized users can view and control the status of shared devices through the APP, such as adjusting the temperature, turning on and off lights, etc. The APP can provide real-time notification function. When the status of a shared device changes, all authorized users can receive update notifications. Users can create a sharing group, and members of the group can jointly manage and control the device. Devices can also interact with each other through the APP, configure linkage rules between devices, and realize data sharing and collaboration. For example, lighting equipment can automatically adjust the brightness based on the feedback of sensor equipment; when the door lock is unlocked, the indoor lights are automatically turned on, etc. You can also create automation scenes in the APP to define the linkage behavior of multiple devices. For example, when setting the away mode, all devices are automatically turned off or switched to energy-saving mode. Users can monitor the status changes of devices in real time in the APP, obtain the interaction history between devices, and understand the usage and efficiency of devices.

[0125] For example, the user interacts with the device through subscription control via MQTT: the device and the APP establish connections with the MQTT proxy server respectively. The device publishes its own status information as a message to a specific topic, and the user's APP receives device-related status messages by subscribing to a specific topic. When the user wants to control the device on the APP, the APP will publish the control instructions (such as switch control, OTA upgrade, scheduled tasks, camera capture, etc.) as messages to another specific topic, allowing the device to subscribe to the topic. When a control instruction is published to this topic, the device will receive the instruction and perform the corresponding operation.

[0126] For example, the module device interacts with the authorized user's device by the device owner generating a unique authorization code in the APP, and the authorization code is associated with a specific device or device group. The device owner informs the authorized user of the authorization code, and the authorized user enters the authorization code in the APP. After completing the authorization verification, the control authority of the device can be obtained. For example, the main user of a door lock device can generate a sharing code, and other users can obtain the control authority of the door lock after scanning the code and confirming it.

[0127] For example, the interaction between module devices is to achieve data sharing and collaboration by configuring the linkage logic between devices. For example, the lighting device can automatically adjust the brightness according to the feedback of the sensor device; when the door lock is unlocked, the indoor lights are automatically turned on, etc.

[0128] For example, in the smart home system solution of the present application, some non-intelligent appliances that cannot be connected to the Internet are connected to module sockets or power strips, for example Fig.11 The module device 1 (first module device) of the user 1 (ie, the first user) can realize functions such as switch control and timing of the electrical appliance.

[0129] This embodiment adopts the above scheme. Specifically, the module device registers with the cloud platform through the hypertext transfer protocol, obtains the message queue telemetry transmission parameter information, and connects to the message queue telemetry transmission server; the module device reports the device status data through the message queue telemetry transmission server, and the device status data is used to remotely control the module device, store data, and manage the device at least one of the following, so that in the smart home scene, the APP on the user's mobile phone can obtain the data of the home device in real time, and can display the data information reported by the device to the user at any time, and report and remind the various data parameters of the home device, and alarm the abnormal data, and the user can perform various customized interactions with the smart home device. While ensuring the safety of the device and the user, it brings better life convenience to the user and improves the user experience; by using data mining, machine learning, deep learning and other technologies on the historical data stored in the cloud, the daily use status of the device is analyzed, and positive suggestions and reminders are provided; this application can access massive devices in various massive user scenarios, connect to the same cloud platform through simple network configuration, and enable any device to interact through the APP through authorization between users.

[0130] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the device control method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0131] This application also provides a device control device, please refer to Fig.12, the device is applied to a smart terminal, comprising:

[0132] A network configuration module, configured to establish a network connection between the module device and a public network router according to the broadcast message in response to identifying the broadcast message of the module device;

[0133] A control module is used to perform at least one of remote control, data storage and device management on the module device based on the network connection.

[0134] The device control device provided by the present application adopts the device control method in the above embodiment to solve the technical problem of device control. Compared with the prior art, the beneficial effects of the device control device provided by the present application are the same as the beneficial effects of the device control method provided by the above embodiment, and other technical features in the device control device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0135] The present application provides a device control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the device control method in the above-mentioned embodiment one.

[0136] Reference below Fig.13 , which shows a schematic diagram of the structure of a device control device suitable for implementing the embodiment of the present application. The device control device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable APPlication Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.13 The device control device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0137] like Fig.13As shown, the device control device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the device control device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the device control device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a device control device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0138] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0139] The device control device provided by the present application adopts the device control method in the above embodiment to solve the technical problem of device control. Compared with the prior art, the beneficial effects of the device control device provided by the present application are the same as the beneficial effects of the device control method provided by the above embodiment, and the other technical features in the device control device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0140] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0142] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the device control method in the above-mentioned embodiment.

[0143] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0144] The computer-readable storage medium may be included in the device control device; or may exist independently without being assembled into the device control device.

[0145] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the device control device, the device control device: establishes a network connection between the module device and a public network router according to the broadcast message in response to identifying a broadcast message of the module device; performs at least one of remote control, data storage and device management on the module device based on the network connection, directly establishes a network connection between the module device and the public network router, and does not need to rely on a gateway for data transfer, so as to enjoy higher network speed and lower network delay, thereby improving the response speed of smart home devices and saving the cost of configuring a gateway.

[0146] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0147] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0148] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0149] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned device control method, and can solve the technical problems of device control. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the device control method provided in the above-mentioned embodiment, and will not be repeated here.

[0150] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned device control method when executed by a processor.

[0151] The computer program product provided in this application can solve the technical problem of device control. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the device control method provided in the above embodiment, which will not be repeated here.

[0152] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A device control method, characterized in that: The method is applied to a smart terminal, comprising: In response to identifying a broadcast message of a module device, establishing a network connection between the module device and a public network router according to the broadcast message; At least one of remote control, data storage, and device management is performed on the module device based on the network connection.

2. The method according to claim 1, characterized in that The broadcast message includes a first broadcast message and / or a second broadcast message, the module device includes a Bluetooth module and / or a wireless module, and the step of establishing a network connection between the module device and a public network router according to the broadcast message in response to identifying the broadcast message of the module device includes: In response to identifying the first broadcast message, establishing a Bluetooth connection with the module device according to the first broadcast message, and establishing a network connection between the module device and the public network router based on the Bluetooth connection; and / or, In response to identifying the second broadcast message, a user datagram protocol connection is established with the module device according to the second broadcast message, and a network connection is established between the module device and the public network router based on the user datagram protocol connection.

3. The method according to claim 2, characterized in that The first broadcast message is sent by the module device after the general attribute profile server function is enabled through the Bluetooth module. The steps of establishing a Bluetooth connection with the module device according to the first broadcast message and establishing a network connection between the module device and the public network router based on the Bluetooth connection include: Establishing a Bluetooth connection with the general attribute profile server as a general attribute profile client; Sending a data negotiation data frame to the module device using an encryption algorithm based on the Bluetooth connection to determine a shared key, and sending a setting security mode control frame to the module device to determine a security policy, wherein the shared key and the security policy are used to encrypt and / or decrypt communication data between the module device and the smart terminal; A wireless connection request control frame is sent to the module device to enable the module device to establish a network connection with the public network router, and a wireless connection status report control frame is sent to the smart terminal to report the connection status of the network connection.

4. The method according to claim 2, characterized in that The second broadcast message is sent after the module device enters the network configuration mode and creates a wireless hotspot through the wireless module. The steps of establishing a user datagram protocol connection with the module device according to the second broadcast message and establishing a network connection between the module device and the public network router based on the user datagram protocol connection include: After connecting to the wireless hotspot, the module device as a user datagram protocol client establishes a user datagram protocol connection with the module device as a user datagram protocol server; Sending a data negotiation data frame to the module device using an encryption algorithm based on the user datagram protocol connection to determine a shared key, and sending a setting security mode control frame to the module device to determine a security policy, wherein the shared key and the security policy are used to encrypt and / or decrypt communication data between the module device and the smart terminal; The network configuration information is sent to the module device so that the module device establishes a network connection with the public network router, and a wireless connection status report control frame is sent to the smart terminal to report the connection status of the network connection.

5. The method according to claim 1, characterized in that Before the step of performing at least one of remote control, data storage and device management on the module device based on the network connection, the step further includes: The module device registers with the cloud platform through the hypertext transfer protocol to obtain message queue telemetry transmission parameter information to connect to the message queue telemetry transmission server; The module device reports device status data via the message queue telemetry transmission server, and the device status data is used for at least one of remote control, data storage, and device management of the module device.

6. The method according to claim 5, characterized in that The module devices include a first module device and / or a second module device of a first user, and also include a third module device of a second user, and the step of performing at least one of remote control, data storage, and device management on the module devices based on the network connection includes at least one of the following: Acquiring device status data and historical user data of the module device from the cloud platform based on the network connection, and remotely controlling the module device according to the device status data and the historical user data; Setting access rights and / or control rights for the first module device, so that the second user can access device status data of the first module device through the access rights and / or remotely control the first module device through the control rights; configuring a linkage rule for at least one of the first module device, the second module device, and the third module device, so that at least one of the first module device, the second module device, and the third module device performs a linkage behavior according to the linkage rule; Wherein, at least one of the first module device, the second module device and the third module device is connected to a smart appliance and / or a non-smart appliance.

7. A device control device, characterized in that: The device is applied to a smart terminal and includes: A network configuration module, configured to establish a network connection between the module device and a public network router according to the broadcast message in response to identifying the broadcast message of the module device; A control module is used to perform at least one of remote control, data storage and device management on the module device based on the network connection.

8. A device control device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the device control method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the device control method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the device control method according to any one of claims 1 to 6 are implemented.