An Improved CBBA Unmanned Surface Vessel Task Assignment Method Based on MOAWC-Kmeans Clustering

By using MOAWC-Kmeans clustering and an improved CBBA method, the computational complexity and time window constraints in unmanned surface vessel (USV) swarm task allocation are solved, achieving efficient and reliable task allocation and path optimization, improving task completion rate and load balancing, and making it suitable for scenarios such as maritime search and rescue and patrol monitoring.

CN122366898APending Publication Date: 2026-07-10SHANGHAI JIAOTONG UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202610254039.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing unmanned surface vessel (USV) swarm task allocation methods suffer from high computational complexity, poor clustering adaptability, inadequate handling of time window constraints, insufficient path optimization, and lack of handling of unassigned tasks. In particular, they are difficult to achieve efficient and reasonable task allocation in dynamic, strongly constrained, and multi-objective scenarios.

Method used

An improved CBBA method based on MOAWC-Kmeans clustering is adopted, which achieves efficient and reliable task allocation through intelligent pre-clustering, hard time window constraints, multi-level path optimization and unassigned task post-processing mechanism, combined with a distributed architecture.

Benefits of technology

It significantly improves computational efficiency, enhances the adaptability of clustering algorithms, ensures task timeliness, optimizes path costs, and improves task completion rate and load balancing, making it suitable for collaborative operations of unmanned vessel swarms in complex marine environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122366898A_ABST
    Figure CN122366898A_ABST
Patent Text Reader

Abstract

This invention relates to an improved CBBA (Continuous Computational Bayes Analysis) task allocation method for unmanned surface vessels (USVs) based on MOAWC-Kmeans clustering, belonging to the field of unmanned autonomous collaborative control technology. The method first uses the MOAWC-Kmeans algorithm to intelligently pre-cluster tasks, employing adaptive weight calculation, intelligent initialization, constraint-optimized allocation, and a boundary task secondary optimization mechanism to achieve task grouping. Second, distributed task allocation is performed based on the improved CBBA algorithm, with each USV prioritizing bidding for tasks within its pre-clustered cluster. This method introduces a hard time window constraint mechanism, dynamically pruning to remove non-compliant tasks. During path construction, a two-layer strategy combining greedy construction and local search is used to optimize the path structure in real time. After negotiation convergence, unassigned tasks are greedily inserted according to the time window urgency index, and the Or-opt path reconstruction mechanism is used for deep path reconstruction. Finally, load balancing adjustments further optimize cluster efficiency. Compared with existing technologies, this invention significantly improves the task completion rate, path efficiency, and load balancing of heterogeneous USV clusters, making it suitable for complex application scenarios such as maritime search and rescue and patrol monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned autonomous cooperative control technology, and in particular to an improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering. Background Technology

[0002] With the rapid development of unmanned surface vessel (USV) technology, heterogeneous USV swarms are being used more and more widely in fields such as maritime search and rescue, patrol and monitoring, and cargo transportation. In practical applications, how to efficiently and rationally allocate a large number of tasks to USVs with different capabilities, so as to maximize the task completion rate and minimize the total travel distance and task execution time while meeting time window constraints, is a highly challenging NP-hard combinatorial optimization problem.

[0003] Traditional task allocation methods mainly include centralized and distributed approaches. Centralized methods, such as metaheuristic algorithms like Genetic Algorithms (GA) and Particle Swarm Optimization (PSO), require a central controller to collect global information and calculate the optimal solution, resulting in heavy communication burden, poor real-time performance, and a high risk of single points of failure. Distributed methods, such as the Consensus-Based Bundle Algorithm (CBBA), reach consensus through autonomous decision-making and communication negotiation among agents, offering advantages such as strong scalability and robustness.

[0004] However, existing CBBA algorithms have the following shortcomings: (1) Lack of intelligent pre-assignment mechanism: Traditional CBBA algorithm requires each agent to bid for all tasks. When the task size is large, the search space is huge, resulting in high computational complexity and slow convergence speed. Existing methods fail to make full use of the multimodal features of tasks (geographical location, time window, type, etc.) for intelligent pre-clustering, and cannot effectively reduce the search space.

[0005] (2) Poor adaptability of clustering algorithms: Some improved methods use traditional K-means clustering for task pre-assignment, but K-means has the following limitations: Traditional K-means usually uses Euclidean distance as a metric, which makes it difficult to integrate multi-dimensional heterogeneous features such as task priority and deadline, resulting in a disconnect between the generated pre-assignment scheme and the subsequent cost evaluation logic of CBBA. This leads to unreasonable clustering results that cannot adapt to the differences in capabilities and the diversity of tasks of heterogeneous unmanned vessels.

[0006] (3) Improper handling of time window constraints: Existing methods mostly use soft constraints to handle time windows, reducing the priority of tasks that violate the time window through penalty functions. Under strong constraints, soft constraint methods often sacrifice the time window for algorithm convergence, and the generated solution may be physically unexecutable. In scenarios with strict time requirements, such as maritime search and rescue, soft constraint methods may cause delays in critical tasks, resulting in serious consequences.

[0007] (4) Insufficient path optimization: The traditional CBBA algorithm forms the execution path according to the order in which tasks are added, without considering path optimization, resulting in a long total travel distance. Although some methods introduce path optimization, the optimization strategies are simple and fail to be closely integrated with time window constraints, resulting in limited optimization effects.

[0008] (5) Lack of handling of unassigned tasks: After the CBBA algorithm converges, some tasks may not be assigned due to time window conflicts or capability mismatch. Existing methods lack a post-processing mechanism for unassigned tasks, resulting in a low task completion rate.

[0009] There are already some research results on task allocation in multi-agent systems. For example, consensus binding algorithms, as a distributed task allocation algorithm, are widely used in task scheduling of multi-agent systems such as UAVs and unmanned surface vessels. However, basic CBBA algorithms are usually oriented towards a single optimization objective, mainly focusing on minimizing task execution time or path cost, and assuming a fixed number of tasks and participants. They have limited adaptability to complex scenarios such as task overload, multi-objective optimization requirements, and heterogeneous platform collaboration.

[0010] To address the conflict problem in UAV task allocation, Chinese patent CN116149370A improves the CBBA algorithm through clustering, allowing UAVs to prioritize tasks that are closer together to form task packages, thus improving efficiency. However, this method's clustering strategy is mainly based on spatial distance and does not comprehensively consider multi-dimensional factors such as task priority, time constraints, and execution capabilities. Chinese patent CN116993073A introduces constraints such as time windows into the CBBA framework, improving the algorithm's ability to handle task timing requirements. However, this method still adopts a single optimization objective and does not establish a task redistribution mechanism under dynamic environments. Chinese patent CN116911535A constructs a cost function by introducing distance reward / penalty factors and time window constraint indicator variables, which improves its adaptability to time window constraint scenarios to some extent. However, its task allocation strategy lacks a multi-objective optimization framework, and its dynamic redistribution mechanism is imperfect, resulting in insufficient ability to cope with unexpected situations such as UAV malfunctions, communication interruptions, and new tasks.

[0011] To address the multi-task coordination problem of swarm aircraft, Chinese patent CN114610058B proposes a distributed task allocation method based on an improved CBBA algorithm. This method innovatively introduces a task temporal hierarchical mechanism, processing sequentially related tasks (such as a reconnaissance-strike-evaluation task chain) according to temporal priority. By constructing dynamic soft time window constraints and a deadlock detection and correction mechanism, it effectively solves the problem of sequential execution and collaborative scheduling of temporally coupled multi-tasks. This method performs well in handling task scenarios with complex temporal dependencies, ensuring the logical correctness of task execution and avoiding deadlocks. However, this method still uses minimizing the average execution time as the single optimization objective, failing to consider how to maximize the number of tasks completed when the number of tasks far exceeds the execution capacity. Furthermore, it primarily targets one-time allocation scenarios with a fixed task set, lacking real-time response and task reassignment mechanisms for dynamic events during execution (such as platform failures and task changes).

[0012] To address the multi-objective optimization needs in AGV task allocation, Chinese patent CN118171579A proposes a distributed task allocation method based on multi-objective optimization. This method overcomes the limitations of traditional single-objective optimization by innovatively constructing a dual-objective optimization framework: optimizing average execution time using the MinEx algorithm, optimizing the number of tasks completed using the MaxNum algorithm, and comprehensively solving the problem using the MuEv multi-objective evolutionary algorithm. This method is particularly suitable for extreme scenarios with task overload (the number of tasks is much greater than the number of AGVs), optimizing execution efficiency while maintaining a high task completion rate, and improving the algorithm's adaptability by introducing a potential replacement stage and fuzzy control mechanisms. However, this method mainly targets static scenarios in warehousing and logistics where tasks are released all at once, assuming a relatively stable environment and no temporal dependencies between tasks. It lacks corresponding mechanisms to support applications that need to handle dynamic task environments, complex temporal constraints, and unexpected events during execution.

