Equipment control method and system

By combining HTTPS and MQTT protocols in the device control system, the Flutter framework is used to realize cross-platform device control, which solves the problem that protocols in the existing technology are difficult to efficiently combine, and achieves the security, efficient, real-time control and cross-platform consistency of the device.

CN119835345APending Publication Date: 2025-04-15XIAMEN LEELEN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411953552.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In existing equipment control systems, HTTPS and MQTT protocols are difficult to combine efficiently and quickly, resulting in poor device response speed and insufficient control efficiency.

Method used

Through the Flutter cross-platform development framework, combined with HTTPS and MQTT protocols, the device can be safe, efficient and real-time control. The specific method is: the client sends control instructions to the server through HTTPS, and the server then sends the instructions to the Internet of Things device through MQTT, and feedbacks the instruction execution status through MQTT.

Benefits of technology

It realizes safe, efficient and real-time control of the equipment, reduces the repeated development of multi-platform code, reduces development and maintenance costs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835345A_ABST
    Figure CN119835345A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information communication, in particular to an equipment control method and system, and the method comprises the steps: receiving a control instruction sent by a client through a Flutter application program based on a hypertext transfer security protocol; and sending the control instruction to the Internet of Things equipment based on a message queue telemetering transmission protocol, so that the Internet of Things equipment executes the control instruction, and feeds back an instruction execution state to the client through the message queue telemetering transmission protocol. According to the method, cross-platform control is realized by using a Flutter framework, and the work of repeated development of multi-platform codes is reduced, so that the multi-platform development and maintenance cost can be reduced; the control instruction is transmitted between the client and the server through HTTPS, so that the safety of the control instruction can be improved; information transmission is carried out through the MQTT, the time delay of information transmission can be reduced, and safe, efficient and real-time control of equipment can be realized through the synergistic effect of the HTTPS and the MQTT, so that the purpose of quick response is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information communication technology, and in particular to a device control method and system in the field of information communication technology. Background Art

[0002] With the rapid development of the Internet of Things (IoT) and smart home systems, the demand for communication between devices is growing exponentially. The choice of communication protocol has a crucial impact on data transmission efficiency, system response time, resource consumption, etc. In the current IoT system, Message Queuing Telemetry Transport (MQTT) and Hypertext Transfer Protocol (HTTP) have become widely used protocols. MQTT is a lightweight, publish / subscribe-based communication protocol suitable for low-bandwidth, unstable networks, and low-power devices. HTTP is a traditional protocol based on the request / response model, often used for data synchronization and short-term connection scenarios.

[0003] In related technologies, MQTT and HTTP protocols run independently and cannot achieve mutual integration and data sharing, which increases the complexity of the caller. In addition, the code is repeated on multiple platforms, which increases development and maintenance costs. Summary of the invention

[0004] The purpose of the present invention is to provide a device control method and system, and the technical solutions adopted are as follows:

[0005] In a first aspect, an embodiment of the present invention provides a device control method, which is applied to a server, and the method includes:

[0006] Receive control instructions sent by the client through the Flutter application based on the Hypertext Transfer Protocol Secure Sockets Layer;

[0007] Based on the message queue telemetry transmission protocol, the control instruction is sent to the IoT device so that the IoT device executes the control instruction, and the instruction execution status is fed back to the client through the message queue telemetry transmission protocol.

[0008] In a second aspect, an embodiment of the present invention provides a device control method, which is applied to a client, and the method includes:

[0009] In response to receiving the input control instruction, sending the control instruction to the server based on the Hypertext Transfer Protocol Secure Sockets Layer (HTTP), so that the server sends the control instruction to the Internet of Things device based on the Message Queue Telemetry Transmission Protocol;

[0010] The instruction execution status fed back by the IoT device is received based on the message queue telemetry transmission protocol.

[0011] In a third aspect, an embodiment of the present invention provides a device control method, which is applied to an Internet of Things device, and the method includes:

[0012] Receiving a control instruction sent by a server based on a message queue telemetry transmission protocol; wherein the control instruction is sent by a client to the server via a hypertext transfer protocol secure protocol;

[0013] Execute the control instruction to obtain the instruction execution status;

