CN106773749B - Internet of things equipment control method, control end and system - Google Patents

Internet of things equipment control method, control end and system Download PDF

Info

Publication number
CN106773749B
CN106773749B CN201611034027.8A CN201611034027A CN106773749B CN 106773749 B CN106773749 B CN 106773749B CN 201611034027 A CN201611034027 A CN 201611034027A CN 106773749 B CN106773749 B CN 106773749B
Authority
CN
China
Prior art keywords
internet
instruction
things equipment
state
control
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
CN201611034027.8A
Other languages
Chinese (zh)
Other versions
CN106773749A (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.)
Shandong Yuanda Information Technology Co ltd
Shandong University
Original Assignee
Shandong Yuanda Information Technology Co ltd
Shandong University
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 Shandong Yuanda Information Technology Co ltd, Shandong University filed Critical Shandong Yuanda Information Technology Co ltd
Priority to CN201611034027.8A priority Critical patent/CN106773749B/en
Publication of CN106773749A publication Critical patent/CN106773749A/en
Application granted granted Critical
Publication of CN106773749B publication Critical patent/CN106773749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Abstract

The invention discloses a control method, a control end and a system of Internet of things equipment, wherein the Internet of things equipment and the control end are communicated with each other; the method is executed on the control end side, and the Internet of things equipment control method comprises the following steps of (1): the control end sends the control instruction of the Internet of things equipment to the instruction pool for caching, so that the instruction is prevented from being lost, and the instruction is prevented from being lost; step (2): detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; and (3): and sending a state confirmation instruction to the Internet of things equipment, and further confirming the state of the Internet of things equipment according to whether a state confirmation instruction response of the Internet of things equipment is received to finally judge whether the control instruction of the Internet of things equipment is successfully executed.

Description

