CN112511631B - Control system and method of intelligent device - Google Patents

Control system and method of intelligent device Download PDF

Info

Publication number
CN112511631B
CN112511631B CN202011379510.6A CN202011379510A CN112511631B CN 112511631 B CN112511631 B CN 112511631B CN 202011379510 A CN202011379510 A CN 202011379510A CN 112511631 B CN112511631 B CN 112511631B
Authority
CN
China
Prior art keywords
control instruction
conversion module
sending
protocol conversion
response information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011379510.6A
Other languages
Chinese (zh)
Other versions
CN112511631A (en
Inventor
王菁宇
荣霞芳
张江鹏
陈峰峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Hongmei Intelligent Technology Co Ltd
Original Assignee
Sichuan Hongmei Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Hongmei Intelligent Technology Co Ltd filed Critical Sichuan Hongmei Intelligent Technology Co Ltd
Priority to CN202011379510.6A priority Critical patent/CN112511631B/en
Publication of CN112511631A publication Critical patent/CN112511631A/en
Application granted granted Critical
Publication of CN112511631B publication Critical patent/CN112511631B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention provides a control system and a method of intelligent equipment, wherein the system comprises the following steps: the system comprises a user terminal, a cloud server and intelligent equipment; the user terminal is used for sending a control instruction; the control instruction is used for controlling the intelligent equipment; the cloud server is used for receiving the control instruction sent by the user terminal and sending the control instruction to the intelligent equipment; and the intelligent equipment is used for receiving the control instruction sent by the cloud server and finishing a corresponding execution action according to the control instruction. The scheme can reduce the deployment cost of the server.

Description

Control system and method of intelligent device
Technical Field
The invention relates to the technical field of Internet of things, in particular to a control system and method of intelligent equipment.
Background
With the development of the internet of things technology, the control of the intelligent device through the user terminal becomes more and more mainstream. An HTTP (HyperText Transfer Protocol) server and an MQTT (Message queue Telemetry Transport Protocol) server are deployed on the internet, and interface display and transmission of control commands are performed according to the servers, which is a common technical means adopted by various manufacturers.
At present, patent application with application number 201810661899.X discloses an intelligent customer service system based on MQTT and HTTP and an implementation method thereof, the scheme combines the MQTT and the HTTP and is implemented by a proxy end, and information interaction between the background customer service system and a client end and information interaction between the background customer service system and the client end are provided.
However, the above solution merely combines functions, and it is still necessary to deploy MQTT servers and HTTP servers on the cloud server. Therefore, in the control process of the intelligent device, the UI data packets need to be frequently acquired from the cloud server, so that the carrying efficiency of the server is reduced, and more importantly, various data packets need to be configured in the cloud server, so that the deployment cost of the server is greatly improved.
Disclosure of Invention
The embodiment of the invention provides a control system and a control method of intelligent equipment, which can reduce the deployment cost of a server.
In a first aspect, an embodiment of the present invention provides a control system for an intelligent device, including: the system comprises a user terminal, a cloud server and intelligent equipment;
the user terminal is used for sending a control instruction; the control instruction is used for controlling the intelligent equipment;
the cloud server is used for receiving the control instruction sent by the user terminal and sending the control instruction to the intelligent equipment;
and the intelligent equipment is used for receiving the control instruction sent by the cloud server and finishing a corresponding execution action according to the control instruction.
In one possible implementation form of the method,
the user terminal includes: the system comprises an HTTP client and a first protocol conversion module;
the cloud server comprises: an MQTT server;
the smart device includes: the HTTP device end and the second protocol conversion module;
the HTTP client is used for sending a first control instruction conforming to an HTTP protocol to the first protocol conversion module;
the first protocol conversion module is used for converting the first control instruction into a second control instruction which accords with an MQTT protocol and sending the second control instruction to the MQTT server;
the MQTT server is used for sending the second control instruction to the second protocol conversion module;
and the second protocol conversion module is used for converting the second control instruction into the first control instruction and sending the first control instruction to the HTTP equipment terminal so that the intelligent equipment completes corresponding execution actions according to the first control instruction.
In one possible implementation of the method according to the invention,
the first protocol conversion module is further used for sending a first identification code for identifying the user terminal to the MQTT server;
the second protocol conversion module is further used for sending a second identification code for identifying the intelligent device to the MQTT server.
In one possible implementation form of the method,
the HTTP device side is further configured to send first response information conforming to the HTTP protocol to the second protocol conversion module;
the second protocol conversion module is further configured to convert the first response information into second response information conforming to the MQTT protocol, and send the second response information to the MQTT server;
the MQTT server is further configured to send the second response information to the first protocol conversion module;
the first protocol conversion module is further configured to convert the second response information into the first response information, and send the first response information to the HTTP client, so that the user terminal completes a corresponding response action according to the first response information.
In one possible implementation of the method according to the invention,
the first protocol conversion module is used for packaging the first control instruction and the first identification code in a payload field of the MQTT and sending a second control instruction with a subject of a second identification code to the cloud server;
the second protocol conversion module is used for analyzing the second control instruction, storing the analyzed first identification code and sending the analyzed first control instruction to the HTTP equipment terminal;
and/or the presence of a gas in the gas,
the second protocol conversion module is further used for packaging the first response information into a payload field of the MQTT and sending second response information with a main topic of the first identification code to the cloud server according to the stored first identification code;
the first protocol conversion module is further configured to analyze the second response information, and send the analyzed first response information to the HTTP client.
In a second aspect, an embodiment of the present invention further provides a method for controlling an intelligent device, where the method includes:
sending a control instruction by using a user terminal; the control instruction is used for controlling the intelligent equipment;
receiving a control instruction sent by the user terminal by using a cloud server, and sending the control instruction to the intelligent equipment;
and receiving the control instruction sent by the cloud server by using the intelligent equipment, and finishing a corresponding execution action according to the control instruction.
In one possible implementation form of the method,
the user terminal includes: the system comprises an HTTP client and a first protocol conversion module;
the cloud server comprises: an MQTT server;
the smart device includes: the HTTP device end and the second protocol conversion module;
the sending of the control instruction by the user terminal includes:
sending a first control instruction conforming to an HTTP (hyper text transport protocol) protocol to the first protocol conversion module by utilizing the HTTP client;
converting the first control instruction into a second control instruction which accords with an MQTT protocol by using the first protocol conversion module, and sending the second control instruction to the MQTT server;
the receiving, by the cloud server, the control instruction sent by the user terminal, and sending the control instruction to the intelligent device include:
the MQTT server is used for sending the second control instruction to the second protocol conversion module;
the receiving, by the smart device, the control instruction sent by the cloud server, and completing a corresponding execution action according to the control instruction includes:
and converting the second control instruction into the first control instruction by using the second protocol conversion module, and sending the first control instruction to the HTTP equipment terminal so that the intelligent equipment completes corresponding execution actions according to the first control instruction.
In a possible implementation manner, before the sending, by the HTTP client, the first control instruction conforming to the HTTP protocol to the first protocol conversion module, the method further includes:
transmitting a first identification code for identifying the user terminal to the MQTT server by utilizing the first protocol conversion module;
and sending a second identification code for identifying the intelligent equipment to the MQTT server by utilizing the second protocol conversion module.
In a possible implementation manner, after the converting the second control instruction into the first control instruction by using the second protocol conversion module, and sending the first control instruction to the HTTP device side, the method further includes:
sending first response information conforming to the HTTP to the second protocol conversion module by utilizing the HTTP equipment terminal;
converting the first response information into second response information which accords with the MQTT protocol by using the second protocol conversion module, and sending the second response information to the MQTT server;
sending the second response information to the first protocol conversion module by using the MQTT server;
and converting the second response information into the first response information by using the first protocol conversion module, and sending the first response information to the HTTP user terminal so that the user terminal completes corresponding response actions according to the first response information.
In one possible implementation form of the method,
the converting the first control instruction into a second control instruction conforming to the MQTT protocol by using the first protocol conversion module, and sending the second control instruction to the MQTT server includes:
packaging the first control instruction and the first identification code in a payload field of the MQTT by using the first protocol conversion module, and sending a second control instruction with a subject of a second identification code to the cloud server;
the converting the second control instruction into the first control instruction by using the second protocol conversion module, and sending the first control instruction to the HTTP device side includes:
the second protocol conversion module is used for analyzing the second control instruction, storing the analyzed first identification code and sending the analyzed first control instruction to the HTTP equipment terminal;
and/or the presence of a gas in the gas,
the converting, by the second protocol conversion module, the first response information into second response information conforming to the MQTT protocol, and sending the second response information to the MQTT server includes:
packaging the first response information in a payload field of the MQTT by using the second protocol conversion module, and sending second response information with a topic of a first identification code to the cloud server according to the stored first identification code;
the converting, by the first protocol conversion module, the second response information into the first response information and sending the first response information to the HTTP client includes:
and analyzing the second response information by using the first protocol conversion module, and sending the analyzed first response information to the HTTP client.
According to the technical scheme, after the user terminal sends the control instruction, the cloud server only forwards the received control instruction to the intelligent device, and operations such as obtaining a UI data packet from the cloud server are not required to be executed. That is to say, when the cloud server is configured and deployed, all the data packets do not need to be stored in the cloud server, so that the purpose of reducing the deployment cost of the server can be achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a control system of an intelligent device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another control system for a smart device provided in accordance with an embodiment of the present invention;
fig. 3 is a flowchart of a control method of an intelligent device according to an embodiment of the present invention;
fig. 4 is a flowchart of another control method for an intelligent device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a control system for an intelligent device, where the system includes: the system comprises a user terminal 101, a cloud server 102 and intelligent equipment 103;
a user terminal 101, configured to send a control instruction; wherein the control instruction is used for controlling the intelligent device 103;
the cloud server 102 is configured to receive a control instruction sent by the user terminal 101, and send the control instruction to the intelligent device 103;
and the intelligent device 103 is configured to receive the control instruction sent by the cloud server 102, and complete a corresponding execution action according to the control instruction.
In the embodiment of the invention, after the user terminal sends the control instruction, the cloud server only forwards the received control instruction to the intelligent device, and does not need to execute operations such as obtaining a UI data packet from the cloud server. That is to say, when the cloud server is configured and deployed, all the data packets do not need to be stored in the cloud server, so that the purpose of reducing the deployment cost of the server can be achieved.
A control system based on the smart device shown in fig. 1, as shown in fig. 2, in one possible implementation,
the user terminal 101 includes: an HTTP client 1011 and a first protocol conversion module 1012;
the cloud server 102 includes: MQTT server 1021;
the smart device 103 includes: an HTTP device terminal 1031 and a second protocol conversion module 1032;
an HTTP client 1011 configured to send a first control instruction conforming to the HTTP protocol to the first protocol conversion module 1012;
a first protocol conversion module 1012, configured to convert the first control instruction into a second control instruction meeting the MQTT protocol, and send the second control instruction to the MQTT server 1021;
the MQTT server 1021 is configured to send the second control instruction to the second protocol conversion module 1032;
the second protocol conversion module 1032 is configured to convert the second control instruction into the first control instruction, and send the first control instruction to the HTTP device terminal 1031, so that the smart device 103 completes a corresponding execution action according to the first control instruction.
In the embodiment of the invention, the HTTP client and the HTTP/MQTT protocol conversion module are deployed at the user terminal, the HTTP device terminal and the HTTP/MQTT protocol conversion module are deployed on the intelligent device, and the cloud server is deployed as the MQTT server, so that when the user terminal controls the intelligent device, the HTTP data and the MQTT data are converted through the protocol conversion module, the MQTT server deployed in the cloud server forwards the MQTT data, and the HTTP device terminal of the intelligent device can acquire data related to a control command from the intelligent device according to the control command analyzed by the HTTP/MQTT protocol conversion module and complete corresponding control operation. Therefore, according to the scheme, the HTTP services are respectively deployed on the user terminal and the intelligent device, and the MQTT server is only deployed at the cloud end, so that when information interaction is carried out between the user terminal and the intelligent device, information interaction can be completed without frequently acquiring UI (user interface) data packets from the cloud end, the deployment cost of the server is reduced, and the working efficiency of the server is improved.
The control system of the smart device as shown in fig. 2, in one possible implementation,
a first protocol conversion module 1012, further configured to send a first identification code for identifying the user terminal 101 to the MQTT server 1021;
and the second protocol conversion module 1032 is further configured to send a second identification code for identifying the intelligent device 103 to the MQTT server 1021.
In the embodiment of the invention, the first protocol conversion module sends the first identification code for identifying the user terminal to the MQTT server, and the second protocol conversion module sends the second identification code for identifying the intelligent device to the MQTT server. Like this MQTT server carries out record and storage with first identification code and second identification code, when user terminal and intelligent equipment carried out information interaction through the MQTT server, the MQTT server can be accurate according to the identification code and send information for user terminal or intelligent equipment to the accuracy of information communication has been guaranteed.
The control system of the smart device as shown in fig. 2, in one possible implementation,
the HTTP device 1031 is further configured to send first response information conforming to the HTTP protocol to the second protocol conversion module 1032;
the second protocol conversion module 1032 is further configured to convert the first response information into second response information meeting the MQTT protocol, and send the second response information to the MQTT server 1021;
MQTT server 1021, further configured to send the second response message to first protocol conversion module 1012;
the first protocol conversion module 1012 is further configured to convert the second response message into a first response message, and send the first response message to the HTTP client 1011, so that the user terminal 101 completes a corresponding response action according to the first response message.
In the embodiment of the invention, after the control of the intelligent device is finished through the user terminal, the intelligent device can also realize the feedback of the response information to the user terminal so that the user can make a corresponding response action. Therefore, the HTTP service and protocol conversion module is configured on the user terminal and the intelligent device, so that a response instruction can be rapidly generated and returned to the user terminal after control operation is completed, the frequent data acquisition and protocol conversion processes of the cloud server are avoided, and the operating efficiency of the intelligent device control system is improved.
The control system of the smart device as shown in fig. 2, in one possible implementation,
the first protocol conversion module 1012 is configured to encapsulate the first control instruction and the first identifier code in a payload field of the MQTT, and send a second control instruction with a second identifier code as a subject to the cloud server 102;
the second protocol conversion module 1032 is configured to parse the second control instruction, store the parsed first identification code, and send the parsed first control instruction to the HTTP device terminal 1031;
in another possible implementation form of the method,
the second protocol conversion module 1032 is further configured to encapsulate the first response information in a payload field of the MQTT, and send, to the cloud server 102, second response information with a topic of the first identification code according to the stored first identification code;
the first protocol conversion module 1012 is further configured to parse the second response information, and send the parsed first response information to the HTTP client 1011.
In the embodiment of the invention, when the message under the HTTP protocol is transmitted through the MQTT, the message of the HTTP is packaged in the payload field of the MQTT for transmission, so that the user terminal and the intelligent equipment can perform information interaction with the cloud server deployed with the MQTT server respectively, and the safety of information transmission is ensured.
As shown in fig. 3, an embodiment of the present invention further provides a method for controlling an intelligent device, where the method includes the following steps:
step 301: sending a control instruction by using a user terminal; the control instruction is used for controlling the intelligent equipment;
step 302: receiving a control instruction sent by a user terminal by using a cloud server, and sending the control instruction to the intelligent equipment;
step 303: and receiving a control instruction sent by the cloud server by using the intelligent equipment, and finishing a corresponding execution action according to the control instruction.
In the embodiment of the invention, after the user terminal is used for sending the control instruction, the received control instruction is only forwarded to the intelligent device by using the cloud server, and operations such as obtaining a UI data packet from the cloud server are not needed. That is to say, when the cloud server is configured and deployed, all the data packets do not need to be stored in the cloud server, so that the purpose of reducing the deployment cost of the server can be achieved.
Based on the control method of the intelligent device shown in fig. 3, when the user terminal includes an HTTP client and a first protocol conversion module, the cloud server includes an MQTT server, and the intelligent device includes an HTTP device terminal and a second protocol conversion module, in a possible implementation manner, as shown in fig. 4, the control method of the intelligent device may include:
step 401: sending a first control instruction conforming to an HTTP (hyper text transport protocol) protocol to a first protocol conversion module by utilizing an HTTP client;
step 402: converting the first control instruction into a second control instruction which accords with an MQTT protocol by using a first protocol conversion module, and sending the second control instruction to an MQTT server;
step 403: the MQTT server is used for sending a second control instruction to a second protocol conversion module;
step 404: and converting the second control instruction into a first control instruction by using a second protocol conversion module, and sending the first control instruction to the HTTP equipment terminal so that the intelligent equipment completes corresponding execution actions according to the first control instruction.
In the embodiment of the invention, the HTTP service is respectively deployed on the user terminal and the intelligent device, and the MQTT server is only deployed at the cloud terminal, so that information interaction can be completed without frequently acquiring UI (user interface) data packets from the cloud terminal when information interaction is performed between the user terminal and the intelligent device, the deployment cost of the server is reduced, and the working efficiency of the server is improved.
In a possible design, before sending the first control instruction conforming to the HTTP protocol to the first protocol conversion module by using the HTTP client, the method for controlling an intelligent device as shown in fig. 4 further includes:
sending a first identification code for identifying the user terminal to an MQTT server by using a first protocol conversion module;
and sending a second identification code for identifying the intelligent device to the MQTT server by using a second protocol conversion module.
In the embodiment of the invention, the user terminal and the intelligent device send respective identification codes to the MQTT server through respective protocol conversion modules so as to be recorded and stored by the MQTT server, so that when the user terminal and the intelligent device carry out information interaction through the MQTT server, the MQTT server can accurately send information to the user terminal or the intelligent device according to the identification codes, thereby ensuring the accuracy of information communication.
In a possible design, the method for controlling an intelligent device shown in fig. 4 further includes, after converting the second control instruction into the first control instruction by using the second protocol conversion module, and sending the first control instruction to the HTTP device side:
sending first response information conforming to an HTTP (hyper text transport protocol) protocol to a second protocol conversion module by utilizing an HTTP equipment terminal;
converting the first response information into second response information which accords with the MQTT protocol by using a second protocol conversion module, and sending the second response information to the MQTT server;
the MQTT server is used for sending the second response information to the first protocol conversion module;
and converting the second response information into first response information by using a first protocol conversion module, and sending the first response information to the HTTP user terminal so that the user terminal completes corresponding response actions according to the first response information.
In the embodiment of the invention, the HTTP service and protocol conversion module is configured on the user terminal and the intelligent device, so that the response instruction can be rapidly generated and returned to the user terminal after the control operation is finished, the frequent data acquisition and protocol conversion processes of the cloud server are avoided, and the operation efficiency of the intelligent device control system is improved.
As the control method of the smart device shown in fig. 4, in one possible implementation,
utilize the first protocol conversion module to change the first control instruction into the second control instruction that accords with MQTT agreement, and send this second control instruction to MQTT server, include:
packaging the first control instruction and the first identification code in a payload field of the MQTT by using a first protocol conversion module, and sending a second control instruction with a subject of a second identification code to a cloud server;
the second control instruction is converted into the first control instruction by using the second protocol conversion module, and the first control instruction is sent to the HTTP equipment terminal, and the method comprises the following steps:
the second control instruction is analyzed by using a second protocol conversion module, the analyzed first identification code is stored, and the analyzed first control instruction is sent to the HTTP equipment terminal;
in another possible implementation form of the method,
the method comprises the following steps of converting the first response information into second response information which accords with an MQTT protocol by using a second protocol conversion module, and sending the second response information to an MQTT server, and comprises the following steps:
packaging the first response information in a payload field of the MQTT by using a second protocol conversion module, and sending second response information with the topic of the first identification code to the cloud server according to the stored first identification code;
the converting the second response information into the first response information by using the first protocol converting module, and sending the first response information to the HTTP client, including:
and analyzing the second response information by using the first protocol conversion module, and sending the analyzed first response information to the HTTP client.
In the embodiment of the invention, when the message under the HTTP protocol is transmitted through the MQTT, the message of the HTTP is packaged in the payload field of the MQTT for transmission, so that the user terminal and the intelligent equipment are ensured to be capable of performing information interaction with the cloud server deployed with the MQTT server respectively, and the safety of information transmission is ensured.
The present solution will be described in further detail below with reference to the control system of the smart device shown in fig. 1 to 2 and the control method of the smart device shown in fig. 3 to 4.
The user terminal may include devices such as a mobile phone and a tablet, and here, an Android smart phone is taken as an example, and the Android smart phone should include an HTTP client and an HTTP/MQTT conversion module (a first protocol conversion module). The intelligent device may include a television, an air conditioner, a refrigerator, and other household appliances, and the air conditioner is taken as an example here. The air conditioning equipment end software comprises an HTTP equipment end and an HTTP/MQTT conversion module (a second protocol conversion module), wherein a two-dimensional code containing a unique identification code of the air conditioning equipment end is pasted on the air conditioning equipment, and the cloud end is deployed as an MQTT server.
After the air conditioner is powered on, MQTT subscription information with the theme of an air conditioner unique identification code (namely a second identification code) is subscribed to the MQTT server through an HTTP/MQTT conversion module (a second protocol conversion module), namely the air conditioner uploads the second identification code for identifying own equipment to the MQTT server, and the second identification code can comprise the equipment serial number and other contents for identifying the air conditioner.
Meanwhile, the Android mobile phone obtains the unique identification code (namely, the first identification code) of the user terminal by scanning a two-dimensional code and the like, and then subscribes MQTT subscription information with the theme being the unique identification code of the mobile phone terminal to the MQTT server through an HTTP/MQTT conversion module (namely, a first protocol conversion module), namely, the mobile phone terminal uploads the first identification code for identifying the mobile phone terminal to the MQTT server, and the first identification code can comprise a device serial number and the like for identifying the mobile phone, such as a CMITID code.
When a mobile phone terminal initiates an HTTP request (namely a control instruction), an HTTP request message (namely a first control instruction) is initiated by an Android mobile phone HTTP client, an HTTP/MQTT first protocol conversion module packages the HTTP request message and a first identification code for identifying the Android mobile phone in payload field payload of the MQTT message, and issues the MQTT message (namely a second control instruction) with the theme of an air conditioner unique identification code to an MQTT server.
The MQTT server sends the received MQTT message to the air conditioning equipment, after receiving the subscribed MQTT message with the subject being the unique identification code of the air conditioner, the HTTP/MQTT second protocol conversion module of the air conditioner acquires the unique identification code of the mobile phone terminal from the payload field and stores the unique identification code in the storage space of hardware, and then the HTTP message is sent to the HTTP equipment terminal, so that the intelligent equipment executes corresponding control operation according to the HTTP message.
After the control operation is completed, the air conditioner may perform information feedback, which may specifically include the following:
the HTTP equipment terminal returns HTTP feedback information (namely first response information), the HTTP feedback information is packaged in payload fields of the MQTT through an HTTP/MQTT second protocol conversion module, a stored unique identification code of the mobile phone terminal is obtained, and then the MQTT information (namely second response information) with the topic of the unique identification code of the mobile phone terminal is issued to the MQTT server according to the unique identification code of the mobile phone terminal.
After receiving a subscribed MQTT message with the subject being the unique identification code of the mobile phone end, an HTTP/MQTT first protocol conversion module of the Android mobile phone end acquires an HTTP feedback message from a payload field and then forwards the HTTP feedback message to an HTTP client, so that the HTTP client analyzes the HTTP feedback message and displays the HTTP feedback message to a user.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit each device of the control system of the smart device. In other embodiments of the invention, the devices mentioned in the control system of the smart device may comprise more or fewer components than those shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The contents of information interaction, execution processes and the like among the devices in the control system of the intelligent equipment are based on the same conception as the embodiment of the control method of the intelligent equipment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. Control system of smart machine, its characterized in that includes: the system comprises a user terminal, a cloud server and intelligent equipment;
the user terminal is used for sending a control instruction; the control instruction is used for controlling the intelligent equipment;
the cloud server is used for receiving the control instruction sent by the user terminal and sending the control instruction to the intelligent equipment;
the intelligent device is used for receiving the control instruction sent by the cloud server and completing corresponding execution action according to the control instruction;
the user terminal includes: the system comprises an HTTP client and a first protocol conversion module;
the cloud server comprises: an MQTT server;
the smart device includes: the HTTP device end and the second protocol conversion module;
the HTTP client is used for sending a first control instruction conforming to an HTTP protocol to the first protocol conversion module;
the first protocol conversion module is used for converting the first control instruction into a second control instruction which accords with an MQTT protocol and sending the second control instruction to the MQTT server;
the MQTT server is used for sending the second control instruction to the second protocol conversion module;
and the second protocol conversion module is used for converting the second control instruction into the first control instruction and sending the first control instruction to the HTTP equipment terminal so that the intelligent equipment completes corresponding execution actions according to the first control instruction.
2. The system of claim 1,
the first protocol conversion module is further used for sending a first identification code for identifying the user terminal to the MQTT server;
the second protocol conversion module is further used for sending a second identification code for identifying the intelligent device to the MQTT server.
3. The system of claim 2,
the HTTP device side is further configured to send first response information conforming to the HTTP protocol to the second protocol conversion module;
the second protocol conversion module is further used for converting the first response information into second response information which accords with the MQTT protocol and sending the second response information to the MQTT server;
the MQTT server is further configured to send the second response information to the first protocol conversion module;
the first protocol conversion module is further configured to convert the second response information into the first response information, and send the first response information to the HTTP client, so that the user terminal completes a corresponding response action according to the first response information.
4. The system of claim 3,
the first protocol conversion module is used for packaging the first control instruction and the first identification code in a payload field of the MQTT and sending a second control instruction with a subject of a second identification code to the cloud server;
the second protocol conversion module is used for analyzing the second control instruction, storing the analyzed first identification code and sending the analyzed first control instruction to the HTTP equipment terminal;
and/or the presence of a gas in the gas,
the second protocol conversion module is further used for packaging the first response information into a payload field of the MQTT and sending second response information with a main topic of the first identification code to the cloud server according to the stored first identification code;
the first protocol conversion module is further configured to analyze the second response information, and send the analyzed first response information to the HTTP client.
5. The control method of the intelligent device is characterized by comprising the following steps:
sending a control instruction by using a user terminal; the control instruction is used for controlling the intelligent equipment;
receiving a control instruction sent by the user terminal by using a cloud server, and sending the control instruction to the intelligent equipment;
receiving the control instruction sent by the cloud server by using the intelligent equipment, and completing a corresponding execution action according to the control instruction;
the user terminal includes: the system comprises an HTTP client and a first protocol conversion module;
the cloud server comprises: an MQTT server;
the smart device includes: the HTTP device end and the second protocol conversion module;
the sending of the control instruction by the user terminal includes:
sending a first control instruction conforming to an HTTP (hyper text transport protocol) protocol to the first protocol conversion module by utilizing the HTTP client;
converting the first control instruction into a second control instruction which accords with an MQTT protocol by using the first protocol conversion module, and sending the second control instruction to the MQTT server;
the receiving, by the cloud server, the control instruction sent by the user terminal, and sending the control instruction to the intelligent device include:
the MQTT server is used for sending the second control instruction to the second protocol conversion module;
the receiving, by the intelligent device, the control instruction sent by the cloud server, and completing a corresponding execution action according to the control instruction includes:
and converting the second control instruction into the first control instruction by using the second protocol conversion module, and sending the first control instruction to the HTTP equipment terminal so that the intelligent equipment completes corresponding execution actions according to the first control instruction.
6. The method according to claim 5, wherein before the sending, by the HTTP client, the first control instruction conforming to the HTTP protocol to the first protocol conversion module, further comprises:
sending a first identification code for identifying the user terminal to the MQTT server by utilizing the first protocol conversion module;
and sending a second identification code for identifying the intelligent equipment to the MQTT server by utilizing the second protocol conversion module.
7. The method according to claim 6, wherein after converting the second control instruction into the first control instruction by using the second protocol conversion module and sending the first control instruction to the HTTP device side, the method further comprises:
sending first response information conforming to the HTTP to the second protocol conversion module by utilizing the HTTP equipment terminal;
converting the first response information into second response information which accords with the MQTT protocol by using the second protocol conversion module, and sending the second response information to the MQTT server;
sending the second response information to the first protocol conversion module by using the MQTT server;
and converting the second response information into the first response information by using the first protocol conversion module, and sending the first response information to the HTTP user terminal so that the user terminal completes corresponding response actions according to the first response information.
8. The method of claim 7,
the converting the first control instruction into a second control instruction conforming to the MQTT protocol by using the first protocol conversion module, and sending the second control instruction to the MQTT server, includes:
packaging the first control instruction and the first identification code in a payload field of the MQTT by using the first protocol conversion module, and sending a second control instruction with a subject of a second identification code to the cloud server;
the converting the second control instruction into the first control instruction by using the second protocol conversion module, and sending the first control instruction to the HTTP device side includes:
the second protocol conversion module is used for analyzing the second control instruction, storing the analyzed first identification code and sending the analyzed first control instruction to the HTTP equipment terminal;
and/or the presence of a gas in the gas,
the converting, by the second protocol conversion module, the first response information into second response information conforming to the MQTT protocol, and sending the second response information to the MQTT server includes:
packaging the first response information in a payload field of the MQTT by using the second protocol conversion module, and sending second response information with a topic of a first identification code to the cloud server according to the stored first identification code;
the converting, by the first protocol conversion module, the second response information into the first response information and sending the first response information to the HTTP client includes:
and analyzing the second response information by using the first protocol conversion module, and sending the analyzed first response information to the HTTP client.
CN202011379510.6A 2020-12-01 2020-12-01 Control system and method of intelligent device Active CN112511631B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011379510.6A CN112511631B (en) 2020-12-01 2020-12-01 Control system and method of intelligent device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011379510.6A CN112511631B (en) 2020-12-01 2020-12-01 Control system and method of intelligent device

Publications (2)

Publication Number Publication Date
CN112511631A CN112511631A (en) 2021-03-16
CN112511631B true CN112511631B (en) 2022-06-07

Family

ID=74969963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011379510.6A Active CN112511631B (en) 2020-12-01 2020-12-01 Control system and method of intelligent device

Country Status (1)

Country Link
CN (1) CN112511631B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113012323A (en) * 2021-03-19 2021-06-22 四川虹美智能科技有限公司 Intelligent vending machine door lock control method, intelligent vending machine and system
CN114422497B (en) * 2022-01-20 2023-05-30 重庆长安汽车股份有限公司 Remote control method for vehicle atmosphere lamp and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471897A (en) * 2015-12-28 2016-04-06 上海庆科信息技术有限公司 Embedded device cloud service access method and system
CN108989455A (en) * 2018-08-13 2018-12-11 中国科学院声学研究所南海研究站 A kind of data based on LoRa Internet of Things report and instruct delivery method
CN109088723A (en) * 2018-10-26 2018-12-25 四川长虹电器股份有限公司 A kind of long-range control method based on MQTT agreement

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131110A (en) * 2015-06-20 2016-11-16 浙江网新合同能源管理有限公司 A kind of interlock method based on Internet of Things
CN105933435A (en) * 2015-06-20 2016-09-07 浙江网新合同能源管理有限公司 Real-time query method based on Internet of Things
TW201843599A (en) * 2017-05-08 2018-12-16 崑山科技大學 Grouped cloud smart home appliance monitoring system
CN111953778B (en) * 2020-08-12 2022-06-21 北京泊菲莱科技有限公司 Internet of things management system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471897A (en) * 2015-12-28 2016-04-06 上海庆科信息技术有限公司 Embedded device cloud service access method and system
CN108989455A (en) * 2018-08-13 2018-12-11 中国科学院声学研究所南海研究站 A kind of data based on LoRa Internet of Things report and instruct delivery method
CN109088723A (en) * 2018-10-26 2018-12-25 四川长虹电器股份有限公司 A kind of long-range control method based on MQTT agreement

Also Published As

Publication number Publication date
CN112511631A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN110601952B (en) Multi-channel message notification sending method and device
CN107018147B (en) Internet of things communication method and system and gateway module
CN112511631B (en) Control system and method of intelligent device
CN107450899B (en) Method and device for generating terminal control script
CN107729014B (en) Page jump method and structure based on Android
CN109510754B (en) Online document generation method, device and system and electronic equipment
JP2013543189A (en) Method and apparatus for controlling a remote device using SMS
CN112463618B (en) Automatic test method, device, medium and equipment
GB2580419A (en) Electronic message control
GB2580421A (en) Electronic message translation management
CN105099769A (en) Method, device and system for processing abnormal operations of service platform
CN110380775B (en) Large-scale multi-service satellite constellation operation and management system and working method thereof
CN106302093B (en) Communication method, system and server
CN101739575A (en) Data processing method for multi-hardware equipment centralized management in radio frequency identification system
CN105807737A (en) Enhanced transfer of information using an industrial protocol system and method
US11245567B2 (en) Electronic message adaptation
CN110475215B (en) Message editing, transmitting and displaying method, server and terminal thereof
CN109819026B (en) Method and device for transmitting information
CN108924773B (en) Message processing method and device
CN104202348A (en) Method, device and system of pushing information
CN113645131A (en) Data processing method and device, electronic equipment and storage medium
CN113467776B (en) Method and device for accessing equipment, storage medium and electronic device
CN113392343A (en) Data extraction method, device, medium and computer program product
CN112698817A (en) Message access method, device, system and storage medium based on micro-service architecture
CN112714153A (en) Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant