A task allocation method and system based on an improved whale optimization algorithm framework

By improving the whale optimization algorithm framework, constructing a traffic control core matrix, and combining Chebyshev mapping and Lévy flight disturbance, the adaptability problem of task allocation in order-based traffic management was solved, achieving efficient resource utilization and rapid response, and improving the task success rate and computational efficiency of time-sensitive traffic flows.

CN121882632BActive Publication Date: 2026-06-12ROCKET FORCE UNIV OF ENG
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ROCKET FORCE UNIV OF ENG
Filing Date
2026-03-16
Publication Date
2026-06-12

Smart Images

  • Figure CN121882632B_ABST
    Figure CN121882632B_ABST
Patent Text Reader

Abstract

The application discloses a task allocation method and system based on an improved whale optimization algorithm framework, relates to the technical field, and includes cross-domain traffic control network task allocation for optimizing order type adaptation, and improves the response ability of a key task of a time-sensitive traffic system.ICWOA initializes a population through Chebyshev mapping, introduces Lévy flight disturbance to enhance the optimization ability, dynamically balances local and global search with the help of adaptive parameters, relieves population diversity decay through randomness reservation, diversity maintenance and boundary constraint, and fuses dimensional pinhole imaging reverse learning to reduce high-dimensional optimization dimension interference.The algorithm has better convergence speed and solution accuracy, keeps sub-second calculation time under different task scales, improves task allocation efficiency, and significantly improves the success rate of tasks in time-sensitive scenarios.The application solves the problems of the prior art, such as the insufficient adaptation of an order type "application order-dispatch order" structure, the easy falling into local optimization, the population diversity decay and the calculation speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of time-sensitive cross-domain traffic control network technology, and in particular to a task allocation method and system based on an improved whale optimization algorithm framework. Background Technology

[0002] Currently, order-based traffic management still faces two major problems: first, a complete order-based management rule system has not yet been established; second, there is a lack of suitable solutions for the core link of order-based task allocation. Existing optimization algorithms are mostly designed for specific traffic scenarios and are difficult to effectively adapt to the "order application-order dispatch" mathematical structure in the order-based management model, which easily leads to over-allocation of resources or response redundancy.

[0003] Furthermore, most existing intelligent algorithms suffer from limitations in time-sensitive traffic task scheduling, such as slow computation speed, limited data adaptability, and susceptibility to local optima. While the whale optimization algorithm offers advantages such as a dynamic balance between global exploration and local exploitation, and simple parameter design, which can help improve overall optimization capabilities, the classic whale algorithm still suffers from initial population sensitivity and limitations in continuous space optimization. Summary of the Invention

[0004] (a) Technical problems to be solved

[0005] To address the shortcomings of existing technologies, this invention provides a task allocation method based on an improved whale optimization algorithm framework. This method combines global exploration and local development capabilities, has high convergence accuracy, and fast response speed. It effectively solves the defects in existing order-based traffic management, such as insufficient task allocation adaptability, easy trapping of intelligent algorithms in local optima, slow calculation speed, and decay of population diversity. Furthermore, it fails to meet the "fast perception, fast decision-making, and fast regulation" requirements of time-sensitive traffic flow.

[0006] (II) Technical Solution

[0007] To achieve the above objectives, the present invention provides the following technical solution: a task allocation method based on an improved whale optimization algorithm framework, comprising the following steps:

[0008] S1: Based on traffic system parameters and control rules, construct the traffic control core matrix and encode the data to obtain the minimum travel time demand matrix, resource loss matrix and time constraint matrix.

[0009] S2: Population chaos initialization is performed based on Chebyshev mapping, and a uniformly distributed initial population is generated by combining the constraints of the traffic control core matrix.

[0010] S3: Construct the individual fitness function of the population, calculate the individual fitness value based on the initial population, and determine the current optimal individual position;

[0011] S4: The core control parameters of the dynamic update algorithm are used to update the whale behavior model based on the fitness value and the optimal individual position, so as to obtain the updated individual positions of the population.

[0012] S5: Introduce the Lévy flight perturbation mechanism to perturb and enhance the updated individual positions of the population, and obtain the perturbation-optimized individual positions;

[0013] S6: By using a population diversity maintenance strategy and a dimensional pinhole imaging reverse learning strategy, the positions of individuals after perturbation optimization are further optimized to obtain a diversity-preserving optimized population.

[0014] S7: Perform boundary processing and integerization on the population to maintain diversity optimization. Determine whether to end the optimization based on the preset iteration termination condition. If the condition is met, output the optimal task allocation scheme.

[0015] Furthermore, based on traffic system parameters and control rules, a traffic control core matrix is ​​constructed and data encoding is performed to obtain a minimum travel time demand matrix, a resource loss matrix, and a time constraint matrix, including:

[0016] Based on traffic system parameters and control rules, a minimum travel time demand matrix is ​​constructed. This matrix is ​​a binary matrix that records control nodes. Guiding traffic flow Minimum required green light duration It satisfies the following formula:

[0017]

[0018] In the formula, This is the basic single-phase traffic efficiency. This indicates the number of interfering factors, and each type of interfering factor... The impact coefficient on traffic capacity is , This represents the required traffic efficiency threshold. The minimum green light time required to meet the traffic efficiency threshold requirements;

[0019] Construct the resource loss matrix as follows:

[0020]

[0021] in: Represents a node Control the amount of resource consumption per unit time; This represents the total control resource consumption caused by control node i guiding traffic flow j; it also represents the minimum green light duration required for control node i to guide traffic flow j.

[0022] Construct the time constraint matrix as follows:

[0023]

[0024] In the formula, Storage control node Traffic flow The permitted passage time window; Minimum passage time; Maximum passage time;

[0025] Introduce resource constraints as follows:

[0026]

[0027] In the formula, For nodes The maximum available green light duration, To allocate traffic flow Green light time;

[0028] Introducing a time constraint: The time constraint requires that the total time from task initiation to completion does not exceed the traffic flow. The maximum tolerable waiting time is as follows:

[0029]

[0030] In the formula, The time taken for the "request-allocation-response" process For signal execution and traffic flow transit time; For traffic flow Maximum waiting tolerance time; Control uniqueness means that each traffic flow task is guided by only one control node at any given time.

[0031] Introduce a unique control constraint: each traffic flow task is guided by only one control node at any given time.

[0032] Furthermore, the step of initializing the population based on Chebyshev mapping to generate a uniformly distributed initial population, combined with the constraints of the traffic control core matrix, includes:

[0033] Embedding the Chebyshev chaotic map into the WOA initialization phase enables a two-stage optimization mechanism.

[0034] During the chaotic diffusion phase, chaotic sequences are generated using the Chebyshev mapping. ;

[0035]

[0036] in, For integer mapping order, This is the current iteration value;

[0037] Normalize the chaotic sequence:

[0038]

[0039] Normalized chaotic sequence values Reconstructing a two-dimensional chaotic sequence from a one-dimensional sequence ;

[0040] Two-dimensional chaotic sequence Mapped to the actual solution space, this forms an initial population that is uniformly distributed in the solution space;

[0041]

[0042] In the formula, is The vector position of each individual; Let d represent the d-dimensional real space, which is a vector space consisting of d real components; and To constrain the boundary; yes The chaotic sequence after transforming from one-dimensional to two-dimensional.

[0043] Furthermore, the construction of the population individual fitness function, calculating the individual fitness value based on the initial population, and determining the current optimal individual position includes:

[0044] The objective function is set to minimize the total resource consumption of all task allocation schemes while meeting the basic traffic efficiency requirements of each traffic flow.

[0045]

[0046] Calculate the total time resource shortage for each node:

[0047]

[0048] in, Indicates control node Guiding traffic flow The comprehensive control resource loss matrix. Represents a node Control the amount of resource consumption per unit time; Assign variables to the task: If This indicates that the control node Responsible for guiding traffic flow ;like If the value is 0, it means that the node will not be assigned to execute the task. The total number of traffic flow tasks. To control the total number of nodes;

[0049] Based on the overall constraints of signal timing resources, a weighted penalty is applied to cases where time resources exceed the limits. By introducing a penalty term, hard constraints are transformed into soft constraints, and adaptive penalty weights are used to gradually increase the constraint pressure, thereby achieving dynamic adjustment.

[0050] The fitness function is expressed as:

[0051]

[0052] in, The fitness function; To control the overall amount of resource consumption; Used to quantify the total time resource shortage of each node as a penalty item; As weight;

[0053] The specific formula for calculation is as follows.

[0054]

[0055]

[0056]

[0057] In the formula, This represents the number of iterations, and also the corresponding time. This represents the maximum number of iterations, and also the node period. Represents a node Guiding traffic flow Duration required The corresponding amount of control resource consumption;

[0058] for :

[0059]

[0060] In the formula, Indicates control node The remaining available time resources; The maximum total green light time resource limit is preset for each node; Represents a node The total time required to execute all assigned tasks; where the summation range is all tasks that satisfy the given conditions. Traffic flow tasks, namely, assigning traffic to nodes The tasks are accumulated;

[0061] Calculate the fitness value of each individual in the population, and record the position of the individual with the best fitness as the current optimal solution.

[0062] Furthermore, the core control parameters of the dynamic update algorithm, based on the fitness value and the optimal individual position, update the whale behavior model to obtain the updated population individual positions, including:

[0063] Update the convergence factor:

[0064]

[0065] Update the prey encirclement coefficient:

[0066]

[0067] Updated bubble web attack coefficient:

[0068]

[0069] In the formula, t represents the number of iterations; and It is a coefficient vector and satisfies , It is a random direction distributed between [0,1]; t max It is the maximum number of iterations; It is the convergence factor;

[0070] Update the probability of the selected action:

[0071]

[0072]

[0073] In the formula, It is a random number within the range [0,1]. As an adaptive variable, by The commonly used value of 0.5 has been changed.

[0074] The location of individuals in the population is updated based on the updated parameters and the whale behavior model.

[0075] Furthermore, the update of individual population locations based on the updated parameters and whale behavior model includes:

[0076] Generate a random number that is uniformly distributed in the interval [0,1]. and adaptive variables Compare, based on the comparison results and coefficients The absolute value is used to execute the corresponding whale behavior model to calculate the updated individual position:

[0077] In dynamic probability and Under these conditions, an echolocation-based prey search is performed, and the individual positions are updated according to the following model to obtain the updated position vector:

[0078]