[0013] Furthermore, some studies have attempted to apply metaheuristic algorithms to unmanned surface vessel (USV) mission optimization. Related patents propose a method for allocating patrol missions for USV swarms based on an improved genetic algorithm. This method selects the best solution through multiple solutions and a voting mechanism, and dynamically adjusts the mission route based on the navigation costs of surrounding USVs. However, this method primarily targets single-type patrol mission scenarios and lacks adaptability to complex scenarios such as multi-type heterogeneous missions and platform failures, making it difficult to meet the collaborative operation needs of heterogeneous USV swarms in dynamic and changing marine environments. Chinese patent CN119831218A uses a nearest-neighbor clustering algorithm based on a greedy strategy for task grouping, combined with a clustering consensus consistency packet algorithm to consider kinematic and task coupling constraints. However, this method suffers from insufficient redistribution efficiency and flexibility in dynamic mission environments, and its platform failure handling mechanism is inadequate, affecting the continuity and reliability of mission execution. Chinese patent CN121189684A discloses a method for dynamic optimization of heterogeneous unmanned surface vessel (USV) tasks based on intelligent distributed CBBA. It adopts an improved consensus binding algorithm combined with intelligent optimization strategy. Through steps such as initializing data and parameters, pre-allocating tasks, adjusting time windows, resolving conflicts, optimizing using genetic algorithms, and redistributing tasks, it achieves efficient allocation and dynamic optimization of tasks for heterogeneous USV clusters, and monitors and redistributes tasks in real time for unexpected events. However, this method uses the HDBSCAN adaptive density clustering algorithm, which mainly generates clusters based on the spatial density of tasks. It cannot manually control the size of the clusters. In scenarios with uneven task distribution, it is easy for some high-density clusters to contain a large number of tasks, causing the unmanned ships assigned to these clusters to be severely overloaded, while other unmanned ships have too few tasks, failing to guarantee the load balance of the cluster from the source. Furthermore, the core optimization method of this scheme is to wrap the genetic algorithm (GA) on the outside of CBBA, which has a large computational cost and poor real-time performance. In terms of constraint handling, this scheme adopts the logic of "soft constraint" for time windows, that is, to reduce the priority of defaulting tasks by setting a very large penalty coefficient, or to try to reassign tasks after a default occurs through a simple greedy strategy. This approach cannot completely eliminate physically unexecutable schemes (i.e., unmanned ships accept tasks but cannot actually arrive).

[0014] In summary, existing technologies still suffer from limitations in handling the task allocation problem of highly dynamic, strongly constrained, multi-objective, and heterogeneous unmanned surface vessel (USV) swarms, including incomplete model characterization and difficulties in balancing algorithm optimization and constraint handling. Therefore, there is an urgent need to research a distributed task allocation method that integrates intelligent clustering, multi-objective optimization, and hard time window processing mechanisms to achieve intelligent distributed multi-objective optimization allocation of tasks for heterogeneous USV swarms, thus meeting the practical application needs in complex marine environments. Summary of the Invention

[0015] The purpose of this invention is to provide an improved CBBA unmanned surface vessel task allocation method based on multi-objective adaptive weighted constrained K-means (MOAWC-Kmeans) clustering, aiming to solve the problems of high computational complexity, poor clustering adaptability, improper handling of time window constraints, insufficient path optimization, and lack of handling of unassigned tasks in the existing technology.

[0016] The objective of this invention can be achieved through the following technical solutions: An improved CBBA unmanned surface vessel (USV) task assignment method based on MOAWC-Kmeans clustering includes the following steps: S1. Data initialization and preprocessing: Obtain the status data and mission environment data of each unmanned vessel in the heterogeneous unmanned vessel cluster; S2, MOAWC-Kmeans Intelligent Task Pre-clustering: Based on preprocessed data, a task feature matrix containing task geographic coordinates, time window features, and capability requirement ratios is constructed. The MOAWC-Kmeans clustering algorithm is used to intelligently group all tasks to be executed. An adaptive weight calculation mechanism is used to balance the spatiotemporal attribute weights. Through an intelligent initialization strategy centered on the unmanned vessel's position and a hard constraint allocation mechanism, a high-priority candidate task set is divided for each unmanned vessel. S3. Improved CBBA distributed bidding and task allocation: Each unmanned vessel acts as an intelligent agent, prioritizing the selection of tasks from the candidate task set within the pre-cluster to construct task packages. The bidding value is calculated using a comprehensive cost function that integrates task rewards, distance costs, time costs, and time window urgency rewards. Through a distributed communication and negotiation mechanism, the bundled construction and conflict consensus resolution process is iteratively executed until the ownership of all tasks is agreed upon, generating an initial allocation scheme that meets the timing and capability constraints. S4. Hard Time Window Constraint Check and Dynamic Pruning: During the task allocation process and after the initial allocation scheme is generated, a strict hard time window feasibility check is performed. The estimated arrival time of each task in the task package is calculated in real time. If the estimated arrival time of any task exceeds the upper limit of the corresponding time window, the dynamic pruning mechanism is immediately triggered to remove the task that violates the constraint and its subsequent affected tasks from the task package and release its allocation right to ensure the physical executability of the scheme. S5. Two-layer path optimization: After the initial allocation scheme is generated, a two-layer strategy combining greedy construction and local search is adopted to optimize the task execution sequence of each unmanned vessel. First, the greedy nearest neighbor algorithm is used to generate an initial feasible path that meets the time window. Then, a 2-Opt local search mechanism is embedded to traverse all non-adjacent node pairs in the path and attempt to eliminate path intersections through subsequence flipping operations. Under the premise of ensuring that the new path still meets the hard time window constraint, iterative flipping operations that reduce the total travel distance are accepted. S6. Greedy insertion of unassigned tasks based on urgency: Identify tasks that were not assigned in step S3, calculate the urgency index of the time window and sort them in descending order, traverse the sorted unassigned tasks, try to insert them into every feasible position in all unmanned vessel paths that can be executed, calculate the marginal cost increment brought by the insertion, and under the condition of satisfying the hard time window constraint, select the position with the smallest marginal cost increment to perform the insertion operation in order to maximize the task completion rate. S7. Or-opt path deep reconstruction: After the greedy insertion is completed, the Or-opt path reconstruction mechanism is introduced. It traverses the mission path of each unmanned vessel, attempts to temporarily remove individual mission nodes in the path and re-insert them into other feasible positions in the path, calculates the change in total travel distance before and after node relocation, and if the total route distance decreases after relocation and does not violate the hard time window constraint, then the relocation operation is performed to escape the local optimum. S8. Multi-ship load balancing adjustment: Calculate the task load of each unmanned vessel, identify high-load and low-load vessels, and, under the premise of meeting the capacity matching and time window constraints, perform task transfer operations to redistribute tasks at the end or end of the task sequence of high-load vessels to low-load vessels. S9. Output the optimal allocation scheme: After processing through steps S1 to S8, output the optimal task allocation scheme, which includes the final task sequence, detailed execution schedule, total travel distance, task completion rate and load balance index for each unmanned vessel, and trigger the next round of task reallocation based on dynamic environmental changes.

[0017] The unmanned vessel status data includes the unmanned vessel's current position coordinates, speed, maximum range, and maximum execution time.

[0018] The task environment data includes the task's geographical coordinates, time window start and end times, execution duration, task type, and priority.

