Urban traffic operation monitoring method and system based on artificial intelligence algorithm

By constructing a dynamic influence matrix combined with a static adjacency matrix, the shortcomings of the ST-GCN model in predicting dynamic traffic scenarios are addressed, achieving higher monitoring accuracy and adaptability, and enhancing the real-time monitoring capability of urban traffic operations.

CN121963474APending Publication Date: 2026-05-01山东海润数聚科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
山东海润数聚科技有限公司
Filing Date
2026-01-16
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing spatiotemporal graph convolutional network (ST-GCN) models cannot reflect the dynamic interaction changes of traffic status over time, congestion levels, or sudden events in traffic networks, resulting in insufficient prediction accuracy and model robustness.

Method used

By constructing a dynamic impact matrix, combining a static adjacency matrix and real-time traffic data, we can obtain differences in speed limits, traffic flow, and historical vehicle speeds. By integrating accident impact indicators, we can generate an adaptive adjacency matrix, which is used as input to the ST-GCN model to achieve real-time perception and quantitative representation of the dynamic road node impact relationships.

Benefits of technology

It significantly improves the monitoring accuracy and model adaptability in complex traffic scenarios, thereby enhancing the effectiveness of urban traffic monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963474A_ABST
    Figure CN121963474A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of traffic monitoring, in particular to an urban traffic operation monitoring method and system based on an artificial intelligence algorithm. The method comprises the steps that the average vehicle speed and the vehicle flow of each intersection at each moment are collected, and an intersection sequence and a static adjacency matrix are obtained; obtaining the average vehicle speed and vehicle flow of each intersection in the intersection sequence at the current moment, and respectively building first, second and third matrixes; multiplying elements at the same position in the first matrix, the second matrix and the third matrix to obtain a dynamic influence matrix; analyzing each traffic accident at the current moment to obtain an accident influence matrix; weighting the accident influence matrix at the current moment, and adding the weighted accident influence matrix with the dynamic influence matrix to obtain an optimized dynamic influence matrix; obtaining a self-adaptive adjacency matrix by combining the static adjacency matrix; and inputting the adaptive adjacency matrix, the average vehicle speed of each intersection and the traffic flow into an ST-GCN model, and outputting the congestion probability of each intersection at the current moment. According to the invention, urban traffic can be effectively monitored.
Need to check novelty before this filing date? Find Prior Art

Description

Urban Traffic Operation Monitoring Method and System Based on Artificial Intelligence Algorithm Technical Field

[0001] This invention relates to the field of traffic monitoring technology, specifically to a method and system for monitoring urban traffic operations based on artificial intelligence algorithms. Background Technology

[0002] Spatiotemporal traffic prediction technology is a crucial foundational capability of intelligent transportation systems. Its core objective is to infer future trends in speed, flow, or congestion using historical traffic data. With the development of graph neural networks, the Spatio-Temporal Graph Convolutional Network (ST-GCN) algorithm has been widely applied in traffic prediction tasks due to its ability to simultaneously model the topological structure of road networks and the temporal dependencies of traffic sequences. This type of method typically treats roads as nodes, constructs the physical connections of the road network as an adjacency matrix, captures the structural influences between nodes through spatial convolution, and extracts the temporal variation characteristics of each node using temporal convolution. Based on this spatiotemporal joint modeling framework, the ST-GCN model possesses strong global relationship understanding capabilities, effectively reflecting key patterns such as congestion propagation, node interaction, and vehicle flow. It provides an important technical foundation for traffic flow prediction, speed inference, and multi-period trend analysis, and has significant application value in intelligent traffic scheduling, signal optimization, and urban traffic management.

[0003] While ST-GCN models have achieved significant results in spatiotemporal modeling, they still face limitations in handling the time-varying influence relationships between nodes in traffic networks. Traditional ST-GCN models typically rely on a fixed, static adjacency matrix to characterize the connection strength between roads. This matrix is ​​determined by the physical topology and remains unchanged throughout the inference process, failing to reflect the dynamic interactive changes in traffic conditions caused by time periods, congestion levels, or unexpected events. These factors make it difficult for existing models to construct a dynamic spatial dependency structure that matches actual traffic conditions, thus limiting prediction accuracy and model robustness in complex traffic scenarios. Summary of the Invention

[0004] To address the aforementioned technical problems, the present invention aims to provide a method and system for monitoring urban traffic operations based on artificial intelligence algorithms. The specific technical solution adopted is as follows:

[0005] In a first aspect, one embodiment of the present invention provides a method for monitoring urban traffic operations based on an artificial intelligence algorithm, the method comprising:

[0006] The average vehicle speed and traffic flow at each intersection at each time point are collected from the city's road network map; each intersection in the road network map is labeled and sorted according to a set order to obtain an intersection sequence; a static adjacency matrix is ​​constructed based on each intersection in the intersection sequence using the ST-GCN model;