[0079] In the formula, t represents the number of iterations; This represents the location of the optimal solution; Indicates the position of the currently randomly generated solution; and It is a coefficient vector;

[0080] When the convergence coefficients satisfy the dynamic probability and At that time, a distance-aware progressive enclosing is performed, updating the individual position according to the following model to obtain the updated position vector:

[0081]

[0082] In the formula, Indicates the dynamically adjusted search step size;

[0083] When the convergence coefficients satisfy the dynamic probability At that time, a spiral bubble net contraction strategy is used to surround and capture prey. The updated individual position vector is calculated according to the following spiral position update equation:

[0084]

[0085] In the formula, Represents the spatial distance vector between an individual and the current optimal solution; b is the spiral morphology adjustment factor; l is... Random coefficients of a uniformly distributed interval.

[0086] Furthermore, the introduction of the Lévy flight perturbation mechanism to enhance the perturbation of the updated individual positions in the population, resulting in perturbation-optimized individual positions, includes:

[0087] After updating the individual location, a random step size based on the Lévy distribution is introduced for perturbation. The formula for calculating the perturbed individual location is as follows:

[0088]

[0089]

[0090] In the formula, is the exponential parameter of the Lévy distribution; It is a gamma function; It is a random perturbation vector, which usually follows a standard normal distribution or a uniform distribution; For random perturbation vectors The Euclidean norm; Let Lévy's flight step size vector be denoted by . This is a traditional individual position vector; This is the new individual position vector obtained after introducing Lévy flight perturbation.

[0091] Furthermore, the individual positions optimized after perturbation optimization are further optimized using a population diversity maintenance strategy and a dimensional pinhole imaging reverse learning strategy to obtain a diversity-preserving optimized population, including:

[0092] Implement a population diversity maintenance strategy, and every 10 iterations, select the individual with the best current fitness. Perform a chaotic reset to generate a new optimal individual position. The calculation formula is as follows:

[0093]

[0094] in, It is a two-dimensional chaotic sequence; and These are the lower and upper bounds of the solution space, respectively;

[0095] Mapping outbound individuals to the nearest boundary surface of the d-dimensional solution space feasible region hypercube is mathematically expressed as:

[0096]

[0097] in, This is the upper boundary overflow indicator vector; This is the lower boundary overflow indicator vector; This is an indicator function; it takes the value 1 when the internal condition is true, and 0 otherwise.

[0098] A sequential pinhole imaging reverse learning mechanism is introduced to reduce inter-dimensional interference in high-dimensional optimization and enhance the diversity of the solution space. Its mathematical expression is as follows:

[0099]

[0100] in, Let be the upper and lower bound vectors of the solution space, respectively. This represents the ratio of the height of the virtual image to the height of the actual object in pinhole imaging.

[0101] By combining the above-mentioned population diversity maintenance strategy with the dimensional pinhole imaging reverse learning strategy, the positions of individuals after perturbation optimization are further optimized, thereby obtaining a diversity-preserving optimized population.

[0102] Furthermore, the process of performing boundary processing and integerization on the diversity-preserving optimized population, and determining whether to terminate the optimization based on a preset iteration termination condition, includes: If the condition is met, the optimal task allocation scheme is output.

[0103] For the decimal part of each individual position Generate random matrices of the same dimension and compare them: if the random number corresponding to a certain position is less than... Then the individual's location will be updated to:

[0104]

[0105] in, The position vector before the update. For the decimal part of the corresponding dimension, This is the integerized position vector;

[0106] An elite retention mechanism is implemented, comparing the fitness of individuals in the new generation with that in the previous generation, selecting and retaining the better solutions, and simultaneously updating the global optimal solution record;

[0107] The algorithm stops based on a preset maximum number of iterations and a convergence criterion. The convergence criterion is that the improvement rate of the optimal solution is lower than a set threshold for multiple consecutive generations.

[0108] If the termination criterion is not met, return to the parameter update phase to continue iterative optimization; otherwise, output the global optimal solution and its fitness value to form the optimal task allocation scheme.

[0109] A task allocation system based on an improved whale optimization algorithm framework includes:

[0110] Matrix construction module: Used to construct the core traffic control matrix and encode the data based on traffic system parameters and control rules, to obtain the minimum travel time demand matrix, resource loss matrix and time constraint matrix;

[0111] Initialization module: used for population chaos initialization based on Chebyshev mapping, and generates a uniformly distributed initial population by combining the constraints of the traffic control core matrix;

[0112] The optimal selection module is used to construct the fitness function of individuals in the population, calculate the fitness value of individuals based on the initial population, and determine the current optimal position of individuals.

[0113] Parameter correction module: used to dynamically update the core control parameters of the algorithm, update the whale behavior model based on fitness value and optimal individual position, and obtain the updated individual position of the population;

[0114] Perturbation optimization module: Used to introduce the Lévy flight perturbation mechanism to perturb and enhance the positions of individuals in the updated population, resulting in perturbation-optimized individual positions;

[0115] The location optimization module is used to further optimize the individual locations after perturbation optimization by using population diversity maintenance strategies and dimensional pinhole imaging reverse learning strategies to obtain a diversity-preserving optimized population.

[0116] Task allocation module: Used to perform boundary processing and integerization on the diversity-preserving optimization population. It determines whether to end the optimization based on the preset iteration termination condition. If the condition is met, it outputs the optimal task allocation scheme.

[0117] (III) Beneficial Effects

[0118] The present invention provides a task allocation method based on an improved whale optimization algorithm framework, the beneficial effects of which are mainly reflected in the following aspects:

[0119] 1. The core advantage of this invention lies in the innovation and efficiency of its algorithm optimization mechanism. Multiple improvement strategies significantly enhance the quality and stability of task allocation. The Chebyshev chaotic mapping population initialization method effectively avoids the initial solution aggregation problem, ensuring uniform coverage of the solution space. The Lévy flight perturbation mechanism endows the algorithm with dual capabilities of short-distance fine-grained search and long-distance jump breakthrough, greatly reducing the risk of getting trapped in local optima. The adaptive parameter dynamic balancing of the switching efficiency between global exploration and local development, combined with the dimensional pinhole imaging reverse learning strategy, effectively reduces inter-dimensional interference in high-dimensional optimization, further improving convergence accuracy and solution space diversity. Simultaneously, the population diversity maintenance strategy combining periodic optimal individual reset and boundary constraint processing alleviates the population diversity decay problem during evolution, ensuring the feasibility and uniform distribution of solutions during iteration, allowing the algorithm to maintain strong robustness in complex task scenarios.

[0120] 2. This invention demonstrates strong adaptability and practicality in practical applications, perfectly meeting the core requirements of order-based traffic management. The algorithm accurately adapts to the mathematical structure of "order application-order dispatch," effectively solving problems such as excessive resource allocation and response redundancy that are prone to occur in existing optimization algorithms, achieving precise and efficient utilization of traffic resources. It maintains sub-second computation time under different task scales, improving task allocation efficiency by 7.34%, significantly increasing the task success rate in time-sensitive traffic scenarios, and meeting the real-time control requirements of "fast perception, fast decision-making, and fast regulation" for time-sensitive traffic flows such as emergency vehicles and bus priority. In addition, the algorithm has excellent scalability, stably outputting near-optimal solutions from small road networks to ultra-large road network scenarios, providing solid and efficient algorithmic support for task planning of future large-scale cross-domain traffic control networks. Attached Figure Description

[0121] Figure 1 This is a flowchart illustrating a task allocation method based on an improved whale optimization algorithm framework according to the present invention.

[0122] Figure 2 This is a functional block diagram of a task allocation method based on an improved whale optimization algorithm framework according to the present invention.

[0123] Figure 3 Comparison of chaotic sequence distributions generated for three mapping methods;

[0124] Figure 4 The step size distribution for 1000 Lévy flights;

[0125] Figure 5 Flowchart for improving the whale optimization algorithm;

[0126] Figure 6 A timeline of the order placement process;

[0127] Figure 7 The minimum cost distribution for 50 repeated trials of the two algorithms;

[0128] Figure 8 A comparison of fitness values ​​obtained by different algorithms is presented; Figure (a) shows the process after 1000 iterations, and Figure (b) shows the process after 3000 iterations. Detailed Implementation

[0129] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0130] Please see Figure 1-8 This invention provides a task allocation method based on an improved whale optimization algorithm framework, comprising the following steps:

[0131] S1: Based on traffic system parameters and control rules, construct the traffic control core matrix and encode the data to obtain the minimum travel time demand matrix, resource loss matrix and time constraint matrix.

[0132] In this embodiment, the process of constructing a traffic control core matrix and encoding data based on traffic system parameters and control rules to obtain a minimum travel time demand matrix, a resource loss matrix, and a time constraint matrix includes:

[0133] Based on traffic system parameters and control rules, a minimum travel time demand matrix is ​​constructed. This matrix is ​​a binary matrix that records control nodes. Guiding traffic flow Minimum required green light duration It satisfies the following formula:

[0134]

[0135] In the formula, This is the basic single-phase traffic efficiency. This indicates the number of interfering factors, and each type of interfering factor... The impact coefficient on traffic capacity is , This represents the required traffic efficiency threshold. The minimum green light time required to meet the traffic efficiency threshold requirements;

[0136] Construct the resource loss matrix as follows:

[0137]

[0138] in: Represents a node Control the amount of resource consumption per unit time; This represents the total control resource consumption caused by control node i guiding traffic flow j; it also represents the minimum green light duration required for control node i to guide traffic flow j.

[0139] Construct the time constraint matrix as follows:

[0140]

[0141] In the formula, Storage control node Traffic flow The permitted passage time window; Minimum passage time; Maximum passage time;

[0142] Introduce resource constraints as follows:

[0143]

[0144] In the formula, For nodes The maximum available green light duration, To allocate traffic flow Green light time;

[0145] Introducing a time constraint: The time constraint requires that the total time from task initiation to completion does not exceed the traffic flow. The maximum tolerable waiting time is as follows:

[0146]

[0147] In the formula, The time taken for the "request-allocation-response" process For signal execution and traffic flow transit time; For traffic flow Maximum waiting tolerance time; Control uniqueness means that each traffic flow task is guided by only one control node at any given time.

[0148] Introduce a unique control constraint: each traffic flow task is guided by only one control node at any given time.

[0149] Preferably, this step aims to construct a formatted input data model for the subsequent improvement of the whale optimization algorithm. Specifically, it requires transforming the physical rules, resource constraints, and timeliness requirements in traffic control into core data matrices and mathematical constraints that the algorithm can directly process. These matrices and constraints together define the solution space and evaluation criteria of the task allocation optimization problem.