[0019] The MOAWC-Kmeans intelligent task pre-clustering specifically includes the following steps: S21. Multimodal feature construction: Extract the geographical coordinates, start and end times of the time window, and the ratio of capability requirements of the task, construct the task feature matrix, and normalize each feature dimension to unify the numerical range to between zero and one. S22. Adaptive weight calculation: Calculate the original adaptive weight vector based on the standard deviation of each feature dimension, and adjust the weight distribution to ensure that the sum of the weights of the spatial coordinate features is not less than the specified proportion, and the sum of the weights of the other features does not exceed a certain proportion. Finally, normalize to obtain the adaptive weight vector. S23. Intelligent initialization: Divide the task space based on the location of the unmanned vessel, calculate the distance of each task to all unmanned vessels, initially assign the task to the partition corresponding to the nearest unmanned vessel, calculate the density of task points in each partition and select the task point with the highest density as the initial cluster center of the partition. If a partition is empty, randomly select an unselected task as the initial cluster center. S24. Weighted distance calculation: Using the adaptive weight vector calculated in step S22 as the weight coefficient, the weighted Euclidean distance is used to measure the distance between the task point and the cluster center. S25. Constraint-based optimization allocation: Set a constraint on the maximum number of tasks per cluster. This constraint value is the total number of tasks divided by the number of ships, multiplied by a preset value, and rounded up. Sort all tasks in descending order of task priority. For each task, calculate its weighted distance to the center of each cluster according to the method in step S24. Attempt to allocate the task to the cluster that is closest and not fully loaded. If all clusters are fully loaded, allocate the task to the cluster with the fewest current tasks. Introduce a load balancing optimization mechanism to calculate the average cluster size, identify overloaded and underloaded clusters, and reallocate the task farthest from the cluster center in the overloaded cluster. S26. Boundary Task Secondary Optimization: For each assigned task, calculate its weighted distance to the current cluster center and its weighted distance to the second nearest cluster center. Determine the boundary task based on the relative distance difference. If the task meets the boundary condition and the number of current tasks in the second nearest cluster is less than the number of tasks in the current cluster, then the task is reassigned to the second nearest cluster to optimize load balancing. S27. Iteratively update cluster centers: For each cluster, calculate the mean of all tasks in each feature dimension as the new cluster center, and calculate the Frobenius norm between the new and old cluster centers as the convergence index. If the norm is less than the preset threshold or the maximum number of iterations is reached, the algorithm converges; otherwise, return to step S24 to continue iterating.

[0020] The improved CBBA distributed bidding and task allocation specifically includes: The candidate task set for a ship is defined as the union of tasks within the pre-cluster and boundary tasks, where boundary tasks are tasks that are not in the current cluster but that the ship can execute and that are less than a preset multiple of the average distance. The process of iteratively executing the bundling and conflict resolution consensus process continues until the convergence condition is met. The bundled construction process is as follows: each unmanned vessel calculates the bidding value of the candidate task based on the comprehensive cost function. The comprehensive cost function is the task reward minus the weighted linear combination of distance cost and time cost, plus the time window urgency reward. The task reward is set according to priority, and the time window urgency reward is inversely proportional to the remaining available time of the task. The conflict consensus resolution process is as follows: each unmanned vessel shares bidding information through communication, updates task assignment according to conflict resolution rules, and if multiple unmanned vessels bid for the same task, the task is assigned to the highest bidder, and other bidders remove the task from the task package and reset their bid value to zero. The convergence condition is that the number of iterations is not less than a preset number, the winner of the task no longer changes, and the Frobenius norm of the bid change is less than a preset threshold.

[0021] The hard time window constraint check specifically involves: For each task in the task sequence, the arrival time is calculated as the completion time of the previous task plus the distance between tasks divided by the speed. If it is the first task, the arrival time is the distance from the ship's starting position to the task position divided by the speed. The hard time window constraint requires that the arrival time must not be greater than the upper limit of the task's time window. If this constraint is violated, the corresponding task will be removed from the task sequence and its bid value will be reset to negative infinity. Calculate the start execution time and the completion time. The start execution time is the larger value between the arrival time and the start time of the time window, and the completion time is the start execution time plus the task execution duration.

[0022] The specific steps of generating initial feasible paths that satisfy the time window using the greedy nearest neighbor algorithm include: Initialize the set of visited tasks to an empty set, and the current position is the starting position of the unmanned vessel; In the set of unvisited tasks, calculate the estimated arrival time of each task, determine whether it meets the hard time window constraint, and select the task that meets the hard time window constraint and is closest to the current position to add it to the set of visited tasks. Update the current position to the selected task position, calculate the task's start and finish times, and update the current time. Repeat the above steps until the set of unvisited tasks is empty or there are no feasible tasks that satisfy the hard time window constraint, and output the optimized task execution path.

[0023] The time window urgency index is defined as the reciprocal of the time window width plus one, where the time window width is the time difference between the completion time and the start execution time.

[0024] The calculation of the marginal cost increment is as follows: When inserting a task at the beginning of a path, the marginal cost increment is the distance from the ship's starting position to the task plus the distance from the task to the first task on the path, minus the distance from the ship's starting position to the first task on the path. When inserting a task in the middle of the path, the marginal cost increment is the distance from the previous task to the inserted task plus the distance from the inserted task to the next task, minus the distance from the previous task to the next task. When inserting a task at the end of a path, the marginal cost increment is the distance from the last task in the path to the inserted task.

[0025] The Or-opt path reconstruction mechanism optimizes paths by deleting two edges and reversing sub-paths. For length of n Find the path, traverse all possible edge pairs, and select the position. i and location j Two sides, of which i Less than j ; Perform a 2-Opt move operation: delete location i and location i Add one to form the edge and position j and location j Add one to form an edge, then reverse its position. i Add one to position j Sub-path segments between them form a new connection method; Calculate the difference between the total distance of the original path and the total distance of the reversed path to obtain the distance gain; If the distance gain is greater than zero and the new path satisfies the time window constraints of all tasks, then accept the corresponding 2-Opt movement operation; Repeat the process of trying all possible edge pair combinations until no improvement can be found.

[0026] Compared with the prior art, the present invention has the following beneficial effects: (1) Intelligent pre-clustering significantly improves efficiency This invention innovatively introduces the MOAWC-Kmeans clustering algorithm for intelligent pre-assignment of tasks. By integrating multimodal features such as geographical location, time window, and task type, it adaptively calculates feature weights (ensuring that spatial feature weights are not less than a certain proportion), adopts an intelligent initialization strategy based on the unmanned vessel's location, and introduces load constraints and boundary optimization mechanisms to reasonably group tasks according to task characteristics and unmanned vessel capabilities. After pre-clustering, each unmanned vessel only needs to bid within its own priority task cluster (typically containing 20% ​​to 30% of the tasks), significantly reducing the search space. The computational complexity is reduced from the number of vessels multiplied by the square of the number of tasks in traditional CBBA to the square of the number of tasks divided by the number of vessels, achieving a speedup of the square of the number of vessels. Simultaneously, pre-clustering prioritizes tasks with similar geographical locations and characteristics to be assigned to the same unmanned vessel, naturally reducing the travel distance between tasks.

[0027] (2) Clustering algorithms are highly adaptable Compared to traditional K-means clustering, the MOAWC-Kmeans algorithm offers significant advantages. Its adaptive weighting mechanism automatically adjusts the weights of each dimension based on the distribution of task features, while mandatory constraints ensure that geographical location dominates, avoiding clustering bias caused by fixed weights in traditional methods. The intelligent initialization strategy utilizes unmanned surface vessel (USV) location information, significantly reducing sensitivity to initial values ​​and resulting in more stable clustering quality. The introduction of a maximum number of tasks per cluster constraint and a load balancing mechanism effectively handles the capability differences of heterogeneous USVs, preventing some USVs from being overloaded while others remain idle. The boundary task secondary optimization mechanism re-evaluates and adjusts tasks at cluster boundaries. Boundary tasks are identified by a relative distance difference of less than 0.15, and redistribution is performed only when the number of tasks in the second nearest cluster is less and the distance increase does not exceed 10%, further improving the rationality of clustering.

[0028] (3) Hard time window constraints ensure task timeliness This invention employs a hard constraint mechanism to handle time window constraints. It rigorously checks the feasibility of time windows at each stage, including task allocation, path optimization, and insertion of unassigned tasks, immediately removing or rejecting tasks that violate the constraints. By precisely calculating the arrival time of tasks (considering travel time, waiting time, and execution time) and comparing it with the upper limit of the task's time window, it ensures that all assigned tasks can be completed within the specified time. Specifically, the arrival time is calculated as the completion time of the previous task plus the distance between tasks divided by the speed. The hard constraint condition is that the arrival time must not exceed the upper limit of the time window; tasks that violate this condition have their output value set to negative infinity. This hard constraint mechanism completely eliminates time window violations and is particularly suitable for applications with extremely high timeliness requirements, such as maritime search and rescue.

[0029] (4) The multi-level path optimization effect is significant. This invention employs a three-layer progressive path optimization strategy. In the CBBA stage, pre-clustering prioritizes geographically proximate tasks to be assigned to the same unmanned vessel, achieving initial path optimization. In the path optimization stage, a greedy nearest neighbor algorithm rearranges the task execution order, selecting the nearest unvisited task that satisfies the time window constraint while minimizing the travel distance. In the 2-Opt local search stage, the path is further optimized by deleting two edges and reversing sub-path segments. All possible edge pair combinations in the path are traversed; if edge reconnection reduces the total distance and the new path still satisfies the time window constraints of all tasks, the 2-Opt move operation is accepted, repeating until no improvement can be found. This multi-layered optimization strategy fully considers the spatiotemporal constraints of the tasks, achieving a good balance between path efficiency and task timeliness.