[0014] Based on the message queue telemetry transmission protocol, the instruction execution status is fed back to the client.

[0015] In a fourth aspect, an embodiment of the present invention provides a device control system, the system comprising:

[0016] The client is used to send the control instruction to the server based on the Hypertext Transfer Protocol Security protocol in response to receiving the input control instruction;

[0017] The server is used to receive the control instruction sent by the client based on the Hypertext Transfer Protocol Secure Sockets Layer (HTTP Secure Sockets Layer); and send the control instruction to the IoT device based on the Message Queue Telemetry Transmission Protocol, so that the IoT device executes the control instruction;

[0018] The IoT device is used to execute the control instruction to obtain the instruction execution status; and based on the message queue telemetry transmission protocol, feed back the instruction execution status to the client.

[0019] In a fifth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method described in the first aspect, the second aspect or the third aspect.

[0020] In a sixth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method described in the first aspect, the second aspect or the third aspect.

[0021] The present invention has the following beneficial effects: under the framework of the Flutter application, the server receives the control instructions sent by the client through the Flutter application based on the Hypertext Transfer Protocol Secure (HTTPS); in this way, the Flutter framework is used to realize cross-platform control, which greatly reduces the work of repeated development of multi-platform codes, thereby reducing the cost of multi-platform development and maintenance; and the client and the server transmit the control instructions through HTTPS, which can improve the security of the control instructions. Afterwards, the server sends the control instructions to the Internet of Things device through the message queue telemetry transmission protocol MQTT, so that the Internet of Things device executes the control instructions, and feeds back the instruction execution status to the client through the MQTT. In this way, information transmission through MQTT can reduce the delay of information transmission, and the synergy of HTTPS and MQTT can realize safe, efficient and real-time control of the device to achieve the purpose of rapid response. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 It is a schematic diagram of an implementation flow of a device control method provided by an embodiment of the present invention;

[0024] Figure 2 is an interactive schematic diagram of a device control method provided by an embodiment of the present invention;

[0025] Figure 3 It is a schematic diagram of an implementation framework of a device control method provided by an embodiment of the present invention;

[0026] Figure 4 It is a schematic diagram of the structure of a device control system provided by an embodiment of the present invention;

[0027] Figure 5 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a device control method proposed according to the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0029] Among them, in the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" refers to two or more than two.

[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0031] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0032] In related technologies, MQTT is a lightweight, publish / subscribe-based communication protocol suitable for low-bandwidth, unstable networks, and low-power devices. HTTP, on the other hand, is a traditional protocol based on the request / response model, commonly used in data synchronization and short-term connection scenarios. As the complexity of application scenarios increases, how to combine the advantages of both and build a dual-protocol fusion communication mechanism based on the Flutter cross-platform framework has become a research focus.

[0033] As an open source cross-platform development framework, Flutter can significantly improve application development efficiency and cross-platform consistency with its high-performance rendering engine and unified programming interface. Using Flutter to integrate MQTT and HTTP protocols can not only effectively reduce development and maintenance costs, but also ensure the consistency and efficiency of applications on different platforms, providing a new technical path for the deep integration of IoT and mobile applications.

[0034] In the technical solution based on Flutter, the network requests of HTTP and MQTT protocols are called independently, which is mainly reflected in the following aspects:

[0035] HTTP is a stateless request / response protocol, mainly used for data exchange between clients and servers. It is suitable for the request-response model and for scenarios of obtaining resources and data.

[0036] MQTT is a lightweight publish / subscribe message transmission protocol suitable for low-bandwidth, high-latency or unstable network environments. It is often used for real-time communication between IoT devices and supports one-to-many message delivery.

[0037] In the design, the network request and response processes of HTTP and MQTT are as follows:

[0038] Among them: HTTP request process, including:

[0039] 1. The client initiates a request and sends it to the server.

[0040] 2. The server processes the request and returns the corresponding data.

[0041] 3. The client receives the data and processes it accordingly.

[0042] The communication process of MQTT includes:

[0043] 1. The client connects to the MQTT broker.

[0044] 2. The client subscribes to a specific topic.