Internet of things equipment control method, control end and system
Technical Field
The invention belongs to the field of control of Internet of things, and particularly relates to a method, a control terminal and a system for controlling Internet of things equipment.
Background
The internet of things is a network which connects any article with the internet according to an agreed protocol through information sensing equipment such as radio frequency identification, infrared sensors, global positioning systems, laser scanners and the like, and performs information exchange and communication so as to realize intelligent identification, positioning, tracking, monitoring and management of the article. Namely the internet connected with objects; two layers of meanings are given: firstly, the core and the foundation of the internet of things are still the internet, and the internet is an extended and expanded network on the basis of the internet; second, the user end extends and extends to any article to article for information exchange and communication.
In a wide-range internet of things system, wireless data transmission and a wired network are often combined to form a basic internet supporting the internet of things. Compared with a wired network, especially a field industrial control network, the wireless network is frequently disconnected, the data delay is large, the packet loss ratio is high, and the network is not controlled more seriously. For an internet of things system needing remote control, the reliability of the remote control is seriously influenced by the characteristics.
In the control field, the fieldbus communicates with a plurality of devices, transmitting data for identification, monitoring, management. In the bus, if a plurality of devices transmit data at the same time, data collision is caused, data is distorted, and corresponding information cannot be transmitted. Therefore, in an internet of things system which covers a large range and utilizes a wireless network and a field bus, remote control signals are often lost, and may collide on a serial bus, so that control cannot be completed, even actions are disordered, and harm is caused. Meanwhile, the internet of things system comprises a plurality of software and hardware system platforms and products in multiple places, the working condition difference is huge, various uncertain events are easy to occur, and the reliability of control is affected, such as power failure, damage and the like.
Disclosure of Invention
In order to solve the disadvantages of the prior art, a first object of the present invention is to provide a method for controlling an internet of things device, where a network of the internet of things device and a control terminal communicate with each other.
The method for controlling the equipment of the Internet of things is executed on the control end side, and specifically comprises the following steps:
step (1): the control end sends the control instruction of the Internet of things equipment to the instruction pool for caching, so that the instruction loss is avoided;
step (2): detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment;
and (3): and sending a state confirmation instruction to the Internet of things equipment, and further confirming the state of the Internet of things equipment according to whether a state confirmation instruction response of the Internet of things equipment is received to finally judge whether the control instruction of the Internet of things equipment is successfully executed.
According to the control method of the equipment of the Internet of things, firstly, an instruction cache flow is started, and instructions are stored so as to prevent the system or the equipment of the Internet of things from being in fault and losing the instructions; then starting an instruction sending process and sending an instruction; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
Further, the method further comprises the step that after the control command of the Internet of things equipment is executed successfully, the control end deletes the corresponding control command of the Internet of things equipment in the command pool.
Therefore, the instruction redundancy in the instruction pool is avoided, the instruction occupied space is saved, and the control efficiency of the Internet of things equipment is further improved.
In the step (3), if the control end does not receive the status confirmation instruction response of the internet of things device, further judging whether the sent status confirmation times are less than the preset times, and if so, resending the status confirmation instruction; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
In the step (3), if the control end receives a state confirmation instruction response of the internet of things equipment, further judging whether the state of the internet of things equipment is consistent with an expected state, and if so, judging that the control instruction of the internet of things equipment is successfully executed; otherwise, returning to the step (2).
If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
The second purpose provided by the invention is to provide an internet of things equipment control terminal.
The Internet of things equipment control terminal comprises: the system comprises an instruction transmitter, an instruction buffer and a state confirmer, wherein the instruction transmitter and the state confirmer are respectively connected with the Internet of things equipment;
the instruction transmitter is used for transmitting the control instruction of the Internet of things equipment to the instruction cache and caching the control instruction into an instruction pool of the instruction cache;
the instruction transmitter is further used for detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool and transmitting the Internet of things equipment control instruction to the Internet of things equipment;
and the state confirmer is used for sending a state confirmation instruction to the Internet of things equipment, and further confirming the state of the Internet of things equipment according to whether a state confirmation instruction response of the Internet of things equipment is received so as to finally judge whether the control instruction of the Internet of things equipment is successfully executed.
According to the control end of the Internet of things equipment, firstly, an instruction caching flow is started, and an instruction transmitter transmits an instruction to an instruction cache for caching to store the instruction, so that the problem that the system or the Internet of things equipment is in failure and loses the instruction is avoided; then starting an instruction sending process, detecting a communication state of the instruction sender and the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed by the state confirmer, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
If the state confirmer does not receive the state confirmation instruction response of the Internet of things equipment, the state confirmer is also used for judging whether the state confirmation times of the state confirmer sent by the state confirmer are less than the preset times, and if so, the state confirmation instruction is sent again; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
If the state confirmer receives a state confirmation instruction response of the Internet of things equipment, the state confirmer further judges whether the state of the Internet of things equipment is consistent with an expected state, and if so, the state confirmer judges that the control instruction of the Internet of things equipment is successfully executed; otherwise, starting the instruction transmitter to continuously detect the communication state of the Internet of things equipment, calling the corresponding Internet of things equipment control instruction cached in the instruction pool, and transmitting the Internet of things equipment control instruction to the Internet of things equipment.
If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
The third purpose provided by the invention is to provide another method for controlling the equipment of the internet of things, wherein the equipment of the internet of things and the control end are communicated with each other.
The other method for controlling the equipment of the internet of things is described from the control end and two sides of the equipment of the internet of things, and specifically comprises the following steps:
step (1): the control end sends the control instruction of the Internet of things equipment to the instruction pool for caching, so that the instruction loss is avoided;
step (2): the control end detects the communication state with the Internet of things equipment, calls a corresponding Internet of things equipment control instruction cached in the instruction pool and sends the Internet of things equipment control instruction to the Internet of things equipment; the Internet of things equipment responds after receiving the corresponding instruction;
and (3): the control end sends a state determination instruction to the Internet of things equipment, the Internet of things equipment responds after receiving the state determination instruction, and the state determination instruction response is fed back to the control end;
and (4): and the control terminal further confirms the state of the Internet of things equipment according to whether the state confirmation instruction response of the Internet of things equipment is received or not so as to finally judge whether the control instruction of the Internet of things equipment is successfully executed or not.
The method further comprises the step that the control terminal deletes the corresponding Internet of things equipment control instruction in the instruction pool after the Internet of things equipment control instruction is executed successfully.
According to the control method of the equipment of the Internet of things, firstly, an instruction cache flow is started, and instructions are stored so as to prevent the system or the equipment of the Internet of things from being in fault and losing the instructions; then starting an instruction sending process, sending an instruction to a control end, and responding by the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed by the control end, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
In the step (4), if the control end does not receive the status confirmation instruction response of the internet of things device, further judging whether the sent status confirmation times are less than the preset times, and if so, resending the status confirmation instruction; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
In the step (4), if the control end receives a state confirmation instruction response of the internet of things equipment, whether the state of the internet of things equipment is consistent with an expected state or not is further judged, and if yes, the control instruction of the internet of things equipment is judged to be successfully executed; otherwise, returning to the step (2).
If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
The fourth purpose that the invention provides is to provide an Internet of things equipment control system.
The Internet of things equipment control system comprises: the control end is communicated with the Internet of things equipment;
the control terminal is configured to:
sending the control instruction of the Internet of things equipment to an instruction pool for caching, so that the instruction is prevented from being lost, and the instruction is prevented from being lost;
detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment;
sending a state determining instruction to the Internet of things equipment, and further determining the state of the Internet of things equipment according to whether a state determining instruction response of the Internet of things equipment is received to finally judge whether the control instruction of the Internet of things equipment is successfully executed;
and the Internet of things equipment is used for responding after receiving the corresponding Internet of things equipment control command and receiving the state confirmation command, and feeding back the state confirmation command response to the control end.
According to the control system of the equipment of the Internet of things, firstly, an instruction caching flow is started, and an instruction is sent to an instruction cache to be cached so as to store the instruction, so that the problem that the system or the equipment of the Internet of things fails and loses the instruction is avoided; then starting an instruction sending flow, detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
The control terminal is further configured to:
if the state confirmation instruction response of the Internet of things equipment is not received, whether the state confirmation times of the state confirmer sent by the control end are smaller than the preset times is judged, and if yes, the state confirmation instruction is sent again; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
The control terminal is further configured to:
if the state confirmation instruction response of the Internet of things equipment is received, further judging whether the state of the Internet of things equipment is consistent with the expected state, if so, judging that the execution of the control instruction of the Internet of things equipment is successful; otherwise, the communication state of the equipment in the Internet of things is continuously detected, and the corresponding control instruction of the equipment in the Internet of things cached in the instruction pool is called and sent to the equipment in the Internet of things.
If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
The invention has the beneficial effects that:
(1) according to the control method of the equipment of the Internet of things, firstly, an instruction cache flow is started, and instructions are stored so as to prevent the system or the equipment of the Internet of things from being in fault and losing the instructions; then starting an instruction sending process and sending an instruction; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
(2) According to the control end of the Internet of things equipment, firstly, an instruction caching flow is started, and an instruction transmitter transmits an instruction to an instruction cache for caching to store the instruction, so that the problem that the system or the Internet of things equipment is in failure and loses the instruction is avoided; then starting an instruction sending process, detecting a communication state of the instruction sender and the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed by the state confirmer, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
(3) According to the control system of the equipment of the Internet of things, firstly, an instruction caching flow is started, and an instruction is sent to an instruction cache to be cached so as to store the instruction, so that the problem that the system or the equipment of the Internet of things fails and loses the instruction is avoided; then starting an instruction sending flow, detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
Drawings
Fig. 1 is a flowchart of an internet of things device control method of the invention.
Fig. 2 is a schematic structural diagram of the internet of things device control end of the invention.
Fig. 3 is a flowchart of another method for controlling an internet of things device according to the present invention.
Fig. 4 is a schematic structural diagram of an internet of things device control system of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The Internet of things equipment and the control end are communicated with each other. The internet of things device refers to information sensing devices and various action executing devices, such as infrared sensors, global positioning systems, laser scanners, motors, pumps, valves, robots and the like. The control end is used for sending an instruction for controlling the internet of things device to control the execution of corresponding actions of the internet of things device, such as: and starting and closing the Internet of things equipment.
Example one
Fig. 1 is a flowchart of a first embodiment of an internet of things device control method.
As shown in fig. 1, the method for controlling the internet of things device is executed on the control end side, and specifically includes the following steps:
step (1): the control end sends the control command of the Internet of things equipment to the command pool for caching, and command loss is avoided.
Step (2): and detecting the communication state of the equipment in the Internet of things, calling a corresponding control instruction of the equipment in the Internet of things cached in the instruction pool, and sending the control instruction to the equipment in the Internet of things.
And (3): and sending a state confirmation instruction to the Internet of things equipment, and further confirming the state of the Internet of things equipment according to whether a state confirmation instruction response of the Internet of things equipment is received to finally judge whether the control instruction of the Internet of things equipment is successfully executed.
In the step (3), if the control end does not receive the status confirmation instruction response of the internet of things equipment, further judging whether the sent status confirmation times are less than the preset times, and if so, resending the status confirmation instruction; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
In the step (3), if the control end receives the state confirmation instruction response of the internet of things equipment, further judging whether the state of the internet of things equipment is consistent with the expected state, and if so, judging that the control instruction of the internet of things equipment is successfully executed; otherwise, returning to the step (2).
If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
Further, the method further comprises the step that after the control command of the Internet of things equipment is executed successfully, the control end deletes the corresponding control command of the Internet of things equipment in the command pool. Therefore, the instruction redundancy in the instruction pool is avoided, the instruction occupied space is saved, and the control efficiency of the Internet of things equipment is further improved.
Specifically, the method for controlling the internet of things equipment takes the control of a certain agricultural irrigation internet of things system as an example:
the agricultural irrigation Internet of things system comprises irrigation equipment positioned on a farmland irrigation field, an intelligent control cloud platform positioned in a telecommunication room, other accessory sensing equipment, transmission equipment and storage equipment. The system can control remote irrigation equipment through the cloud platform, and realize the operations of starting and stopping the irrigation equipment and the like. Wherein, the cloud platform is the control end.
When the irrigation equipment is remotely started or stopped, a starting or stopping instruction needs to be sent to the irrigation equipment through the cloud platform, so that remote control is realized. The start instruction is "start" and the stop instruction is "stop". The following describes the entire reliable control process by taking the start command as an example.
And (3) instruction caching flow: after the cloud platform sends a starting instruction request, the irrigation equipment identification code '12345' and the starting instruction form a complete instruction '12345 start'. The instruction "12345 start" is stored into the instruction pool. The new instruction '12345 start' is stored to the tail of the queue in the instruction pool for caching in the form of a queue.
And an instruction sending flow: the cloud platform sends the heartbeat packet to the irrigation equipment 12345, and if the irrigation equipment replies to the heartbeat packet, the irrigation equipment 12345 is on line. If the device is not on-line, the sending process is ended, and after the irrigation device 12345 is on-line, the command "12345 start" is started to be sent again. If the device is on-line, an instruction "12345 start" is sent to irrigation equipment 12345. The status confirmation procedure is initiated regardless of whether the cloud platform receives the instruction execution response from the irrigation equipment 12345.
And (3) state confirmation flow: the cloud platform sends a status query instruction "12345 state" to the irrigation equipment 12345, and then waits for receiving a status reply of the irrigation equipment 12345. If the status reply of the irrigation equipment 12345 cannot be received, resending the status inquiry command '12345 state' to the irrigation equipment 12345 until the status reply is received or the status inquiry times reach the preset times; if the number of status inquiries reaches a predetermined number, the equipment is disconnected or otherwise abnormal, the status confirmation process is stopped, and the command is re-sent by starting after the irrigation equipment 12345 is on line. If a status reply of the irrigation equipment 12345 is received, it is confirmed whether its status is the on status (the status in operation). If the state is the open state, the instruction is successfully executed, the instruction '12345 start' in the queue in the instruction pool is deleted, and the whole flow is ended. And if the state is not the opening state, restarting the instruction sending process.
In the method for controlling the internet of things equipment, firstly, an instruction cache flow is started, and an instruction is stored so as to prevent the system or the internet of things equipment from being in fault and losing the instruction; then starting an instruction sending process and sending an instruction; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
Example two
Fig. 2 is a schematic structural diagram of the internet of things device control end of the invention. As shown in fig. 2, the internet of things device control terminal of the present invention includes: the command sender and the state confirmer are respectively connected with the Internet of things equipment.
(1) The instruction transmitter is used for transmitting the control instruction of the Internet of things equipment to the instruction cache and caching the control instruction into an instruction pool of the instruction cache;
the instruction transmitter is further used for detecting the communication state of the Internet of things equipment, calling the corresponding Internet of things equipment control instruction cached in the instruction pool and transmitting the Internet of things equipment control instruction to the Internet of things equipment.
(2) And the state confirmer is used for sending a state confirmation instruction to the Internet of things equipment, and further confirming the state of the Internet of things equipment according to whether a state confirmation instruction response of the Internet of things equipment is received so as to finally judge whether the control instruction of the Internet of things equipment is successfully executed.
If the state confirmer does not receive the state confirmation instruction response of the Internet of things equipment, the state confirmer is also used for judging whether the state confirmation times of the state confirmer sent by the state confirmer are less than the preset times, and if so, the state confirmation instruction is sent again; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
If the state confirmer receives a state confirmation instruction response of the Internet of things equipment, the state confirmer further judges whether the state of the Internet of things equipment is consistent with an expected state, and if so, the state confirmer judges that the control instruction of the Internet of things equipment is successfully executed; otherwise, starting the instruction transmitter to continuously detect the communication state of the Internet of things equipment, calling the corresponding Internet of things equipment control instruction cached in the instruction pool, and transmitting the Internet of things equipment control instruction to the Internet of things equipment.
If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
Specifically, the method for controlling the internet of things equipment takes the control of a certain agricultural irrigation internet of things system as an example:
the agricultural irrigation Internet of things system comprises irrigation equipment positioned on a farmland irrigation field, an intelligent control cloud platform positioned in a telecommunication room, other accessory sensing equipment, transmission equipment and storage equipment. The system can control remote irrigation equipment through the cloud platform, and realize the operations of starting and stopping the irrigation equipment and the like. The cloud platform comprises an instruction transmitter, a state confirmer and an instruction buffer.
When the irrigation equipment is remotely started or stopped, a starting or stopping instruction needs to be sent to the irrigation equipment through the cloud platform, so that remote control is realized. The start instruction is "start" and the stop instruction is "stop". The following describes the entire reliable control process by taking the start command as an example.
And (3) instruction caching flow: after the command transmitter receives the request of sending the starting command, the irrigation equipment identification code '12345' and the starting command are combined into a complete command '12345 start'. The instruction "12345 start" is stored to the instruction buffer. The instruction buffer is a queue, and stores a new instruction "12345 start" to the end of the queue.
And an instruction sending flow: the command transmitter sends a heartbeat packet to the irrigation device 12345, and if the irrigation device replies with a heartbeat packet, the irrigation device 12345 is on-line. If the device is not on-line, the sending process is ended, and after the irrigation device 12345 is on-line, the command buffer starts the resending of the command. If the device is on-line, the command transmitter sends a command "12345 start" to irrigation equipment 12345. The status confirmation procedure is initiated regardless of whether the command transmitter receives a command execution response from the irrigation equipment 12345.
And (3) state confirmation flow: the status validator sends a status query "12345 state" to the irrigation equipment 12345 and then waits to receive a status reply from the irrigation equipment 12345. If the status reply of the irrigation equipment 12345 cannot be received, resending the status inquiry command '12345 state' to the irrigation equipment 12345 until the status reply is received or the status inquiry times reach the preset times; if the number of state inquiry times reaches the preset number, the equipment is disconnected or is abnormal, the state confirmation process is stopped, and the command buffer starts the resending of the command after the irrigation equipment 12345 is on line. If a status reply of the irrigation equipment 12345 is received, it is confirmed whether its status is the on status (the status in operation). If the state is the open state, the instruction is successfully executed, the instruction '12345 start' in the instruction buffer queue is deleted, and the whole process is ended. And if the state is not the opening state, restarting the instruction sending process.
The control end of the internet of things equipment in the embodiment starts an instruction caching flow, and an instruction transmitter transmits an instruction to an instruction cache for caching to store the instruction, so that the system or the internet of things equipment is prevented from being in failure and losing the instruction; then starting an instruction sending process, detecting a communication state of the instruction sender and the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed by the state confirmer, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
EXAMPLE III
Fig. 3 is a flowchart of another method for controlling the internet of things device according to the invention. As shown in fig. 3, the method for controlling the internet of things device is described from the control end and the two sides of the internet of things device, and specifically includes the following steps:
step (1): the control end sends the control instruction of the Internet of things equipment to the instruction pool for caching, so that the instruction is prevented from being lost, and the instruction is prevented from being lost;
step (2): the control end detects the communication state with the Internet of things equipment, calls a corresponding Internet of things equipment control instruction cached in the instruction pool and sends the Internet of things equipment control instruction to the Internet of things equipment; the Internet of things equipment responds after receiving the corresponding instruction;
and (3): the control end sends a state determination instruction to the Internet of things equipment, the Internet of things equipment responds after receiving the state determination instruction, and the state determination instruction response is fed back to the control end;
and (4): and the control terminal further confirms the state of the Internet of things equipment according to whether the state confirmation instruction response of the Internet of things equipment is received or not so as to finally judge whether the control instruction of the Internet of things equipment is successfully executed or not.
In the step (4), if the control end does not receive the status confirmation instruction response of the internet of things equipment, further judging whether the sent status confirmation times are less than the preset times, and if so, resending the status confirmation instruction; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
In the step (4), if the control end receives the state confirmation instruction response of the internet of things equipment, further judging whether the state of the internet of things equipment is consistent with the expected state, and if so, judging that the control instruction of the internet of things equipment is successfully executed; otherwise, returning to the step (2). If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
The method further comprises the step that the control terminal deletes the corresponding Internet of things equipment control instruction in the instruction pool after the Internet of things equipment control instruction is executed successfully.
In the method for controlling the internet of things equipment, firstly, an instruction cache flow is started, and an instruction is stored so as to prevent the system or the internet of things equipment from being in fault and losing the instruction; then starting an instruction sending process, sending an instruction to a control end, and responding by the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed by the control end, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
Example four
Fig. 4 is a schematic structural diagram of an internet of things device control system according to the present invention. As shown in fig. 4, the internet of things device control system of the present invention includes: and the control end is communicated with the Internet of things equipment.
Wherein the control terminal is configured to:
sending the control instruction of the Internet of things equipment to an instruction pool for caching, so that the instruction is prevented from being lost, and the instruction is prevented from being lost;
detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment;
and sending a state confirmation instruction to the Internet of things equipment, and further confirming the state of the Internet of things equipment according to whether a state confirmation instruction response of the Internet of things equipment is received to finally judge whether the control instruction of the Internet of things equipment is successfully executed.
The control end is further configured to: if the state confirmation instruction response of the Internet of things equipment is not received, whether the state confirmation times of the state confirmer sent by the control end are smaller than the preset times is judged, and if yes, the state confirmation instruction is sent again; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
Therefore, whether the network transmission data is collided or distorted or not, the invention can correctly execute the instruction once by sending for many times. No matter whether the execution instruction of the Internet of things equipment is correct or not, the final state of the Internet of things equipment is correct by state confirmation and instruction sending.
The control end is further configured to: if the state confirmation instruction response of the Internet of things equipment is received, further judging whether the state of the Internet of things equipment is consistent with the expected state, if so, judging that the execution of the control instruction of the Internet of things equipment is successful; otherwise, the communication state of the equipment in the Internet of things is continuously detected, and the corresponding control instruction of the equipment in the Internet of things cached in the instruction pool is called and sent to the equipment in the Internet of things.
If the expected state is not achieved after the command and the state are sent for multiple times, the next round of command sending and state confirmation can be carried out continuously, and therefore the traditional reliability of the Internet of things is improved.
And the Internet of things equipment is used for responding after receiving the corresponding Internet of things equipment control command and responding after receiving the state determination command, and feeding back the state determination command response to the control end.
The internet of things equipment control system of the embodiment starts an instruction caching flow, and sends an instruction to an instruction cache for caching to store the instruction, so as to prevent the system or the internet of things equipment from being in fault and losing the instruction; then starting an instruction sending flow, detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; and finally, starting a state confirmation flow, and confirming that the instruction is successfully executed, so that the instruction can be sent to the Internet of things equipment after the equipment is on-line no matter whether the Internet of things equipment is on-line or not, thereby avoiding the instruction from being lost and improving the reliability of the control of the Internet of things equipment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (5)

