Variable rate fertilizer machine prescription map efficient storage and retrieval method and device
By using a multi-branch tree data structure and a latitude and longitude coordinate dimensionality reduction algorithm, the problem of retrieval time caused by the increase in data scale in the high-precision variable fertilization system is solved, and efficient fertilization operation matching and efficiency are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-03
- Publication Date
- 2026-03-31
AI Technical Summary
In existing variable fertilization systems, the increased data size of prescription maps in high-precision fertilization operations leads to increased retrieval time, affecting the matching and efficiency of fertilization operations.
Employing a multi-branch tree data structure and a latitude-longitude coordinate dimensionality reduction algorithm, the minimum envelope rectangle is calculated by obtaining the polar coordinates, unit regions are divided and region codes are generated, a multi-branch tree data storage format is designed, and target codes are obtained using GPS messages for efficient retrieval.
This reduces the sensitivity of retrieval time to data size, ensuring high matching accuracy and fertilization efficiency across different plots and variables.
Smart Images

Figure CN116303426B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural machinery control technology, and in particular to a method and device for efficient storage and retrieval of prescription maps for variable fertilizer applicators. Background Technology
[0002] In the process of increasing crop yields, chemical fertilizers can contribute up to 60%, and in the process of improving soil productivity, they contribute 41.43%. In pursuit of higher yields, the amount of chemical fertilizers used is increasing daily. However, excessive use of chemical fertilizers also leads to increased production costs, deterioration of soil physical and chemical properties, and decline in soil fertility. Therefore, long-term fertilization operations that do not consider soil conditions not only result in a large waste of fertilizers but also cause serious environmental pollution. Variable-rate fertilizer application allows for adjustments to fertilizer application based on crop nutrient requirements and soil conditions, achieving the same or greater yields with optimal fertilization and significantly improving the soil environment.
[0003] Variable-rate fertilizer application primarily relies on variable-rate fertilization systems. Currently, based on implementation methods, these can be categorized into real-time sensor-based and prescription-map-based systems. Compared to real-time sensor-based systems, prescription-map-based variable-rate fertilization systems, in addition to using soil parameters to guide fertilization operations, can also integrate various data such as climate, historical yield, and historical fertilizer application rates to provide the optimal fertilizer application rate, making it the most commonly used variable-rate fertilization control system. Its main principle is to first formulate a fertilization strategy by combining multiple factors influencing fertilizer application rates, and then further generate a prescription map containing location and fertilizer application rate information. During operation, the GPS positioning system locates the coordinates of the fertilizer applicator's discharge port, and the system queries the prescription map in real time for the corresponding fertilizer application rate information. Finally, combined with the set fertilization operation parameters, the speed of the fertilizer applicator's drive motor is calculated to achieve variable-rate fertilization according to the prescription map.
[0004] Depending on the precision of the variable fertilization operation, the size of each fertilization unit area in the fertilization prescription map is also different. For a given field, the larger the area of the divided fertilization unit area, the fewer the number of fertilization unit areas; conversely, the smaller the area of the divided fertilization unit area, the more the number of fertilization unit areas. With the development of sensor technology, the accuracy of acquiring farmland environment, soil, and crop growth parameters is becoming increasingly higher, and the requirements for the accuracy of variable fertilization operations are also increasing. Therefore, the number of fertilization unit areas in the fertilization prescription map is gradually increasing. The basic storage format of data in the traditional fertilization prescription map is a two-dimensional vector (L,Q), where L is the latitude and longitude coordinate position (which is not a coordinate point in the prescription map, but a region centered on point L under the set accuracy), and Q is the fertilization amount corresponding to coordinate L. The fertilization prescription map is the collection of all two-dimensional vectors. The commonly used storage structure and retrieval method are sequential storage and sequential traversal retrieval. When the accuracy of variable fertilization operations is low, the prescription map retrieval time is relatively short and has little impact on the fertilization operation. However, as the accuracy of variable fertilization operations increases, the number of fertilization unit areas increases, the scale of two-dimensional vector data increases dramatically, and the time consumption of the sequential retrieval method also increases. When the operation speed is fast, the fertilizer applicator has already traveled a considerable distance from acquiring the coordinate position to completing the fertilization, resulting in a decrease in the matching degree between the actual fertilization operation and the prescription map. Summary of the Invention
[0005] Purpose of the invention: In order to overcome the shortcomings of the existing technology, the present invention proposes an efficient storage and retrieval method and device for prescription maps of variable fertilizer application machines, which aims to reduce the sensitivity of retrieval time to data size and ensure high matching between actual fertilization operations and prescription maps under different variable fertilization operation accuracies.
[0006] Technical Solution: To achieve the above objectives, the present invention provides an efficient storage and retrieval method for variable fertilizer applicator prescription maps. In the storage phase, the method includes:
[0007] Obtain the coordinates of the extreme points of the work site in each direction;
[0008] The minimum envelope rectangle of the work site is calculated based on the pole coordinates, and the coordinates of the four corner points of the minimum envelope rectangle are obtained.
[0009] The minimum envelope rectangle is divided into intervals to obtain multiple unit regions, and a region code corresponding to each unit region is generated, wherein the region code consists of multiple characters;
[0010] Multi-branch tree data is generated based on the regional code of the unit area involved in the operation plot. The multi-branch tree data consists of multi-level nodes, lines connecting nodes at different levels, and line markers. The last level node is the terminal point, and each terminal point has corresponding fertilizer application data.
[0011] During the retrieval phase, the method includes:
[0012] Obtain GPS messages and use them to obtain the target code of the target unit area;
[0013] Starting from the root node of the multi-branch tree data, the corresponding connection markers are retrieved at the corresponding level of the multi-branch tree data according to the characters constituting the target code, and the node pointed to by the connection marker is taken as the starting node of the next level of retrieval.
[0014] After retrieving the endpoint, the corresponding fertilizer application data is obtained.
[0015] Further, the step of dividing the minimum envelope rectangle into multiple unit regions and generating a region code corresponding to each unit region includes:
[0016] The minimum interval in the current minimum envelope rectangle is divided into four equal intervals arranged in a grid pattern.
[0017] Each of the divided intervals is binary encoded according to its latitude and longitude range to obtain an encoding segment. The encoding segment includes two characters, namely the longitude code and the latitude code.
[0018] By sequentially combining all the coding segments corresponding to the same unit region, a complete binary code corresponding to the unit region is obtained;
[0019] The binary code is converted into a decimal number in groups of 4, and then further converted into a one-dimensional string by referring to the Base16 encoding table. The one-dimensional string is the region code.
[0020] Furthermore, the multi-way tree data uses a two-dimensional assignment array to describe the region code corresponding to the unit region, and the format of the two-dimensional assignment array is: n-ary_tree[i][x] = j, bool[j] = k;
[0021] Where n-ary_tree[i][x] = j indicates that the connection marker between node i and node j in the multi-way tree data is character x in the Base16 encoding table; the value of k is 0 or 1, when bool[j] = 0 indicates that node j is not a terminal node, and when bool[j] = 1 indicates that node j is a terminal node.
[0022] Further, the step of generating multi-way tree data based on the regional encoding of the unit area involved in the work site includes:
[0023] Obtain the nth character of the region encoding;
[0024] Determine whether the node currently pointed to by the program pointer has a connection that points to the next level and whose connection flag matches the value of the nth character, and obtain the first judgment result;
[0025] If the first judgment result is negative, create a new node, assign a node number, store the two-dimensional assignment array of the node, and point the program pointer to the node;
[0026] If the first judgment result is yes, the program pointer is set to point to the node pointed to by the connection.
[0027] Determine whether the node pointed to by the program pointer is an endpoint. If so, end the storage of the region encoding and associate fertilizer application data with the endpoint.
[0028] A high-efficiency storage and retrieval device for variable fertilizer application machine prescription maps, comprising a storage module and a retrieval module;
[0029] The storage module includes:
[0030] The first acquisition unit is used to acquire the polar coordinates of the work site in each direction;
[0031] A calculation unit is used to calculate the minimum envelope rectangle of the work area based on the pole coordinates, and obtain the coordinates of the four corner points of the minimum envelope rectangle;
[0032] A partitioning unit is used to divide the minimum envelope rectangle into multiple unit regions and generate a region code corresponding to each unit region, wherein the region code consists of multiple characters;
[0033] The data storage unit is used to generate multi-branch tree data based on the regional code of the unit area involved in the operation plot. The multi-branch tree data consists of multi-level nodes, lines connecting nodes at different levels, and line markers. The last level node is the terminal point, and each terminal point has corresponding fertilizer application data.
[0034] The retrieval module includes:
[0035] The second acquisition unit is used to acquire GPS messages and obtain the target code of the target unit area accordingly.
[0036] The retrieval unit is used to start from the root node of the multi-branch tree data, and sequentially retrieve the corresponding connection markers in the corresponding level of the multi-branch tree data according to the characters constituting the target code, and take the node pointed to by the connection marker as the starting node of the next level of retrieval.
[0037] The data acquisition unit is used to obtain the corresponding fertilizer application data after retrieving the endpoint.
[0038] Beneficial effects: The efficient storage and retrieval method and device for variable fertilizer application machine prescription maps of the present invention, by designing a latitude and longitude coordinate dimensionality reduction algorithm, changes the storage of two-dimensional latitude and longitude coordinates to one-dimensional strings, and designs a multi-branch tree data storage format and retrieval method. This method can solve the problem that the efficiency of traditional prescription map sequential storage and sequential retrieval decreases sharply with the increase of data scale, reduce the sensitivity of prescription map retrieval time to data scale, and ensure high matching between actual fertilization operations and prescription maps under different plot sizes and variable fertilization operation precision. Attached Figure Description
[0039] Figure 1 A flowchart illustrating an efficient storage and retrieval method for variable fertilizer applicator prescription maps during the storage phase;
[0040] Figure 2 A flowchart illustrating a method for efficiently storing and retrieving variable fertilizer applicator prescription maps during the retrieval phase;
[0041] Figure 3 This is a schematic diagram showing the relationship between the minimum envelope rectangle and the work site;
[0042] Figure 4 A diagram illustrating the encoding of the storage area as "4D5A";
[0043] Figure 5 A schematic diagram illustrating the encoding of storage areas as "4D5B", "4D61", "4A61", and "2C61";
[0044] Figure 6 A diagram illustrating the retrieval of the target code "4A61";
[0045] Figure 7 This is a schematic diagram of the storage module.
[0046] Figure 8 This is a schematic diagram of the retrieval module. Detailed Implementation
[0047] The invention will now be further described with reference to the accompanying drawings.
[0048] Efficient storage and retrieval methods for variable fertilizer applicator prescription maps, such as Figure 1 As shown, during the storage phase, the method includes the following steps S101-S104:
[0049] Step S101: Obtain the coordinates of the extreme points of the work site in each direction;
[0050] In this step, the coordinates of the extreme points in each direction of the work plots P1P2P3P4 are the westernmost point, the northernmost point, the easternmost point, and the southernmost point, respectively, with the coordinates of the four points being P1, P2, P3, and P4.
[0051] Step S102: Calculate the minimum envelope rectangle of the work area based on the pole coordinates, and obtain the coordinates of the four corner points of the minimum envelope rectangle;
[0052] In this step, such as Figure 3 As shown, the length and width of the minimum envelope rectangle extend along the east-west direction and the north-south direction, respectively. The coordinates of its four corner points are (Lat1, Long1), (Lat1, Long2), (Lat2, Long2), and (Lat2, Long1), respectively.
[0053] Step S103: Divide the minimum envelope rectangle into multiple unit regions and generate a region code corresponding to each unit region. The region code consists of multiple characters, that is, the region code is a one-dimensional string.
[0054] Step S104: Generate multi-branch tree data based on the regional code of the unit area involved in the operation plot. The multi-branch tree data consists of multi-level nodes, lines connecting nodes at different levels, and line markers. The last level node is the terminal point, and each terminal point has corresponding fertilizer application data.
[0055] In the above steps S101-S104, the minimum envelope rectangle of the work plot is divided to obtain the unit area that meets the fertilization accuracy requirements. Then, the unit areas involved in the work plot are selected, encoded and stored, and the corresponding fertilization amount data is assigned to each unit area in the work plot. This makes it easier to divide the work plot into sections. The unit areas contained in the work plot have regular and uniform shapes, which facilitates the determination of the unit areas to be fertilized in the subsequent fertilization operation and facilitates the subsequent data retrieval operation.
[0056] like Figure 2 As shown, in the retrieval phase, the method includes the following steps S201-S203:
[0057] Step S201: Obtain GPS messages and obtain the target code of the target unit area accordingly;
[0058] In this step, the latitude and longitude of the fertilizer application point can be calculated based on the GPS message. Based on the specific value range of the latitude and longitude, the target code corresponding to the fertilizer application point can be determined. The format of the target code is consistent with the format of the area code.
[0059] In this step, as the fertilizer applicator moves, its position changes continuously. Therefore, the target unit area where the fertilizer inlet is located also changes continuously, that is, the target code also changes continuously, and the change of the target code is regular.
[0060] Step S202: Starting from the root node of the multi-branch tree data, the corresponding connection markers are retrieved at the corresponding level in the multi-branch tree data according to the characters constituting the target code, and the node (i.e., child node) pointed to by the connection marker is taken as the starting node for the next level of retrieval.
[0061] Step S203: After retrieving the endpoint, obtain the corresponding fertilizer application amount data.
[0062] In traditional prescription map storage and retrieval methods, after the variable fertilization control system receives the GPS message, it needs to query the fertilization amount information for the current location on the prescription map. This involves retrieving the fertilization amount information corresponding to the current latitude and longitude. Traditional methods employ sequential storage and traversal, which drastically reduces efficiency and ultimately affects the effectiveness of variable fertilization due to increasing latency. In contrast, the method described in this invention employs a multi-branch tree storage and retrieval algorithm, significantly improving both storage and retrieval efficiency.
[0063] Further, the step S103 above, which involves dividing the minimum envelope rectangle into multiple unit regions and generating a region code corresponding to each unit region, includes the following steps S301-S304:
[0064] Step S301: Divide each minimum interval in the current minimum envelope rectangle into four equal intervals arranged in a grid pattern.
[0065] Step S302: Each of the divided intervals is binary encoded according to its latitude and longitude range to obtain an encoding segment. The encoding segment includes two characters, namely the longitude code and the latitude code.
[0066] In steps S301-S302 above, during the first division, the smallest interval is the entire smallest envelope rectangle. After this division, four intervals are obtained. At this point, the latitude range... Represented by binary 0, Longitude range represented by binary 1. Represented by binary 0, Represented by binary 1, plots P1P2P3P4 can be divided into four intervals as shown in the diagram: 01, 11, 10, and 00. (Diagram showing unit area P...) nLocated within the 01 interval; during the second division, the smallest interval is the interval after the first division. Taking the division of the 01 interval as an example, the latitude range... Represented by binary 0, Longitude range represented by binary 1. Represented by binary 0, Represented by binary 1, the 01 interval can be divided into four intervals as shown in the diagram: 0101, 0111, 0110, and 0100. Target unit region P n It lies within the 0100 interval. The same method can be used to divide the other three intervals: 11, 10, and 00.
[0067] Similarly, the intervals 0101, 0111, 0110, 0100, etc., can be further divided, and then the divided intervals can be further divided until the size and precision of the divided intervals meet the allowable range of error for variable fertilization operations, thus obtaining the unit region.
[0068] Step S303: Sequentially combine all the coding segments corresponding to the same unit region to obtain the complete binary code corresponding to the unit region;
[0069] In this step, the cell region P n For example, if P n The binary code is 0100110101011010, which is 16 bits. That is, the interval division operation in step S302 above was performed 8 times to reach the precision requirement.
[0070] Step S304: Convert the binary code into a decimal number in groups of 4 bits, and further convert it into a one-dimensional string by referring to the Base16 encoding table. The one-dimensional string is the region code.
[0071] In this step, taking the aforementioned unit region Pn as an example, its binary encoding is converted into a decimal number of 4 bits, resulting in 413510. Then, based on the Base16 encoding table, it is further converted to obtain the fertilization unit region P. n The corresponding one-dimensional string is "4D5A".
[0072] The Base16 encoding table is shown in the following table:
[0073] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 A B C D E F
[0074] The GPS receiver on the fertilizer applicator obtains two-dimensional latitude and longitude coordinates in the WGS84 coordinate system. Compared with one-dimensional data, two-dimensional latitude and longitude coordinates have lower storage and query efficiency. Therefore, the above-mentioned latitude and longitude coordinate dimensionality reduction algorithm was designed for the characteristics of fertilizer application, which can significantly increase storage efficiency and subsequent query efficiency.
[0075] The multi-way tree data uses a two-dimensional assignment array to describe the region code corresponding to the unit region. The format of the two-dimensional assignment array is: n-ary_tree[i][x] = j, bool[j] = k;
[0076] Where n-ary_tree[i][x] = j indicates that the connection marker between node i and node j in the multi-way tree data is character x in the Base16 encoding table; the value of k is 0 or 1, when bool[j] = 0 indicates that node j is not a terminal node, and when bool[j] = 1 indicates that node j is a terminal node.
[0077] In step S104 above, generating multi-way tree data based on the regional code of the unit area involved in the work plot includes the following steps S401-S405:
[0078] Step S401: Obtain the nth character of the region code;
[0079] Step S402: Determine whether the node currently pointed to by the program pointer has a connection that points to the next level and whose connection flag is consistent with the value of the nth character, and obtain the first determination result;
[0080] Step S403: When the first judgment result is negative, create a new node, assign a node number, store the two-dimensional assignment array of the node, and point the program pointer to the node;
[0081] Step S404: When the first judgment result is yes, the program pointer is set to point to the node pointed to by the connection.
[0082] Step S405: Determine whether the node pointed to by the program pointer is an endpoint. If so, end the storage of the region encoding and associate fertilizer application data with the endpoint.
[0083] like Figure 4 As shown, with unit region P nTaking the corresponding area code "4D5A" as an example, under the initial conditions, the program pointer points to the root node of the multi-way tree (node 0), n=1, the obtained character is 4, it is determined whether there is a connection marked "4" from the root node downwards. If not, a new node is created, namely node 1, and the connection is marked as 4. At this time, the array n-ary_tree[0][4]=1, bool[1]=0 is assigned; then the program pointer points to node 1 of the multi-way tree, n=1, the obtained character is D, it is determined whether there is a connection marked "D" from node 1 downwards. If not, a new node is created, namely node 2, and the connection is marked as 13. At this time, the array n-ary_tree[1]
[13] =2, bool[2]=0 is assigned. Then the program pointer points to node 2 of the multi-way tree, n=3, the obtained character is 5, it is determined whether there is a connection marked "5" from node 2 downwards. If not, a new node is created, namely node 3, and the connection mark is 5. The array is assigned as n-ary_tree[2][5]=3, bool[3]=0; then the program pointer points to node 3 of the multi-way tree, n=3, the obtained character is A, it is determined whether there is a connection marked "A" from node 3 downwards. If not, a new node is created, namely node 4, and the connection mark is 10. The array is assigned as n-ary_tree[3]
[10] =4. At this time, the string "4D5A" is stored. Node 4 is the end point. Let bool[4]=1.
[0084] Other latitude and longitude coordinates in the prescription map are also stored following the steps described above, such as... Figure 5 As shown, taking the target code "4D5B" as an example, under the initial conditions, the program pointer points to the root node of the multi-branch tree (node 0), and then checks whether there is a connection marked "4", and finds that there is; then the program pointer points to node 1 of the multi-branch tree, and checks whether there is a connection marked "D", and finds that there is; then the program pointer points to node 2 of the multi-branch tree, and checks whether there is a connection marked "5", and finds that there is; then the program pointer points to node 3 of the multi-branch tree, and checks whether there is a connection marked "B", and finds that there is no, that is, a new node is created, namely node 5, and the connection is marked as 11, and the array n-ary_tree[3]
[11] is assigned to 5. At this time, the string "4D5B" is stored, node 5 is the terminal point, and bool[5] is set to 1. Similarly, "4D61", "4A61", "2C61"... are stored in the multi-branch tree data, and all the latitude and longitude position information in the entire variable fertilizer prescription map forms a multi-branch tree.
[0085] Based on this, during the retrieval phase, searching for the fertilizer application amount information at the current coordinate position in the prescription map is equivalent to retrieving the target code corresponding to the current coordinate position in the multi-branch tree. For example... Figure 6As shown, taking the target code "4A61" as an example, first, it checks if there is a connection from the root node to its child node that is identified by the first character "4" of "4A61". Node 1 is found. Then, it checks if there is a connection from node 1 to its child node that is identified by the second character "A". Node 9 is found. Next, it checks if there is a connection from node 9 to its child node that is identified by the third character "6". Node 10 is found. Finally, it checks if there is a connection from node 10 to its child node that is identified by the fourth character "1". Node 11 is found. Finally, it checks if node 11 is marked as the endpoint. If so, it returns the corresponding fertilizer application information and ends the current search.
[0086] As can be seen from the above example, in this multi-way tree data structure, there are 16 possible connections between parent and child nodes. As the depth of the multi-way tree increases, the amount of data that can be stored increases exponentially (16^16). n The retrieval time is only equivalent to the sum of the time spent retrieving a specific character from 16 characters n times (the algorithm time complexity is constant O(1)), which is much more efficient than the sequential traversal retrieval method (the algorithm time complexity is constant O(n)), especially in the case of large-scale fertilization of large plots and large data volumes with high prescription map precision.
[0087] This invention also provides a high-efficiency storage and retrieval device for variable fertilizer applicator prescription maps. This device may include or be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete this invention and implement the aforementioned high-efficiency storage and retrieval method for variable fertilizer applicator prescription maps. The program module referred to in this embodiment of the invention refers to a series of computer program instruction segments capable of performing specific functions, which are more suitable than the program itself for describing the execution process of the high-efficiency storage and retrieval method for variable fertilizer applicator prescription maps in the storage medium. The following description will specifically introduce the functions of each program module in this embodiment. The high-efficiency storage and retrieval device for variable fertilizer applicator prescription maps includes a storage module and a retrieval module.
[0088] like Figure 7 As shown, the storage module includes:
[0089] The first acquisition unit 501 is used to acquire the polar coordinates of the work site in each direction;
[0090] The calculation unit 502 is used to calculate the minimum envelope rectangle of the work area based on the pole coordinates, and obtain the coordinates of the four corner points of the minimum envelope rectangle;
[0091] The partitioning unit 503 is used to divide the minimum envelope rectangle into multiple unit regions and generate a region code corresponding to each unit region, wherein the region code consists of multiple characters.
[0092] Data storage unit 504 is used to generate multi-branch tree data based on the regional code of the unit area involved in the operation plot. The multi-branch tree data consists of multi-level nodes, lines connecting nodes at different levels, and line markers. The last level node is the terminal point, and each terminal point has corresponding fertilizer application data.
[0093] like Figure 8 As shown, the retrieval module includes:
[0094] The second acquisition unit 601 is used to acquire GPS messages and obtain the target code of the target unit area accordingly.
[0095] The retrieval unit 602 is used to start from the root node of the multi-branch tree data, and sequentially retrieve the corresponding connection mark in the corresponding level of the multi-branch tree data according to the characters constituting the target code, and take the node pointed to by the connection mark, i.e. the child node, as the starting node for the next level of retrieval.
[0096] The data acquisition unit 603 is used to obtain the corresponding fertilizer application data after retrieving the endpoint.
[0097] Other aspects of implementing the above-mentioned efficient storage and retrieval method for variable fertilizer applicator prescription maps based on the efficient storage and retrieval device for variable fertilizer applicator prescription maps have been described in detail in previous embodiments. Please refer to the corresponding content in the previous embodiments. They will not be repeated here.
[0098] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A prescription map efficient storage and retrieval method for a variable rate applicator, characterized by, During the storage phase, the method includes: Obtain the coordinates of the extreme points of the work site in each direction; the extreme points of the work site in each direction are the westernmost point, the northernmost point, the easternmost point, and the southernmost point, respectively; The minimum envelope rectangle of the work site is calculated based on the coordinates of the poles, and the coordinates of the four corner points of the minimum envelope rectangle are obtained. The length and width of the minimum envelope rectangle extend along the east-west direction and the north-south direction, respectively, and its four corner points are the northwest vertex, the northeast vertex, the southeast vertex, and the southwest vertex, respectively. The edge of the minimum envelope rectangle passes through all poles. The minimum envelope rectangle is divided into intervals to obtain multiple unit regions, and a region code corresponding to each unit region is generated, wherein the region code consists of multiple characters; Multi-branch tree data is generated based on the regional code of the unit area involved in the operation plot. The multi-branch tree data consists of multi-level nodes, lines connecting nodes at different levels, and line markers. The last level node is the terminal point, and each terminal point has corresponding fertilizer application data. During the retrieval phase, the method includes: Obtain GPS messages and use them to obtain the target code of the target unit area; Starting from the root node of the multi-branch tree data, the corresponding connection markers are retrieved at the corresponding level of the multi-branch tree data according to the characters constituting the target code, and the node pointed to by the connection marker is taken as the starting node of the next level of retrieval. After retrieving the endpoint, the corresponding fertilizer application data is obtained; The step of dividing the minimum envelope rectangle into multiple unit regions and generating a region code corresponding to each unit region includes: The minimum interval in the current minimum envelope rectangle is divided into four equal intervals arranged in a grid pattern. Each of the divided intervals is binary encoded according to its latitude and longitude range to obtain an encoding segment, which includes two characters, namely the longitude code and the latitude code; By sequentially combining all the coding segments corresponding to the same unit region, a complete binary code corresponding to the unit region is obtained; The binary code is converted into a decimal number in groups of 4 bits, and then further converted into a one-dimensional string by referring to the Base16 encoding table. The one-dimensional string is the region code. The multi-way tree data uses a two-dimensional assignment array to describe the region code corresponding to the unit region. The format of the two-dimensional assignment array is: n-ary_tree[i][x]=j, bool[j]=k; Where n-ary_tree[i][x]=j indicates that the connection marker between the i-th node and the j-th node in the multi-way tree data is the x-th character in the Base16 encoding table; the value of k is 0 or 1, when bool[j]=0 indicates that the j-th node is not a terminal node, when bool[j]=1 indicates that the j-th node is a terminal node; The step of generating multi-way tree data based on the regional encoding of the unit area involved in the work site includes: Obtain the nth character of the region encoding; Determine whether the node currently pointed to by the program pointer has a connection that points to the next level and whose connection flag matches the value of the nth character, and obtain the first judgment result; If the first judgment result is negative, create a new node, assign a node number, store the two-dimensional assignment array of the node, and point the program pointer to the node; If the first judgment result is yes, the program pointer is set to point to the node pointed to by the connection. Determine whether the node pointed to by the program pointer is an endpoint. If so, end the storage of the region encoding and associate fertilizer application data with the endpoint.
2. A prescription map efficient storage and retrieval device for a variable rate applicator, comprising: It includes a storage module and a retrieval module; The storage module includes: The first acquisition unit is used to acquire the coordinates of the poles of the work site in each direction; the poles of the work site in each direction are the westernmost point, the northernmost point, the easternmost point, and the southernmost point, respectively. The calculation unit is used to calculate the minimum envelope rectangle of the work area based on the coordinates of the poles, and obtain the coordinates of the four corner points of the minimum envelope rectangle; the length and width of the minimum envelope rectangle extend along the east-west direction and the north-south direction, respectively, and its four corner points are the northwest vertex, the northeast vertex, the southeast vertex, and the southwest vertex, respectively; the edge of the minimum envelope rectangle passes through all poles; A partitioning unit is used to divide the minimum envelope rectangle into multiple unit regions and generate a region code corresponding to each unit region, wherein the region code consists of multiple characters; The data storage unit is used to generate multi-branch tree data based on the regional code of the unit area involved in the operation plot. The multi-branch tree data consists of multi-level nodes, lines connecting nodes at different levels, and line markers. The last level node is the terminal point, and each terminal point has corresponding fertilizer application data. The retrieval module includes: The second acquisition unit is used to acquire GPS messages and obtain the target code of the target unit area accordingly. The retrieval unit is used to start from the root node of the multi-branch tree data, and sequentially retrieve the corresponding connection markers in the corresponding level of the multi-branch tree data according to the characters constituting the target code, and take the node pointed to by the connection marker as the starting node of the next level of retrieval. The data acquisition unit is used to obtain the corresponding fertilizer application data after retrieving the endpoint; The step of dividing the minimum envelope rectangle into multiple unit regions and generating a region code corresponding to each unit region includes: The minimum interval in the current minimum envelope rectangle is divided into four equal intervals arranged in a grid pattern. Each of the divided intervals is binary encoded according to its latitude and longitude range to obtain an encoding segment, which includes two characters, namely the longitude code and the latitude code; By sequentially combining all the coding segments corresponding to the same unit region, a complete binary code corresponding to the unit region is obtained; The binary code is converted into a decimal number in groups of 4 bits, and then further converted into a one-dimensional string by referring to the Base16 encoding table. The one-dimensional string is the region code. The region code corresponding to the unit region is described in a two-dimensional assignment array in the multi-ary tree data, and the format of the two-dimensional assignment array is: n-ary_tree[i][x]=j, bool[j]=k. Wherein, n-ary_tree[i][x]=j represents that the connection line between the i-th node and the j-th node in the multi-ary tree data is the x-th character in the Base16 encoding table; the value of k is 0 or 1, when bool[j]=0 represents that the j-th node is not a terminal node, and when bool[j]=1 represents that the j-th node is a terminal node; The multi-ary tree data is generated according to the region code of the unit region involved in the work plot, comprising: Obtaining the n-th character of the region code; Judging whether the node currently pointed to by the program pointer has a connection line pointing to the next level and having a connection line flag consistent with the value of the n-th character, to obtain a first judgment result; When the first judgment result is no, a new node is created, the node number is assigned, the two-dimensional assignment array of the node is stored, and the program pointer is pointed to the node; When the first judgment result is yes, the program pointer is pointed to the node pointed to by the connection line; Judging whether the node pointed to by the program pointer is a terminal node, and if yes, ending the storage of the region code and associating the fertilizer amount data with the terminal node.
Citation Information
Patent Citations
Location-based data query method and device
CN105488172A