[0030] (5) Improve the completion rate by handling unassigned tasks. This invention innovatively introduces a post-processing mechanism for unassigned tasks. Unassigned tasks after CBBA convergence are sorted in descending order of time window urgency (the reciprocal of the time window width plus one), prioritizing urgent tasks with narrow time windows. A greedy insertion strategy is employed to find the insertion position for each unassigned task that minimizes the cost increment while satisfying the time window constraint. The cost increment calculation considers three cases: insertion at the beginning, middle, and end, calculating the corresponding distance changes for each. By traversing all vessels with matching capabilities and all possible insertion positions, the vessel and insertion position that minimizes the cost increment and satisfies the time window constraint are selected for insertion. This mechanism effectively utilizes the remaining capacity of unmanned vessels, improving task completion rate without significantly increasing the total cost.

[0031] (6) The distributed architecture is highly robust This invention employs a distributed architecture based on an improved CBBA algorithm. Each unmanned surface vessel (USV) acts as an autonomous agent, making decisions and reaching consensus through communication negotiation, eliminating the need for a central controller. This architecture offers the following advantages: High scalability, easily extending to large-scale USV swarms with computational load distributed across individual agents. Good robustness, ensuring that even if one USV malfunctions, the remaining USVs can still function normally and redistribute tasks, preventing system failure. High communication efficiency, requiring only broadcasting bid information and task winner information, resulting in minimal communication overhead. Convergence is achieved when at least ten iterations are performed, the task winner remains unchanged, and the bid change is less than one in a million. Good real-time performance, with fast convergence and rapid response to task changes. Compared to centralized algorithms, the distributed architecture is more suitable for dynamic and complex maritime operating environments.

[0032] In summary, the improved CBBA unmanned surface vessel (USV) task allocation method based on MOAWC-Kmeans clustering provided by this invention significantly improves the collaborative working capability of USV swarms in complex task environments. This enables heterogeneous USV swarms to achieve intelligent, efficient, and reliable allocation and execution of multiple tasks while ensuring task timeliness and success rate. It is particularly suitable for practical application scenarios such as maritime search and rescue, patrol monitoring, and material transportation. Attached Figure Description

[0033] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram illustrating the specific implementation process of the method of the present invention; Figure 3 Here is a flowchart of the MOAWC-Kmeans clustering algorithm; Figure 4 To improve the CBBA algorithm flowchart. Detailed Implementation

[0034] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0035] This embodiment provides an improved CBBA unmanned surface vessel (USV) task allocation method based on MOAWC-Kmeans clustering, such as... Figure 1 and Figure 2 As shown, it includes the following steps: S1. Data initialization and preprocessing: Obtain the status data and mission environment data of each unmanned vessel in the heterogeneous unmanned vessel cluster.

[0036] In this embodiment, the unmanned surface vessel (USV) status data includes the USV's status data. i Current position coordinates sailing speed v i Maximum range R i and maximum execution time T max,i Task environment data includes the task. j Geographic coordinates Start and end times of the time window Execution time d j Task Type type j and priority p j .

[0037] Preprocessing includes: filling in missing data, removing outlier data, cleaning up duplicate data, and standardizing or normalizing the unmanned vessel status data and environmental data.

[0038] Subsequently, the distance matrix between tasks is calculated. ,in n t The total number of tasks i With the task j The formula for calculating the Euclidean distance between them is: ; Calculate the ship-to-mission distance matrix ,in n s For the number of ships, unmanned ships k To the mission j The distance calculation formula is: ; This matrix will be used for intelligent initialization in step S2 and for calculating the bidding cost in step S3.

[0039] Construct a capability matching matrix Capability matching is determined based on vessel type and mission type. Specifically, based on unmanned vessels... k Load type and mission j Task types type j Perform a matching process. If the unmanned vessel k possesses the payload type required to perform mission j, then... ,otherwise 0. This matrix is ​​used to eliminate invalid assignments that do not meet the capability constraints in subsequent steps.

[0040] S2, MOAWC-Kmeans Intelligent Task Pre-clustering: Based on preprocessed data, a task feature matrix is ​​constructed that includes task geographic coordinates, time window features, and capability requirement ratios. The MOAWC-Kmeans clustering algorithm is used to intelligently group all tasks to be executed. An adaptive weight calculation mechanism is used to balance the spatiotemporal attribute weights. Through an intelligent initialization strategy centered on the unmanned vessel's position and a hard constraint allocation mechanism, a high-priority candidate task set is divided for each unmanned vessel.

[0041] like Figure 3 As shown, the MOAWC-Kmeans intelligent task pre-clustering specifically includes the following steps: S21. Multimodal Feature Construction: Extract the geographical coordinates of the task, the start and end times of the time window, and the ratio of capability requirements to construct the task feature matrix. : ; in,( x,y () represents the geographical coordinates of the task. tw start , tw end The start and end times of the time window. cap This refers to the capability matching ratio (the proportion of ships capable of performing the task out of the total number of ships). n t This represents the total number of tasks. Its [number]th ... j element cap j The capability matching matrix C constructed in step S1 is used to calculate the capability matching matrix C. The calculation formula is as follows: ; Normalize each column of the task feature matrix to unify the numerical range to between zero and one. The normalization formula is as follows: ; in, For the normalized task feature matrix, the first... i Line numberj Column elements, For the task feature matrix, the first i Line number j The elements of the column.

[0042] S22. Adaptive weight calculation: Calculate the original adaptive weight vector based on the standard deviation of each feature dimension, and adjust the weight distribution to ensure that the sum of the weights of the spatial coordinate features is not less than the specified proportion, and the sum of the weights of the remaining features does not exceed a certain proportion. Finally, normalize to obtain the adaptive weight vector.

[0043] The formula for calculating standard deviation is: ; in n t For the total number of tasks, For the first j The mean of each feature dimension: ; Calculate the original adaptive weights : ; Then, the weight distribution is adjusted to ensure that the sum of the weights of the spatial coordinate features is not less than a certain proportion A (generally set to 50%, prioritizing spatial distance constraints). The proportion is dynamically adjusted by calculating the scaling factor to ensure that the final weight vector satisfies the following conditions. .

[0044] S23. Intelligent Initialization: Based on the unmanned vessel's position, the task space is divided, and the vessel-to-task distance matrix D from step S1 is directly called. st Calculate the distance from each task to all unmanned vessels, and initially assign the tasks to the partition corresponding to the nearest unmanned vessel: ; in, This represents the total number of vessels in the unmanned vessel swarm. For the first i The geographical coordinates of the tasks to be executed. For the unmanned vessel's index number, The task distance matrix D st The Euclidean distance calculation function in [the context of the original text] For distance mission t i The latest unmanned vessel number.

[0045] Calculate the density of task points within each partition: For each partition k Tasks in i Call the inter-task distance matrix D from step S1. ttIts density is defined as the reciprocal of the average distance to other tasks within that partition: ; Among them, |Partition k | indicates a partition k The total number of tasks in the process.

[0046] Select the task point with the highest density within each partition as the initial cluster center for that partition: ; in, This is the density value of the task points (the larger the value, the denser the area around the task point). For the first k The initial cluster center of each partition (i.e., the task point with the highest density in that partition).

[0047] If a partition is empty, a randomly selected unselected task is chosen as the initial cluster center.

[0048] S24. Weighted Distance Calculation: Using the adaptive weight vector calculated in step S22 as the weight coefficients, the weighted Euclidean distance is used to measure the distance between the task point and the cluster center. The calculation formula is as follows: ; in For the first i Normalized feature vectors for each task, For the first k The center vector of each cluster w j For adaptive weights.

[0049] S25. Constraint-based Optimization Allocation: Set a constraint on the maximum number of tasks per cluster. This constraint value is the total number of tasks divided by the number of ships, multiplied by 1.5, and rounded up. Sort all tasks in descending order of priority. For each task, calculate its weighted distance to the center of each cluster using the method in step S24. It attempts to assign tasks to the nearest cluster that is not full. If all clusters are full, it assigns tasks to the cluster with the fewest current tasks.

[0050] Then, a load balancing optimization mechanism is introduced to calculate the average cluster size. : ; Identify overloaded clusters and underloaded clusters : ; ; Among them | Ck | represents a cluster k The current number of tasks.

[0051] The tasks furthest from the cluster center in the overloaded cluster are reallocated: For overloaded clusters k o Find the task that is furthest away: ; in C ko Indicates overloaded clusters k o The collection of all tasks contained therein c ko Indicates overloaded clusters k o The cluster center vector (i.e., the center coordinate point of the cluster in the multimodal feature space). x i Indicates task i The eigenvectors of the formula. The physical meaning of this formula is: under overload... C ko Of all the tasks, find the distance from the cluster center. c ko The task with the longest weighted distance i This is so that it can be stripped and redistributed later.

[0052] For underloaded clusters k u If the conditions are met Then the task i ∗ Reassigned to cluster k u .

[0053] S26. Boundary Task Secondary Optimization: For each assigned task, calculate its weighted distance to the current cluster center and its weighted distance to the second nearest cluster center. Determine the boundary task based on the relative distance difference. The boundary threshold is set to 0.15. If the task meets the boundary condition and the number of current tasks in the second nearest cluster is less than the number of tasks in the current cluster, then the task is reassigned to the second nearest cluster to optimize load balancing.

[0054] Iterate through all assigned tasks, and for each task... i Calculate the distance from each node to its current cluster center. d cur and the distance to the second nearest cluster center d sec Then, boundary determination and transition are performed if the task simultaneously meets the following two conditions: 1. Boundary conditions: relative distance difference (That is, the distance between the task and the two cluster centers is less than 15%). 2. Load optimization condition: If the number of current tasks in the second nearest cluster is less than the number of tasks in the current cluster, then the task will be... i Reassignment to the second nearest cluster optimizes load balancing without significantly increasing path costs.

[0055] S27. Iteratively update cluster centers: For each cluster, calculate the mean of all tasks within the cluster across each feature dimension and use it as the new cluster center. : ; Calculate the Frobenius norm between the old and new cluster centers. As a convergence metric: ; in, This is the cluster center matrix after this iteration update. This is the cluster center matrix from the previous iteration.

[0056] The convergence condition is: ; Where ϵ=0.0001 and max_iter=200. That is, if the norm is less than 0.0001 or the maximum number of iterations of 200 is reached, the algorithm converges; otherwise, it returns to step S24 to continue iterating.

[0057] S3. Improved CBBA Distributed Bidding and Task Allocation: Each unmanned vessel acts as an intelligent agent, prioritizing the selection of tasks from the candidate task set within the pre-cluster to construct task packages. It calculates the bidding value using a comprehensive cost function (bidding function) that integrates task rewards, distance costs, time costs, and time window urgency rewards. Through a distributed communication and negotiation mechanism, it iteratively executes the bundled construction and conflict consensus resolution process until all task ownership is agreed upon, generating an initial allocation scheme that satisfies timing and capability constraints.

[0058] like Figure 4 As shown, the improved CBBA performs the following steps: S31. Definition of candidate task set.

[0059] Based on the MOAWC-Kmeans clustering results, the candidate task set for ships is defined as the union of tasks within the pre-cluster and boundary tasks: ; in Pi For the priority task set (all tasks in the pre-cluster Ci). Bi The boundary task set is defined as one that is not in the current cluster and satisfies the capability matching constraint (i.e., calls matrix C such that C...). ij=1), but the ship is capable of performing tasks at distances less than 1.2 times the average distance: ; in For all ships to the mission j Average distance: ; in, For the first k The current coordinates of the unmanned vessel. For the first j The geographical coordinates of each task.