[0150] The "traffic system parameters" refer to a series of quantifiable inputs that describe the physical state, performance indicators, and resource allocation of the traffic control network, mainly including: single-phase basic traffic efficiency. (Determined through historical traffic flow data statistics or on-site observation), number of interfering factors and various interfering factors Impact coefficient on traffic capacity (e.g., weather conditions, traffic accidents, road construction, etc.) Actual required traffic efficiency threshold. (Pre-set by traffic management strategies), each control node Control resource consumption per unit time (Reflecting node device energy consumption, communication and computing overhead), nodes Maximum available green light duration (Determined by the signal controller timing scheme), traffic flow task Maximum tolerable waiting time (Set according to task priority and real-time traffic conditions), and control nodes. Traffic flow task Control distance between (Calculated based on road network topology and geographic information system).

[0151] These parameters together constitute the basic data input required for algorithm optimization. The "control rules" refer to the logical constraints that must be followed to ensure the safety, timeliness, and resource rationality of the traffic control system, mainly including: resource constraints: each control node... The total green time allocated to all traffic flow tasks must not exceed the available time of their cycle. Time constraint: The total time elapsed from task initiation to completion (including the time spent in the request-allocation-response process). With signal execution and traffic flow time The waiting time must not exceed the maximum tolerance time for that traffic flow. Uniqueness constraint for control: Each traffic flow task at any given time... Only one control node can be responsible for guiding and avoiding signal conflicts and redundant resource allocation. The above parameters and rules will be encoded into three core matrices (minimum travel time requirement matrix, resource consumption matrix, and time constraint matrix) and corresponding constraints, which will serve as the input model for improving the whale optimization algorithm, thereby driving the optimization solution of the task allocation scheme.

[0152] In detail, the minimum travel time demand matrix is ​​first constructed. This matrix is ​​a two-dimensional data table with specific physical meaning, where rows correspond to control nodes and columns correspond to traffic flow tasks. Each element in the matrix... This represents a deterministic value: the minimum green light duration that must be allocated to meet the most basic traffic efficiency requirements of traffic flow when control node i guides traffic flow j. This duration is not arbitrarily set, but is derived based on traffic flow theory.

[0153] The single-phase basic traffic efficiency is a benchmark value obtained through historical data statistics or field observation. It characterizes the efficiency of vehicles passing through an intersection during a single-phase green light time under ideal conditions without any interference. The number of interference factors... and each interfering factor Influence coefficient Therefore, it is necessary to evaluate and calibrate based on the specific intersection geometry, traffic composition, and real-time environment (such as weather and accidents). The actual required traffic efficiency threshold E0 is a performance target value pre-set according to the traffic management strategy. By integrating these parameters and using the formula, the minimum time requirement for each "node-task" pairing can be obtained. .

[0154] Suppose a traffic control area contains 9 control nodes (N1-N9), each with different control strategies and resource quotas. Their available time resource quotas are 5, 25, 55, 25, 30, 30, 80, 120, and 20 seconds, respectively. The control efficiency varies among nodes. Node N1 is an emergency node and is generally not used. There are 17 traffic flow tasks to be processed. After constraint screening, the actually executable tasks are T1, T2, T3, T4, T7, T8, T9, T12, T13, and T14. The remaining 7 low-priority interference sources are not included in the allocation, but they still affect the single-control success rate of the nodes.

[0155] The maximum tolerable waiting time for all traffic flow tasks is 30 seconds. The simulation environment configuration is as follows: CPU i9-14900HX, 16.0GB memory, Windows 11 operating system, and MATLAB 2024b as the experimental platform. The response time parameters of each node are as follows: N1-N5 follow a uniform distribution in the intervals [2,3], [3,4], [4,5], [5,6], and [6,7] (unit: seconds), respectively; N6-N7 follow a uniform distribution in the intervals [2,3] and [3,5]; and N8 and N9 follow a uniform distribution in the interval [2,3]. The resource consumption per unit time for controlling congestion flow at each node is 500, 800, 1200, 800, 1500, 100, 90, and 200, respectively, and the preparation time parameter is [1,5,5,5,5,5,2,1,1] (unit: seconds). The time for issuing and bidding for orders at the control center is 0.5 seconds, and the relationship between node response time and distance is represented by a piecewise function set.

[0156] The part calculated using the above method The values ​​are shown in Table 1.

[0157] Table 1. Minimum time resources (in seconds) for control nodes to execute traffic flow tasks and meet passage requirements.

[0158]

[0159] The response time parameters for each node are as follows: N1-N5 follow a uniform distribution within the intervals [2,3], [3,4], [4,5], [5,6], and [6,7] (unit: s); N6-N7 follow a uniform distribution within the intervals [2,3] and [3,5]; and N8 and N9 follow a uniform distribution within the interval [2,3]. The resource consumption per unit time for controlling congestion flow at each node is 500, 800, 1200, 800, 1500, 100, 90, and 200, respectively, with a preparation time parameter of [1,5,5,5,5,5,2,1,1] (unit: s). The time for issuing and bidding for orders at the control center is 0.5 seconds. The relationship between node response time and distance is represented by a piecewise function set.

[0160]

[0161] In the formula, Indicates control node Traffic flow task The control distance between them. This includes the minimum time and resource requirements for each task corresponding to different control nodes.

[0162] To visually demonstrate the execution sequence of the optimal task allocation scheme generated by the algorithm, the optimization results are presented in the form of a Gantt chart, such as... Figure 6The "Order Issuance Process Timeline" is shown below. The vertical axis of the graph lists the traffic flow tasks that need to be assigned, and the horizontal axis is the time axis (unit: minutes), showing the specific time window in which each task is assigned and executed starting from the base time t.

[0163] Each horizontal bar in the diagram represents a task executed by a corresponding control node within a specific time period. It clearly demonstrates the scheduling results of task allocation, the execution order and time commitment of each task, and the overall compactness and conflict-free nature of the scheme in terms of time. From a time scheduling perspective, this diagram intuitively confirms that the allocation scheme derived from the ICWOA algorithm not only meets the minimum time requirements but also achieves efficient and orderly time-sensitive task distribution and execution, satisfying the real-time requirements of "fast perception, fast decision-making, and fast adjustment."

[0164] More specifically, based on the aforementioned minimum travel time requirement matrix, a resource consumption matrix is ​​further constructed. This matrix is ​​also a two-dimensional real-valued matrix, and its core function is to quantify time resource consumption into comparable control costs. Constructing this matrix requires another key input: the inherent unit-time control resource consumption of each control node j. . This reflects the differences in unit-time operating costs among different nodes due to factors such as equipment model, energy consumption level, maintenance complexity, or communication overhead. For example, a node equipped with a high-performance computing unit and an omnidirectional detector... This could be higher than a node with a base configuration. The build operation is a direct matrix element-wise multiplication: multiplying each element in the minimum travel time requirement matrix... Multiply by the unit cost corresponding to node j to which the task is assigned. To obtain the elements of the new matrix ,Right now . The physical meaning is very clear: it represents the total control resource loss that will occur if control node i is arranged to guide traffic flow j, while meeting the minimum travel time requirement. This matrix is ​​the direct calculation basis for the algorithm's optimization objective—minimizing total resource loss.

[0165] Furthermore, a time constraint matrix is ​​constructed to characterize the elastic range of task execution. This matrix is ​​an interval matrix, where each element... It is not a single value, but a time interval. This interval defines the green light time window during which control node i is allowed to provide passage for traffic flow j. Minimum passage time. Typically constrained by traffic safety and signal control requirements, the minimum green light duration must be greater than or equal to the aforementioned calculated value. .

[0166] Maximum passage time This is limited by signal cycle length, adjacent phase coordination requirements, and fairness considerations for other traffic flows. For example, even if a traffic flow has a high priority, its green light time cannot be extended indefinitely to avoid causing other traffic flows to wait for extended periods. This matrix represents the algorithm's... Based on this, optimizations and adjustments were made to provide a feasible boundary for fluctuations.

[0167] After constructing the three core data matrices, constraints must be introduced to regulate the algorithm's search space and ensure that the generated solutions are physically executable. First, resource constraints are introduced for each control node. This constraint stipulates that for any control node i, the sum of the green light times obtained by all traffic flow tasks assigned to it must not exceed the maximum available green light duration for that node within a signal cycle. . This is a preset value determined by the timing scheme of the signal controller. This constraint prevents the algorithm from overloading a single node with too many tasks, thus ensuring the feasibility of the scheme at the single-node level.

[0168] Next, a time constraint is introduced for each traffic flow task. This constraint, based on the timeliness requirements of the task initiator, specifies the time consumption of the "request-assignment-response" process. With signal execution and traffic flow time The sum of these must not exceed the maximum tolerable waiting time for that traffic flow. . This includes background processing time such as task detection, communication transmission, and algorithm calculation; The core component is the green light time allocated to the task. .

[0169] Therefore, this constraint is essentially a requirement The allocation must be compact to accommodate high-priority traffic flows (such as emergency vehicles, whose...) The requirement for rapid passage (with smaller values) is addressed by the control uniqueness constraint, which stipulates that in the final allocation scheme, each traffic flow task j can only be assigned to a unique control node i at any given time. This constraint is a necessary requirement in the physical world, avoiding conflicting control commands from multiple nodes for the same traffic flow, and ensuring the clarity and security of control.

[0170] This embodiment transforms a complex traffic control scenario into a structured mathematical model through a series of well-defined and sequentially progressive operations. The minimum travel time requirement matrix defines the basic time consumption of the task; the resource consumption matrix adds a cost dimension based on this; and the time constraint matrix provides flexible space for optimization and adjustment.

[0171] The three constraints act like three rulers, jointly ensuring that any solution found by the algorithm meets the node resource cap, task timeliness requirements, and the uniqueness of control responsibility. All these matrices and constraints will be fully encoded into the calculation part of the fitness function and the decoding rules of individual positions in the improved whale optimization algorithm, thereby driving the algorithm to find the optimal task allocation scheme with the minimum total resource consumption within the feasible region that satisfies all constraints.

[0172] S2: Population chaos initialization is performed based on Chebyshev mapping, and a uniformly distributed initial population is generated by combining the constraints of the traffic control core matrix.

[0173] In this embodiment, the step of performing chaotic initialization of the population based on the Chebyshev mapping, and generating a uniformly distributed initial population in conjunction with the constraints of the traffic control core matrix, includes:

