A method for implementing an intelligent irrigation management system
Through the collaborative work of sensor nodes, user nodes and edge nodes in the irrigation area, real-time collection and transmission of data in the irrigation area are realized, which solves the problem of untimely irrigation and improves the stability and sustainability of agricultural production.
Patent Information
- Application Number
- CN202410780970.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-18
AI Technical Summary
It is difficult for existing smart irrigation systems to achieve real-time monitoring of irrigation areas and rapid data acquisition, resulting in untimely irrigation and affecting the healthy growth of crops and the stability and sustainability of agricultural production.
A smart irrigation management system is designed to achieve real-time collection, transmission and sharing of data through the collaborative work of sensor nodes, user nodes and edge nodes. It uses the message passing mechanism and table item management mechanism to ensure that data can be quickly and reliably Transmitted from the irrigation area to the user node.
It achieves rapid acquisition of real-time monitoring data in the irrigation area, ensures the timeliness of irrigation, improves the stability and sustainability of agricultural production, and has broad application prospects.
Smart Images

Figure CN118355847B
Abstract
Description
Technical Field
[0001] The present invention relates to an implementation method, and in particular to an implementation method of a smart irrigation management system. Background Art
[0002] Smart irrigation is an important means of providing necessary water to farmland, which is used to increase crop yields and improve the stability and sustainability of agricultural production. Smart irrigation automatically monitors the degree of soil drought and automatically implements irrigation to ensure the healthy growth of crops.
[0003] This system is designed to achieve real-time monitoring of irrigation areas and ensure stable growth of crops in the irrigation areas. Summary of the invention
[0004] Purpose of the invention: The technical problem to be solved by the present invention is to provide a method for implementing an intelligent irrigation management system in view of the deficiencies in the prior art.
[0005] Technical solution: The present invention discloses a method for implementing a smart irrigation management system, the system comprising sensor nodes, user nodes and edge nodes, the sensor nodes are distributed in the irrigation area and used to collect data in the irrigation area; the edge nodes and the user nodes are distributed in the irrigation edge area; the user nodes obtain the data collected by the sensor nodes through the edge nodes; the method comprises:
[0006] The user node sends a search message to obtain a target data table; wherein the table name of the data table is the coordinates of the sensor node that generates the data table;
[0007] If the edge node receiving the search message stores the target data table, it sends a confirmation message; wherein the confirmation message includes coordinates, cache coefficient, cache distance, energy coefficient, energy value and data table set; otherwise, if the edge node receiving the search message is closest to the table name of the target data table compared with other edge nodes, it sends a sensing search message, otherwise it forwards the search message;
[0008] The sensor node receiving the sensor search message sends the confirmation message if the target data table exists, otherwise forwards the sensor search message;
[0009] The edge node or sensor node that receives the confirmation message increments the cache distance in the confirmation message by a preset value, calculates the value of the cache coefficient according to the incremented cache distance, and calculates the value of the energy coefficient according to the energy value; if the incremented cache distance is not less than the distance threshold, and the calculated cache coefficient is not greater than the coefficient threshold, and the energy value of the edge node or sensor node is not less than the calculated energy coefficient, the cache distance in the confirmation message is set to 0, and all data tables in the data table set in the confirmation message are saved; if the edge node or sensor node has a path table entry with coordinates equal to the coordinates in the confirmation message, all data tables cached by it are added to the data table set of the confirmation message, and the confirmation message is forwarded;
[0010] If the user node leaves the communication range of the edge node, a user message is sent; if the position of the sensor node moves, a mobile message is sent.
[0011] In the invention,
[0012] The search message includes the final coordinates and the destination coordinates; the sensor search includes the final coordinates and the destination coordinates;
[0013] If the edge node receiving the search message stores the target data table, then sending a confirmation message; otherwise, if the edge node receiving the search message is closest to the table name of the target data table compared to other edge nodes, then sending a sensing search message; otherwise, forwarding the search message, including:
[0014] If the edge node that receives the search message saves the target data table, it sends the confirmation message; wherein the coordinates of the confirmation message are set to the final coordinates in the search message, the cache coefficient is set to 0, the cache distance is set to 0, the energy coefficient and the energy value are set to their current energy values respectively, and the data table set includes a data table whose table name is equal to the final coordinates of the search message;
[0015] The edge node receiving the search message creates a path table entry with coordinates equal to the table name of the target data table. If the edge node receiving the search message is closest to the table name of the target data table compared to other edge nodes, a sensing table entry is selected, the coordinates of which are closest to the table name of the target data table, and the sensing search message is sent. The final coordinates of the sensing search message are set to the final coordinates in the search message, and the destination coordinates are set to the coordinates in the sensing table entry. Otherwise, an edge table entry is selected, the coordinates of which are closest to the table name of the target data table, the destination coordinates of the search message are set to the coordinates of the edge table entry, and the search message is forwarded.
[0016] and / or,
[0017] The candidate sensor node that receives the sensor search message sends the confirmation message if the target data table exists, and otherwise forwards the sensor search message, including:
[0018] If the sensor node that receives the sensor search message exists in the target data table, it sends a confirmation message; otherwise, it creates a path table entry whose coordinates are equal to the table name of the target data table, selects the sensor table entry whose coordinates are closest to the table name of the target data table, sets the destination coordinates of the sensor search message to the coordinates of the sensor table entry, and forwards the sensor search message.
[0019] In the invention,
[0020] Each of the sensor nodes or edge nodes has a unique coordinate, the coordinate includes a horizontal coordinate, a vertical coordinate and a water depth, and the water depth of the edge node's coordinate is 0; each edge node maintains an edge table, an edge table entry includes coordinates and a life cycle; each edge node or sensor node stores a sensor table, a sensor table entry includes coordinates and a life cycle;
[0021] The method further comprises:
[0022] The edge node sends an edge message, the coordinates of the edge message are its own coordinates;
[0023] The edge node that receives the edge message creates an edge table entry, the coordinates of the edge table entry are equal to the coordinates in the edge message, and sets the life cycle of the edge table entry to a maximum value;
[0024] The sensor node sends a sensor message, the coordinates of the sensor message are its own current coordinates;
[0025] The edge node or sensor node that receives the sensor message creates a sensor entry whose coordinates and energy are respectively equal to the coordinates and energy in the sensor message, and sets the life cycle of the sensor entry to a maximum value.
[0026] In the invention,
[0027] Each sensor node can sense a type of data; each node stores a data table, and a data table item contains a name, data, and life cycle;
[0028] The method further comprises:
[0029] The sensor node creates a data table whose name is equal to its own coordinates;
[0030] The sensor node sends a creation message, and the sensor node that receives the creation message sends a data message, the data of the message is the data sensed by itself, and the name is the name that defines the data.
[0031] In the invention,
[0032] The method further comprises:
[0033] The sensor node that sends the creation message receives the data message. If there is a data table item with a name equal to the name in the data message, the data of the data table item and the data in the data message are averaged, the data of the data table item is set to the average value, and the life cycle is set to the maximum value. Otherwise, a data table item is created, the name and data of the data table item are respectively equal to the name and data in the data message, and the life cycle is set to the maximum value.
[0034] In the invention,
[0035] The edge node or sensor node stores a path table. A path table entry contains coordinates and life cycle. The user message contains message ID, final coordinates, destination coordinates and edge node coordinates.
[0036] The method further comprises:
[0037] After the user node sends a search message and leaves the communication range of the edge node before receiving a confirmation message, it sends a user message, the final coordinates of the user message are the final coordinates in the search message, the destination coordinates are the coordinates of the currently connected edge node, and the edge node coordinates are the coordinates of the edge node when the search message is sent.
[0038] In the invention,
[0039] The method further comprises:
[0040] If the coordinates of the edge node receiving the user message are equal to the destination coordinates in the user message, and there does not exist a path table entry whose coordinates are equal to the final coordinates in the user message, then a path table entry is created, whose coordinates are equal to the final coordinates in the user message, and the life cycle is set to the maximum value. An edge table entry is selected, whose coordinates have the smallest distance from the final coordinates in the user message, and the destination coordinates of the user message are set to the coordinates of the edge table entry, and the user message is forwarded.
[0041] In the invention,
[0042] The method further comprises:
[0043] If the path table of the sensor node is not empty and the position moves, a sensor table entry is selected whose coordinates are closest to the coordinates before the movement, and a movement message is sent. The final coordinates of the message are equal to the coordinates before the movement, the destination coordinates are the coordinates in the sensor table entry, and the path table is the path table of the sensor node.
[0044] In the invention,
[0045] The method further comprises:
[0046] If the coordinates of the sensor node receiving the mobile message are equal to the final coordinates in the mobile message, a merge operation is performed on its own path table and the path table in the mobile message, and its own path table is set as the merged path table.
[0047] In the invention,
[0048] The method further comprises:
[0049] If the coordinates of the sensor node that receives the mobile message are equal to the destination coordinates in the mobile message, a sensor table entry is selected whose coordinates are closest to the final coordinates in the mobile message, the destination coordinates in the mobile message are set to the coordinates in the sensor table entry, and the mobile message is forwarded.
[0050] Beneficial effects: The present invention provides an implementation method of an intelligent irrigation management system. Through the implementation method of the intelligent irrigation management system provided by the present invention, the staff can quickly obtain the monitoring data of the irrigation area, such as the degree of drought, so as to take timely irrigation, ensure the healthy growth of crops, improve the stability and sustainability of agricultural production, and have broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0052] Figure 1 It is a flow chart of the implementation method of the intelligent irrigation management system of the present invention;
[0053] Figure 2 This is a schematic diagram of the process of establishing an edge table according to the present invention;
[0054] Figure 3 This is a schematic diagram of the process of establishing a sensor table according to the present invention;
[0055] Figure 4 This is a schematic diagram of the process of establishing a data table according to the present invention;
[0056] Figure 5 This is a schematic diagram of the process of obtaining monitoring data according to the present invention;
[0057] Figure 6 A schematic diagram of the user node mobility support process according to the present invention;
[0058] Figure 7 This is a schematic diagram of the sensor node mobile support process of the present invention;
[0059] Figure 8 A schematic diagram of the user node mobility support process according to the present invention;
[0060] Fig. 9 This is a schematic diagram of the sensor node mobility support process described in the present invention. DETAILED DESCRIPTION
[0061] Beneficial effects: The present invention provides an implementation method of an intelligent irrigation management system. Through the implementation method of the intelligent irrigation management system provided by the present invention, the staff can quickly obtain the monitoring data of the irrigation area, such as the degree of drought, so as to take timely irrigation, ensure the healthy growth of crops, improve the stability and sustainability of agricultural production, and have broad application prospects.
[0062] Figure 1 It is a flow chart of the implementation method of the intelligent irrigation management system of the present invention; Figure 2 The figure is a schematic diagram of the process of establishing an edge table according to the present invention.
[0063] The system is composed of nodes, which are further divided into sensor nodes, user nodes and edge nodes;
[0064] The sensor nodes are distributed in the irrigation area to collect irrigation data, such as humidity and temperature. The edge nodes and user nodes are distributed at the edge of the irrigation area, and the user nodes are linked to the edge nodes.
[0065] Each sensor node or edge node has a unique coordinate, which includes a horizontal coordinate, a vertical coordinate and a water depth. The water depth of the edge node's coordinate is 0;
[0066] Edge nodes are fixed nodes, while user nodes and sensor nodes are mobile nodes;
[0067] Each type of data is identified by a name;
[0068] Each message is uniquely identified by a message ID;
[0069] Each edge node maintains an edge table, and an edge table entry contains coordinates and lifecycle;
[0070] The edge message contains the message ID and coordinates;
[0071] The edge node EN1 periodically performs the following operations:
[0072] Step 101: Start;
[0073] Step 102: The edge node EN1 sends an edge message, the message ID of which is 1 and the coordinates are its own coordinates;
[0074] Step 103: The edge node that receives the edge message checks the edge table. If there is an edge table entry whose coordinates are equal to the coordinates in the edge message, step 104 is executed; otherwise, step 105 is executed.
[0075] Step 104: The edge node that receives the edge message selects an edge table entry whose coordinates are equal to the coordinates in the edge message, sets the life cycle of the table entry to a maximum value, and executes step 106;
[0076] Step 105: The edge node that receives the edge message creates an edge table entry, the coordinates of the table entry are equal to the coordinates in the edge message, and sets the life cycle of the table entry to a maximum value;
[0077] Step 106: End.
[0078] Through the above process, the edge node sends an edge message to publish its own information to all neighbor edge nodes so as to establish its own edge table entries in these neighbor edge nodes. The edge node can establish the optimal routing path to the target edge node according to the coordinates in the edge table entries, while enhancing the stability of the routing path, thereby reducing data communication delay and cost and improving the success rate of data communication.
[0079] Figure 3 This is a schematic diagram of the process of establishing a sensor table according to the present invention. Each edge node or sensor node stores a sensor table, and a sensor table entry includes energy, coordinates and life cycle;
[0080] The sensor message contains the message ID, coordinates and energy;
[0081] The sensor node SN1 periodically performs the following operations:
[0082] Step 201: Start;
[0083] Step 202: the sensor node SN1 sends a sensor message, the message ID of which is 2, the coordinates are its current coordinates, and the energy is its current remaining energy;
[0084] Step 203: The edge node or sensor node that receives the sensor message checks the sensor table. If there is a sensor entry whose coordinates are equal to the coordinates in the sensor message, step 204 is executed; otherwise, step 205 is executed.
[0085] Step 204: The edge node or sensor node that receives the sensor message selects a sensor entry whose coordinates are equal to the coordinates in the sensor message, sets the energy of the entry to the energy in the sensor message, sets the life cycle of the entry to a maximum value, and executes step 206;
[0086] Step 205: The edge node that receives the sensor message creates a sensor entry, the coordinates and energy of the entry are respectively equal to the coordinates and energy in the sensor message, and sets the life cycle of the entry to a maximum value;
[0087] Step 206: End.
[0088] Through the above process, the sensor node sends a sensor message to all neighbor edge nodes or sensor nodes to publish its own information so as to establish its own sensor table entry in these neighbor edge nodes or sensor nodes. The sensor node or edge node can establish the optimal routing path to reach the target sensor node according to the coordinates in the sensor table entry, and at the same time enhance the stability of the routing path, thereby reducing data communication delay and cost and improving the success rate of data communication.
[0089] Figure 4 This is a schematic diagram of the process of establishing a data table according to the present invention. Each sensor node can sense a type of data, such as temperature;
[0090] Each node stores a data table whose name is equal to the coordinates of the sensor node that generates the data table. A data table item contains name, data and life cycle;
[0091] Create a message including the message ID;
[0092] Data messages contain message ID, name and data;
[0093] The coordinates of the sensor node SN1 are CO1. The following process is used to create a data table named CO1:
[0094] Step 301: Start;
[0095] Step 302: the sensor node SN1 determines whether there is a data table named CO1. If so, step 304 is executed; otherwise, step 303 is executed.
[0096] Step 303: the sensor node SN1 creates a data table named CO1;
[0097] Step 304: the sensor node SN1 sends a creation message, the message ID of which is 3, and starts a clock TM1;
[0098] Step 305: the sensor node receiving the creation message sends a data message, the message ID of which is 4, the data is the sensed data, and the name is the name defining the sensed data;
[0099] Step 306: If the sensor node SN1 receives the data message, execute step 307, otherwise execute step 311;
[0100] Step 307: the sensor node SN1 determines whether there is a data table entry whose name is equal to the name in the data message. If so, step 308 is executed; otherwise, step 309 is executed.
[0101] Step 308: the sensor node SN1 selects a data table entry whose name is equal to the name in the data message, calculates the average value of the data in the data table entry and the data in the data message, sets the data in the data table entry to the average value, sets the life cycle to the maximum value, and executes step 310;
[0102] Step 309: the sensor node SN1 creates a data table entry, the name and data of the table entry are respectively equal to the name and data in the data message, and the life cycle is set to the maximum value;
[0103] Step 310: the sensor node SN1 determines whether the clock TM1 has timed out. If so, step 311 is executed; otherwise, step 306 is executed.
[0104] Step 311: End.
[0105] The sensor node sends the creation message and data message through the above process to create data associated with its own coordinates, thereby solving the limitations of limited resources and limited perception data of a single sensor node. In this way, the user node can monitor and control the irrigation area in real time through the data perceived by the sensor node.
[0106] Figures 5 to 7 The schematic diagram of the process of obtaining monitoring data according to the present invention is as follows: The edge node or sensor node stores a path table, and a path table entry includes coordinates and life cycle;
[0107] The initial state of the path table is an empty table;
[0108] The search message contains the message ID, final coordinates and destination coordinates;
[0109] The sensor search message contains the message ID, the final coordinates and the destination coordinates;
[0110] The confirmation message contains the message ID, coordinates, cache coefficient, cache distance, energy coefficient, energy value and data table set;
[0111] User node U1 is linked to edge node EN1 and executes the following process to obtain a data table named coordinates CO1:
[0112] Step 401: Start;
[0113] Step 402: User node U1 sends a search message, the message ID of which is 5, the final coordinates are CO1, and the destination coordinates are the coordinates of edge node EN1;
[0114] Step 403: The edge node or sensor node that receives the search message determines whether there is a data table whose name is equal to the final coordinates of the search message. If so, execute step 404; otherwise, execute step 405.
[0115] Step 404: The edge node or sensor node that receives the search message sends a confirmation message, the message ID of which is 6, the coordinates are equal to the final coordinates in the search message, the cache coefficient is equal to 0, the cache distance is equal to 0, the energy coefficient and the energy value are equal to their current energy values, and the data table whose table name is equal to the final coordinates of the search message is added to the data table set, and step 418 is executed;
[0116] Step 405: If the sensor node receives the search message, execute step 423, otherwise execute step 406;
[0117] Step 406: The edge node that receives the search message determines whether its own coordinates are equal to the destination coordinates in the search message. If yes, execute step 407; otherwise, execute step 423;
[0118] Step 407: The edge node that receives the search message determines whether there is a path table entry whose coordinates are equal to the final coordinates in the search message. If so, execute step 418; otherwise, execute step 408;
[0119] Step 408: The edge node that receives the search message creates a path table entry, the coordinates of which are equal to the final coordinates in the search message, and the life cycle is set to the maximum value, and determines whether there is an edge table entry whose coordinates are less than the distance between the edge table entry and the final coordinates in the search message than the distance between the edge table entry and the final coordinates in the search message. If so, execute step 409, otherwise execute step 410;
[0120] Step 409: The edge node that receives the search message selects an edge table entry whose coordinates are less than the distance between the edge node and the final coordinates in the search message, sets the destination coordinates of the search message to the coordinates of the edge table entry, forwards the search message, and executes step 403;
[0121] Step 410: The edge node that receives the search message selects a sensor table entry whose coordinates are closest to the final coordinates of the search message, and sends a sensor search message whose message ID is 7, whose final coordinates are equal to the final coordinates in the search message, and whose destination coordinates are equal to the coordinates in the sensor table entry;
[0122] Step 411: The sensor node that receives the sensor search message determines whether there is a data table whose name is equal to the final coordinates of the sensor search message. If so, step 412 is executed; otherwise, step 413 is executed.
[0123] Step 412: the sensor node receiving the sensor search message sends a confirmation message, the message ID of the message is 6, the coordinates are equal to the final coordinates in the sensor search message, and the data table is the data table with the table name equal to the final coordinates of the sensor search message, and step 418 is executed;
[0124] Step 413: The sensor node that receives the sensor search message determines whether its own coordinates are equal to the final coordinates in the sensor search message. If yes, execute step 414; otherwise, execute step 415;
[0125] Step 414: the sensor node that receives the sensor search message creates a data table whose table name is equal to the final coordinates in the sensor search message, sends a confirmation message, the message ID of the message is 6, the coordinates are equal to the final coordinates in the sensor search message, the data table is the created data table, and executes step 418;
[0126] Step 415: The sensor node that receives the sensor search message determines whether its own coordinates are equal to the destination coordinates in the sensor search message. If yes, execute step 416, otherwise execute step 423;
[0127] Step 416: The sensor node that receives the sensor search message determines whether there is a path table entry whose coordinates are equal to the final coordinates in the sensor search message. If so, execute step 418, otherwise execute step 417;
[0128] Step 417: The sensor node that receives the sensor search message creates a path table entry, the coordinates of which are equal to the final coordinates in the sensor search message, the life cycle is set to the maximum value, all sensor table entries whose energy is greater than the threshold ETH1 are selected, and a sensor table entry is selected from these sensor table entries, the distance between the coordinates of the table entry and the final coordinates of the sensor search message is the shortest, the destination coordinates of the sensor search message are set to the coordinates of the sensor table entry, the sensor search message is forwarded, and step 411 is executed;
[0129] Step 418: If the user node receives the confirmation message, execute step 423, otherwise execute step 419;
[0130] Step 419: The edge node or sensor node that receives the confirmation message increases the cache distance d1 in the confirmation message by a predetermined value, calculates the value of the cache coefficient c2 according to formula (1), and calculates the value of the energy coefficient e3 according to formula (2). In formula (1), c1 is the cache coefficient value in the confirmation message, and in formula (2), e1 is the energy value of the edge node or sensor node, and e2 is the energy coefficient in the confirmation message. The energy coefficient in the confirmation message is set to the value of e3, and the cache coefficient in the confirmation message is set to the value of c2. If the cache distance d1 is not less than the threshold CD1, which is set in the range of 3-5, and the value of the cache coefficient c2 is not greater than the threshold CC1, which is set to 2-5, and the energy value e1 is not less than the energy coefficient e3, then execute step 420, otherwise execute step 421;
[0131] c2=c1+1 / d1(1)
[0132] e3=(e1+e2) / 2 (2)
[0133] Step 420: The edge node or sensor node that receives the confirmation message sets the cache distance in the confirmation message to 0, and saves all data tables in the data table set in the confirmation message;
[0134] Step 421: The edge node or sensor node that receives the confirmation message determines whether there is a path table entry whose coordinates are equal to the coordinates in the confirmation message. If so, execute step 422; otherwise, execute step 423;
[0135] Step 422: The edge node or sensor node that receives the confirmation message adds all data tables cached by itself to the data table set in the confirmation message, selects a path table entry whose coordinates are equal to the coordinates in the confirmation message, deletes the path table entry, forwards the confirmation message, and executes step 418;
[0136] Step 423: End.
[0137] Through the above process, the user node sends search messages, sensor search messages and confirmation messages to obtain data from the nearest sensor node or edge node. The above process realizes data sharing through the path table, so that multiple user nodes can obtain target data through one data communication process. At the same time, the above process can obtain data from the nearest edge node or sensor node, thereby effectively reducing data communication delay and cost.
[0138] Figure 8The user message includes a message ID, a final coordinate, a destination coordinate, and an edge node coordinate;
[0139] After the user node U1 sends a search message with the final coordinates CO1 to the edge node EN1, if it leaves the communication range of the edge node EN1 and links with the edge node EN2 before receiving the confirmation message with the coordinates CO1, the following operations are performed:
[0140] Step 501: Start;
[0141] Step 502: User node U1 sends a user message, the message ID of the message is 8, the final coordinates are CO1, the destination coordinates are the coordinates of edge node EN2, and the edge node coordinates are the coordinates of edge node EN1;
[0142] Step 503: If the sensor node receives the user message, execute step 507, otherwise execute step 504;
[0143] Step 504: The edge node that receives the user message determines whether its own coordinates are equal to the destination coordinates in the user message. If yes, it executes step 505; otherwise, it executes step 507;
[0144] Step 505: The edge node receiving the user message determines whether there is a path table entry whose coordinates are equal to the final coordinates in the user message. If so, execute step 507; otherwise, execute step 506;
[0145] Step 506: The edge node that receives the user message creates a path table entry whose coordinates are equal to the final coordinates in the user message, sets the life cycle to the maximum value, selects an edge table entry whose coordinates have the smallest distance from the final coordinates in the user message, sets the destination coordinates of the user message to the coordinates of the edge table entry, forwards the user message, and executes step 503;
[0146] Step 507: End.
[0147] If the user node leaves the communication range of the original edge node before sending a search message and receiving a confirmation message, a user message is sent to establish a path between the original edge node and the currently connected edge node, thereby ensuring that the user message can still obtain data even if the location changes.
[0148] Fig. 9 FIG. 1 is a schematic diagram of the sensor node movement support process of the present invention. If the path table of the sensor node SN2 is not empty and the position moves from the coordinate oCO1 to the coordinate oCO2, the following process is performed:
[0149] Step 601: Start;
[0150] Step 602: the sensor node SN2 selects all the sensor table entries whose energy is greater than the threshold ETH1, selects a sensor table entry from these table entries, the coordinates of which are closest to the coordinate oCD1, and sends a mobile message, the message ID of which is 9, the final coordinates are oCO1, the destination coordinates are the coordinates in the sensor table entry, and the path table is the path table of the sensor node SN2;
[0151] Step 603: The sensor node that receives the mobile message determines whether its own coordinates are equal to the final coordinates in the mobile message. If yes, execute step 604; otherwise, execute step 605;
[0152] Step 604: the sensor node that receives the mobile message merges its own path table with the path table in the mobile message, sets its own path table as the merged path table, and executes step 607;
[0153] Step 605: The sensor node receiving the mobile message determines whether its own coordinates are equal to the destination coordinates in the mobile message. If yes, step 606 is executed; otherwise, step 607 is executed.
[0154] Step 606: The sensor node receiving the mobile message selects all sensor table entries whose energy is greater than the threshold ETH1, selects a sensor table entry from these table entries, the coordinates of which are closest to the final coordinates in the mobile message, sets the destination coordinates in the mobile message to the coordinates in the sensor table entry, forwards the mobile message, and executes step 603;
[0155] Step 607: End.
[0156] If the sensor node moves, it sends a movement message to send its path table to the sensor node at the original location, thereby ensuring the continuity of the reverse path. In this way, even if the sensor node moves, it can ensure that the user node obtains data.
[0157] Example 1
[0158] Based on the simulation parameters in Table 1, this embodiment simulates an implementation method of a smart irrigation management system in the present invention. The performance analysis is as follows: when the user node is far away from the edge node or sensor node storing the data, the success rate of the user node acquiring data decreases, and when the user node is close to the edge node or sensor node storing the data, the success rate of the user node acquiring data increases, and the average success rate of the user node acquiring data is 98.3%.
[0159] Table 1
[0160]
[0161] The present invention provides an idea for implementing a smart irrigation management system. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the protection scope of the present invention. All components not specified in this embodiment can be implemented using existing technologies.
Claims
1. A method for implementing a smart irrigation management system, characterized in that: The system includes sensor nodes, user nodes and edge nodes, wherein the sensor nodes are distributed in the irrigation area and are used to collect data of the irrigation area, including humidity data and temperature data of the irrigation area; The edge nodes and the user nodes are distributed in the irrigation edge area; The user node obtains the data collected by the sensor node through the edge node; the method includes: The user node sends a search message to obtain a target data table; wherein the table name of the data table is the coordinates of the sensor node that generates the data table; If the edge node receiving the search message stores the target data table, it sends a confirmation message; wherein the confirmation message includes coordinates, cache coefficient, cache distance, energy coefficient, energy value and data table set; otherwise, if the edge node receiving the search message is closest to the table name of the target data table compared with other edge nodes, it sends a sensing search message, otherwise it forwards the search message; The sensor node receiving the sensor search message sends the confirmation message if the target data table exists, otherwise forwards the sensor search message; The edge node or sensor node that receives the confirmation message increments the cache distance in the confirmation message by a preset value, calculates the value of the cache coefficient according to the incremented cache distance, and calculates the value of the energy coefficient according to the energy value; if the incremented cache distance is not less than the distance threshold, and the calculated cache coefficient is not greater than the coefficient threshold, and the energy value of the edge node or sensor node is not less than the calculated energy coefficient, the cache distance in the confirmation message is set to 0, and all data tables in the data table set in the confirmation message are saved; if the edge node or sensor node has a path table entry with coordinates equal to the coordinates in the confirmation message, all data tables cached by it are added to the data table set of the confirmation message, and the confirmation message is forwarded; If the user node leaves the communication range of the edge node, a user message is sent; if the position of the sensor node moves, a mobile message is sent; The search message includes the final coordinates and the destination coordinates; the sensor search includes the final coordinates and the destination coordinates; If the edge node receiving the search message stores the target data table, then sending a confirmation message; otherwise, if the edge node receiving the search message is closest to the table name of the target data table compared to other edge nodes, then sending a sensing search message; otherwise, forwarding the search message, including: If the edge node that receives the search message saves the target data table, it sends the confirmation message; wherein the coordinates of the confirmation message are set to the final coordinates in the search message, the cache coefficient is set to 0, the cache distance is set to 0, the energy coefficient and the energy value are set to their current energy values respectively, and the data table set includes a data table whose table name is equal to the final coordinates of the search message; The edge node receiving the search message creates a path table entry with coordinates equal to the table name of the target data table. If the edge node receiving the search message is closest to the table name of the target data table compared to other edge nodes, a sensing table entry is selected, the coordinates of which are closest to the table name of the target data table, and the sensing search message is sent. The final coordinates of the sensing search message are set to the final coordinates in the search message, and the destination coordinates are set to the coordinates in the sensing table entry. Otherwise, an edge table entry is selected, the coordinates of which are closest to the table name of the target data table, the destination coordinates of the search message are set to the coordinates of the edge table entry, and the search message is forwarded. and / or, The sensor node that receives the sensor search message sends the confirmation message if the target data table exists, and otherwise forwards the sensor search message, including: The sensor node receiving the sensor search message sends a confirmation message if the target data table exists, otherwise creates a path table entry whose coordinates are equal to the table name of the target data table, selects the sensor table entry whose coordinates are closest to the table name of the target data table, sets the destination coordinates of the sensor search message to the coordinates of the sensor table entry, and forwards the sensor search message; Each of the sensor nodes or edge nodes has a unique coordinate, the coordinate includes a horizontal coordinate, a vertical coordinate and a water depth, and the water depth of the edge node's coordinate is 0; each edge node maintains an edge table, an edge table entry includes coordinates and a life cycle; each edge node or sensor node stores a sensor table, a sensor table entry includes coordinates and a life cycle; The method further comprises: The edge node sends an edge message, the coordinates of the edge message are its own coordinates; The edge node that receives the edge message creates an edge table entry, the coordinates of the edge table entry are equal to the coordinates in the edge message, and sets the life cycle of the edge table entry to a maximum value; The sensor node sends a sensor message, the coordinates of the sensor message are its own current coordinates; The edge node or sensor node that receives the sensor message creates a sensor entry, the coordinates and energy of the sensor entry are respectively equal to the coordinates and energy in the sensor message, and sets the life cycle of the sensor entry to a maximum value; The edge node or sensor node stores a path table. A path table entry contains coordinates and life cycle. The user message contains message ID, final coordinates, destination coordinates and edge node coordinates. The method further comprises: After the user node sends a search message and leaves the communication range of the edge node before receiving a confirmation message, it sends a user message, the final coordinates of the user message are the final coordinates in the search message, the destination coordinates are the coordinates of the currently connected edge node, and the edge node coordinates are the coordinates of the edge node when the search message is sent.
2. The method for implementing a smart irrigation management system according to claim 1, characterized in that: Each sensor node can sense a type of data; each node stores a data table, and a data table item contains a name, data, and life cycle; The method further comprises: The sensor node creates a data table whose name is equal to its own coordinates; The sensor node sends a creation message, and the sensor node that receives the creation message sends a data message, the data of the message is the data sensed by itself, and the name is the name that defines the data.
3. The method for implementing a smart irrigation management system according to claim 2, characterized in that: The method further comprises: The sensor node that sends the creation message receives the data message. If there is a data table item with a name equal to the name in the data message, the data of the data table item and the data in the data message are averaged, the data of the data table item is set to the average value, and the life cycle is set to the maximum value. Otherwise, a data table item is created, the name and data of the data table item are respectively equal to the name and data in the data message, and the life cycle is set to the maximum value.
4. The method for implementing a smart irrigation management system according to claim 1, characterized in that: The method further comprises: If the coordinates of the edge node receiving the user message are equal to the destination coordinates in the user message, and there does not exist a path table entry whose coordinates are equal to the final coordinates in the user message, then a path table entry is created, whose coordinates are equal to the final coordinates in the user message, and the life cycle is set to the maximum value. An edge table entry is selected, whose coordinates have the smallest distance from the final coordinates in the user message, and the destination coordinates of the user message are set to the coordinates of the edge table entry, and the user message is forwarded.
5. The method for implementing a smart irrigation management system according to claim 1, characterized in that: The method further comprises: If the path table of the sensor node is not empty and the position moves, a sensor table entry is selected whose coordinates are closest to its coordinates before moving, and a movement message is sent. The final coordinates of the message are equal to its coordinates before moving, the destination coordinates are the coordinates in the sensor table entry, and the path table is its own path table.
6. The method for implementing a smart irrigation management system according to claim 5, characterized in that: The method further comprises: If the coordinates of the sensor node receiving the mobile message are equal to the final coordinates in the mobile message, a merge operation is performed on its own path table and the path table in the mobile message, and its own path table is set as the merged path table.
7. The method for implementing a smart irrigation management system according to claim 5, characterized in that: The method further comprises: If the coordinates of the sensor node that receives the mobile message are equal to the destination coordinates in the mobile message, a sensor table entry is selected whose coordinates are closest to the final coordinates in the mobile message, the destination coordinates in the mobile message are set to the coordinates in the sensor table entry, and the mobile message is forwarded.