[0060] Subsequently, the process of binding and resolving conflicts and consensus is executed iteratively until the convergence condition is met.

[0061] S32, Bundled Build.

[0062] During the bundled construction phase, each unmanned surface vessel (USV) calculates its bid value for candidate tasks. In each iteration, the bid value equals the task reward minus the overall cost plus the time window urgency reward, calculated using the following formula: ; Among them, task rewards V j Based on priority settings (high / medium / low priority are 300 / 200 / 100 respectively). The overall cost is a weighted linear combination of distance cost and time cost: ; in, Distance cost, incremental distance cost: represents the distance to the mission from the position of the last mission in the current mission pack (or the initial position of the unmanned ship if the mission pack is empty). j The Euclidean distance; Cost of estimated completion time: Indicates the time cost for the unmanned vessel to reach the mission. j And the moment after execution, i.e. , For the overall cost, , As weight.

[0063] Time window urgency reward Used to incentivize ships to prioritize tasks with urgent time windows: ; in This refers to the remaining buffer time; the shorter the remaining time, the higher the reward. For the task j The deadline for the time window, For unmanned ships iExpected arrival time j At that moment.

[0064] The bundled build process is as follows: Initialize each ship i Task package Bidding vector (Initially a zero vector), the vector of the task winner .

[0065] For each ship i In its candidate task set C i Select the task with the highest bid and add it to the task pack: ; in, For unmanned ships i For the task j The bid value, For unmanned ships i The set of candidate tasks.

[0066] If the task has been bid on by other ships Then compare the bid values. If If so, skip the task. Otherwise, proceed with task j. ∗ Add to the task pack. Repeat this process until the task pack reaches its maximum capacity (set to 12 tasks) or there are no more tasks to bid on in the candidate task set.

[0067] S33, Conflict consensus is resolved.

[0068] Each unmanned surface vessel shares its bid vector through communication. b i and task winner vector W Update task assignments according to conflict resolution rules. For each task... j If multiple vessels are bidding, the vessel with the highest bid will be selected. ; Update the global winner vector For other bidders , will the task j Remove and reset the value from its task package: ; .

[0069] S34. Convergence Determination To determine whether the algorithm has converged, the number of changes in task winners and the change in bids are counted. The number of changes in task winners is defined as the number of tasks in which the winner has changed compared to the previous iteration, and the change in bids is measured using the Frobenius norm of the bid vector matrix of all ships.

[0070] The convergence criteria are set as follows: the number of iterations is no less than ten, the task winner no longer changes, and the change in bid is less than one part per million. If the convergence criteria are met, the initial task allocation scheme is output; otherwise, the next round of iterations continues, and the process returns to step S32 to re-execute the bundling and construction process.

[0071] S4. Hard Time Window Constraint Check and Dynamic Pruning: During the task allocation process and after the initial allocation scheme is generated, a strict hard time window feasibility check is performed. The estimated arrival time of each task in the task package is calculated in real time. If the estimated arrival time of any task exceeds the upper limit of the corresponding time window, the dynamic pruning mechanism is immediately triggered to remove the task that violates the constraint and its subsequent affected tasks from the task package and release their allocation rights to ensure the physical executability of the scheme.

[0072] For each task in the task sequence, the Time of Arrival (ETA) is calculated in real time. The ETA is the completion time of the previous task plus the distance between tasks divided by the speed. If it is the first task, the ETA is the distance from the ship's starting position to the task position divided by the speed.

[0073] The hard time window constraint requires that the arrival time must not be greater than the upper limit of the task's time window. If this constraint is violated, the allocation scheme or path change is determined to be infeasible, the corresponding task is removed from the task sequence and its bidding value is reset to negative infinity, that is, it is directly eliminated, rather than being treated as a penalty item. For tasks that meet the time window constraint, the start and finish times are calculated. The start time is the larger of the arrival time and the start time of the time window, and the finish time is the start time plus the task execution duration. The current time is then updated, and the next task is checked. This hard constraint checking mechanism ensures that all ultimately assigned tasks are completed within the specified time window, completely eliminating time window violations.

[0074] S5. Two-layer path optimization: After the initial allocation scheme is generated, a two-layer strategy combining greedy construction and local search is adopted to optimize the task execution sequence of each unmanned vessel. First, the greedy nearest neighbor algorithm is used to generate an initial feasible path that meets the time window. Then, a 2-Opt local search mechanism is embedded to traverse all non-adjacent node pairs in the path and attempt to eliminate path intersections through subsequence flipping operations. Under the premise of ensuring that the new path still meets the hard time window constraint, iterative flipping operations that reduce the total travel distance are accepted.

[0075] S51, Initial path construction.

[0076] First, an initial feasible path satisfying the hard time window constraint is generated using a greedy nearest neighbor algorithm. For each ship, the set of visited tasks is initialized to empty, the current position is the ship's starting position, and the current time is zero. During the construction process, the set of unvisited tasks is traversed, and the estimated arrival time from the current position to each candidate task is calculated. A hard time window check is performed, eliminating all infeasible tasks whose arrival time exceeds the task deadline. Among the remaining feasible task candidates, the task closest to the current position is selected to be added to the path, and the current position and current time are updated (taking the larger value of the arrival time and the earliest start time of the task plus the execution duration). This process is repeated until no new tasks can be added, forming the initial path.

