Internet of things information transmission method and platform
Technical Field
The embodiment of the application relates to the technical field of the Internet of things, in particular to an information transmission method and platform of the Internet of things.
Background
The internet of things (The Internet of Things, IOT for short) refers to collecting any object or process needing to be monitored, connected and interacted in real time through various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors, laser scanners, and collecting various needed information such as sound, light, heat, electricity, mechanics, chemistry, biology, positions and the like, and achieving ubiquitous connection of objects and people through various possible network access, so as to achieve intelligent sensing, identification and management of objects and processes. The internet of things is an information carrier based on the internet, a traditional telecommunication network and the like, and enables all common physical objects which can be independently addressed to form an interconnection network. That is, the internet of things is an important component of a new generation of information technology, and is also an important development stage of an 'informatization' age. The English name is: "Internet of things (IoT)". As the name implies, the internet of things is the internet to which things are connected. This has two layers of meaning: firstly, the core and the foundation of the Internet of things are still the Internet, and the Internet is an extended and expanded network based on the Internet; secondly, the user side extends and expands to any article to article, and information exchange and communication are carried out, namely, the article information is carried out. The internet of things is widely applied to the fusion of networks through communication sensing technologies such as intelligent sensing, recognition technologies, pervasive computing and the like, and is also called as the third wave of development of world information industry after a computer and the Internet. The internet of things is an application expansion of the internet, and is a network rather than a business and an application. Therefore, the application innovation is the core of the development of the Internet of things, and the innovation 2.0 taking the user experience as the core is the soul of the development of the Internet of things. During agricultural production, control of the production environment is closely related to the growth of crops, and as the network and intelligent production control are developed, the agricultural production is gradually combined with the network to achieve remote control and real-time control. The collection of environmental information during agricultural production is relevant to the implementation of corresponding control measures, and is very important for agricultural production.
The environment information acquisition and transmission system based on the cloud service comprises an agricultural Internet of things wireless concentrator and a cloud service center server which are in communication connection, wherein the agricultural Internet of things wireless concentrator transmits environment information to the cloud service center server through a network, so that two protocols, namely a handshake-based protocol and a handshake-free protocol, are often used for transmitting the environment information to the cloud service center server through the network; the handshake-based protocol is a type of security protocol; constructing a communication link of the handshake-based protocol requires several requests and revoking a communication link of the handshake-based protocol requires several requests, so that the transfer duration is not small.
The handshake-free protocol is a type of protocol with lower security, and environment information can be transferred at any time without a plurality of requests when constructing a communication link. The header of the handshake-free protocol has: virtual interfaces of the agricultural Internet of things wireless concentrator, virtual interfaces of the cloud service center server, message capacity and error detection codes; the one-to-one transmission is carried out through the virtual interface, and random decomposition and assembly can not be carried out on the information message of the environment information, so that the transmission time is not long, the transmission and application are suitable for timely transmission and application, the problem is that whether the environment information obtained by the cloud service center server is received and transmitted in a standard is not confirmed, and whether the environment information obtained by the cloud service center server is incorrect performance can not be confirmed.
Disclosure of Invention
In order to solve the above problems, the embodiments of the present application provide an information transfer method and platform for the internet of things, which effectively avoid the defects that in the prior art, a communication link of a protocol based on handshake needs to be requested for several times and a communication link of a protocol based on handshake needs to be revoked for several times, so that the transfer duration is not small, and the protocol based on no handshake does not receive and transfer the specification, so that whether the environment information obtained by a cloud service center server is wrong or not can not be identified.
In order to overcome the defects in the prior art, the embodiment of the application provides a solution for an information transmission method and a platform of the Internet of things, which comprises the following steps:
an information transfer method of the internet of things, comprising:
the agricultural Internet of things wireless concentrator transmits the environment information to the cloud service center server through a network;
the method for the agricultural internet of things wireless concentrator to transmit the environment information to the cloud service center server through the network is to respectively execute creation on an information message of the environment information and an operation instruction format generated during information transmission by means of a set specification based on a transmission specification of a handshake-free protocol, add the specification of environment information error detection and retransmission, and determine the transmission bandwidth and the transmission performance.
The information message form of the environment information comprises: the message header of the information message of the environment information serves as a starting mark, the starting point of the information message representing the environment information is used for reducing the probability as same as that of the useful environment information, the transmission quantity is thirty-two bits, and the operation instruction 1101001151010 is selected to serve as the message header; the information message transmission status of the environment information indicates whether the environment information transmission is achieved, wherein 00000001 is the transmission achievement, 00000000 is the transmission failure; the information message capacity of the environment information is the capacity of the information message for transmitting the environment information; useful context information is the context information to be transferred; the end segment of the message marks the end of the message of the environmental information, and the selecting operation instruction 0010101111000110 serves as the end segment of the message. The information message structure of the environment information is added with message types and message statistics, the message types indicate whether the information message of the environment information is the information message of the undelivered re-transmitted environment information, the type of the information message of the re-transmitted environment information is 00000001, the type of the information message of the non-re-transmitted environment information is 00000000, the message statistics total the quantity of the information messages of the transmitted environment information, the message statistics is continuously increased and is not cleared until the program for transmitting the information message is terminated, and the number of bits required by the message statistics field is 32 bits.
The form of the operation instruction and the return message generated during the information transmission is as follows:
the operation instruction includes:
delivering an initiation instruction whose bit code is 1010001101001011;
a transfer suspension instruction whose bit code is 0101000101100100;
snoop instructions whose bit code is 1010111000010111;
an snoop abort instruction whose bit code is 1101001010010101;
delivering again an instruction whose bit code is 0011011010110010;
the corresponding return message of the transmission start instruction is a transmission start return message, and the bit code of the return message is 1010001101001011;
the return message corresponding to the transmission suspension instruction is a transmission suspension return message, and the bit code is 0101000101100100;
the return message corresponding to the interception instruction is an intercepted return message, and the bit code of the return message is 0101000101100100;
the return message corresponding to the interception and suspension instruction is an interception and suspension return message, and the bit code is 1101001010010101;
specifically, the present specification constructs three types of instructions: transmitting, monitoring and re-transmitting instructions, wherein the transmitting instructions mark the starting or stopping of information transmission, the monitoring instructions are used for monitoring whether the environment information transmission is lost or not, the monitoring instructions are started after the transmission is started, and the re-transmitting instructions are used for transmitting a re-transmitting request and do not need to be returned; the message header of the operation instruction and the return message marks the operation instruction and the return message, and 0001010010010111 is selected to serve as the message header from the beginning of the operation instruction and the return message; the mark of the feedback message in the operation instruction occurring during information transmission indicates that the operation instruction generated during information transmission is unnecessary for the cloud service center server to transmit the feedback message, wherein 00000000 indicates unnecessary, 00000001 indicates necessary, and bits of corresponding feedback content in the feedback message are filled into 11111111 bit stream; the capacity of the operation instruction or the return message is the capacity of the content of the operation instruction or the return message; the error detection code of the operation instruction or the return message adds the information of the operation instruction or the return message so as to execute error detection on the operation instruction or the return message; the operation instruction and the return message are also provided with marks, the marks of the operation instruction and the return message are in one-to-one correspondence, and the operation instruction and the return message can be ensured to be consistent.
The method for the agricultural Internet of things wireless concentrator to transmit the environment information to the cloud service center server through the network comprises the following steps:
step 1-1: the agricultural Internet of things wireless concentrator transmits interception instructions and transmission starting instructions;
step 1-2: the agricultural Internet of things wireless concentrator respectively acquires corresponding feedback messages transmitted by the cloud service center server and then starts interception and execution environment information transmission;
step 1-3: after the transmission is completed, the agricultural Internet of things wireless concentrator transmits interception suspension instructions and transmission suspension instructions;
step 1-4: and after the agricultural Internet of things wireless concentrator respectively obtains the corresponding return messages transmitted by the cloud service center server, interception and environmental information transmission are stopped.
After interception is started, the agricultural Internet of things wireless concentrator and the cloud service center server apply the re-transmission specification without constructing a handshake protocol, and the agricultural Internet of things wireless concentrator timely executes re-transmission after obtaining a re-transmission instruction, and comprises the following steps:
step 2-1: the agricultural Internet of things wireless concentrator continuously transmits information messages with message types and environment information of message statistics;
step 2-2: the cloud service center server obtains and confirms whether the message statistics of the information message of the environment information is uninterrupted or not;
step 2-3: when the message statistics are uninterrupted, the agricultural Internet of things wireless concentrator continuously transmits information messages of environment information, and when the message statistics are intermittent, the cloud service center server waits for a command of re-transmission after the transmission of the information messages of the transmitted environment information is completed;
step 2-4: continuously transmitting information messages of environmental information to be transmitted after the agricultural Internet of things wireless concentrator does not receive the retransmission instruction until the retransmission instruction is obtained, wherein the agricultural Internet of things wireless concentrator retransmits the information messages of the environmental information by means of message statistics of the information messages of the environmental information in the retransmission instruction; the cloud service center server determines whether an information message which is the environmental information transferred again exists or not by means of the message type.
The agricultural Internet of things wireless concentrator and the cloud service center server use instruction error detection standards to respectively execute double error detection on an operation instruction and a return message, ensure that when the transmission of the operation instruction and the return message is wrong, the transmission can be terminated in real time, and prevent the environment information of the wrong instruction from receiving and transmitting faults, and comprise the following procedures:
step 3-1: the agricultural Internet of things wireless concentrator transmits an operation instruction; if the cloud service center server does not feed back, waiting for a period of time to transmit the operation instruction again, and if the cloud service center server still does not feed back, stopping transmitting;
step 3-2: the cloud service center server determines whether an error-free operation instruction is received or not, and when the error-free operation instruction is obtained, the cloud service center server executes the step 3-3, and otherwise, the transmission is stopped;
step 3-3: the cloud service center server determines whether the operation instruction is necessary to transmit the return message, and when the return message is necessary to transmit, the cloud service center server transmits the return message, otherwise, the step 3-5 is executed;
step 3-4: the agricultural Internet of things wireless concentrator confirms whether an error-free return message is obtained or not, and when the error-free return message is obtained, the agricultural Internet of things wireless concentrator executes the steps 3-5, otherwise, the transmission is stopped;
step 3-5: and the agricultural Internet of things wireless concentrator executes the operation instruction.
And in the steps 3-2 and 3-4, an operation instruction and a return message which are generated during information transmission with error detection codes are respectively constructed for the operation instruction and the return message between the agricultural Internet of things wireless concentrator and the cloud service center server, the error detection codes are the bit added value of the operation instruction or the contents of the return message which are generated during information transmission, and the cloud service center server and the agricultural Internet of things wireless concentrator compare the bit added value of the operation instruction and the contents of the return message which are respectively obtained during information transmission with the error detection codes, so that error detection is achieved.
An internet of things information transfer platform, comprising:
the environment information acquisition and transmission system based on the cloud service comprises an agricultural Internet of things wireless concentrator and a cloud service center server of the environment information acquisition and transmission system based on the cloud service;
the agricultural Internet of things wireless concentrator and the cloud service center server are in communication connection with each other.
The embodiment of the application has the beneficial effects that:
under the system of a protocol based on handshake, a set specification is constructed by using a transmission specification of the protocol based on no handshake, the specification cuts environment information into instruction information and useful environment information in a program for transmitting the information, and the construction is respectively carried out on the message forms of the environment information, so that the transmission bandwidth and the performance of the environment information are higher than those of the transmission specification of the protocol based on no handshake; because the connectionless nature of the protocol based on no handshake is unsafe for transfer, the application respectively constructs double-class specifications on the information message transfer of the environment information and the operation instruction transfer which occurs during the information transfer; the information message transmission facing the environment information adopts the retransmission specification, which is different from the retransmission specification based on the handshake protocol, and is a real-time retransmission type, and the retransmission rate is improved well; because the re-transmission is started by the operation instruction which appears when the agricultural Internet of things wireless concentrator receives the re-transmission information transmission, the structure is re-executed in the form of the operation instruction which appears when the agricultural Internet of things wireless concentrator receives the re-transmission information transmission, message statistics are additionally arranged besides the information which the operation instruction has, and decoding is executed when the agricultural Internet of things wireless concentrator receives the operation instruction which appears when the agricultural Internet of things wireless concentrator receives the re-transmission information transmission, so that the information message of the environment information which needs to be re-transmitted can be positioned; the transmission of the operation instruction which occurs when the information is transmitted is oriented, the specification applies the specification of error detection, and when the cloud service center server obtains the operation instruction and the agricultural Internet of things wireless concentrator receives the return message, the double error detection is executed, so that the acceptance and transmission of the instruction are confirmed. The method and the device effectively solve the defects that in the prior art, a communication link of a protocol based on handshake needs to be constructed for a plurality of times, and the communication link of the protocol based on handshake needs to be cancelled for a plurality of times, so that the transmission time is not short, and the protocol based on no handshake does not receive and transmit the identification specification, so that the environment information obtained by a cloud service center server is not wrongly and can not be identified.
Drawings
Fig. 1 is a flowchart of an information transfer method of the internet of things according to an embodiment of the present application.
Description of the embodiments
Embodiments of the present application will be further described with reference to the drawings and examples.
As shown in fig. 1, the information transfer method of the internet of things includes:
the agricultural Internet of things wireless concentrator transmits the environment information to an environment information cloud service center server through a network;
the method for the agricultural internet of things wireless concentrator to transmit the environmental information to the environmental information cloud service center server through the network is to execute creation on an information message of the environmental information and an operation instruction format generated during information transmission respectively by means of a set specification based on a transmission specification of a handshake-free protocol, additionally add specifications of environment information error detection and retransmission, and determine the transmission bandwidth and the transmission performance. The setting specification constructed by the application is in the program for information transmission of the agricultural Internet of things wireless concentrator and the cloud service center server, the scheduling instruction of the software for assembling and decoding the program for information transmission is executed on the environment information after the program for information transmission is processed, and the processed environment information is transmitted through the environment information link layer by the driving program, so that the assembly and the decomposition of the information message of the environment information under the condition of the wireless network are realized.
The specification performs special construction on the operation instruction in order to identify the security of transmission; in order to distinguish different instructions, the difference between the same sequence of bits in the bit stream form of different operation instructions is not small, the instruction is prevented from making meaning error due to one bit loss or error during transmission, in addition, the transmission quantity is not too low, so that the probability that the operation instructions are consistent with useful environment information is reduced, the quantity of 1 and 0 of the operation instructions is close to that of the operation instructions, and continuous 1 or continuous 0 is not generated, so that the balance is prevented from being lost, and 1101001151010,0010101111000110,0001010010010111 is selected to serve as the operation instructions.
The information message form of the environment information comprises: the message header of the information message of the environment information serves as a starting mark, the starting point of the information message representing the environment information is used for reducing the probability as same as that of the useful environment information, the transmission quantity is thirty-two bits, and the operation instruction 1101001151010 is selected to serve as the message header; the information message transmission status of the environment information indicates whether the environment information transmission is achieved, wherein 00000001 is the transmission achievement, 00000000 is the transmission failure; the information message capacity of the environment information is the capacity of the information message for transmitting the environment information; useful context information is the context information to be transferred; the end segment of the message marks the end of the message of the environmental information, and the selecting operation instruction 0010101111000110 serves as the end segment of the message. The information message structure of the environment information is added with message types and message statistics, the message types indicate whether the information message of the environment information is the information message of the undelivered re-transmitted environment information, the type of the information message of the re-transmitted environment information is 00000001, the type of the information message of the non-re-transmitted environment information is 00000000, the message statistics total the quantity of the information messages of the transmitted environment information, the message statistics is continuously increased and is not cleared until the program for transmitting the information message is terminated, and the number of bits required by the message statistics field is 32 bits.
The form of the operation instruction and the return message generated during the information transmission is as follows:
the operation instruction includes:
delivering an initiation instruction whose bit code is 1010001101001011;
a transfer suspension instruction whose bit code is 0101000101100100;
snoop instructions whose bit code is 1010111000010111;
an snoop abort instruction whose bit code is 1101001010010101;
delivering again an instruction whose bit code is 0011011010110010;
the corresponding return message of the transmission start instruction is a transmission start return message, and the bit code of the return message is 1010001101001011;
the return message corresponding to the transmission suspension instruction is a transmission suspension return message, and the bit code is 0101000101100100;
the return message corresponding to the interception instruction is an intercepted return message, and the bit code of the return message is 0101000101100100;
the return message corresponding to the interception and suspension instruction is an interception and suspension return message, and the bit code is 1101001010010101;
specifically, the present specification constructs three types of instructions: transmitting, monitoring and re-transmitting instructions, wherein the transmitting instructions mark the starting or stopping of information transmission, the monitoring instructions are used for monitoring whether the environment information transmission is lost or not, the monitoring instructions are started after the transmission is started, and the re-transmitting instructions are used for transmitting a re-transmitting request and do not need to be returned; the message header of the operation instruction and the return message marks the operation instruction and the return message, and 0001010010010111 is selected to serve as the message header from the beginning of the operation instruction and the return message; the mark of the feedback message in the operation instruction occurring during information transmission indicates that the operation instruction generated during information transmission is unnecessary for the cloud service center server to transmit the feedback message, wherein 00000000 indicates unnecessary, 00000001 indicates necessary, and bits of corresponding feedback content in the feedback message are filled into 11111111 bit stream; the capacity of the operation instruction or the return message is the capacity of the content of the operation instruction or the return message; the error detection code of the operation instruction or the return message adds the information of the operation instruction or the return message so as to execute uncomplicated error detection on the operation instruction or the return message; the operation instruction and the return message are also provided with marks, the marks of the operation instruction and the return message are in one-to-one correspondence, and the operation instruction and the return message can be ensured to be consistent. That is, the transfer start instruction is consistent with the mark of the transfer start return message, the transfer stop instruction is consistent with the mark of the transfer stop return message, the interception instruction is consistent with the mark of the interception return message, and the interception stop instruction is consistent with the mark of the interception stop return message.
The method for the wireless concentrator of the agricultural Internet of things to transmit the environment information to the environment information cloud service center server through the network comprises the following steps:
step 1-1: the agricultural Internet of things wireless concentrator transmits interception instructions and transmission starting instructions;
step 1-2: the agricultural Internet of things wireless concentrator respectively acquires corresponding feedback messages transmitted by the cloud service center server and then starts interception and execution environment information transmission;
step 1-3: after the transmission is completed, the agricultural Internet of things wireless concentrator transmits interception suspension instructions and transmission suspension instructions;
step 1-4: and after the agricultural Internet of things wireless concentrator respectively obtains the corresponding return messages transmitted by the cloud service center server, interception and environmental information transmission are stopped.
Thus, by means of the protocol based on no handshake, the concurrent defect that the communication is unsafe due to no connection of the protocol based on no handshake is prevented by applying the specification of interception and communication instructions and corresponding return messages.
After interception is started, the agricultural Internet of things wireless concentrator and the cloud service center server apply the re-transmission specification without constructing a handshake protocol, and the agricultural Internet of things wireless concentrator timely executes re-transmission after obtaining a re-transmission instruction, and comprises the following steps:
step 2-1: the agricultural Internet of things wireless concentrator continuously transmits information messages with message types and environment information of message statistics;
step 2-2: the cloud service center server obtains and confirms whether the message statistics of the information message of the environment information is uninterrupted or not;
step 2-3: when the message statistics are uninterrupted, the agricultural Internet of things wireless concentrator continuously transmits information messages of environment information, and when the message statistics are intermittent, the cloud service center server waits for a command of re-transmission after the transmission of the information messages of the transmitted environment information is completed; because the re-transmitted instruction is required to mark the concrete position of the information message of the re-transmitted environmental information of the agricultural Internet of things wireless concentrator, an operation instruction generated during the re-transmitted information transmission is constructed for the re-transmitted instruction, the form of the operation instruction generated during the re-transmitted information transmission comprises message statistics and a re-transmitted instruction error detection code, and no corresponding return message exists;
step 2-4: continuously transmitting information messages of environmental information to be transmitted after the agricultural Internet of things wireless concentrator does not receive the retransmission instruction until the retransmission instruction is obtained, wherein the agricultural Internet of things wireless concentrator retransmits the information messages of the environmental information by means of message statistics of the information messages of the environmental information in the retransmission instruction; the cloud service center server determines whether an information message which is the environmental information transferred again exists or not by means of the message type.
The agricultural Internet of things wireless concentrator and the cloud service center server use instruction error detection standards to respectively execute double error detection on an operation instruction and a return message, ensure that when the transmission of the operation instruction and the return message is wrong, the transmission can be terminated in real time, and prevent the environment information of the wrong instruction from receiving and transmitting faults, and comprise the following procedures:
step 3-1: the agricultural Internet of things wireless concentrator transmits an operation instruction; if the cloud service center server does not feed back, waiting for a period of time to transmit the operation instruction again, and if the cloud service center server still does not feed back, stopping transmitting;
step 3-2: the cloud service center server determines whether an error-free operation instruction is received or not, and when the error-free operation instruction is obtained, the cloud service center server executes the step 3-3, and otherwise, the transmission is stopped;
step 3-3: the cloud service center server determines whether the operation instruction is necessary to transmit the return message, and when the return message is necessary to transmit, the cloud service center server transmits the return message, otherwise, the step 3-5 is executed;
step 3-4: the agricultural Internet of things wireless concentrator confirms whether an error-free return message is obtained or not, and when the error-free return message is obtained, the agricultural Internet of things wireless concentrator executes the steps 3-5, otherwise, the transmission is stopped;
step 3-5: and the agricultural Internet of things wireless concentrator executes the operation instruction.
And in the steps 3-2 and 3-4, an operation instruction and a return message which are generated during information transmission with error detection codes are respectively constructed for the operation instruction and the return message between the agricultural Internet of things wireless concentrator and the cloud service center server, the error detection codes are the bit added value of the operation instruction or the contents of the return message which are generated during information transmission, and the cloud service center server and the agricultural Internet of things wireless concentrator compare the bit added value of the operation instruction and the contents of the return message which are respectively obtained during information transmission with the error detection codes, so that error detection is achieved.
In a word, under the system of the protocol based on handshake, a set specification is constructed by using a transmission specification of the protocol based on no handshake, the specification cuts the environment information into instruction information and useful environment information in a program for transmitting the information, and constructs the message form of the environment information respectively, so that the transmission bandwidth and the performance of the environment information are higher than those of the transmission specification of the protocol based on no handshake; because the connectionless nature of the protocol based on no handshake is unsafe for transfer, the application respectively constructs double-class specifications on the information message transfer of the environment information and the operation instruction transfer which occurs during the information transfer; the information message transmission facing the environment information adopts the retransmission specification, which is different from the retransmission specification based on the handshake protocol, and is a real-time retransmission type, and the retransmission rate is improved well; because the re-transmission is started by the operation instruction which appears when the agricultural Internet of things wireless concentrator receives the re-transmission information transmission, the structure is re-executed in the form of the operation instruction which appears when the agricultural Internet of things wireless concentrator receives the re-transmission information transmission, message statistics are additionally arranged besides the information which the operation instruction has, and decoding is executed when the agricultural Internet of things wireless concentrator receives the operation instruction which appears when the agricultural Internet of things wireless concentrator receives the re-transmission information transmission, so that the information message of the environment information which needs to be re-transmitted can be positioned; the transmission of the operation instruction which occurs when the information is transmitted is oriented, the specification applies the specification of error detection, and when the cloud service center server obtains the operation instruction and the agricultural Internet of things wireless concentrator receives the return message, the double error detection is executed, so that the acceptance and transmission of the instruction are confirmed.
The internet of things information transfer platform includes:
the environment information acquisition and transmission system based on cloud service comprises a soil information sensor, a growth environment information sensor, a water environment information sensor, an agricultural Internet of things wireless concentrator based on the environment information acquisition and transmission system of cloud service, an environment information cloud service center server and a user terminal, wherein the soil information sensor, the environment information sensor and the water environment information sensor transmit acquired environment information to the agricultural Internet of things wireless concentrator, the agricultural Internet of things wireless concentrator transmits the environment information to the environment information cloud service center server through a network, and a user accesses the environment information cloud service center server through the network by adopting the user terminal to view the environment information;
the agricultural Internet of things wireless concentrator and the environmental information cloud service center server are in communication connection with each other.
While the embodiments of the present application have been described above with reference to the processes illustrated by the embodiments, it will be understood by those skilled in the art that the present disclosure is not limited to the embodiments described above, and that each of the modifications, changes, and substitutions can be made without departing from the scope of the embodiments of the present application.