Traffic signal lamp control method and system based on space-time flow data
By obtaining spatiotemporal traffic monitoring data in the traffic data management database and generating implicit representation sequences, inputting congestion prediction neural networks to obtain traffic congestion confidence, the problem of difficult dynamic adjustment of existing traffic light control methods is solved, and more accurate and efficient traffic flow management is achieved.
Patent Information
- Application Number
- CN202411889445.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing traffic light control methods are difficult to dynamically adjust according to real-time traffic flow changes, resulting in frequent traffic congestion during peak hours and emergencies.
By obtaining the spatiotemporal flow monitoring data of the target road in the traffic data management database, an implicit representation sequence of spatiotemporal flow is generated, and inputting it into the target congestion prediction neural network to obtain traffic congestion confidence and dynamically adjust the traffic light control strategy.
It improves the accuracy and real-time nature of traffic flow prediction, enhances the dynamic nature of traffic light control, reduces the occurrence of traffic congestion, and improves road traffic efficiency.
Smart Images

Figure CN119600830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a traffic light control method and system based on spatiotemporal flow data. Background Art
[0002] With the acceleration of urbanization and the rapid growth of motor vehicles, urban traffic congestion is becoming increasingly serious, which has a significant impact on residents' travel efficiency and urban economic development. Traditional traffic light control methods often rely on fixed signal timing schemes, which are difficult to dynamically adjust according to real-time traffic flow changes, resulting in frequent traffic congestion during peak hours and emergencies, and limited road capacity.
[0003] In order to meet this challenge, intelligent traffic management systems based on big data and artificial intelligence technologies have gradually emerged in recent years. These systems collect and analyze a large amount of traffic flow data, use machine learning models to predict traffic congestion, and dynamically adjust traffic light control strategies based on the prediction results, in order to effectively guide traffic flow and maximize road capacity.
[0004] However, existing data-driven traffic congestion prediction methods still have some limitations. On the one hand, most methods only focus on the spatial characteristics of traffic flow data (such as lane occupancy, vehicle speed, etc.), while ignoring the importance of temporal characteristics (such as the changing trend and periodicity of traffic flow). This leads to poor performance of the model in predicting the correlation between continuous traffic flow data, affecting the accuracy of congestion prediction. On the other hand, when dealing with large-scale, high-dimensional traffic flow data, existing congestion prediction models often face problems such as high computational complexity and long training time, making it difficult to achieve efficient and real-time congestion prediction and traffic light control in practical applications. Summary of the invention
[0005] In view of this, an embodiment of the present invention at least provides a traffic light control method based on spatiotemporal flow data.
[0006] The technical solution of the embodiment of the present invention is achieved as follows: On the one hand, an embodiment of the present invention provides a traffic signal control method based on spatiotemporal flow data, comprising: obtaining target spatiotemporal flow monitoring data of a target road in a past monitoring time period in a traffic data management library; generating a spatiotemporal flow implicit representation sequence of the target road in the past monitoring time period based on the target spatiotemporal flow monitoring data, wherein the spatiotemporal flow implicit representation sequence includes a spatiotemporal flow implicit representations, each spatiotemporal flow implicit representation corresponds to a traffic flow data collected from the target road, wherein a≥1; obtaining a integrated spatiotemporal flow implicit representation based on the a spatiotemporal flow implicit representations and a time series embedded implicit representations, wherein the a time series embedded implicit representations are A temporal embedded implicit representation in the implicit representation is used to characterize the time point position characteristics of a traffic flow data collected for the target road in a traffic flow data; based on inputting the a integrated spatiotemporal flow implicit representations into the target congestion prediction neural network, a traffic congestion confidence is obtained, and when the traffic congestion confidence is not less than a set critical value, the target road is determined as a traffic congestion section, wherein the target congestion prediction neural network includes a plurality of cascaded bypass network components, and the execution data of a bypass network component of the plurality of bypass network components is determined by the execution results of b bypass network components before the one bypass network component, and b is a pre-set value.
[0007] On the other hand, the present invention provides a computer system, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the above method when executing the program.
[0008] The present invention embeds the time series information of the traffic flow data at each time point in the collected historical data based on the target spatiotemporal flow monitoring data of the target road in the past monitoring time period, and inputs the spatiotemporal flow monitoring data after the integration of the time series embedding implicit representation into the target congestion prediction neural network, so that the target congestion prediction neural network integrating the bypass network component can learn the time information between multiple continuous traffic flow data to increase the accuracy of the congestion prediction results output by the neural network. That is, based on combining the time series information of each traffic flow data with the traffic flow data characteristics, the learning effect of the target congestion prediction neural network on the correlation between multiple traffic flow data is improved, and the accuracy of the estimated results of the traffic congestion road section is improved, so as to accurately control the traffic lights.
[0009] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present invention and, together with the specification, are used to explain the technical solutions of the present invention.
[0011] Figure 1 A schematic diagram of the implementation flow of a traffic light control method based on spatiotemporal flow data provided in an embodiment of the present invention.
[0012] Figure 2 A hardware entity schematic diagram of a computer system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0014] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. The terms "first / second / third" are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first / second / third" may be interchanged in a specific order or sequential order where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the present invention and are not intended to limit the present invention.
[0016] The embodiment of the present invention provides a traffic light control method based on spatiotemporal flow data, which can be executed by a processor of a computer system, wherein the computer system can refer to a device with data processing capability, such as a server, a laptop, a tablet computer, or a desktop computer.
[0017] Figure 1 A schematic diagram of the implementation flow of a traffic signal light control method based on spatiotemporal flow data provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method comprises the following steps: Step S100: Obtain target spatiotemporal traffic monitoring data of a target road in a past monitoring period in a traffic data management database.
[0018] The target road is the specific road on which the system analyzes traffic flow. It can be a main road, a secondary road, or a road in a specific area in the city. The past monitoring time period refers to the specific time period for which the system hopes to obtain traffic flow data. This time period can be the most recent hour, day, week, or longer, depending on the needs and purpose of the system analysis. For example, if the system aims to predict traffic congestion in the next hour, the past monitoring time period may be set to the same time period in the most recent week.
[0019] After determining the target road and the past monitoring time period, the computer system accesses the traffic data management library. The traffic data management library is a database that stores a large amount of traffic flow data, which may come from various sensors installed on the road, such as geomagnetic sensors, video sensors, radar sensors, etc. These sensors can collect traffic flow data on the road in real time or regularly, including the number of vehicles, speed, lane occupancy, etc., and upload the data to the traffic data management library for storage and management.
[0020] In the traffic data management database, the spatiotemporal flow monitoring data of the target road is stored in a certain data structure and format. These data usually include multiple features, such as timestamp, road number, lane number, number of vehicles, average speed, lane occupancy rate, etc. The timestamp is used to identify the specific time of data collection, the road number and lane number are used to distinguish different roads and lanes, and the number of vehicles, average speed and lane occupancy rate directly reflect the traffic flow conditions on the road.
[0021] The computer system queries the traffic data management database and selects the corresponding spatiotemporal traffic monitoring data according to the target road and the past monitoring time period. This process may involve complex database query operations, such as writing query statements in SQL language, specifying query conditions (such as road number, time range, etc.), and returning data records that meet the conditions. The query result is usually a collection of multiple data records, each of which corresponds to traffic flow monitoring data at a point in time.
[0022] For example, suppose the target road is the main road A in a city, and the past monitoring period is from 8 to 9 a.m. every day in the past week. The computer system will query the traffic data management library for all traffic flow monitoring data of the main road A between 8 to 9 a.m. every day in the past week. The query result may be a set of 7 data records, each of which contains the following features: Timestamp: for example, "2023-10-01 08:00:00", "2023-10-02 08:00:00", ..., "2023-10-07 08:00:00"; Road number: for example, "A001"; Lane number: for example, "1", "2", "3", "4"; Number of vehicles: For example, [200, 180, 190, 210] means that at the first time point, the number of vehicles on the four lanes are 200, 180, 190, and 210 respectively; Average speed: For example, [30, 32, 28, 35] means that at the first time point, the average speeds of vehicles in the four lanes are 30 km / h, 32 km / h, 28 km / h, and 35 km / h respectively; Lane occupancy rate: For example, [0.6, 0.55, 0.65, 0.7] means that at the first time point, the lane occupancy rates of the four lanes are 60%, 55%, 65%, and 70%, respectively; These features together constitute the target spatiotemporal traffic monitoring data of the target road in the past monitoring period, providing a rich information basis for subsequent steps. By analyzing and processing these data, the computer system can more accurately predict future traffic congestion, thereby optimizing traffic signal control strategies and improving road traffic efficiency.
[0023] Step S200: Based on the target spatiotemporal flow monitoring data, generate a spatiotemporal flow implicit representation sequence of the target road in the past monitoring time period, wherein the spatiotemporal flow implicit representation sequence includes a spatiotemporal flow implicit representations, each spatiotemporal flow implicit representation corresponds to a traffic flow data collected for the target road once, wherein a≥1.
[0024] Step S200 aims to convert the target spatiotemporal traffic monitoring data of the target road in the past monitoring period into a spatiotemporal traffic implicit representation sequence. This step converts the original traffic flow data into a format that can be processed by the neural network, providing a basis for congestion prediction in subsequent steps.
[0025] In step S100, the computer system has obtained the target spatiotemporal traffic monitoring data of the target road in the past monitoring time period from the traffic data management library. These data usually exist in a structured form, including multiple features such as timestamp, road number, lane number, number of vehicles, average speed, lane occupancy rate, etc. However, these raw data cannot be directly input into the neural network for processing, because the neural network usually requires the input data to have a specific format and dimension. Therefore, the task of step S200 is to convert these raw data into implicit representations that the neural network can understand.
[0026] First, the computer system preprocesses the target spatiotemporal flow monitoring data. The purposes of preprocessing include data cleaning, data standardization, and data dimensionality reduction. Data cleaning refers to removing outliers, missing values, or duplicate values in the data to ensure the accuracy and completeness of the data. Data standardization refers to converting the data to the same scale to avoid the impact of dimensional differences between different features on model training. Data dimensionality reduction refers to reducing the dimension of the data, reducing the complexity of the model, and improving the generalization ability of the model through methods such as feature selection or feature transformation.
[0027] In the preprocessing process, the computer system can use various mathematical methods and algorithms. For example, for missing values, the system can use interpolation methods (such as linear interpolation, polynomial interpolation, etc.) to fill in; for outliers, the system can use statistical methods (such as 3σ principle, box plot method, etc.) to identify and eliminate; for data standardization, the system can use Z-score standardization, Min-Max standardization and other methods; for data dimensionality reduction, the system can use principal component analysis (PCA), linear discriminant analysis (LDA) and other methods.
[0028] After preprocessing, the computer system encodes the target spatiotemporal traffic monitoring data to generate an implicit representation of spatiotemporal traffic. Encoding refers to converting the original data into a vector or matrix form that the neural network can understand. In this process, the system can use different encoding methods, such as One-Hot Encoding, Word Embedding, etc. However, in the encoding of traffic flow data, due to the spatiotemporal characteristics of the data, more complex encoding methods are usually used, such as spatiotemporal convolutional networks (ConvLSTM), graph neural networks (GNN), etc.
[0029] Taking the spatiotemporal convolutional network as an example, this method can convert spatiotemporal traffic monitoring data into a series of implicit representations. Specifically, the spatiotemporal convolutional network consists of convolutional layers and recurrent layers. The convolutional layers are used to extract spatial features (such as lane occupancy, vehicle speed, etc.), and the recurrent layers are used to extract temporal features (such as the changing trend of traffic flow, etc.). By stacking multiple convolutional layers and recurrent layers, the spatiotemporal convolutional network can gradually convert the raw data into higher-level implicit representations.
[0030] In step S200, the computer system inputs the target spatiotemporal flow monitoring data into the spatiotemporal convolutional network and obtains a series of implicit representations through forward propagation. These implicit representations contain the spatiotemporal feature information in the original data and have fixed dimensions and formats, and can be directly input into the subsequent neural network for processing.
[0031] For example, suppose the target road is the main road A in a city, and the past monitoring period is from 8 to 9 a.m. every day in the past week. After preprocessing, the computer system obtains a set of 7 data records, each of which contains features such as timestamp, road number, lane number, number of vehicles, average speed, lane occupancy, etc. Then, the system inputs this data into the spatiotemporal convolutional network, and obtains 7 implicit spatiotemporal flow representations through the processing of the convolutional layer and the loop layer. Each implicit representation is a vector that contains the spatiotemporal feature information at that point in time.
[0032] These implicit representations constitute a sequence of implicit representations of the spatiotemporal traffic flow of the target road in the past monitoring time period. In this sequence, each implicit representation corresponds to a traffic flow data, that is, each implicit representation represents the traffic flow status of the target road at a certain point in time. The length a of the sequence is equal to the number of time points in the past monitoring time period, that is, a=7 in this example. Through this step, the computer system converts the original traffic flow data into a format that can be processed by the neural network, providing a basis for congestion prediction in subsequent steps. At the same time, because the implicit representation contains the spatiotemporal feature information in the original data, it can improve the prediction accuracy of the neural network for traffic congestion conditions.
[0033] In practical applications, the generation of implicit representation sequences of spatiotemporal traffic may involve more complex mathematical and algorithmic knowledge. For example, in order to further improve the quality of implicit representation, computer systems can use advanced technologies such as attention mechanisms and autoencoders. In addition, in order to process large-scale traffic flow data, the system can use distributed computing frameworks (such as Apache Spark, TensorFlow Distributed, etc.) to accelerate the calculation process. The application of these advanced technologies and frameworks will further improve the performance and effect of traffic light control methods.
[0034] Step S300: Based on the a spatiotemporal flow implicit representations and the a time series embedded implicit representations, a integrated spatiotemporal flow implicit representations are obtained, wherein one of the a time series embedded implicit representations is used to characterize the time point position characteristics of a traffic flow data collected for the target road in the a traffic flow data.
[0035] Step S300 aims to combine a spatiotemporal flow implicit representations with a time series embedding implicit representations to generate a integrated spatiotemporal flow implicit representations. The key to this step is to fuse the temporal features and spatial features of spatiotemporal flow data to provide more comprehensive and accurate information for congestion prediction in subsequent steps.
[0036] In step S200, the computer system has generated a implicit representation of the spatiotemporal traffic of the target road in the past monitoring time period. These implicit representations capture the spatial features in the traffic flow data, such as lane occupancy, vehicle speed, etc., and are converted into vector or matrix forms that the neural network can understand through encoding processing. However, these implicit representations do not yet contain temporal features, that is, they do not reflect the changing trends and correlations of traffic flow data at different time points.
[0037] To make up for this deficiency, step S300 introduces the time-series embedded implicit representation. The time-series embedded implicit representation is a special implicit representation that is used to characterize the time point position characteristics of traffic flow data in a collection. In other words, the time-series embedded implicit representation can tell the neural network when a certain spatiotemporal flow implicit representation was collected and its relative position relationship with other implicit representations in time.
[0038] In order to generate implicit representations of temporal embedding, computer systems can use a variety of methods. One of the methods is to encode time points using sine and cosine functions. This method is called positional encoding, which can convert discrete time points into continuous vector representations while maintaining the relative order of the time points. Specifically, for the i-th time point, its position encoding can be calculated by the following formula: ; ; in, and Respectively represent the values of the 2ith and 2i+1th dimensions in the position encoding, pos represents the position of the time point (counting starts from 0), Indicates the dimension of position encoding. In this way, each time point is converted into a vector representation of a fixed dimension, and each dimension of the vector contains the temporal feature information of the time point.
[0039] In step S300, the computer system generates a corresponding time-series embedded implicit representation for each spatiotemporal flow implicit representation. Since there are a spatiotemporal flow implicit representations, a time-series embedded implicit representations will also be generated. Each time-series embedded implicit representation corresponds to a collection time point of traffic flow data and characterizes the time characteristics at that time point.
[0040] Next, the computer system integrates a spatiotemporal flow implicit representations with a temporal embedding implicit representations to generate a integrated spatiotemporal flow implicit representations. The purpose of the integration is to fuse spatial features with temporal features so that each integrated implicit representation contains complete spatiotemporal flow information. There are many ways to integrate, one of which is weighted summation. Specifically, for the i-th spatiotemporal flow implicit representation and the i-th temporal embedding implicit representation, their integrated implicit representation can be calculated by the following formula:
[0041] in, are weighting coefficients used to adjust the weights of spatial and temporal features in the integrated implicit representation. These coefficients can be determined through experiments or optimization algorithms to ensure that the integrated implicit representation can best reflect the spatiotemporal characteristics of traffic flow data.
[0042] For example, suppose the target road is the main road A in a certain city, and the past monitoring time period is from 8 to 9 am every day in the past week, so a=7. In step S200, the computer system has generated 7 implicit representations of spatiotemporal traffic, each of which is a vector that contains the spatial feature information at that point in time. Then, in step S300, the system generates a corresponding time series embedded implicit representation for each implicit representation, and each time series embedded implicit representation is also a vector that contains the time feature information at that point in time. Next, the system uses the weighted summation method to integrate the spatiotemporal traffic implicit representation with the time series embedded implicit representation, and obtains 7 integrated spatiotemporal traffic implicit representations. Each integrated implicit representation is a vector that contains both spatial feature information and time feature information, providing comprehensive data support for subsequent congestion predictions.
[0043] Through the processing of step S300, the computer system integrates the temporal and spatial characteristics of the spatiotemporal traffic data to generate a more comprehensive and accurate implicit representation of the integrated spatiotemporal traffic. These integrated implicit representations will serve as input data for the congestion prediction neural network in the subsequent steps, helping the neural network to better learn the spatiotemporal characteristics of traffic flow data, thereby improving the accuracy and reliability of congestion prediction.
[0044] Step S400: Based on inputting the a integrated spatiotemporal flow implicit representations into the target congestion prediction neural network, a traffic congestion confidence is obtained, and when the traffic congestion confidence is not less than a set critical value, the target road is determined as a traffic congestion section, wherein the target congestion prediction neural network includes a plurality of cascaded bypass network components, and the execution data of one bypass network component of the plurality of bypass network components is determined by the execution results of b bypass network components that are before the one bypass network component, and b is a pre-set value.
[0045] Step S400 aims to input a integrated spatiotemporal flow implicit representation into the target congestion prediction neural network to obtain traffic congestion confidence and determine whether the target road is a traffic congestion section based on the confidence. This step is the core of the entire method. It uses the powerful learning ability of the neural network to extract the potential mode of traffic congestion from the integrated spatiotemporal flow implicit representation and provide a decision basis for traffic light control.
[0046] In step S300, the computer system has generated a integrated spatiotemporal traffic implicit representations, each of which contains the spatiotemporal traffic information of the target road at a certain time point in the past monitoring period. These integrated implicit representations are ideal formats for neural network input because they contain both spatial features (such as lane occupancy, vehicle speed, etc.) and temporal features (such as the changing trend of traffic flow, etc.), providing rich information for neural network learning.
[0047] Next, the computer system inputs these integrated implicit representations into the target congestion prediction neural network. The target congestion prediction neural network is a complex machine learning model that contains multiple cascaded residual network components that can extract high-level features from the input data layer by layer and make congestion predictions based on these features.
[0048] The bypass network component is a special structure in the neural network that allows the input data to directly skip certain layers and combine with the output of deeper layers. This structure helps alleviate the gradient vanishing problem of the neural network during training and improves the convergence speed and performance of the model. In the target congestion prediction neural network, the execution data of each bypass network component is determined by the execution results of the previous b bypass network components, where b is a pre-set value. This means that each component can use the learning results of the previous component to further extract useful information from the input data.
[0049] When the implicit representation of integrated spatiotemporal traffic is input into the neural network, it will pass through a series of network layers for forward propagation. During the forward propagation process, each network layer will transform the input data and extract higher-level features. These features will gradually be abstracted from the initial raw data to the final congestion prediction results.
[0050] Finally, the target congestion prediction neural network will output a traffic congestion confidence. This confidence is a value between 0 and 1, which represents the neural network's prediction probability of whether the target road is congested at a given point in time. The higher the confidence, the more confident the neural network is that the road will be congested; the lower the confidence, the less likely it is to be congested.
[0051] After obtaining the traffic congestion confidence, the computer system will compare it with the set critical value. The critical value is a predetermined threshold used to determine whether the target road is a traffic congestion section. If the confidence is not less than the critical value, the system will determine the target road as a traffic congestion section and may trigger the corresponding traffic light control strategy to alleviate the congestion. On the contrary, if the confidence is less than the critical value, the system believes that the target road is not currently congested and the current traffic light control strategy can continue to be maintained.
[0052] For example, suppose the target road is a main road in a city, and the past monitoring time period is from 8 to 9 a.m. every day in the past week, so a=7. In step S300, the computer system has generated 7 integrated spatiotemporal flow implicit representations, each of which contains the spatiotemporal flow information of the road at these 7 time points. Then, in step S400, the system inputs these integrated implicit representations into the target congestion prediction neural network. The neural network finally outputs a traffic congestion confidence, assuming it is 0.85, through layer-by-layer processing of multi-layer bypass network components. If the critical value set by the system is 0.8, then since 0.85 is not less than 0.8, the system will believe that the main road has a higher risk of congestion at a given time point, and can trigger corresponding traffic signal control strategies, such as extending the green light time, reducing the red light time, etc., to alleviate potential congestion.
[0053] The training of the target congestion prediction neural network involves a lot of data collection and labeling work. During the training process, the computer system builds a debugging learning sample library, which contains a large number of traffic road samples with known congestion conditions and their corresponding integrated spatiotemporal flow implicit representation sequences. Then, the system uses these samples to iterate the initial congestion prediction neural network for multiple times, and minimizes the prediction error by adjusting the network parameters. After the training is completed, the system will obtain a target congestion prediction neural network with good performance, which can accurately extract the characteristics of traffic congestion from the integrated spatiotemporal flow implicit representation and make reliable congestion predictions based on these characteristics.
[0054] Through the processing of step S400, the computer system can use the target congestion prediction neural network to accurately predict the traffic congestion condition of the target road, and make corresponding traffic light control decisions based on the prediction results. This not only helps to improve road traffic efficiency and reduce the occurrence of traffic congestion, but also improves the intelligent level of urban traffic management.
[0055] As an implementation mode, the step S200 generates an implicit representation sequence of the spatiotemporal flow of the target road in a past monitoring period based on the target spatiotemporal flow monitoring data, including: Step S210: obtaining a spatiotemporal flow monitoring data corresponding to a traffic flow data collected by the target road in the past monitoring time period, wherein each spatiotemporal flow monitoring data of the a spatiotemporal flow monitoring data includes external environment data and road traffic flow data; Step S220: Based on data encoding processing of the external environment data and the road traffic flow data, a spatiotemporal flow implicit representations corresponding to a spatiotemporal flow monitoring data are obtained, wherein the spatiotemporal flow implicit representation sequence includes the a spatiotemporal flow implicit representations.
[0056] Step S200 aims to convert the target spatiotemporal flow monitoring data of the target road in the past monitoring time period into a spatiotemporal flow implicit representation sequence.
[0057] In step S210, the computer system obtains a spatiotemporal traffic monitoring data corresponding to a traffic flow data collected during the past monitoring period for the target road. These data are the basis for subsequent encoding processing and generating implicit representation.
[0058] First, the computer system identifies the target road and the past monitoring time period. The target road is the object of analysis, and its traffic flow conditions have an important impact on the overall traffic system. The past monitoring time period is the time range for data collection, which can be the last hour, day, week or longer, depending on the analysis requirements.
[0059] Once the target road and past monitoring time period are determined, the computer system begins to retrieve relevant data from the traffic data management library. These data usually include two parts: external environment data and road traffic flow data.
[0060] External environment data: This type of data reflects the impact of the external environment of the road on traffic flow, including but not limited to weather conditions (such as sunny, rainy, snowy, etc.), time (such as morning and evening peak hours, off-peak hours), special events (such as traffic accidents, road construction, large-scale events, etc.). External environment data usually exists in the form of categorical variables. For example, weather conditions can be represented by one-hot encoding (sunny = [1,0,0], rainy = [0,1,0], snowy = [0,0,1]).
[0061] Road traffic flow data: This type of data directly describes the flow of vehicles on the road, including but not limited to the number of vehicles, average speed, lane occupancy, etc. These data usually exist in the form of numerical variables. For example, the number of vehicles can be the total number of vehicles passing through a lane at a certain point in time, and the average speed can be the average driving speed of all vehicles at a certain point in time.
[0062] In step S210, the computer system retrieves a traffic flow data of the target road in the past monitoring time period from the traffic data management library, and each data contains the corresponding external environment data and road traffic flow data. For example, if the past monitoring time period is from 8 to 9 a.m. every day of the most recent week, and the target road is a main road, then a is equal to 7 (there are 7 days in a week), and the computer system will retrieve 7 traffic flow data, and each data contains the external environment data and road traffic flow data between 8 to 9 a.m. on that day.
[0063] In step S220, the computer system performs data encoding processing on the a spatiotemporal flow monitoring data obtained in step S210 to generate a spatiotemporal flow implicit representations. Data encoding processing is the process of converting raw data into a vector or matrix form that can be understood by the neural network, which helps to extract useful information from the data and reduce noise interference.
[0064] Data encoding processing includes, for example, cleaning the raw data by a computer system to remove abnormal values, missing values, or duplicate values. Abnormal values are, for example, erroneous data caused by sensor failure or data transmission errors, missing values may be blank data caused by the failure to collect or loss of data at certain time points, and duplicate values may be redundant data caused by repeated records during data transmission. The purpose of cleaning data is to ensure the accuracy and effectiveness of subsequent encoding processing. Then, the computer system selects features that have an important impact on congestion prediction from the cleaned data. Feature selection is a key step that determines which data will be used for subsequent encoding processing and model training. Feature selection can be based on domain knowledge, statistical methods, or machine learning methods. For example, in traffic flow data, the number of vehicles, average speed, and lane occupancy are usually important features, while some subcategories in weather conditions (such as different light intensities on sunny days) may have little effect on congestion prediction and can be ignored. After completing feature selection, the computer system will standardize the selected features to ensure that the dimensions of different features are consistent. Data standardization can be performed by methods such as Z-score standardization and Min-Max standardization. For example, for the feature of the number of vehicles, Z-score standardization can be used to convert it into a standardized variable with a mean of 0 and a standard deviation of 1; for the categorical feature of weather conditions, one-hot encoding can be used to convert it into a binary vector. Finally, the computer system encodes the standardized data to generate an implicit representation of spatiotemporal traffic. The encoding method depends on the type and characteristics of the data. For numerical features (such as the number of vehicles, average speed, etc.), their standardized values can be directly used as part of the implicit representation; for categorical features (such as weather conditions, time, etc.), they can be converted into vector form using methods such as one-hot encoding and embedding vectors. In addition, in order to capture the temporal characteristics in the data, timestamps can also be encoded using methods such as position encoding and time series models.
[0065] In step S220, the computer system performs the above encoding process on a spatiotemporal flow monitoring data to generate a spatiotemporal flow implicit representations. Each implicit representation is a vector or matrix that contains useful information and features in the original data. For example, for the spatiotemporal flow monitoring data at a certain time point, its implicit representation may include the following parts: Standardized value of the number of vehicles (such as 0.5); standardized value of average speed (such as -0.2); standardized value of lane occupancy (such as 0.8); one-hot encoding of weather conditions (such as [1,0,0] for sunny days); position encoding of time (such as a vector obtained by encoding time points using sine and cosine functions).
[0066] These implicit representations will be used in the subsequent steps S300 and S400 as input data of the neural network to perform congestion prediction and traffic light control decisions.
[0067] Through the processing of steps S210 and S220, the computer system converts the target spatiotemporal flow monitoring data of the target road in the past monitoring period into a spatiotemporal flow implicit representation sequence. These implicit representations not only contain useful information and features in the original data, but also remove noise interference through encoding processing, thereby improving the quality and availability of the data. This provides a solid foundation for subsequent congestion prediction and traffic light control.
[0068] As an implementation manner, the step S300, obtaining a integrated spatiotemporal flow implicit representations according to the a spatiotemporal flow implicit representations and a time series embedded implicit representations, includes: Step S310: obtaining the a time series embedded implicit representations according to the distribution arrangement order of each of the a time series implicit representations in the time series implicit representation sequence; Step S320: performing an integration operation on the a spatiotemporal flow implicit representations and the a time series embedded implicit representations to obtain the a integrated spatiotemporal flow implicit representations.
[0069] In step S310, the task of the computer system is to generate a corresponding time series embedded implicit representations according to the distribution order of a time-space flow implicit representations in the time-space flow implicit representation sequence. The time series embedded implicit representation is a special implicit representation that is used to capture the time characteristics in traffic flow data, that is, the relative order and correlation between traffic flow data at different time points.
[0070] In order to generate implicit representations of temporal embedding, computer systems can use a variety of methods, one of which is positional encoding. Positional encoding is a technique that converts discrete time points into continuous vector representations, which maintains the relative order of time points and allows neural networks to capture temporal features when processing sequence data. In positional encoding, each time point is assigned a unique vector representation, which is calculated using a certain mathematical formula.
[0071] In step S310, the computer system generates a corresponding time-series embedded implicit representation for each of the a time-space flow implicit representations. Since there are a representations in the time-space flow implicit representation sequence, a time-series embedded implicit representations will also be generated. Each time-series embedded implicit representation corresponds to a specific time point and captures the time characteristics at that time point.
[0072] For example, suppose a=5, that is, there are 5 representations in the implicit representation sequence of spatiotemporal traffic, corresponding to 5 different time points. The computer system will generate temporal embedding implicit representations for these 5 representations in turn. For the first time point (position 0), its temporal embedding implicit representation can be calculated by the above position encoding formula to obtain a vector representation containing multiple dimensions. For subsequent time points, this process is repeated until the corresponding temporal embedding implicit representations are generated for all a time points.
[0073] In step S320, the task of the computer system is to integrate a spatiotemporal traffic implicit representations with a time series embedding implicit representations to generate a integrated spatiotemporal traffic implicit representations. The purpose of the integration is to combine spatial features (captured by the spatiotemporal traffic implicit representation) with temporal features (captured by the time series embedding implicit representation) to provide comprehensive and accurate data support for subsequent congestion predictions. The integration operation can be performed in a variety of ways, one of which is weighted summation. Weighted summation is a linear combination method that assigns different weights to different input features and adds them together to obtain output features. In step S320, the computer system can assign different weights to the spatiotemporal traffic implicit representation and the time series embedding implicit representation, and add them together to obtain the integrated spatiotemporal traffic implicit representation.
[0074] Assume that the i-th spatiotemporal flow is implicitly expressed as , the i-th time series embedding is implicitly expressed as , and their dimensions are and To perform the integration operation, the computer system can first concatenate the two representations into a larger vector, and then apply a linear transformation (such as a fully connected layer) to obtain the integrated representation. This process can be expressed as follows: ;; Among them, W is a learnable weight matrix with dimension , is the dimension of the integrated representation; b is a learnable bias term with dimension ; Indicates that and Spliced into a dimension Vector.
[0075] In step S320, the computer system performs the above integration operation for a spatiotemporal flow implicit representations and a time series embedded implicit representations respectively to generate a integrated spatiotemporal flow implicit representations. Each integrated representation contains the spatial features and temporal features at the corresponding time point, providing comprehensive information for subsequent congestion prediction.
[0076] For example, suppose the space-time flow is implicitly represented by F i The dimension is 10, and the temporal embedding implicitly represents T i The dimension of the integrated representation is 5, and the dimension of the integrated representation is d out is 15. First, a learnable weight matrix W and a bias term b are assigned to the two representations, and then they are concatenated into a vector of dimension 15, and a linear transformation is applied to obtain the integrated representation. This process is repeated for a spatiotemporal flow implicit representations and a temporal embedding implicit representations until a integrated spatiotemporal flow implicit representations are generated.
[0077] Through the processing of steps S310 and S320, the computer system combines a spatiotemporal flow implicit representations with a time series embedded implicit representations to generate a integrated spatiotemporal flow implicit representations. These integrated representations contain both spatial and temporal features, providing comprehensive and accurate data support for subsequent congestion prediction. This lays a solid foundation for the implementation of the traffic light control method, helps to improve road traffic efficiency and reduce the occurrence of traffic congestion.
[0078] As an implementation manner, the step S310, obtaining the a time series embedded implicit representations according to the distribution arrangement order of each of the a time series implicit representations in the time series implicit representation sequence, includes: Step S311: acquiring each implicit representation of space-time flow in the a implicit representations of space-time flow one by one as the implicit representation of current space-time flow; Step S312: performing time-series embedding on the current distribution arrangement order of the current spatiotemporal traffic implicit representation in the spatiotemporal traffic implicit representation sequence to obtain a current time-series embedded implicit representation.
[0079] In step S311, the task of the computer system is to obtain each of the a spatiotemporal traffic implicit representations one by one as the current spatiotemporal traffic implicit representation. The spatiotemporal traffic implicit representation sequence is generated by step S200, and it includes a representations, each of which corresponds to the traffic flow data of the target road at a time point in the past monitoring time period.
[0080] In order to obtain these representations one by one, the computer system can adopt an iterative method. Specifically, the system can start from the first representation of the sequence and visit each representation in turn until the last representation of the sequence. In each iteration, the system will regard the currently visited representation as the implicit representation of the current spatiotemporal flow and perform subsequent processing on it.
[0081] For example, suppose a=5, that is, there are 5 representations in the implicit representation sequence of spatiotemporal flow, corresponding to 5 different time points. The computer system will first access the first representation in the sequence and use it as the current implicit representation of spatiotemporal flow; then, the system will access the second representation and use it as the new current implicit representation of spatiotemporal flow; this process will be repeated until the system accesses the last representation in the sequence.
[0082] In step S312, the task of the computer system is to perform time series embedding on the distribution arrangement order of the current spatiotemporal flow implicit representation in the spatiotemporal flow implicit representation sequence to obtain the current time series embedded implicit representation. Time series embedding is a technique for encoding time information into a vector representation, which allows a neural network to capture time features when processing sequence data.
[0083] To achieve temporal embedding, computer systems can use a variety of methods, one of which is positional encoding. Positional encoding is a technique that converts discrete time points into continuous vector representations, which maintains the relative order of the time points and allows neural networks to capture temporal features when processing sequence data.
[0084] In position encoding, each time point is assigned a unique vector representation, which is calculated using a certain mathematical formula.
[0085] These two formulas calculate the values of even and odd dimensions in the vector respectively, and encode the position information of the time point into the continuous vector representation through the sine and cosine functions. Each dimension of the position encoding vector contains the position information of the time point, and the information between different dimensions is orthogonal, which helps the neural network capture the time characteristics.
[0086] In step S312, the computer system will calculate a corresponding position encoding vector for each current spatiotemporal flow implicit representation and use it as the current time series embedded implicit representation. Since there are a spatiotemporal flow implicit representations in the sequence, a time series embedded implicit representations will also be generated. Each time series embedded implicit representation contains the time feature information at the corresponding time point, providing a basis for subsequent integration operations.
[0087] For example, suppose a=5, that is, there are 5 implicit representations of spatiotemporal flow in the sequence. For the first representation (position 0), the computer system will use the above position encoding formula to calculate a dimension d model As the temporal embedding implicit representation; then, for the second representation (position 1), the system calculates another vector; this process is repeated until the temporal embedding implicit representation is calculated for the last representation in the sequence.
[0088] Note that although position encoding is a commonly used temporal embedding method, it is not the only method. In practical applications, computer systems can also use other temporal embedding methods, such as Temporal Convolutional Network (TCN), Recurrent Neural Network (RNN) or its variants (such as Long Short-Term Memory Network LSTM, Gated Recurrent Unit GRU), etc. These methods have their own advantages and disadvantages, and should be selected according to actual conditions.
[0089] Through the processing of steps S311 and S312, the computer system generates a corresponding time series embedded implicit representations for a time-space flow implicit representations. These time series embedded implicit representations capture the temporal feature information in the time-space flow implicit representation sequence, providing important data support for subsequent integration operations and congestion prediction.
[0090] As an implementation manner, the step S312, performing time series embedding on the current distribution arrangement order of the current spatiotemporal traffic implicit representation in the spatiotemporal traffic implicit representation sequence to obtain the current time series embedded implicit representation, includes: Step S3121: if the dimension of the current spatiotemporal flow implicit representation is c*1, a first distribution embedding operation is performed on the current distribution arrangement sequence through a first frequency function to obtain a first set of embedded element values, wherein the first set of embedded element values are double-digit embedded element values in the current temporal sequence embedded implicit representation, c≥2, and c is an integer; Step S3122: performing a second distribution embedding operation on the current distribution arrangement sequence through a second frequency function to obtain a second set of embedded element values, wherein the second set of embedded element values are single-digit embedded element values in the current time sequence embedded implicit representation; Step S3123: Determine the current time series embedded implicit representation based on the first set of embedded element values and the second set of embedded element values, wherein the dimension of the current time series embedded implicit representation is c*1.
[0091] In step S3121, the first task of the computer system is to check the dimension of the implicit representation of the current spatiotemporal flow. Assume that the dimension of the representation is c*1, where c is an integer greater than or equal to 2, indicating that there are c elements in the vector. Then, the system will perform a first distribution embedding operation on the distribution arrangement order (i.e., the position information of the time point) of the implicit representation of the current spatiotemporal flow in the sequence through the first frequency function.
[0092] The purpose of the first distribution embedding operation is to encode the position information of the time point into the double-digit element implicitly represented by the current time series embedding. To achieve this, the system defines a first frequency function that can calculate the corresponding embedded element value based on the position of the time point. The specific form of this function can be designed according to the actual situation, but usually it should be a function that can reflect the periodic changes of the position information, such as a sine function or a cosine function.
[0093] Taking the sine function as an example, assuming that the position of the time point is pos (counting starts from 0), the first frequency function can be defined as: ; Among them, T1 is the first frequency cycle, is the phase offset of the first frequency. These two parameters can be adjusted according to the actual situation to optimize the embedding effect. Through this function, the system can calculate an embedding element value for each time point and assign it to the double-digit element in the implicit representation of the current time series embedding.
[0094] For example, suppose c=4, that is, the implicit representation of the current spatiotemporal flow is a four-dimensional vector. The system can first calculate an embedded element value for the position pos of the time point, such as the value obtained using the above sine function, and then assign it to the second element in the current time series embedded implicit representation (because the second element is a double digit, the first element is a single digit, and the count starts from 1). Then, the system can calculate another embedded element value for the next time point and assign it to the fourth element, and so on, until the embedded element values are calculated for all time points and assigned to the corresponding double digit elements.
[0095] In step S3122, the computer system will continue to embed the distribution order of the current spatiotemporal flow implicit representation in the sequence, but this time it uses the second frequency function to perform the second distribution embedding operation. Different from the first distribution embedding operation, the goal of the second distribution embedding operation is to encode the position information of the time point into the single-digit element of the current temporal sequence embedded implicit representation.
[0096] To achieve this, the system defines a second frequency function, which can also calculate the corresponding embedded element value according to the position of the time point. Similar to the first frequency function, the second frequency function should also be a function that can reflect the periodic changes of position information, but its parameters (such as frequency period and phase offset) may be different from the first frequency function to ensure that the information embedded in the single-digit and double-digit elements is different.
[0097] Taking the cosine function as an example, assuming that the position of the time point is still pos, the second frequency function can be defined as: ; Where T2 is the second frequency period, is the phase offset of the second frequency. Like the first frequency function, these two parameters can also be adjusted according to actual conditions. Through this function, the system can calculate an embedded element value for each time point and assign it to the single-digit element in the implicit representation of the current time series embedding.
[0098] Continuing with c=4 as an example, after assigning a value to the double-digit element, the system can then calculate another embedded element value for the time point position pos, such as the value obtained using the above cosine function, and then assign it to the first element in the current time-series embedded implicit representation (because the first element is a single-digit digit). Then, the system can calculate another embedded element value for the next time point and assign it to the third element, and so on, until embedded element values are calculated for all time points and assigned to the corresponding single-digit elements.
[0099] In step S3123, the task of the computer system is to combine the embedded element values calculated in step S3121 and step S3122 to determine the current time-series embedded implicit representation. Since steps S3121 and S3122 calculate embedded element values for double-digit and single-digit elements respectively, the current time-series embedded implicit representation will contain all these values and arrange them according to their positions in the vector.
[0100] Specifically, if the dimension of the current spatiotemporal flow implicit representation is c*1, then the current time series embedded implicit representation will also be a c*1 dimensional vector. The first c / 2 elements of this vector (assuming c is an even number) will be the double-digit embedded element values calculated in step S3121, and the last c / 2 elements will be the single-digit embedded element values calculated in step S3122. If c is an odd number, there will be an extra element in the vector (usually the last element), which can be calculated according to some rule (such as taking the average of two adjacent double-digit or single-digit embedded element values).
[0101] After determining the current time series embedded implicit representation, the computer system can use it for subsequent integration operations and congestion prediction. Since the current time series embedded implicit representation contains the location information of the time point, it can help the neural network capture the time characteristics in the sequence of spatiotemporal traffic implicit representation, thereby improving the accuracy and reliability of congestion prediction.
[0102] Through the processing of steps S3121, S3122 and S3123, the computer system encodes the location information of the time point into the current time series embedded implicit representation, generating an integrated representation that contains both spatial features and temporal features. This integrated representation will provide comprehensive data support for subsequent congestion predictions and help improve the intelligent level of traffic light control.
[0103] As an implementation manner, the step S320, integrating the a time-space flow implicit representations and the a time series embedded implicit representations to obtain the a integrated time-space flow implicit representations, includes: Step S321: acquiring each implicit representation of space-time flow in the a implicit representations of space-time flow one by one as the implicit representation of current space-time flow; Step S322: acquiring each of the a time series embedded implicit representations one by one as the current time series embedded implicit representation; Step S323: weighted integration is performed on the current space-time flow implicit representation and the current time series embedded implicit representation to obtain the current integrated space-time flow implicit representation.
[0104] In step S321, the task of the computer system is to obtain each of the a spatiotemporal flow implicit representations one by one as the current spatiotemporal flow implicit representation. The spatiotemporal flow implicit representations are generated by step S200, and they capture the spatial characteristics of the target road at different time points in the past monitoring period, such as lane occupancy, vehicle speed, etc.
[0105] In order to obtain these representations one by one, the computer system can adopt an iterative method. Specifically, the system can start from the first spatiotemporal flow implicit representation and visit each representation in turn until the last representation. In each iteration, the system will regard the currently visited representation as the current spatiotemporal flow implicit representation and prepare to integrate it with the corresponding temporal embedding implicit representation.
[0106] For example, suppose a=5, that is, there are 5 implicit representations of spatiotemporal flow, corresponding to 5 different time points. The computer system will first access the first implicit representation of spatiotemporal flow and use it as the current implicit representation of spatiotemporal flow; then, the system will access the second representation and use it as the new current implicit representation of spatiotemporal flow; this process will be repeated until the system accesses the last representation.
[0107] In step S322, the task of the computer system is to obtain each representation in the a time-series embedded implicit representations one by one as the current time-series embedded implicit representation. The time-series embedded implicit representations are generated by step S310, and they capture the time characteristics in the sequence of spatiotemporal flow implicit representations, that is, the relative order and correlation between different time points.
[0108] Similar to step S321, the system can use an iterative method to obtain these time-series embedded implicit representations one by one. In each iteration, the system will regard the currently accessed representation as the current time-series embedded implicit representation, and prepare to integrate it with the corresponding current spatiotemporal flow implicit representation. Since the number of time-series embedded implicit representations (a) is the same as the number of spatiotemporal flow implicit representations, and there is a one-to-one correspondence between them, the system can access these representations in the same order.
[0109] Continuing with a=5 as an example, in step S321, when the computer system accesses the first spatiotemporal flow implicit representation, in step S322, the system will access the first temporal embedding implicit representation and use it as the current temporal embedding implicit representation; then, when accessing the second spatiotemporal flow implicit representation in step S321, in step S322, the system will access the second temporal embedding implicit representation, and so on, until the system has accessed all representations.
[0110] In step S323, the task of the computer system is to perform weighted integration of the current spatiotemporal flow implicit representation and the current time series embedding implicit representation to obtain the current integrated spatiotemporal flow implicit representation. Weighted integration is a method of combining multiple input features in a certain proportion, which allows the system to assign different weights to the input features according to their importance.
[0111] In order to achieve weighted integration, the computer system first defines a set of weight coefficients. These weight coefficients can be pre-set fixed values or dynamically determined through a learning algorithm (such as a neural network training process). During the weighted integration process, the system multiplies each input feature (the current spatiotemporal flow implicit representation and the current time series embedding implicit representation) by its corresponding weight coefficient, and then adds all the weighted features to obtain the integrated representation.
[0112] Assume that the dimension of the implicit representation of the current spatiotemporal flow is d1, the dimension of the implicit representation of the current time series embedding is d2, and they are assigned weight coefficients w1 and w2 respectively (note that these weight coefficients can be vectors or scalars, depending on the dimension and integration method of the input features). The weighted integration process can be expressed by the following formula: Integrated representation = w1 × current spatiotemporal flow implicit representation + w2 × current temporal embedding implicit representation. If w1 and w2 are vectors, and their dimensions match the dimensions of the current spatiotemporal flow implicit representation and the current temporal embedding implicit representation, respectively, then the above formula will represent an element-wise weighted summation operation. If w1 and w2 are scalars, then they will be multiplied by the entire current spatiotemporal flow implicit representation and the current temporal embedding implicit representation, respectively, and then summed.
[0113] In practical applications, the weighted integration method can be different, depending on the characteristics of the input features and the goals of the integration. For example, if the input features have different dimensions or orders of magnitude, the system may first standardize or normalize them to ensure the fairness of the weighted integration. In addition, the system can also adopt more complex integration methods, such as using neural network layers (such as fully connected layers) to perform nonlinear transformation and integration on the input features.
[0114] In step S323, the computer system performs weighted integration operations on a spatiotemporal flow implicit representations and a time series embedded implicit representations to obtain a integrated spatiotemporal flow implicit representations. Each integrated representation contains spatial and temporal feature information at the corresponding time point, providing comprehensive data support for subsequent congestion prediction.
[0115] Through the processing of steps S321, S322 and S323, the computer system integrates a spatiotemporal flow implicit representations with a time series embedded implicit representations to generate a integrated spatiotemporal flow implicit representations. These integrated representations contain both spatial feature information (such as lane occupancy, vehicle speed, etc.) and temporal feature information (such as the relative order and correlation between different time points), providing an important data basis for subsequent congestion prediction and traffic light control.
[0116] As an implementation manner, in the step S400, before obtaining the traffic congestion confidence by inputting the a integrated spatiotemporal flow implicit representations into the target congestion prediction neural network, the method further includes: Step S401: obtaining a debugging learning sample library, wherein each debugging learning sample in the debugging learning sample library includes an integrated spatiotemporal flow implicit representation sequence determined based on the spatiotemporal flow monitoring data of the traffic road sample in the traffic data management library during the past monitoring time period; Step S402: Debugging the initial congestion prediction neural network through the debugging learning sample library to obtain the debugged target congestion prediction neural network.
[0117] Step S400 is a core step in the traffic light control method, which aims to obtain traffic congestion confidence by inputting the implicit representation of the integrated spatiotemporal flow into the target congestion prediction neural network, and judge whether the target road is a traffic congestion section based on it.
[0118] In step S401, the task of the computer system is to obtain a debugging learning sample library. The debugging learning sample library is a database containing a large number of traffic road samples with known traffic congestion conditions and their corresponding integrated spatiotemporal flow implicit representation sequences. These samples are necessary for training and adjusting the congestion prediction neural network because they provide rich data support, enabling the neural network to learn the complex relationship between traffic flow data and congestion conditions.
[0119] In order to build a debugging learning sample library, the computer system retrieves a large number of traffic road samples and their spatiotemporal flow monitoring data in the past monitoring time period from the traffic data management library. These data include external environmental data (such as weather conditions, time, etc.) and road traffic flow data (such as the number of vehicles, average speed, lane occupancy, etc.). Then, the system preprocesses and encodes these data to generate the corresponding integrated spatiotemporal flow implicit representation sequence. These representation sequences will be used as input data in the debugging learning sample library for the subsequent neural network debugging process.
[0120] For example, suppose the debugging learning sample library contains 1,000 traffic road samples, each of which corresponds to a sequence of 7 integrated spatiotemporal traffic implicit representations (assuming that the past monitoring period is from 8 to 9 a.m. every day in the past week, so a=7). Each integrated spatiotemporal traffic implicit representation is a vector that contains the spatial and temporal feature information at the corresponding time point. These vectors will be used as input data for the neural network to train and adjust the parameters of the neural network to improve its ability to predict traffic congestion.
[0121] In step S402, the task of the computer system is to debug the initial congestion prediction neural network by debugging the learning sample library to obtain a debugged target congestion prediction neural network. The initial congestion prediction neural network is an untrained neural network model, which contains a series of network layers (such as convolutional layers, recurrent layers, fully connected layers, etc.) and parameters (such as weights and biases). These parameters are randomly assigned in the initial state, so the initial neural network cannot accurately predict traffic congestion conditions.
[0122] In order to debug the initial neural network, the computer system interacts with the data in the debugging learning sample library. Specifically, the system inputs the integrated spatiotemporal traffic implicit representation sequence in the sample library into the neural network and observes the output of the neural network. The system then calculates the error value of the error function (such as the cross entropy loss function) based on the difference between the output result and the known congestion conditions (i.e., the prior classification labels) in the sample library. This error value reflects the accuracy of the neural network's prediction results. The smaller the error value, the stronger the prediction ability of the neural network.
[0123] After obtaining the error value, the computer system will adjust the parameters of the neural network to reduce the error value and improve the prediction accuracy. This adjustment process is usually achieved through the back propagation algorithm and the optimization algorithm (such as the gradient descent algorithm, Adam algorithm, etc.). The back propagation algorithm is used to calculate the gradient of the error function to the neural network parameters, and the optimization algorithm updates the parameters of the neural network based on these gradients. This process is repeated for multiple iterations until the error value reaches the preset convergence condition or the maximum number of iterations is reached.
[0124] During the debugging process, the computer system also pays attention to some key issues. For example, in order to prevent the neural network from overfitting (i.e., the neural network performs well on the training data but poorly on the new data), the system can use regularization techniques (such as L1 regularization, L2 regularization, etc.) or early stopping to limit the complexity of the neural network. In addition, in order to speed up the debugging process and improve debugging efficiency, the system can also use distributed computing frameworks (such as Apache Spark, TensorFlow Distributed, etc.) to process large amounts of data in parallel.
[0125] After multiple iterations of debugging, the computer system will obtain a debugged target congestion prediction neural network. This neural network has learned to extract useful feature information from the implicit representation of integrated spatiotemporal flow and can accurately predict traffic congestion. Next, the system can use this neural network in step S400 to predict the traffic congestion of the target road and adjust the control strategy of the traffic light according to the prediction results.
[0126] Through the processing of steps S401 and S402, the computer system builds a debugging learning sample library and debugs the initial congestion prediction neural network. These preparations provide necessary data support and model basis for the execution of step S400, ensuring the accuracy and reliability of congestion prediction.
[0127] As an implementation manner, the step S402, debugging the initial congestion prediction neural network through the debugging learning sample library, includes: The initial congestion prediction neural network is debugged for the xth time based on the following operation process, wherein x≥1, when x=1, the congestion prediction neural network obtained by the x-1th debugging is the initial congestion prediction neural network that has not undergone debugging: Step S4021: determining the xth group of sample integrated spatiotemporal flow implicit representation sequence corresponding to the xth group of traffic road samples in the debugging learning sample library; Step S4022: loading the x-th group of sample integrated spatiotemporal flow implicit representation sequence into the congestion prediction neural network obtained by the x-1th debugging, and obtaining the x-th group of traffic congestion confidences determined by the congestion prediction neural network obtained by the x-1th debugging according to the x-th group of integrated spatiotemporal flow implicit representation sequence; Step S4023: determining an error value of an error function of the initial congestion prediction neural network during the x-th debugging according to the x-th group of traffic congestion confidences and the priori classification labels of the x-th group of traffic road samples; Step S4024: When the error value of the error function of the xth debugging does not meet the preset error requirement, the configuration variables in the multiple bypass network components in the congestion prediction neural network obtained in the x-1th debugging are optimized to obtain the congestion prediction neural network obtained in the xth debugging.
[0128] Step S402 is a key step in the traffic light control method, which aims to debug the initial congestion prediction neural network by debugging the learning sample library to obtain a debugged target congestion prediction neural network.
[0129] In step S4021, the task of the computer system is to determine the xth group of sample integrated spatiotemporal flow implicit representation sequence corresponding to the xth group of traffic road samples from the debugging learning sample library. The debugging learning sample library is a database containing a large number of traffic road samples with known traffic congestion conditions and their corresponding integrated spatiotemporal flow implicit representation sequences, which are necessary for training and adjusting the congestion prediction neural network.
[0130] In order to determine the xth group of samples integrating the spatiotemporal flow implicit representation sequence, the computer system first accesses the debugging learning sample library and retrieves the xth group of traffic road samples from it. This group of samples may contain the spatiotemporal flow monitoring data of one or more traffic roads in the past monitoring time period. Then, the system preprocesses and encodes these data to generate the corresponding integrated spatiotemporal flow implicit representation sequence. This sequence will be used as the input data for the xth debugging to train and adjust the parameters of the congestion prediction neural network.
[0131] For example, suppose the debugging learning sample library contains 1,000 groups of traffic road samples, and each group of samples corresponds to a sequence containing 7 integrated spatiotemporal traffic implicit representations (assuming that the past monitoring period is from 8 to 9 a.m. every day in the past week, so a=7). In the xth debugging, the computer system will retrieve the xth group of samples from the sample library and generate the corresponding integrated spatiotemporal traffic implicit representation sequence. This sequence may contain 7 vectors, each of which corresponds to the spatial and temporal feature information at a time point.
[0132] In step S4022, the task of the computer system is to load the x-th group of sample integrated spatiotemporal traffic implicit representation sequence into the congestion prediction neural network obtained by the x-1th debugging, and obtain the x-th group of traffic congestion confidence determined by the network according to the input sequence. The congestion prediction neural network obtained by the x-1th debugging is gradually optimized in the previous debugging process, and it contains a series of network layers (such as convolutional layers, recurrent layers, fully connected layers, etc.) and parameters (such as weights and biases).
[0133] In order to load data into the neural network, the computer system passes the xth group of samples, which integrates the implicit representation sequence of spatiotemporal traffic, as input data to the input layer of the neural network. The network will then forward-propagate the data according to its internal structure and parameter settings, extract features layer by layer, and calculate output values. In this process, each network layer of the network will transform and calculate its input data and pass the results to the next layer. Finally, the output layer of the network will output a traffic congestion confidence value, which indicates the network's predicted probability of whether the traffic road sample corresponding to the input sequence is congested.
[0134] For example, suppose that the congestion prediction neural network obtained by the x-1th debugging is a neural network containing multiple residual network components. After loading the xth group of samples to integrate the implicit representation sequence of spatiotemporal traffic into the network, the network will forward propagate the data according to its internal structure and parameter settings. In this process, each residual network component will transform and calculate its input data and pass the result to the next layer. Finally, the output layer of the network will output a confidence value between 0 and 1 (such as 0.85), indicating that the network believes that the traffic road sample corresponding to the xth group of samples has an 85% probability of being congested.
[0135] In step S4023, the computer system determines the error value of the error function of the initial congestion prediction neural network at the xth debugging according to the xth group of traffic congestion confidence and the prior classification mark of the xth group of traffic road samples. The prior classification mark is the congestion condition label of the known traffic road samples in the debugging learning sample library, which indicates whether the sample is congested in actual circumstances. By comparing the confidence with the prior classification mark, the system can calculate the error value to measure the prediction accuracy of the neural network.
[0136] The error function is a mathematical function used to evaluate the prediction accuracy of the neural network. It usually calculates the error value based on the difference between the confidence and the prior classification label. Commonly used error functions include cross entropy loss function, mean square error function, etc. In step S4023, the computer system will use the selected error function to calculate the error value of the xth debugging. This error value will reflect the prediction performance of the neural network in the current debugging round. The smaller the error value, the higher the prediction accuracy of the neural network.
[0137] For example, suppose that the cross entropy loss function is used as the error function. In the xth debugging, the computer system compares the xth group of traffic congestion confidence (such as 0.85) with the prior classification label of the xth group of traffic road samples (such as 1 for congestion and 0 for no congestion), and calculates the cross entropy loss value as the error value. If the prior classification label is 1 (indicating congestion) and the confidence is 0.85 (indicating that the network believes that there is an 85% probability of congestion), the cross entropy loss value will be smaller; if the prior classification label is 0 (indicating no congestion) and the confidence is still 0.85, the cross entropy loss value will be larger. This error value will be used in the subsequent optimization process to guide the adjustment direction of the neural network parameters.
[0138] In step S4024, the task of the computer system is to optimize the configuration variables in the multiple bypass network components in the congestion prediction neural network obtained by the x-1th debugging when the error value of the error function of the xth debugging does not meet the preset error requirement, so as to obtain the congestion prediction neural network obtained by the xth debugging. Configuration variables are adjustable parameters in the neural network, such as weights and biases, which determine the behavior and performance of the network. By optimizing these variables, the system can gradually improve the prediction accuracy of the neural network.
[0139] The optimization process usually involves the application of back-propagation and optimization algorithms. The back-propagation algorithm is used to calculate the gradient of the error function with respect to the configuration variables (i.e., the derivative of the error value with respect to the configuration variables), while the optimization algorithm updates the value of the configuration variables based on these gradients to reduce the error value. This process is repeated for multiple iterations until the error value reaches the preset convergence condition or the maximum number of iterations is reached. In each iteration, the system adjusts the value of the configuration variables based on the current error value and gradient information, and recalculates the error value to evaluate the effect of the adjustment.
[0140] In step S4024, the computer system will optimize the configuration variables of multiple bypass network components in the congestion prediction neural network obtained by the x-1th debugging. The bypass network component is a special network structure that allows input data to directly skip certain layers and combine with the output of deeper layers by introducing skip connections, thereby helping to alleviate the gradient vanishing problem and improve the training efficiency of the network. During the optimization process, the system will adjust the configuration variables of each bypass network component and guide the adjustment direction based on the gradient information of the error function. After multiple iterative optimizations, the system will obtain a congestion prediction neural network with better performance as the result of the xth debugging.
[0141] For example, suppose that in the xth debugging, the error value of the error function does not reach the preset convergence condition (such as 0.01). In this case, the computer system will optimize the configuration variables of the bypass network component in the congestion prediction neural network obtained in the x-1th debugging. The optimization process may involve adjusting the values of parameters such as weights and biases to reduce the error value. After multiple iterations of optimization, the system will obtain a congestion prediction neural network with a smaller error value as the result of the xth debugging. This process will be repeated for multiple debugging rounds (that is, the value of x gradually increases) until the error value reaches the preset convergence condition or the maximum number of iterations is reached. Finally, the system will obtain a debugged target congestion prediction neural network for subsequent traffic congestion prediction and traffic light control decisions.
[0142] As an implementation mode, the step S4022, loading the x-th group of sample integrated spatiotemporal flow implicit representation sequence into the congestion prediction neural network obtained by the x-1th debugging, and obtaining the x-th group of traffic congestion confidences determined by the congestion prediction neural network obtained by the x-1th debugging according to the x-th group of integrated spatiotemporal flow implicit representation sequence, includes: Step S40221: Based on loading the x-th group of sample integrated spatiotemporal flow implicit representation sequence into multiple bypass network components in the congestion prediction neural network obtained by the x-1-th debugging, obtain the processed integrated spatiotemporal flow implicit representation output by the last bypass network component among the multiple bypass network components; Step S40222: Based on loading the processed integrated spatiotemporal flow implicit representation into the densely connected components in the congestion prediction neural network obtained by the x-1th debugging, obtaining the x-th group of traffic congestion confidences, wherein the congestion prediction neural network obtained by the x-1th debugging includes the multiple bypass network components and the densely connected components.
[0143] In step S40221, the computer system loads the x-th group of sample integrated spatiotemporal flow implicit representation sequence into multiple bypass network components in the congestion prediction neural network obtained by the x-1th debugging, and obtains the processed integrated spatiotemporal flow implicit representation output by the last bypass network component among these components. The bypass network component (ResidualNetwork, ResNet) is a special neural network structure that allows input data to directly skip certain layers and combine with the output of deeper layers by introducing skip connections, thereby helping to alleviate the gradient vanishing problem and improve the training efficiency and performance of the network.
[0144] In congestion prediction neural networks, bypass network components are usually used to extract high-level features from input data layer by layer. These components may include convolutional layers, pooling layers, activation function layers, etc., which perform a series of transformations and calculations on the input data to extract useful feature information. When the x-th group of samples integrating the implicit representation sequence of spatiotemporal traffic is loaded into the network, it will first be processed by the first bypass network component, and then the output of this component will be used as the input of the next component, and so on, until the last bypass network component.
[0145] In this process, each bypass network component performs specific transformations and calculations on the input data and passes the results to the next component. For example, the convolution layer can perform convolution operations on the input data to extract local features; the pooling layer can downsample the input data to reduce the data dimension and the amount of calculation; the activation function layer can introduce nonlinear factors to enhance the network's expressiveness. These transformations and calculations work together on the input data to gradually extract higher-level feature information.
[0146] After the input data is processed by all bypass network components, the output of the last component will be a processed integrated spatiotemporal traffic implicit representation. This representation contains high-level feature information in the input data and is an important basis for subsequent congestion prediction.
[0147] In step S40222, the task of the computer system is to load the processed integrated spatiotemporal flow implicit representation obtained in step S40221 into the dense connection component (DenseConnection Component) in the congestion prediction neural network obtained by the x-1th debugging, and obtain the xth group of traffic congestion confidence. The dense connection component is a structure in the neural network, which is usually located in the last few layers of the network and is used to integrate and make decisions on the feature information extracted previously.
[0148] In the congestion prediction neural network, the densely connected component may include a fully connected layer (Fully ConnectedLayer), an activation function layer, etc. The fully connected layer will perform a linear transformation on the input data and map the previous feature information to a new feature space; the activation function layer will introduce nonlinear factors, enabling the network to learn more complex functional relationships. When the processed integrated spatiotemporal traffic implicit representation is loaded into the densely connected component, it will first be processed by the fully connected layer, then activated by the activation function layer, and finally output a traffic congestion confidence value.
[0149] This confidence value is a value between 0 and 1, which indicates the network's prediction probability of whether the traffic road sample corresponding to the input data is congested. If the confidence value is close to 1, it means that the network believes that the road corresponding to the sample has a high risk of congestion; if the confidence value is close to 0, it means that the network believes that the road corresponding to the sample has a low risk of congestion. This confidence value will be used as the result of congestion prediction in subsequent traffic light control decisions.
[0150] For example, suppose that the congestion prediction neural network obtained by the x-1th debugging contains three bypass network components and one densely connected component. When the xth group of samples' integrated spatiotemporal traffic implicit representation sequence is loaded into the network, it will be processed by the three bypass network components in turn. Each component will perform specific transformations and calculations on the input data and extract higher-level feature information. Finally, the processed integrated spatiotemporal traffic implicit representation will be loaded into the densely connected component, processed by the fully connected layer and the activation function layer, and a traffic congestion confidence value (such as 0.78) will be output. This value indicates that the network believes that the traffic road sample corresponding to the xth group of samples has a 78% probability of being congested.
[0151] Through the processing of steps S40221 and S40222, the computer system loads the x-th group of sample integrated spatiotemporal flow implicit representation sequence into the congestion prediction neural network obtained by the x-1th debugging, and obtains the x-th group of traffic congestion confidence through the network's forward propagation process. This confidence value will provide an important basis for subsequent traffic congestion prediction and traffic light control decision-making.
[0152] Figure 2 A hardware entity diagram of a computer system provided by an embodiment of the present invention is as follows Figure 2 As shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.
[0153] The memory 1002 stores computer programs that can be run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001. It can also cache data to be processed or processed by the processor 1001 and various modules in the computer system 1000 (for example, image data, audio data, voice communication data, and video communication data). This can be achieved through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0154] When the processor 1001 executes the program, the steps of any of the above-mentioned traffic signal light control methods based on spatiotemporal flow data are implemented. The processor 1001 generally controls the overall operation of the computer system 1000.
[0155] An embodiment of the present invention provides a computer storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the traffic light control method based on spatiotemporal flow data as in any of the above embodiments.
[0156] It should be pointed out here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding. The above processor can be at least one of a target application integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, and a microprocessor. It can be understood that the electronic device that realizes the function of the above processor can also be other, and the embodiment of the present invention is not specifically limited.
[0157] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc.
[0158] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in one embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the sequence number of the above-mentioned steps / processes does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The above-mentioned sequence number of the embodiment of the present invention is only for description and does not represent the advantages and disadvantages of the embodiment. It should be noted that in this article, the term "includes", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the element.
[0159] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0160] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0161] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0162] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0163] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0164] The above description is only an implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A traffic light control method based on spatiotemporal flow data, characterized in that: include: Obtaining target spatiotemporal traffic monitoring data of the target road in the past monitoring time period in the traffic data management database; Generate a spatiotemporal traffic implicit representation sequence of the target road in a past monitoring period according to the target spatiotemporal traffic monitoring data, wherein the spatiotemporal traffic implicit representation sequence includes a spatiotemporal traffic implicit representations, each of which corresponds to a traffic flow data collected from the target road, wherein a≥1; According to the a spatiotemporal flow implicit representations and the a time series embedded implicit representations, a integrated spatiotemporal flow implicit representations are obtained, wherein one time series embedded implicit representation among the a time series embedded implicit representations is used to characterize the time point position characteristics of a traffic flow data collected for the target road in the a traffic flow data; Based on inputting the a integrated spatiotemporal flow implicit representations into the target congestion prediction neural network, a traffic congestion confidence is obtained, and when the traffic congestion confidence is not less than a set critical value, the target road is determined as a traffic congestion section, wherein the target congestion prediction neural network includes a plurality of cascaded bypass network components, and the execution data of one bypass network component of the plurality of bypass network components is determined by the execution results of b bypass network components that are located before the one bypass network component, and b is a pre-set value.
2. The method according to claim 1, characterized in that The step of generating an implicit representation sequence of the spatiotemporal flow of the target road in a past monitoring period based on the target spatiotemporal flow monitoring data includes: Acquire a time-space flow monitoring data corresponding to a traffic flow data collected by the target road in the past monitoring time period, wherein each time-space flow monitoring data of the a time-space flow monitoring data includes external environment data and road traffic flow data; Based on data encoding processing of the external environment data and the road traffic flow data, a spatiotemporal flow implicit representations corresponding to a spatiotemporal flow monitoring data are obtained, wherein the spatiotemporal flow implicit representation sequence includes the a spatiotemporal flow implicit representations.
3. The method according to claim 1, characterized in that The step of obtaining a integrated spatiotemporal flow implicit representations based on the a spatiotemporal flow implicit representations and the a time series embedded implicit representations comprises: Obtaining the a time series embedded implicit representations according to the distribution arrangement order of each of the a time series implicit representations in the time series implicit representation sequence; An integration operation is performed on the a spatiotemporal flow implicit representations and the a time series embedding implicit representations to obtain the a integrated spatiotemporal flow implicit representations.
4. The method according to claim 3, characterized in that: The step of obtaining the a time series embedded implicit representations according to the distribution arrangement order of each of the a time series implicit representations in the time series implicit representation sequence comprises: Acquire each of the a space-time flow implicit representations one by one as the current space-time flow implicit representation; The current distribution arrangement order of the implicit representation of the current spatiotemporal traffic in the implicit representation sequence of the spatiotemporal traffic is temporally embedded to obtain the current temporally embedded implicit representation.
5. The method according to claim 4, characterized in that The step of performing time series embedding on the current distribution arrangement order of the current space-time traffic implicit representation in the space-time traffic implicit representation sequence to obtain the current time series embedded implicit representation includes: If the dimension of the current spatiotemporal flow implicit representation is c*1, a first distribution embedding operation is performed on the current distribution arrangement sequence through a first frequency function to obtain a first set of embedded element values, wherein the first set of embedded element values are double-digit embedded element values in the current temporal sequence embedded implicit representation, c≥2, and c is an integer; Performing a second distribution embedding operation on the current distribution arrangement sequence through a second frequency function to obtain a second set of embedded element values, wherein the second set of embedded element values are single-digit embedded element values in the current time sequence embedded implicit representation; The current temporal sequence embedded implicit representation is determined according to the first set of embedded element values and the second set of embedded element values, wherein the dimension of the current temporal sequence embedded implicit representation is c*1.
6. The method according to claim 3, characterized in that The step of integrating the a time-space flow implicit representations and the a time series embedding implicit representations to obtain the a integrated time-space flow implicit representations includes: Acquire each of the a space-time flow implicit representations one by one as the current space-time flow implicit representation; Acquire each of the a temporal embedding implicit representations one by one as the current temporal embedding implicit representation; The current space-time flow implicit representation and the current time series embedded implicit representation are weightedly integrated to obtain the current integrated space-time flow implicit representation.
7. The method according to claim 1, characterized in that Before obtaining the traffic congestion confidence by inputting the a integrated spatiotemporal flow implicit representations into the target congestion prediction neural network, the method further includes: Acquire a debugging learning sample library, wherein each debugging learning sample in the debugging learning sample library includes an integrated spatiotemporal flow implicit representation sequence determined based on the spatiotemporal flow monitoring data of the traffic road sample in the traffic data management library during the past monitoring time period; The initial congestion prediction neural network is debugged through the debugging learning sample library to obtain the debugged target congestion prediction neural network.
8. The method according to claim 7, characterized in that The debugging of the initial congestion prediction neural network by using the debugging learning sample library includes: The initial congestion prediction neural network is debugged for the xth time based on the following operation process, wherein x≥1, when x=1, the congestion prediction neural network obtained by the x-1th debugging is the initial congestion prediction neural network that has not undergone debugging: Determining, in the debugging learning sample library, an xth group of sample integrated spatiotemporal flow implicit representation sequence corresponding to the xth group of traffic road samples; Loading the x-th group of sample integrated spatiotemporal flow implicit representation sequence into the congestion prediction neural network obtained by the x-1th debugging, and obtaining the x-th group of traffic congestion confidences determined by the congestion prediction neural network obtained by the x-1th debugging according to the x-th group of integrated spatiotemporal flow implicit representation sequence; Determining an error value of an error function of the initial congestion prediction neural network during the xth debugging according to the xth group of traffic congestion confidences and the priori classification labels of the xth group of traffic road samples; When the error value of the error function of the xth debugging does not meet the preset error requirement, the configuration variables in the multiple bypass network components in the congestion prediction neural network obtained in the x-1th debugging are optimized to obtain the congestion prediction neural network obtained in the xth debugging.
9. The method according to claim 8, characterized in that The step of loading the x-th group of sample integrated spatiotemporal flow implicit representation sequence into the congestion prediction neural network obtained by the x-1th debugging to obtain the x-th group of traffic congestion confidences determined by the congestion prediction neural network obtained by the x-1th debugging according to the x-th group of integrated spatiotemporal flow implicit representation sequence includes: Based on loading the x-th group of sample integrated spatiotemporal flow implicit representation sequence into multiple bypass network components in the congestion prediction neural network obtained by the x-1-th debugging, obtaining the processed integrated spatiotemporal flow implicit representation output by the last bypass network component among the multiple bypass network components; Based on loading the processed integrated spatiotemporal flow implicit representation into the densely connected components in the congestion prediction neural network obtained by the x-1th debugging, the x-th group of traffic congestion confidences is obtained, wherein the congestion prediction neural network obtained by the x-1th debugging includes the multiple bypass network components and the densely connected components.
10. A computer system comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Skeleton action recognition method under small sample
CN112651360A
Expressway congestion prediction method based on space-time multi-head attention mechanism
CN115050177A
Road traffic jam prediction method, device and equipment and readable storage medium
CN115222089A
Traffic jam prediction method and device
CN118486161A
Multi-modal network acceleration method and system based on dynamic bypass selection
CN118780368A