An adaptive traffic signal control method and device, an electronic device, and a medium

By evaluating and adjusting a cluster of traffic signal control models offline, and supplementing this with similarity data from historical and new datasets, the model's decision-making capabilities are optimized. This addresses the data dependency and computational burden issues of reinforcement learning in traffic signal control, thereby improving control effectiveness and applicability.

CN116824887BActive Publication Date: 2026-02-10CHONGQING ZHILU YUNXING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310814476.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-04
Publication Date
2026-02-10
Estimated Expiration
2043-07-04

AI Technical Summary

Technical Problem

Existing reinforcement learning methods in traffic signal control suffer from problems such as strong data dependence, high real-time computational burden, huge trial-and-error costs, and poor control performance, especially in real-world environments where they are difficult to achieve effective traffic signal optimization.

Method used

By acquiring historical and new traffic datasets, traffic signal control model clusters are evaluated and adjusted offline. Combined with dataset similarity supplementation and model evaluation, the model's decision-making ability is optimized, the dependence on real-time data is reduced, and the applicability and control effect are improved.

Benefits of technology

Evaluating and adjusting model clusters under offline conditions reduces reliance on real-time data, decreases computational burden, improves the applicability and effectiveness of traffic signal control, and reduces the cost of trial and error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116824887B_ABST
    Figure CN116824887B_ABST
Patent Text Reader

Abstract

The present application relates to adaptive traffic signal control method, device, electronic equipment and medium, the adaptive traffic signal control method obtains historical traffic data set, new traffic data set and first traffic signal control model cluster, the decision-making ability of first traffic signal control model cluster is evaluated offline according to historical traffic data set and new traffic data set, obtain first evaluation result, adjust first traffic signal control model cluster in combination with first evaluation result and new traffic data set, the similarity between the segment feature distribution of historical traffic data set and the overall feature distribution of new traffic data set is calculated, the decision-making ability of second traffic signal control model cluster is evaluated offline through new traffic data set, obtain second evaluation result, determine traffic signal output phase and the duration of traffic signal output phase according to second evaluation result;The present application reduces the dependence on real-time data, reduces the real-time data calculation burden, reduces the trial and error cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an adaptive traffic signal control method, apparatus, electronic device, and medium. Background Technology

[0002] With the continuous expansion of urban scale, traffic congestion has become increasingly serious, making it particularly important for traffic management departments to improve the intelligence level of traffic signal control systems. Relevant traffic control methods based on reinforcement learning include deep learning-based methods, pre-trained model-based methods, transfer learning-based methods, and simulation-based methods. Among these, reinforcement learning-based methods require pre-extraction of features, which may result in the loss of important information and thus poor control performance. Pre-trained model-based methods have certain requirements for the selection of traffic scenarios for the pre-trained model and may not adapt well to specific traffic situations. Transfer learning-based methods require specific model structures and assumptions; otherwise, they may not achieve good transfer effects. Simulation-based methods may not accurately simulate real-world traffic scenarios, leading to inconsistencies between trial-and-error results and actual performance.

[0003] Furthermore, the application of related reinforcement learning methods in traffic control still has certain shortcomings, mainly in the following three aspects:

[0004] Strong data dependence: Traditional reinforcement learning requires a large amount of real-time data for training, which is difficult to achieve in many traffic scenarios. Especially in real-world environments, when data is sparse or of low quality, the design of real-time traffic data filtering programs is required to meet higher standards, which increases the difficulty of actual deployment.

[0005] High computational burden in real time: Traditional reinforcement learning methods often require real-time computation on-site, which can impose a significant computational burden on traffic signal control systems and may affect their stability.

[0006] Trial and error is costly: Reinforcement learning requires interaction with the real-world environment, achieving optimization through continuous trial and error and adjustments to signal control strategies. However, due to the complexity and uncertainty of the traffic environment, the trial-and-error process can lead to adverse consequences and thus incur significant costs. Summary of the Invention

[0007] In view of the shortcomings of the prior art described above, this application provides an adaptive traffic signal control method, device, electronic product and medium to solve the technical problems of strong data dependence, large real-time computing burden, huge trial and error cost, poor control effect and poor applicability.

[0008] According to one aspect of the embodiments of this application, an adaptive traffic signal control method is provided, comprising: acquiring a historical traffic dataset, a new traffic dataset, and a first traffic signal control model cluster; performing an offline evaluation of the decision-making capability of the first traffic signal control model cluster based on the historical traffic dataset and the new traffic dataset to obtain a first evaluation result; adjusting the first traffic signal control model cluster by combining the first evaluation result and the new traffic dataset to obtain a second traffic signal control model cluster, and updating the first traffic signal control model cluster with the second traffic signal control model cluster; calculating the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset, so as to supplement the corresponding historical traffic dataset to the new traffic dataset according to the similarity, and updating the new traffic dataset; performing an offline evaluation of the decision-making capability of the second traffic signal control model cluster using the new traffic dataset to obtain a second evaluation result; and determining a traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result.

[0009] In one embodiment of this application, the decision-making ability of the first traffic signal control model cluster is evaluated offline based on the historical traffic dataset and the new traffic dataset to obtain a first evaluation result. This includes: using the historical traffic dataset as an offline training set to train an acquired first initialization model offline to obtain a first prediction model; inputting the new traffic dataset as an offline test set into the first traffic signal control model cluster to obtain a first decision result; inputting the first decision result into the first prediction model to obtain a first prediction result; the first prediction result includes first state information data; evaluating the first prediction result using a first state evaluation function to obtain a first evaluation result; the first evaluation result includes multiple first decision-making ability scores.

[0010] In one embodiment of this application, evaluating the first prediction result using a first state evaluation function to obtain a first evaluation result includes: sorting multiple first decision-making ability scores in ascending or descending order to obtain a first sorting sequence; the first traffic signal control model cluster includes multiple first traffic signal control models, and the multiple first traffic signal control models correspond one-to-one with the multiple first decision-making ability scores; based on the comparison result between the number of models in the first traffic signal control model cluster and a preset number threshold, selecting a first predetermined number of first traffic signal control models with the highest scores in the first sorting sequence to adjust the number of models in the first traffic signal control model cluster, and using the adjusted first traffic signal control model cluster as the first evaluation result.

[0011] In one embodiment of this application, selecting a first predetermined number of the first traffic signal control models with the highest score in the first sorting sequence based on a comparison result between the number of models in the first traffic signal control model cluster and a preset number threshold includes: comparing the number of models in the first traffic signal control model cluster with the preset number threshold; if the number of models in the first traffic signal control model cluster is equal to the preset number threshold, selecting a first predetermined number of the first traffic signal control models with the highest score in the first sorting sequence, wherein the first predetermined number is less than the preset number threshold; if the number of models in the first traffic signal control model cluster is less than the preset number threshold, using the number of models in the first traffic signal control model cluster as the first predetermined number.

[0012] In one embodiment of this application, by combining the first evaluation result and the new traffic dataset, the first traffic signal control model cluster is adjusted to obtain a second traffic signal control model cluster, including:

[0013] The new traffic dataset is used as an offline training set to train the first predetermined number of the first traffic signal control model cluster offline. The historical traffic dataset and the new traffic dataset are used as a global dataset to train the second predetermined number of the first traffic signal control models with the highest scores in the first ranking sequence offline, so as to obtain the second predetermined number of optimal models. The second predetermined number is less than or equal to the difference between the preset number threshold and the first predetermined number. The optimal models are merged with the offline-trained first traffic signal control model cluster to obtain the second traffic signal control model cluster.

[0014] In one embodiment of this application, the decision-making ability of the second traffic signal control model cluster is evaluated offline using the new traffic dataset to obtain a second evaluation result. This includes: dividing the new traffic dataset into an offline training set and an offline test set according to a preset ratio; training the acquired second initialization model offline using the offline training set to obtain a second prediction model; inputting the offline test set into the second traffic signal control model cluster to obtain a second decision result; inputting the second decision result into the second prediction model to obtain a second prediction result; the second prediction result includes second state information data; evaluating the second prediction result using a second state evaluation function to obtain a second evaluation result; the second evaluation result includes multiple second decision-making ability scores.

[0015] In one embodiment of this application, the first state information data includes the first vehicle queue length and the first vehicle cumulative waiting time at the next moment, and the first state evaluation function is determined based on a preset first weight coefficient, the first vehicle queue length at the next moment, a preset second weight coefficient, and the first vehicle cumulative waiting time at the next moment; the second state information data includes the second vehicle queue length and the second vehicle cumulative waiting time at the next moment, and the second state evaluation function is determined based on the preset first weight coefficient, the second vehicle queue length at the next moment, the preset second weight coefficient, and the second vehicle cumulative waiting time at the next moment.

[0016] In one embodiment of this application, calculating the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset, so as to supplement the corresponding historical traffic dataset to the new traffic dataset according to the similarity, includes: preprocessing the new traffic dataset and the historical traffic dataset respectively to obtain corresponding first datasets and second datasets; dividing the first dataset into intervals according to preset class intervals to obtain interval datasets; extracting window datasets from the second dataset according to preset sliding window values; dividing the window datasets into segments according to the class intervals to obtain segment datasets; calculating the similarity between the interval datasets and the segment datasets to obtain a similarity value; comparing the similarity value with a preset similarity threshold; if the similarity value is less than or equal to the preset similarity threshold, supplementing the segment datasets to the interval datasets.

[0017] In one embodiment of this application, calculating the similarity between the interval dataset and the fragment dataset to obtain a similarity value includes: dividing the interval dataset into multiple first category datasets according to the data category; calculating the distribution probability of the multiple first category datasets based on the number of data in the multiple first category datasets and the number of data in the interval dataset to obtain a first probability distribution; dividing the fragment dataset into multiple second category datasets according to the data category; calculating the distribution probability of the multiple second category datasets based on the number of data in the multiple second category datasets and the number of data in the fragment dataset to obtain a second probability distribution; and calculating the KL divergence between the first probability distribution and the second probability distribution of the corresponding data category to obtain the similarity value.

[0018] In one embodiment of this application, determining the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result includes: sorting multiple second decision-making ability scores in descending order; the second traffic signal control model cluster includes multiple second traffic signal control models, each of which corresponds one-to-one with a multiple second decision-making ability score; selecting the top-ranked second traffic signal control model according to a third predetermined number; inputting the second traffic signal control model into the traffic signal controller to obtain the corresponding predicted phase; determining the traffic signal output phase based on the multiple second decision-making ability scores and the predicted phase; and determining the duration of the traffic signal output phase based on the predicted phase, the traffic signal output phase, and a preset duration.

[0019] In one embodiment of this application, determining the traffic signal output phase based on a plurality of second decision-making ability scores and the predicted phase includes: inputting the plurality of second decision-making ability scores into a softmax function, calculating the weight value of the corresponding predicted phase through the softmax function; accumulating the weight values ​​belonging to the same predicted phase to obtain a plurality of cumulative weight values; and taking the predicted phase with the largest cumulative weight value as the traffic signal output phase.

[0020] In one embodiment of this application, determining the duration of the traffic signal output phase based on the predicted phase, the traffic signal output phase, and a preset duration includes: comparing multiple predicted phases with the traffic signal output phase respectively; determining whether the comparison results are consistent; if the comparison results are consistent, multiplying the corresponding weight values ​​as weighting coefficients with the preset duration to obtain multiple first products; accumulating the corresponding weight values ​​to obtain a first accumulated value; accumulating the multiple first products to obtain a second accumulated value; and calculating the ratio of the second accumulated value to the first accumulated value to obtain the duration of the output phase.

[0021] According to one aspect of the embodiments of this application, an adaptive traffic signal control device is provided, comprising: an acquisition module for acquiring a historical traffic dataset, a new traffic dataset, and a first traffic signal control model cluster; a first evaluation module for offline evaluation of the decision-making ability of the first traffic signal control model cluster based on the historical traffic dataset and the new traffic dataset, to obtain a first evaluation result; an adjustment module for adjusting the first traffic signal control model cluster by combining the first evaluation result and the new traffic dataset to obtain a second traffic signal control model cluster, and updating the first traffic signal control model cluster with the second traffic signal control model cluster; an update module for calculating the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset, to supplement the corresponding historical traffic dataset to the new traffic dataset according to the similarity, and to update the new traffic dataset; a second evaluation module for offline evaluation of the decision-making ability of the second traffic signal control model cluster using the new traffic dataset, to obtain a second evaluation result; and a determination module for determining the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result.

[0022] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the adaptive traffic signal control method as described above.

[0023] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the adaptive traffic signal control method described above.

[0024] The beneficial effects of this invention are as follows: By evaluating and adjusting the first traffic signal control model cluster under offline conditions, the decision-making ability of the first traffic signal control model cluster is improved. After the new traffic dataset is updated, the second traffic signal control model cluster is evaluated under offline conditions, and the second traffic signal control model with strong decision-making ability is selected based on the evaluation results. Finally, the traffic signal output phase and the duration of the traffic signal output phase are determined based on the selected second traffic signal control model, which reduces the dependence on real-time data and reduces the computational burden of real-time data. Under the premise of combining the similarity between the historical traffic dataset and the new traffic dataset, this invention also improves the applicability to traffic scenarios and the control effect of traffic signals, and reduces the cost of trial and error.

[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0027] Figure 1 This is a schematic diagram illustrating an exemplary system architecture as shown in an exemplary embodiment of this application;

[0028] Figure 2 This is a flowchart illustrating an exemplary embodiment of the adaptive traffic signal control method of this application;

[0029] Figure 3 This is a flowchart illustrating an exemplary embodiment of the offline training method of this application;

[0030] Figure 4 This is a flowchart illustrating an offline training method as shown in another exemplary embodiment of this application;

[0031] Figure 5 A block diagram is shown that is suitable for implementing an adaptive traffic signal control device according to embodiments of this application;

[0032] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0033] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0035] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0036] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0037] It should be noted that traffic data includes a state information sequence S, a control information sequence A, and a state evaluation sequence R. The state information sequence S includes a vehicle queue length sequence L, a vehicle cumulative waiting time sequence W, a vehicle speed sequence V, a vehicle saturation sequence B, and a traffic flow density sequence D, etc. The control information sequence includes a release phase number sequence I and a release phase duration sequence T, etc. The state evaluation sequence R includes all evaluation values ​​of historical state information.

[0038] The new traffic dataset contains the latest traffic data collected during the project preparation phase over a certain period of time, while the historical traffic dataset contains historical traffic data collected over a period of time prior to project preparation.

[0039] The technical solutions of this application involve machine learning and related technologies, which are specifically illustrated through the following embodiments:

[0040] Figure 1 This is a schematic diagram illustrating an exemplary system architecture as shown in an exemplary embodiment of this application.

[0041] Reference Figure 1As shown, the system architecture may include a data acquisition device 101 and a computer device 102. The computer device 102 may be at least one of a desktop graphics processing unit (GPU) computer, a GPU computing cluster, or a neural network computer. Those skilled in the art can use the computer device 102 to evaluate and adjust the first traffic signal control model cluster based on historical and new traffic datasets, improving the decision-making ability of the first traffic signal control model cluster. It can also evaluate the second traffic signal control model cluster based on the updated new traffic dataset, and finally determine the traffic signal output phase and its duration based on the second evaluation result. The data acquisition device 101 is used to collect historical and new traffic data. In this embodiment, the data acquisition device 101 uses cameras and sensor devices to collect historical and new traffic data and provides it to the computer device 102 for processing.

[0042] Indicatively, after acquiring historical and new traffic data from data acquisition device 101, computer device 102 improves the decision-making ability of the first traffic signal control model cluster by evaluating and adjusting it under offline conditions. After the new traffic dataset is updated, it evaluates the second traffic signal control model cluster under offline conditions and selects the second traffic signal control model with strong decision-making ability based on the evaluation results. Finally, based on the selected second traffic signal control model, it determines the traffic signal output phase and the duration of the traffic signal output phase. This reduces the dependence on real-time data and the computational burden of real-time data. Under the premise of combining the similarity between the historical traffic dataset and the new traffic dataset, the present invention also improves the applicability to traffic scenarios and the control effect of traffic signals, and reduces the cost of trial and error.

[0043] It should be noted that the adaptive traffic signal control method provided in this application embodiment is generally executed by computer device 102, and correspondingly, the adaptive traffic signal control device is generally installed in computer device 102.

[0044] The implementation details of the technical solutions in the embodiments of this application are described in detail below:

[0045] Figure 2 This is a flowchart illustrating an exemplary embodiment of the adaptive traffic signal control method of this application. This adaptive traffic signal control method can be executed by a computational processing device, which may be... Figure 1 The computer device 102 shown is illustrated. (Refer to...) Figure 2 As shown, the adaptive traffic signal control method includes at least steps S210 to S260, which are described in detail below:

[0046] In step S210, the historical traffic dataset, the new traffic dataset, and the first traffic signal control model cluster are obtained.

[0047] In this embodiment, after acquiring the historical traffic dataset and the new traffic dataset, the historical traffic dataset and the new traffic dataset are standardized respectively. The process of standardizing the historical traffic dataset or the new traffic dataset includes: (1) dividing the historical traffic dataset or the new traffic dataset into multiple sub-datasets according to different intersections; (2) dividing the data in the sub-datasets into a state information set, a control information set, and a state evaluation set according to the state information sequence S, the control information sequence A, and the state evaluation sequence R; (3) dividing the state information data S belonging to time t-1 according to the time correspondence. t-1 Control information data A t-1 State evaluation data R t-1 And the state information data S at the next time step t t Forming quadruples to create the standard dataset H, the formula for the standard dataset H is as follows:

[0048] H={(S1,A1,R1,S2),(S2,A2,R2,S3)......(S t-1 A t-1 ,R t-1 ,S t Equation (1)

[0049] Where t represents different collection times of traffic data, S t-1 A t-1 and R t-1 S represents the state information data, control information data, and state evaluation data belonging to the same time t-1, respectively. t S1 represents the state information data at the next time step t-1. S1, A1, and R1 represent the state information data, control information data, and state evaluation data at the first time step, respectively. S2, A2, and R2 represent the state information data, control information data, and state evaluation data at the second time step, respectively. S3 represents the state information data at the third time step.

[0050] In one embodiment of this application, before acquiring historical traffic datasets and new traffic datasets, the process includes: acquiring new traffic datasets.

[0051] In this embodiment, before acquiring historical traffic datasets and new traffic datasets, it is necessary to collect new traffic datasets using devices such as sensors and cameras.

[0052] In this embodiment, the first traffic signal control model cluster includes multiple first traffic signal control models, including but not limited to traffic signal control models based on deep learning, traffic signal control models based on pre-training, traffic signal control models based on transfer learning, traffic signal control models based on decision trees, and traffic signal control models based on support vector machines.

[0053] In step S220, the decision-making capability of the first traffic signal control model cluster is evaluated offline based on the historical traffic dataset and the new traffic dataset to obtain the first evaluation result.

[0054] In this embodiment, the decision-making ability of the first traffic signal control model cluster is evaluated to quantify the decision-making performance of the first traffic signal control model cluster. The first traffic signal control model with strong decision-making ability is selected from the first traffic signal control model cluster, and the first traffic signal control model cluster is further optimized based on the first traffic signal control model with strong decision-making ability.

[0055] In step S230, the first traffic signal control model cluster is adjusted by combining the first evaluation result and the new traffic dataset to obtain the second traffic signal control model cluster, and the first traffic signal control model cluster is updated with the second traffic signal control model cluster.

[0056] In this embodiment, the process of adjusting the first traffic signal control model cluster to obtain the second traffic signal control model cluster by combining the first evaluation result and the new traffic dataset includes: (1) using the new traffic dataset as an offline training set to train a first predetermined number of the first traffic signal control model clusters offline; (2) using the historical traffic dataset and the new traffic dataset as a global dataset to train a second predetermined number of the first traffic signal control models with the highest scores in the first ranking sequence offline, to obtain a second predetermined number of optimal models, wherein the second predetermined number is less than or equal to the difference between a preset number threshold and the first predetermined number; (3) merging the optimal models with the offline-trained first traffic signal control model clusters to obtain the second traffic signal control model cluster.

[0057] In this embodiment, by performing offline training on the first traffic signal control model cluster and adding the optimal model to the offline-trained first traffic signal control model cluster, the proportion of the optimal model in the first traffic signal control model cluster is increased, thereby further optimizing the decision performance of the first traffic signal control model cluster and its adaptability to new traffic datasets.

[0058] In this embodiment, when the first traffic signal control model cluster data is acquired again, the second traffic signal control model cluster is used instead of the first traffic signal control model cluster. This not only simplifies the optimization process of the traffic signal control model cluster, but also further improves the decision-making ability and applicability of the traffic signal control model cluster.

[0059] In step S240, the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset is calculated, so as to supplement the new traffic dataset with the corresponding historical traffic dataset according to the similarity and update the new traffic dataset.

[0060] In this embodiment, the historical data set is added to the new traffic dataset based on the similarity between the new traffic dataset and the historical traffic dataset. This not only improves the data diversity of the new traffic dataset, but also allows for offline evaluation of the second traffic signal control model cluster using the updated new traffic dataset, further enabling the selection of traffic signal control models with stronger decision-making capabilities.

[0061] In step S250, the decision-making capability of the second traffic signal control model cluster is evaluated offline using the new traffic dataset to obtain the second evaluation result.

[0062] In this embodiment, the offline evaluation of the decision-making capability of the second traffic signal control model cluster based on the new traffic dataset includes: (1) dividing the new traffic dataset into an offline training set and an offline test set according to a preset ratio; (2) training the obtained second initialization model offline using the offline training set to obtain a second prediction model; (3) inputting the offline test set into the second traffic signal control model cluster to obtain a second decision result; (4) inputting the second decision result into the second prediction model to obtain a second prediction result; and (5) evaluating the second prediction result using the second state evaluation function to obtain a second evaluation result.

[0063] In this embodiment, the decision-making ability of the second traffic signal control model cluster is evaluated offline using the updated traffic dataset, which further increases the proportion of the optimal model in the second traffic signal control model cluster and continuously optimizes the performance of the model cluster.

[0064] In step S260, the traffic signal output phase and the duration of the traffic signal output phase are determined based on the second evaluation result.

[0065] In this embodiment, the process of determining the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result includes: (1) sorting multiple second decision capability scores in descending order; (2) selecting the top-ranked second traffic signal control model according to a third predetermined number; (3) inputting the second traffic signal control model into the traffic signal controller to obtain the corresponding predicted phase; (4) determining the traffic signal output phase based on multiple second decision capability scores and the predicted phase; and (5) determining the duration of the traffic signal output phase based on the predicted phase, the traffic signal output phase, and the preset duration.

[0066] This invention improves the decision-making ability of a first traffic signal control model cluster by evaluating and adjusting it under offline conditions. After the new traffic dataset is updated, a second traffic signal control model cluster is evaluated offline, and a second traffic signal control model with strong decision-making ability is selected based on the evaluation results. Finally, the traffic signal output phase and the duration of the traffic signal output phase are determined based on the selected second traffic signal control model. This reduces the dependence on real-time data and the computational burden of real-time data. By combining the similarity between historical traffic datasets and new traffic datasets, this invention also improves the applicability to traffic scenarios and the control effect of traffic signals, and reduces the cost of trial and error.

[0067] Figure 3 This is a flowchart illustrating an exemplary embodiment of the offline training method of this application, with reference to... Figure 3As shown, the offline training method includes: (1) standardizing the newly collected dataset, using the newly collected dataset as the new traffic dataset, and using the dataset before the new traffic dataset as the historical traffic dataset; (2) using the historical traffic dataset as the offline training set and the new traffic dataset as the offline test set; (3) evaluating the first traffic signal control model cluster based on the first prediction model trained on the offline training set and the first state evaluation function, and ranking the first traffic signal control model cluster according to the evaluation results; (4) determining whether the number of models in the first traffic signal control model cluster is full, and if so, deleting the first traffic signal control model ranked last in the ranking list; (5) using the new traffic dataset as the offline training set to train the existing first traffic signal control model cluster, thereby achieving fine-tuning of the first traffic signal control model cluster; (6) using the historical traffic dataset and the new traffic dataset as the global dataset, and performing offline training on the first traffic signal control model ranked first, to obtain the best... (7) When acquiring data from the first traffic signal control model cluster again, the second traffic signal control model cluster replaces the first traffic signal control model cluster. (8) Data is collected from the historical traffic dataset using the same distribution sampling method to fill the new traffic dataset. (9) The new traffic dataset is divided into an offline training set and an offline test set according to a preset ratio. (10) The second traffic signal control model cluster is evaluated based on the second prediction model trained on the offline training set and the second state evaluation function. The second traffic signal control model cluster is then sorted according to the evaluation results. (11) The top P second traffic signal control models are selected and their corresponding weight values ​​are calculated. (12) The P second traffic signal control models are input into the traffic signal controller and the predicted phase is output. (13) The traffic signal output phase and the duration of the traffic signal output phase are obtained based on the predicted phase and the corresponding weight values.

[0068] As the number of training and updates of the first traffic signal control model cluster gradually increases, the proportion of the optimal model in the cluster becomes higher and higher. The tuning effect of creating and training the top-ranked traffic signal control model diminishes. Therefore, it is sufficient to directly use the new traffic dataset to fine-tune the current first traffic signal control model cluster. The specific implementation steps are as follows: Figure 4 As shown.

[0069] Figure 4 This is a flowchart illustrating an offline training method as shown in another exemplary embodiment of this application. (See attached flowchart.) Figure 4As shown, the offline training method includes: (1) standardizing the newly collected dataset, using the newly collected dataset as the new traffic dataset, and using the dataset before the new traffic dataset as the historical traffic dataset; (2) using the new traffic dataset as the offline training set to train the existing first traffic signal control model cluster, thereby fine-tuning the first traffic signal control model cluster and obtaining the second traffic signal control model cluster; (3) when acquiring the data of the first traffic signal control model cluster again, replacing the first traffic signal control model cluster with the second traffic signal control model cluster; (4) using identically distributed sampling to collect data from the historical traffic dataset. (5) Fill in the new traffic dataset; (6) Divide the filled new traffic dataset into an offline training set and an offline test set according to a predetermined ratio; (7) Evaluate the second traffic signal control model cluster based on the prediction model trained on the offline training set and the state evaluation function, and rank the second traffic signal control model cluster according to the evaluation results; (8) Select the top P second traffic signal control models and calculate their corresponding weight values; (9) Input the P second traffic signal control models into the traffic signal machine and output the predicted phase; (10) Obtain the traffic signal output phase and the duration of the traffic signal output phase based on the predicted phase and the corresponding weight values.

[0070] In one embodiment of this application, the decision-making capability of a first traffic signal control model cluster is evaluated offline based on historical traffic datasets and new traffic datasets to obtain a first evaluation result, including:

[0071] The historical traffic dataset is used as an offline training set to train the first initial model offline, thus obtaining the first prediction model.

[0072] In this embodiment, the first initialization model can be a deep learning model, a pre-trained model, a transfer learning model, a decision tree model, or a support vector machine model, etc.

[0073] In this embodiment, the first prediction model is to obtain the state information data at the current time t based on the state information data and control information data of the previous n steps. Therefore, the expression of the first prediction model g1 is as follows:

[0074] S t '1=g1((S t1-n A t1-n ),(S t1-(n-1) A t1-(n-1) ),...,(S t1-1 A t1-1 Formula (2)

[0075] Among them, S t '1' represents the predicted traffic state at time t1, (S t1-n At1-n ),(S t1-(n-1) A t1-(n-1) ),...,(S t1-1 A t1-1 S represents the state information data and control information data of the first n steps input to the first prediction model g1. t1-n and A t1-n S represents the state information data and control information data belonging to the same time t1-n, respectively. t1-(n-1) and A t1-(n-1) S represents the state information data and control information data belonging to the same time t1-(n-1), respectively. t1-1 and A t1-1 These represent the state information data and control information data belonging to the same time t1-1, respectively.

[0076] The new traffic dataset is input as an offline test set into the first traffic signal control model cluster to obtain the first decision result.

[0077] In this embodiment, before inputting the offline test set into the first traffic signal control model cluster, the offline test set is first divided according to the chronological order to determine the current state information data S. t1 Then, the current state information data S t1 The current status information data S that needs to be processed is determined. current1 Finally, the data segmentation function `intersection()` is used to segment the current status information data `S` according to different intersections `i`. current1 Segmentation is performed, for example, the current state information data S that needs to be processed. current1 The data is divided into multiple intersection i status information data S by the data segmentation function intersection(). i1 .

[0078] In this embodiment, the first traffic signal control model cluster includes multiple first traffic signal control models. Assuming the first traffic signal control model is represented by m1(), a sliding window is used to slide across the offline test set to collect partial state information data S' of intersection i. i1 Partial status information data S' i1 For status information data S i1 Part of it, and part of the status information data S' of intersection i i1 Input the first traffic signal control model m1(), the first traffic signal control model m1() for partial state information data S' i1 The decision result is A' i1As the sliding window moves, the first traffic signal control model sequentially makes decisions on other state information data of intersection i until the state information data belonging to intersection i has been processed. Then, it makes decisions on the state information data of different intersections until the current state information data S that needs to be processed is reached. current1 Processing complete, then re-process the state information data S at different times. t1 Processing continues until all status information data has been processed.

[0079] The first decision result is input into the first prediction model to obtain the first prediction result.

[0080] In this embodiment, when the state information data S' of the first traffic signal control model m1() makes a decision... i1 When the predetermined quantity n is reached, and the first decision result A' is obtained. i1 When the number reaches n, the first prediction model g1, based on n state information data S' i1 And n first decision outcomes A' i1 Predicting the state information data for the next moment, as the sliding window slides, the state information data S' input to the first traffic signal control model m1() is... i1 The first decision result A' obtained from the decision-making process i1 It is also constantly updated. The first prediction model g1 is based on the latest n state information data S'. i1 And the latest n first decision results A' i1 Predicting the state information data for the next moment, until the first prediction model g1 obtains the state information data S of intersection i. i1 Make K predictions (K>1), and obtain K first prediction results S. next1 The first prediction model g1 finishes predicting the state of the intersection, and then predicts the state information data of different intersections until the current state information data S needs to be processed. current1 Prediction complete. Then, analyze the state information data S at different times. t1 Make predictions until all state information data has been predicted.

[0081] In this embodiment, the first prediction result includes the first state information data of all intersections obtained by predicting the first n state information data of all intersections.

[0082] The first prediction result is evaluated using the first state evaluation function to obtain the first evaluation result.

[0083] In this embodiment, the first state information data includes the first vehicle queue length L at the next time t1+1. t1+1 The cumulative waiting time W for the first vehicle at the next time step t1+1.t1+1 The first state evaluation function is based on the preset first weight coefficient and the first vehicle queue length L at the next moment. t1+1 The preset second weighting coefficient and the cumulative waiting time W of the first vehicle at the next moment. t1+1 To be confirmed.

[0084] In this embodiment, the first state evaluation function R t1+1 The formula is shown below:

[0085] R t1+1 =αL t1+1 +βW t1+1 Equation (3)

[0086] Where α is the preset first weighting coefficient, β is the preset second weighting coefficient, and L t1+1 Let W be the queue length of the first vehicle at the next time step t1+1. t1+1 The cumulative waiting time for the first vehicle at the next time step t1+1 is calculated to reduce the queue length L of the first vehicle at the intersection at the next time step. t1+1 And the first vehicle waiting time W t1+1 Set both α and β to negative values, and α + β = -1.

[0087] In this embodiment, the first state evaluation function is used to evaluate the K first prediction results S obtained by the first prediction model g1. next1 An evaluation was conducted, resulting in K evaluation results R. next1 The result of evaluating the status information data of an intersection, R avg1 For K evaluation results R next1 The average of the sums is then used to evaluate the status information data of other intersections in turn, until the current status information data S that needs to be processed is reached. current1 The evaluation is complete; the state information data S at different times is analyzed again. t1 The evaluation continues until all status information data has been evaluated.

[0088] In this embodiment, the decision-making capability of the first traffic signal control model is the evaluation result R of the state information data of all intersections at all times. avg1 The average of the sums. All first traffic signal control models in the first traffic signal control model cluster need to go through the above evaluation process to obtain the corresponding first evaluation results. Therefore, the first evaluation results include multiple first decision-making ability scores corresponding to the first traffic signal control models.

[0089] In one embodiment of this application, a first evaluation result is obtained by evaluating a first prediction result using a first state evaluation function, including:

[0090] Sort the multiple first decision-making ability scores in ascending or descending order to obtain the first sorted sequence;

[0091] In this embodiment, the first traffic signal control model cluster includes multiple first traffic signal control models, and each of the multiple first traffic signal control models corresponds one-to-one with multiple first decision-making ability scores. The first decision-making ability scores are used to reflect the decision-making ability of the first traffic signal control model on a new traffic dataset. The ranking of the multiple first decision-making ability scores is the ranking of the decision-making abilities of the multiple first traffic signal control models.

[0092] In this embodiment, the rank function or sort function is used to sort the multiple first decision-making ability scores in ascending or descending order.

[0093] Based on the comparison between the number of models in the first traffic signal control model cluster and the preset number threshold, the first predetermined number of first traffic signal control models with the highest scores in the first sorting sequence are selected to adjust the number of models in the first traffic signal control model cluster, and the adjusted first traffic signal control model cluster is used as the first evaluation result.

[0094] In this embodiment, by comparing the number of models in the first traffic signal control model cluster with a preset number threshold, the first predetermined number of first traffic signal control models with the highest scores in the first sorting sequence are selected to improve the decision-making ability of the first traffic signal control model cluster.

[0095] In one embodiment of this application, based on the comparison result between the number of models in the first traffic signal control model cluster and a preset number threshold, a first predetermined number of first traffic signal control models with the highest scores in the first sorting sequence are selected, including:

[0096] The number of models in the first traffic signal control model cluster is compared with a preset number threshold.

[0097] In this embodiment, the threshold value for the number of the first traffic signal control model cluster can be between 13 and 15. For example, the preset threshold value is 14, but the preset threshold value can also be other ranges. The number of models in the first traffic signal control model cluster is less than or equal to the preset threshold value.

[0098] If the number of models in the first traffic signal control model cluster is equal to a preset number threshold, select the first predetermined number of first traffic signal control models with the highest scores in the first sorting sequence.

[0099] In this embodiment, the first predetermined number is less than a preset number threshold. When the preset number threshold is 14, the first predetermined number can be 10, 11, 12, or 13, etc. By deleting the 1, 2, 3, or 4 first traffic signal control models with the lowest scores in the first sorting sequence, the first predetermined number of first traffic signal control models with higher decision-making ability are selected.

[0100] If the number of models in the first traffic signal control model cluster is less than a preset threshold, the number of models in the first traffic signal control model cluster will be used as the first predetermined number.

[0101] In this embodiment, when the number of models in the first traffic signal control model cluster is less than a preset threshold, the first traffic signal control model cluster is directly used as the second traffic signal control model, and the number of models in the first traffic signal control model cluster is used as the first predetermined number.

[0102] In one embodiment of this application, by combining the first evaluation result and the new traffic dataset, the first traffic signal control model cluster is adjusted to obtain the second traffic signal control model cluster, including:

[0103] The new traffic dataset is used as an offline training set to train a first predetermined number of the first traffic signal control model cluster offline.

[0104] In this embodiment, the first traffic signal control model cluster includes multiple first traffic signal control models. The process of training the first traffic signal control model cluster with the updated new traffic dataset is the process of training multiple first traffic signal control models separately with the updated new traffic dataset. The training process of each first traffic signal control model is independent and can be performed simultaneously.

[0105] In this embodiment, the first traffic signal control model cluster is trained offline using the updated traffic dataset, which not only improves the decision-making performance and adaptability of the first traffic signal control model cluster, but also reduces the dependence of the first traffic signal control model cluster on real-time data.

[0106] Using historical traffic datasets and new traffic datasets as global datasets, the first traffic signal control model with the highest score in the first sorting sequence is trained offline to obtain the second predetermined number of optimal models.

[0107] In this embodiment, the second predetermined quantity is less than or equal to the difference between the preset quantity threshold and the first predetermined quantity. When the preset quantity threshold is 14 and the first predetermined quantity is 10, the second predetermined quantity can be 1, 2, 3 or 4.

[0108] In this embodiment, since the second predetermined number of first traffic signal control models have better decision-making performance and adaptability, the performance of the second predetermined number of first traffic signal control models is further improved by offline training on the global dataset.

[0109] The optimal model is merged with the first traffic signal control model cluster trained offline to obtain the second traffic signal control model cluster.

[0110] In this embodiment, after deleting the 1, 2, 3, or 4 lowest-scoring first traffic signal control models, a second predetermined number of optimal models are added to the first traffic signal control model cluster. This ensures that the number of models in the first traffic signal control model cluster never exceeds a preset threshold, and also increases the proportion of optimal models in the first traffic signal control model cluster. Furthermore, when acquiring data from the first traffic signal control model cluster again, replacing it with the second traffic signal control model cluster not only simplifies the optimization process of the model cluster but also further improves the decision-making ability and applicability of the model cluster.

[0111] In one embodiment of this application, the decision-making capability of a second traffic signal control model cluster is evaluated offline using a new traffic dataset to obtain a second evaluation result, including:

[0112] The new traffic dataset is divided into an offline training set and an offline test set according to a preset ratio.

[0113] In this embodiment, the preset ratio can be 1:1, 2:1, or 3:1, etc. To increase the amount of offline training data, a predetermined ratio of 3:1 can be used to divide the offline training set and the offline test set.

[0114] The second initialization model is trained offline using the offline training set to obtain the second prediction model.

[0115] In this embodiment, the second initialization model can be a deep learning model, a pre-trained model, a transfer learning model, a decision tree model, or a support vector machine model, etc.

[0116] In this embodiment, the second prediction model is to obtain the state information data at the current time t based on the input state information data and control information data from the previous n steps. Therefore, the expression of the second prediction model g2 is as follows:

[0117] S' t '2=g2((S t2-n A t2-n ),(S t2-(n-1) A t2-(n-1) ),...,(St2-1 A t2-1 Equation (4)

[0118] Among them, S' t2 It is the predicted traffic state at time t2, (S t2-n A t2-n ),(S t2-(n-1) A t2-(n-1) ),...,(S t2-1 A t2-1 S represents the state information data and control information data of the first n steps input to the second prediction model g2. t2-n and A t2-n S represents the state information data and control information data belonging to the same time t2-n, respectively. t2-(n-1) and A t2-(n-1) S represents the state information data and control information data belonging to the same time t2-(n-1), respectively. t2-1 and A t2-1 These represent the state information data and control information data belonging to the same time t2-1, respectively.

[0119] The offline test set is input into the second traffic signal control model cluster to obtain the second decision result.

[0120] In this embodiment, before inputting the offline test set into the second traffic signal control model cluster, the offline test set is first divided according to the chronological order to determine the current state information data S. t2 Then, the current state information data S t2 The current status information data S that needs to be processed is determined. current2 Finally, the data segmentation function `intersection()` is used to segment the current status information data `S` according to different intersections `i`. current2 Segmentation is performed, for example, the current state information data S that needs to be processed. current2 The data is divided into multiple intersection i status information data S by the data segmentation function intersection(). i2 .

[0121] In this embodiment, the second traffic signal control model cluster includes multiple second traffic signal control models. Assuming the second traffic signal control model is represented by m2(), a sliding window is used to slide across the offline test set to collect partial state information data S' of intersection i. i2 and transfer part of the status information data S' of intersection i i2 Input the second traffic signal control model m2(), the second traffic signal control model m2() takes partial state information data S' i2 The decision result is A'i2 As the sliding window moves, the second traffic signal control model sequentially makes decisions on other state information data of intersection i until the state information data belonging to intersection i has been processed. Then, it makes decisions on the state information data of different intersections until the current state information data S that needs to be processed is reached. current2 Processing complete, then re-process the state information data S at different times. t2 Processing continues until all status information data has been processed.

[0122] The second decision result is input into the second prediction model to obtain the second prediction result.

[0123] In this embodiment, when the state information data S' of the second traffic signal control model m2() makes a decision... i2 When the predetermined quantity n is reached, and the second decision result A' is obtained. i2 When n is reached, the second prediction model g2 is based on n state information data S' i2 and n second decision outcomes A' i2 Predicting the state information data for the next moment, as the sliding window slides, the state information data S' input to the second traffic signal control model m2()... i2 The second decision result A' obtained from the decision-making process i2 It is also constantly updated; the second prediction model g2 is based on the latest input n state information data S' i2 And the latest n second decision results A' i2 Predicting the state information data for the next moment, until the second prediction model g2 obtains the state information data S of intersection i. i2 Make K predictions (K>1) to obtain K second prediction results S. next2 The second prediction model g2 finishes predicting the state of the intersection, and then predicts the state information data of different intersections until the current state information data S needs to be processed. current2 Prediction complete. Then, analyze the state information data S at different times. t2 Make predictions until all state information data has been predicted.

[0124] In this embodiment, the second prediction result includes the second state information data of all intersections obtained by predicting the first n state information data of all intersections.

[0125] The second evaluation result is obtained by evaluating the second prediction result using the second state evaluation function.

[0126] In this embodiment, the second state information data includes the second vehicle queue length L at the next time step t2+1. t2+1 The cumulative waiting time W for the second vehicle at the next time step t2+1t2+1 The second state evaluation function is based on the preset first weight coefficient and the second vehicle queue length L at the next moment. t2+1 The preset second weighting coefficient and the cumulative waiting time W for the second vehicle at the next moment. t2+1 To be confirmed.

[0127] In this embodiment, the second state evaluation function R t2+1 The formula is shown below:

[0128] R t2+1 =αL t2+1 +βW t2+1 Equation (5)

[0129] Where α is the preset first weighting coefficient, β is the preset second weighting coefficient, and L t2+1 Let W be the queue length of the second vehicle at the next time step t2+1. t2+1 The cumulative waiting time for the second vehicle at the next time step t2+1 ​​is calculated to reduce the queue length L of the second vehicle at the intersection at the next time step. t2+1 Second vehicle waiting time W t2+1 Let α and β both be negative, and α + β = -1. The second state evaluation function R... t2+1 The range of values ​​for α and β can be related to the first state evaluation function R. t1+1 In this case, α and β have the same value.

[0130] In this embodiment, the K second prediction results S obtained by the second prediction model g2 are evaluated using the second state evaluation function. next2 An evaluation was conducted, resulting in K evaluation results R. next2 The result of evaluating the status information data of an intersection, R avg2 For K evaluation results R next2 The average of the sums is then used to evaluate the status information data of other intersections in turn, until the current status information data S that needs to be processed is reached. current2 The evaluation is complete; the state information data S at different times is analyzed again. t2 The evaluation continues until all status information data has been evaluated.

[0131] In this embodiment, the decision-making capability of the second traffic signal control model is the evaluation result R of the state information data of all intersections at all times. avg2 The average of the sums. All second traffic signal control models in the second traffic signal control model cluster need to go through the above evaluation process to obtain corresponding second evaluation results. Therefore, the second evaluation results include multiple second decision-making ability scores corresponding to the second traffic signal control models.

[0132] In one embodiment of this application, the first state information data includes the first vehicle queue length at the next moment and the first vehicle cumulative waiting time at the next moment. The first state evaluation function is determined based on a preset first weight coefficient, the first vehicle queue length at the next moment, a preset second weight coefficient, and the first vehicle cumulative waiting time at the next moment.

[0133] The second state information data includes the queue length of the second vehicle at the next moment and the cumulative waiting time of the second vehicle at the next moment. The second state evaluation function is determined based on the preset first weight coefficient, the queue length of the second vehicle at the next moment, the preset second weight coefficient, and the cumulative waiting time of the second vehicle at the next moment.

[0134] In this embodiment, the first weighting coefficient is preset to α, and the second weighting coefficient is preset to β. For the first vehicle queue length L at the next time t1+1, t1+1 Cumulative waiting time W for the first vehicle t1+1 The first state evaluation function R t1+1 As shown in formula (3).

[0135] In this embodiment, the first weighting coefficient is preset to α, and the second weighting coefficient is preset to β. For the first vehicle queue length L at the next time t2+1, t2+1 Cumulative waiting time W for the first vehicle t2+1 The first state evaluation function R t2+1 As shown in formula (5).

[0136] In one embodiment of this application, the similarity between the fragment feature distribution of a historical traffic dataset and the overall feature distribution of a new traffic dataset is calculated, so as to supplement the new traffic dataset with the corresponding historical traffic dataset based on the similarity and update the new traffic dataset, including:

[0137] The new traffic dataset and the historical traffic dataset are preprocessed to obtain the corresponding first dataset and second dataset.

[0138] In this embodiment, the preprocessing of the new traffic dataset and the historical traffic dataset includes: (1) selecting state information data from the new traffic dataset and the historical traffic dataset respectively; (2) forming a first dataset from the state information data in the new traffic dataset and forming a second dataset from the state information data in the historical traffic dataset.

[0139] The first dataset is divided into intervals according to the preset class intervals to obtain the interval dataset.

[0140] In this embodiment, the class intervals are determined based on the value range of the data in the first dataset. For example, if the data value range is [0-100] and the value of the class interval is 20, the data range in the first dataset is divided into five intervals: [0-20), [20-40), [40-60), [60-80), and [80-100], thereby discretizing the first dataset. The number of intervals is the ratio of the data value range to the value of the class interval.

[0141] Extract the window dataset from the second dataset based on the preset sliding window values.

[0142] In this embodiment, the width of the sliding window is F times the length of the state information data input by the first traffic signal control model or the second traffic signal control model. For example, F can be 3, 4, or 5. The sliding step size of the sliding window can be 1 or 2, etc. Different historical state data are displayed depending on the size of the sliding window and its sliding position on the historical traffic dataset, thereby realizing the extraction of the window dataset.

[0143] Based on the class intervals, the window dataset is divided into segments to obtain the segment dataset.

[0144] In this embodiment, the segment dataset is divided in the same way as the interval dataset. For example, when the data range is [0-100] and the class interval is 20, the data range of the window dataset is divided into 5 intervals: [0-20), [20-40), [40-60), [60-80), and [80-100], thereby discretizing the window dataset.

[0145] Calculate the similarity between the interval dataset and the segment dataset to obtain the similarity value.

[0146] In this embodiment, the process of calculating the similarity between the interval dataset and the fragment dataset includes: (1) dividing the interval dataset into multiple first-category datasets according to the data category; (2) calculating the distribution probability of the multiple first-category datasets according to the number of data in the multiple first-category datasets and the number of data in the interval dataset to obtain a first probability distribution; (3) dividing the fragment dataset into multiple second-category datasets according to the data category; (4) calculating the distribution probability of the multiple second-category datasets according to the number of data in the multiple second-category datasets and the number of data in the fragment dataset to obtain a second probability distribution; (5) calculating the KL divergence between the first probability distribution and the second probability distribution of the corresponding data category to obtain a similarity value.

[0147] The similarity value is compared with a preset similarity threshold.

[0148] In this embodiment, the preset similarity threshold is the product of the inter-class distance and the similarity coefficient. For example, when the inter-class distance is 20 and the similarity coefficient is 0.05, the preset similarity threshold is 1.

[0149] If the similarity value is less than or equal to the preset similarity threshold, the fragment dataset will be added to the interval dataset.

[0150] In this embodiment, when the sum of the similarity values ​​of all intervals is less than or equal to a preset similarity threshold, it is determined that the distribution of the interval dataset and the fragment dataset is consistent, thereby supplementing the fragment dataset into the interval dataset and ensuring the similarity between the supplemented interval dataset and the original interval dataset.

[0151] In this embodiment, after adding another fragment dataset to the interval dataset, the similarity between the interval dataset and other fragment datasets is calculated again. The relationship between the similarity and a preset similarity threshold is used to determine whether to add other fragment datasets to the interval dataset.

[0152] In one embodiment of this application, calculating the similarity between the interval dataset and the segment dataset to obtain a similarity value includes:

[0153] Based on the data category, the interval dataset is divided into multiple first-category datasets.

[0154] In this embodiment, the interval dataset includes multiple data categories, such as vehicle queue length L, cumulative vehicle waiting time W, vehicle speed V, vehicle saturation B, and traffic density D. After classifying the interval dataset, a first category dataset corresponding to vehicle queue length L, cumulative vehicle waiting time W, vehicle speed V, vehicle saturation B, and traffic density D is obtained.

[0155] Based on the number of data points in multiple first-class datasets and the number of data points in the interval dataset, the probability distribution of multiple first-class datasets is calculated to obtain the first probability distribution.

[0156] In this embodiment, the functional expression of the first probability distribution is as follows:

[0157] P(X) = P(X = X1, X2, ..., X... i Equation (6)

[0158] Where i is the number of intervals in the first category dataset, X i This represents the i-th interval of the first category dataset.

[0159] In this embodiment, when X = X1, P(X1) represents the probability distribution of the first interval of the first category dataset. The probability distribution of the first interval of the first category dataset is the ratio of the number of data in the first interval of the first category dataset to the number of data in the interval dataset. The probability distribution of other intervals of the first category dataset is calculated according to the above method until the probability distribution of all first category datasets is calculated.

[0160] Based on the data category, the fragment dataset is divided into multiple second-category datasets.

[0161] In this embodiment, the fragment dataset includes multiple data categories, such as vehicle queue length L, cumulative vehicle waiting time W, vehicle speed V, vehicle saturation B, and traffic density D. After classifying the fragment dataset, a second category dataset corresponding to vehicle queue length L, cumulative vehicle waiting time W, vehicle speed V, vehicle saturation B, and traffic density D is obtained.

[0162] Based on the number of data points in multiple second-category datasets and the number of data points in the fragment datasets, the probability distribution of multiple second-category datasets is calculated to obtain the second probability distribution.

[0163] In this embodiment, the functional expression of the second probability distribution is as follows:

[0164] Q(Y) = P(Y = Y1, Y2, ..., Y... i Equation (7)

[0165] Where i is the number of intervals in the second category dataset, Y i This represents the i-th interval of the second category dataset.

[0166] In this embodiment, when Y = Y1, P(Y1) represents the probability distribution of the first interval of the second category dataset. The probability distribution of the first interval of the second category dataset is the ratio of the number of data in the first interval of the second category dataset to the number of data in the interval dataset. The probability distribution of other intervals of the second category dataset is calculated according to the above method until the probability distribution of all second category datasets is calculated.

[0167] Calculate the KL divergence between the first probability distribution and the second probability distribution of the corresponding data category to obtain the similarity value.

[0168] In this embodiment, the formula for calculating the KL divergence is as follows:

[0169]

[0170] Where U is the maximum number of data categories, U is a positive integer, and P(X) iLet Q(Y) represent the probability distribution of the i-th interval in the first-class dataset. i X represents the probability distribution of the i-th interval in the second-class dataset. i Y represents the i-th interval of the first category dataset. i Let represent the i-th interval of the second category dataset, where i∈{1,2,...,U}.

[0171] In this embodiment, the larger the KL divergence value, the greater the difference between the two probability distributions. When the KL divergence value is 0, it means that the two probability distributions are completely consistent.

[0172] In one embodiment of this application, determining the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result includes:

[0173] The scores of multiple second decision-making abilities are sorted in descending order.

[0174] In this embodiment, the second traffic signal control model cluster includes multiple second traffic signal control models, and multiple second decision-making ability scores correspond one-to-one with the multiple second traffic signal control models. The second decision-making ability scores are used to reflect the decision-making ability of the second traffic signal control models on the new traffic dataset. The ranking of the multiple second decision-making ability scores is the ranking of the decision-making abilities of the multiple second traffic signal control models.

[0175] In this embodiment, the rank function or sort function is used to sort the multiple second decision-making ability scores in descending order.

[0176] The second traffic signal control model is selected based on the third predetermined number of models, and the second traffic signal control model belongs to the second traffic signal control model cluster.

[0177] In this embodiment, the third predetermined quantity can be 3-5, or other values. For example, when the third predetermined quantity is 4, the top 4 second traffic signal control models are selected according to the ranking of the second decision-making ability scores.

[0178] The second traffic signal control model is input into the traffic signal controller to obtain the corresponding predicted phase.

[0179] In this embodiment, traffic signal controllers are an important component of modern urban traffic systems, primarily used for the control and management of urban road traffic signals. The determination module within the traffic signal controller can adjust the signal control scheme in real time based on traffic data flow to adapt to changes in the traffic data flow. The control scheme includes control information data, such as traffic light control.

[0180] In this embodiment, after multiple selected second traffic signal control models are input into the traffic signal controller, the traffic signal controller will output the predicted phase corresponding to the second traffic signal control model.

[0181] The traffic signal output phase is determined based on multiple second decision-making ability scores and predicted phases.

[0182] In this embodiment, the traffic signal output phase is determined based on multiple second decision capability scores and predicted phases, including: (1) inputting multiple second decision capability scores into a softmax function and calculating the weight value of the corresponding predicted phase through the softmax function; (2) accumulating the weight values ​​of the same predicted phase to obtain multiple cumulative weight values; (3) taking the predicted phase with the largest cumulative weight value as the traffic signal output phase.

[0183] The duration of the traffic signal output phase is determined based on the predicted phase, the traffic signal output phase, and the preset duration.

[0184] In this embodiment, the duration of the traffic signal output phase is determined based on the predicted phase, the traffic signal output phase, and the preset duration, including: (1) comparing multiple predicted phases with the traffic signal output phase respectively; (2) determining whether the comparison results are consistent. If the comparison results are consistent, the corresponding weight value is used as a weighting coefficient and multiplied by the preset duration to obtain multiple first products; (3) the corresponding weight values ​​are accumulated to obtain a first accumulated value; (4) the multiple first products are accumulated to obtain a second accumulated value; (5) the ratio of the second accumulated value to the first accumulated value is calculated to obtain the duration of the output phase.

[0185] In one embodiment of this application, determining the traffic signal output phase based on multiple second decision-making ability scores and predicted phases includes:

[0186] Multiple second decision-making ability scores are input into the softmax function, and the weight values ​​of the corresponding prediction phases are calculated through the softmax function.

[0187] In this embodiment, the weight value E for predicting the phase j The expression is as follows:

[0188]

[0189] Among them, e j This represents the second decision-making ability score corresponding to the j-th second traffic signal control model, j = {1, 2, 3, p}, where p is the third predetermined number and p is a positive integer. j Let be the weight value of the predicted phase corresponding to the j-th second traffic signal control model.

[0190] The weight values ​​belonging to the same prediction phase are summed to obtain multiple cumulative weight values.

[0191] In this embodiment, the cumulative weight value A o The calculation formula is as follows:

[0192]

[0193] Among them, E j Let o = {1, 2, ..., O}, where O is a positive integer and O is the predicted phase P. j Number of types, I(P) j =P o ) is the indicator function, when the predicted phase P j equals P o When I = 1, otherwise I = 0, j = {1, 2, 3, p}, where p is the third predetermined quantity, A o To predict phase P o The cumulative weight value.

[0194] In this embodiment, the predicted phase P j Types include straight ahead P1, left turn P2, or right turn P3. When the predicted phase P... j When moving straight through P1, the predicted phase P belonging to the same straight-through P1 will be... j weight value E j Adding them together, we get the cumulative weight value A1 of the straight line P1. The expression for the cumulative weight value A1 is as follows:

[0195]

[0196] Among them, E j Let I(P) be the weight value corresponding to the j-th second traffic signal control model. j =P1) is the indicator function, when the predicted phase P j When I equals P1, I = 1; otherwise, I = 0, j = {1, 2, 3, p}, where p is the third predetermined quantity and p is a positive integer.

[0197] In this embodiment, when the predicted phase P j When turning left (P2), the predicted phase P belonging to left turn (P2) will be... j weight value E j Adding them together, we get the cumulative weight value A2 for the left turn P2. The expression for the cumulative weight value A2 is as follows:

[0198]

[0199] Among them, E j Let I(P) be the weight value corresponding to the j-th second traffic signal control model.j =P2) is the indicator function, when the predicted phase P j When I equals P2, I = 1; otherwise, I = 0, j = {1, 2, 3, p}, where p is the third predetermined quantity and p is a positive integer.

[0200] In this embodiment, when the predicted phase P j When turning right at P3, the predicted phase P belonging to right turn P3 will be... j weight value E j Adding them together, we get the cumulative weight value A3 for right turn P3. The expression for the cumulative weight value A3 is as follows:

[0201]

[0202] Among them, E j Let I(P) be the weight value corresponding to the j-th second traffic signal control model. j =P3) is the indicator function, when the predicted phase P j When I equals P3, I = 1; otherwise, I = 0, j = {1, 2, 3, p}, where p is the third predetermined quantity and p is a positive integer.

[0203] In this embodiment, when the predicted phase P j In other cases, the corresponding weight value E is adjusted in the same way as described above. j Add them together to obtain the corresponding cumulative weight value A. o .

[0204] The predicted phase with the largest cumulative weight value is used as the traffic signal output phase.

[0205] In this embodiment, multiple cumulative weight values ​​A are compared. o Select multiple cumulative weight values ​​A o The maximum value in the range will be the maximum cumulative weight value A. o Corresponding predicted phase P j As the traffic signal output phase P final .

[0206] In one embodiment of this application, determining the duration of the traffic signal output phase based on the predicted phase, the traffic signal output phase, and a preset duration includes:

[0207] Multiple predicted phases are compared with the traffic signal output phases.

[0208] In this embodiment, the indicator function I(P) is used. j =P final Output predicted phase P j Phase P of traffic signal output final The comparison results, when P j equals Pfinal If I = 1, then I = 1; otherwise, I = 0.

[0209] Determine whether the comparison results are consistent. If the comparison results are consistent, multiply the corresponding weight value as a weighting coefficient by the preset duration to obtain multiple first products; accumulate the corresponding weight values ​​to obtain the first accumulated value.

[0210] In this embodiment, the expression for the first product C1 is as follows:

[0211] C1 = E j ·T j ·I(P j =P final Equation (14)

[0212] Among them, P final For traffic signal output phase, P j To predict the phase, I(P) j =P final ) is an indicator function, when P j equals P final When I = 1, otherwise I = 0, T j To predict phase P j The preset duration, E j C1 represents the weight value corresponding to the j-th second traffic signal control model, and C1 represents the first product value.

[0213] In this embodiment, the mathematical expression for the first accumulated value G1 is as follows:

[0214]

[0215] Among them, P final For traffic signal output phase, P j To predict the phase, I(P) j =P final ) is an indicator function, when P j equals P final when, I=1, otherwise, I=0, E j Let G1 be the weight value corresponding to the j-th second traffic signal control model, where j = {1, 2, 3, p}, p is the third predetermined quantity, p is a positive integer, and G1 is the first accumulated value.

[0216] The first product is summed to obtain the second accumulated value.

[0217] In this embodiment, the expression for the second accumulated value G2 is as follows:

[0218]

[0219] Among them, P finalFor traffic signal output phase, P j To predict the phase, I(P) j =P final ) is an indicator function, when P j equals P final When I = 1, otherwise I = 0, T j To predict phase P j The preset duration, E j Let G1 be the weight value corresponding to the j-th second traffic signal control model, j = {1, 2, 3, p}, p be the third predetermined quantity, p be a positive integer, and G2 be the second accumulated value.

[0220] Calculate the ratio of the second accumulated value to the first accumulated value to obtain the duration of the output phase.

[0221] In this embodiment, the weighted average duration T of the traffic signal output phase final The expression is as follows:

[0222] T final =G2 / G1 Equation (16)

[0223] Where G1 is the first accumulated value, G2 is the second accumulated value, and T final Traffic signal output phase P final Corresponding to the weighted average duration, the traffic signal output phase P final Weighted average duration T final For output phase P final Duration.

[0224] This invention improves the decision-making ability of a first traffic signal control model cluster by evaluating and adjusting it under offline conditions. After the new traffic dataset is updated, a second traffic signal control model cluster is evaluated offline, and a second traffic signal control model with strong decision-making ability is selected based on the evaluation results. Finally, the traffic signal output phase and the duration of the traffic signal output phase are determined based on the selected second traffic signal control model. This reduces the dependence on real-time data and the computational burden of real-time data. By combining the similarity between historical traffic datasets and new traffic datasets, this invention also improves the applicability to traffic scenarios and the control effect of traffic signals, and reduces the cost of trial and error.

[0225] The following describes an embodiment of the apparatus described in this application, which can be used to execute the adaptive traffic signal control method in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the adaptive traffic signal control method described above.

[0226] Figure 5This is a block diagram illustrating an adaptive traffic signal control device according to an exemplary embodiment of this application. The device can be applied to… Figure 2 The implementation environment shown is specifically configured in computer device 102. This device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.

[0227] like Figure 5 As shown, the exemplary adaptive traffic signal control device includes an acquisition module 501, a first evaluation module 502, an adjustment module 503, an update module 504, a second evaluation module 505, and a determination module 506.

[0228] The acquisition module 501 is used to acquire historical traffic datasets, new traffic datasets, and the first traffic signal control model cluster.

[0229] The first evaluation module 502 is used to conduct an offline evaluation of the decision-making ability of the first traffic signal control model cluster based on historical traffic datasets and new traffic datasets, and obtain the first evaluation result.

[0230] The adjustment module 503 is used to combine the first evaluation results and the new traffic dataset to adjust the first traffic signal control model cluster, obtain the second traffic signal control model cluster, and update the first traffic signal control model cluster with the second traffic signal control model cluster.

[0231] The update module 504 is used to calculate the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset, so as to supplement the new traffic dataset with the corresponding historical traffic dataset according to the similarity and update the new traffic dataset.

[0232] The second evaluation module 505 is used to conduct an offline evaluation of the decision-making ability of the second traffic signal control model cluster using a new traffic dataset, and obtain the second evaluation result.

[0233] The determination module 506 is used to determine the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result.

[0234] In this embodiment, after acquiring the historical traffic dataset and the new traffic dataset, the historical traffic dataset and the new traffic dataset are standardized respectively. The process of standardizing the historical traffic dataset or the new traffic dataset includes: (1) dividing the historical traffic dataset or the new traffic dataset into multiple sub-datasets according to different intersections; (2) dividing the data in the sub-datasets into a state information set, a control information set, and a state evaluation set according to the state information sequence S, the control information sequence A, and the state evaluation sequence R; (3) dividing the state information data S belonging to the same time moment according to the time correspondence. t-1Control information data A t-1 State evaluation data R t-1 and the state information data S at the next moment t The formula for the standard dataset H, which forms a quadruple, is shown in formula (1), and will not be repeated here.

[0235] In this embodiment, before acquiring historical traffic datasets and new traffic datasets, it is necessary to collect new traffic datasets using devices such as sensors and cameras.

[0236] In this embodiment, the first traffic signal control model cluster includes multiple first traffic signal control models, including but not limited to traffic signal control models based on deep learning, traffic signal control models based on pre-training, traffic signal control models based on transfer learning, traffic signal control models based on decision trees, and traffic signal control models based on support vector machines.

[0237] In this embodiment, the decision-making ability of the first traffic signal control model cluster is evaluated to quantify the decision-making performance of the first traffic signal control model cluster. The first traffic signal control model with strong decision-making ability is selected from the first traffic signal control model cluster, and the first traffic signal control model cluster is further optimized based on the first traffic signal control model with strong decision-making ability.

[0238] In this embodiment, the process of adjusting the first traffic signal control model cluster to obtain the second traffic signal control model cluster by combining the first evaluation result and the new traffic dataset includes: (1) using the new traffic dataset as an offline training set to train a first predetermined number of the first traffic signal control model clusters offline; (2) using the historical traffic dataset and the new traffic dataset as a global dataset to train a second predetermined number of the first traffic signal control models with the highest scores in the first ranking sequence offline, to obtain a second predetermined number of optimal models, wherein the second predetermined number is less than or equal to the difference between a preset number threshold and the first predetermined number; (3) merging the optimal models with the offline-trained first traffic signal control model clusters to obtain the second traffic signal control model cluster.

[0239] In this embodiment, by performing offline training on the first traffic signal control model cluster and adding the optimal model to the offline-trained first traffic signal control model cluster, the proportion of the optimal model in the first traffic signal control model cluster is increased, thereby further optimizing the decision performance of the first traffic signal control model cluster and its adaptability to new traffic datasets.

[0240] In this embodiment, when the first traffic signal control model cluster data is acquired again, the second traffic signal control model cluster is used instead of the first traffic signal control model cluster. This not only simplifies the optimization process of the traffic signal control model cluster, but also further improves the decision-making ability and applicability of the traffic signal control model cluster.

[0241] In this embodiment, the historical data set is added to the new traffic dataset based on the similarity between the new traffic dataset and the historical traffic dataset. This not only improves the data diversity of the new traffic dataset, but also allows for offline evaluation of the second traffic signal control model cluster using the updated new traffic dataset, further enabling the selection of traffic signal control models with stronger decision-making capabilities.

[0242] In this embodiment, the offline evaluation of the decision-making capability of the second traffic signal control model cluster based on the new traffic dataset includes: (1) dividing the new traffic dataset into an offline training set and an offline test set according to a preset ratio; (2) training the obtained second initialization model offline using the offline training set to obtain a second prediction model; (3) inputting the offline test set into the second traffic signal control model cluster to obtain a second decision result; (4) inputting the second decision result into the second prediction model to obtain a second prediction result; and (5) evaluating the second prediction result using the second state evaluation function to obtain a second evaluation result.

[0243] In this embodiment, the decision-making ability of the second traffic signal control model cluster is evaluated offline using a new traffic dataset, which further increases the proportion of the optimal model in the second traffic signal control model cluster and continuously optimizes the performance of the model cluster.

[0244] In this embodiment, the process of determining the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result includes: (1) sorting multiple second decision capability scores in descending order; (2) selecting the top-ranked second traffic signal control model according to a third predetermined number; (3) inputting the second traffic signal control model into the traffic signal controller to obtain the corresponding predicted phase; (4) determining the traffic signal output phase based on multiple second decision capability scores and the predicted phase; and (5) determining the duration of the traffic signal output phase based on the predicted phase, the traffic signal output phase, and the preset duration.

[0245] It should be noted that the adaptive traffic signal control device and the adaptive traffic signal control method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the adaptive traffic signal control device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0246] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the adaptive traffic signal control method provided in the above embodiments.

[0247] Figure 6 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0248] like Figure 6 As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on a program stored in Read-Only Memory (ROM) 602 or a program loaded from Storage Section 608 into Random Access Memory (RAM) 603. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.

[0249] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0250] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs various functions defined in the system of this application.

[0251] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0252] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0253] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0254] Another aspect of this application provides a computer-readable storage medium storing computer-readable instructions that, when executed by a computer's processor, cause the computer to perform the adaptive traffic signal control method provided in the various embodiments described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not incorporated into the electronic device.

[0255] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0256] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0257] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0258] It should be understood that the above content is only a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. An adaptive traffic signal control method, characterized in that, include: Acquire historical traffic datasets, new traffic datasets, and the first traffic signal control model cluster; The decision-making capability of the first traffic signal control model cluster is evaluated offline based on the historical traffic dataset and the new traffic dataset to obtain a first evaluation result; Based on the first evaluation result and the new traffic dataset, the first traffic signal control model cluster is adjusted to obtain the second traffic signal control model cluster, and the first traffic signal control model cluster is updated with the second traffic signal control model cluster. Calculating the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset, and supplementing the new traffic dataset with the corresponding historical traffic dataset based on the similarity, and updating the new traffic dataset, wherein calculating the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset, and supplementing the new traffic dataset with the corresponding historical traffic dataset based on the similarity, includes: preprocessing the new traffic dataset and the historical traffic dataset respectively to obtain corresponding first datasets and second datasets; dividing the first dataset into intervals according to preset class intervals to obtain interval datasets; extracting window datasets from the second dataset according to preset sliding window values; dividing the window datasets into segments according to the class intervals to obtain segment datasets; calculating the similarity between the interval datasets and the segment datasets to obtain a similarity value; comparing the similarity value with a preset similarity threshold; if the similarity value is less than or equal to the preset similarity threshold, supplementing the interval dataset with the segment dataset; The decision-making ability of the second traffic signal control model cluster is evaluated offline using the updated traffic dataset to obtain the second evaluation result. The traffic signal output phase and the duration of the traffic signal output phase are determined based on the second evaluation result.

2. The adaptive traffic signal control method according to claim 1, characterized in that, The decision-making capability of the first traffic signal control model cluster is evaluated offline based on the historical traffic dataset and the new traffic dataset to obtain a first evaluation result, including: The historical traffic dataset is used as an offline training set to train the first initialization model offline, thereby obtaining the first prediction model. The new traffic dataset is input as an offline test set into the first traffic signal control model cluster to obtain the first decision result. The first decision result is input into the first prediction model to obtain a first prediction result; the first prediction result includes first state information data. The first prediction result is evaluated by a first state evaluation function to obtain a first evaluation result; the first evaluation result includes multiple first decision-making ability scores.

3. The adaptive traffic signal control method according to claim 2, characterized in that, The first prediction result is evaluated using a first state evaluation function to obtain a first evaluation result, including: The multiple first decision-making ability scores are sorted in ascending or descending order to obtain a first sorting sequence. The first traffic signal control model cluster includes multiple first traffic signal control models, and the multiple first traffic signal control models correspond one-to-one with the multiple first decision-making ability scores. Based on the comparison between the number of models in the first traffic signal control model cluster and the preset number threshold, the first predetermined number of the first traffic signal control models with the highest scores in the first sorting sequence are selected to adjust the number of models in the first traffic signal control model cluster, and the adjusted first traffic signal control model cluster is used as the first evaluation result.

4. The adaptive traffic signal control method according to claim 3, characterized in that, Based on the comparison between the number of models in the first traffic signal control model cluster and a preset number threshold, the first predetermined number of the first traffic signal control models with the highest scores in the first sorting sequence are selected, including: The number of models in the first traffic signal control model cluster is compared with the preset number threshold. If the number of models in the first traffic signal control model cluster is equal to the preset number threshold, select the first predetermined number of the first traffic signal control models with the highest scores in the first sorting sequence, where the first predetermined number is less than the preset number threshold. If the number of models in the first traffic signal control model cluster is less than the preset number threshold, the number of models in the first traffic signal control model cluster is taken as the first predetermined number.

5. The adaptive traffic signal control method according to claim 4, characterized in that, Combining the first evaluation results and the new traffic dataset, the first traffic signal control model cluster is adjusted to obtain a second traffic signal control model cluster, including: The new traffic dataset is used as an offline training set to train the first predetermined number of the first traffic signal control model cluster offline. Using the historical traffic dataset and the new traffic dataset as a global dataset, the first traffic signal control model with the highest score in the first sorting sequence is trained offline to obtain the second predetermined number of optimal models. The second predetermined number is less than or equal to the difference between the preset number threshold and the first predetermined number. The optimal model is merged with the first traffic signal control model cluster trained offline to obtain the second traffic signal control model cluster.

6. The adaptive traffic signal control method according to any one of claims 2-5, characterized in that, The decision-making capability of the second traffic signal control model cluster was evaluated offline using the updated traffic dataset, resulting in a second evaluation result, including: The updated traffic dataset is divided into an offline training set and an offline test set according to a preset ratio. The second initialization model is trained offline using the offline training set to obtain the second prediction model; The offline test set is input into the second traffic signal control model cluster to obtain the second decision result; The second decision result is input into the second prediction model to obtain the second prediction result; the second prediction result includes second state information data; The second prediction result is evaluated by a second state evaluation function to obtain a second evaluation result, which includes multiple second decision-making ability scores.

7. The adaptive traffic signal control method according to claim 6, characterized in that, The first state information data includes the first vehicle queue length at the next moment and the first vehicle cumulative waiting time at the next moment. The first state evaluation function is determined based on a preset first weight coefficient, the first vehicle queue length at the next moment, a preset second weight coefficient, and the first vehicle cumulative waiting time at the next moment. The second state information data includes the second vehicle queue length at the next moment and the second vehicle cumulative waiting time at the next moment. The second state evaluation function is determined based on the preset first weight coefficient, the second vehicle queue length at the next moment, the preset second weight coefficient, and the second vehicle cumulative waiting time at the next moment.