1. An Internet of things equipment control method is characterized in that the Internet of things equipment and a control end are communicated with each other; the method is executed on the control end side, and is characterized in that the method for controlling the equipment of the Internet of things specifically comprises the following steps:
step (1): the control end sends the control command of the Internet of things equipment to the command pool for caching, and the command is cached in the command pool in a queue form; instruction loss is avoided;
step (2): detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; if the equipment is not on line, finishing the sending process, and after waiting for the equipment to be on line, retransmitting the instruction; starting a state confirmation process no matter whether an instruction execution response of the equipment is received or not;
and (3): sending a state determining instruction to the Internet of things equipment, and further determining the state of the Internet of things equipment according to whether a state determining instruction response of the Internet of things equipment is received to finally judge whether the control instruction of the Internet of things equipment is successfully executed;
in the step (3), if the control end receives a state confirmation instruction response of the internet of things equipment, further judging whether the state of the internet of things equipment is consistent with an expected state, and if so, judging that the control instruction of the internet of things equipment is successfully executed; otherwise, returning to the step (2);
in the step (3), if the control end does not receive the status confirmation instruction response of the internet of things device, further judging whether the sent status confirmation times are less than the preset times, and if so, resending the status confirmation instruction; otherwise, judging that the Internet of things equipment is disconnected or abnormal.
2. The method for controlling the internet of things equipment as claimed in claim 1, further comprising the step of deleting the corresponding internet of things equipment control command in the command pool by the control terminal after the execution of the internet of things equipment control command is successful.
3. The utility model provides a thing networking device control end which characterized in that includes: the system comprises an instruction transmitter, an instruction buffer and a state confirmer, wherein the instruction transmitter and the state confirmer are respectively connected with the Internet of things equipment;
the instruction transmitter is used for transmitting the control instruction of the Internet of things equipment to the instruction cache and caching the control instruction into an instruction pool of the instruction cache; the instructions are cached in a queue form in an instruction pool;
the instruction transmitter is further used for detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool and transmitting the Internet of things equipment control instruction to the Internet of things equipment; if the equipment is not on line, finishing the sending process, and after waiting for the equipment to be on line, retransmitting the instruction; starting a state confirmation process no matter whether an instruction execution response of the equipment is received or not;
the state confirmer is used for sending a state confirmation instruction to the Internet of things equipment, and further confirming the state of the Internet of things equipment according to whether a state confirmation instruction response of the Internet of things equipment is received so as to finally judge whether the control instruction of the Internet of things equipment is successfully executed; if the state confirmer does not receive the state confirmation instruction response of the Internet of things equipment, the state confirmer is also used for judging whether the state confirmation times of the state confirmer sent by the state confirmer are less than the preset times, and if so, the state confirmation instruction is sent again; otherwise, judging that the Internet of things equipment is disconnected or abnormal
If the state confirmer receives a state confirmation instruction response of the Internet of things equipment, the state confirmer further judges whether the state of the Internet of things equipment is consistent with an expected state, and if so, the state confirmer judges that the control instruction of the Internet of things equipment is successfully executed; otherwise, starting the instruction transmitter to continuously detect the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool and transmitting the Internet of things equipment control instruction to the Internet of things equipment; and when the control instruction of the Internet of things equipment is successfully executed, the control end deletes the corresponding control instruction of the Internet of things equipment in the instruction pool.
4. An Internet of things equipment control method is characterized in that the Internet of things equipment and a control end are communicated with each other; the method is characterized by comprising the following steps:
step (1): the control end sends the control command of the Internet of things equipment to the command pool for caching, and the command is cached in the command pool in a queue form; instruction loss is avoided;
step (2): the control end detects the communication state with the Internet of things equipment, calls a corresponding Internet of things equipment control instruction cached in the instruction pool and sends the Internet of things equipment control instruction to the Internet of things equipment; the Internet of things equipment responds after receiving the corresponding instruction; if the equipment is not on line, finishing the sending process, and after waiting for the equipment to be on line, retransmitting the instruction; starting a state confirmation process no matter whether an instruction execution response of the equipment is received or not;
and (3): the control end sends a state determination instruction to the Internet of things equipment, the Internet of things equipment responds after receiving the state determination instruction, and the state determination instruction response is fed back to the control end;
and (4): the control terminal further confirms the state of the Internet of things equipment according to whether the state confirmation instruction response of the Internet of things equipment is received or not so as to finally judge whether the control instruction of the Internet of things equipment is successfully executed or not;
in the step (4), if the control end receives a state confirmation instruction response of the internet of things equipment, whether the state of the internet of things equipment is consistent with an expected state or not is further judged, and if yes, the control instruction of the internet of things equipment is judged to be successfully executed; otherwise, returning to the step (2);
in the step (4), if the control end does not receive the status confirmation instruction response of the internet of things device, further judging whether the sent status confirmation times are less than the preset times, and if so, resending the status confirmation instruction; otherwise, judging that the Internet of things equipment is disconnected or abnormal,
the method further comprises the step that the control terminal deletes the corresponding Internet of things equipment control instruction in the instruction pool after the Internet of things equipment control instruction is executed successfully.
5. An internet of things equipment control system, comprising: the control end is communicated with the Internet of things equipment;
the control terminal is configured to:
sending the control instruction of the Internet of things equipment to an instruction pool for caching, wherein the instruction is cached in the instruction pool in a queue form; instruction loss is avoided;
detecting the communication state of the Internet of things equipment, calling a corresponding Internet of things equipment control instruction cached in the instruction pool, and sending the Internet of things equipment control instruction to the Internet of things equipment; if the equipment is not on line, finishing the sending process, and after waiting for the equipment to be on line, retransmitting the instruction; starting a state confirmation process no matter whether an instruction execution response of the equipment is received or not;
sending a state determining instruction to the Internet of things equipment, and further determining the state of the Internet of things equipment according to whether a state determining instruction response of the Internet of things equipment is received to finally judge whether the control instruction of the Internet of things equipment is successfully executed;
the Internet of things equipment is used for responding after receiving the corresponding Internet of things equipment control instruction and responding after receiving the state determination instruction, and feeding back the state determination instruction response to the control end; if the control end receives the state confirmation instruction response of the Internet of things equipment, further judging whether the state of the Internet of things equipment is consistent with the expected state, and if so, judging that the execution of the control instruction of the Internet of things equipment is successful; otherwise, detecting the communication state of the equipment of the Internet of things again, and then sending an instruction; and when the control instruction of the Internet of things equipment is successfully executed, the control end deletes the corresponding control instruction of the Internet of things equipment in the instruction pool.
CN201611034027.8A 2016-11-15 2016-11-15 Internet of things equipment control method, control end and system Active CN106773749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611034027.8A CN106773749B (en) 2016-11-15 2016-11-15 Internet of things equipment control method, control end and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611034027.8A CN106773749B (en) 2016-11-15 2016-11-15 Internet of things equipment control method, control end and system