[0077] S52, Path Iteration Improvement.

[0078] Based on the initial path, a 2-Opt local search mechanism is introduced for iterative optimization. The algorithm traverses all possible non-adjacent node pairs in the path. i, k ), try to move the node i With nodes k The path subsequences are flipped to construct temporary new paths. For each temporary new path, a full path time window feasibility check is immediately performed. If the new path satisfies the hard time window constraints of all tasks and the total travel distance is less than the original path, the flip operation is accepted and the path is updated. The iterative search is repeated until the maximum number of iterations is reached or no better solution can be found.

[0079] This two-layer strategy first ensures that the generated path is physically feasible (without violating the time window), and then eliminates the path crossing phenomenon that may be caused by the greedy algorithm through the 2-Opt mechanism, which significantly shortens the total sailing distance without breaking the timing constraints.

[0080] S6. Greedy Insertion of Unassigned Tasks Based on Urgency: Identify tasks that were not assigned in step S3, calculate the urgency index of the time window and sort them in descending order, traverse the sorted unassigned tasks, and try to insert them into every feasible position in all unmanned vessel paths that can be executed. Calculate the marginal cost increment brought by the insertion. Under the condition of satisfying the hard time window constraint, select the position with the smallest marginal cost increment to perform the insertion operation in order to maximize the task completion rate.