[0007] The algorithm calculates the speed limit difference for an intersection by obtaining the absolute value of the difference between the average vehicle speed and the speed limit at the current moment. It also calculates the historical speed difference for the intersection by obtaining the absolute value of the difference between the average vehicle speed at the current moment and the average speed at the same intersection at the current moment. Finally, it constructs a first matrix using the differences in speed limit differences between intersections at the current moment and intersections in the intersection sequence. A second matrix is ​​constructed using the differences in traffic flow between intersections at the current moment and intersections in the intersection sequence. A third matrix is ​​constructed using the differences in historical speed differences between intersections at the current moment and intersections in the intersection sequence. The dynamic influence matrix is ​​obtained by multiplying the elements at the same positions in the first, second, and third matrices.

[0008] Based on the distance between the two intersections and the locations of each traffic accident at the current time, as well as the severity of each traffic accident, the accident impact index of the two intersections is obtained; using the accident impact index of each pair of intersections at the current time, an accident impact matrix is ​​constructed according to the element order of the dynamic impact matrix; the accident impact matrix at the current time is weighted and then added to the dynamic impact matrix to obtain the optimized dynamic impact matrix;

[0009] The static adjacency matrix and the optimized dynamic influence matrix at the current time are weighted and fused to obtain the adaptive adjacency matrix at the current time. The adaptive adjacency matrix at the current time, the average vehicle speed and traffic flow at each intersection are input into the ST-GCN model, and the congestion probability of each intersection at the current time is output.

[0010] Preferably, a first matrix is ​​constructed using the differences in speed limits between intersections at the current time and intersections in the intersection sequence, including:

[0011] By negatively mapping the ratio of the absolute value of the difference in speed limits between the two intersections at the current moment to the standard deviation of speed limits at all intersections using an exponential function with a base of the natural constant, the smooth traffic similarity between the two intersections at the current moment is obtained. Then, the smooth traffic similarity between the first intersection in the current moment's intersection sequence and all intersections in the intersection sequence is obtained as the first row element of the first matrix. Similarly, the smooth traffic similarity between the second intersection in the current moment's intersection sequence and all intersections in the intersection sequence is obtained as the second row element of the first matrix, and so on, until the smooth traffic similarity between the last intersection in the current moment's intersection sequence and all intersections in the intersection sequence is calculated as the last row element of the first matrix, thus obtaining the first matrix.

[0012] Preferably, a second matrix is ​​constructed using the difference in traffic flow between each intersection at the current time and each intersection in the intersection sequence, including:

[0013] Obtain the standard deviation of the difference in traffic flow between the two intersections at each corresponding moment in history, denoted as the traffic flow difference standard deviation. Map the ratio of the absolute value of the difference in traffic flow between the two intersections at the current moment to the standard deviation of the traffic flow difference between the two intersections using an exponential function with a base of the natural constant, to obtain the traffic flow propagation intensity of the two intersections at the current moment. Sequentially obtain the traffic flow propagation intensity of the first intersection in the current moment's intersection sequence and all intersections in the intersection sequence as the first row element of the second matrix, then sequentially obtain the traffic flow propagation intensity of the second intersection in the current moment's intersection sequence and all intersections in the intersection sequence as the second row element of the second matrix, and so on, until the traffic flow propagation intensity of the last intersection in the current moment's intersection sequence and all intersections in the intersection sequence is calculated as the last row element of the second matrix, thus obtaining the second matrix.

[0014] Preferably, a third matrix is ​​constructed using the differences in historical vehicle speeds between each intersection at the current time and each intersection in the intersection sequence, including:

[0015] Obtain the standard deviation of the difference between the average vehicle speeds of the two intersections at each historical moment, denoted as the historical standard deviation of the speed difference between the two intersections at the current moment. Use an exponential function with a base of the natural constant to perform a negative correlation mapping on the ratio of the absolute value of the historical speed difference between the two intersections at the current moment to the standard deviation of the historical speed difference between the two intersections at the current moment, thus obtaining the historical speed consistency between the two intersections at the current moment. Sequentially, obtain the historical speed consistency between the first intersection in the current moment's intersection sequence and all intersections in the intersection sequence as the first row element of the third matrix; sequentially, obtain the historical speed consistency between the second intersection in the current moment's intersection sequence and all intersections in the intersection sequence as the second row element of the third matrix, and so on, until the historical speed consistency between the last intersection in the current moment's intersection sequence and all intersections in the intersection sequence is calculated as the last row element of the third matrix, thus obtaining the third matrix.

[0016] Preferably, the accident impact indicators of the two intersections are obtained based on the distance between the two intersections and the locations of each traffic accident at the current time, as well as the severity of each traffic accident, including:

[0017] The multiplication result is obtained by multiplying the attenuation coefficient by the sum of the distances between the location of a traffic accident and the two intersections at the current moment. After negatively mapping the multiplication result using an exponential function with the natural constant as the base, it is multiplied by the severity of the traffic accident at the current moment to obtain the degree of impact of the traffic accident on the two intersections at the current moment. The average of the degree of impact of each traffic accident on the two intersections at the current moment is used to obtain the accident impact index of the two intersections at the current moment.