Publications (2)

Publication Number Publication Date
CN106773749A CN106773749A (en) 2017-05-31
CN106773749B true CN106773749B (en) 2020-05-29

Family

ID=58971936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611034027.8A Active CN106773749B (en) 2016-11-15 2016-11-15 Internet of things equipment control method, control end and system

Country Status (1)

Country Link
CN (1) CN106773749B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7052641B2 (en) 2018-08-27 2022-04-12 村田機械株式会社 Wireless communication system and wireless communication method
CN111131341B (en) * 2018-10-30 2022-09-09 中兴通讯股份有限公司 Method, device and equipment for controlling data processing and storage medium
CN110174887A (en) * 2019-06-15 2019-08-27 泉州昌荣贸易有限公司 The method for maintaining of smart home device
CN112000019B (en) * 2020-07-24 2024-04-26 青岛海尔空调器有限总公司 Method, device and equipment for sharing equipment instruction control
CN112202654B (en) * 2020-09-22 2022-08-02 广州河东科技有限公司 Control instruction processing method, device, equipment and storage medium
CN112134965B (en) * 2020-11-24 2021-02-26 树根互联技术有限公司 Issuing method and device of Internet of things instruction and electronic equipment
CN112666877B (en) * 2021-02-01 2022-11-29 亚特智物联技术(广东)有限公司 Control system of Internet of things
CN114495363B (en) * 2022-01-07 2023-08-11 珠海格力电器股份有限公司 Target equipment locking method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096654A (en) * 2011-01-28 2011-06-15 深圳市普联技术有限公司 Data communication method, system and processor among CPUs
CN104320459A (en) * 2014-10-24 2015-01-28 杭州华三通信技术有限公司 Node management method and device
CN104636331A (en) * 2013-11-06 2015-05-20 北京航天长峰科技工业集团有限公司 Mass internet of things perception data access and standardization method
CN104833397A (en) * 2015-05-22 2015-08-12 北京希望慧联科技有限公司 Temperature and humidity information monitoring method, device, and system
CN104967536A (en) * 2015-06-29 2015-10-07 北京奇虎科技有限公司 Method and device for realizing data consistency of multiple machine rooms
CN105116739A (en) * 2015-07-15 2015-12-02 周良 Bidirectional control system and method of intelligent household electrical appliances
CN105354747A (en) * 2015-10-09 2016-02-24 徐蔚 Information processing network and method based on uniform code sending, and sensing access equipment
CN105426238A (en) * 2016-01-17 2016-03-23 浙江维融电子科技股份有限公司 Control method of equipment background instruction management system based on memory
CN105955101A (en) * 2016-04-27 2016-09-21 李灵超 Control method, scheduling processor and controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9154433B2 (en) * 2011-10-25 2015-10-06 Nicira, Inc. Physical controller

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096654A (en) * 2011-01-28 2011-06-15 深圳市普联技术有限公司 Data communication method, system and processor among CPUs
CN104636331A (en) * 2013-11-06 2015-05-20 北京航天长峰科技工业集团有限公司 Mass internet of things perception data access and standardization method
CN104320459A (en) * 2014-10-24 2015-01-28 杭州华三通信技术有限公司 Node management method and device
CN104833397A (en) * 2015-05-22 2015-08-12 北京希望慧联科技有限公司 Temperature and humidity information monitoring method, device, and system
CN104967536A (en) * 2015-06-29 2015-10-07 北京奇虎科技有限公司 Method and device for realizing data consistency of multiple machine rooms
CN105116739A (en) * 2015-07-15 2015-12-02 周良 Bidirectional control system and method of intelligent household electrical appliances
CN105354747A (en) * 2015-10-09 2016-02-24 徐蔚 Information processing network and method based on uniform code sending, and sensing access equipment
CN105426238A (en) * 2016-01-17 2016-03-23 浙江维融电子科技股份有限公司 Control method of equipment background instruction management system based on memory
CN105955101A (en) * 2016-04-27 2016-09-21 李灵超 Control method, scheduling processor and controller