[0174] Embedding the Chebyshev chaotic map into the WOA initialization phase enables a two-stage optimization mechanism.

[0175] During the chaotic diffusion phase, chaotic sequences are generated using the Chebyshev mapping. ;

[0176]

[0177] in, For integer mapping order, This is the current iteration value;

[0178] Normalize the chaotic sequence:

[0179]

[0180] Normalized chaotic sequence values Reconstructing a two-dimensional chaotic sequence from a one-dimensional sequence ;

[0181] Two-dimensional chaotic sequence Mapped to the actual solution space, this forms an initial population that is uniformly distributed in the solution space;

[0182]

[0183] In the formula, The vector position for each individual; Let d represent the d-dimensional real space, which is a vector space consisting of d real components; and To constrain the boundary; yes The chaotic sequence after transforming from one-dimensional to two-dimensional.

[0184] Preferably, the population chaos initialization based on the Chebyshev map refers to using a Chebyshev chaotic system with strict ergodic properties to generate the position vector of each individual in the initial population. This process is designed as a structured data generation flow, specifically including the following successive operational stages.

[0185] In detail, the process first enters the chaotic diffusion stage. In this stage, the core operation is to generate a chaotic sequence using the mathematical iteration rules of the Chebyshev map. Specifically, starting from a certain initial seed value, the formula is repeatedly applied for iterative calculation. The formula contains... It is a pre-defined integer, called the mapping order, which determines the specific pattern of chaotic dynamics; and This represents the value at the current iteration step. Through multiple such iterations, a long sequence can be generated that has a deterministic mathematical form but exhibits chaotic behavior resembling randomness and being extremely sensitive to initial conditions. This sequence serves as the original data source for all subsequent construction operations.

[0186] More specifically, after obtaining the original chaotic sequence, it needs to be normalized. This is because the sequence values ​​generated directly by the Chebyshev mapping are usually distributed within a specific interval, such as between -1 and +1. To facilitate mapping it to the solution space defined by subsequent algorithms, a linear transformation operation is performed, transforming each value in the sequence so that it ultimately falls within the normalized interval of 0 to 1. After this step, the original chaotic values ​​are transformed into a series of normalized pseudo-random numbers between 0 and 1, preparing for the next step of spatial mapping.

[0187] Next, the normalized one-dimensional chaotic sequence needs to be reorganized into a two-dimensional chaotic sequence that matches the dimension of the problem. Since the traffic control task allocation problem that this invention aims to solve can be represented as a two-dimensional allocation matrix (behavioral control nodes, columns representing traffic flow tasks), each individual in the initial population should also be a two-dimensional structure. The reconstruction operation involves sequentially filling the long one-dimensional sequence into a two-dimensional array with a predetermined number of rows and columns, thus forming a two-dimensional chaotic sequence. This two-dimensional sequence inherits the ergodicity and uniformity of the chaotic sequence.

[0188] Finally, a mapping operation is performed from the chaotic space to the actual solution space to form an initial population uniformly distributed in the solution space. This operation utilizes the two-dimensional chaotic sequence obtained in the previous step, combined with the constraint boundary of the specific optimization problem. The constraint boundary is a two-dimensional vector that defines the lower and upper bounds of the allowed values ​​for each decision variable. The core of the mapping operation is to transform each value between 0 and 1 in the two-dimensional chaotic sequence into the interval specified by the upper and lower bounds of the corresponding decision variable through linear scaling and translation. For a problem requiring integer solutions, a rounding operation is usually performed after this step to convert continuous values ​​into discrete integer values, thereby generating a complete initial candidate solution set, i.e., the initial population, uniformly distributed in the feasible region.

[0189] Through a series of deterministic operations—from chaotic sequence generation, normalization, dimensional reconstruction to spatial mapping—a uniformly distributed and widely covered initial population was successfully generated for the improved whale optimization algorithm. This method effectively avoids initial solution aggregation and improves the quality of the starting point for the algorithm's global exploration. The superiority of this initialization method lies in the better uniform distribution characteristics of the chaotic sequence generated by the Chebyshev mapping, which... Figure 3 —The distribution comparison of chaotic sequences generated by the three mappings provides intuitive verification. The figure clearly shows that, compared with the Logistic and Tent mappings, the point sequence generated by the Chebyshev mapping has a more uniform coverage on the two-dimensional plane, with no significant blank or clustered areas, thus theoretically supporting the claim that it can generate a better initial population.

[0190] S3: Construct the individual fitness function of the population, calculate the individual fitness value based on the initial population, and determine the current optimal individual position;

[0191] In this embodiment, the step of constructing the population individual fitness function, calculating the individual fitness value based on the initial population, and determining the current optimal individual position includes:

[0192] The objective function is set to minimize the total resource consumption of all task allocation schemes while meeting the basic traffic efficiency requirements of each traffic flow.

[0193]

[0194] Calculate the total time resource shortage for each node:

[0195]

[0196] in, Indicates control node Guiding traffic flow The comprehensive control resource loss matrix. Represents a node Control the amount of resource consumption per unit time; Assign variables to the task: If This indicates that the control node Responsible for guiding traffic flow ;like If the value is 0, it means that the node will not be assigned to execute the task. The total number of traffic flow tasks. To control the total number of nodes;

[0197] Based on the overall constraints of signal timing resources, a weighted penalty is applied to cases where time resources exceed the limits. By introducing a penalty term, hard constraints are transformed into soft constraints, and adaptive penalty weights are used to gradually increase the constraint pressure, thereby achieving dynamic adjustment.

[0198] The fitness function is expressed as:

[0199]

[0200] in, The fitness function; To control the overall amount of resource consumption; Used to quantify the total time resource shortage of each node as a penalty item; As weight;

[0201] The specific formula for calculation is as follows.

[0202]

[0203]

[0204]

[0205] In the formula, This represents the number of iterations, and also the corresponding time. This represents the maximum number of iterations, and also the node period. Represents a node Guiding traffic flow Duration required The corresponding amount of control resource consumption;

[0206] for :

[0207]

[0208] In the formula, Indicates control node The remaining available time resources; The maximum total green light time resource limit is preset for each node; Represents a node The total time required to execute all assigned tasks; where the summation range is all tasks that satisfy the given conditions. Traffic flow tasks, namely, assigning traffic to nodes The tasks are accumulated;

[0209] Calculate the fitness value of each individual in the population, and record the position of the individual with the best fitness as the current optimal solution.

[0210] Preferably, the fundamental purpose of constructing the population individual fitness function is to establish a quantitative evaluation model. This model can output a comprehensive evaluation value, called the fitness value, for any candidate solution generated by the algorithm, i.e., the pairing relationship between a specific traffic flow task and a control node. The smaller the fitness value, the better the overall performance of the solution while meeting the basic requirements. This process first establishes the ultimate goal of optimization.

[0211] In detail, the ultimate goal is modeled as a mathematical minimization problem: while satisfying the basic traffic efficiency requirements of each traffic flow, find the scheme that minimizes the total control resource loss among all possible task allocation schemes. This objective function relies on two pre-constructed core elements. The first is the comprehensive control resource loss matrix, whose elements... This represents the resource consumption that would occur if traffic flow i were guided by control node j. This value is determined by the minimum green light time required for this pairing. Control cost per unit time for node j Multiplying them together yields the result, i.e. .

[0212] The second is binary decision variables. This is used to describe a specific allocation scheme: if the scheme determines that node j guides traffic flow i, then... =1; otherwise =0. Therefore, for any given allocation scheme defined by a series of xij values, its total control resource consumption can be expressed by the formula:

[0213] Perform calculations, where The total number of traffic flow tasks. To control the total number of nodes, minimizing this sum is the direct mathematical objective of optimization.

[0214] However, the above objective function does not consider actual resource constraints. Therefore, a mechanism is needed to transform hard constraints into a form that can be handled during the optimization process. This invention achieves this by adding a penalty term to the objective function. Specifically, a penalty term is defined. This measures the "total shortage" of all control nodes under the current candidate scheme because the total task time allocated to them exceeds their own available time resource limit. For any control node j, its "remaining available time resources" are first calculated. This value is calculated by subtracting all resources allocated to it (i.e., those that meet the preset total green light time resource limit Ts) from the total green light time resource limit Ts. The sum of the times required for tasks =1) is obtained, i.e.

[0215]

[0216] like A negative number indicates that node j has exceeded its time resource limit; the absolute value of the overrun is the shortage amount for that node. Penalty term. That is, the sum of the shortages of all nodes, i.e. .

[0217] More specifically, to enable the algorithm to broadly explore the solution space in the early stages of the search and focus on high-quality solutions that satisfy the constraints in the later stages, the severity of the penalty needs to be dynamically adjusted. Therefore, an adaptive penalty weight is introduced. This weight It is not a constant, but rather increases gradually as the algorithm iterates. Its specific calculation method is as follows:

[0218]