[0018] Preferably, an accident impact matrix is ​​constructed using the accident impact indicators of every two intersections at the current time, arranged in the element order of the dynamic impact matrix, including:

[0019] The accident impact indexes of the first intersection and all intersections in the current intersection sequence are obtained sequentially as the first row elements of the accident impact matrix. Similarly, the accident impact indexes of the second intersection and all intersections in the current intersection sequence are obtained sequentially as the second row elements of the accident impact matrix, and so on, until the accident impact indexes of the last intersection and all intersections in the current intersection sequence are calculated as the last row elements of the accident impact matrix, thus obtaining the accident impact matrix.

[0020] Secondly, the present invention also provides an urban traffic operation monitoring system based on artificial intelligence algorithms, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of an urban traffic operation monitoring method based on artificial intelligence algorithms.

[0021] The embodiments of the present invention have at least the following beneficial effects: This application collects the average vehicle speed and traffic flow at each intersection at each time moment in the city's road network map, then labels and sorts each intersection in the road network map according to a set order to obtain an intersection sequence, and constructs a static adjacency matrix based on the ST-GCN model for each intersection in the intersection sequence to realize the static physical topology of the intersections; then, it obtains the speed limit difference and historical speed difference of each intersection at the current time, and constructs a first matrix using the difference in speed limit differences between each intersection at the current time and each intersection in the intersection sequence; constructs a second matrix using the difference in traffic flow between each intersection at the current time and each intersection in the intersection sequence; constructs a third matrix using the difference in historical speed differences between each intersection at the current time and each intersection in the intersection sequence; and multiplies the elements at the same position in the first, second, and third matrices. The dynamic influence matrix is ​​obtained. Next, the current traffic accidents and intersections are analyzed to obtain the accident influence matrix. Then, the current accident influence matrix is ​​weighted and added to the dynamic influence matrix to obtain the optimized dynamic influence matrix. This achieves real-time perception and quantitative representation of the dynamic road node influence relationships, acquiring the dynamic operating status of the road. Finally, the static adjacency matrix and the current optimized dynamic influence matrix are weighted and fused to obtain the current adaptive adjacency matrix. The current adaptive adjacency matrix, the average vehicle speed and traffic flow at each intersection are then input into the ST-GCN model to output the congestion probability of each intersection at the current time. This achieves an organic combination of static physical topology and dynamic operating status, significantly improving the monitoring accuracy and model adaptability in complex traffic scenarios, and enhancing the effectiveness of urban traffic monitoring. Attached Figure Description

[0022] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 is a flowchart of a method for monitoring urban traffic operation based on artificial intelligence algorithms provided in an embodiment of the present invention. Detailed Implementation

[0024] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following detailed description, in conjunction with the accompanying drawings and preferred embodiments, provides a detailed explanation of the specific implementation, structure, features, and effects of a method and system proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0026] The following description, in conjunction with the accompanying drawings, details the specific scheme of the urban traffic operation monitoring method and system based on artificial intelligence algorithms provided by this invention.

[0027] Example 1: The main application scenario of the present invention is as follows: This application analyzes real-time traffic data to dynamically generate a spatiotemporal correlation matrix, constructs a time-series multi-factor fusion model, realizes real-time perception and quantitative representation of the influence relationship of road nodes, and organically combines static physical topology with dynamic operating status, thereby significantly improving the monitoring accuracy and model adaptability in complex traffic scenarios.

[0028] Please refer to Figure 1, which shows a flowchart of a method for monitoring urban traffic operation based on an artificial intelligence algorithm according to an embodiment of the present invention. The method includes the following steps:

[0029] Step S1: Collect the average vehicle speed and traffic flow at each intersection at each time in the city's road network map; label and sort each intersection in the road network map according to a set order to obtain an intersection sequence; construct a static adjacency matrix for each intersection in the intersection sequence using the ST-GCN model.

[0030] First, by integrating multi-source sensing devices within the urban transportation system, raw traffic data is collected in real time, and the scattered and heterogeneous traffic information is transformed into a high-quality, spatiotemporally aligned structured feature set. Specifically, through multi-source data acquisition, spatiotemporal alignment and standardization, and data quality cleaning and repair, a clean, consistent, and semantically rich traffic feature dataset is constructed. This lays a solid data foundation for subsequent dynamic spatial dependency inference steps, ensuring the reliability and sensitivity of the entire monitoring system.

[0031] Therefore, by utilizing fixed detectors, floating car GPS, and signal control systems, raw traffic flow data at each intersection on the road network map is collected at each time. This means collecting the average vehicle speed and traffic volume at each intersection at each time. The average vehicle speed at an intersection at a given time is the average speed of all vehicles passing through that intersection at that time. The traffic volume is the number of vehicles passing through the intersection between two time points. For example, if 50 vehicles pass through an intersection between time t and time t+1, then the traffic volume at that intersection at time t+1 is 50. The data collection frequency can be set to 5 minutes, which can be adjusted by the implementer according to actual conditions.

[0032] Furthermore, data cleaning and anomaly handling are performed, including: detecting and processing missing values, obvious erroneous values ​​(such as negative speed, flow exceeding the maximum range), and abnormal fluctuations caused by sensor malfunctions, and correcting them using historical mean interpolation, data filling from adjacent road segments, or methods based on traffic theory.

[0033] After data cleaning and anomaly handling, the average vehicle speed and traffic flow at each intersection at each time point were normalized (e.g., Z-score standardization) to facilitate subsequent analysis, thereby eliminating the influence of dimensions on data analysis. In addition, other data required for subsequent analysis and calculation in this application were uniformly standardized to prevent the influence of dimensions.

[0034] After data preprocessing, static topology analysis is required for each intersection in the city's road network map. Specifically, the intersections in the road network map are numbered from left to right and from top to bottom, and then sorted in ascending order of number to obtain the intersection sequence. It should be noted that other sorting orders can also be used, such as from top to bottom or from left to right, and the implementer can choose according to the actual situation.

[0035] Furthermore, based on the intersection sequence, the ST-GCN model is used to extract the connectivity relationships between intersections from the road network map. A basic connectivity matrix is ​​constructed based on the actual connectivity between intersections, and weighted using a distance decay function. Finally, the physical distance is quantified as weights, generating a normalized static adjacency matrix with a fixed row and column order. The construction of the static adjacency matrix is ​​an existing technique and will not be elaborated on here. For example, with only three intersections A, B, and C, the intersection sequence is as follows: When constructing a static adjacency matrix, the first row of the matrix contains the attribute relationships between intersections A and B, and A and C. The second row contains the attribute relationships between intersections B and A, B and B, and B and C. The third row contains the attribute relationships between intersections C and A, C and B, and C and C. In other words, the static adjacency matrix is ​​constructed by sequentially selecting one intersection from the sequence of intersections, analyzing its attribute relationships with all other intersections in the sequence, and then constructing the matrix. This clarifies the order of the intersections in the static adjacency matrix. The arrangement of elements in subsequent matrices is the same as that in the static adjacency matrix.

[0036] Step S2: Obtain the absolute value of the difference between the average vehicle speed and the speed limit at an intersection at the current moment as the speed limit difference of that intersection; obtain the absolute value of the difference between the average vehicle speed at an intersection at the current moment and the historical average vehicle speed of that intersection at the current moment as the historical speed difference of that intersection; construct a first matrix using the differences in speed limit differences between each intersection at the current moment and each intersection in the intersection sequence; construct a second matrix using the differences in traffic flow between each intersection at the current moment and each intersection in the intersection sequence; construct a third matrix using the differences in historical speed differences between each intersection at the current moment and each intersection in the intersection sequence; multiply the elements at the same positions in the first, second, and third matrices to obtain the dynamic influence matrix.

[0037] Traditional traffic monitoring models use a fixed, static adjacency matrix to represent the spatial relationships between road segments. This matrix, predefined based on the physical connections of the road network, cannot adapt to actual changes in traffic conditions. For example, the influence of the same pair of road segments during morning and evening rush hours may be completely opposite (during the morning rush hour, residential areas influence the city center, but during the evening rush hour, the opposite occurs), but the static matrix cannot reflect this difference.

[0038] To address this issue, this step extracts the true correlations between road segments from real-time traffic data. Specifically, it analyzes three key complementary dimensions simultaneously: smooth flow similarity (reflecting the degree of state synchronization), flow propagation intensity (reflecting flow direction relationships), and historical pattern consistency (reflecting abnormal propagation patterns). These dimensions are then integrated into a time-series dynamic influence matrix for subsequent analysis.

[0039] Analyzing the similarity of traffic flow at intersections requires analyzing vehicle speeds passing through the intersection. This allows us to obtain the absolute value of the difference between the average vehicle speed at the current intersection and the speed limit, which serves as the speed limit difference for that intersection. Analyzing traffic flow propagation intensity can be done directly using the traffic flow data for each intersection at each time. For consistency in historical patterns, we need to analyze the changes in vehicle speed at each intersection at a given time and the same time in historical data. This allows us to obtain the absolute value of the difference between the average vehicle speed at the current intersection and the average speed of that intersection at the current time in history, which serves as the historical speed difference for that intersection.

[0040] First, a first matrix is ​​constructed using the differences in speed limits between intersections at the current time and those at intersections in the intersection sequence. Specifically, an exponential function with a base of the natural constant is used to negatively correlate the ratio of the absolute value of the difference in speed limits between the two intersections at the current time to the standard deviation of the speed limits at all intersections, thus obtaining the smooth traffic similarity between the two intersections at the current time. Then, the smooth traffic similarity between the first intersection in the current time's intersection sequence and all intersections in the intersection sequence is obtained as the first row element of the first matrix. Similarly, the smooth traffic similarity between the second intersection in the current time's intersection sequence and all intersections in the intersection sequence is obtained as the second row element, and so on, until the smooth traffic similarity between the last intersection in the current time's intersection sequence and all intersections in the intersection sequence is calculated and obtained as the last row element of the first matrix, thus obtaining the first matrix.

