CN112134965B - Issuing method and device of Internet of things instruction and electronic equipment - Google Patents

Issuing method and device of Internet of things instruction and electronic equipment Download PDF

Info

Publication number
CN112134965B
CN112134965B CN202011326248.9A CN202011326248A CN112134965B CN 112134965 B CN112134965 B CN 112134965B CN 202011326248 A CN202011326248 A CN 202011326248A CN 112134965 B CN112134965 B CN 112134965B
Authority
CN
China
Prior art keywords
things
internet
instruction
preset
execution
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
CN202011326248.9A
Other languages
Chinese (zh)
Other versions
CN112134965A (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.)
Rootcloud Technology Co Ltd
Original Assignee
Irootech 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 Irootech Technology Co ltd filed Critical Irootech Technology Co ltd
Priority to CN202011326248.9A priority Critical patent/CN112134965B/en
Publication of CN112134965A publication Critical patent/CN112134965A/en
Application granted granted Critical
Publication of CN112134965B publication Critical patent/CN112134965B/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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a method and a device for issuing an instruction of an Internet of things and electronic equipment, wherein the method comprises the following steps: sequentially sending preset Internet of things instructions to the Internet of things equipment; receiving response information returned by the Internet of things equipment after self-checking of the preset Internet of things instruction; determining whether to execute a preset Internet of things instruction based on the response information; and after the preset Internet of things instruction is determined to be executed, sending an instruction for executing the preset Internet of things instruction to the Internet of things equipment based on an instruction execution strategy set by the user at the client. According to the invention, the preset IOT instruction is sent to the IOT equipment, wherein the preset IOT instruction comprises a plurality of MQTT messages, namely a queuing mechanism is adopted, so that the problem of poor stability of the issued IOT instruction caused by poor stability of a mobile network is solved.

Description

Issuing method and device of Internet of things instruction and electronic equipment
Technical Field
The invention relates to the technical field of Internet of things, in particular to a method and a device for issuing an instruction of the Internet of things and electronic equipment.
Background
The existing Internet of things is mostly a civil Internet of things and directly faces to a terminal user, for the civil Internet of things, more attention is paid to interaction and function realization brought by an instruction of the Internet of things, and a higher failure rate is allowed.
For remote full-hosting control in most industrial scenes (logic is set in advance, and no person participates in the control process), the safety and stability of the instruction of the internet of things are the first. Since industrial equipment is diverse and very important and valuable, erroneous remote commands cannot reach the terminal equipment at will. In addition, many industrial devices are black boxes for end users, who do not have sufficient skills and necessary information to operate the end devices, such as: the machine tool of a third party has the advantages that the user can bring great convenience by directly accessing the Internet of things through the communication interface provided by the machine tool controller, but more hidden dangers are brought, if one remote misoperation can directly cause the breakdown of industrial equipment, and the existing Internet of things instruction is issued and cannot meet the requirement of the safety. In addition, some industrial devices have strong internal logic, several instructions with correct sequence need to be continuously sent, and certain time requirements exist, and the existing issuing of the internet of things instructions is based on a mobile network, so that the stability of the mobile network is poor, which leads to poor issuing stability of the internet of things instructions.
In conclusion, the issuing of the existing internet of things instruction cannot meet the requirements of safety and stability.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for issuing an instruction of an internet of things, and an electronic device, so as to solve the technical problem that the issuing of the instruction of the existing internet of things cannot meet the requirements of security and stability.
In a first aspect, an embodiment of the present invention provides an issuing method for an internet of things instruction, which is applied to an internet of things platform, where the internet of things platform is in communication connection with a client and an internet of things device, and the method includes:
sequentially sending preset Internet of things instructions to the Internet of things equipment, wherein each preset Internet of things instruction comprises a plurality of MQTT messages;
receiving response information returned by the Internet of things equipment after the Internet of things equipment performs self-checking on the preset Internet of things instruction;
determining whether to execute the preset Internet of things instruction based on the response information;
and after the preset Internet of things instruction is determined to be executed, sending an instruction for executing the preset Internet of things instruction to the Internet of things equipment based on an instruction execution strategy set by the user at the client.
Further, determining whether to execute the preset internet of things instruction based on the response information comprises:
if the response information is information indicating that the preset Internet of things instruction is correct, determining to execute the preset Internet of things instruction;
and if the response information is information indicating that the preset Internet of things instruction is wrong, determining not to execute the preset Internet of things instruction.
Further, sending a command for executing the preset internet of things instruction to the internet of things device based on an instruction execution policy set by the user at the client includes:
if the instruction execution strategy is automatic execution, directly sending a command for executing the preset Internet of things instruction to the Internet of things equipment;
and if the instruction execution strategy is manually executed, receiving an execution instruction sent by the client and sending a command for executing the preset Internet of things instruction to the Internet of things equipment.
Further, after sending a command for executing the preset internet of things instruction to the internet of things device, the method further includes:
receiving execution information fed back by the Internet of things equipment when the corresponding action is executed according to the preset Internet of things instruction, wherein the execution information comprises at least one of the following: execution state, execution progress and error reporting information;
and sending the execution information to the client to enable a user to view the execution information.
Further, the execution state includes: ready to execute, execution success, execution failure, execution timeout, instruction expiration, and device answer information.
Further, the method further comprises:
and receiving an instruction cancellation command sent by the client, and controlling the Internet of things equipment not to execute the preset Internet of things instruction according to the instruction cancellation command.
Furthermore, each MQTT message in each preset Internet of things instruction is valid within a preset valid time;
the preset internet of things instruction at least comprises the following steps: the method comprises the steps of remotely updating the data of the Internet of things equipment, issuing a file, uploading the file, upgrading the firmware of the remote equipment and remotely executing the action.
In a second aspect, an embodiment of the present invention further provides an issuing device of an internet of things instruction, which is applied to an internet of things platform, where the internet of things platform is in communication connection with a client and an internet of things device, and the issuing device includes:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sequentially sending preset Internet of things instructions to the Internet of things equipment, and each preset Internet of things instruction comprises a plurality of MQTT messages;
the receiving module is used for receiving response information returned after the Internet of things equipment carries out self-checking on the preset Internet of things instruction;
the determining module is used for determining whether to execute the preset Internet of things instruction or not based on the response information;
and the second sending module is used for sending a command for executing the preset Internet of things command to the Internet of things equipment based on a command execution strategy set by the user at the client after the preset Internet of things command is determined to be executed.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to any one of the above first aspects when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having non-volatile program code executable by a processor, where the program code causes the processor to perform the steps of the method according to any one of the first aspect.
In an embodiment of the present invention, a method for issuing an internet of things instruction is provided, which is applied to an internet of things platform, and the internet of things platform is in communication connection with a client and an internet of things device, respectively, and the method includes: sequentially sending preset Internet of things instructions to the Internet of things equipment, wherein each preset Internet of things instruction comprises a plurality of MQTT messages; receiving response information returned by the Internet of things equipment after self-checking of the preset Internet of things instruction; determining whether to execute a preset Internet of things instruction based on the response information; and after the preset Internet of things instruction is determined to be executed, sending an instruction for executing the preset Internet of things instruction to the Internet of things equipment based on an instruction execution strategy set by the user at the client. As can be seen from the above description, when the IOT instruction is issued, the invention firstly sends a preset IOT instruction to the IOT equipment, wherein the preset IOT instruction comprises a plurality of MQTT messages, namely, the preset Internet of things command of the invention adopts a queuing mechanism, the queuing mechanism effectively avoids the problem of poor stability of issuing the Internet of things command caused by poor stability of a mobile network, in addition, after receiving the preset Internet of things instruction, the Internet of things equipment does not execute the preset Internet of things instruction, but performs self-check on the preset Internet of things instruction, and then returns response information, and finally the Internet of things platform determines whether to execute the preset Internet of things instruction according to the response information, therefore, the process can effectively avoid the wrong instruction or the illegal instruction from being executed, improve the issuing safety of the instruction of the Internet of things, and solve the technical problem that the issuing of the existing instruction of the Internet of things cannot meet the safety and the stability.
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 described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a method for issuing an instruction of the internet of things according to an embodiment of the present invention;
FIG. 2 is a flow chart of an interaction process in an execution phase according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a prior art internet of things architecture according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an internet of things architecture according to the present invention;
FIG. 5 is a diagram illustrating an update between message execution states according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an issuing device of an internet of things instruction according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to facilitate understanding of the embodiment, a detailed description is first given of an issuing method of an internet of things instruction disclosed in the embodiment of the present invention.
The first embodiment is as follows:
to facilitate understanding of the embodiment, first, a method for issuing an instruction of the internet of things disclosed in the embodiment of the present invention is described in detail, referring to a flow diagram of the method for issuing an instruction of the internet of things shown in fig. 1, which mainly includes the following steps:
step S102, preset Internet of things instructions are sequentially sent to the Internet of things equipment, wherein each preset Internet of things instruction comprises a plurality of MQTT messages;
in the embodiment of the invention, the issuing method of the Internet of things instruction is applied to an Internet of things platform, and the Internet of things platform is respectively in communication connection with the client and the Internet of things equipment.
The preset internet of things instruction can be an internet of things instruction stored in the internet of things platform in advance, and the preset internet of things instruction can be sent to the internet of things platform by the client side after the preset internet of things instruction is preset by the user, and then the preset internet of things instruction is sent to the internet of things equipment by the internet of things platform.
After the internet of things equipment is connected to the internet of things platform, the preset internet of things instruction can be sent to the internet of things equipment by the internet of things platform after the user triggers and sends the preset internet of things instruction to the client; or when the internet of things equipment is accessed to the internet of things platform, the internet of things platform automatically sends the preset internet of things instruction to the internet of things equipment, and the sending condition is not specifically limited in the embodiment of the invention.
It should be noted that the internet of things device may be a device capable of autonomously accessing the internet of things platform, or may be a device capable of accessing the internet of things platform through a gateway, and when the internet of things device is a device capable of accessing the internet of things platform through a gateway, both the gateway and the internet of things device may be regarded as the internet of things device, and at this time, the preset internet of things instruction may refer to an internet of things instruction sent to the gateway.
In addition, the preset internet of things instruction comprises a plurality of MQTT messages, namely the internet of things instruction adopts a queuing mechanism, so that the MQTT messages and the preset internet of things instruction can be sequentially executed. In the queuing mechanism, when the message is executed with errors, all messages fail, and meanwhile, the sequence is ensured, so that effective protection (such as an information fusing mechanism) can be provided for third-party internet-of-things equipment.
The preset internet of things instructions sequentially sent to the internet of things equipment can be sent in an API calling mode of the internet of things equipment.
Step S104, response information returned after the IOT equipment performs self-checking on the preset IOT instruction is received;
when the preset Internet of things instruction is sent to the Internet of things equipment, the instruction sequence number information of the preset Internet of things instruction sent by the Internet of things equipment is informed, so that the Internet of things equipment can perform self-checking on the preset Internet of things instruction according to the instruction sequence number information after receiving the preset Internet of things instruction, detect whether the preset Internet of things instruction makes mistakes or not, and return response information to the Internet of things platform after the self-checking is completed.
For example: the notified instruction serial number is 123, and when the preset internet of things instruction detected by the internet of things equipment is not 123, the instruction is lacked, or the instruction is reversed, an error is reported to the internet of things platform.
It should be noted that, besides the above simple self-checking mode, the preset internet of things instruction can be manually checked, at this time, the preset internet of things instruction is read to the internet of things platform, is checked by a special technician, is stored to the gateway after being correct, and can be subsequently triggered and executed for many times, so that human errors are avoided, the preset by the technician can be realized, and the terminal user only needs to click a multistage control mode of a button, so that the system is safer.
Step S106, whether a preset Internet of things instruction is executed or not is determined based on the response information;
the process is described in detail below and will not be described herein.
And S108, after the preset Internet of things instruction is determined to be executed, sending an instruction for executing the preset Internet of things instruction to the Internet of things equipment based on an instruction execution strategy set by the user at the client.
Similarly, the process is described in detail below, and is not described herein again.
In an embodiment of the present invention, a method for issuing an internet of things instruction is provided, which is applied to an internet of things platform, and the internet of things platform is in communication connection with a client and an internet of things device, respectively, and the method includes: sequentially sending preset Internet of things instructions to the Internet of things equipment, wherein each preset Internet of things instruction comprises a plurality of MQTT messages; receiving response information returned by the Internet of things equipment after self-checking of the preset Internet of things instruction; determining whether to execute a preset Internet of things instruction based on the response information; and after the preset Internet of things instruction is determined to be executed, sending an instruction for executing the preset Internet of things instruction to the Internet of things equipment based on an instruction execution strategy set by the user at the client. As can be seen from the above description, when the IOT instruction is issued, the invention firstly sends a preset IOT instruction to the IOT equipment, wherein the preset IOT instruction comprises a plurality of MQTT messages, namely, the preset Internet of things command of the invention adopts a queuing mechanism, the queuing mechanism effectively avoids the problem of poor stability of issuing the Internet of things command caused by poor stability of a mobile network, in addition, after receiving the preset Internet of things instruction, the Internet of things equipment does not execute the preset Internet of things instruction, but performs self-check on the preset Internet of things instruction, and then returns response information, and finally the Internet of things platform determines whether to execute the preset Internet of things instruction according to the response information, therefore, the process can effectively avoid the wrong instruction or the illegal instruction from being executed, improve the issuing safety of the instruction of the Internet of things, and solve the technical problem that the issuing of the existing instruction of the Internet of things cannot meet the safety and the stability.
The foregoing briefly introduces the issuing method of the internet of things instruction of the present invention, and the details related thereto are described in detail below.
In an optional embodiment of the present invention, the step S106 of determining whether to execute the preset internet of things instruction based on the response information includes:
if the response information is information which shows that the preset Internet of things instruction is correct, determining to execute the preset Internet of things instruction;
and if the response information is information indicating that the preset Internet of things instruction is wrong, determining not to execute the preset Internet of things instruction.
It should be noted that each preset internet of things instruction includes multiple MQTT messages, so when sending the preset internet of things instruction, after sending one MQTT message, the internet of things device returns response information, and the response information at this time may be a simple indication that the MQTT message is received, that is, when sending each MQTT message, there is interaction between the internet of things platform and the internet of things device.
In an optional embodiment of the present invention, in step S108, sending, to the internet of things device, a command to execute the preset internet of things command based on the command execution policy set by the user at the client includes:
if the instruction execution strategy is automatic execution, directly sending an instruction for executing a preset Internet of things instruction to the Internet of things equipment;
and if the instruction execution strategy is manually executed, receiving an execution instruction sent by the client and sending a command for executing a preset Internet of things instruction to the Internet of things equipment.
That is, the present invention provides two strategies for triggering execution, which can be selected as needed.
In an optional embodiment of the present invention, referring to fig. 2, after sending the command to execute the preset internet of things instruction to the internet of things device, the method further includes:
step S201, receiving execution information fed back when the Internet of things equipment executes corresponding actions according to preset Internet of things instructions, wherein the execution information comprises at least one of the following: execution state, execution progress and error reporting information;
the execution state includes: ready to execute, execution success, execution failure, execution timeout, instruction expiration, and device answer information.
It should be noted that, when the internet of things device executes any MQTT message in the preset internet of things instruction, the internet of things device feeds back execution information.
The response information may be different for different preset internet of things instructions, for example, for remote device firmware upgrade (OTA), the device response information may be a download file, a decompression file, upgrade, and the like, each piece of periodic information may be used as the device response information, the error report information includes an error code, when the error code is a non-zero value, different errors are indicated, and when any error occurs, execution of the preset internet of things instruction may be terminated, and the execution may fail.
The instruction expiration refers to the condition that after the instruction reaches the expiration time, any message is not executed yet, for example, the instruction is queued or waits for the expiration caused by the online of the internet of things device, and after the instruction expires, the message is not executed any more.
The execution failure refers to that any message is failed to execute, the execution fails, the session is ended, and the sending of the residual message is stopped.
The execution timeout is set for each message, and any message execution timeout indicates execution timeout. If the response is successful, the message fed back by the Internet of things equipment is still unexecuted in the preset Internet of things instruction, and whether the subsequent unexecuted message is continuously executed and needs manual operation of the user is judged; if the message fed back by the Internet of things equipment is an execution failure, the preset Internet of things instruction is indicated to have a problem, and even if an unexecuted message exists, the message is not executed subsequently.
Step S202, sending the execution information to the client to enable the user to view the execution information.
The execution information is sent to the client in real time, so that the user can conveniently track the execution process of the instruction data link.
In an optional embodiment of the invention, the method further comprises: and receiving an instruction cancellation command sent by the client, and controlling the Internet of things equipment not to execute a preset Internet of things instruction according to the instruction cancellation command.
Specifically, the instruction cancellation includes two situations, one is that a user selects the instruction cancellation before the preset internet of things instruction is issued to perform the action; and the other method is that after the preset Internet of things instruction is issued and before the preset Internet of things instruction is executed, the user selects the instruction to cancel.
In the embodiment of the present invention, each MQTT message in each preset internet of things instruction is valid within a preset valid time, and the preset valid times of different MQTT messages may be different, where the preset internet of things instruction of the present invention at least includes: the method comprises the steps of remotely updating the data of the Internet of things equipment, issuing a file, uploading the file, upgrading the firmware of the remote equipment and remotely executing the action.
The following compares the internet of things architecture of the prior art with the internet of things architecture of the present invention:
fig. 3 shows a related art internet of things architecture, in which an internet of things platform does not perform state management, and simply and directly transmits a user-initiated instruction to an internet of things device.
Fig. 4 shows an internet of things architecture of the present invention, an inventor improves an internet of things platform, can meet requirements for security and stability when an instruction of the internet of things is issued, can effectively protect third-party equipment, and can track an execution process of an instruction data link, and in fig. 4, a preset stage can repeatedly execute processes 1 and 2, thereby presetting a plurality of preset instructions of the internet of things. In the instruction execution stage, action feedback (i.e., the execution information in the above description) may be performed for multiple times, but the final result of success and failure of the preset internet of things instruction execution is only once, and before the final state of the preset internet of things instruction, the internet of things device may report the execution progress percentage or the device response information.
In the present invention, the process of each MQTT message execution is illustrated in fig. 5, which shows the update between message execution states.
Referring to fig. 5, the message execution process includes: the Internet of things platform issues a message to the Internet of things equipment (the message is put in a warehouse and added into a queue PRE _ SEND); after the queuing is finished, sending a message (SENT, updating and warehousing), and waiting for the response of the equipment of the Internet of things; the internet of things equipment receives a response (may be omitted) (RECEIVED); the internet of things device replies to the execution state, for example: execution PROGRESS, current execution status (may be omitted) (IN _ PROGRESS); and replying an execution result by the Internet of things equipment, and updating and warehousing, if: the execution fails and the execution succeeds; if the Internet of things equipment does not reply the execution result after the message is sent, the message is overtime.
It should be noted that, for a task to be executed, multiple instructions are usually included, and one instruction includes multiple MQTT messages.
The issuing method of the Internet of things instruction has the following characteristics:
a) through two-stage control, self judgment can be carried out when an error occurs in the preset stage, the preset Internet of things instruction cannot enter the execution stage, and the error instruction or the illegal instruction is effectively prevented from being executed;
b) in the message execution process, various states are maintained by the Internet of things platform, and the overtime is calculated by the Internet of things platform in the message execution process, so that the instruction execution process can be clear for a user;
c) the queuing mechanism with the instruction priority is adopted, after the queuing mechanism is selected to be started, one piece of Internet of things equipment cannot execute the next piece of Internet of things equipment before the last preset Internet of things instruction is executed or the execution of the last preset Internet of things instruction is overtime, the Internet of things equipment is guaranteed to execute only one instruction at a time, congestion is avoided to the maximum extent, or the Internet of things equipment is in fault due to internal logic fault, and the priority mechanism ensures that certain preset Internet of things instructions needing to be executed preferentially can be sent to the Internet of things equipment to be executed firstly in the queuing process;
d) the Internet of things equipment, the Internet of things platform and the client are cooperated by three parties, and interaction is carried out in two stages, so that the process of issuing the preset Internet of things instruction can be ensured to be more controllable, and misoperation can be prevented;
e) the method can select to execute a plurality of preset Internet of things instructions in parallel, and also can select to start a queuing mechanism, wherein in the queuing mechanism, only one preset Internet of things instruction or message can be executed at a time, and the next preset Internet of things instruction or message can be executed only when the previous preset Internet of things instruction or message is executed or the execution time is overtime, so that the execution sequence is ensured, and the message is not lost even if the processing capacity of the Internet of things equipment is poor;
f) the Internet of things platform can realize various preset instruction execution methods according to user configuration, and the preset instructions can be executed for multiple times, so that certain edge computing capacity is realized, and interaction cost is saved.
Example two:
the embodiment of the invention also provides a device for issuing the instruction of the internet of things, which is mainly used for executing the method for issuing the instruction of the internet of things provided by the embodiment of the invention.
Fig. 6 is a schematic diagram of an issuing device of an internet of things instruction according to an embodiment of the present invention, and as shown in fig. 6, the issuing device of the internet of things instruction mainly includes: a first sending module 10, a receiving module 20, a determining module 30 and a second sending module 40, wherein:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sequentially sending preset Internet of things instructions to Internet of things equipment, and each preset Internet of things instruction comprises a plurality of MQTT messages;
the receiving module is used for receiving response information returned after the IOT equipment carries out self-checking on the preset IOT instruction;
the determining module is used for determining whether to execute a preset Internet of things instruction or not based on the response information;
and the second sending module is used for sending a command for executing the preset Internet of things command to the Internet of things equipment based on a command execution strategy set by the user at the client after the preset Internet of things command is determined to be executed.
In an embodiment of the present invention, an issuing device of an internet of things instruction is provided, which is applied to an internet of things platform, the internet of things platform is respectively in communication connection with a client and an internet of things device, and the issuing device includes: sequentially sending preset Internet of things instructions to the Internet of things equipment, wherein each preset Internet of things instruction comprises a plurality of MQTT messages; receiving response information returned by the Internet of things equipment after self-checking of the preset Internet of things instruction; determining whether to execute a preset Internet of things instruction based on the response information; and after the preset Internet of things instruction is determined to be executed, sending an instruction for executing the preset Internet of things instruction to the Internet of things equipment based on an instruction execution strategy set by the user at the client. As can be seen from the above description, when the IOT instruction is issued, the invention firstly sends a preset IOT instruction to the IOT equipment, wherein the preset IOT instruction comprises a plurality of MQTT messages, namely, the preset Internet of things command of the invention adopts a queuing mechanism, the queuing mechanism effectively avoids the problem of poor stability of issuing the Internet of things command caused by poor stability of a mobile network, in addition, after receiving the preset Internet of things instruction, the Internet of things equipment does not execute the preset Internet of things instruction, but performs self-check on the preset Internet of things instruction, and then returns response information, and finally the Internet of things platform determines whether to execute the preset Internet of things instruction according to the response information, therefore, the process can effectively avoid the wrong instruction or the illegal instruction from being executed, improve the issuing safety of the instruction of the Internet of things, and solve the technical problem that the issuing of the existing instruction of the Internet of things cannot meet the safety and the stability.
Optionally, the determining module is further configured to: if the response information is information which shows that the preset Internet of things instruction is correct, determining to execute the preset Internet of things instruction; and if the response information is information indicating that the preset Internet of things instruction is wrong, determining not to execute the preset Internet of things instruction.
Optionally, the second sending module is further configured to: if the instruction execution strategy is automatic execution, directly sending an instruction for executing a preset Internet of things instruction to the Internet of things equipment; and if the instruction execution strategy is manually executed, receiving an execution instruction sent by the client and sending a command for executing a preset Internet of things instruction to the Internet of things equipment.
Optionally, the apparatus is further configured to: receiving execution information fed back by the Internet of things equipment when corresponding actions are executed according to preset Internet of things instructions, wherein the execution information comprises at least one of the following: execution state, execution progress and error reporting information; and sending the execution information to the client so as to enable the user to view the execution information.
Optionally, the execution state includes: ready to execute, execution success, execution failure, execution timeout, instruction expiration, and device answer information.
Optionally, the apparatus is further configured to: and receiving an instruction cancellation command sent by the client, and controlling the Internet of things equipment not to execute a preset Internet of things instruction according to the instruction cancellation command.
Optionally, each MQTT message in each preset internet of things instruction is valid within a preset valid time; the preset Internet of things instruction at least comprises the following steps: the method comprises the steps of remotely updating the data of the Internet of things equipment, issuing a file, uploading the file, upgrading the firmware of the remote equipment and remotely executing the action.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. The issuing device of the internet of things instruction provided by the embodiment of the application and the issuing method of the internet of things instruction provided by the embodiment of the application have the same technical characteristics, so that the same technical problem can be solved, and the same technical effect can be achieved.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. The issuing method of the Internet of things instruction is applied to an Internet of things platform, the Internet of things platform is respectively in communication connection with a client and Internet of things equipment, and the issuing method comprises the following steps:
sequentially sending preset Internet of things instructions to the Internet of things equipment, wherein each preset Internet of things instruction comprises a plurality of MQTT messages;
receiving response information returned after the IOT equipment performs self-checking on the preset IOT instruction, wherein the IOT equipment performs self-checking on the preset IOT instruction according to instruction sequence number information sent by the IOT platform so as to detect whether the preset IOT instruction lacks an instruction or the instruction is reversed;
determining whether to execute the preset Internet of things instruction based on the response information;
after the preset Internet of things instruction is determined to be executed, a command for executing the preset Internet of things instruction is sent to the Internet of things equipment based on an instruction execution strategy set by a user at the client;
receiving execution information fed back by the Internet of things equipment when the corresponding action is executed according to the preset Internet of things instruction, wherein the execution information comprises at least one of the following: the method comprises the following steps of executing state, execution progress and error reporting information, wherein the executing state comprises the following steps: preparing for execution, successful execution, failed execution, overtime execution, instruction expiration and equipment response information;
and sending the execution information to the client to enable a user to view the execution information.
2. The method of claim 1, wherein determining whether to execute the preset IOT command based on the response information comprises:
if the response information is information indicating that the preset Internet of things instruction is correct, determining to execute the preset Internet of things instruction;
and if the response information is information indicating that the preset Internet of things instruction is wrong, determining not to execute the preset Internet of things instruction.
3. The method of claim 1, wherein sending a command to the internet of things device to execute the preset internet of things instruction based on an instruction execution policy set by a user at the client comprises:
if the instruction execution strategy is automatic execution, directly sending a command for executing the preset Internet of things instruction to the Internet of things equipment;
and if the instruction execution strategy is manually executed, receiving an execution instruction sent by the client and sending a command for executing the preset Internet of things instruction to the Internet of things equipment.
4. The method of claim 1, further comprising:
and receiving an instruction cancellation command sent by the client, and controlling the Internet of things equipment not to execute the preset Internet of things instruction according to the instruction cancellation command.
5. The method according to claim 1, wherein each MQTT message in each of the preset internet of things instructions is valid for a preset validity time;
the preset internet of things instruction at least comprises the following steps: the method comprises the steps of remotely updating the data of the Internet of things equipment, issuing a file, uploading the file, upgrading the firmware of the remote equipment and remotely executing the action.
6. The utility model provides a device is issued to thing networking instruction which characterized in that is applied to thing networking platform, thing networking platform respectively with customer end, thing networking equipment communication connection, the device includes:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sequentially sending preset Internet of things instructions to the Internet of things equipment, and each preset Internet of things instruction comprises a plurality of MQTT messages;
the receiving module is used for receiving response information returned after the IOT equipment performs self-checking on the preset IOT instruction, wherein the IOT equipment performs self-checking on the preset IOT instruction according to instruction sequence number information sent by the IOT platform so as to detect whether the preset IOT instruction is lack of the instruction or the instruction is reversed;
the determining module is used for determining whether to execute the preset Internet of things instruction or not based on the response information;
the second sending module is used for sending a command for executing the preset Internet of things command to the Internet of things equipment based on a command execution strategy set by a user at the client after the preset Internet of things command is determined to be executed;
the apparatus is further configured to: receiving execution information fed back by the Internet of things equipment when the corresponding action is executed according to the preset Internet of things instruction, wherein the execution information comprises at least one of the following: the method comprises the following steps of executing state, execution progress and error reporting information, wherein the executing state comprises the following steps: preparing for execution, successful execution, failed execution, overtime execution, instruction expiration and equipment response information; and sending the execution information to the client to enable a user to view the execution information.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any of the preceding claims 1 to 5 are implemented when the computer program is executed by the processor.
8. A computer-readable medium having non-volatile program code executable by a processor, characterized in that the program code causes the processor to perform the steps of the method of any of the preceding claims 1 to 5.
CN202011326248.9A 2020-11-24 2020-11-24 Issuing method and device of Internet of things instruction and electronic equipment Active CN112134965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011326248.9A CN112134965B (en) 2020-11-24 2020-11-24 Issuing method and device of Internet of things instruction and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011326248.9A CN112134965B (en) 2020-11-24 2020-11-24 Issuing method and device of Internet of things instruction and electronic equipment

Publications (2)

Publication Number Publication Date
CN112134965A CN112134965A (en) 2020-12-25
CN112134965B true CN112134965B (en) 2021-02-26

Family

ID=73852233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011326248.9A Active CN112134965B (en) 2020-11-24 2020-11-24 Issuing method and device of Internet of things instruction and electronic equipment

Country Status (1)

Country Link
CN (1) CN112134965B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056194A (en) * 2006-06-30 2007-10-17 华为技术有限公司 A SNMP message transfer method and device
CN102469033A (en) * 2010-11-01 2012-05-23 阿里巴巴集团控股有限公司 Message subscription system and message sending method
CN103152757A (en) * 2011-12-07 2013-06-12 中国移动通信集团设计院有限公司 Method and equipment of issuing instructions
CN106850397A (en) * 2016-12-13 2017-06-13 深圳市智物联网络有限公司 Message delivery method and device in Internet of Things
CN111064552A (en) * 2019-11-22 2020-04-24 科大讯飞股份有限公司 Intelligent device control method and device, electronic device and storage medium
CN111143061A (en) * 2019-12-18 2020-05-12 海尔优家智能科技(北京)有限公司 Multi-device linkage control method and device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106773749B (en) * 2016-11-15 2020-05-29 山东大学 Internet of things equipment control method, control end and system
US10334067B2 (en) * 2017-01-02 2019-06-25 International Business Machines Corporation MQTT cluster shared subscription hub for fat-pipe cloud applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056194A (en) * 2006-06-30 2007-10-17 华为技术有限公司 A SNMP message transfer method and device
CN102469033A (en) * 2010-11-01 2012-05-23 阿里巴巴集团控股有限公司 Message subscription system and message sending method
CN103152757A (en) * 2011-12-07 2013-06-12 中国移动通信集团设计院有限公司 Method and equipment of issuing instructions
CN106850397A (en) * 2016-12-13 2017-06-13 深圳市智物联网络有限公司 Message delivery method and device in Internet of Things
CN111064552A (en) * 2019-11-22 2020-04-24 科大讯飞股份有限公司 Intelligent device control method and device, electronic device and storage medium
CN111143061A (en) * 2019-12-18 2020-05-12 海尔优家智能科技(北京)有限公司 Multi-device linkage control method and device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于MQTT的远程实验通信机制研究与实现;谌建飞;《中国优秀硕士学位论文全文数据库信息科技辑》;20190615;论文第四章 *