[0219] in, It is the current iteration number. This is the preset maximum number of iterations. This is also interpreted as the node cycle of signal control, reflecting the correspondence between model parameters and actual traffic control scenarios. Therefore, in the initial stage of optimization ( (smaller) Smaller values ​​result in lighter penalties for solutions that violate constraints, allowing the algorithm to explore a wider range of possibilities; as iterations progress ( Approaching ), The value increases linearly, and the penalty for infeasible solutions increases sharply, thus strongly guiding the search to shrink towards the region of fully feasible solutions.

[0220] Combining the above two parts, the complete fitness function It is constructed as the sum of the target cost and the weighted penalty term, i.e.

[0221]

[0222] Here, FT(x) represents the aforementioned total control resource loss. The calculation results show that the fitness function simultaneously encodes the economic objective of "lowest cost" and the feasibility requirement of "no resource overrun".

[0223] In each iteration of the algorithm, a crucial operation needs to be performed: calculating the fitness value of each individual based on the current population. The specific process is as follows: Iterate through every whale individual in the current population; each individual encodes a candidate assignment scheme through its position vector. First, decode the individual's position to obtain its corresponding decision variable matrix, which contains each... The value can be 0 or 1. Next, two parallel computations are performed: based on the matrix, all... The position corresponding to =1 The total resource consumption of this scheme is obtained by summing them up. Based on the matrix, examine each control node j and summarize all the data assigned to it. The time required for the task (=1) is compared with the resource limit Ts of that node to calculate the resource shortage, and then the penalty term is obtained by summing the results. Simultaneously, an adaptive weight ν is obtained based on the current iteration number t. Finally, and The sums are used to obtain the individual's final fitness value. After calculating the fitness of all individuals in the population, the system compares all of them. The individual with the smallest value is identified as the current optimal individual, and its position code is recorded. This optimal individual will serve as a key reference guiding the direction of population evolution in subsequent iterations.

[0224] By constructing a composite fitness function that integrates a basic cost term, a resource overrun penalty term, and adaptive penalty weights, this method establishes an automated evaluation system capable of intelligently balancing the economy and feasibility of solutions. This system accurately guides the improved whale optimization algorithm to effectively search for high-quality task allocation schemes in a complex solution space. The rationality and effectiveness of this fitness function design are directly reflected in the overall optimization performance of the algorithm.

[0225] Figure 7 The results show that in 50 independent repeated experiments, the improved algorithm (ICWOA) using this fitness function consistently achieves a lower total system control cost compared to the basic algorithm (WOA), which proves that the function can reliably guide the search to a more cost-effective solution. Figure 8 The comparison of convergence curves shows that ICWOA can converge to a lower fitness value faster and more smoothly. This verifies that the function structure (especially the adaptive penalty mechanism) helps to achieve an efficient balance between exploration and development, thereby quickly approaching a high-quality feasible solution.

[0226] S4: The core control parameters of the dynamic update algorithm are used to update the whale behavior model based on the fitness value and the optimal individual position, so as to obtain the updated individual positions of the population.

[0227] In this embodiment, the core control parameters of the dynamic update algorithm are used to update the whale behavior model based on fitness values ​​and optimal individual positions to obtain the updated population individual positions, including:

[0228] Update the convergence factor:

[0229]

[0230] Update the prey encirclement coefficient:

[0231]

[0232] Updated bubble web attack coefficient:

[0233]

[0234] In the formula, t represents the number of iterations; and It is a coefficient vector and satisfies , It is a random direction distributed between [0,1]; t max It is the maximum number of iterations; It is the convergence factor;

[0235] Update the probability of the selected action:

[0236]

[0237]

[0238] In the formula, It is a random number within the range [0,1]. As an adaptive variable, by The commonly used value of 0.5 has been changed.

[0239] The location of individuals in the population is updated based on the updated parameters and the whale behavior model.

[0240] Preferably, the core control parameters of the dynamic update algorithm refer to the values ​​of a series of key mathematical variables that are recalculated and set according to the current iteration progress in each algorithm iteration cycle. The values ​​of these parameters directly affect the strategy and magnitude of individual position updates in subsequent steps, and are key to balancing global exploration and local development capabilities.

[0241] In detail, the first thing that needs to be updated is the convergence factor, denoted as . Convergence factor It is a scalar parameter whose value decreases linearly from its initial value to zero with each iteration. Specifically, it is expressed using the formula...

[0242] Perform the calculation. Where t represents the current iteration number, t max This indicates the preset maximum number of iterations. At the start of the iteration (t=0)... It equals 2; as t gradually increases to t max , The value decreases linearly from 2 to 0. Convergence factor. The decreasing property is used to control the rate at which the search range shrinks throughout the optimization process. A larger value encourages a wider range of exploration, while a smaller value indicates a focus on fine-grained development of local areas.

[0243] Next, based on the updated convergence factor Calculate the prey encirclement coefficient vector, denoted as The coefficient vector is obtained through the formula.

[0244]

[0245] Received. Here. It is a random vector, where each component is a random number uniformly distributed between 0 and 1. Because randomness, The value of will fluctuate within the interval [-a, a]. Coefficient vector The absolute value of | directly determines the individual's behavior pattern during update: when | When |≥1, individuals tend to conduct a global exploration, that is, to conduct a broad search far from the current optimal solution; when | When |<1, individuals tend to engage in local development, that is, move closer to the current optimal solution. Therefore, through Attenuation and The randomness of the search mode enables an automatic transition from a global exploration-oriented approach in the early stages to a local development-oriented approach in the later stages.

[0246] Then, it is necessary to calculate the bubble web attack coefficient vector, denoted as... The coefficient vector is obtained through the formula.

[0247]

[0248] Obtain. Here. It is another random vector that is uniformly distributed in the interval between 0 and 1. (Coefficient vector) A random perturbation component is introduced into the position update formula, mainly to enhance the diversity of search directions during the local development phase, help the algorithm explore more fully near the optimal solution, and avoid stagnation too early.

[0249] More specifically, this invention makes a significant improvement to the selection mechanism of the traditional whale algorithm by introducing a dynamic probability parameter for the selection behavior. The traditional algorithm uses a fixed threshold of 0.5 and random numbers... Determining behavior through comparison can lead to insufficient global search probability. The improved method first calculates a baseline value that increases linearly during iteration.

[0250]

[0251] this The value is no longer completely random, but starts at 0.3 in the early stages of the iteration and increases linearly to 0.8 as t increases. Simultaneously, an adaptive variable is introduced. To replace the fixed threshold of 0.5, Through formula

[0252]

[0253] Calculation. This design enables The optimization process involves larger values ​​in the early stages and smaller values ​​in the later stages, resulting in a greater combination in the early stages. This value significantly increases the probability that the algorithm will perform a global search; in the later stages, as... and The algorithm is more inclined to perform local development behavior due to the changes in constraints. This improvement effectively alleviates the premature local convergence problem caused by the dual constraints in traditional algorithms.

[0254] Finally, the individual population positions are updated based on the updated parameters and the whale behavior model. This step involves using the convergence factor calculated above for the current iteration. , prey coefficient vector Bubble web attack coefficient vector and by and The determined behavioral selection probability is used to recalculate and adjust the position vector (i.e., the encoded task allocation scheme) of each individual in the population according to the predefined whale optimization algorithm position update mathematical model, thereby generating a new generation of population.

[0255] This series of parameter updates and model applications together constitute the core driving force for the algorithm's directional and intelligent search for the optimal task allocation scheme in the solution space. This dynamic parameter update mechanism, as a key component of the entire improved whale optimization algorithm process, aims to guide the algorithm to efficiently and stably seek optimization. The effectiveness of this mechanism, and its synergistic effect with improvement strategies such as chaotic initialization and Lévy flight, jointly contributes to the improvement of the algorithm's overall performance. Figure 5 The complete algorithm flowchart shown is illustrated and verified.

[0256] In this embodiment, updating the location of individuals in the population based on the updated parameters and the whale behavior model includes:

[0257] Generate a random number that is uniformly distributed in the interval [0,1]. and adaptive variables Compare, based on the comparison results and coefficients The absolute value is used to execute the corresponding whale behavior model to calculate the updated individual position:

[0258] In dynamic probability and Under these conditions, an echolocation-based prey search is performed, and the individual positions are updated according to the following model to obtain the updated position vector:

[0259]

[0260] In the formula, t represents the number of iterations; This represents the location of the optimal solution; Indicates the position of the currently randomly generated solution; and It is a coefficient vector;

[0261] When the convergence coefficients satisfy the dynamic probability and At that time, a distance-aware progressive enclosing is performed, updating the individual position according to the following model to obtain the updated position vector:

[0262]

[0263] In the formula, Indicates the dynamically adjusted search step size;

[0264] When the convergence coefficients satisfy the dynamic probability At that time, a spiral bubble net contraction strategy is used to surround and capture prey. The updated individual position vector is calculated according to the following spiral position update equation:

[0265]

[0266] In the formula, Represents the spatial distance vector between an individual and the current optimal solution; b is the spiral morphology adjustment factor; l is... Random coefficients of a uniformly distributed interval.

[0267] Preferably, the updating of individual population positions based on the updated parameters and whale behavior model refers to a structured conditional judgment and mathematical calculation process. This process involves each individual in the population selecting one of three preset whale behavior models based on a set of random probabilities and parameter conditions, and recalculating the individual's position vector according to the mathematical equation corresponding to that model, thus generating a new candidate task allocation scheme code.

[0268] In detail, this process begins with the generation of a random event. First, a random number uniformly distributed in the interval between zero and one is generated for the individual to be updated, denoted as . Then, this random number... With another adaptive variable dynamically calculated by the iterative process A comparison is needed. Additionally, the coefficient vector calculated in the current iteration should also be considered. The absolute value of the value. Based on the comparison result and condition judgment, the individual will be guided to execute one of three different position update strategies.

[0269] The first strategy, when dynamic probability is satisfied... Less than adaptive variable And the coefficient vector When the absolute value of the value is greater than 1, the individual performs echolocation-based prey search behavior. This behavior simulates the process of whales randomly searching for prey in a vast ocean area, belonging to a global exploration mode. Its position update operation is performed according to the following mathematical model: an individual is randomly selected from the current population, and its position is denoted as the position vector of the random solution. Simultaneously, obtain the position vector of the currently discovered optimal solution. Using the previously updated coefficient vector sum coefficient vector Through the formula:

[0270]

[0271] To calculate the new position vector of the next generation of this individual. This formula drives the individual's position to move away from the current optimal region, which is determined by the optimal solution position, the random solution position, and the random coefficients. The aim is to expand the search range and explore new regions of the solution space.

[0272] The second strategy, when dynamic probability is satisfied... Less than adaptive variable However, the coefficient vector When the absolute value is less than or equal to 1, the individual performs a gradual encirclement behavior based on distance perception. This behavior simulates the process by which a whale, after locating the approximate position of its prey, gradually approaches and narrows the encirclement, representing a transitional mode that combines exploration and development. Its position update operation is performed according to another mathematical model: also based on a randomly selected individual position. Through formula

[0273]

[0274] To calculate the new position. In this formula, the expression... This constitutes a dynamically adjusted search step size, the direction and magnitude of which are influenced by a random vector. Modulation. Combined with coefficient vector The function of this update is to enable individuals to perform a relatively fine perturbation search in the vicinity of the current random solution, without completely deviating from the existing region, while exploring potential better advantages in the surrounding area.

[0275] The third strategy is when the dynamic probability... Greater than or equal to the adaptive variable At this time, the individual executes a spiral bubble web contraction strategy to surround and capture prey. This behavior mimics the humpback whale's final attack method of expelling bubbles to form a net, spiraling upwards to approach the prey; it belongs to a local exploitation mode. Its position update operation is implemented through a spiral position update equation: first, the current individual position and the position of the global optimum are calculated. The absolute value of the difference between the two solutions yields the spatial distance vector between the individual and the current optimal solution.

[0276] Then, this distance vector is multiplied by a spiral decay factor composed of a coupled exponential and cosine function, where b is a spiral shape adjustment factor used to control the tightness of the spiral, and l is a random coefficient uniformly distributed in the interval from zero to one, introducing randomness to each update. Finally, the calculation result is compared with the current optimal solution position. Add them together to get a new position vector. This equation causes the individual to perform a spiral, gradually shrinking local search around the current optimal solution, aiming to deeply explore the region where the current optimal solution is located and improve the accuracy of the solution.

[0277] More specifically, the entire process described above is performed independently for each individual in the population. Each position update transforms the abstract biomechanics of whale hunting into a concrete modification of the encoding scheme (i.e., the individual's position vector) through rigorous mathematical condition judgments and formula calculations. Through this mechanism, the algorithm can dynamically and adaptively balance global exploration and local exploitation, guiding the population to continuously evolve towards regions with better task allocation schemes in the solution space. This position update mechanism based on behavioral models is the core engine driving the iterative optimization of the algorithm.

[0278] S5: Introduce the Lévy flight perturbation mechanism to perturb and enhance the updated individual positions of the population, and obtain the perturbation-optimized individual positions;

[0279] In this embodiment, the introduction of the Lévy flight perturbation mechanism to enhance the perturbation of the updated individual positions in the population, resulting in perturbation-optimized individual positions, includes:

[0280] After updating the individual location, a random step size based on the Lévy distribution is introduced for perturbation. The formula for calculating the perturbed individual location is as follows:

[0281]

[0282]

[0283] In the formula, is the exponential parameter of the Lévy distribution; It is a gamma function; It is a random perturbation vector, which usually follows a standard normal distribution or a uniform distribution; For random perturbation vectors The Euclidean norm; Let Lévy's flight step size vector be denoted by . This is a traditional individual position vector; This is the new individual position vector obtained after introducing Lévy flight perturbation.

[0284] Preferably, in this embodiment, the introduction of the Lévy flight perturbation mechanism is a step to further enhance the population individuals that have already completed routine position updates. Its core lies in actively introducing a random walk perturbation based on the Lévy distribution after the traditional whale optimization algorithm executes behavioral models such as encirclement, search, or spiral attack and generates a new generation of individual positions. This mechanism aims to overcome the problem that traditional algorithms struggle to effectively escape from local extreme regions due to fixed or simply random step sizes, leading to search stagnation. Lévy flight, as a stochastic process with power-law properties, exhibits a heavy-tailed step size distribution, meaning that during the optimization search process, it can generate short-distance fine-grained exploration steps with a high probability, while also triggering long-distance jump searches with a low probability, thus balancing the dual needs of local development and global breakthrough.

[0285] In detail, the disturbance process is implemented through mathematical formulas. First, the Lévy flight step size vector needs to be calculated. The calculation formula involves combining multiple mathematical factors. Wherein, the symbols... The exponential parameter representing the Lévy distribution is a key adjustment factor, and its value directly affects the statistical properties of the generation step size distribution. The Kolmogorov-Smirnov test confirms that the optimal value of this parameter is 1.5, and good algorithm performance is generally obtained within the interval [0.3, 1.0]. denoted as the gamma function, a special function widely used in probability theory and statistics, used here to calculate the normalization constant involved in the definition of the Lévy distribution, ensuring that the generated random step size conforms to the theoretical form of the Lévy distribution.

[0286] symbol This represents a random perturbation vector, typically obtained by random sampling from a standard normal or uniform distribution, injecting randomness into the entire perturbation process. (Symbol) This represents the random perturbation vector. The Euclidean norm, which calculates the length or magnitude of the vector, is used to scale in the denominator of the formula, further adjusting the step size. By using the above parameters... Gamma function Random vectors and its norm Substituting the values ​​into the prescribed formula and performing the calculations, a random step-size vector conforming to the Lévy distribution is ultimately generated, denoted as . .

[0287] More specifically, in obtaining the Lévy flight step size vector Then, it is applied to the perturbation update of individual positions. Specifically, the operation involves taking the next-generation individual position vector previously calculated using the traditional whale behavior model and applying it to the perturbation update. This is then added to the previously calculated Lévy flight stride vector levy. After this addition, the position of each individual whale (i.e., each candidate task assignment scheme) in the solution space undergoes a random shift determined by the levy vector. This represents the unperturbed individual position generated by the traditional update rule; while the vector... This represents the enhanced new individual position obtained after introducing the Lévy flight perturbation.

[0288] The overall effect of this mechanism is a significant improvement in the algorithm's search capability in the solution space. For example... Figure 4 As shown in the “1000 Lévy flight step length distribution”, the step length sequence generated by Lévy flight contains a large number of dense short steps and a small number of significant long steps, which intuitively verifies its power-law characteristic of “short-distance fine exploration” and “long-distance jump breakthrough” coexisting.

[0289] During the optimization process, short step sizes help to refine the search around potential optimal solutions, improving solution accuracy; while occasionally longer step sizes help the algorithm escape potentially localized optima and explore more distant, unexplored regions in the solution space, effectively preventing premature convergence. This process directly addresses and solves the limitation of existing intelligent algorithms being "prone to local optima" as pointed out in the background and invention descriptions. By introducing Lévy flight perturbations, it enhances the algorithm's global optimization and breakthrough capabilities in the solution space.

[0290] S6: By using a population diversity maintenance strategy and a dimensional pinhole imaging reverse learning strategy, the positions of individuals after perturbation optimization are further optimized to obtain a diversity-preserving optimized population.

[0291] In this embodiment, the step of re-optimizing the individual positions after perturbation optimization using a population diversity maintenance strategy and a dimensional pinhole imaging reverse learning strategy to obtain a diversity-preserving optimized population includes:

[0292] Implement a population diversity maintenance strategy, and every 10 iterations, select the individual with the best current fitness. Perform a chaotic reset to generate a new optimal individual position. The calculation formula is as follows:

[0293]

[0294] in, It is a two-dimensional chaotic sequence; and These are the lower and upper bounds of the solution space, respectively;

[0295] Mapping outbound individuals to the nearest boundary surface of the d-dimensional solution space feasible region hypercube is mathematically expressed as:

[0296]

[0297] in, This is the upper boundary overflow indicator vector; This is the lower boundary overflow indicator vector; This is an indicator function; it takes the value 1 when the internal condition is true, and 0 otherwise.

[0298] A sequential pinhole imaging reverse learning mechanism is introduced to reduce inter-dimensional interference in high-dimensional optimization and enhance the diversity of the solution space. Its mathematical expression is as follows:

[0299]

[0300] in, Let be the upper and lower bound vectors of the solution space, respectively. This represents the ratio of the height of the virtual image to the height of the actual object in pinhole imaging.

[0301] By combining the above-mentioned population diversity maintenance strategy with the dimensional pinhole imaging reverse learning strategy, the positions of individuals after perturbation optimization are further optimized, thereby obtaining a diversity-preserving optimized population.

[0302] Preferably, this step is a key step in improving the whale optimization algorithm framework to prevent premature population convergence and maintain the vitality of solution space exploration. This process specifically includes two core operations: first, periodically performing chaotic reset on the optimal individual combined with strict boundary handling; second, using optical imaging principles for back-learning to generate more diverse candidate solutions. These strategies work together to alleviate the problem of population diversity decay caused by selection pressure during evolution, thereby effectively improving the algorithm's ability to escape local optima.

[0303] In detail, the first step is to implement a population diversity maintenance strategy. This strategy includes a periodically triggered chaotic reset operation. Specifically, during the algorithm iteration process, a fixed period is set, for example, triggering this operation once every 10 iterations. When the iteration number t satisfies an integer multiple of 10, i.e., t equals 10k, the system will select the individual with the best fitness value in the current record. The process is as follows: The calculation formula is... In the formula and These are the lower and upper bounds of the solution space, respectively. They define the upper and lower limits of the allowed values ​​for each decision variable, that is, the amount of time resources allocated by each control node to the traffic flow task, such as the available green light duration of the node. It is a two-dimensional chaotic sequence generated by the Chebyshev chaotic mapping.

[0304] like Figure 3 As shown, the sequence generated by the Chebyshev mapping exhibits better traversal uniformity. The essence of this operation is to leverage the traversal and randomness of chaotic sequences to randomly generate a new position for the current optimal individual within the boundary of the feasible solution space. This action breaks the search path dependency that might be caused by the current optimal solution, essentially introducing a new, high-quality initial point periodically during the optimization process, thereby proactively avoiding population strategy rigidity and decreased diversity.

[0305] More specifically, population diversity maintenance strategies also include standardizing individuals that may cross boundaries during the iteration process. Since position updates and perturbations may cause some whale individuals, i.e., certain task assignment schemes, to exceed the pre-defined feasible solution range, boundary constraints are necessary. The mathematical operation is expressed as follows: In this formula, Defined as an upper boundary out-of-bounds indicator vector, it is constructed by determining the value of the j-th dimension of the solution vector. If the value is greater than the corresponding upper bound, the function returns 1; otherwise, it returns 0, thus forming a vector of 0s and 1s that marks all dimensions that exceed the upper bound.

[0306] Similarly, This is a lower bound out-of-bounds indicator vector, used to mark all dimensional positions below the lower bound lj. This is an indicator function; its value is 1 when the condition within the parentheses is true, and 0 otherwise. The execution of this vector operation is as follows: First, subtract 1 from... Subtract We obtain a mask that marks the unbounded dimensions as 1 and the outbounded dimensions as 0. We multiply the original individual position x with this mask element by element, thus preserving the values ​​of the unbounded dimensions and clearing the values ​​of the outbounded dimensions to zero.

[0307] Then, for the upper bound portion, use the upper bound vector. and Element-wise multiplication yields a result with non-zero values ​​only in the upper bounded dimension; the same applies to the lower bounded portion. Finally, these three results are summed, effectively correcting each bounded dimension value to the boundary value it crossed, thus precisely mapping the bounded individual to the nearest boundary surface of the feasible region hypercube in the d-dimensional solution space. This operation ensures that all candidate solutions satisfy the actual physical constraints, such as the time window and resource quotas defined in step one.

[0308] In detail, a sequential pinhole imaging reverse learning mechanism is then introduced. This mechanism is a mathematical transformation that simulates the principle of pinhole imaging in optics, aiming to generate a reverse, diversified candidate solution for the current optimal solution. Its mathematical expression is as follows: In this formula, and These are the upper and lower bound vectors of the solution space, respectively, as mentioned above. and The meaning is the same, but in this context, it emphasizes its role as the boundary of the entire solution space. s represents the ratio of the virtual image height to the actual object height in pinhole imaging; it is a scaling factor, and in this paper, it is set to 1.

[0309] The formula works by finding the midpoint of each dimension of the solution space, i.e. and The average value is used as the central reference point of an "imaging screen"; then the current optimal individual position is calculated. Relative to the "opposite" position of the midpoint. Specifically, for the coordinates of the optimal solution in a certain dimension, this linear transformation will generate a new coordinate that is symmetric about the midpoint of that dimension or has a specific scaling relationship.

[0310] This process is performed independently dimension by dimension, thus achieving "dimensional-by-dimensional" operation, which helps reduce the mutual interference between different decision variable dimensions in high-dimensional optimization problems. By generating such reverse solutions, the algorithm can explore the opposite region or the insufficiently explored region where the current optimal solution is located, effectively expanding the search range and enhancing the diversity of population distribution in the solution space.

[0311] More specifically, through the combined effect of the aforementioned population diversity maintenance strategy and the dimensional pinhole imaging reverse learning strategy, the algorithm performs a deeper re-optimization of the individual positions after Lévy flight perturbation optimization. Periodic chaotic reset and boundary handling maintain population health from the perspectives of feasibility and search activity, while pinhole imaging reverse learning injects new possibilities from the perspectives of the breadth and opposition of solution space exploration. These steps work together to produce an optimized population whose diversity is effectively preserved.

[0312] This population not only includes better solutions generated through traditional updates and perturbations, but also novel solutions introduced through chaotic random regeneration and reverse learning mechanisms. This provides a richer and more promising search foundation for subsequent iterative optimization, significantly improving the algorithm's ability to find globally optimal or satisfactory solutions in complex order-based traffic control task allocation problems.

[0313] S7: Perform boundary processing and integerization on the population to maintain diversity optimization. Determine whether to end the optimization based on the preset iteration termination condition. If the condition is met, output the optimal task allocation scheme.

[0314] In this embodiment, the process of performing boundary processing and integerization on the diversity-preserving optimization population, and determining whether to terminate the optimization based on a preset iteration termination condition, includes:

[0315] For the decimal part of each individual position Generate random matrices of the same dimension and compare them: if the random number corresponding to a certain position is less than... Then the individual's location will be updated to:

[0316]

[0317] in, The position vector before the update. For the decimal part of the corresponding dimension, This is the integerized position vector;

[0318] An elite retention mechanism is implemented, comparing the fitness of individuals in the new generation with that in the previous generation, selecting and retaining the better solutions, and simultaneously updating the global optimal solution record;

[0319] The algorithm stops based on a preset maximum number of iterations and a convergence criterion. The convergence criterion is that the improvement rate of the optimal solution is lower than a set threshold for multiple consecutive generations.

[0320] If the termination criterion is not met, return to the parameter update phase to continue iterative optimization; otherwise, output the global optimal solution and its fitness value to form the optimal task allocation scheme.

[0321] Preferably, this embodiment details the complete process of final processing and optimization loop control of the population optimized by the diversity preservation strategy within the framework of the improved whale optimization algorithm. This process aims to transform the continuous optimization solution into an integer task allocation scheme that meets practical engineering requirements, intelligently determine the algorithm's termination time, and ultimately output the optimal solution. The following provides a detailed explanation of this step.

[0322] First, boundary processing and integerization of individual positions are performed. In the order-based traffic control task allocation problem, the position vectors generated by the algorithm's internal iterations are usually continuous values, but the final solution representing the node assignment relationship must be an integer. Therefore, an operation called random probability rounding is adopted. Specifically, for each individual position vector in the population, the fractional part xi of each dimension is extracted. Subsequently, a random matrix with the same dimension as the position vector is generated, where each element is a random number uniformly drawn within the interval [0,1].

[0323] Next, a dimension-by-dimensional comparison is performed: if the random number corresponding to a certain dimension position is less than the decimal part xi of that dimension, then this dimension position is updated to the formula. The result shown; otherwise, the dimension retains only its integer part. Wherein, This represents the position vector before the update. It is the decimal part of the current dimension. This is the new position vector after integerization. This strategy transforms the fractional part into a probabilistic event. For example, a dimension value of 3.7 has a 70% chance of becoming 4 and a 30% chance of remaining 3. Thus, while achieving integerization, it unbiasedly preserves the neighborhood search information in the continuous solution space, effectively avoiding the loss of optimization ability caused by simple truncation or rounding.

[0324] Secondly, an elite retention mechanism is implemented, which is a crucial selective inheritance action. Specifically, after completing the position update and obtaining a new generation of the population, the fitness value of each individual in the new generation is compared with the corresponding individual in the previous generation. The fitness value is calculated strictly according to the model constructed in this invention, i.e., the formula. Its goal is to minimize the weighted sum of total control resource consumption and penalty terms. Selectively retaining the better solution means that for each pair of individuals, the one with the smaller fitness value is retained for the next iteration, because a smaller fitness value represents a better task allocation scheme.

[0325] Simultaneously, throughout the entire iteration history, the record of the globally optimal solution is updated synchronously, meaning that the individual with the best fitness value in all generations and its position are continuously tracked and saved. This mechanism ensures that the optimal solution discovered in history is not destroyed by subsequent random updates, thus stably guiding the evolutionary direction of the entire population.

[0326] Then, the algorithm determines whether to terminate the optimization based on preset iteration termination conditions. These termination conditions include two parallel criteria: first, reaching a preset maximum number of iterations; and second, satisfying a convergence criterion, i.e., the improvement rate of the optimal solution is lower than a set threshold for multiple consecutive generations. The specific execution flow of this judgment is as follows: after each iteration, the algorithm calculates the improvement rate of the current global optimal solution's fitness value compared to the previous generation. When the average of this improvement rate is lower than a preset minimum positive threshold for multiple consecutive generations (e.g., 10 generations), the solution quality is considered to have stabilized, with no significant room for improvement, thus satisfying the convergence condition. The system comprehensively checks the current iteration count and the convergence status; if either condition is met, the optimization process is determined to end.

[0327] Finally, the branch operation is executed based on the judgment result. If the termination criterion is not met, the algorithm returns to the parameter update stage, that is, the convergence factor is dynamically updated according to the current iteration number. Encirclement coefficient The algorithm iteratively optimizes core parameters and continues based on the updated whale behavior model (encirclement, search, or bubble web attack). Otherwise, the algorithm terminates the iteration and enters the output phase. At this point, the algorithm outputs the recorded global optimal solution and its fitness value. This global optimal solution is an integer encoded vector that clearly indicates which control node should be responsible for guiding each traffic flow task, thus forming an optimal task allocation scheme that can be directly delivered to the traffic control center for execution. The performance of this scheme is quantified by its fitness value, i.e., the minimum total system control cost.

[0328] The overall effect of the steps described in this embodiment is that, through precise integer conversion, mandatory preservation of elite individuals, and dual intelligent termination criteria, the algorithm can efficiently and stably search for high-quality, executable integer solutions. Figure 6As shown in the order placement process timeline, the algorithm's final generated solution can complete the closed-loop process from order placement to execution within a 30-second response time, verifying its timeliness. Meanwhile, the data in Table 2, showing the optimization results for traffic control tasks of different scales, demonstrate that this method can output optimized solutions within sub-second timeframes when handling problems of varying scales, from small to very large road networks. Furthermore, the total control cost changes reasonably with increasing scale, proving that the overall algorithm embedded in this step possesses excellent scalability and practicality.

[0329] Table 2 Optimization results for traffic control tasks of different scales

[0330]

[0331] Please see Figure 2 This invention provides a task allocation system based on an improved whale optimization algorithm framework, comprising:

[0332] Matrix construction module: Used to construct the core traffic control matrix and encode the data based on traffic system parameters and control rules, to obtain the minimum travel time demand matrix, resource loss matrix and time constraint matrix;

[0333] Initialization module: used for population chaos initialization based on Chebyshev mapping, and generates a uniformly distributed initial population by combining the constraints of the traffic control core matrix;

[0334] The optimal selection module is used to construct the fitness function of individuals in the population, calculate the fitness value of individuals based on the initial population, and determine the current optimal position of individuals.

[0335] Parameter correction module: used to dynamically update the core control parameters of the algorithm, update the whale behavior model based on fitness value and optimal individual position, and obtain the updated individual position of the population;

[0336] Perturbation optimization module: Used to introduce the Lévy flight perturbation mechanism to perturb and enhance the positions of individuals in the updated population, resulting in perturbation-optimized individual positions;

[0337] The location optimization module is used to further optimize the individual locations after perturbation optimization by using population diversity maintenance strategies and dimensional pinhole imaging reverse learning strategies to obtain a diversity-preserving optimized population.

[0338] Task allocation module: Used to perform boundary processing and integerization on the diversity-preserving optimization population. It determines whether to end the optimization based on the preset iteration termination condition. If the condition is met, it outputs the optimal task allocation scheme.

[0339] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0340] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0341] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A task allocation method based on an improved whale optimization algorithm framework, characterized in that, Includes the following steps: S1: Based on traffic system parameters and control rules, construct the core traffic control matrix and encode the data to obtain the minimum travel time demand matrix, resource loss matrix, and time constraint matrix; based on traffic system parameters and control rules, construct the minimum travel time demand matrix, which is a binary matrix, recording control nodes. Guiding traffic flow Minimum required green light duration It satisfies the following formula: In the formula, This is the basic single-phase traffic efficiency. This indicates the number of interfering factors, and each type of interfering factor... The impact coefficient on traffic capacity is , This represents the required traffic efficiency threshold. The minimum green light time required to meet the traffic efficiency threshold requirements; Construct the resource loss matrix as follows: in: Represents a node Control the amount of resource consumption per unit time; This represents the total control resource loss caused by control node i guiding traffic flow j; This represents the minimum green light duration required for control node i to guide traffic flow j; Construct the time constraint matrix as follows: In the formula, Storage control node Traffic flow The permitted passage time window; Minimum passage time; Maximum passage time; Introduce resource constraints as follows: In the formula, For nodes The maximum available green light duration, To allocate traffic flow Green light time; Introducing a time constraint: The time constraint requires that the total time from task initiation to completion does not exceed the traffic flow. The maximum tolerable waiting time is as follows: In the formula, The time taken for the "request-allocation-response" process, For signal execution and traffic flow transit time; For traffic flow Maximum waiting tolerance time; Control uniqueness means that each traffic flow task is guided by only one control node at any given time. Introduce a control uniqueness constraint: each traffic flow task is guided by only one control node at any given time; S2: Population chaos initialization is performed based on Chebyshev mapping, and a uniformly distributed initial population is generated by combining the constraints of the traffic control core matrix. S3: Construct the individual fitness function of the population, calculate the individual fitness value based on the initial population, and determine the current optimal individual position; S4: The core control parameters of the dynamic update algorithm are used to update the whale behavior model based on the fitness value and the optimal individual position, so as to obtain the updated individual positions of the population. S5: Introduce the Lévy flight perturbation mechanism to perturb and enhance the updated individual positions of the population, and obtain the perturbation-optimized individual positions; S6: By using a population diversity maintenance strategy and a dimensional pinhole imaging reverse learning strategy, the positions of individuals after perturbation optimization are further optimized to obtain a diversity-preserving optimized population. S7: Perform boundary processing and integerization on the population to maintain diversity optimization. Determine whether to end the optimization based on the preset iteration termination condition. If the condition is met, output the optimal task allocation scheme.