[0045] 3. When a new message is published to the topic, the MQTT agent pushes the message to all clients subscribed to the topic.

[0046] During HTTP requests and responses, MQTT communication information does not interfere or intervene. This design ensures independence between the two and helps achieve clear modularity. For example, HTTP requests can be used to obtain user data or upload files, while MQTT can be used to monitor device status in real time or receive sensor data.

[0047] Since HTTP is a request / response model, its latency is usually higher than MQTT's real-time message push, especially in unstable network conditions. The MQTT protocol is relatively lightweight and suitable for environments with limited bandwidth, while HTTP may require a larger bandwidth to transmit data.

[0048] HTTP is applicable to scenarios including: obtaining RESTful API data, such as user information, product lists, etc. Uploading data to the server, such as when a user submits a form or uploads a file.

[0049] MQTT is applicable to scenarios including: real-time data monitoring, such as IoT device status updates, and message push services, such as chat applications or notification systems.

[0050] Thus, in the related art, since the MQTT and HTTP protocols run independently, they cannot achieve mutual integration and data sharing, which increases the complexity of the caller. Handling two protocols in multiple places may lead to duplicate code logic, increasing the cost of maintenance and update. Independent protocols may make debugging more complicated, and it is necessary to check the requests and responses of HTTP and MQTT separately, which increases the complexity of debugging. HTTP requests need to go through a request-response cycle, while MQTT may not be able to update the status in time in some cases, resulting in delays. Since the two run independently, data inconsistency may occur, especially when multiple systems modify the same data at the same time, state synchronization is more difficult. Under changing network conditions, independent solutions cannot dynamically switch protocols as needed, such as switching to a lighter MQTT in a high-latency network. Each protocol needs to maintain an independent connection, which may lead to increased consumption of device resources (such as memory and battery), especially on mobile devices. When using the application, users may have a poor experience due to the delay between requests and responses, affecting overall user satisfaction. Compatibility issues with third-party services: When integration with external services is required, independent protocols may limit functionality, increase the complexity of integration, and be incompatible with third-party services. As functionality increases, independent protocol processing may lead to complex system architecture, making subsequent expansion and upgrades more difficult.

[0051] Based on this, an embodiment of the present invention provides a device control method, which aims to solve the problem that it is difficult to efficiently and quickly combine the HTTPS and MQTT protocols in the existing device control system, resulting in poor device response speed and insufficient control efficiency. The existing device control system usually uses HTTPS or MQTT protocol alone for communication, which has the following shortcomings in practical applications:

[0052] 1. Issues with using HTTPS alone: ​​HTTPS is suitable for reliable request-response communication, and is suitable for sending configurations and obtaining device status. However, since it takes a long time to establish a connection and the protocol is heavy, it is not suitable for frequent data updates or real-time control. Therefore, using HTTPS alone cannot meet real-time control scenarios that require fast response.

[0053] 2. The problem of using MQTT alone: ​​As a lightweight publish / subscribe protocol, MQTT is suitable for high-frequency, real-time data transmission. Although MQTT can achieve low-latency data push, it is difficult to ensure the security of communication because MQTT itself lacks a reliable authentication mechanism and secure transmission protocol. Therefore, in data transmission scenarios that require high security, using MQTT alone is not enough.

[0054] 3. Insufficient coordination between HTTPS and MQTT: Existing technologies make it difficult to effectively combine the advantages of HTTPS and MQTT to achieve rapid control and response of devices while ensuring communication security. Usually, control systems cannot strike a balance between security and real-time performance, resulting in delayed control response or poor security.

[0055] 4. Multiple platform code duplication increases development and maintenance costs

[0056] In traditional development, Android and iOS systems need to write independent codes to implement device control functions. Each platform has different programming languages ​​and development frameworks (e.g., Java / Kotlin for Android, Objective-C / Swift for iOS). Developers need to write duplicate logic for each platform, resulting in increased development and maintenance costs. Especially when functions need to be updated or adjusted, the code needs to be updated synchronously on multiple platforms, which is inefficient and prone to inconsistent errors.

[0057] Based on this, in the embodiment of the present invention, the safe, efficient and real-time control of the device is realized through the synergy of HTTPS and MQTT to achieve the purpose of rapid response. The embodiment of the present invention realizes the unification of multi-platform device control codes through the Flutter cross-platform development framework, thereby greatly reducing the repeated development work of multi-platform codes and reducing development and maintenance costs.

[0058] Based on this, an embodiment of the present invention provides a device control method. The following specifically describes a specific solution of a device control method provided by the present invention in conjunction with the accompanying drawings. Figure 1 , which shows a schematic diagram of an implementation flow of a device control method provided by an embodiment of the present invention, applied to a server, the method comprising:

[0059] 101, receiving a control instruction sent by a client through a Flutter application based on the Hypertext Transfer Protocol Secure Sockets Layer (HTTP SEC).

[0060] Here, the control instruction can be any type of instruction to control the IoT device, such as the startup instruction of the IoT device, the shutdown instruction of the IoT device, etc. After the user inputs the control instruction, the client sends the control instruction to the server via HTTPS. In this way, the control instruction is transmitted via HTTPS, which can ensure the security of the control instruction. Among them, HTTPS is a transmission protocol for secure communication. On the basis of HTTP, an encryption protocol (Secure Sockets Layer / Transport Layer Security, SSL / TLS) is added for encryption to ensure the security of data transmission between the client and the server.

[0061] 102. Based on the message queue telemetry transmission protocol, the control instruction is sent to the IoT device, so that the IoT device executes the control instruction, and the instruction execution status is fed back to the client through the message queue telemetry transmission protocol.

[0062] Here, after receiving the control instruction sent by the client through the Hypertext Transfer Protocol Secure Sockets Layer, the server sends the control instruction to the IoT device through MQTT; the IoT device executes the control instruction and, when the execution is completed, feeds back the instruction execution status to the client through MQTT.

[0063] In an embodiment of the present invention, the server receives the control instructions sent by the client through the Flutter application based on the Hypertext Transfer Protocol Security Protocol; in this way, the client and the server transmit the control instructions through HTTPS, which can improve the security of the control instructions. Afterwards, the server sends the control instructions to the IoT device through the message queue telemetry transmission protocol MQTT, so that the IoT device executes the control instructions, and feeds back the instruction execution status to the client through the MQTT. In this way, through the synergy of HTTPS and MQTT, safe, efficient and real-time control of the device can be achieved to achieve the purpose of rapid response. Moreover, through the Flutter cross-platform development framework, the unification of multi-platform device control codes is achieved, thereby greatly reducing the repeated development work of multi-platform codes and reducing development and maintenance costs.

[0064] In some embodiments, the interaction process between the server, the client, and the IoT device is as follows: Figure 2 As shown:

[0065] 201. The client starts the Flutter application and loads the Flutter user interface on the display interface of the client.

[0066] Here, the interaction framework between the client, server and IoT devices is as follows Figure 3As shown, after starting the Flutter application 31 of the client, a control instruction is sent to the server 32 through HTTPS based on the Flutter application, and real-time feedback from the IoT device 33 is received through MQTT. The server 32 processes the control instruction of the client and forwards the control instruction to the IoT device through MQTT. The physical network device 33 receives and executes the MQTT control instruction of the server, and feeds back the execution result to the client through MQTT. The interface is initialized on the display interface of the client, and the Flutter application is started to load the user interface and control logic. On the display interface of the client, the Flutter application is started and the user interface and control logic of Flutter are loaded; wherein, the control logic of the Flutter application is the various steps of information processing after Flutter is started.

[0067] 202. The client receives a login request input in the user interface.

[0068] Here, after starting the Flutter application, a login request input by the user in the user interface of the Flutter application is received according to the loaded control logic. For example, the user enters account information in the interface to generate a login request.

[0069] 203. In response to receiving the input login request, the client sends an identity authentication request to the server based on the Hypertext Transfer Protocol Security.

[0070] Here, after receiving the input login request, the client sends an authentication request to the server via HTTPS so that the server verifies the identity and returns an authorization token.

[0071] 204. The server receives an identity authentication request sent by the client based on the Hypertext Transfer Protocol Security.

[0072] 205. The server performs identity authentication on the client in response to the identity authentication request.

