An intelligent agricultural equipment cluster scheduling method based on spatial geographic information modeling
By using spatiotemporal data fusion and spatiotemporal graph neural network models, the probability and delay of interference events in agricultural equipment cluster scheduling are quantified, and an optimization model is constructed. This solves the problem of agricultural equipment cluster scheduling schemes failing due to sudden environmental changes, and achieves more stable operating efficiency and risk resistance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHU DAOMENG SPACE TECH CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-02
Smart Images

Figure CN122134025A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural equipment cluster scheduling, specifically to an intelligent agricultural equipment cluster scheduling method based on spatial geographic information modeling. Background Technology
[0002] In existing intelligent agricultural equipment cluster scheduling technologies, the scheduling problem is usually modeled as the vehicle routing problem (VRP) or its variants (such as VRP with time windows). Based on static or quasi-static spatial geographic information data provided by the geographic information system, the solution is obtained through genetic algorithms and ant colony algorithms to obtain the scheduling scheme with the shortest total time, optimal total path, or lowest energy consumption under preset conditions.
[0003] However, due to the terrain structure of farmland, sudden changes in geographical conditions can occur. For example, the optimal scheduling path for a cluster of dozens of harvesters, planned based on remote sensing imagery and drone inspection data from the previous day, might become impassable on the next day due to sudden localized rainfall, forcing harvesters scheduled to use these roads to stop or detour. Current technologies typically address this situation in two ways: one is through temporary reassignment via manual intervention; the other is through a global rescheduling by the system. However, the former is slow and lacks a global perspective; while the latter, although generating new solutions, still aims for theoretical optimality under new static or quasi-static spatial geographic conditions, failing to internalize the uncertainty of potential environmental upheavals into model parameters. This means the new solution may quickly become ineffective again due to the next unforeseen event. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides an intelligent agricultural equipment cluster scheduling method based on spatial geographic information modeling. This method solves the problem that existing agricultural equipment cluster scheduling methods do not fully consider the uncertainties of the geographical environment, which sometimes makes it difficult to execute agricultural equipment cluster scheduling plans.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for scheduling intelligent agricultural equipment clusters based on spatial geographic information modeling, the method comprising the following steps:
[0006] S1. Acquire multi-source data of the scheduling area within the target time slice, and perform spatiotemporal fusion processing to form a spatiotemporal feature map of the target time slice; the multi-source data includes real-time status data of agricultural equipment clusters, environmental monitoring data, and historical geographic data;
[0007] S2. Input the spatiotemporal feature map into a pre-trained spatiotemporal graph neural network model and output the joint probability distribution of preset interference events occurring in each geographical unit of the scheduling area within a future scheduling cycle; the joint probability distribution includes at least the probability of the event occurring and the expected task delay after it is triggered.
[0008] S3. Construct a random loss function based on the joint probability distribution, and establish a scheduling scheme optimization model with the goal of minimizing the comprehensive objective function consisting of the conditional risk value of the random loss function and the expected total scheduling cost;
[0009] S4. Solve the optimization model of the scheduling scheme to obtain the optimal scheduling scheme.
[0010] Preferably, the specific steps for constructing the spatiotemporal feature map are as follows:
[0011] S11. Based on the distribution of field boundaries, road networks, and obstacles in historical geographic data, the scheduling area is divided into several continuous geographic unit grids.
[0012] S12. Construct a static geographic information data layer using the static attributes of each geographic unit grid in the historical geographic data; the static attributes include at least soil type code, average elevation, and historical crop type;
[0013] S13. Extract the GPS location coordinates reported by each device from the real-time status data of the agricultural equipment cluster and assign the device to the corresponding geographical unit grid. Determine the time slice of the preset duration to which the device belongs based on the timestamp reported by the device.
[0014] S14. Extract the dynamic feature vector of each geographic unit grid in each time slice; the dynamic feature vector includes at least one of the following: number of devices, average operating speed, and total workload.
[0015] S15. Align the environmental monitoring data to each geographic unit grid and each time slice, and extract the environmental feature vector of each geographic unit grid;
[0016] S16. The geographic unit grid is fused with the static geographic information data layer, dynamic feature vector and environmental feature vector of the target time slice to obtain the spatiotemporal feature vector;
[0017] S17. Mark the spatiotemporal feature vectors onto the corresponding geographic unit grid to obtain the spatiotemporal feature map.
[0018] Preferably, the spatiotemporal graph neural network model includes: a model input layer for constructing the spatiotemporal graph structure, a spatial dependency layer for performing spatial dependency modeling, a temporal dependency layer for performing temporal dependency modeling, and a model output layer for outputting the joint probability distribution.
[0019] The model input layer is used to construct a spatiotemporal map structure based on spatiotemporal feature maps and historical geographic data;
[0020] The spatial dependency layer is used to learn the spatial dependency weights between nodes in the spatiotemporal graph structure through the multi-head graph attention network layer, so as to obtain the spatial perception features of each node.
[0021] The time-dependent layer is used to obtain the spatial perception features of each node in the spatiotemporal graph structure in multiple consecutive time slices before the target time to form a spatial perception feature sequence, and input it into a one-dimensional causal dilated temporal convolutional network layer for temporal convolution operation to obtain the final feature vector of each node at the target time.
[0022] The model output layer is used to process the final feature vector of each node in the spatiotemporal graph structure through a fully connected output layer, and outputs the probability of each preset interference event occurring at each node and its corresponding expected task delay through two parallel sub-networks, so as to obtain the joint probability distribution of each node.
[0023] Preferably, the specific steps for constructing the spatiotemporal graph structure are as follows: using each geographic unit grid of the spatiotemporal feature graph as a node, and the initial feature vector of the node being the spatiotemporal feature vector corresponding to the geographic unit grid, a spatiotemporal graph structure of an undirected graph is constructed. Where V and E represent the set of nodes and the set of edges in the spatiotemporal graph structure, respectively. Based on the road network connections and spatial proximity in the historical geographic data, an adjacency matrix A of the undirected graph is constructed. An edge is defined and elements in adjacency matrix A are set if and only if there is a directly connected traversable road between any two geographic unit grids i and j, or if the centroid distance between them is less than a preset neighborhood radius R. Otherwise, set the elements in the adjacency matrix A to be unbounded. .
[0024] Preferably, the specific steps for calculating the spatial perception features are as follows:
[0025] Calculate the attention coefficients from any node in the spatiotemporal graph structure to its neighboring nodes in each attention head of the multi-head graph attention network layer;
[0026] In each attention head of the multi-head graph attention network layer, the attention coefficients from any node in the spatiotemporal graph structure to its neighboring nodes are normalized.
[0027] The output features of each attention head in the multi-head graph attention network layer are calculated based on the normalized attention coefficients.
[0028] The spatial awareness features of a node are obtained by concatenating the output features of all attention heads in the multi-head graph attention network layer.
[0029] Preferably, the specific steps for training the spatiotemporal graph neural network model are as follows:
[0030] Historical multi-source data from multiple consecutive time slices within the scheduling area are acquired and spatiotemporal fusion is performed to obtain a spatiotemporal feature map sequence containing spatiotemporal feature maps from multiple consecutive time slices.
[0031] Using any time slice in the spatiotemporal feature map sequence as the endpoint, obtain multiple spatiotemporal feature map subsequences with a preset length from the spatiotemporal feature map sequence;
[0032] Obtain the actual types of interference events that occur on each geographic unit within a scheduling cycle after any time slice and the actual task delays they cause. Construct a sample set containing multiple training samples. Each training sample is a triple consisting of a spatiotemporal feature map subsequence, the corresponding interference event type, and the actual task delays it causes.
[0033] A joint loss function is constructed, and a spatiotemporal graph neural network model is trained using a sample set to obtain a spatiotemporal graph neural network model that meets the preset evaluation criteria.
[0034] Preferably, the joint loss function is a weighted sum of event classification loss, delayed regression loss, and graph topology regularization term;
[0035] The event classification loss is based on the event probability distribution predicted by the model for each geographic unit and the actual event category, and relatively higher training weights are assigned to samples with lower predicted probabilities.
[0036] The delay regression loss is calculated only for each geographic unit where a real interference event occurred, measuring the error between the model's predicted expected task delay and the actual statistically derived task delay.
[0037] The graph topology regularization term is used to encourage the model to learn feature representations that are close to each other in the feature space for interconnected or neighboring geographic units during training, based on the predefined adjacency relationships between geographic units.
[0038] Preferably, the process of training the spatiotemporal graph neural network model with the sample set is divided into two stages. In the first stage, the loss function is a weighted sum of event classification loss and delayed regression loss. In the second stage, the loss function is a joint loss function, and simulated noise is injected into the sample data of the sample set.
[0039] Preferably, the specific process of constructing the comprehensive objective function and scheduling scheme optimization model includes:
[0040] S31. For any scheduling scheme X, define its random loss function under the influence of random disturbance events. ;
[0041] S32, Given a confidence level And calculate the conditional value of risk of the random loss function;
[0042] S33. Based on the conditional risk value of the random loss function, construct a comprehensive objective function, wherein the comprehensive objective function is the weighted sum of the conditional risk value of the random loss function and the expected total scheduling cost;
[0043] S34. Establish a scheduling scheme optimization model with the goal of minimizing the value of the comprehensive objective function.
[0044] The technical solution also provides a system for implementing a cluster scheduling method for intelligent agricultural equipment. The system includes a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the cluster scheduling method for intelligent agricultural equipment as described in any one of claims 1-9.
[0045] Compared with existing technologies, this invention provides a method for scheduling intelligent agricultural equipment clusters based on spatial geographic information modeling, which has the following beneficial effects:
[0046] 1. This invention integrates multi-source data to form a spatiotemporal feature map, and then uses a spatiotemporal graph neural network to quantify the probability of the occurrence of a preset interference event in the next scheduling cycle and the expected task delay, forming a joint probability distribution. Then, based on the joint probability distribution, an optimization model for the scheduling scheme is constructed and solved with conditional risk value and expected total scheduling cost as constraints. This ensures that the generated optimal scheduling scheme not only pursues the best static efficiency, but also actively resists uncertain risks. To a certain extent, this solves the problem that scheduling schemes generated based on static geographic information in the prior art are prone to failure due to sudden environmental changes, thus ensuring the stability of operational efficiency.
[0047] 2. When constructing the spatiotemporal feature map, this invention designs a dynamic reliability weight to address potential issues such as packet loss and anomalies in device status data. The weight is dynamically calculated based on the reporting completeness rate and self-consistency to smooth current and historical data. Its value is proportional to both the reporting completeness rate and self-consistency rate of device status data in the grid within the current time slice. When the data quality is poor, it can rely on historical smoothing results to suppress noise and reduce the risk of overall decision-making errors due to data defects.
[0048] 3. This invention combines road accessibility and neighborhood radius to construct a spatiotemporal graph structure, and uses a multi-head graph attention network layer and a one-dimensional causal dilation temporal convolutional network layer to capture complex spatial and temporal dependencies, respectively. This enables the model to output a joint probability distribution of the occurrence probability and expected delay of various disturbance events on each geographic unit, making the prediction results not only accurate, but also consistent with the continuity logic of geographic space, providing more reliable data for subsequent risk quantification.
[0049] 4. This invention designs a joint loss function to guide the model to focus more on rare and difficult-to-identify interference events during training, and assigns relatively higher training weights to samples with lower prediction probabilities. At the same time, it only calculates for each geographical unit where interference events actually occurred, measuring the error between the model's predicted expected task delay and the actual statistically derived task delay. It also encourages the model to learn feature representations that are close to each other in the feature space for interconnected or neighboring geographical units. This results in a trained model that has high event classification recall, accurate delay estimation ability, and spatial prediction smoothness that conforms to physical laws, greatly improving the practical performance of the prediction model.
[0050] 5. This invention introduces conditional value of risk from the financial field into a comprehensive objective function and designs a risk aversion adjustment coefficient, enabling system administrators to flexibly formulate scheduling strategies. This allows for a smooth balance between pursuing the highest average efficiency and the strongest risk resistance, enabling the same system to adapt to different risk preferences in different operational scenarios. Attached Figure Description
[0051] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0052] Figure 1 This is a flowchart of the intelligent agricultural equipment cluster scheduling method based on spatial geographic information modeling according to the present invention. Detailed Implementation
[0053] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.
[0054] Those skilled in the art will understand that all or part of the steps in the methods of the following embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0055] To address the issue that existing agricultural equipment cluster scheduling methods do not adequately consider the uncertainties of the geographical environment, which can sometimes lead to difficulties in executing agricultural equipment cluster scheduling plans, this implementation provides an intelligent agricultural equipment cluster scheduling method based on spatial geographic information modeling, such as... Figure 1 As shown, the method includes the following steps:
[0056] S1. Acquire multi-source data for the scheduling area within the target time slice. This multi-source data includes real-time status data of agricultural equipment clusters, environmental monitoring data, and historical geographic data. Then, perform spatiotemporal fusion processing to form a spatiotemporal feature map for the target time slice. This integrates raw agricultural data from different sources, formats, and spatiotemporal scales into a unified, structured spatiotemporal data representation that can be directly processed by subsequent algorithm models. In existing technologies, equipment status, environmental data, and geographic information often exist in isolation. Directly using them for scheduling decisions can lead to information fragmentation and decision bias. This step, through spatiotemporal alignment and feature fusion, constructs comprehensive data that fully reflects the static attributes, dynamic operations, and environmental status of the scheduling area, laying a solid data foundation for subsequent intelligent prediction and optimization. The specific process of spatiotemporal fusion is detailed below:
[0057] S11. Since continuous geographic space is not convenient for computers to perform discretization calculations and analysis, it is necessary to grid the farmland area that serves as the scheduling area. This provides a unified spatial reference benchmark for all subsequent location-based data association, feature extraction, and model calculations. Based on the distribution of field boundaries, road networks, and obstacles in historical geographic data, the scheduling area is divided into several continuous geographic unit grids. This ensures that each grid has a clear physical meaning (such as a part of a field or a section of a road), making subsequent analysis more realistic. All agricultural equipment and environmental data will be mapped onto these grids, thereby achieving spatial alignment of multi-source data.
[0058] Static attributes such as S12, soil type coding, average elevation, and historical crop type are long-term, stable factors that affect agricultural operations. For example, soil type affects the resistance of agricultural machinery to passage and irrigation decisions, while elevation affects drainage and sunlight. Although these factors do not change rapidly over time, they form the basis for decision-making. Therefore, it is necessary to extract these static attributes and construct a static geographic information data layer based on the static attributes of each geographic unit grid in historical geographic data.
[0059] S13. The real-time status data of agricultural equipment clusters is fluid and massive. The GPS location coordinates reported by each device are extracted from the real-time status data of the agricultural equipment clusters and the device is assigned to the corresponding geographical unit grid. The time slice to which it belongs is determined according to the timestamp reported by the device. In this way, the dynamic and continuous device location information is bound to a fixed spatial grid and discrete time slices. For example, spatial matching algorithms (such as point-area judgment) are used to assign GPS coordinates to specific grid cells, and continuous time is discretized by dividing time windows (such as every 5 minutes as a time slice), so that scattered information is associated with a certain grid cell in a certain time slice.
[0060] S14. Knowing only the location of the equipment is not enough; it is also necessary to quantify its operational status and extract quantitative indicators that can characterize the intensity and status of the grid's operations. For example, at least one of the following: number of equipment, average operating speed, and total workload. The number of equipment reflects the operational density, the average operating speed reflects the smoothness of operations or the influence of terrain, and the total workload reflects the amount of tasks. These characteristics are dynamic and change with time slices. Therefore, based on these characteristics, a dynamic feature vector of each geographic unit grid in each time slice can be constructed to describe the real-time operational status of each grid unit.
[0061] S15. Environmental factors such as weather have a timely and significant impact on agricultural operations (especially outdoor operations). Therefore, it is necessary to align environmental monitoring data with spatiotemporal attributes with the grid and time slices constructed earlier. This means aligning the environmental monitoring data to each geographic unit grid and each time slice, and extracting the environmental feature vector for each geographic unit grid. The environmental feature vector generally includes one of precipitation, temperature, wind speed, and normalized difference vegetation index. Precipitation directly affects soil moisture and the passability of field ridges and roads. This is the core input for determining whether preset interference events such as road muddying may occur, and it directly determines the path feasibility in the scheduling plan. Temperature affects... The working efficiency and heat dissipation requirements of the equipment's engine and battery, as well as the effectiveness of certain specific operations (such as spraying), may be affected by extreme high temperatures. The continuous operation time may need to be adjusted or the protective scheduling of the equipment may be triggered. Wind speed has a decisive impact on the safety and operational accuracy of agricultural drones and aerial work equipment. Excessive wind speed will directly lead to the inability to perform related tasks, which must be rescheduled or postponed. Normalized Difference Vegetation Index (NDVI) is a key remote sensing indicator for assessing crop growth, density, and health status. It directly determines the intensity of operational demand in the current area. For example, areas with high NDVI values may urgently need fertilization or plant protection, thus affecting the priority of task allocation for cluster equipment.
[0062] S16. The static geographic information data layer, dynamic feature vector, and environmental feature vector of the geographic unit grid in the target time slice are fused to obtain a spatiotemporal feature vector, which comprehensively describes the state of each grid unit. Its expression can be represented as:
[0063]
[0064] In the above formula, This represents the spatiotemporal feature vector of a geographic unit grid at time slice t. This represents the static attributes of the geographic unit grid, also known as the static geographic information data layer. and These are the dynamic feature vector and environmental feature vector of the geographic unit grid at time slice t, respectively. , is a dynamic credibility weight, whose value is proportional to the reporting completeness and consistency of device status data in the grid within the current time slice. The reporting completeness refers to the ratio of the actual received data volume to the expected data volume, and the consistency refers to whether the reported job status logic of different devices in the same grid is consistent. This design makes it more inclined to trust the latest dynamics when the data quality is high, and more dependent on the smoothed results of the previous time slice when the data quality is low, thereby suppressing noise introduced by data packet loss or outliers.
[0065] S17. Mark the spatiotemporal feature vectors onto the corresponding geographic unit grid to obtain a spatiotemporal feature map, which contains all spatiotemporal information of the entire scheduling area in the target time slice.
[0066] S2. Next, it is necessary to quantify the uncertainties in the future working environment. Existing scheduling methods usually assume that the environment is static or only use simple statistical probabilities, which cannot capture the propagation and correlation characteristics of disturbance events in complex farmland spaces. This embodiment uses a specially designed spatiotemporal graph neural network model to simulate the spatial interaction and temporal evolution between geographic grid units. That is, by inputting the spatiotemporal feature map into the pre-trained spatiotemporal graph neural network model, the joint probability distribution of the preset disturbance events occurring in each geographic unit in the scheduling area within a future scheduling cycle can be output. The joint probability distribution includes at least the probability of the event occurring and the expected task delay after its triggering. The structure of the spatiotemporal graph neural network model is described in detail below, which mainly includes the following components:
[0067] 1. The model input layer is used to construct the spatiotemporal graph structure based on the spatiotemporal feature map and historical geographic data. The specific steps are as follows: each geographic unit grid of the spatiotemporal feature map is used as a node, and the initial feature vector of each node is the spatiotemporal feature vector corresponding to the geographic unit grid, thus constructing an undirected spatiotemporal graph structure. Here, V and E represent the set of nodes and the set of edges in the spatiotemporal graph structure, respectively. Based on the road network connections and spatial proximity in historical geographic data, an adjacency matrix A of the undirected graph is constructed. An edge is defined and elements in adjacency matrix A are set if and only if there is a directly connected traversable road between any two geographic unit grids i and j, or if the centroid distance between them is less than a preset neighborhood radius R. Otherwise, set the elements in the adjacency matrix A to be unbounded. The accessibility of roads ensures that the feasibility analysis of scheduling routes can be performed on the graph, while determining edges through neighborhood radii captures the spatial propagation effects of natural phenomena such as pests and diseases and water infiltration. This dual-rule graph construction enables the model to learn spatial dependency patterns that are more consistent with agricultural realities.
[0068] 2. Spatial Dependency Layer for Spatial Dependency Modeling: The risk (e.g., mud) at a point in farmland is often influenced by the surrounding conditions. The purpose of this layer is to allow each node to aggregate information from its neighboring nodes, thereby learning complex spatial dependencies. A multi-head graph attention network layer is used to learn the spatial dependency weights between nodes in the spatiotemporal graph structure, thus obtaining the spatial perception features of each node. The reason for using a multi-head graph attention mechanism is that it allows the model to dynamically and differentially focus on the importance of different neighbors, rather than simply averaging. This is more suitable for the uneven risk diffusion patterns in farmland. The specific steps are as follows:
[0069] In the multi-head graph attention network layer, the attention coefficients from any node in the spatiotemporal graph structure to its neighboring nodes are calculated. These coefficients measure how much attention node i should give to its neighboring node j. The calculation formula is as follows:
[0070]
[0071] In the above formula, This represents the attention coefficient from node i to its neighbor node j in the k-th attention head. For activation function, This represents the trainable attention weight vector of the k-th attention head. This represents the linear transformation weight matrix that the k-th attention head can train. and Let represent the initial feature vectors of node i, respectively. This indicates a vector concatenation operation.
[0072] In each attention head of the multi-head graph attention network layer, the attention coefficients from any node in the spatiotemporal graph structure to its neighboring nodes are normalized, and the calculation formula is as follows:
[0073]
[0074] In the above formula, This represents the normalized attention coefficients from node i to its neighbor node j in the k-th attention head. Let i represent the set of neighboring nodes of node i. Nodes in .
[0075] The output features of each attention head in the multi-head graph attention network layer are calculated based on the normalized attention coefficients. The calculation formula is as follows:
[0076]
[0077] In the above formula, Let i be the output feature of the k-th attention head in the multi-head graph attention network layer. It is a non-linear activation function;
[0078] The spatial perception features of a node are obtained by concatenating the output features of all attention heads in the multi-head graph attention network layer. This layer is based on the spatiotemporal graph structure output by the previous layer. Each node actively queries its related neighbor information through the attention mechanism, and finally outputs a spatial perception feature containing global spatial context information. This enables the model to predict spatially coherent risk areas that conform to the laws of physical propagation, rather than isolated scattered points.
[0079] 3. The time dependency layer used for time dependency modeling. The interfering events (such as continuous rainfall) have temporal continuity. The purpose of this layer is to capture the temporal evolution of the state of each geographic unit. It obtains spatial perception features of each node in the spatiotemporal map structure across multiple consecutive time slices before the target time to form a spatial perception feature sequence. This sequence is then input into a one-dimensional causal dilated temporal convolutional network layer for temporal convolution operations to obtain the final feature vector of each node at the target time. The reasons for using a causal dilated temporal convolutional network are: 1) Causality: Current predictions only depend on past and current information, which aligns with reality; 2) Dilated convolution: Through exponentially increasing interval sampling, it can capture long-term historical dependencies with fewer layers, efficiently learning long-term time-series patterns such as weather cycles and crop growth cycles. Its calculation formula is:
[0080]
[0081] The final feature vector of node i at time t, where time t is the target time. Indicates the temporal convolution kernel at the th... Trainable weight parameters at each position, denoted by d, which is the size of the temporal convolution kernel, and d is the dilation factor that increases with the number of network layers to expand the receptive field. b is a trainable bias term. This layer receives the spatially perceptual features of each node across multiple consecutive time slices from the output of the spatially dependent layer. Through temporal convolution, it integrates the historical state information of the nodes and outputs a final feature vector containing the spatiotemporal evolution law. This enables the model to perform temporal extrapolation and predict the next scheduling cycle.
[0082] 4. The model output layer used to output the joint probability distribution: Scheduling decisions require not only knowing the probability of an event occurring but also its impact. The fully connected output layer processes the final feature vector of each node in the spatiotemporal graph structure, and two parallel sub-networks output the probability of each preset interference event occurring at each node and its corresponding expected task delay, thus obtaining the joint probability distribution for each node. The probability of each preset interference event occurring at one node, output by one of the sub-networks, can be expressed as: , A multidimensional vector representing the probability of each preset interference event occurring at the i-th node. This represents the probability that the Mth interference event occurs at the i-th node. The expected task delay when each preset interference event from the other sub-network is triggered at this node can be expressed as: , This represents a multi-dimensional vector consisting of the expected task delays when each preset interference event is triggered at the i-th node. Let represent the expected task delay, in minutes, caused when the Mth interference event is triggered at the i-th node. Then the joint probability distribution of node i is a binary tuple. It clearly shows where, what, how likely it is to happen, and how much delay it will cause, along with a series of key data.
[0083] After constructing the spatiotemporal graph neural network model, it needs to be trained. The specific training steps are as follows:
[0084] Supervised learning requires a large number of "input-output" paired samples. However, in agricultural scenarios, there is no readily available labeled data indicating "when, where, what kind of interference event occurred, and how much delay it caused". Therefore, we propose a method to construct training samples by inverting from historical system operation logs, which solves the core problem of training data source. First, we obtain historical multi-source data of multiple consecutive time slices in the scheduling area from a historical database with a long time span (such as the past two years) and perform spatiotemporal fusion processing to obtain a spatiotemporal feature map sequence containing spatiotemporal feature maps of multiple consecutive time slices.
[0085] For any time slice in the spatiotemporal feature map sequence ( Using as the endpoint, obtain multiple spatiotemporal feature map subsequences from the spatiotemporal feature map sequence that satisfy a preset length (e.g., 3 time slices), and then examine the time slice. Data such as historical work orders, equipment GPS trajectories, and work logs within a complete scheduling cycle are analyzed using algorithms to determine whether a preset interference event has occurred in each geographical unit i, i.e., to obtain any time slice. The types of interference events that actually occurred on each geographic unit in the next scheduling cycle and the resulting actual task delays For example, by comparing the historical average speed of the same equipment traversing a certain road segment with the actual speed at that time, a sudden drop in speed combined with rainfall data at that time can be identified as a "muddy road" event. By comparing the actual operation time with the standard time for similar operations under adjacent normal conditions, the actual task delay caused by the interference can be calculated. Finally, a sample set containing multiple training samples is constructed. Each training sample consists of a spatiotemporal feature map subsequence and the corresponding interference event type. and the resulting actual task delays The resulting triples provide the model with a large number of learning samples.
[0086] A joint loss function is constructed, and a spatiotemporal graph neural network model is trained using a sample set to obtain a spatiotemporal graph neural network model that meets the preset evaluation criteria.
[0087] The joint loss function is the event classification loss. Delayed regression loss And graph topological regularization term The weighted sum is explained in detail below:
[0088] The event classification loss is based on the probability distribution of event occurrence predicted by the model for each geographic unit and the actual event category. Samples with lower predicted probabilities are assigned relatively higher training weights, and its expression is:
[0089]
[0090] In the above formula, N represents the total number of geographic units, and M represents the total number of preset interference event categories. This represents the predicted probability of the spatiotemporal graph neural network model for the occurrence of the m-th type of disturbance event in the i-th geographic unit. For the indicator function, when the condition within the parentheses (i.e., the type of interference event occurring on the i-th geographic unit) is the type of interference event that actually occurred. The function value is 1 when the condition is met, and 0 otherwise. These are adjustable focusing parameters; by adjusting the parameters... This reduces the loss contribution of simple samples that the model has already predicted accurately (high probability), and focuses on difficult samples that are hard to classify (low prediction probability) to solve the problem of extreme class imbalance in agricultural disturbance events, that is, the problem that there are far more samples of "no disturbance events" than samples of "disturbing events". This forces the model to devote more effort to learning to identify those rare disturbance events, rather than simply biasing all predictions to the majority class, thereby significantly improving the prediction recall rate for rare events (such as local failures).
[0091] The delay regression loss is calculated only for each geographic unit where a real disturbance event occurred. It measures the error between the model's predicted task delay and the actual statistically derived task delay. This is because for nodes where no disturbance event occurred, their delay labels are meaningless or zero, and forced regression would introduce noise. Its expression can be represented as:
[0092]
[0093] In the above formula, This represents the set of nodes where a preset interference event has occurred. This indicates the type of interference event that actually occurs on the i-th geographic unit, as represented by the model. The predicted expected task delay, This represents the result of real interference events in the i-th geographic unit, calculated by inversion from historical data. The actual task delay caused by the occurrence.
[0094] Graph topology regularization is used to encourage the model to learn feature representations of interconnected or neighboring geographic units that are close to each other in the feature space during training, based on predefined adjacency relationships between geographic units. Its expression can be:
[0095]
[0096] In the above formula, This represents the adjacency relationship between geographic units i and j in the spatiotemporal graph structure. A value of 1 indicates that geographic units i and j are spatially adjacent or connected; otherwise, it indicates that they are not adjacent or connected. and These represent the final feature vectors learned by the time-dependent layer of the spatiotemporal graph neural network model for the i-th and j-th geographic unit nodes, respectively. This ensures that the model's prediction output does not exhibit drastic or unreasonable abrupt changes in space. For example, a grid may be predicted as severely muddy, while all its surrounding connected grids may be predicted as completely normal. This enhances the spatial rationality and stability of the model's prediction results.
[0097] Furthermore, considering that training directly on a complex joint loss function and potentially noisy data may lead to model convergence difficulties or local optima, this embodiment employs a course-based learning strategy, simulating the human learning process of starting with easier tasks and gradually increasing the model's robustness. The training process of the spatiotemporal graph neural network model using the sample set is divided into two stages. In the first stage, the loss function is a weighted sum of event classification loss and delay regression loss, with the graph topology regularization term disabled. This stage allows the model to grasp the basic rules of event recognition and delay estimation under relatively clean data and simpler objectives, establishing a stable foundational model. This is similar to having students learn basic knowledge first. In the second stage, the loss function is the complete joint loss function. During training, simulated noise can be actively injected into the sample data of the training set, such as randomly discarding some device status data (simulating packet loss) or disturbing some environmental feature values (simulating sensor errors). This can be achieved by randomly masking the dynamic feature vectors or environmental feature vectors of the sample data or adding Gaussian noise. The noise forces the model to avoid over-reliance on individual noisy features and instead learn to use the spatial correlation information enhanced by the graph topology regularization term for comprehensive reasoning. This greatly improves the model's predictive robustness in the face of imperfect data in real-world deployments.
[0098] After training, the model performance must be evaluated on an independent validation set to ensure its generalization ability and avoid overfitting. Only models that reach a preset performance threshold will have their parameters fixed, such as F1 score > 0.85 and MAPE < 20%.
[0099] S3. After obtaining the joint probability distribution output in step S2, it is necessary to quantitatively transform it into the optimization objective of scheduling decisions. Most existing technologies pursue cost optimization under static conditions. Once the environment changes, the performance of the scheme deteriorates sharply. This embodiment introduces the concept of conditional value of risk from financial risk management, constructs a stochastic loss function based on the joint probability distribution, and establishes a scheduling scheme optimization model with the objective of minimizing the comprehensive objective function composed of the conditional value of risk of the stochastic loss function and the expected total scheduling cost. This constructs an optimization model that actively balances average efficiency and risk resistance, making the generated scheduling scheme robust to cope with uncertainty. The specific steps are as follows:
[0100] S31. To quantify the impact of random disturbances on scheduling schemes, it is necessary to establish a function that links random events to scheduling schemes and can calculate the resulting losses. Therefore, for any scheduling scheme X, define its random loss function under the influence of random disturbance events. To achieve this goal, among other things, For a random vector, each component This indicates whether the m-th type of disturbance event occurs in geographic unit i, and follows a Bernoulli distribution, i.e. Time indicates occurrence. The time period is represented as occurrence, and its core idea is that the loss consists of the sum of the baseline cost and the additional cost caused by the disturbance. Therefore, the specific form of the random function is:
[0101]
[0102] In the above formula, This represents the baseline scheduling cost of scheduling scheme X under undisturbed conditions, such as total fuel consumption and total working hours. Its calculation depends on the specific path and operation sequence of scheduling scheme X, where N is the total number of geographical units. This represents the expected task delay occurring at time m in geographic unit i. The sensitivity coefficient is a function related to the scheduling scheme X, used to quantify the vulnerability of the scheduling scheme to event m occurring in unit i. Its value is jointly determined by the number of devices planned to pass through or work in unit i in the scheduling scheme X, the work duration, and the criticality of the device's task in the global schedule. It enables the model to identify that the same muddy road section will cause different global losses to a busy critical path and an idle redundant path. This guides the optimizer to actively avoid high-risk points that may cause greater losses to the overall schedule.
[0103] S32. Knowing only the expected value (average) of the loss is insufficient to mitigate extreme risks. Conditional Value at Risk (VaR) is a tool used in finance to measure and manage extreme tail risks. This embodiment introduces VaR to quantify the worst-case confidence level. In this scenario, the average loss will be high, forcing the optimization process to consider not only the good average case but also the extent to which the bad case is not catastrophic. Therefore, for a given confidence level... The conditional value of risk for the random loss function is calculated using the following formula:
[0104]
[0105] In the above formula, the random loss function Conditional Value at Risk The definition is in In the distribution, the loss exceeds its confidence level. Value at risk (e.g., 95%) Conditional expectation, confidence level Defined by the manager, this value represents their risk aversion; a higher value indicates greater risk aversion. 'u' is an auxiliary variable, which can be understood in the calculation as representing the risk level at a certain confidence level. Value at risk (VaR) Represents a random vector The mathematical expectation of the scheduling scheme provides a rigorous and computable metric to measure and compare the performance of different scheduling schemes in dealing with extreme adverse situations. A scheme with a low CVaR value means that its performance is relatively stable even in a few very bad interference scenarios.
[0106] S33. An ideal scheduling scheme needs to strike a balance between pursuing high efficiency (i.e., low total scheduling cost) and pursuing high reliability (i.e., low CVaR). Therefore, based on the conditional risk value of the stochastic loss function, a comprehensive objective function is constructed. The comprehensive objective function is the weighted sum of the conditional risk value of the stochastic loss function and the expected total scheduling cost. Of course, in the calculation, the conditional risk value and the expected total scheduling cost are best normalized to a uniform dimension, or set according to experience. The value of can be expressed as:
[0107]
[0108] In the above formula, This is the risk aversion adjustment coefficient. The settings are configured by the system administrator based on the actual risk tolerance of the operation, and can be adjusted accordingly. System administrators can flexibly formulate scheduling strategies when When the value approaches 0, the system is close to risk neutrality, aiming to minimize the average cost. When the risk preference value approaches 1, the system exhibits extreme risk aversion, prioritizing minimizing losses in the worst-case scenario. This adjustable risk preference mechanism allows this method to adapt to operational scenarios with varying risk characteristics, ranging from stable plains farms to dynamic mountainous and hilly terrain. Let be the expected total scheduling cost.
[0109] S34. Finally, all the above definitions need to be formalized into a standard mathematical optimization problem for computer solution. That is, a scheduling scheme optimization model needs to be established with the goal of minimizing the value of the comprehensive objective function. Its expression is:
[0110]
[0111] In the above formula, This represents the optimal scheduling scheme. This represents the set of all feasible scheduling schemes that satisfy basic constraints (such as equipment capacity and task time windows), such as the starting position and capacity of each piece of equipment, the time window of each agronomic task, and collision avoidance rules between equipment.
[0112] S4. Finally, the optimal scheduling scheme is obtained by solving the scheduling scheme optimization model using a computer. A solution method is provided for solving the scheduling scheme optimization model: First, the comprehensive objective function constructed in step S3, which includes random variables and conditional risk value, can be deterministically approximated using the "scenario method." That is, using the probability distribution predicted in step S2, a large number (e.g., K) of specific future disturbance scenarios are randomly generated, and the expected total scheduling cost and conditional risk value are approximated as the weighted average cost and tail average cost under these K scenarios. Next, the key decisions in the equipment scheduling scheme X (such as "whether equipment a goes to grid i to execute task j at time t") are represented by 0-1 variables, and the operation time, resource consumption, etc., are represented by continuous variables. All constraints (such as equipment endurance, task time window, and operation sequence) are expressed by linear equations or inequalities. Finally, the original problem is transformed into a large-scale deterministic mixed-integer linear programming model (MILP model). The standardized MILP model is then input into a mature commercial mathematical optimization solver (such as Gurobi, CPLEX, and MOSEK) in a specific format (e.g., .mps, .lp files). These solvers integrate precise algorithms such as branch and bound, cutting plane methods, and various heuristic strategies. Users typically need to set a time limit or optimality tolerance before starting the solver. After the solver finishes running, it returns a status code (e.g., "Optimal solution found," "Feasible solution reached within time limit") and the specific values of all decision variables. By extracting the variable values related to device paths, task sequences, and time, a specific, executable sequence of scheduling instructions can be obtained, which serves as the final optimal scheduling scheme output.
[0113] The technical solution also provides a system for implementing a cluster scheduling method for intelligent agricultural equipment. The system includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the cluster scheduling method for intelligent agricultural equipment.
[0114] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for scheduling intelligent agricultural equipment clusters based on spatial geographic information modeling, characterized in that, The method includes the following steps: S1. Acquire multi-source data of the scheduling area within the target time slice, and perform spatiotemporal fusion processing to form a spatiotemporal feature map of the target time slice; the multi-source data includes real-time status data of agricultural equipment clusters, environmental monitoring data, and historical geographic data; S2. Input the spatiotemporal feature map into a pre-trained spatiotemporal graph neural network model and output the joint probability distribution of preset interference events occurring in each geographical unit of the scheduling area within a future scheduling cycle; the joint probability distribution includes at least the probability of the event occurring and the expected task delay after it is triggered. S3. Construct a random loss function based on the joint probability distribution, and establish a scheduling scheme optimization model with the goal of minimizing the comprehensive objective function consisting of the conditional risk value of the random loss function and the expected total scheduling cost; S4. Solve the optimization model of the scheduling scheme to obtain the optimal scheduling scheme.
2. The intelligent agricultural equipment cluster scheduling method according to claim 1, characterized in that, The specific steps for constructing the spatiotemporal feature map are as follows: S11. Based on the distribution of field boundaries, road networks, and obstacles in historical geographic data, the scheduling area is divided into several continuous geographic unit grids. S12. Construct a static geographic information data layer using the static attributes of each geographic unit grid in the historical geographic data; the static attributes include at least soil type code, average elevation, and historical crop type; S13. Extract the GPS location coordinates reported by each device from the real-time status data of the agricultural equipment cluster and assign the device to the corresponding geographical unit grid. Determine the time slice of the preset duration to which the device belongs based on the timestamp reported by the device. S14. Extract the dynamic feature vector of each geographic unit grid in each time slice; the dynamic feature vector includes at least one of the following: number of devices, average operating speed, and total workload. S15. Align the environmental monitoring data to each geographic unit grid and each time slice, and extract the environmental feature vector of each geographic unit grid; S16. The geographic unit grid is fused with the static geographic information data layer, dynamic feature vector and environmental feature vector of the target time slice to obtain the spatiotemporal feature vector; S17. Mark the spatiotemporal feature vectors onto the corresponding geographic unit grid to obtain the spatiotemporal feature map.
3. The intelligent agricultural equipment cluster scheduling method according to claim 1, characterized in that, The spatiotemporal graph neural network model includes: a model input layer for constructing the spatiotemporal graph structure, a spatial dependency layer for performing spatial dependency modeling, a temporal dependency layer for performing temporal dependency modeling, and a model output layer for outputting the joint probability distribution; The model input layer is used to construct a spatiotemporal map structure based on spatiotemporal feature maps and historical geographic data; The spatial dependency layer is used to learn the spatial dependency weights between nodes in the spatiotemporal graph structure through the multi-head graph attention network layer, so as to obtain the spatial perception features of each node. The time-dependent layer is used to obtain the spatial perception features of each node in the spatiotemporal graph structure in multiple consecutive time slices before the target time to form a spatial perception feature sequence, and input it into a one-dimensional causal dilated temporal convolutional network layer for temporal convolution operation to obtain the final feature vector of each node at the target time. The model output layer is used to process the final feature vector of each node in the spatiotemporal graph structure through a fully connected output layer, and outputs the probability of each preset interference event occurring at each node and its corresponding expected task delay through two parallel sub-networks, so as to obtain the joint probability distribution of each node.
4. The intelligent agricultural equipment cluster scheduling method according to claim 3, characterized in that, The specific steps for constructing the spatiotemporal graph structure are as follows: using each geographic unit grid of the spatiotemporal feature graph as a node, and the initial feature vector of the node being the spatiotemporal feature vector corresponding to the geographic unit grid, a spatiotemporal graph structure of undirected graph is constructed. Where V and E represent the set of nodes and the set of edges in the spatiotemporal graph structure, respectively. Based on the road network connections and spatial proximity in the historical geographic data, an adjacency matrix A of the undirected graph is constructed. An edge is defined and elements in adjacency matrix A are set if and only if there is a directly connected traversable road between any two geographic unit grids i and j, or if the centroid distance between them is less than a preset neighborhood radius R. Otherwise, set the elements in the adjacency matrix A to be unbounded. .
5. The intelligent agricultural equipment cluster scheduling method according to claim 3, characterized in that, The specific steps for calculating the spatial perception features are as follows: Calculate the attention coefficients from any node in the spatiotemporal graph structure to its neighboring nodes in each attention head of the multi-head graph attention network layer; In each attention head of the multi-head graph attention network layer, the attention coefficients from any node in the spatiotemporal graph structure to its neighboring nodes are normalized. The output features of each attention head in the multi-head graph attention network layer are calculated based on the normalized attention coefficients. The spatial awareness features of a node are obtained by concatenating the output features of all attention heads in the multi-head graph attention network layer.
6. The intelligent agricultural equipment cluster scheduling method according to claim 1, characterized in that, The specific steps for training the spatiotemporal graph neural network model are as follows: Historical multi-source data from multiple consecutive time slices within the scheduling area are acquired and spatiotemporal fusion is performed to obtain a spatiotemporal feature map sequence containing spatiotemporal feature maps from multiple consecutive time slices. Using any time slice in the spatiotemporal feature map sequence as the endpoint, obtain multiple spatiotemporal feature map subsequences with a preset length from the spatiotemporal feature map sequence; Obtain the actual types of interference events that occur on each geographic unit within a scheduling cycle after any time slice and the actual task delays they cause. Construct a sample set containing multiple training samples. Each training sample is a triple consisting of a spatiotemporal feature map subsequence, the corresponding interference event type, and the actual task delays it causes. A joint loss function is constructed, and a spatiotemporal graph neural network model is trained using a sample set to obtain a spatiotemporal graph neural network model that meets the preset evaluation criteria.
7. The intelligent agricultural equipment cluster scheduling method according to claim 6, characterized in that, The joint loss function is a weighted sum of event classification loss, delayed regression loss, and graph topology regularization term; The event classification loss is based on the event probability distribution predicted by the model for each geographic unit and the actual event category, and relatively higher training weights are assigned to samples with lower predicted probabilities. The delay regression loss is calculated only for each geographic unit where a real interference event occurred, measuring the error between the model's predicted expected task delay and the actual statistically derived task delay. The graph topology regularization term is used to encourage the model to learn feature representations that are close to each other in the feature space for interconnected or neighboring geographic units during training, based on the predefined adjacency relationships between geographic units.
8. The intelligent agricultural equipment cluster scheduling method according to claim 7, characterized in that, The process of training the spatiotemporal graph neural network model with the sample set is divided into two stages. In the first stage, the loss function is a weighted sum of event classification loss and delayed regression loss. In the second stage, the loss function is a joint loss function, and simulated noise is injected into the sample data of the sample set.
9. The intelligent agricultural equipment cluster scheduling method according to claim 1, characterized in that, The specific process of constructing the comprehensive objective function and scheduling scheme optimization model includes: S31. For any scheduling scheme X, define its random loss function under the influence of random disturbance events. ; S32, Given a confidence level And calculate the conditional value of risk of the random loss function; S33. Based on the conditional risk value of the random loss function, construct a comprehensive objective function, wherein the comprehensive objective function is the weighted sum of the conditional risk value of the random loss function and the expected total scheduling cost; S34. Establish a scheduling scheme optimization model with the goal of minimizing the value of the comprehensive objective function.
10. A system for implementing the intelligent agricultural equipment cluster scheduling method according to any one of claims 1-9, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, which, when executed by the processor, implements the intelligent agricultural equipment cluster scheduling method as described in any one of claims 1-9.