2. The task allocation method based on the improved whale optimization algorithm framework according to claim 1, characterized in that, The process of initializing the population based on Chebyshev mapping, combined with the constraints of the traffic control core matrix, to generate a uniformly distributed initial population includes: Embedding the Chebyshev chaotic map into the WOA initialization phase enables a two-stage optimization mechanism. During the chaotic diffusion phase, chaotic sequences are generated using the Chebyshev mapping. ; in, For integer mapping order, This is the current iteration value; Normalize the chaotic sequence: Normalized chaotic sequence values Reconstructing a two-dimensional chaotic sequence from a one-dimensional sequence ; Two-dimensional chaotic sequence Mapped to the actual solution space, this forms an initial population that is uniformly distributed in the solution space; In the formula, The vector position for each individual; Let d represent the d-dimensional real space, which is a vector space consisting of d real components; and To constrain the boundary; yes The chaotic sequence after transforming from one-dimensional to two-dimensional.

3. The task allocation method based on the improved whale optimization algorithm framework according to claim 1, characterized in that, The construction of the population individual fitness function, which calculates individual fitness values ​​based on the initial population and determines the current optimal individual position, includes: The objective function is set to minimize the total resource consumption of all task allocation schemes while meeting the basic traffic efficiency requirements of each traffic flow. Calculate the total time resource shortage for each node: in, Indicates control node Guiding traffic flow The comprehensive control resource loss matrix. Represents a node Control the amount of resource consumption per unit time; This represents the minimum green light duration required for control node i to guide traffic flow j; Assign variables to the task: If This indicates that the control node Responsible for guiding traffic flow ;like If the value is 0, it means that the node will not be assigned to execute the task. The total number of traffic flow tasks. To control the total number of nodes; Based on the overall constraints of signal timing resources, a weighted penalty is applied to cases where time resources exceed the limits. By introducing a penalty term, hard constraints are transformed into soft constraints, and adaptive penalty weights are used to gradually increase the constraint pressure, thereby achieving dynamic adjustment. The fitness function is expressed as: in, The fitness function; To control the overall amount of resource consumption; Used to quantify the total time resource shortage of each node as a penalty item; As weight; The specific formula for calculation is as follows. In the formula, This represents the number of iterations, and also the corresponding time. This represents the maximum number of iterations, and also the node period. Represents a node Guiding traffic flow Duration required The corresponding amount of control resource consumption; for : In the formula, Indicates control node The remaining available time resources; The maximum total green light time resource limit is preset for each node; Represents a node The total time required to execute all assigned tasks; where the summation range is all tasks that satisfy the given conditions. Traffic flow tasks, namely, assigning traffic to nodes The tasks are accumulated; Calculate the fitness value of each individual in the population, and record the position of the individual with the best fitness as the current optimal solution.