[0073] Here, the server receives the identity authentication request sent by the client via HTTPS, and authenticates the client according to the pre-stored client identifier (eg, client account, password, etc.) to detect whether the account information carried in the identity authentication request is a legitimate account.

[0074] 206. If the client authentication is successful, the server returns an authorization token to the client based on the Hypertext Transfer Protocol Security protocol.

[0075] Here, if the account information carried in the identity authentication request sent by the client is included in the client identifier pre-stored by the server, then the client authentication is determined to be successful, and the server returns an authorization token to the client via HTTPS for subsequent use by the client.

[0076] 207. The client receives the authorization token fed back by the server and executes the login request.

[0077] Here, after the client receives the authorization token fed back by the server, it executes a login request to log in to the Flutter application, so that it can subsequently transmit control instructions in the framework of the Flutter application, and timely update the instruction execution status fed back by the IoT device in the display interface of the Flutter application.

[0078] 208. The client subscribes to the status topic of the IoT device based on the message queue telemetry transmission protocol.

[0079] 209. The client receives feedback information from the IoT device in real time based on the status topic.

[0080] Here, the client subscribes to the device status topic through MQTT to receive real-time status feedback from the IoT device. The feedback information includes: the real-time status fed back by the IoT device to the client through MQTT; for example, after the IoT device executes the control instruction, it feeds back the instruction execution status to the client through MQTT.

[0081] 210. In response to receiving the input control instruction, the client sends the control instruction to the server based on the Hypertext Transfer Protocol Secure (HTTP).

[0082] Here, the control command is entered in the user interface of the Flutter application on the client, and the control command is sent to the server via HTTPS.

[0083] 211. The server sends the control instruction to the IoT device based on the message queue telemetry transmission protocol.

[0084] Here, after receiving the control instruction, the server verifies the identity information of the client and the permission information of the IoT device, and after the verification is passed, sends the control instruction to the IoT device based on MQTT. That is, the above step 210 can be implemented by the following process:

[0085] First, in response to receiving the control instruction, the server verifies the identity information of the client and the authority information of the IoT device to obtain a verification result.

[0086] Here, after receiving the control instruction, the server verifies the client's identity information (for example, the client's account information, client name, etc.) and the permission information of the IoT device to determine whether the client's identity information is legal, whether the IoT device has the authority to execute the control instruction, and whether it has the authority to interact with the server, thereby obtaining a verification result.

[0087] Then, when the verification result meets the preset conditions, the server sends the control instruction to the Internet of Things device through the message queue telemetry transmission protocol.

[0088] Here, the precondition is that the client's identity information is included in the account information pre-stored in the server, and the IoT device has the authority to execute control instructions and interact with the server. After the server verifies the client's identity information and the permission information of the IoT device, it transmits the control instruction to the IoT device through MQTT. In this way, the server uses MQTT to push the control instruction to the IoT device, and the IoT device feeds back the instruction execution status to the client through MQTT after executing the control instruction. The client subscribes to the device status topic to achieve real-time update of the IoT device status. In addition, MQTT has a low latency, so it can achieve real-time control and feedback functions.

[0089] 212, the IoT device receives a control instruction sent by the server based on a message queue telemetry transmission protocol.

[0090] Here, the IoT device establishes communication with the server through MQTT and receives control instructions sent by the server through the message queue telemetry transmission protocol. In this way, the control instructions are encrypted and transmitted through HTTPS, and the SSL / TLS protocol is used to ensure data security and prevent sensitive data from being intercepted or tampered with during transmission. In the authentication stage, the client obtains an authorization token to ensure that each HTTPS request has valid authentication credentials.

[0091] 213, the IoT device executes the control instruction and obtains the instruction execution status.

[0092] Here, after receiving the control execution, the IoT device executes the control instruction, and after completing the execution of the instruction, generates the instruction execution status.

[0093] 214, the IoT device feeds back the instruction execution status to the client based on the message queue telemetry transmission protocol.

[0094] Here, during the interaction between the client, server and IoT devices, HTTPS is responsible for the encrypted transmission of sensitive data (such as user authentication and control instructions) to ensure data security; MQTT is responsible for the transmission of real-time feedback information. The long connection between the client and the IoT device can avoid frequent identity authentication and improve real-time performance and user experience.