Also Published As

Publication number Publication date
CN106773749A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106773749B (en) Internet of things equipment control method, control end and system
EP3331197B1 (en) A method and system for monitoring a connection status of a device
CN111031565B (en) Method and device for identifying off-line state of ZigBee device
CN111064552B (en) Intelligent device control method and device, electronic device and storage medium
CN108124510B (en) Wireless pairing system and pairing method
CN104243482A (en) Control method and device of intelligent device
CN105245442A (en) Method, device and system for transmitting instant messaging IM message
CN111491351B (en) Method and system for sensing online of WiFi terminal based on authentication information
JP2011259221A5 (en)
CN105210349A (en) Wireless communication quality information processing apparatus and communication system
CN103746842A (en) Method and system for detecting fault restarting of line card
CN102764504B (en) Information output method and electronic equipment
CN113965466B (en) Data transmission system adaptive to network bandwidth
CN112261512B (en) Master station remote control method, device, storage medium and equipment of unbalanced polling protocol
CN101741605A (en) Method, apparatus and system for processing message
CN105045759B (en) Control communication method of financial self-service equipment
CN109245934B (en) Fault processing method, device, system, control equipment and management equipment
CN111277960A (en) Remote control method and system for electromechanical equipment
CN116723176B (en) Continuous addressing communication method, system, computer device and storage medium
CN112532694B (en) Remote centralized control method and system suitable for master station communication
CN112738187B (en) Safe connection method and device of equipment, electronic equipment and storage medium
CN101534568A (en) Device and method for establishing connection of LTE system customer equipment
CN111010670B (en) Remote control method and device based on multi-device cooperation and processing terminal
CN113858209B (en) Noise-reducing intelligent remote carrying robot with 5G audio transmission function
JP2011118634A5 (en)

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