[0041] The specific calculation model for the traffic flow similarity between two intersections is as follows:

[0042] ,

[0043] in, This represents the similarity of traffic flow between intersection i and intersection j at time t (the current time). and Let represent the difference in speed limits at intersection i and intersection j at the current time, and exp represent an exponential function with the natural constant as the base. This represents the standard deviation of speed limits at all intersections. Traffic flow similarity determines whether the current traffic flow conditions of two intersections are similar; a higher value indicates greater similarity in traffic flow conditions.

[0044] Next, a second matrix is ​​constructed using the differences in traffic flow between the current intersections and the intersections in the intersection sequence. Specifically, the standard deviation of the difference in traffic flow between two intersections at each corresponding moment in history is obtained, denoted as the traffic flow difference standard deviation. An exponential function with a base of the natural constant is used to map the ratio of the absolute value of the difference in traffic flow between the two intersections at the current moment to the standard deviation of the traffic flow difference between these two intersections, thus obtaining the traffic flow propagation intensity of these two intersections at the current moment. The traffic flow propagation intensity of the first intersection in the intersection sequence at the current moment and all intersections in the intersection sequence are then obtained as the first row elements of the second matrix. Similarly, the traffic flow propagation intensity of the second intersection in the intersection sequence at the current moment and all intersections in the intersection sequence are obtained as the second row elements, and so on, until the traffic flow propagation intensity of the last intersection in the intersection sequence at the current moment and all intersections in the intersection sequence are calculated as the last row elements of the second matrix, resulting in the second matrix.

[0045] The specific calculation model for the traffic flow propagation intensity at the two intersections is as follows:

[0046] ,

[0047] in, Let represent the traffic propagation intensity at intersections i and j at time t (the current time), and exp represent an exponential function with base to the natural constant, used for normalization. and Let i and j represent the traffic flow at intersection i and intersection j at the current time, respectively. This represents the standard deviation of the difference in traffic flow between intersection i and intersection j at each corresponding moment in history, which is also the standard deviation of the traffic flow difference between the two intersections. This term as a whole judges the similarity of traffic flow between the two intersections. The larger the value, the more similar the traffic flow status.

[0048] Furthermore, a third matrix is ​​constructed using the differences in historical vehicle speeds between intersections at the current moment and intersections in the intersection sequence. Specifically, the standard deviation of the difference in average vehicle speeds between two intersections at the current moment is obtained, denoted as the standard deviation of the historical speed difference between these two intersections at the current moment. A negative correlation mapping is then performed using an exponential function with a base of the natural constant to the ratio of the absolute value of the historical speed difference between the two intersections at the current moment to the standard deviation of the historical speed difference between these two intersections at the current moment, thus obtaining the historical speed consistency between these two intersections at the current moment. The historical speed consistency between the first intersection in the current moment's intersection sequence and all intersections in the intersection sequence is then obtained as the first row element of the third matrix. Similarly, the historical speed consistency between the second intersection in the current moment's intersection sequence and all intersections in the intersection sequence is obtained as the second row element of the third matrix, and so on, until the historical speed consistency between the last intersection in the current moment's intersection sequence and all intersections in the intersection sequence is calculated as the last row element of the third matrix, resulting in the third matrix.

[0049] The specific calculation model for the consistency of historical vehicle speeds at the two intersections at the current moment is as follows:

[0050] ,

[0051] in, Let represent the consistency of historical vehicle speeds at intersections i and j at time t (the current time), and exp represent an exponential function with the natural constant as its base. and These represent the historical vehicle speed differences at intersections i and j at time t (the current time). The first term represents the standard deviation of the difference between the average vehicle speeds at intersection i and intersection j at each historical moment (where each historical moment refers to a moment in history that is the same as the current moment; for example, if the current moment is 11 PM, then each historical moment refers to 11 PM on each day in history). In other words, it is the standard deviation of the difference in vehicle speeds between these two intersections at each historical moment. The third term judges the degree of synchronization between the two intersection segments as they deviate from their respective historical conditions. The larger the value, the more synchronized the patterns are.

[0052] This allows us to obtain the current three matrices. The intersection relationships corresponding to each element in the first, second, and third matrices are the same as those corresponding to each element in the static adjacency matrix. For example, if the first element in the static adjacency matrix analyzes the relationship between intersection A and intersection A itself, then the first element in the first, second, and third matrices is the same, as are the elements in other positions.

[0053] Finally, the elements at the same positions in the first, second, and third matrices are multiplied to obtain the multiplication results. The multiplication results corresponding to each position form a dynamic influence matrix. The order of the elements in the dynamic influence matrix is ​​the same as the order of the elements in the first, second, and third matrices.

[0054] At the same time, each row of the obtained dynamic influence matrix G(t) needs to be normalized (for each row, calculate the sum of all elements in that row, and then divide each element in that row by the sum) to ensure that the sum of each row is 1 after normalization, thus forming a probability distribution.