Also Published As

Publication number Publication date
CN112134965A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
CN111522264B (en) Control method and device of equipment, storage medium and electronic device
EP1763775B1 (en) Device management method for device management system
JP2615509B2 (en) Communication device
US20140181942A1 (en) Startup method and apparatus, startup-acceptance method and apparatus, and mutual-startup method and system
CN107248995B (en) Account verification method and device
CN108696831B (en) Short message sending method and device
CN110889143B (en) File verification method and device
CN111405006A (en) Method and device for processing remote login failure and remote login system
CN106056436B (en) Data rollback method, device and system
CN107508916B (en) Server link management method for intelligent robot
CN112134965B (en) Issuing method and device of Internet of things instruction and electronic equipment
US9544184B2 (en) System and method for taking sequence of dynamic recovery actions
CN111131377A (en) HTTP retry method and device
CN110913416B (en) Terminal, networking method thereof and computer-readable storage medium
CN110247931B (en) Information processing method and server
CN113742354B (en) Message confirmation method and device, storage medium and electronic equipment
CN113568398A (en) Configuration deleting method and system for distributed control system
CN112468538B (en) Operation method and system of Internet of things equipment
CN115473808B (en) Task execution method and related device
CN114928833A (en) Network link login method and device, power terminal and storage medium
US20190332463A1 (en) Hardware error corrections based on policies
US20210014332A1 (en) Method for managing a group of devices, associated server and system
CN101909256B (en) Method for querying user information and multimedia message center
CN115495112A (en) Software upgrading method, device, cooking device and readable storage medium
CN111541719B (en) Authentication method and device and information processing equipment

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
CP03 Change of name, title or address

Address after: Room 303-309, No.3, Pazhou Avenue East Road, Haizhu District, Guangzhou City, Guangdong Province 510000

Patentee after: Shugen Internet Co.,Ltd.

Address before: Unit 12-30, 4th floor, Xigang office building, Guangzhou international media port, 218 and 220 Yuejiang West Road, Haizhu District, Guangzhou City, Guangdong Province 510000

Patentee before: IROOTECH TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address