4. The task allocation method based on the improved whale optimization algorithm framework according to claim 1, characterized in that, The core control parameters of the dynamic update algorithm are based on the fitness value and the optimal individual position to update the whale behavior model and obtain the updated population individual positions, including: Update the convergence factor: Update the prey encirclement coefficient: Updated bubble web attack coefficient: In the formula, t represents the number of iterations; and It is a coefficient vector and satisfies , It is a random direction distributed between [0,1]; t max It is the maximum number of iterations; It is the convergence factor; Update the probability of the selected action: In the formula, It is a random number within the range [0,1]. As an adaptive variable, by The commonly used value of 0.5 has been changed. The location of individuals in the population is updated based on the updated parameters and the whale behavior model.

5. A task allocation method based on an improved whale optimization algorithm framework according to claim 4, characterized in that, The process of updating the location of individuals in the population based on the updated parameters and the whale behavior model includes: Generate a random number that is uniformly distributed in the interval [0,1]. and adaptive variables Compare, based on the comparison results and coefficients The absolute value is used to execute the corresponding whale behavior model to calculate the updated individual position: In dynamic probability and Under these conditions, an echolocation-based prey search is performed, and the individual positions are updated according to the following model to obtain the updated position vector: In the formula, t represents the number of iterations; This represents the location of the optimal solution; Indicates the position of the currently randomly generated solution; and It is a coefficient vector; When the convergence coefficients satisfy the dynamic probability and At that time, a distance-aware progressive enclosing is performed, updating the individual position according to the following model to obtain the updated position vector: In the formula, Indicates the dynamically adjusted search step size; When the convergence coefficients satisfy the dynamic probability At that time, a spiral bubble net contraction strategy is used to surround and capture prey. The updated individual position vector is calculated according to the following spiral position update equation: In the formula, Represents the spatial distance vector between an individual and the current optimal solution; b is the spiral morphology adjustment factor; l is... Random coefficients of a uniformly distributed interval.