[0055] The final output is a dynamic influence matrix G(t) that changes at every moment, which contains the temporal dynamic correlation between each intersection segment under normal conditions.

[0056] Step S3: Obtain the accident impact index of the two intersections based on the distance between the two intersections and the locations of each traffic accident at the current time, as well as the severity of each traffic accident; construct the accident impact matrix by using the accident impact index of each pair of intersections at the current time according to the element order of the dynamic impact matrix; and add the weighted accident impact matrix at the current time to the dynamic impact matrix to obtain the optimized dynamic impact matrix.

[0057] The previous steps have summarized the normal correlation between road segments into a dynamic influence matrix G(t). However, in reality, due to special circumstances and uncontrollable factors such as traffic accidents, the normal correlation may change drastically, and its influence may decrease with distance and spread to the surrounding road network. Therefore, it is necessary to add the influence of special circumstances to the original dynamic influence matrix so that it can more comprehensively consider the actual correlation between road segments, thereby obtaining a more in-depth dynamic influence matrix.

[0058] This allows us to obtain the location and severity of traffic accidents on the city's road network map at the current moment. The location of traffic accidents is determined by traffic cameras, road management departments, satellites, etc. Severity is categorized using accident levels. Considering that major traffic accidents will be reported and emergency procedures initiated, and this application focuses on monitoring common traffic accidents, traffic accidents are generally classified as minor, moderate, and major. In this application, a minor accident refers to the occupation of one emergency lane or one driving lane; a moderate accident refers to the occupation of more than one driving lane; and a major accident refers to the complete closure of one or both directions of the road. Specifically, this application uses a range of 0 to 1, with a severity level of 0.3 for minor accidents, 0.7 for moderate accidents, and 1 for major accidents. Implementers can adjust these levels according to actual circumstances. No traffic accidents are represented by a score of 0.

[0059] First, the accident impact indicators of the two intersections are obtained based on the distance between the two intersections and the locations of the traffic accidents at the current time, as well as the severity of the traffic accidents.

[0060] Specifically, the attenuation coefficient is multiplied by the sum of the distances between the location of a traffic accident and the two intersections at the current moment to obtain the multiplication result. After negatively correlated mapping of the multiplication result using an exponential function with the natural constant as the base, it is multiplied by the severity of the traffic accident at the current moment to obtain the degree of impact of the traffic accident on the two intersections at the current moment. The average of the degree of impact of each traffic accident on the two intersections at the current moment is used to obtain the accident impact index of the two intersections at the current moment.

[0061] The specific calculation model for the accident impact indicators of the two intersections at the current moment is as follows:

[0062] ,

[0063] in, Let represent the accident impact index at intersections i and j at time t (the current time), which is a dimensionless value. exp represents an exponential function with the natural constant as its base. Let represent the severity of the a-th traffic accident at time t (the current time), and be a dimensionless value. Let A represent the number of traffic accidents occurring at the current time. This represents the distance attenuation term, where γ is the attenuation coefficient, a dimensionless value used to control the rate of attenuation with distance (the larger the value, the faster the attenuation). This scheme typically uses a value of 0.7. and This represents the distance between intersections i and j and the location of the a-th traffic accident, expressed in km. It is an exponentially decaying term that simulates the spatial propagation of the impact of a single accident. This represents the degree of impact of the traffic accident on intersections i and j at the current moment. After averaging, it shows that the impact of the traffic accident decreases exponentially with distance; the farther the intersection is from the traffic accident, the smaller the impact. Therefore, the inversely proportional exponential decay exp function is used. The larger the value of , the longer the distance between the a-th traffic accident and the intersection pair (i.e., intersection i and intersection j), and the smaller the value of the exp function, meaning the smaller the impact of the accident. Using the arithmetic mean here makes the accident weighting more stable because subsequent steps require normalization. Summing directly without averaging would result in a data magnitude significantly different from the data to be analyzed, leading to over-amplification.

[0064] It should be noted that if the number of traffic accidents occurring at the current time is 0, then by default the accident impact index of intersection i and intersection j at time t (the current time) is 0.

[0065] Furthermore, an accident impact matrix is ​​constructed by using the accident impact indicators of every two intersections at the current moment according to the element order of the dynamic impact matrix.

[0066] Specifically, the accident impact indicators of the first intersection and all intersections in the current intersection sequence are obtained as the first row elements of the accident impact matrix. Similarly, the accident impact indicators of the second intersection and all intersections in the current intersection sequence are obtained as the second row elements of the accident impact matrix, and so on, until the accident impact indicators of the last intersection and all intersections in the current intersection sequence are calculated as the last row elements of the accident impact matrix, thus obtaining the accident impact matrix.

[0067] This yields the accident impact matrix for the current moment, representing the impact of traffic accidents on traffic. Further, the weighted accident impact matrix for the current moment is added to the dynamic impact matrix to obtain the optimized dynamic impact matrix. Simultaneously, each row of the optimized dynamic impact matrix needs to be normalized for subsequent processing. Specifically, each row of the optimized dynamic impact matrix is ​​normalized (for each row, the sum of all elements in that row is calculated, and then each element in that row is divided by the sum), ensuring that the sum of each row after normalization is 1, forming a probability distribution. The optimized dynamic impact matrix covers both normal and special traffic conditions, enabling further refinement of the analysis of traffic conditions and improving the accuracy of the analysis.

