A space task allocation method based on a heuristic clustering algorithm
By clustering and adjusting high-frequency tasks using a heuristic clustering algorithm, and combining this with the allocation of low-frequency tasks, the problems of path extension and load imbalance in traditional methods are solved, achieving efficient and balanced spatial task allocation and saving costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional spatial task allocation methods cannot effectively combine real-time traffic conditions, resulting in extended paths and unbalanced loads, failing to meet the timeliness and balanced allocation requirements of high-frequency and low-frequency tasks.
A heuristic clustering algorithm is used to cluster high-frequency tasks, calculate the average allocation threshold range, and adjust clusters that do not meet the threshold. Combined with the allocation of low-frequency tasks, load balancing is achieved by adjusting the adjacent rectangle boundaries of clusters and the nearest cluster.
It achieves balanced spatial task allocation without specifying fine-grained routes, maximizing cost savings and improving efficiency and load balancing.
Smart Images

Figure CN116307309B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the cross field of artificial intelligence and spatio-temporal data processing, and particularly relates to a spatial task allocation method based on a heuristic clustering algorithm. BACKGROUND
[0002] The spatial task allocation problem refers to allocating different specified goods and quantities to different destinations within a period of time under the premise of meeting the timeliness constraints of different destinations. This problem has many application scenarios in real life, such as logistics, food delivery, and personnel scheduling. According to the timeliness constraints, the delivery tasks can be divided into high-frequency and low-frequency, which brings new challenges to traditional spatial task allocation.
[0003] The traditional spatial task allocation problem mainly aims at the optimal path planning problem, and does not consider the timeliness constraints. Such a method has the following two defects in practical application: 1. The optimal path planned in advance cannot be combined with real-time traffic conditions, which may cause the planned path to be extended due to road construction, traffic accidents, parking convenience and other factors. 2. Load imbalance. If the high-frequency and low-frequency tasks are planned separately, the optimal path will cause an imbalance in delivery load, resulting in waste of cost and dissatisfaction of drivers.
[0004] In summary, for the spatial task allocation problem with high-frequency and low-frequency allocation requirements, a more reasonable solution is to divide the allocation amount according to the task priority and available time, and then let experienced allocation drivers decide the actual driving route. A key problem of this solution is how to design a load balancing allocation scheme for spatial task allocation, that is, to ensure that the allocation amount of each time period is as evenly distributed as possible and meets the spatial proximity of the destination under the premise of meeting the allocation frequency requirements of different customers. SUMMARY
[0005] The purpose of the present application is to provide a spatial task allocation method based on a heuristic clustering algorithm to solve the above problems, and the specific technical solutions are as follows:
[0006] A spatial task allocation method based on a heuristic clustering algorithm, comprising the following steps:
[0007] 1) Clustering high-frequency spatial tasks in the spatial task data to obtain m clusters.
[0008] 2) Calculate the average allocation amount threshold range.
[0009] 3) Adjust the clusters that do not meet the threshold according to the average allocation amount threshold range obtained in step 2) and in combination with the m clusters obtained in step 1).
[0010] 4) Assign low frequency spatial tasks.
[0011] Further, the high frequency spatial task and the low frequency spatial task are relative concepts. The high frequency spatial task and the low frequency spatial task represent that according to the time constraint of each destination, the spatial task needs to be distributed to one destination once or multiple times, and how many times the spatial task is distributed to one destination belongs to the high frequency spatial task or the low frequency spatial task needs to be artificially divided according to the actual situation.
[0012] Further, in the step 1), m is a variable value, and the size thereof can be adjusted according to the actual situation.
[0013] Further, in the step 2), the average distribution threshold is a range, and the size of the range can be adjusted according to δ, and the calculation method thereof is:
[0014]
[0015] Further, in the step 3), the cluster that does not meet the threshold is adjusted:
[0016] 3.1) Calculate the boundary minimum cluster A. The minimum adjacent rectangle is constructed according to the cluster center of each cluster, and then the distribution amount of the cluster located on the edge of the minimum adjacent rectangle is calculated, and the cluster with the minimum distribution amount is the boundary minimum cluster.
[0017] 3.2) Find the cluster B closest to the boundary minimum cluster A.
[0018] 3.3) Add the spatial task closest to A in the cluster B to A in turn until A meets the distribution threshold.
[0019] 3.4) After cluster A meets the requirement, the result is fixed and cannot be moved by other clusters.
[0020] 3.5) If all the spatial tasks of the cluster B are assigned to A, and A still cannot meet the distribution threshold, repeat step 3.2).
[0021] 3.6) If the situation of step 3.5) occurs, when cluster A meets the requirement, the number of remaining clusters is reduced, and the remaining high frequency spatial task distribution needs to be re-clustered so that the total number of clusters is m.
[0022] 3.7) Repeat step 3.1) until all clusters meet the average distribution threshold.
[0023] Further, in the step 4), the low frequency spatial task is assigned:
[0024] 4.1) The low frequency spatial task is clustered into n (n is a variable value, and the size thereof can be adjusted according to the actual situation) small clusters, and then distributed to the nearest high frequency cluster.
[0025] 4.2) For low-frequency space tasks assigned to the same high-frequency cluster, according to the high-low frequency difference, re-cluster into j (j is a variable value, which can be adjusted according to actual situation) clusters, each cluster corresponds to a single distribution process of high-frequency tasks.
[0026] The beneficial effects of the present application are as follows:
[0027] The space task allocation method based on the heuristic clustering algorithm of the present application does not calculate the shortest path from the starting point to all destinations like the traditional method, but does not need to specify the fine-grained allocation route, only needs the coarse-grained space allocation task list, and at the same time, the actual route is affected by road conditions, road construction, parking convenience and other aspects, which is left to the driver to judge. That is, through the heuristic clustering algorithm, the space task allocation is as balanced as possible, and the cost is saved to the maximum and the efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 The space task allocation method based on the heuristic clustering algorithm of the present application is a step schematic diagram.
[0029] Figure 2 The original space allocation task distribution schematic diagram.
[0030] Figure 3 The high-frequency cluster space division schematic diagram.
[0031] Figure 4 The calculation boundary minimum cluster method schematic diagram.
[0032] Figure 5 The boundary minimum cluster and its nearest cluster schematic diagram.
[0033] Figure 6 The special case schematic diagram after adjusting the boundary minimum cluster still not meeting the average allocation threshold.
[0034] Figure 7 The high-frequency cluster all meets the average allocation threshold schematic diagram.
[0035] Figure 8 The final result schematic diagram. DETAILED DESCRIPTION
[0036] The present application will be described in detail below according to the drawings and preferred embodiments, and the purposes and effects of the present application will become more apparent. The present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0037] As Figure 1As shown, a space task allocation method based on a heuristic clustering algorithm, the method comprising the following steps:
[0038] Step one, high-frequency space allocation task space division. As shown, Figure 2 The points on the graph are space tasks to be allocated, where the circular points are high-frequency space tasks and the pentagonal points are low-frequency space tasks. A clustering algorithm (in this case, a k-means clustering algorithm) is used to cluster the high-frequency space tasks into m clusters, where m is a variable value that can be adjusted according to actual conditions. In this example, m is 5. The k-means algorithm can ensure that points that are close together are clustered together. The result is shown in Figure 3 , where the square cluster, the circular cluster, the triangular cluster, the pentagram cluster, and the diamond cluster are well-clustered high-frequency space task clusters.
[0039] Step two, calculate the average allocation threshold range. The average allocation threshold range is a range, and the range size can be adjusted according to δ. The calculation method is:
[0040]
[0041] Step three, adjust the clusters that do not meet the threshold. First, calculate the minimum boundary cluster, as shown in Figure 4 . First, the cluster centers of the five clusters are used to construct the minimum adjacent rectangle, and then the allocation of the clusters on the edges of the minimum adjacent rectangle is calculated, as shown in Figure 3 . The square cluster, the pentagram cluster, and the diamond cluster in Figure 5 are the clusters whose allocation needs to be calculated, and then the cluster with the smallest allocation is selected as the minimum boundary cluster. In this example, it is assumed that the square cluster is the minimum boundary cluster. As shown in Figure 6 , the calculated minimum boundary cluster is the square cluster. The circular cluster is the cluster closest to the minimum boundary cluster, so the points in the circular cluster closest to the square cluster are added to the square cluster in turn until the square cluster meets the allocation threshold. If the square cluster meets the allocation threshold, the result is fixed and cannot be "moved" by other clusters. If all the points in the circular cluster have been allocated to the square cluster, but the square cluster still cannot meet the allocation threshold, as shown in Figure 7 , then the cluster closest to the square cluster needs to be found from the remaining pentagram cluster, triangular cluster, and diamond cluster, and the above steps are repeated until the square cluster meets the requirements and the remaining points are re-clustered to make the total number of clusters m. Then the minimum boundary cluster needs to be recalculated, and the above steps are repeated until all clusters meet the average allocation threshold. As shown in , all high-frequency clusters have met the average allocation threshold.
[0042] Step four, allocate low-frequency space tasks. When all high-frequency clusters meet the allocation threshold, low-frequency space tasks need to be allocated, as shown in Figure 7The pentagons represent low frequency spatial tasks. First, the low frequency spatial tasks are clustered into n clusters, and the pentagons represent the clusters of low frequency spatial tasks. Then, the low frequency spatial tasks are assigned to the nearest high frequency cluster. For the low frequency spatial tasks assigned to the same high frequency cluster, they are clustered into j clusters, and each cluster corresponds to a single delivery of the high frequency task. The final result is shown in FIG. 6. Figure 8 The clusters surrounded by the boxes represent the clusters of low frequency spatial tasks. Each box represents a single delivery of the high frequency task.
[0043] Those skilled in the art can make modifications to the technical solutions described in the foregoing examples, or make equivalent replacements to some of the technical features. Any modifications, equivalent replacements, etc. made within the spirit and principles of the application shall be included in the protection scope of the application.
Claims
1. A spatial task allocation method based on a heuristic clustering algorithm, characterized in that, Includes the following steps: 1) Cluster the high-frequency space tasks in the space mission data to obtain m clusters; 2) Calculate the threshold range for the average allocation; 3) Adjust the clusters that do not meet the threshold based on the average allocation threshold range obtained in step 2) and the m clusters obtained in step 1); Adjustments are made to clusters that do not meet the threshold: 3.1) Calculate the boundary minimum cluster A. Construct the minimum adjacency rectangle based on the cluster center of each cluster. Then calculate the allocation of the clusters located on the edge of the minimum adjacency rectangle. The cluster with the smallest allocation is the boundary minimum cluster. 3.2) Find the cluster B that is closest to the boundary minimum cluster A; 3.3) Add the spatial tasks in cluster B that are closest to A to A in sequence until A meets the allocation threshold; 3.4) Once cluster A meets the requirements, the result remains unchanged; 3.5) If all spatial tasks of cluster B are assigned to A, and A still cannot meet the allocation threshold, then repeat step 3.2). 3.6) If the situation in step 3.5) occurs, after cluster A meets the requirements, since the number of remaining clusters decreases, it is necessary to re-cluster the remaining high-frequency spatial tasks so that the total number of clusters is m. 3.7) Repeat step 3.1) until all clusters meet the average allocation threshold; 4) Allocate low-frequency spatial tasks: 4.1) Group low-frequency spatial tasks into n small clusters, and then assign them to the nearest high-frequency cluster; 4.2) For low-frequency spatial tasks assigned to the same high-frequency cluster, they are further clustered into j clusters based on the difference between high and low frequencies. Each cluster corresponds to a single delivery process of a high-frequency task.
2. The spatial task allocation method based on heuristic clustering algorithm according to claim 1, characterized in that, In step 1), m is a variable value.
3. The spatial task allocation method based on heuristic clustering algorithm according to claim 1, characterized in that, In step 2), the average distribution threshold range is adjusted according to δ, and its calculation method is as follows: 。
Citation Information
Patent Citations
Task path planning method and device
CN109978213A
Multi-unmanned aerial vehicle task allocation method based on improved clustering extension consistency beam algorithm
CN112633654A