6. The task allocation method based on the improved whale optimization algorithm framework according to claim 1, characterized in that, The introduction of the Lévy flight perturbation mechanism enhances the perturbation of individual positions in the updated population, resulting in perturbation-optimized individual positions, including: After updating the individual location, a random step size based on the Lévy distribution is introduced for perturbation. The formula for calculating the perturbed individual location is as follows: In the formula, is the exponential parameter of the Lévy distribution; It is a gamma function; The vector is a random perturbation, which follows a standard normal distribution or a uniform distribution. For random perturbation vectors The Euclidean norm; Let Lévy's flight step size vector be denoted by . This is a traditional individual position vector; This is the new individual position vector obtained after introducing Lévy flight perturbation.

7. The task allocation method based on the improved whale optimization algorithm framework according to claim 1, characterized in that, The process involves re-optimizing the individual positions after perturbation optimization using a population diversity maintenance strategy and a dimensional pinhole imaging reverse learning strategy to obtain a diversity-preserving optimized population, including: Implement a population diversity maintenance strategy, and every 10 iterations, select the individual with the best current fitness. Perform a chaotic reset to generate a new optimal individual position. The calculation formula is as follows: in, It is a two-dimensional chaotic sequence; and These are the lower and upper bounds of the solution space, respectively; Mapping outbound individuals to the nearest boundary surface of the d-dimensional solution space feasible region hypercube is mathematically expressed as: in, This is the upper boundary overflow indicator vector; This is the lower boundary overflow indicator vector; This is an indicator function; it takes the value 1 when the internal condition is true, and 0 otherwise. A sequential pinhole imaging reverse learning mechanism is introduced to reduce inter-dimensional interference in high-dimensional optimization and enhance the diversity of the solution space. Its mathematical expression is as follows: in, Let be the upper and lower bound vectors of the solution space, respectively. This represents the ratio of the height of the virtual image to the height of the actual object in pinhole imaging. By combining the above-mentioned population diversity maintenance strategy with the dimensional pinhole imaging reverse learning strategy, the positions of individuals after perturbation optimization are further optimized, thereby obtaining a diversity-preserving optimized population.

8. The task allocation method based on the improved whale optimization algorithm framework according to claim 1, characterized in that, The process of performing boundary processing and integerization on the diversity-preserving optimized population, and determining whether to terminate the optimization based on a preset iteration termination condition, outputs the optimal task allocation scheme if the condition is met, including: For the decimal part of each individual position Generate random matrices of the same dimension and compare them: if the random number corresponding to a certain position is less than... Then the individual's location will be updated to: in, The position vector before the update. For the decimal part of the corresponding dimension, This is the integerized position vector; An elite retention mechanism is implemented, comparing the fitness of individuals in the new generation with that in the previous generation, selecting and retaining the better solutions, and simultaneously updating the global optimal solution record; The algorithm stops based on a preset maximum number of iterations and a convergence criterion. The convergence criterion is that the improvement rate of the optimal solution is lower than a set threshold for multiple consecutive generations. If the termination criterion is not met, return to the parameter update phase to continue iterative optimization; otherwise, output the global optimal solution and its fitness value to form the optimal task allocation scheme.

9. A task allocation system based on an improved whale optimization algorithm framework, used in accordance with the method described in any one of claims 1 to 8, characterized in that, include: Matrix construction module: Used to construct the core traffic control matrix and encode the data based on traffic system parameters and control rules, to obtain the minimum travel time demand matrix, resource loss matrix and time constraint matrix; Initialization module: used for population chaos initialization based on Chebyshev mapping, and generates a uniformly distributed initial population by combining the constraints of the traffic control core matrix; The optimal selection module is used to construct the fitness function of individuals in the population, calculate the fitness value of individuals based on the initial population, and determine the current optimal position of individuals. Parameter correction module: used to dynamically update the core control parameters of the algorithm, update the whale behavior model based on fitness value and optimal individual position, and obtain the updated individual position of the population; Perturbation optimization module: Used to introduce the Lévy flight perturbation mechanism to perturb and enhance the positions of individuals in the updated population, resulting in perturbation-optimized individual positions; The location optimization module is used to further optimize the individual locations after perturbation optimization by using population diversity maintenance strategies and dimensional pinhole imaging reverse learning strategies to obtain a diversity-preserving optimized population. Task allocation module: Used to perform boundary processing and integerization on the diversity-preserving optimization population. It determines whether to end the optimization based on the preset iteration termination condition. If the condition is met, it outputs the optimal task allocation scheme.

Citation Information

Patent Citations

  • Task allocation method based on whale optimization algorithm framework

    CN119904082A

  • ATMOSPHERIC DUCT INVERSION MODEL BASED ON WHALE-GENETIC FUSION OPTIMIZATION ALGORITHM AND USE THEREOF

    NL2037095A