[0068] Step S4: The static adjacency matrix and the optimized dynamic influence matrix at the current time are weighted and fused to obtain the adaptive adjacency matrix at the current time; the adaptive adjacency matrix at the current time, the average vehicle speed and traffic flow at each intersection are input into the ST-GCN model, and the congestion probability of each intersection at the current time is output.

[0069] The static adjacency matrix and the optimized dynamic influence matrix at the current time were obtained. The optimized dynamic influence matrix and the original static adjacency matrix were then combined. In addition to retaining the fixed physical relationship of the road network, the dynamic road network relationship under various conditions was also considered, and the fused adaptive adjacency matrix was obtained.

[0070] Specifically, the static adjacency matrix and the optimized dynamic influence matrix at the current time are weighted and fused to obtain the adaptive adjacency matrix at the current time. In this application, the reference value for the weights corresponding to the static adjacency matrix is ​​set to 0.3, and the reference value for the weights corresponding to the optimized dynamic influence matrix at the current time is set to 0.7. The optimized dynamic influence matrix covers more changes and is therefore the dominant matrix, hence its larger weight. In practice, its weights can be adjusted based on the subsequent output results of the overall algorithm. Then, the two matrices are weighted and summed to obtain the adaptive adjacency matrix at the current time. The methods for adjusting the weights based on the subsequent output results of the overall algorithm include:

[0071] After the predicted loss value is calculated based on the loss function in the ST-GCN model, the gradient of the predicted loss value with respect to the two weights (i.e., the weights corresponding to the static adjacency matrix and the weights corresponding to the optimized dynamic influence matrix) is automatically calculated through the backpropagation algorithm. Then, an optimizer (such as Adam) is used to update the values ​​of the two weights based on the calculated gradients, so that the loss function is adjusted in the descent direction until the loss of the ST-GCN model converges to the minimum, and the two optimal weights are obtained, which are the adjusted weights.

[0072] Finally, the adaptive adjacency matrix, average vehicle speed, and traffic flow at each intersection are input into the ST-GCN model to output the congestion probability of each intersection at the current time. It should be noted that during training, the ST-GCN model uses historical data to construct its sample set. Each sample consists of the adaptive adjacency matrix, average vehicle speed, and traffic flow at each intersection for a given time moment. The difference between the predicted and actual values ​​is calculated using mean squared error or mean absolute error as the loss, thereby optimizing the prediction task.

[0073] Simultaneously, by connecting to navigation or map apps, the output prediction results (the probability of congestion at a certain intersection) are marked and updated, and then visualized on the navigation and map apps, thereby achieving real-time monitoring of traffic operations.

[0074] Example 2:

[0075] This embodiment provides an urban traffic operation monitoring system based on an artificial intelligence algorithm, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the steps of an urban traffic operation monitoring method based on an artificial intelligence algorithm. Since Embodiment 1 has already described an urban traffic operation monitoring method based on an artificial intelligence algorithm in detail, it will not be elaborated upon further here.

[0076] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0077] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for monitoring urban traffic operation based on artificial intelligence algorithms, characterized in that, The method includes: collecting the average vehicle speed and traffic flow at each intersection at each time moment in the city's road network map; labeling and sorting each intersection in the road network map according to a set order to obtain an intersection sequence; constructing a static adjacency matrix for each intersection in the intersection sequence using the ST-GCN model; obtaining the absolute value of the difference between the average vehicle speed and the speed limit of an intersection at the current moment as the speed limit difference of that intersection; obtaining the absolute value of the difference between the average vehicle speed of an intersection at the current moment and the average average vehicle speed of that intersection at the current moment in history as the historical speed difference of that intersection; constructing a first matrix using the differences in speed limit differences between each intersection at the current moment and each intersection in the intersection sequence; constructing a second matrix using the differences in traffic flow between each intersection at the current moment and each intersection in the intersection sequence; and constructing a third matrix using the differences in traffic flow between each intersection at the current moment and each intersection in the intersection sequence. The difference in speed is used to construct a third matrix; the elements at the same position in the first, second, and third matrices are multiplied to obtain the dynamic influence matrix; the accident influence index of the two intersections is obtained based on the distance between the two intersections and the locations of the traffic accidents at the current time, as well as the severity of the traffic accidents; the accident influence matrix is ​​constructed using the accident influence index of each pair of intersections at the current time according to the element order of the dynamic influence matrix; the accident influence matrix at the current time is weighted and added to the dynamic influence matrix to obtain the optimized dynamic influence matrix; the static adjacency matrix and the optimized dynamic influence matrix at the current time are weighted and fused to obtain the adaptive adjacency matrix at the current time; the adaptive adjacency matrix at the current time, the average vehicle speed and traffic flow of each intersection are input into the ST-GCN model, and the congestion probability of each intersection at the current time is output.