[0081] Identify tasks that were not assigned in step S3. To prioritize tasks with high scheduling difficulty, unassigned tasks are sorted by a static time window urgency index. Here, urgency is defined as the reciprocal of the time window width plus one (Note: This focuses on the width of the task's execution window, unlike the remaining buffer urgency based on arrival time in step S32): ; in, For the task j The deadline for the time window, For the task j The start time of the time window.

[0082] Tasks with narrower time windows have higher urgency; unassigned tasks are processed in descending order of urgency. A greedy insertion strategy is used to attempt to insert tasks into the task sequences of each unmanned vessel. j Insert into the ship i Path location k Calculate the marginal cost increment Δcost ijk .

[0083] like k =0 (inserted at the beginning): ; If 0 < k <∣path i | (Insert in the middle): ; like (Insert at the end): ; in, For unmanned ships i The starting position coordinates, Task to be inserted j Geographical coordinates For unmanned ships i The first in the current path k The coordinates of each task node, |path i | For unmanned boats i The total number of task nodes contained in the current path.

[0084] For each insertion position, construct a temporary path and perform a time window constraint check to determine its feasibility. Among all feasible insertion options, select the one with the smallest marginal cost increment. ; in, Indicates insert task j The temporary path generated later can satisfy the hard time window constraints of all tasks in the path.

[0085] If a feasible insertion solution is found, update the path. i ∗ and task bundle i ∗ .

[0086] After distributed negotiation converges, iterate through the set of all unassigned tasks. Calculate the marginal cost increment of inserting each unassigned task into all possible positions on all executable unmanned vessel paths. Under the constraint of a hard time window, select the position with the smallest marginal cost increment for insertion, until no more tasks can be inserted.

[0087] S7. Or-opt Path Depth Reconstruction: After the greedy insertion is completed, the Or-opt path reconstruction mechanism is introduced. It traverses the mission path of each unmanned vessel, attempts to temporarily remove individual mission nodes in the path and re-insert them into other feasible positions in the path, calculates the change in total travel distance before and after node relocation, and if the total route distance decreases after relocation and does not violate the hard time window constraint, then the relocation operation is performed to escape the local optimum.

[0088] In the final stage of task allocation, the Or-opt path reconstruction mechanism (specifically using the Relocate operator) is introduced. Unlike the edge flipping of 2-Opt, Or-opt focuses on the repositioning of nodes.

[0089] The Or-opt path reconstruction mechanism optimizes paths by deleting two edges and reversing subpaths. For length of n Find the path, traverse all possible edge pairs, and select the position. i and location j Two sides, of which i Less than j ; Perform a 2-Opt move operation: delete location i and location i Add one to form the edge and position j and location j Add one to form an edge, then reverse its position. i Add one to position j Sub-path segments between them form a new connection method; Calculate the difference between the total distance of the original path and the total distance of the reversed path to obtain the distance gain; If the distance gain is greater than zero and the new path satisfies the time window constraints of all tasks, then accept the corresponding 2-Opt movement operation; Repeat the process of trying all possible edge pair combinations until no improvement can be found.

[0090] This step can effectively escape the local optimum trap that 2-Opt cannot solve, and further reduce redundant flight distance.

[0091] S8. Multi-ship load balancing adjustment: Calculate the task load of each unmanned vessel, identify high-load and low-load vessels, and, under the premise of meeting the capacity matching and time window constraints, perform task transfer operations to redistribute tasks at the end or end of the task sequence of high-load vessels to low-load vessels.

[0092] S9. Output the optimal allocation scheme: After processing through steps S1 to S8, output the optimal task allocation scheme, which includes the final task sequence, detailed execution schedule, total travel distance, task completion rate and load balance index for each unmanned vessel, and trigger the next round of task reallocation based on dynamic environmental changes.

[0093] Task completion rate is calculated as follows: ; in, This represents the total number of tasks already assigned.

[0094] Total sailing distance: ; Maximum completion time: ; in, For unmanned ships i The final moment when all tasks in its assigned sequence are completed (i.e., the completion time of the last task).

[0095] Load balancing is calculated by dividing the average number of tasks by the standard deviation of the number of tasks. The formula for calculating the standard deviation is: ; in This represents the average number of tasks. The load balancing efficiency is: .

[0096] For details on the process of triggering the next round of task redistribution based on dynamic environmental changes in this embodiment, please refer to the disclosure of Chinese Patent CN121189684A. To avoid ambiguity in the purpose of this application, it will not be described in detail here.

[0097] Through the above steps, this invention achieves optimized task allocation and execution control for heterogeneous unmanned surface vessel (USV) swarms in dynamic environments. Even in the event of unforeseen circumstances such as USV damage or the insertion of new tasks during task execution, the system can promptly adjust the task plan, re-optimize the allocation of remaining tasks, and ensure the smooth completion and optimal performance of the overall task.

[0098] To fully verify the effectiveness and applicability of the method of this invention, three types of test cases were designed: small-scale scenarios, large-scale scenarios, and large-scale random scenarios. The method was compared with the traditional K-means improved CBBA algorithm, the traditional CBBA algorithm, the traditional genetic algorithm GA, and the basic deep Q network DQN.

[0099] I. Scene Configuration Instructions Small-scale scenario configuration (30 missions x 6 ships): There are 3 types of missions: Type 1 is search and reconnaissance missions, Type 2 is supply missions, and Type 3 is casualty evacuation missions. The environment contains 6 heterogeneous unmanned surface vessels (USVs): 2 for Type 1 missions, 2 for Type 2 missions, 1 for Type 3 missions, and 1 general-purpose vessel capable of performing all missions. Each mission has a uniform execution time of 2 minutes, but the time window varies for each mission. The missions are distributed within a 650m x 650m operational area. Each algorithm undergoes 1000 independent experiments in this scenario, and the optimal result is used for comparative analysis.

[0100] Large-scale scenario configuration (60 missions x 6 ships): The mission configuration is the same as the small-scale scenario, including Type 1 search and reconnaissance missions, Type 2 supply missions, and Type 3 casualty evacuation missions. The environment also contains 6 heterogeneous unmanned surface vessels (USVs), with the same vessel type configuration as the small-scale scenario. Each mission has a uniform execution time of 5 minutes, but the time window for each mission is different. The missions are distributed within an 800m x 800m operational area. This scenario also undergoes 1000 independent experiments to determine the optimal result.

[0101] II. Results of Small-Scale Scenario Experiments Table 1 shows the performance comparison results of the five algorithms in small-scale scenarios.

[0102] Table 1 Comparison of Algorithm Performance in Small-Scale Scenarios As can be seen from Table 1, the method of the present invention achieves a 100% task completion rate, which is 10 percentage points higher than the improved CBBA + traditional K-means, better than the traditional GA algorithm, and significantly better than the 53.33% of traditional CBBA and the 33.33% of basic DQN.

[0103] Regarding path cost, the total travel distance of the method in this invention is 7605.64 meters, which is higher than the 6522.89 meters of the improved CBBA plus traditional K-means. However, the average distance per task is only 253.52 meters, which is less than 10% different from the 241.59 meters of traditional K-means, indicating that the path efficiency is reasonable under the premise of ensuring full task coverage. The maximum completion time is 15.38 minutes, which is comparable to the 14.86 minutes of traditional K-means and better than the 16.01 minutes of traditional GA. The computation time is 0.199 seconds, which is slightly higher than the 0.189 seconds of traditional K-means but significantly better than the 0.494 seconds of traditional GA and the 0.626 seconds of basic DQN, meeting the real-time requirements.

[0104] III. Results of Large-Scale Scenario Experiments Table 2 shows the performance comparison results of the five algorithms in large-scale scenarios.

[0105] Table 2 Comparison of Algorithm Performance in Large-Scale Scenarios As shown in Table 2, in large-scale scenarios, the task completion rate of the method of this invention reaches 95%, successfully assigning 57 tasks. This represents a 3.33 percentage point improvement compared to the 91.67% (55 tasks) of the improved CBBA plus traditional K-means method. The completion rates of traditional CBBA, traditional GA, and basic DQN are 31.67% (19 tasks), 73.33% (44 tasks), and 21.67% (13 tasks), respectively, significantly lower than the performance of the method of this invention.

[0106] Regarding path cost, the method of this invention has a total navigation distance of 19040.14 meters and an average distance per task of 334.04 meters, comparable to the 327.21 meters of the improved CBBA plus traditional K-means (only 2.1% higher). The traditional GA has a total distance of 12540.35 meters but only completes 44 tasks, with an average distance of 285.01 meters per task. The traditional CBBA and basic DQN have extremely low vessel utilization rates due to the low number of tasks completed, despite their shorter total distances. In terms of maximum completion time, the method of this invention achieves 66.40 minutes, superior to the 68.09 minutes of the improved CBBA plus traditional K-means and the 70.54 minutes of the traditional GA.

[0107] In terms of computation time, the method of this invention takes 0.578 seconds, which is higher than the 0.349 seconds of the improved CBBA plus traditional K-means, but still lower than the 1-second threshold, meeting the real-time requirements, and is better than the 0.624 seconds of traditional GA and the 0.704 seconds of basic DQN.

[0108] III. Random Scenario Testing To further verify the stability and robustness of the method of this invention in diverse scenarios, a large-scale randomized testing system was constructed. This system conducted 100 independent randomized tests for each of four different scenario configurations, for a total of 2000 experiments (4 scenario configurations x 5 algorithms x 100 tests), comprehensively evaluating the overall performance of the algorithm under different task ship ratios and load conditions.

[0109] Random scene configuration: Four scenario configurations were designed to cover both low-load and high-load conditions: Low-load scenarios (mission ship ratio of 6 to 7): Configuration 1: 120 random missions are paired with 18 unmanned vessels, with a mission-to-vessel ratio of 6.67; Configuration 2: 180 random missions are paired with 25 unmanned vessels, with a mission-to-vessel ratio of 7.20.

[0110] High-load scenarios (mission ship ratio of 8 to 9): Configuration 3: 120 random missions are paired with 14 unmanned vessels, with a mission-to-vessel ratio of 8.57; Configuration 4: 180 random missions are paired with 20 unmanned vessels, with a mission-to-vessel ratio of 9.00.

[0111] Each scenario configuration undergoes 100 independent random tests. In each test, the mission's geographical coordinates, time window start and end times, mission type, and priority are all randomly generated; the unmanned vessel's initial position, speed, and capability type are also randomly configured. Missions are divided into three types: Type 1 search and reconnaissance missions, Type 2 supply missions, and Type 3 casualty evacuation missions. Unmanned vessels are divided into four types: vessels specifically for Type 1 missions, vessels specifically for Type 2 missions, vessels specifically for Type 3 missions, and general-purpose vessels capable of performing all types of missions.

[0112] To evaluate the upper limit of the algorithm's performance, the optimal completion rate in 100 tests for each scenario configuration was statistically analyzed, and the results are shown in Table 3.

[0113] Table 3. Comparison of Optimal Task Completion Rates in Large-Scale Randomized Tests As shown in Table 3, the average optimal completion rate of the method of this invention reaches 92.22%, which is 6.32 percentage points higher than the 85.90% of the traditional K-means method. In the low-load scenario of 120T×18S, the optimal completion rate of the method of this invention reaches 94.17%, that is, 113 tasks are successfully assigned out of 120 tasks. In the high-load scenario of 180T×20S, the optimal completion rate is 91.11%, that is, 164 tasks are successfully assigned out of 180 tasks.

[0114] To more accurately assess path efficiency, the average distance per task (total distance divided by the number of tasks completed) was calculated, and the results are shown in Table 4.

[0115] Table 4. Comparison of average distance per task in large-scale randomized tests (unit: meters per task) As shown in Table 4, the average distance per task achieved by the method of this invention is 240 meters, which is 4.3% higher than the 230 meters per task of traditional K-means and 18.8% higher than the 202 meters per task of traditional CBBA, but significantly lower than the 342 meters per task of traditional GA and the 472 meters per task of basic DQN. This indicates that the method of this invention maintains reasonable path efficiency while completing more tasks.

[0116] Table 5 shows the average maximum completion time (the longest time required for all ships to complete their full tasks) for the five algorithms.

[0117] Table 5. Comparison of average maximum completion time for large-scale randomized tests (unit: minutes) As shown in Table 5, the average maximum completion time of the method of this invention is 72.60 minutes, which is comparable to 72.07 minutes for traditional K-means and 71.26 minutes for traditional GA, and significantly better than 81.47 minutes for traditional CBBA. This indicates that the method of this invention completes more tasks without significantly increasing the overall completion time, demonstrating good load balancing.

[0118] Therefore, the method of this invention far surpasses other methods in the most critical task completion rate indicator, while maintaining a reasonable level in indicators such as path efficiency and completion time, achieving comprehensive superiority in overall performance. In particular, the high stability and robustness demonstrated in 2000 large-scale random tests prove the reliability of the method of this invention under diverse and complex scenarios, making it the preferred solution for the multi-vehicle, multi-task allocation problem in marine emergency rescue under hard time window constraints.

[0119] Through comprehensive verification at three levels—small-scale scenarios, large-scale scenarios, and large-scale random testing—the effectiveness, stability, and superiority of the method of this invention have been fully demonstrated.

[0120] In summary, the embodiments provided by this invention effectively verify the feasibility and superiority of the improved CBBA unmanned surface vessel (USV) task allocation method based on MOAWC-Kmeans clustering in complex environments. The proposed method can significantly improve the efficiency and reliability of multi-USV collaborative task execution, which is of great significance for enhancing the autonomous collaborative combat capability of maritime unmanned equipment.

[0121] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. An improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering, characterized in that, Includes the following steps: S1. Data initialization and preprocessing: Obtain the status data and mission environment data of each unmanned vessel in the heterogeneous unmanned vessel cluster; S2, MOAWC-Kmeans Intelligent Task Pre-clustering: Based on preprocessed data, a task feature matrix containing task geographic coordinates, time window features, and capability requirement ratios is constructed. The MOAWC-Kmeans clustering algorithm is used to intelligently group all tasks to be executed. An adaptive weight calculation mechanism is used to balance the spatiotemporal attribute weights. Through an intelligent initialization strategy centered on the unmanned vessel's position and a hard constraint allocation mechanism, a high-priority candidate task set is divided for each unmanned vessel. S3. Improved CBBA distributed bidding and task allocation: Each unmanned vessel acts as an intelligent agent, prioritizing the selection of tasks from the candidate task set within the pre-cluster to construct task packages. The bidding value is calculated using a comprehensive cost function that integrates task rewards, distance costs, time costs, and time window urgency rewards. Through a distributed communication and negotiation mechanism, the bundled construction and conflict consensus resolution process is iteratively executed until the ownership of all tasks is agreed upon, generating an initial allocation scheme that meets the timing and capability constraints. S4. Hard Time Window Constraint Check and Dynamic Pruning: During the task allocation process and after the initial allocation scheme is generated, a strict hard time window feasibility check is performed. The estimated arrival time of each task in the task package is calculated in real time. If the estimated arrival time of any task exceeds the upper limit of the corresponding time window, the dynamic pruning mechanism is immediately triggered to remove the task that violates the constraint and its subsequent affected tasks from the task package and release its allocation right to ensure the physical executability of the scheme. S5. Two-layer path optimization: After the initial allocation scheme is generated, a two-layer strategy combining greedy construction and local search is adopted to optimize the task execution sequence of each unmanned vessel. First, the greedy nearest neighbor algorithm is used to generate an initial feasible path that meets the time window. Then, a 2-Opt local search mechanism is embedded to traverse all non-adjacent node pairs in the path and attempt to eliminate path intersections through subsequence flipping operations. Under the premise of ensuring that the new path still meets the hard time window constraint, iterative flipping operations that reduce the total travel distance are accepted. S6. Greedy insertion of unassigned tasks based on urgency: Identify tasks that were not assigned in step S3, calculate the urgency index of the time window and sort them in descending order, traverse the sorted unassigned tasks, try to insert them into every feasible position in all unmanned vessel paths that can be executed, calculate the marginal cost increment brought by the insertion, and under the condition of satisfying the hard time window constraint, select the position with the smallest marginal cost increment to perform the insertion operation in order to maximize the task completion rate. S7. Or-opt path deep reconstruction: After the greedy insertion is completed, the Or-opt path reconstruction mechanism is introduced. It traverses the mission path of each unmanned vessel, attempts to temporarily remove individual mission nodes in the path and re-insert them into other feasible positions in the path, calculates the change in total travel distance before and after node relocation, and if the total route distance decreases after relocation and does not violate the hard time window constraint, then the relocation operation is performed to escape the local optimum. S8. Multi-ship load balancing adjustment: Calculate the task load of each unmanned vessel, identify high-load and low-load vessels, and, under the premise of meeting the capacity matching and time window constraints, perform task transfer operations to redistribute tasks at the end or end of the task sequence of high-load vessels to low-load vessels. S9. Output the optimal allocation scheme: After processing through steps S1 to S8, output the optimal task allocation scheme, which includes the final task sequence, detailed execution schedule, total travel distance, task completion rate and load balance index for each unmanned vessel, and trigger the next round of task reallocation based on dynamic environmental changes.

2. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The unmanned vessel status data includes the unmanned vessel's current position coordinates, speed, maximum range, and maximum execution time.

3. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The task environment data includes the task's geographical coordinates, time window start and end times, execution duration, task type, and priority.

4. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The MOAWC-Kmeans intelligent task pre-clustering specifically includes the following steps: S21. Multimodal feature construction: Extract the geographical coordinates, start and end times of the time window, and the ratio of capability requirements of the task, construct the task feature matrix, and normalize each feature dimension to unify the numerical range to between zero and one. S22. Adaptive weight calculation: Calculate the original adaptive weight vector based on the standard deviation of each feature dimension, and adjust the weight distribution to ensure that the sum of the weights of the spatial coordinate features is not less than the specified proportion, and the sum of the weights of the other features does not exceed a certain proportion. Finally, normalize to obtain the adaptive weight vector. S23. Intelligent initialization: Divide the task space based on the location of the unmanned vessel, calculate the distance of each task to all unmanned vessels, initially assign the task to the partition corresponding to the nearest unmanned vessel, calculate the density of task points in each partition and select the task point with the highest density as the initial cluster center of the partition. If a partition is empty, randomly select an unselected task as the initial cluster center. S24. Weighted distance calculation: Using the adaptive weight vector calculated in step S22 as the weight coefficient, the weighted Euclidean distance is used to measure the distance between the task point and the cluster center. S25. Constraint-based optimization allocation: Set a constraint on the maximum number of tasks per cluster. This constraint value is the total number of tasks divided by the number of ships, multiplied by a preset value, and rounded up. Sort all tasks in descending order of task priority. For each task, calculate its weighted distance to the center of each cluster according to the method in step S24. Attempt to allocate the task to the cluster that is closest and not fully loaded. If all clusters are fully loaded, allocate the task to the cluster with the fewest current tasks. Introduce a load balancing optimization mechanism to calculate the average cluster size, identify overloaded and underloaded clusters, and reallocate the task farthest from the cluster center in the overloaded cluster. S26. Boundary Task Secondary Optimization: For each assigned task, calculate its weighted distance to the current cluster center and its weighted distance to the second nearest cluster center. Determine the boundary task based on the relative distance difference. If the task meets the boundary condition and the number of current tasks in the second nearest cluster is less than the number of tasks in the current cluster, then the task is reassigned to the second nearest cluster to optimize load balancing. S27. Iteratively update cluster centers: For each cluster, calculate the mean of all tasks in each feature dimension as the new cluster center, and calculate the Frobenius norm between the new and old cluster centers as the convergence index. If the norm is less than the preset threshold or the maximum number of iterations is reached, the algorithm converges; otherwise, return to step S24 to continue iterating.

5. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The improved CBBA distributed bidding and task allocation specifically includes: The candidate task set for a ship is defined as the union of tasks within the pre-cluster and boundary tasks, where boundary tasks are tasks that are not in the current cluster but that the ship can execute and that are less than a preset multiple of the average distance. The process of iteratively executing the bundling and conflict resolution consensus process continues until the convergence condition is met. The bundled construction process is as follows: each unmanned vessel calculates the bidding value of the candidate task based on the comprehensive cost function. The comprehensive cost function is the task reward minus the weighted linear combination of distance cost and time cost, plus the time window urgency reward. The task reward is set according to priority, and the time window urgency reward is inversely proportional to the remaining available time of the task. The conflict consensus resolution process is as follows: each unmanned vessel shares bidding information through communication, updates task assignment according to conflict resolution rules, and if multiple unmanned vessels bid for the same task, the task is assigned to the highest bidder, and other bidders remove the task from the task package and reset their bid value to zero. The convergence condition is that the number of iterations is not less than a preset number, the winner of the task no longer changes, and the Frobenius norm of the bid change is less than a preset threshold.

6. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The hard time window constraint check specifically involves: For each task in the task sequence, the arrival time is calculated as the completion time of the previous task plus the distance between tasks divided by the speed. If it is the first task, the arrival time is the distance from the ship's starting position to the task position divided by the speed. The hard time window constraint requires that the arrival time must not be greater than the upper limit of the task's time window. If this constraint is violated, the corresponding task will be removed from the task sequence and its bid value will be reset to negative infinity. Calculate the start execution time and the completion time. The start execution time is the larger value between the arrival time and the start time of the time window, and the completion time is the start execution time plus the task execution duration.

7. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The specific steps of generating initial feasible paths that satisfy the time window using the greedy nearest neighbor algorithm include: Initialize the set of visited tasks to an empty set, and the current position is the starting position of the unmanned vessel; In the set of unvisited tasks, calculate the estimated arrival time of each task, determine whether it meets the hard time window constraint, and select the task that meets the hard time window constraint and is closest to the current position to add it to the set of visited tasks. Update the current position to the selected task position, calculate the task's start and finish times, and update the current time. Repeat the above steps until the set of unvisited tasks is empty or there are no feasible tasks that satisfy the hard time window constraint, and output the optimized task execution path.

8. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The time window urgency index is defined as the reciprocal of the time window width plus one, where the time window width is the time difference between the completion time and the start execution time.

9. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The calculation of the marginal cost increment is as follows: When inserting a task at the beginning of a path, the marginal cost increment is the distance from the ship's starting position to the task plus the distance from the task to the first task on the path, minus the distance from the ship's starting position to the first task on the path. When inserting a task in the middle of the path, the marginal cost increment is the distance from the previous task to the inserted task plus the distance from the inserted task to the next task, minus the distance from the previous task to the next task. When inserting a task at the end of a path, the marginal cost increment is the distance from the last task in the path to the inserted task.

10. The improved CBBA unmanned surface vessel task allocation method based on MOAWC-Kmeans clustering according to claim 1, characterized in that, The Or-opt path reconstruction mechanism optimizes paths by deleting two edges and reversing sub-paths. For length of n Find the path, traverse all possible edge pairs, and select the position. i and location j Two sides, of which i Less than j ; Perform a 2-Opt move operation: delete location i and location i Add one to form the edge and position j and location j Add one to form an edge, then reverse its position. i Add one to position j Sub-path segments between them form a new connection method; Calculate the difference between the total distance of the original path and the total distance of the reversed path to obtain the distance gain; If the distance gain is greater than zero and the new path satisfies the time window constraints of all tasks, then accept the corresponding 2-Opt movement operation; Repeat the process of trying all possible edge pair combinations until no improvement can be found.

Citation Information

Patent Citations

  • A multi-task distributed task allocation method for cluster aircraft

    CN114610058B

  • Multi-unmanned aerial vehicle distributed dynamic task allocation method based on clustering

    CN116149370A

  • Multi-unmanned ship dynamic task allocation method and system based on improved CBBA algorithm

    CN116911535A

  • Dynamic task allocation method and system for multiple unmanned ships

    CN116993073A

  • Distributed multi-AGV task allocation method based on multi-objective optimization

    CN118171579A