[0095] After step 214, the client receives the instruction execution status fed back by the IoT device based on the message queue telemetry transmission protocol, and updates the user interface of the Flutter application in time. In some possible implementations, since the client subscribes to the status topic of the IoT device through the message queue telemetry transmission protocol, after the IoT device feeds back the instruction execution status, the client receives the instruction execution status fed back by the IoT device through the status topic; and based on the instruction execution status fed back by the IoT device, the user interface of the Flutter application in the client is updated to present the instruction execution status of the IoT device. Here, after the IoT device executes the command, it feeds back the instruction execution status to the client through MQTT, and the client receives the feedback and updates the interface display. The client receives real-time status feedback from the IoT device, updates the interface information through the subscribed MQTT topic, and can provide instant feedback to the user.

[0096] In the embodiment of the present invention, by using the Flutter framework, single-code cross-platform device control on different platforms is implemented, the development process is simplified, and the consistency of different platforms is ensured. HTTPS is used for encrypted transmission of control instructions to ensure data security; MQTT is used to achieve real-time feedback of device status to ensure low latency and high responsiveness of the control system, and the combination of HTTPS and MQTT is realized; and the client subscribes to the device status topic through MQTT after successful identity authentication to ensure instant feedback of device status and real-time update of the interface to improve user experience. Through the collaborative work of HTTPS and MQTT, a balance between security and real-time performance is achieved to meet the reliability and rapid response requirements of device control; thereby ensuring efficient and secure device control and cross-platform consistency.

[0097] The present invention provides a device control system. Figure 4 , which shows a schematic diagram of the composition structure of a device control system provided by an embodiment of the present invention, the system 400 includes:

[0098] The client 401 is used for sending the control instruction to the server based on the Hypertext Transfer Protocol Security in response to receiving the input control instruction;

[0099] The server 402 is used to receive the control instruction sent by the client based on the Hypertext Transfer Protocol Secure Sockets Layer (HTTP Secure Sockets Layer); and send the control instruction to the IoT device based on the Message Queue Telemetry Transmission Protocol, so that the IoT device executes the control instruction;

[0100] The IoT device 403 is used to execute the control instruction to obtain the instruction execution status; and based on the message queue telemetry transmission protocol, feed back the instruction execution status to the client.

[0101] Optionally, the transmission medium can be a wired link (for example, but not limited to, coaxial cable, optical fiber and digital subscriber line (DSL), etc.) or a wireless link (for example, but not limited to, wireless Fidelity (WIFI), Bluetooth and mobile device network, etc.). It should be noted that: the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the method embodiments provided in the above embodiments belong to the same concept. The specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0102] Figure 5 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 5 As shown, the computer device 500 includes: a memory 501, a processor 502, and a computer program 503 stored in the memory 501 and running on the processor 502, wherein when the processor 502 executes the computer program 503, the computer device can execute any one of the device control methods described above.

[0103] In addition, an embodiment of the present invention also protects a device, which may include a memory and a processor, wherein an executable program code is stored in the memory, and the processor is used to call and execute the executable program code to perform a device control method provided by an embodiment of the present invention. This embodiment can divide the functional modules of the device according to the above method example. For example, it can correspond to each functional module, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, which is only a logical function division, and there may be other division methods in actual implementation. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0104] It should be understood that the system provided in this embodiment is used to execute the above-mentioned device control method, so the same effect as the above-mentioned implementation method can be achieved. In the case of an integrated unit, the system may include a processing module and a storage module. Among them, when the system is applied to the device, the processing module can be used to control and manage the actions of the device. The storage module can be used to support the device to execute mutual program codes, etc. Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logical boxes, modules and circuits described in conjunction with the disclosure of the present invention. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module can be a memory.

[0105] In addition, the system provided by the embodiment of the present invention may be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip may execute a device control method provided by the above embodiment. This embodiment also provides a computer-readable storage medium, in which a computer program code is stored, and when the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement a device control method provided by the above embodiment.