2. The urban traffic operation monitoring method based on artificial intelligence algorithm according to claim 1, characterized in that, The step of constructing a first matrix by utilizing the differences in speed limits between intersections at the current time and intersections in the intersection sequence includes: using an exponential function with a base of the natural constant to perform a negative correlation mapping on the ratio of the absolute value of the difference in speed limits between the two intersections at the current time to the standard deviation of speed limits at all intersections, to obtain the smooth flow similarity between the two intersections at the current time; sequentially obtaining the smooth flow similarity between the first intersection in the intersection sequence at the current time and all intersections in the intersection sequence as the first row element of the first matrix, sequentially obtaining the smooth flow similarity between the second intersection in the intersection sequence at the current time and all intersections in the intersection sequence as the second row element of the first matrix, and so on, until the smooth flow similarity between the last intersection in the intersection sequence at the current time and all intersections in the intersection sequence is calculated as the last row element of the first matrix, thus obtaining the first matrix.

3. The urban traffic operation monitoring method based on artificial intelligence algorithm according to claim 1, characterized in that, The method of constructing a second matrix by utilizing the difference in traffic flow between each intersection at the current moment and each intersection in the intersection sequence includes: obtaining the standard deviation of the difference in traffic flow between two intersections at each corresponding moment in history, denoted as the standard deviation of traffic flow difference; mapping the ratio of the absolute value of the difference in traffic flow between the two intersections at the current moment to the standard deviation of traffic flow difference between the two intersections using an exponential function with a base of the natural constant, to obtain the traffic flow propagation intensity of the two intersections at the current moment; sequentially obtaining the traffic flow propagation intensity of the first intersection in the intersection sequence at the current moment and all intersections in the intersection sequence as the first row element of the second matrix, sequentially obtaining the traffic flow propagation intensity of the second intersection in the intersection sequence at the current moment and all intersections in the intersection sequence as the second row element of the second matrix, and so on, until calculating the traffic flow propagation intensity of the last intersection in the intersection sequence at the current moment and all intersections in the intersection sequence as the last row element of the second matrix, thus obtaining the second matrix.

4. The urban traffic operation monitoring method based on artificial intelligence algorithm according to claim 1, characterized in that, The method of constructing a third matrix by utilizing the differences in historical vehicle speeds between intersections at the current moment and intersections in the intersection sequence includes: obtaining the standard deviation of the difference in average vehicle speeds between two intersections at the current moment in history, denoted as the standard deviation of the difference in historical vehicle speeds between these two intersections at the current moment; using an exponential function with a base of the natural constant to perform a negative correlation mapping on the ratio of the absolute value of the difference in historical vehicle speeds between the two intersections at the current moment to the standard deviation of the difference in historical vehicle speeds between these two intersections at the current moment, to obtain the consistency of historical vehicle speeds between these two intersections at the current moment; sequentially obtaining the consistency of historical vehicle speeds between the first intersection in the intersection sequence at the current moment and all intersections in the intersection sequence as the first row element of the third matrix, sequentially obtaining the consistency of historical vehicle speeds between the second intersection in the intersection sequence at the current moment and all intersections in the intersection sequence as the second row element of the third matrix, and so on, until calculating the consistency of historical vehicle speeds between the last intersection in the intersection sequence at the current moment and all intersections in the intersection sequence as the last row element of the third matrix, thus obtaining the third matrix.

5. The urban traffic operation monitoring method based on artificial intelligence algorithm according to claim 1, characterized in that, The method for obtaining the accident impact index of two intersections based on the distances between the two intersections at the current time and the locations of each traffic accident at the current time, as well as the severity of each traffic accident, includes: multiplying the sum of the distances between the location of a traffic accident at the current time and the two intersections by an attenuation coefficient to obtain the multiplication result; performing a negative correlation mapping on the multiplication result using an exponential function with the natural constant as the base; and then multiplying the result by the severity of the traffic accident at the current time to obtain the degree of impact of the traffic accident on the two intersections at the current time; and averaging the degree of impact of each traffic accident on the two intersections at the current time to obtain the accident impact index of the two intersections at the current time.

6. The urban traffic operation monitoring method based on artificial intelligence algorithm according to claim 1, characterized in that, The method of constructing an accident impact matrix by using the accident impact indicators of every two intersections at the current time according to the element order of the dynamic impact matrix includes: sequentially obtaining the accident impact indicators of the first intersection in the current intersection sequence and all intersections in the intersection sequence as the first row elements of the accident impact matrix; sequentially obtaining the accident impact indicators of the second intersection in the current intersection sequence and all intersections in the intersection sequence as the second row elements of the accident impact matrix; and so on, until the accident impact indicators of the last intersection in the current intersection sequence and all intersections in the intersection sequence are calculated as the last row elements of the accident impact matrix, thus obtaining the accident impact matrix.

7. A city traffic operation monitoring system based on artificial intelligence algorithms, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the urban traffic operation monitoring method based on artificial intelligence algorithms as described in any one of claims 1-6.