A method and system for dynamic traffic flow analysis and signal optimization
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]针对现有技术的不足,本发明提供了一种交通流量动态分析与信号优化方法及系统,解决了现有技术缺乏系统性一致性校验,执行偏差无法自动检出,缺乏精准溯源与定量计算,参数更新采用直接覆盖方式,参数易因异常波动而退步的问题
1、本发明通过蚁群粒子群协同聚类与模糊隶属度分类的递进设计,消除对初始聚类中心的敏感性,以信息素增强实现两阶段信息深度融合,形成正反馈协同搜索,以模糊隶属度保留状态过渡信息,避免边界硬判决误判;四者联动使交通状态分类准确率显著提升,为后续信号优化提供高精度状态输入,优化器可根据隶属度分布提前感知状态转换趋势,信号调整的时效性与针对性大幅增强,进而联动提升母步骤四虚拟校验的修正效率与鲁棒性。
Smart Images

Figure CN122575127A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of swarm intelligence technology, and in particular to a method and system for dynamic analysis of traffic flow and signal optimization. Background Technology
[0002] Swarm intelligence refers to an intelligent computing paradigm inspired by the social group behavior of ants, flocks of birds, bees, and other social organisms. In existing technologies for traffic flow dynamic analysis and signal optimization, traffic flow data is generally collected and cleaned with simple thresholds first. Then, K-means clustering is used to identify traffic conditions. Subsequently, a single optimizer such as a genetic algorithm or particle swarm optimization algorithm is used for signal timing. After simple simulation evaluation, the optimization scheme is directly issued for execution. Finally, the execution deviation is coarsely adjusted. Existing technologies lack robustness quantitative verification, and their performance deteriorates sharply when there are sudden fluctuations in traffic or equipment malfunctions. In practice, detector failures can result in zero traffic output, and incorrect phase differences in the coordination scheme can lead to the breakup of traffic flow at consecutive intersections. In special cases where the pulse traffic at the end of an event exceeds the daily amplitude by 30%, existing technologies are prone to periodic saturation and deadlock, causing traffic congestion to spread rapidly to upstream intersections and paralyze the regional road network. During this period, the traffic efficiency of the entire area is extremely low and difficult to recover. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a method and system for dynamic traffic flow analysis and signal optimization, which solves the problems of existing technologies lacking systematic consistency verification, failing to automatically detect execution deviations, lacking accurate tracing and quantitative calculation, using direct overwrite method for parameter updates, and parameters being prone to regression due to abnormal fluctuations.
[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for dynamic analysis of traffic flow and signal optimization, the method comprising the following steps: collecting multi-source raw traffic flow data of the target traffic flow, and generating a preprocessed traffic flow dataset by cleaning and adaptive normalization based on the multi-source raw traffic flow data; Based on the preprocessed traffic flow dataset, uniform pheromone refinement is performed to obtain the particle swarm cluster center set. The particle swarm cluster center set is then encapsulated using elite pheromone standardization to obtain traffic state encapsulated data. The traffic state encapsulation data is processed by chaotic random attack to obtain the wolf pack attack position. Based on the wolf pack attack position, a signal timing scheme is generated by crossover and mutation trade-off decision selection. Virtual traffic simulation is performed based on signal timing schemes to obtain operational performance data. The operational performance data is then encapsulated and embedded with flavor concentration to generate a collaborative correction execution scheme. Based on the collaborative correction execution scheme, a redundancy compensation report is generated to obtain a calibration feedback report. Among them, the flavor concentration encapsulation and embedding of operational performance data includes: processing operational performance data and a set of variation signal schemes through flavor concentration determination to generate a scheme fitness value; The corrected signal scheme is obtained by performing weighted correction and perturbation test based on the scheme fitness value, the set of variant signal schemes and the signal timing scheme. The modified signal scheme is encapsulated and embedded to generate a collaborative modification execution scheme.
[0005] Preferably, the process of cleaning and adaptive normalization based on multi-source raw traffic flow data includes: cleaning the multi-source raw traffic flow data through anomaly detection to generate cleaned traffic flow data; Multidimensional feature extraction is performed on the cleaned traffic flow data to obtain traffic feature vectors; Adaptive normalization is performed on the traffic feature vectors to generate a preprocessed traffic flow dataset.
[0006] Preferably, uniform pheromone refinement is performed based on the preprocessed traffic flow dataset, including: uniform pheromone ant colony initialization based on the preprocessed traffic flow dataset, generating an initial pheromone matrix and an ant population; Based on the preprocessed traffic flow dataset, the initialized pheromone matrix, and the ant population, pheromone-inspired ant colony processing was performed to obtain the ant cluster center set. The particle swarm location is refined by processing the ant cluster center set to obtain the particle swarm cluster center set.
[0007] Preferably, the particle swarm cluster center set is encapsulated using elite pheromone standardization, including: generating a collaborative cluster center set by using elite pheromone enhancement processing based on the ant cluster center set, the particle swarm cluster center set, and the initial pheromone matrix; Fuzzy membership processing is performed based on the collaborative clustering center set and the preprocessed traffic flow dataset to generate traffic state classification results; The traffic status classification results are formatted and encapsulated to obtain traffic status encapsulated data.
[0008] Preferably, the traffic state encapsulation data is subjected to chaotic random attack processing, including: initializing the traffic state encapsulation data through chaotic sequence to obtain the bat population location and bat speed; Frequency-driven speed updates are performed based on data encapsulated from bat population location, bat speed, and traffic conditions to obtain the updated bat location. The updated bat locations are then randomly attacked by the alpha wolf to determine the wolf pack's attack locations.
[0009] Preferably, the selection is based on the wolf pack's attack position through a compromise decision via cross-mutation, including: obtaining the mixed population elite position by cross-mutation elite retention processing based on the updated bat position and wolf pack attack position; Pareto solution set is obtained by frontier evaluation and constraint processing based on the elite positions of mixed populations; A fuzzy compromise decision is made on the Pareto solution set to generate a signal timing scheme.
[0010] Preferably, virtual traffic simulation and deduction based on signal timing scheme includes: initializing virtual traffic construction according to the signal timing scheme to obtain a virtual traffic world; Based on the virtual traffic world and signal timing schemes, a set of mutated signal schemes is obtained through random mutation processing using fruit flies; Discrete event simulations were performed on the variable signal scheme set and the virtual traffic world to obtain operational performance data.
[0011] Preferably, the process of generating a redundancy compensation report based on the collaborative correction execution scheme includes: generating a consistency comparison report by performing redundancy verification processing according to the collaborative correction execution scheme; Based on the consistency comparison report, deviation source tracing and compensation processing is performed to generate a deviation compensation plan; The deviation compensation scheme is calibrated and a report is generated to obtain a calibration feedback report.
[0012] Preferably, the multi-source raw traffic flow data includes any one or more of the following: cross-sectional traffic flow, time occupancy, location speed, headway, and vehicle length.
[0013] The technical solution also provides a traffic flow dynamic analysis and signal optimization system, which includes: a preprocessing module, which collects multi-source raw traffic flow data of the target traffic flow, and generates a preprocessed traffic flow dataset by cleaning and adaptive normalization based on the multi-source raw traffic flow data; The state encapsulation module performs uniform pheromone refinement on the preprocessed traffic flow dataset to obtain a particle swarm cluster center set. The particle swarm cluster center set is then encapsulated using elite pheromone standardization to obtain traffic state encapsulation data. The timing module performs chaotic random attack processing on the traffic state encapsulation data to obtain the wolf pack attack position. Based on the wolf pack attack position, it selects the signal timing scheme through crossover and mutation trade-off decision-making. The collaborative correction module performs virtual traffic simulation based on the signal timing scheme to obtain operational performance data. It then encapsulates and embeds the operational performance data with flavor concentration to generate a collaborative correction execution scheme. The calibration module performs redundancy compensation report generation based on the collaborative correction execution scheme to obtain a calibration feedback report.
[0014] By employing the above technical solutions, the present invention provides a method and system for dynamic traffic flow analysis and signal optimization, which has at least the following beneficial effects: 1. This invention eliminates sensitivity to the initial cluster center through a progressive design of ant colony and particle swarm collaborative clustering and fuzzy membership classification. It achieves deep fusion of information in two stages by using pheromone enhancement to form a positive feedback collaborative search. Fuzzy membership retains state transition information and avoids false judgments by hard boundary decisions. The linkage of these four elements significantly improves the accuracy of traffic state classification, providing high-precision state input for subsequent signal optimization. The optimizer can perceive state transition trends in advance based on membership distribution, greatly enhancing the timeliness and targeting of signal adjustments. This, in turn, improves the correction efficiency and robustness of the virtual verification in the fourth step.
[0015] 2. This invention complements the wide-area exploration of bats with the fine-grained mining of wolf packs, simultaneously enhancing global and local search capabilities, and significantly improving convergence speed and solution quality. The Pareto mechanism preserves the complete non-dominated frontier of multiple objectives, and fuzzy compromise decision-making automatically adapts to changes in traffic conditions, eliminating the bias of manual weighting. The penalty function replaces the rejection strategy, maintaining population diversity and enhancing constraint adaptability. The linkage of these three elements enables accurate matching of the identified traffic conditions, providing a high benchmark starting point for subsequent social simulation corrections, significantly reducing verification costs, and significantly enhancing the engineering feasibility and robustness of the signal scheme. This ensures the efficiency and stability of the entire closed-loop process from the timing optimization stage.
[0016] 3. This invention enables the scheme to complete random adaptability verification before deployment through high-fidelity virtual simulation, eliminating the risk of differences between virtual and real environments. The fruit fly's olfactory and visual senses work together to upgrade the verification from passive verification to active optimization and correction, thus improving the quality of the scheme a second time. Robustness quantitative verification ensures that the scheme still operates stably under extreme fluctuations. The synergistic effect of these three factors makes the collaboratively corrected execution scheme have optimality, adaptability, and robustness, providing a highly reliable execution benchmark for subsequent steps and significantly reducing the frequency and magnitude of calibration.
[0017] 4. This invention automatically identifies and quantifies the consistency of the execution deviation between green light and traffic flow. After the deviation is detected, it automatically triggers proportional-integral-derivative precise compensation to eliminate accumulated steady-state error. Parameter updates absorb the compensation amount in an inertial smoothing manner to avoid jumps, so that the execution feedback forms a self-healing cycle. The calibration frequency and amplitude are continuously reduced, and the calibrated parameters are fed back to the next round of optimization iteration, so that the system has continuous self-learning ability and the signal control effect tends to be optimal as the running time increases. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a traffic flow dynamic analysis and signal optimization method according to the present invention; Figure 2 This is a structural block diagram of a traffic flow dynamic analysis and signal optimization system according to the present invention. Detailed Implementation
[0019] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.
[0020] Example 1: Due to the lack of systematic consistency verification in existing technologies, execution deviations cannot be automatically detected. Deviation compensation relies on manual experience, lacking precise traceability and quantitative calculation. Parameter updates use a direct overwrite method, failing to retain historical optimization results, and parameters are prone to regression due to abnormal fluctuations. Please refer to [the relevant documentation / reference]. Figure 1 This embodiment provides a method for dynamic analysis of traffic flow and signal optimization, which can perform system consistency verification, automatically detect, and accurately trace the source. The method includes the following steps: S1. Collect multi-source raw traffic flow data of the target traffic flow, and generate a preprocessed traffic flow dataset by cleaning and adaptive normalization based on the multi-source raw traffic flow data; Existing technologies for anomaly detection mostly rely on single-dimensional statistical thresholds, which have poor robustness in identifying high-dimensional isolated outliers, lack systematic utilization of frequency domain periodic features, and ignore the distance measurement bias caused by differences in units when fusing multiple features, resulting in low input quality for clustering and optimization stages; To solve the above problems, the specific implementation steps are as follows: S11. Based on the multi-source raw traffic flow data, anomaly detection and cleaning processes are performed to generate cleaned traffic flow data. In this step, the first step involves receiving the multi-source raw traffic flow data and constructing multiple random binary trees using an isolated forest for each sample flow vector. The number of edges traversed by the sample from the root node to the point of complete isolation in each tree is recorded as the path length, and the arithmetic mean of these path lengths is calculated to obtain the expected path length of the sample. The second step involves calculating the theoretical mean of the unsuccessful path lengths in the binary search trees based on the total number of samples participating in the modeling, and using this value as the standardization adjustment term for the path length. The third step involves dividing the expected path length by the standardization adjustment term, taking the negative of the resulting ratio as the exponent, and calculating the exponent raised to the power of 2 to obtain the anomaly score of the sample. When the anomaly score is higher than a preset judgment threshold, the sample is identified as an anomaly and removed. The remaining samples constitute the cleaned traffic flow data. Anomaly cleaning relies on the characteristic of isolated forests to isolate outliers earlier: normal traffic flow samples are clustered and have longer segmentation paths, while outlier samples deviate from the main body and have shorter segmentation paths, resulting in a lower expected path length. After normalization using a standardized adjustment term, the anomaly score is mapped to the interval 0 to 1, with scores closer to 1 indicating a higher probability of an anomaly. A judgment threshold of 0.6 effectively filters isolated outliers such as sensor step jumps and communication packet loss while retaining reasonable changes in traffic flow caused by random fluctuations, thus avoiding data distortion. The resulting cleaned traffic flow data is reliable and stable, providing high-quality data for subsequent state clustering and classification based on ant colony and particle swarm optimization. Inputs typically include cross-sectional traffic flow data, time occupancy, location speed, headway, and vehicle length uploaded by induction coils, geomagnetic sensors, microwave radar, and video detectors. They also include instantaneous location, instantaneous speed, direction of travel, and corresponding timestamps from vehicles equipped with GPS, such as taxis, ride-hailing vehicles, and logistics vehicles; traffic control and checkpoint data; traffic incident alarm information; visibility and road surface humidity data collected by meteorological sensors; and traffic-related trajectory or status data from mobile communication signaling and on-board diagnostic systems. The calculation of expected and theoretical mean path lengths is a common statistical calculation and will not be elaborated upon here.
[0021] S12. Based on the cleaned traffic flow data, multi-dimensional feature extraction is performed to obtain the traffic feature vector. In this step, the first step is to take a traffic flow sequence within an analysis period from the cleaned traffic flow data, calculate the arithmetic mean of all traffic flow values to obtain the traffic mean; then, subtract this mean from each traffic flow value, square the differences, calculate the arithmetic mean, and finally take the square root to obtain the traffic standard deviation; the second step is to perform a Fourier transform on the traffic flow sequence, take the modulus of the complex numbers of each frequency component after the transform, and find the maximum value as the peak value of the traffic spectrum; the third step is to directly calculate the average value of the time occupancy record and the average value of the spatial speed record within the time period from the cleaned traffic flow data to obtain the average time occupancy rate and the average spatial speed; these five values are arranged in order to form the traffic feature vector. These five features respectively characterize the intensity, dispersion, periodicity, occupancy level, and operational efficiency of traffic flow; the larger the standard deviation of traffic flow, the more severe the fluctuation of traffic flow; the spectral peak can capture regular pulses caused by signal periodicity; the analysis period length is 5 to 15 minutes depending on the signal control granularity, and the number of samples in the window is 5 to 15 when the original acquisition interval is 1 minute; this vector enables subsequent ant colony and particle swarm clustering to accurately distinguish between free flow, synchronous flow, and congested flow, providing reliable state input for bat-wolf pack optimization and improving the targeting of signal timing optimization.
[0022] S13. Adaptively normalize the traffic feature vectors to generate a preprocessed traffic flow dataset. The first step involves iterating through all traffic feature vectors extracted from the cleaned traffic flow data. For each dimension, the minimum and maximum values of all samples within that dimension are identified, forming the lower and upper limits of that dimension's values. The second step involves calculating the component difference for each dimension of each traffic feature vector, and the dimension span by subtracting the minimum value from the maximum value. The third step involves calculating the normalized value of the component by dividing the component difference by the dimension span. After processing all samples in this way, all the normalized vectors obtained together form the preprocessed traffic flow dataset. The operational logic is as follows: This normalization process is performed because the physical dimensions and value ranges of the five features—mean traffic flow, standard deviation traffic flow, peak spectral density, mean time occupancy, and mean spatial average speed—differ significantly. For example, the mean traffic flow may reach thousands of vehicles, while the mean time occupancy is only between 0 and 1. If directly input into subsequent ant colony and particle swarm collaborative clustering based on distance metrics, features with large values will dominate the clustering decision, distorting the traffic state classification results. By linearly compressing each feature to the 0-1 range, the contribution of each feature to the similarity calculation can be balanced, ensuring that ant colony pheromone guidance and particle swarm refinement are both established on a unified scale. This ensures that the division of free flow, synchronous flow, and congested flow is accurate and stable, providing reliable standardized input for downstream hybrid optimization of dynamic signal timing.
[0023] This invention replaces traditional thresholding with isolated forest anomaly detection, achieving high-precision filtering of isolated thresholds for multi-source traffic data and improving cleaning quality. It extracts five-dimensional feature vectors through statistical and frequency domain transformation, revealing traffic state differences from multiple dimensions and enhancing identification capabilities. It eliminates dimensional barriers using minimum-maximum normalization, ensuring that each dimension contributes equally to subsequent swarm intelligence optimization and avoiding bias. The synergy of these three aspects ensures that subsequent steps benefit from the overall improvement in input quality, fundamentally enhancing the accuracy and robustness of the entire process.
[0024] S2. Based on the preprocessed traffic flow dataset, uniform pheromone refinement is performed to obtain the particle swarm cluster center set. The particle swarm cluster center set is then encapsulated using elite pheromone standardization to obtain traffic state encapsulated data. Existing technologies are sensitive to the initial cluster centers. Random initialization can easily cause the results to fall into local optima. A single algorithm cannot balance global search and local refinement. Clustering accuracy and convergence speed cannot be achieved simultaneously. Hard classification ignores the gradual transition characteristics of traffic flow states, resulting in deterministic misjudgments at state boundaries. This provides distorted state input for downstream signal optimization and affects the overall optimization effect. To solve the above problems, the specific implementation steps are as follows: S21. Initialize the uniform pheromone ant colony based on the preprocessed traffic flow dataset to generate an initial pheromone matrix and ant population. In this step, the first step is to determine the size of the pheromone matrix based on the total number of samples in the preprocessed traffic flow dataset. The second step is to uniformly set the initial pheromone concentration between any two different samples in the matrix to the same preset constant value to complete the initialization of the pheromone matrix. The third step is to generate ant individuals according to a pre-given number, with each ant corresponding to a basic unit used to construct the cluster center solution. All ant individuals together constitute the ant population. The purpose of uniform pheromone distribution and random ant generation is to eliminate prior bias in the initial search phase, ensuring that any pair of samples has an equal probability of being selected as cluster centers in the early stages. This guarantees that the ant colony can conduct a full global exploration in the traffic flow feature space, avoiding the compression of the search range to a local area due to initial pheromone bias. The initial pheromone constant is usually between 0.01 and 0.1. This small value can prevent a certain path from accumulating too much pheromone too early, maintaining a balance between heuristic information and pheromone guidance. Setting the number of ants to 50 allows for the collection of sufficiently rich cluster center combinations in the preprocessed dataset covering various traffic states such as free flow, synchronous flow, and congested flow. This provides a diverse set of candidate solutions for subsequent particle swarm optimization and information interaction, ensuring the stability and accuracy of traffic state classification results.
[0025] S22. Based on the preprocessed traffic flow dataset, the initialized pheromone matrix, and the ant population, perform pheromone-inspired ant colony processing to obtain the ant cluster center set. In this step, firstly, for each ant in the ant population, a sample is randomly selected from the preprocessed traffic flow dataset as the current reference point; secondly, the Euclidean distance between the current reference point and each other sample in the dataset is calculated, and the reciprocal of this distance is taken as the heuristic information value between the two samples. The closer the distance, the greater the heuristic information; thirdly, for each candidate sample, the pheromone concentration at the corresponding position in the initialized pheromone matrix is multiplied by the heuristic information value multiplied by the heuristic weight power to obtain the attraction of the sample pair; then, the attraction of the current reference point and all candidate samples is summed as the denominator, and the single attraction is divided by the denominator to obtain the transition probability of the ant choosing the sample as the cluster center. The ants select according to this probability, and each ant forms a cluster center after completing the selection. The set of cluster centers of all ants constitutes the ant cluster center set. The operational logic is as follows: The transition probability mechanism integrates the collective experience accumulated by the ant colony with the local density information of the sample space. The pheromone weight is set to 1 to 3, and the heuristic weight is set to 2 to 5. The larger heuristic weight makes the ants more inclined to select cluster centers in dense areas in the early stage, which is consistent with the characteristics of free flow, synchronous flow and congested flow clustering within each of them in traffic flow data. The smaller the Euclidean distance of the sample, the greater the heuristic information value. Combined with the normalized five-dimensional feature vector, it ensures that samples with similar traffic states are more likely to be classified into the same cluster center coverage area. The resulting ant cluster center set provides a diverse set of solutions obtained after traversing the multi-dimensional feature space for downstream particle swarm optimization, avoiding the invalid flat region that the particle swarm may get stuck in during random initialization, and accelerating the subsequent refinement convergence.
[0026] S23. Refine the particle swarm positions of the ant cluster center set to obtain the particle swarm cluster center set. In this step, firstly, each cluster center in the ant cluster center set is taken as the initial position of a particle, and the initial velocity of each particle is set to zero. Secondly, in the current iteration, calculate three velocity components for each particle: firstly, the particle velocity at the previous moment × inertia weight = inertia component; secondly, (the particle's own historical best position - current position) × individual learning factor × first random number = individual cognitive component; finally, (the current global best position of the entire swarm - the particle's current position) × social learning factor × second random number = social cognitive component. Thirdly, inertia component + individual cognitive component + social cognitive component = the particle's current velocity. Fourthly, add the current velocity to the particle's current position to obtain its updated new position. Repeat steps two through four. After the iteration ends, the final set of all particle positions is the particle swarm cluster center set. The operational logic is as follows: the cluster centers constructed by the ant colony are used as the starting point for the search, and the optimization direction is guided by the coordinated action of three velocity components; the inertia weight is set from 0.4 to 0.9 and decreases successively to balance global exploration and local refinement; the individual learning factor and the social learning factor are both set from 1.5 to 2.5 to control the pace of learning towards the individual historical optimum and the global optimum of the group; two independently generated random numbers between 0 and 1 give the search randomness and help to break out of local optima. The number of iterations is usually set between 30 and 100, and this scheme is actually set to 69; the final generated particle swarm cluster center set has smaller intra-class distances and is closer to the density centers of each traffic state, which significantly improves the recognition accuracy of free flow, synchronous flow and congested flow.
[0027] S24. Based on the ant cluster center set, particle swarm cluster center set, and initial pheromone matrix, a collaborative cluster center set is generated through elite pheromone enhancement processing. In this step, the first step is to evaluate the fitness of each group of cluster centers in the ant cluster center set and particle swarm cluster center set. The fitness is the sum of the Euclidean distances from all samples in that group to their respective centers. The minimum value among all evaluation values is selected as the optimal objective function value. The second step is to divide a preset constant by the optimal objective function value to obtain the pheromone increment. The third step is to use (1 - volatile factor) × the current pheromone concentration of each pair of samples in the initial pheromone matrix = the decayed pheromone concentration. For sample pairs associated with the optimal cluster center, the pheromone increment is added to their decayed concentration to form an updated pheromone matrix. The optimal cluster center set indicated by the new matrix is then used as the collaborative cluster center set. In the traffic flow dynamic analysis and signal optimization method, this information interaction mechanism jointly evaluates the diverse solutions constructed by the ant colony and the high-quality solutions refined by the particle swarm. Through elite retention and pheromone enhancement, the optimal solution path is positively reinforced in the pheromone matrix. The volatile factor is set to 0.1 to 0.3 to avoid premature convergence caused by excessively strong historical pheromones. The constant is set to 1 to 10 to control the magnitude of pheromone increment, so that the enhancement intensity matches the fitness value. This process realizes the deep fusion of information between the ant colony and the particle swarm. The collaborative clustering center set inherits the local fine-grained advantage of the particle swarm while retaining the global exploration diversity of the ant colony, thereby more accurately capturing the true distribution center of free flow, synchronous flow and congested flow, providing a solid clustering foundation for subsequent traffic state identification.
[0028] S25. Based on the collaborative clustering center set and the preprocessed traffic flow dataset, perform fuzzy membership processing to generate traffic state classification results. In this step, the first step is to calculate the Euclidean distance between each sample in the preprocessed traffic flow dataset and each cluster center in the collaborative clustering center set. The second step is to use the distance from each sample to a specific cluster center as the numerator, and divide it by the distances from that sample to all cluster centers to obtain a set of distance ratios. Each distance ratio^2 / (fuzzy factor - 1) = power value. The third step is to sum 1 / all power values = the membership degree of the sample to that cluster center. The fourth step is to compare the membership degrees of the sample to all cluster centers, and use the traffic state category of the cluster center corresponding to the maximum membership degree as the classification label of the sample. After all samples are classified, the results are summarized to form the traffic state classification results. Fuzzy membership discrimination can truly reflect the gradual transition between free flow, synchronous flow and congested flow, avoiding misjudgments at the critical state point; the fuzzy factor is taken from 1.5 to 3.0, the larger the value, the smoother the membership, preserving the uncertainty of state transition; the distance ratio is summed after exponential weighting and the reciprocal is taken to comprehensively incorporate the distance relationship of all cluster centers; the output traffic state classification results provide fine state input for subsequent hybrid optimization steps, enabling the optimizer to adjust signal parameters according to state category and membership distribution, improving the adaptability of timing scheme to complex scenarios.
[0029] S26. Standardize and encapsulate the traffic state classification results to obtain traffic state encapsulated data. The first step involves extracting the state label, data collection timestamp, and detector location information for each sample from the traffic state classification results. The second step involves structurally recording the state labels and spatiotemporal information according to a unified field format, forming a complete data entry for each sample containing a time identifier, spatial identifier, and traffic state category. The third step involves summarizing all the structured data entries for all samples into a standardized dataset, i.e., traffic state encapsulated data, for direct use in subsequent steps. The processing logic is as follows: Although the encapsulation step does not involve any additional computation, its standardization role is crucial to the entire method. The unified spatiotemporal labels and state category formats enable subsequent hybrid optimization to accurately index the traffic status of the current time period and the current intersection, avoiding mismatches in state matching due to inconsistent data formats. The encapsulated dataset maintains a one-to-one correspondence with the preprocessed traffic flow dataset, making upstream and downstream data traceable. This standard interface design allows for flexible connection between different optimization modules or simulation platforms, enhancing the modularity and scalability of the overall method, and ensuring the smooth operation of the entire closed-loop of swarm intelligence from the data flow perspective.
[0030] This invention addresses the problem of traffic state clustering being sensitive to initial centers and prone to getting trapped in local optima due to random initialization, leading to state partitioning bias. In practice, K-means clustering misclassifies some synchronous flows as free flows during off-peak hours, causing the optimizer to time traffic according to low flow rates when the actual density is already close to saturation, resulting in queue overflow. This invention uses ant colony pheromone guidance to fully explore and construct diverse solutions in the feature space, and then refines them to the optimal solution using particle swarm optimization. This not only eliminates initial sensitivity but also makes the state input more accurate, thereby enhancing the timeliness of the optimizer's response during critical transitions.
[0031] In practice, this invention addresses the limitations of single algorithms in simultaneously addressing global exploration and local refinement. Ant colony optimization is slow, and particle swarm optimization is prone to premature convergence. In practice, during peak periods, particle swarm optimization prematurely loses diversity, cluster centers remain in suboptimal positions, the congestion identification range is too small, and signal diversion is insufficient. This invention achieves a three-stage synergy of ant colony exploration, particle swarm optimization, and pheromone enhancement, complementing global and local capabilities. This not only improves both accuracy and speed but also allows for early detection of center drift during the transition from synchronous flow to congested flow. This linkage enables the optimizer to start adjustments before congestion occurs, significantly enhancing peak-hour diversion efficiency. This invention improves upon existing technologies where hard classification ignores gradual transitions between traffic flow states, leading to deterministic misclassifications at boundaries. In practice, when synchronous flow transitions to congested flow, occupancy increases, but hard classification still classifies it as synchronous flow, causing the optimizer to maintain the original scheme and resulting in a sharp decrease in capacity. In special cases where accidents cause a sudden drop in traffic flow and occupancy saturation in congested areas, samples are located between the centers of free flow and congested flow, making hard classification prone to misclassification as free flow. This invention preserves state uncertainty through fuzzy membership, allowing the optimizer to introduce a safety margin and enhance the robustness of boundary disturbance checks in subsequent virtual verification steps, ensuring the adaptability of the scheme during state transitions.
[0032] S3. The traffic state encapsulation data is subjected to chaotic random siege processing to obtain the wolf pack siege position. Based on the wolf pack siege position, a crossover mutation trade-off decision is made to generate a signal timing scheme. Existing technologies are prone to getting stuck in local optima or slow convergence. Multi-objective optimization relies on fixed weights and cannot adapt to dynamic changes in traffic state. The constraint processing adopts a rejection strategy, which leads to the loss of good genes and a decrease in population diversity. The search efficiency and solution quality are limited. To solve the above problems, the specific steps are as follows: S31. Based on the traffic state encapsulation data, the location and speed of the bat population are obtained through chaotic sequence initialization processing. In this step, the first step is to extract the traffic state category of the current time period and the current intersection from the traffic state encapsulation data, and determine the effective range of signal timing parameters based on this category, including the cycle duration and the upper and lower limits of the green light duration for each phase. The second step is to generate a random number between the minimum and maximum frequencies as the frequency difference; the minimum frequency + this frequency difference = the search frequency of the individual bat. This process is repeated independently for each bat to obtain its own search frequency. The third step is to randomly generate a set of encoded vectors containing parameters such as green light duration and cycle duration for each bat within the range of signal parameter values, as the initial position of that bat. All bat positions constitute the bat population location. Simultaneously, the initial speed of all bats is set to zero vectors, constituting the bat speed. The processing logic is as follows: the chaotic sequence initialization replaces the fixed initial value with random generation, so that the bat population is evenly distributed in the legal value space of the signal parameters, ensuring that the search starting point covers multiple possible timing combinations and avoiding the omission of potential optimal solutions due to the concentration of initial positions; the minimum frequency is set to 0 to 0.2, and the maximum frequency is set to 0.8 to 1.0. The frequency value affects the step size of speed update, with smaller frequencies focusing on fine search and larger frequencies promoting wide-area exploration; the range of signal parameters is set according to the current traffic state category. For example, the upper limit of the cycle time can be widened to 180 seconds in congested state and narrowed to 60 seconds in free flow state, so that the optimization search closely follows the actual control requirements; the bat population position and speed generated in this way provide a starting point with both diversity and state adaptability for the subsequent global search of bats and local development of wolf packs, accelerating the convergence of high-quality signal timing schemes.
[0033] S32. Based on the data encapsulated by bat population location, bat speed, and traffic status, frequency-driven speed update is performed to obtain the updated bat location. In this step, the first step is to evaluate the fitness of all individual bats in the bat population location, find the individual with the best fitness, and take its location as the current global optimal bat location. The second step is to calculate the current speed of each bat as (its current location - the global optimal bat location) × the search frequency determined in the initialization phase + the speed of the bat. The third step is to calculate the updated location as the current location of each bat + its current speed. The updated locations of all bats together constitute the updated bat location. The processing logic is as follows: The frequency-driven update mechanism enables individual bats to move widely in the search space with the global optimal solution as the guiding direction; the search frequency has been randomly generated in sub-step 3.1 within the range of minimum frequency 0 to 0.2 and maximum frequency 0.8 to 1.0. The higher the frequency value, the greater the contribution of the position difference to the speed, and the larger the stride of the individual towards the optimal solution, which is conducive to quickly crossing the invalid area; the lower the frequency value, the slower the movement, which is conducive to fine search in the current area; all bats gather towards the current optimal position, while maintaining the difference in search stride due to the different frequencies, so that the population can converge quickly without completely losing diversity; the updated bat positions provide a set of candidate points throughout the high-quality solution area for the downstream wolf pack to besiege the local development, accelerating the wolf pack's fine mining near the global optimum and improving the efficiency of signal timing scheme optimization.
[0034] S33. After updating the bat positions, perform a random siege process using a wolf luring the alpha wolf to obtain the wolf pack's siege position. In this step, the first step is to treat all individuals in the updated bat positions as a wolf pack, calculate the fitness of each individual, and find the best one as the alpha wolf. The second step is to use the alpha wolf position - the wolf's current position = luring direction vector, and the base step size × step size contraction factor × luring direction vector = displacement towards the alpha wolf. The third step is to generate a random number and multiply it by the perturbation range as a random perturbation term. Add the alpha wolf's luring displacement and the random perturbation term to the wolf's current position to obtain the new position after the wolf's siege. The updated positions of all individuals constitute the wolf pack's siege position. The alpha wolf luring and random encirclement mechanism uses the high-quality solution area after the global search by the bats as the starting point for the wolf pack's in-depth exploration. The alpha wolf calls and guides all individuals to move towards the current optimal solution, achieving fine-grained local exploration. The step size shrinkage factor is set from 0.01 to 0.1, gradually decreasing with iteration, so that the encirclement range gradually shrinks from a large initial size to a small area near the optimal solution, balancing development speed and accuracy. The random number is usually a uniformly distributed random value between 0 and 1. The basic step size is set according to the range of signal parameter values, usually one-hundredth to five-hundredths of the upper limit of the cycle duration. The perturbation range is set from 0 to one-tenth of the basic step size, giving individuals a small random offset to jump out of the local flat area. The wolf pack encirclement position generated in this way is searched at high density near the global optimal solution, so that the phase duration and cycle parameters of the signal timing scheme are close to the true optimal value.
[0035] S34. Based on the updated bat positions and wolf pack attack positions, the elite positions of the mixed population are obtained through crossover and mutation elite retention. In this step, the first step is to merge the updated bat positions and wolf pack attack positions into a mixed population Hh_ZQ, where the fitness of each individual is GT_sy = 1 / (delay weight a × average delay y_w + parking weight b × average number of parkings A_c). In the second step, the fitness of GT_sy / the sum of the fitness of all individuals in the mixed population Hh_ZQ, ZH_sy = the probability of the individual being selected, Gt_gl. Individuals are selected from the mixed population with this probability to perform crossover and mutation operations, generating new signal timing scheme individuals, which are then added to the mixed population Hh_ZQ. In the third step, the expanded mixed population Hh_ZQ is sorted from high to low fitness GT_sy, and a preset number of individuals with the highest fitness GT_sy are retained to form the elite positions of the mixed population. The processing logic is as follows: the crossover mutation and elite retention mechanism integrates heterogeneous solutions from the wide-area search of bats and the local siege of wolf packs. Crossover is performed by selecting parents based on fitness probability, allowing the recombination of high-quality signal parameter combinations discovered at different search stages, generating new solutions with both global vision and local accuracy. The mutation operation applies a small random perturbation to a certain phase duration of the selected individual with a probability of 0.05 to 0.2 to prevent population homogenization. The weights for delay and parking frequency in fitness evaluation are set according to the control objectives: the delay weight is 0.6 to 0.8 and the parking frequency weight is 0.2 to 0.4 during congested periods, and vice versa during free-flow periods. The number of elites retained typically accounts for 10% to 20% of the total mixed population size, ensuring that the optimal solution is not lost due to random operations. This provides high-quality candidate solutions for subsequent frontier evaluation, improving both the computational efficiency and solution set quality of multi-objective non-dominated sorting.
[0036] S35. Based on the elite positions of the mixed population, frontier evaluation and constraint processing are performed to obtain the Pareto optimal solution set. In this step, the first step is to determine the penalty value. If the cycle duration or phase green light duration of the individual's encoding exceeds the preset upper and lower limits, the maximum constant is taken; otherwise, zero is taken. The second step is to calculate the comprehensive fitness evaluation value as follows: Delay weight × Average vehicle delay + Stop weight × Average number of stops + Penalty value. The third step is to compare all individuals in the elite positions of the mixed population pairwise. If an individual's average delay and average number of stops are not inferior to another individual and at least one of them is strictly better, then that individual dominates the other individual. All individuals not dominated by any individual are extracted as the first level of non-dominated layer, forming the Pareto optimal solution set. The processing logic is as follows: This non-dominated sorting and penalty function mechanism optimizes delay and number of stops as independent objectives in parallel, rather than forcibly merging them into a single scalar; the penalty value is on the order of 9999 to directly eliminate infeasible solutions that violate the minimum green light duration or maximum cycle duration constraints, ensuring that all individuals entering the Pareto sort are engineering feasible solutions; delay weight and stop weight are only used for the initial screening of the comprehensive fitness evaluation value and do not enter the non-dominated comparison logic, and the determination of the dominance relationship is based solely on the two original indicators of average delay and average number of stops; the final Pareto solution set completely preserves the non-dominated solutions with different trade-off preferences between the two objectives, providing a rich candidate pool for downstream fuzzy trade-off decisions, enabling the optimal signal timing scheme to be flexibly selected according to actual control needs, taking into account both traffic efficiency and driving smoothness.
[0037] S36. Perform fuzzy compromise decision-making on the Pareto solution set to generate signal timing schemes; The first step in this process is: for each scheme in the Pareto optimal solution set, extract its average vehicle delay value and average number of stops, and take the minimum and maximum values of all schemes in the Pareto solution set for that objective. The ratio of current value minus minimum value / maximum value minus minimum value equals the membership degree of each objective. The ideal membership vector has a delay membership degree of 1 and a stop membership degree of 1. The second step is: the Euclidean distance between the scheme membership vector and the ideal membership vector = ((delay membership degree - 1)). 2 +(Parking membership degree - 1) 2 ) 1 / 2 Step 3: Traverse all schemes in the Pareto solution set and select the scheme with the smallest Euclidean distance as the optimal signal timing scheme. The scheme contains complete timing parameters such as the green light duration, period duration and phase difference of each phase. The operational logic is as follows: the fuzzy compromise decision-making mechanism automatically selects the compromise scheme closest to the ideal point from the Pareto solution set, avoiding the subjective bias of manual weighting; the membership degree construction adopts linear normalization to map both delay and parking number to the interval of 0 to 1, so that the two objectives are equal in scale in the distance calculation; the ideal membership degree vector takes 1 and 1 to represent the dual pursuit of minimum delay and minimum parking, and the Euclidean distance minimum criterion ensures that the selected scheme does not have extreme bias in both delay and parking objectives; the optimal signal timing scheme output thus has both low delay and low parking characteristics, providing a high starting point benchmark scheme for subsequent social simulation and fruit fly virtual verification, so that subsequent corrections only need fine-tuning to adapt to random fluctuations, significantly reducing the computational cost and correction range of the verification process.
[0038] This invention addresses the challenges of single algorithms in simultaneously addressing global exploration and local development, as well as the slowness of genetic algorithms and the tendency of particle swarm optimization to premature convergence. In practice, genetic algorithms often suffer from loss of diversity in the later stages of signal timing optimization during peak hours, leading to local optima and insufficient cycles during traffic surges, resulting in upstream queuing overflow. This invention utilizes a bat-like wide-area exploration strategy to cover multiple high-quality regions, while a wolf pack alpha leads a high-density attack, resulting in improved convergence speed and solution quality. Furthermore, the coordinated approach ensures that the virtual verification in the fourth step of the parent algorithm is performed at a high starting point, significantly reducing the correction magnitude and the number of iterations, thus improving overall efficiency. This invention addresses the problem of fixed weights in existing multi-objective optimization techniques, which cannot adapt to changes in traffic conditions. In practice, at a certain intersection, the weights for delay and parking are each set to 0.5. During off-peak hours, traffic flow is sparse but phase switching is frequent, leading to unnecessary parking and increased fuel consumption. This invention preserves the complete non-dominated solution set through Pareto sorting and automatically selects the solution closest to the ideal point through fuzzy compromise decision-making, eliminating the blindness of manual weighting. It also links with the state classification of S2, making the solution set prioritize low delay during congestion and low parking during free flow, so that the timing scheme accurately matches real-time needs. This invention effectively solves the problems of directly discarding infeasible solutions, losing superior genes, and declining population diversity caused by rejection strategies in constraint handling. In practice, when the minimum green light time is 15 seconds, individuals are eliminated because their phase is slightly below the constraint, and their advantages in other phases are lost. The population is forced to search a narrow range, resulting in a delay of about 10%. In special cases where construction causes a sudden drop in traffic capacity and constraints are increased, a large number of original high-quality solutions are eliminated, the optimizer searches from zero, and the timing is not suitable for a long time. This invention replaces the rejection strategy with a penalty function, imposing a large penalty on individuals that violate the rules, causing them to be naturally eliminated but preserving genes for crossover and mutation. This maintains diversity while quickly adapting to constraint changes, and enhances the robustness of subsequent multi-scenario perturbation tests, ensuring that the solution is stable and efficient under various constraints.
[0039] S4. Based on the signal timing scheme, virtual traffic simulation is performed to obtain operational performance data. The operational performance data is then encapsulated and embedded with flavor concentration to generate a collaborative correction execution scheme. Existing technologies have simplified simulation environments that cannot reproduce the randomness and multi-agent interaction of real traffic. The adaptability of the scheme is difficult to assess in advance. Verification is only carried out through evaluation of a single scheme, which lacks neighborhood optimization and correction, thus missing the space for performance improvement. The robustness of the scheme lacks quantitative verification, and the performance deteriorates sharply when there are sudden fluctuations in traffic or equipment malfunctions. The verification process is seriously out of touch with engineering practice. To solve the above problems, the specific steps are as follows: S41. Initialize the virtual traffic world through virtual traffic construction based on the signal timing scheme. The first step in this process is to construct a virtual traffic world in computer memory that corresponds one-to-one with the real intersections, based on the actual road network topology, number of lanes, and approach channelization scheme. Static elements such as lanes, stop lines, and detector locations are instantiated. The second step involves loading a group of vehicle agents into the virtual traffic world, assigning each vehicle attributes such as origin, path, and desired speed, and configuring car-following and lane-changing models as micro-driving behavior rules for the vehicle agents. The third step involves loading a signal control agent into the virtual traffic world, setting its phase scheme, phase sequence, and phase difference parameters to the corresponding values in the optimal signal timing scheme. This ensures that the signal agent strictly follows this scheme to switch light colors. The collection of all vehicle agents, pedestrian agents, and signal agents constitutes an agent society. The construction steps of the virtual traffic world use the optimal signal timing scheme as the control logic of the signal agent, ensuring that the signal response in the simulation environment is completely consistent with the actual scheme to be implemented. The car-following model adopts an intelligent driver model, with an expected headway of 0.8 to 1.5 seconds, a maximum acceleration of 1.5 to 3.0 m / s², and a comfortable deceleration of 1.0 to 2.0 m / s². The lane-changing model adopts a strategy that minimizes the overall braking-induced lane-changing, with a cooperation coefficient of 0.3 to 0.7 for lane-changing decisions, to realistically reflect the traffic flow evolution under different driving styles. The virtual traffic world and intelligent agent society constructed in this way provide a high-fidelity digital experimental platform for downstream fruit fly olfactory mutation and social simulation, enabling statistically consistent operational performance data for each mutated signal scheme to be obtained before being deployed to real intersections, ensuring the transferability and engineering reliability of the verification conclusions. The virtual world can be implemented using open-source SUMO and commercial software such as VISSIM and Aimsun Next.
[0040] S42. Based on the virtual traffic world and signal timing scheme, a set of mutated signal schemes is obtained through random mutation processing using fruit flies. The first step involves using the cycle length and green light duration of each phase in the optimal signal timing scheme as the baseline signal vector. The second step involves independently generating a uniformly distributed random perturbation value for each component of the baseline signal vector within the interval from the negative maximum mutation amplitude to the positive maximum mutation amplitude. The perturbation values of all components constitute a random perturbation vector with the same dimension as the baseline signal vector. The third step is: Mutated signal scheme = baseline signal vector + random perturbation vector. The fruit fly population size is G. This process is repeated G times, and all the resulting mutated schemes together constitute the set of mutated signal schemes. The computational logic is as follows: the fruit fly olfactory random mutation mechanism simulates the behavior of fruit flies randomly scattering and searching near food sources using their sense of smell. Based on the optimal signal timing scheme, multiple perturbation schemes are generated in its neighborhood as candidate correction directions. The maximum mutation amplitude is set to 10 to 15 seconds for the cycle length and 3 to 8 seconds for the green light duration of each phase. This range can cover the timing deviation caused by random fluctuations in real traffic flow without causing the mutation schemes to deviate too far from the benchmark and lose their reference value. The fruit fly population size G, i.e., the number of mutation schemes, is set to 20 to 50 to ensure the neighborhood search density while controlling the computational cost of subsequent social simulation. The mutation scheme set provides a sufficient and diverse set of test samples for downstream multi-agent interactive inference, enabling the schemes to complete the pre-screening of their adaptability to random disturbances before being deployed to real intersections.
[0041] S43. Perform discrete event simulation on the set of variable signal schemes and the virtual traffic world to obtain operational performance data. The first step in this process is to load each scheme in the set of variable signal schemes into the signal control agent in the virtual traffic world as the current execution scheme. Vehicle agents and pedestrian agents in the agent society operate freely in the virtual traffic world according to predetermined car-following rules and path selection. The second step involves advancing in discrete time steps, updating the position, speed, and state of all agents in each time step, while the signal control agent switches light colors according to the phase sequence of the current scheme. The third step is to statistically analyze the operational data of all vehicle agents during the simulation period after the simulation ends. Average delay = total actual travel time of all vehicles / total number of vehicles - total free-flow travel time of all vehicles / total number of vehicles; average number of stops = total number of stops of all vehicles / total number of vehicles; traffic capacity = total number of vehicles passing through the intersection during the simulation period / simulation period duration. These three factors together constitute the operational performance data. In the discrete event multi-agent simulation, multiple perturbation schemes generated by fruit fly olfactory mutations are compared and evaluated with high fidelity in a unified virtual environment. The average delay reflects the impact of the signal scheme on the convoy's traffic efficiency, the average number of stops reflects the smoothness of driving, and the throughput reflects the intersection's throughput level. The simulation period is set to 15 to 30 minutes to cover the complete signal cycle and eliminate the initial loading effect. The simulation warm-up time is set to 5 to 10 minutes to allow the system to enter a steady state before data collection begins. Each mutation scheme is run independently once for a complete simulation. The resulting performance data provides an objective and quantitative fitness evaluation basis for downstream fruit fly visual positioning, ensuring that the final output modified scheme can still maintain low delay and high traffic efficiency under random traffic flow fluctuations.
[0042] S44. Based on the operational performance data and the set of variant signal schemes, a scheme fitness value is generated through flavor concentration determination. The first step in this process is: for each scheme in the set of variant signal schemes, extract its corresponding average delay value, average number of stops, and capacity value from the operational performance data; the second step is: flavor concentration = 1 / (delay weight × average delay + stop weight × average number of stops - capacity weight × capacity); the third step is: calculate the flavor concentration value for each variant scheme, and the flavor concentration values of all schemes constitute the scheme fitness value. The processing logic is as follows: The odor concentration judgment function integrates the three performance indicators of delay, number of stops, and traffic capacity into a single fitness scalar. In the denominator, delay and number of stops are positive, indicating that the smaller the value, the better; and traffic capacity is negative, indicating that the larger the value, the better. This allows the three indicators to be evaluated collaboratively under a unified dimension. The weights for delay are 0.4 to 0.6, for stops 0.2 to 0.3, and for traffic capacity 0.2 to 0.3, with the sum of the three weights being 1. Under congested conditions, the upper limit of the delay weight is used to prioritize traffic efficiency, while under free-flow conditions, the upper limit of the traffic weight is used to focus on road network throughput. The higher the odor concentration, the better the overall performance of the scheme. This value directly reflects the overall adaptability of the scheme in the virtual social simulation, providing an objective and quantitative basis for selection of the best option for downstream fruit fly visual positioning and weighted correction.
[0043] S45. Based on the scheme fitness value, the mutated signal scheme set, and the signal timing scheme, perform weighted correction and perturbation testing to obtain the corrected signal scheme. The first step in this process is to identify the individual with the highest taste concentration from the scheme fitness values Fa_sy as the optimal mutated scheme, i.e., the optimal taste concentration ZY_by. Simultaneously, extract the taste concentration value W_N of the optimal signal timing scheme under the same simulation conditions as the benchmark fitness, i.e., the benchmark taste concentration JZ_sy. The second step is to calculate the weighting coefficient φ = optimal taste concentration ZY_by / (optimal taste concentration ZY_by / (optimal taste concentration ZY_by)). Step 3: Corrected signal scheme XZ_xh = weighting coefficient φ × signal timing scheme XH_ps + (1 - weighting coefficient φ) × optimal flavor concentration ZY_by; Step 4: Apply multiple sets of independent random perturbations to the phase duration t and period T of the corrected signal scheme XZ_xh, and statistically analyze the variance F_C of the performance index under multiple perturbations. If the variance F_C is lower than the preset threshold M, the corrected signal scheme is output; otherwise, the original weighting coefficient φ is slightly adjusted and recalculated. The operational logic is as follows: The optimal guided weighted correction mechanism of fruit flies uses the ratio of taste concentration to determine the fusion weight of the baseline scheme and the optimal mutation scheme. When the fitness of the optimal mutation scheme is much higher than that of the baseline, the weighting coefficient approaches 0, allowing the correction scheme to fully absorb the mutation advantage. When the two are close, the weighting coefficient approaches 0.5 to achieve balanced fusion. The weighting coefficient automatically adapts and adjusts within the range of 0 to 1 without manual intervention. The multi-scenario disturbance test simulates the random fluctuations of real traffic flow in a Monte Carlo manner. The disturbance amplitude is taken as 3% to 5% of the phase green light duration t_g and cycle duration T_z, and the variance threshold is taken as 0.05 to 0.1, corresponding to the reasonable fluctuation range of the performance indicators. The small adjustment of the weighting coefficient φ follows the principle of step-by-step trial and error and directional correction, with the single adjustment step size set between ±0.01 and ±0.05. This mechanism is linked to subsequent feedback calibration, and the output correction scheme has its own robustness certification, which significantly reduces the risk of performance degradation caused by random disturbances during actual execution.
[0044] S46. Encapsulate and embed the modified signal scheme to generate a collaborative correction execution scheme. The first step involves parsing the green light duration, cycle duration, and phase difference parameters for each phase from the modified signal scheme and converting them into a pair of phase sequence numbers and durations recognizable by the signal controller. The second step involves calculating the difference between the current operating scheme and the modified signal scheme in each phase duration, dividing the difference into multiple adjustment steps according to a preset transition step size, and generating a sequence of intermediate signal schemes with gradual transitions. The transition step size = maximum adjustment amount per instance, and the number of adjustment steps = (target duration - current duration) / transition step size rounded up. The third step involves concatenating the target phase execution table of the modified signal scheme and the transition scheme sequence in chronological order, encapsulating them into a complete instruction sequence executable by the signal controller, thus forming the collaborative correction execution scheme. The processing logic is as follows: The protocol encapsulation and transition scheme embedding steps convert the theoretical timing parameters optimized by the algorithm into engineering instructions that can be directly loaded by the roadside signal control equipment. The transition step size is adjusted by 1 to 3 seconds of green light duration per second to avoid traffic disruption caused by abrupt phase changes during scheme switching. The total duration of the transition process is controlled within 1 to 3 signal cycles to ensure the smooth implementation of the new scheme. The phase execution table contains complete timing parameters such as phase sequence, green light duration for each phase, yellow light duration, and red light clearing duration, which are compatible with the standard signal control protocol. The modified scheme, which has undergone social simulation verification and robustness certification, is output in an engineering-usable form, so that subsequent steps can be directly executed by the signal control system and feedback data can be collected.
[0045] This invention addresses the issue that while the optimal solution performs well in simulations, it lacks verification against the randomness of real traffic, resulting in a significant decrease in effectiveness after actual deployment. In practice, the particle swarm optimization solution reduces simulation delay by 20%, but because it does not consider the random aggregation and dispersion of traffic flow, the actual reduction is only 5%. This invention constructs a high-fidelity virtual traffic world for multi-agent inference, which not only improves the accuracy of adaptive prediction of the solution but also significantly reduces the frequency of feedback calibration in subsequent steps.
[0046] In practice, this invention addresses the problem that existing technologies only evaluate a single solution during verification, lacking neighborhood optimization and missing opportunities to improve performance. In practice, the optimal solution is directly issued for a certain intersection without searching for alternative solutions within a five-second interval, thus missing out on better solutions. This invention achieves integrated verification and correction through fruit fly olfactory neighborhood variation and visual positioning. The weighted fusion solution outperforms the single benchmark solution in terms of delay, parking, and traffic capacity.
[0047] This invention avoids the problem of existing solutions lacking robustness quantitative verification, which leads to drastic performance degradation when traffic fluctuates suddenly or equipment malfunctions. In practice, detector failures can result in zero traffic output, and incorrect phase differences in the coordination scheme can cause continuous traffic flow to break up at intersections. In special cases where the pulse traffic at the end of an event exceeds the daily amplitude by 30%, the scheme can become saturated and deadlocked. This invention verifies the anti-disturbance capability by verifying the performance variance through multiple sets of disturbances and dynamically adjusts the robustness threshold according to traffic conditions, ensuring reliability and efficiency in various scenarios.
[0048] S5. Based on the collaborative correction execution scheme, a redundancy compensation report is generated and processed to obtain a calibration feedback report. Existing technologies lack systematic consistency verification, execution deviations cannot be automatically detected, deviation compensation relies on manual experience, lacks accurate traceability and quantitative calculation, parameter updates adopt a direct overwrite method, historical optimization results cannot be retained, and parameters are prone to regression due to abnormal fluctuations. To solve the above problems, the specific implementation steps are as follows: S51. Based on the collaborative correction execution plan, a consistency comparison report is generated through redundancy verification. The first step in this process is to extract the planned green light duration and predicted flow rate from the collaborative correction execution plan, and extract the actual green light duration and measured flow rate from the execution feedback results. The second step is green light matching determination: calculate the absolute value of the difference between the actual green light duration and the planned green light duration, and determine if this value is less than the planned green light duration × tolerance threshold coefficient = tolerance threshold. If it is less, then green light matching = 1; otherwise, = 0. The third step is flow rate matching determination: calculate the absolute value of the difference between the actual flow rate and the predicted flow rate, and determine if this value is less than the predicted flow rate × flow rate threshold coefficient = tolerance threshold. If it is less, then flow rate matching = 1; otherwise, = 0. Green light matching and flow rate matching together constitute the consistency comparison report. The calculation logic is as follows: Triple redundancy verification determines the consistency of the scheme execution by cross-comparing two dimensions: green light duration and traffic flow. The tolerance threshold coefficient is set to 0.05. The green light tolerance threshold is set to 5% of the planned green light duration, corresponding to the normal fluctuation range of signal execution error and communication delay. The traffic flow tolerance threshold is set to 0.1 of the predicted traffic flow, covering the random fluctuation range of traffic flow itself. When both dimensions match 1, it indicates that the scheme is executed as expected and the traffic response meets the prediction. If either dimension is 0, it triggers subsequent deviation tracing and compensation calculations. This comparison mechanism provides an objective execution consistency criterion for the entire process, enabling the system to automatically identify scheme execution deviations and initiate calibration in a timely manner, ensuring the continuous and stable operation of the swarm intelligence optimization closed loop.
[0049] S52. Based on the consistency comparison report, perform deviation source tracing and compensation processing to generate a deviation compensation scheme. In this step, the first step is to extract the green light duration deviation or flow deviation from the consistency comparison report as the current deviation value. The second step is to calculate the cumulative deviation sum = the sum of the recent deviation values and the deviation change rate = the current deviation value - the deviation value of the previous period. The third step is to calculate the deviation compensation amount = proportional gain × current deviation value + integral gain × cumulative deviation sum + differential gain × deviation change rate. The calculation results constitute the deviation compensation scheme. The operational logic is as follows: This proportional-integral-derivative (PID) compensation algorithm performs the required correction for the deviation through a three-part collaborative quantization scheme. The proportional term responds immediately to the current deviation, the integral term eliminates the steady-state error accumulated over long periods, and the derivative term suppresses the rapid change trend of the deviation to prevent overshoot. The proportional gain is set to 0.3 to 0.6, the integral gain to 0.05 to 0.15, and the derivative gain to 0.1 to 0.3. The three gain values follow the tuning principle of proportional dominating the response speed, integral assisting in eliminating steady-state error, and derivative damping oscillation. The deviation accumulation and the use of a sliding window to retain the historical deviation of the last 5 to 10 periods avoid integral saturation. This compensation mechanism is linked to the consistency comparison, which is automatically triggered when any matching judgment is 0. It can correct the execution deviation in real time and feed the compensation amount back to the initial parameters of the next round of optimization, forming a self-healing calibration.
[0050] S53. Perform parameter calibration and report generation processing on the deviation compensation scheme to obtain a calibration feedback report. The first step in this step is to extract the deviation compensation amount from the deviation compensation scheme and obtain the reference signal parameters used in the previous cycle. The second step is to calculate the new parameter after calibration as follows: new parameter after calibration = smoothing coefficient × reference parameter of the previous cycle + (1 - smoothing coefficient) × deviation compensation amount. The third step is to package the new parameter after calibration, along with the judgment results of green light matching and flow matching in the consistency comparison report and the calculation process of the compensation amount in the deviation compensation scheme, into a calibration feedback report. The exponentially weighted moving average update mechanism balances the contribution ratio of historical benchmark parameters and current compensation amounts to the new parameters using a smoothing coefficient. The smoothing coefficient is set between 0.7 and 0.9 to give the parameter updates inertia and smooth transition characteristics, avoiding drastic parameter jumps caused by abnormal fluctuations in a single compensation amount. The compensation amount weight is set between 1 and the smoothing coefficient, i.e., 0.1 to 0.3, so that the new parameters gradually absorb the current deviation correction information without overreacting. The calibration feedback report summarizes the complete consistency criteria, deviation source tracing results, and parameter update values of this round of scheme execution, providing benchmark parameter inputs with historical experience accumulation for the next round of optimization iteration. This enables the entire process of collective intelligent closed loop to have self-learning and self-calibration capabilities, continuously approaching the true optimal control state of traffic flow.
[0051] This invention addresses the problems of existing technologies, such as lack of consistency verification, reliance on manual error compensation for deviations, and loss of historical results due to direct parameter overwriting. In practice, signal delays are not detected, leading to optimization errors; manual compensation ignores cumulative trends and actually amplifies deviations; and high-quality parameters are directly replaced by outliers due to detector malfunctions. This invention quantifies consistency through triple redundancy verification and dual-dimensional comparison, and uses proportional-integral-derivative compensation to output precise compensation values, achieving a smooth transition, forming a self-healing cycle, reducing calibration frequency, accelerating convergence by inheriting historical experience, and enhancing the system's self-learning ability.
[0052] Example 2: Because existing technologies lack systematic consistency verification, execution deviations cannot be automatically detected, deviation compensation relies on manual experience, and there is a lack of precise traceability and quantitative calculation. Parameter updates use a direct overwrite method, historical optimization results cannot be retained, and parameters are prone to regression due to abnormal fluctuations. Please refer to [link / reference needed]. Figure 2 The diagram shown is a structural block diagram of a traffic flow dynamic analysis and signal optimization system provided in this embodiment. The system includes a preprocessing module, a state encapsulation module, a timing module, a collaborative correction module, and a calibration module. The preprocessing module collects multi-source raw traffic flow data of the target traffic flow and generates a preprocessed traffic flow dataset by cleaning and adaptive normalization based on the multi-source raw traffic flow data. The state encapsulation module performs uniform pheromone refinement on the preprocessed traffic flow dataset to obtain a particle swarm cluster center set. The particle swarm cluster center set is then encapsulated using elite pheromone standardization to obtain traffic state encapsulation data. The timing module performs chaotic random attack processing on the traffic state encapsulation data to obtain the wolf pack attack position. Based on the wolf pack attack position, it selects the signal timing scheme through crossover and mutation trade-off decision-making. The collaborative correction module performs virtual traffic simulation based on the signal timing scheme to obtain operational performance data. It then encapsulates and embeds the operational performance data with flavor concentration to generate a collaborative correction execution scheme. The calibration module performs redundancy compensation report generation based on the collaborative correction execution scheme to obtain a calibration feedback report.
[0053] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code, including but not limited to disk storage, CD-ROM, optical storage, etc.
[0054] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for dynamic analysis of traffic flow and signal optimization, characterized in that, The steps of this method are as follows: collect multi-source raw traffic flow data of the target traffic flow, and generate a preprocessed traffic flow dataset by cleaning and adaptive normalization based on the multi-source raw traffic flow data; Based on the preprocessed traffic flow dataset, uniform pheromone refinement is performed to obtain the particle swarm cluster center set. The particle swarm cluster center set is then encapsulated using elite pheromone standardization to obtain traffic state encapsulated data. The traffic state encapsulation data is processed by chaotic random attack to obtain the wolf pack attack position. Based on the wolf pack attack position, a signal timing scheme is generated by crossover and mutation trade-off decision selection. Virtual traffic simulation is performed based on signal timing schemes to obtain operational performance data. The operational performance data is then encapsulated and embedded with flavor concentration to generate a collaborative correction execution scheme. Based on the collaborative correction execution scheme, a redundancy compensation report is generated to obtain a calibration feedback report. Among them, the flavor concentration encapsulation and embedding of operational performance data includes: processing operational performance data and a set of variation signal schemes through flavor concentration determination to generate a scheme fitness value; The corrected signal scheme is obtained by performing weighted correction and perturbation test based on the scheme fitness value, the set of variant signal schemes and the signal timing scheme. The modified signal scheme is encapsulated and embedded to generate a collaborative modification execution scheme.
2. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, The process involves cleaning and adaptive normalization of multi-source raw traffic flow data, including: cleaning and processing the multi-source raw traffic flow data through anomaly detection to generate cleaned traffic flow data. Multidimensional feature extraction is performed on the cleaned traffic flow data to obtain traffic feature vectors; Adaptive normalization is performed on the traffic feature vectors to generate a preprocessed traffic flow dataset.
3. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, The process of refining uniform pheromones based on the preprocessed traffic flow dataset includes: initializing the uniform pheromone ant colony based on the preprocessed traffic flow dataset, generating an initial pheromone matrix and an ant population. Based on the preprocessed traffic flow dataset, the initialized pheromone matrix, and the ant population, pheromone-inspired ant colony processing was performed to obtain the ant cluster center set. The particle swarm location is refined by processing the ant cluster center set to obtain the particle swarm cluster center set.
4. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, The particle swarm cluster center set is encapsulated using elite pheromone standardization, including: generating a collaborative cluster center set by enhancing the ant cluster center set, the particle swarm cluster center set, and the initial pheromone matrix with elite pheromone. Fuzzy membership processing is performed based on the collaborative clustering center set and the preprocessed traffic flow dataset to generate traffic state classification results; The traffic status classification results are formatted and encapsulated to obtain traffic status encapsulated data.
5. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, The traffic state encapsulation data is subjected to chaotic random attack processing, including: initializing the traffic state encapsulation data through chaotic sequence to obtain the bat population location and bat speed; Frequency-driven speed updates are performed based on data encapsulated from bat population location, bat speed, and traffic conditions to obtain the updated bat location. The updated bat locations are then randomly attacked by the alpha wolf to determine the wolf pack's attack locations.
6. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, The selection of elite positions in the mixed population is based on a compromise decision made through cross-mutation, including: based on the updated bat positions and wolf pack attack positions, the elite positions in the mixed population are obtained by cross-mutation elite retention. Pareto solution set is obtained by frontier evaluation and constraint processing based on the elite positions of mixed populations; A fuzzy compromise decision is made on the Pareto solution set to generate a signal timing scheme.
7. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, Virtual traffic simulation based on signal timing scheme includes: initializing virtual traffic construction according to the signal timing scheme to obtain a virtual traffic world; Based on the virtual traffic world and signal timing schemes, a set of mutated signal schemes is obtained through random mutation processing using fruit flies; Discrete event simulations were performed on the variable signal scheme set and the virtual traffic world to obtain operational performance data.
8. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, The process of generating a redundancy compensation report based on the collaborative correction execution scheme includes: generating a consistency comparison report by performing redundancy verification based on the collaborative correction execution scheme; Based on the consistency comparison report, deviation source tracing and compensation processing is performed to generate a deviation compensation plan; The deviation compensation scheme is calibrated and a report is generated to obtain a calibration feedback report.
9. The method for dynamic analysis of traffic flow and signal optimization according to claim 1, characterized in that, Multi-source raw traffic flow data includes one or more of the following: cross-sectional traffic flow, time occupancy, location speed, headway, and vehicle length.
10. A system applied to the traffic flow dynamic analysis and signal optimization method according to any one of claims 1-9, characterized in that, The system includes: The preprocessing module collects multi-source raw traffic flow data of the target traffic flow and generates a preprocessed traffic flow dataset by cleaning and adaptive normalization based on the multi-source raw traffic flow data. The state encapsulation module performs uniform pheromone refinement on the preprocessed traffic flow dataset to obtain a particle swarm cluster center set. The particle swarm cluster center set is then encapsulated using elite pheromone standardization to obtain traffic state encapsulation data. The timing module performs chaotic random attack processing on the traffic state encapsulation data to obtain the wolf pack attack position. Based on the wolf pack attack position, it selects the signal timing scheme through crossover and mutation trade-off decision-making. The collaborative correction module performs virtual traffic simulation based on the signal timing scheme to obtain operational performance data. It then encapsulates and embeds the operational performance data with flavor concentration to generate a collaborative correction execution scheme. The calibration module performs redundancy compensation report generation based on the collaborative correction execution scheme to obtain a calibration feedback report.