[0106] This embodiment also provides a computer program product, when the computer program product is run on a computer, the computer executes the above-mentioned related steps to implement a device control method provided by the above embodiment. Among them, the system, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above, so the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here. Through the description of the above implementation mode, the technicians in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional modules as needed, that is, the internal structure of the system is divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the system embodiment described above is only schematic, for example, the division of modules or units is only a logical function division, and there can be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, system or unit, which may be electrical, mechanical or other forms.

[0107] It should be noted that the sequence of the above-mentioned embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or may be advantageous. The various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments. The above content is only a specific implementation method of the present invention, but the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention.

Claims

1. A device control method, characterized in that: Applied to a server, the method comprises: Receive control instructions sent by the client through the Flutter application based on the Hypertext Transfer Protocol Secure Sockets Layer; Based on the message queue telemetry transmission protocol, the control instruction is sent to the IoT device so that the IoT device executes the control instruction, and the instruction execution status is fed back to the client through the message queue telemetry transmission protocol.

2. The method according to claim 1, characterized in that: The control instruction is sent to the IoT device based on the message queue telemetry transmission protocol, including: In response to receiving the control instruction, verifying the identity information of the client and the authority information of the IoT device to obtain a verification result; When the verification result meets the preset conditions, the control instruction is sent to the Internet of Things device through the message queue telemetry transmission protocol.

3. The method according to claim 1, characterized in that The method further comprises: Receiving an identity authentication request sent by the client based on the Hypertext Transfer Protocol Security; In response to the identity authentication request, performing identity authentication on the client; If the client authentication is successful, an authorization token is returned to the client based on the Hypertext Transfer Protocol Security protocol.

4. A device control method, characterized in that: Applied to a client, the method comprises: In response to receiving the input control instruction, sending the control instruction to the server based on the Hypertext Transfer Protocol Secure Sockets Layer (HTTP), so that the server sends the control instruction to the Internet of Things device based on the Message Queue Telemetry Transmission Protocol; The instruction execution status fed back by the IoT device is received based on the message queue telemetry transmission protocol.

5. The method according to claim 4, characterized in that The method further comprises: In response to receiving the input login request, sending an identity authentication request to the server based on the Hypertext Transfer Protocol Security; Receive the authorization token fed back by the server and execute the login request.

6. The method according to claim 4, characterized in that In response to receiving the input login request, before sending the identity authentication request to the server based on the Hypertext Transfer Protocol Security, the method further includes: On the display interface of the client, start the Flutter application and load the user interface of the Flutter application; In the user interface, the login request is received.

7. The method according to claim 4, characterized in that Before receiving the instruction execution status fed back by the IoT device based on the message queue telemetry transmission protocol, the method further includes: Subscribe to the status topic of the IoT device based on the message queue telemetry transmission protocol; Based on the status topic, feedback information of the Internet of Things device is received in real time.

8. The method according to claim 7, characterized in that The receiving the instruction execution status fed back by the IoT device based on the message queue telemetry transmission protocol includes: Based on the status topic, receiving the instruction execution status fed back by the IoT device; Based on the instruction execution status fed back by the IoT device, the user interface of the Flutter application in the client is updated to present the instruction execution status of the IoT device.

9. A device control method, characterized in that: Applied to an IoT device, the method comprises: Receiving a control instruction sent by a server based on a message queue telemetry transmission protocol; wherein the control instruction is sent by a client to the server via a hypertext transfer protocol secure protocol; Execute the control instruction to obtain the instruction execution status; Based on the message queue telemetry transmission protocol, the instruction execution status is fed back to the client.

10. A device control system, characterized in that: The system comprises: The client is used to send the control instruction to the server based on the Hypertext Transfer Protocol Security protocol in response to receiving the input control instruction; The server is used to receive the control instruction sent by the client based on the Hypertext Transfer Protocol Secure Sockets Layer (HTTP Secure Sockets Layer); and send the control instruction to the IoT device based on the Message Queue Telemetry Transmission Protocol, so that the IoT device executes the control instruction; The IoT device is used to execute the control instruction to obtain the instruction execution status; and based on the message queue telemetry transmission protocol, feed back the instruction execution status to the client.