Search

CN-121984990-A - Real-time communication mechanism for agricultural irrigation network

CN121984990ACN 121984990 ACN121984990 ACN 121984990ACN-121984990-A

Abstract

The invention discloses a real-time communication mechanism for agricultural irrigation network, which comprises AINP message format confirmation, AINP data exchange confirmation and AIDE cloud data exchange, the invention firstly defines the unified format of data frame through AINP message format confirmation step, collects irrigation valve state and opening signal and converts into corresponding data frame, completes node response based on master-slave response mechanism, verifies the validity of frame format through DCR verification, secondly, through AINP data exchange confirmation, LORA wireless communication standards of irrigation valve nodes and AINP gateways are set, a AINP data exchange algorithm is relied on, verified data frames are transmitted to the gateways, AIDE cloud data exchange is finally carried out, monitoring data are read and written through the cloud algorithm, and the cloud data are uploaded.

Inventors

  • JIA XINCHUN

Assignees

  • 内蒙古科技大学

Dates

Publication Date
20260505
Application Date
20251227

Claims (10)

  1. 1. A real-time communication mechanism for an agricultural irrigation network, comprising the steps of: S1, confirming a AINP message format, setting a data frame format, collecting a working state signal and an opening signal of an irrigation valve through a central processing unit of an irrigation valve node, converting collected signal data into a corresponding type of data frame according to a preset data frame format, further carrying out node data response based on a master-slave response mechanism, collecting DCR check data of the data frame after the node data response is completed, and verifying a basic transmission format of the data frame of the irrigation valve according to the DCR check data; S2, AINP, data exchange confirmation, namely setting information interaction specifications of the irrigation valve nodes and the AINP gateway corresponding to the data frames, and transmitting the data frames of the irrigation valve to the AINP gateway after the basic transmission format of the data frames of the irrigation valve passes verification; S3, AIDE, carrying out cloud data exchange, wherein the AINP gateway carries out directional read-write operation on the monitoring data of each irrigation valve based on the physical address of the irrigation node, and transmitting the monitoring data to the cloud server.
  2. 2. A real-time communication mechanism for agricultural irrigation networks according to claim 1, wherein the setting data frame format is specifically set as follows: T1, determining a general structure frame of a data frame, wherein various data frames are formed by fixed fields according to a unified sequence, and a core field comprises a frame start marking byte ST, an irrigation valve physical address segment ValveID, a frame format definition segment Fun, a frame length segment, an information segment, a DCR check segment Sum and a frame End marking byte End; T2, defining basic attributes of the general fields; t3, defining exclusive attributes for 6 data frames respectively, and distributing unique Fun field values for the 6 data frames based on control and monitoring requirements of the irrigation valve; t4, determining a specific rule of the information section, and converting the working state signal and the opening signal of the irrigation valve collected by a central processing unit of the irrigation valve node into a data frame; And T5, integrating the general structure and the special attribute to form a complete 6 data frame format standard, and synchronously writing the 6 data frame format specifications into a software system of the AINP gateway and the irrigation valve node.
  3. 3. A real-time communication mechanism for agricultural irrigation networks according to claim 2, wherein the 6 data frames are as follows: the valve state control frame is used for sending a state switching command to the irrigation valve node by the AINP gateway, and the whole frame is used for instructing the irrigation valve to execute opening or closing operation, wherein Fun is 01; the valve opening control frame is used for sending a flow regulation command to the irrigation valve node by the AINP gateway, and the whole frame is used for specifying the specific opening value of the irrigation valve, wherein Fun is 02; the valve state reading frame is used for enabling the AINP gateway to request to acquire the working state from the irrigation valve node, and the whole frame is used for triggering state feedback of the irrigation valve, wherein Fun is 03; The valve state response frame is used for responding to a state reading request of the gateway by the irrigation valve node, and the whole frame is used for feeding back the current working state of the irrigation valve, wherein Fun is 04; the valve opening reading frame is used for enabling the AINP gateway to request to acquire opening values from the irrigation valve nodes, and the whole frame is used for triggering opening feedback of the irrigation valve, wherein Fun is 05; And the valve opening response frame is used for responding the opening reading request of the gateway by the irrigation valve node, and the whole frame is used for feeding back the current opening value of the irrigation valve, wherein Fun is 06.
  4. 4. A real-time communication mechanism for agricultural irrigation networks according to claim 3, wherein the converting the collected signal data into the corresponding type of data frames is performed as follows: P1, data acquisition and preprocessing, namely acquiring a working state signal and an opening signal of an irrigation valve node by a central processing unit in real time, and reading ValveID and corresponding associated GATEWAYID prestored by the central processing unit as basic identification information of a data frame; P2, judging the frame type, namely determining the type of a target data frame according to a service scene of data transmission to obtain a data frame format of the target data frame; P3, filling the general field, namely sequentially filling an ST field, a ValveID field, a GATEWAYID field and a frame length section according to the data frame format of the target data frame; P4, filling the exclusive information segment, namely filling the corresponding information segment according to the determined frame type; p5, calculating and filling DCR check values, namely, calculating the filled ST, valveID, fun, frame length sections and information to obtain ASCII codes, and filling the ASCII codes into a Sum field; And P6, finishing field filling and frame integration, namely filling End fields after the Sum fields, integrating the fields according to a preset sequence after filling all the fields to form a complete data frame, storing the complete data frame into a temporary data buffer area of an irrigation valve node, and waiting for sending instructions.
  5. 5. A real-time communication mechanism for agricultural irrigation networks according to claim 1, wherein the node data response is performed by the following specific operation processes: m1, judging response triggering conditions, namely monitoring a wireless signal sent by a AINP gateway in real time by an irrigation valve node through a LORA communication interface circuit, and analyzing after receiving a data frame so as to judge a response triggering mechanism; M2, checking the received data frames, namely after triggering a response mechanism, performing format check on the received gateway data frames by the irrigation valve node; m3, instruction execution and data preparation, namely executing the instruction according to the type of the data frame; M4, constructing a response frame according to the data frame conversion process, and constructing a corresponding response frame based on the acquired actual state or opening data; m5, sending a response frame, namely after the response frame is constructed, sending a sending instruction to a LORA communication interface circuit by a software system of the irrigation valve node, and sending the response frame to a AINP gateway in a wireless signal mode; And M6, feeding back a response result, namely after the gateway receives and verifies the response frame, sending a receiving confirmation frame to the irrigation valve node, and ending the response flow after the irrigation valve node receives the confirmation frame.
  6. 6. A real-time communication mechanism for agricultural irrigation networks according to claim 5, wherein the verification of the basic transmission format of the data frame of the irrigation valve is performed as follows: a1, verifying the frame integrity, namely detecting a start identifier and an end identifier of a data frame and judging the frame integrity; A2, verifying the field normalization, namely sequentially verifying the byte number and the coding format of each field according to a preset data frame format, and judging the field normalization; a3, performing DCR verification by the receiving end according to an algorithm consistent with the sending end, calculating all byte values in the data frame to obtain a verification calculated value, performing DCR verification, and judging the DCR verification; And A4, processing a verification result, namely judging that the basic transmission format of the data frame is valid if the frame integrity, the field normalization and the DCR verification are all passed, and judging that the format is invalid if any verification link is not passed.
  7. 7. The real-time communication mechanism for agricultural irrigation network according to claim 1, wherein the setting data frame corresponds to information interaction specification of irrigation valve node and AINP gateway, and the specific setting process is as follows: according to AINP data exchange algorithm, the irrigation information of the data frame is uploaded to AINP gateway.
  8. 8. A real-time communication mechanism for an agricultural irrigation network according to claim 1, wherein the AINP data exchange algorithm is as follows: d1, initializing configuration, namely after AINP gateways are powered on and started, reading GATEWAYID of the gateways and an associated irrigation valve node physical address list; The gateway sequentially sends corresponding reading frames to each irrigation valve node according to the ascending order of physical addresses, the physical addresses of target nodes are filled in ValveID fields, for each node, a response timeout timer is started after the reading frames are sent, the response frames of the nodes are waited for format verification, and after all nodes are polled, the effective data of all nodes are integrated to form node status summary data; after the polling is completed, the AINP gateway sends a connection request to the cloud server in a client mode, and the cloud server receives the connection request and then connects the cloud server; d4, waiting for interaction of the cloud server instruction and the data, namely, after the gateway establishes connection with the cloud server, entering an instruction waiting state, and carrying out data transmission or instruction response during waiting; And D5, disconnecting and circularly executing the connection, namely disconnecting the gateway from the cloud server after completing data transmission or instruction response, releasing network resources, returning to the first step, restarting the cloud access interval timer, and waiting for the next polling period.
  9. 9. The real-time communication mechanism for agricultural irrigation network according to claim 1, wherein the monitoring data of each irrigation valve is read and written according to the following specific procedures: And transmitting the data frame to a cloud server through AIDE cloud data exchange algorithm.
  10. 10. The real-time communication mechanism for an agricultural irrigation network according to claim 1, wherein the AIDE cloud data exchange algorithm comprises the following specific contents: The method comprises the steps of H1, monitoring and identifying a connection request, namely automatically loading AIDE a cloud data exchange algorithm program after a cloud server is started, continuously monitoring a network port after the algorithm is started, receiving the connection request from a AINP gateway and a remote client in real time, and establishing connection; H2, receiving the data packet and judging the property, namely after establishing connection, receiving the data packet by the cloud server; H3, classifying the data packet, namely judging the property of the received data packet, processing according to the property of the data packet, registering the gateway IP address in a gateway information registry, and forwarding the data packet if the data packet is operation information or a state reading command; after the data processing is completed, the cloud server maintains the connection state for a preset period of time, if a new data packet of the same sender is received in the period, the processing is continued according to the steps, and if no new data transmission exists in the period, the connection is actively disconnected; And H5, circularly executing and monitoring abnormality, namely automatically returning to H1 after the algorithm finishes one-time data packet processing, and continuously monitoring a new connection request and a data packet to realize continuous data exchange.