8. The adaptive traffic signal control method according to claim 1, characterized in that, Calculate the similarity between the interval dataset and the segment dataset to obtain a similarity value, including: Based on the data category, the interval dataset is divided into multiple first-category datasets; Based on the number of data points in the multiple first category datasets and the number of data points in the interval dataset, the distribution probability of the multiple first category datasets is calculated to obtain a first probability distribution; Based on the data categories, the fragment dataset is divided into multiple second-category datasets; Based on the number of data points in the multiple second-category datasets and the number of data points in the fragment datasets, the distribution probability of the multiple second-category datasets is calculated to obtain the second probability distribution; The similarity value is obtained by calculating the KL divergence between the first probability distribution and the second probability distribution corresponding to the data category.

9. The adaptive traffic signal control method according to claim 6, characterized in that, Determining the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result includes: The multiple second decision-making ability scores are sorted in descending order; the second traffic signal control model cluster includes multiple second traffic signal control models, and each of the multiple second traffic signal control models corresponds one-to-one with a multiple second decision-making ability score; Select the second traffic signal control model that ranks highest according to the third predetermined number; The second traffic signal control model is input into the traffic signal controller to obtain the corresponding predicted phase; The traffic signal output phase is determined based on multiple second decision-making ability scores and the predicted phase; The duration of the traffic signal output phase is determined based on the predicted phase, the traffic signal output phase, and the preset duration.

10. The adaptive traffic signal control method according to claim 9, characterized in that, The traffic signal output phase is determined based on multiple second decision-making ability scores and the predicted phase, including: Multiple second decision-making ability scores are input into a softmax function, and the weight values ​​of the corresponding prediction phases are calculated through the softmax function. The weight values ​​belonging to the same predicted phase are summed to obtain multiple cumulative weight values; The predicted phase with the largest cumulative weight value is used as the traffic signal output phase.

11. The adaptive traffic signal control method according to claim 9, characterized in that, The duration of the traffic signal output phase is determined based on the predicted phase, the traffic signal output phase, and the preset duration, including: The predicted phases are compared with the traffic signal output phases respectively; Determine whether the comparison results are consistent. If the comparison results are consistent, multiply the corresponding weight value as a weighting coefficient by the preset duration to obtain multiple first products; accumulate the corresponding weight values ​​to obtain a first accumulated value. The first products are summed to obtain the second accumulated value; The duration of the output phase is obtained by calculating the ratio of the second accumulated value to the first accumulated value.

12. An adaptive traffic signal control device, characterized in that, The method applied to the adaptive traffic signal control method as described in any one of claims 1-11 includes: The acquisition module is used to acquire historical traffic datasets, new traffic datasets, and the first traffic signal control model cluster; The first evaluation module is used to conduct an offline evaluation of the decision-making ability of the first traffic signal control model cluster based on the historical traffic dataset and the new traffic dataset, and obtain a first evaluation result. The adjustment module is used to combine the first evaluation result and the new traffic dataset to adjust the first traffic signal control model cluster to obtain a second traffic signal control model cluster, and update the first traffic signal control model cluster with the second traffic signal control model cluster. An update module is used to calculate the similarity between the fragment feature distribution of the historical traffic dataset and the overall feature distribution of the new traffic dataset, so as to supplement the corresponding historical traffic dataset to the new traffic dataset according to the similarity and update the new traffic dataset. The second evaluation module is used to conduct an offline evaluation of the decision-making ability of the second traffic signal control model cluster using the updated new traffic dataset, and obtain the second evaluation result. The determination module is used to determine the traffic signal output phase and the duration of the traffic signal output phase based on the second evaluation result.

13. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the adaptive traffic signal control method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by a computer's processor, cause the computer to perform the adaptive traffic signal control method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Smart city traffic signal control recommendation method, system and device

    CN109887284A

  • Responsive traffic signal control method and apparatus therefor

    WO2018030772A1