Description

Real-time communication mechanism for agricultural irrigation network Technical Field The invention relates to the technical field of real-time communication, in particular to a real-time communication mechanism for an agricultural irrigation network. Background Agricultural irrigation is a core link for guaranteeing crop growth and improving agricultural production efficiency, and with the continuous progress of the operation speed of a processor and the industrial intelligent level, the wide extension of the bandwidth of the Internet of things provides solid technical support for constructing an intelligent irrigation network in the agricultural field, and the agricultural irrigation network can be remotely controlled, monitored and accurately regulated and controlled by deploying intelligent irrigation valves, three-way valves and other devices and constructing the agricultural irrigation network by means of various communication technologies, so that a real-time communication mechanism for the agricultural irrigation network is needed. In the prior art, remote communication is realized by directly distributing public network IP to terminal equipment, IP address resources of the public network have scarcity, if public network IP addresses are independently configured for each irrigation valve node, the network use cost of users can be greatly increased, waste of IP resources can be caused, and remote communication is realized by directly distributing the public network IP to the terminal equipment. The farmland scene generally has the characteristics of wide region, complex terrain, multiple shielding objects and the like, in the existing communication scheme, the wired communication mode has the problems of large wiring difficulty, high maintenance cost and poor flexibility, the conventional wireless communication technology is difficult to adapt to the decentralized layout of the farmland, the common wireless communication technology has the defects of short transmission distance, fast signal attenuation and weak anti-interference capability, the communication requirement of a large-area farmland cannot be covered, and part of the Internet of things communication technology can meet part of performance requirements, but lacks of deep adaptation with the agricultural irrigation scene, so that the stability and the instantaneity of data transmission are insufficient. In the traditional data forwarding scheme, a simple point-to-point communication mode is partially adopted, a unified cloud data scheduling mechanism is lacking, so that the problems of data conflict, instruction delay and the like occur when multiple gateways work cooperatively, the gateway data exchange algorithm of the partial scheme is unreasonable in design, low in polling efficiency and unsound in response mechanism, the status report of a large number of nodes and the control instruction issuing requirement cannot be responded quickly, and the real-time performance of irrigation control is affected. Disclosure of Invention In view of the above-mentioned technical shortcomings, it is an object of the present invention to provide a real-time communication mechanism for agricultural irrigation networks. The invention provides a real-time communication mechanism for an agricultural irrigation network, which comprises the following steps of S1, AINP, confirming a message format, setting a data frame format, collecting a working state signal and an opening signal of an irrigation valve through a central processing unit of an irrigation valve node, converting the collected signal data into a corresponding type of data frame according to a preset data frame format, further carrying out node data response based on a master-slave response mechanism, collecting DCR check data of the data frame after the node data response is completed, and verifying a basic transmission format of the data frame of the irrigation valve according to the DCR check data. S2, AINP, data exchange confirmation, setting information interaction specifications of the irrigation valve nodes and the AINP gateway corresponding to the data frames, and transmitting the data frames of the irrigation valve to the AINP gateway after the basic transmission format of the data frames of the irrigation valve passes verification. S3, AIDE, carrying out cloud data exchange, wherein the AINP gateway carries out directional read-write operation on the monitoring data of each irrigation valve based on the physical address of the irrigation node, and transmitting the monitoring data to the cloud server. Preferably, the AINP data exchange algorithm is as follows, D1, initializing configuration, namely, after the AINP gateway is powered on and started, reading GATEWAYID of the gateway and an associated irrigation valve node physical address list. And D2, carrying out polling reading on the irrigation valve node states, namely sequentially sending corresponding reading frames to each irrigati