Short-time traffic conflict prediction method and early warning system based on rsu group cooperation and space-time graph neural network
By constructing an initial energy field distribution map of traffic conflicts and utilizing a spatiotemporal graph neural network model, the spatial propagation path and temporal change inertia of traffic conflict events are captured. This solves the problems of insufficient spatial coverage and temporal response in short-term traffic conflict prediction in existing technologies, and achieves high-precision traffic conflict prediction and improved efficiency of collaborative perception.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN ZHONGYU NEW ENERGY VEHICLE R&D CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-26
AI Technical Summary
Existing short-term traffic conflict prediction methods cannot effectively characterize the dynamic propagation characteristics of conflict events in the spatial dimension of the road network topology and the fluctuations in vehicle operating status within continuous time windows. This results in insufficient spatial coverage and timeliness of prediction results, failing to meet the accurate prediction requirements in roadside unit group collaborative perception scenarios.
By acquiring vehicle traffic status information collected collaboratively from multiple roadside units, an initial energy field distribution map of traffic conflict is constructed. A spatiotemporal neural network model is used to capture the energy transfer path and time-varying inertia, generating a dynamic evolution map of traffic conflict energy. Potential outbreak sources and expected affected units are identified, and differentiated collaborative working mode adjustment instructions are generated to improve prediction accuracy and collaborative efficiency.
It enables spatiotemporal coupled modeling of the entire process of traffic conflict events from generation to propagation, improves the spatiotemporal accuracy and dynamic adaptability of short-term traffic conflict prediction, ensures accurate resource deployment and coordinated cooperation of roadside unit groups, and improves the efficiency of collaborative perception and the rationality of resource utilization.
Smart Images

Figure CN122290335A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more specifically, to a method and system for predicting short-term traffic conflicts based on RSU group collaboration and spatiotemporal graph neural networks. Background Technology
[0002] With the rapid development of vehicle-road cooperative technology and intelligent transportation systems, short-term traffic conflict prediction, as a core component of proactive traffic safety control, aims to predict potential traffic conflict events and their evolution trends in the road network within a short period by analyzing real-time vehicle operation data collected by roadside units, providing forward-looking decision support for traffic management and control. Currently, common short-term traffic conflict prediction methods mainly rely on cross-sectional traffic data independently collected by each roadside unit. They estimate conflict risks in future periods by analyzing indicators such as single-lane speed changes and headway, combined with historical conflict statistical patterns or traditional time series models. However, these methods typically treat the data collected by each roadside unit as independent samples, making it difficult to characterize the dynamic propagation characteristics of conflict events along the road network topology in the spatial dimension. They also lack in-depth analytical capabilities regarding the conflict incubation process inherent in fluctuations in vehicle operating states within continuous time windows. This results in significant deficiencies in the completeness of spatial coverage and the timeliness of temporal response of the prediction results, failing to meet the application requirements for accurate prediction of short-term traffic conflicts in collaborative perception scenarios involving roadside unit groups. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide at least one method and early warning system for short-term traffic conflict prediction based on RSU group collaboration and spatiotemporal graph neural networks.
[0004] According to one aspect of the present invention, a short-term traffic conflict prediction method based on RSU group cooperation and spatiotemporal graph neural network is provided, comprising: The system acquires a set of vehicle traffic status information synchronously acquired by multiple roadside units arranged in a network within the target road network area during an uninterrupted collaborative acquisition cycle. The set of vehicle traffic status information is generated by each roadside unit after continuously tracking the vehicles passing within its own detection range. The set of vehicle traffic status information includes spatially continuous vehicle trajectory sequence data and timestamp markers and instantaneous driving status parameters corresponding to each trajectory point in the vehicle trajectory sequence data. An initial conflict situation field is constructed from the vehicle traffic status information set. The detection coverage of each roadside unit is used as the basic spatial analysis unit. Based on the spatial distribution density of the vehicle trajectory sequence data contained in the basic spatial analysis unit and the temporal fluctuation intensity of the instantaneous driving status parameters, a traffic conflict initial energy field distribution map of the target road network area is generated within the uninterrupted collaborative acquisition cycle. The traffic conflict initial energy field distribution map contains the initial conflict energy value corresponding to each basic spatial analysis unit and the gradient change direction indication information of the initial conflict energy value in the spatial dimension. A pre-built spatiotemporal graph neural network model is invoked to predict the spatiotemporal evolution of conflict energy in the initial energy field distribution map of traffic conflict. The graph structure propagation layer of the spatiotemporal graph neural network model is used to capture the energy transfer path between each basic spatial analysis unit, and the temporal cyclic layer of the spatiotemporal graph neural network model is used to capture the inertia of energy value change over time within each basic spatial analysis unit. A dynamic evolution map of traffic conflict energy in the target road network area within a future preset prediction time window is generated. The dynamic evolution map of traffic conflict energy includes an energy evolution path network with basic spatial analysis units as nodes and the predicted arrival time of the energy peak corresponding to each evolution path node. Based on the topological connection relationship of the energy evolution path network in the traffic conflict energy dynamic evolution map and the time sequence of the predicted energy peak arrival time, the potential outbreak source unit of the traffic conflict event in the target road network area within the next preset time period and the expected ripple unit sequence of the traffic conflict event propagating outward from the potential outbreak source unit are identified, and conflict propagation situation prediction information containing the spatial coordinates of the potential outbreak source unit and the propagation arrival time sequence of each unit in the expected ripple unit sequence is generated. Based on the spatial coordinates of potential outbreak source units and the propagation arrival time of each unit in the expected affected unit sequence from the conflict propagation situation prediction information, differentiated collaborative working mode adjustment instructions are generated for each roadside unit in the target road network area. The differentiated collaborative working mode adjustment instructions are distributed to the corresponding roadside units through the dedicated communication network of roadside units, so as to trigger each roadside unit to perform the corresponding data acquisition working mode switching operation according to its own position and propagation arrival time in the expected affected unit sequence.
[0005] According to another aspect of the present invention, an early warning system is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable code, which, when executed by the processor, causes the processor to perform the method described above.
[0006] This invention constructs an initial energy field distribution map of traffic conflicts based on the spatial distribution density of vehicle trajectory sequence data within basic spatial analysis units and the temporal fluctuation intensity of instantaneous driving state parameters, transforming discrete trajectory data into a structured representation of conflict energy. Building upon this, a spatiotemporal graph neural network model is invoked, utilizing a graph structure propagation layer to capture energy transfer paths between basic spatial analysis units and a temporal cyclic layer to capture the time-varying inertia of energy values within each basic spatial analysis unit. This achieves spatiotemporal coupled modeling of the entire process of traffic conflict events from generation to propagation, significantly improving the spatiotemporal accuracy and dynamic adaptability of short-term traffic conflict prediction. Furthermore, based on the generated dynamic evolution map of traffic conflict energy, potential outbreak source units and expected affected unit sequences are identified, transforming the model prediction results into conflict propagation situation prediction information with clear spatial coordinates and propagation time sequences, eliminating the semantic gap between the prediction results and actual physical equipment. Finally, based on the position and propagation arrival time of each unit in the expected affected unit sequence, differentiated collaborative working mode adjustment instructions are generated, enabling the roadside unit group to dynamically coordinate according to the real-time evolution of the conflict event. This achieves precise pre-deployment and on-demand scheduling of the roadside unit group's sensing resources, effectively improving collaborative sensing efficiency and the rationality of resource utilization.
[0007] 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. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of an application scenario provided by the present invention; Figure 2 This is a flowchart illustrating a short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural network provided by the present invention. Figure 3 This is a schematic diagram of the structure of an early warning system provided in an embodiment of the present invention. Detailed Implementation
[0009] To facilitate a clearer understanding of this invention, we first introduce the application scenarios of the short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural networks, such as... Figure 1 As shown, the application scenario of this invention includes an early warning system 10 and a road test unit cluster. The road test unit cluster may include one or more road test units; the number of road test units is not limited here. Figure 1As shown, the road test unit cluster may specifically include road test unit 1, road test unit 2, ..., road test unit n; it can be understood that road test unit 1, road test unit 2, road test unit 3, ..., road test unit n can all be connected to the early warning system 10 via network so that each road test unit can interact with the early warning system 10 via network connection.
[0010] It is understood that the early warning system 10 can refer to a device that executes the short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural network provided in the embodiments of the present invention. The early warning system 10 is, for example, a server, such as a single physical server, or a server cluster or distributed system consisting of at least two physical servers.
[0011] Further, please see Figure 2 This is a flowchart illustrating a short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural networks provided in an embodiment of the present invention. Figure 2 As shown, this method can be derived from... Figure 1 The early warning system 10 in the system executes the short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural network, which may include the following steps: Step S100: Obtain a set of vehicle traffic status information synchronously acquired by multiple roadside units arranged in a network within the target road network area during an uninterrupted collaborative acquisition cycle. The set of vehicle traffic status information is generated by each roadside unit after continuously tracking the vehicles passing within its own detection range. The set of vehicle traffic status information includes spatially continuous vehicle trajectory sequence data and timestamp markers and instantaneous driving status parameters corresponding to each trajectory point in the vehicle trajectory sequence data.
[0012] The target road network area is a pre-defined geographical region where traffic conflict prediction needs to be performed. Multiple roadside units (RSUs) are deployed in a mesh topology within this area, with overlapping detection coverage areas between adjacent RSUs to ensure spatial continuity. The uninterrupted collaborative acquisition cycle is a pre-set time window length within which all RSUs acquire data at a synchronized sampling frequency. Each RSU integrates a millimeter-wave radar sensor, detecting vehicles within its coverage area by emitting electromagnetic waves and receiving echoes. The RSUs employ a multi-target tracking algorithm, assigning a unique tracking identifier to each detected vehicle and recording its latitude and longitude coordinates, instantaneous speed, instantaneous acceleration, and heading angle at each sampling moment. For each tracked vehicle, the location points recorded at a series of consecutive sampling moments are arranged chronologically to obtain a spatially continuous vehicle trajectory sequence. Each trajectory point is accompanied by a corresponding timestamp to identify the time when the trajectory point was acquired. Instantaneous driving state parameters include the instantaneous speed, instantaneous acceleration, and heading angle corresponding to the trajectory point. The data collected synchronously by all roadside units from all vehicles during the uninterrupted collaborative acquisition cycle constitutes a set of vehicle traffic status information. For example, when a vehicle passes through the detection range of three adjacent roadside units in sequence, the first roadside unit records a series of trajectory points and statuses of its entry, travel, and departure. The second roadside unit continues to record within its coverage area, and the third roadside unit also performs the same recording. These trajectory points are stitched together based on the continuity of timestamps to obtain the complete spatial continuous trajectory of the vehicle.
[0013] Step S200: Construct an initial conflict situation field for the vehicle traffic status information set. Using the detection coverage of each roadside unit as the basic spatial analysis unit, and based on the spatial distribution density of the vehicle trajectory sequence data contained in the basic spatial analysis unit and the temporal fluctuation intensity of the instantaneous driving status parameters, generate a traffic conflict initial energy field distribution map of the target road network area within the uninterrupted collaborative acquisition cycle. The traffic conflict initial energy field distribution map includes the initial conflict energy value corresponding to each basic spatial analysis unit and the gradient change direction indication information of the initial conflict energy value in the spatial dimension.
[0014] The initial conflict situation field construction is the process of transforming discrete vehicle trajectory data into a continuous spatial field. The basic spatial analysis unit (SMU) is the detection range covered by each roadside unit; the entire target road network area is divided into multiple SMUs equal in number to the number of roadside units. For each SMU, the spatial density and temporal volatility are calculated. Spatial density reflects the spatial aggregation of vehicles within the unit; higher aggregation indicates a greater likelihood of mutual interference and a correspondingly higher conflict risk. Temporal volatility reflects the drastic changes in vehicle driving states within the unit; frequent sudden changes or drastic fluctuations in vehicle speed indicate an unstable traffic flow, easily inducing conflict events. These two metrics are concatenated to obtain a two-dimensional feature vector, which represents the initial conflict energy value corresponding to that SMU. The initial conflict energy value characterizes the potential conflict risk intensity of that unit at the current moment. After calculating the initial conflict energy values for all units, the energy differences between adjacent units are further analyzed. For each pair of adjacent basic spatial analysis units, the difference between their initial conflict energy values is calculated, and this difference is divided by the spatial distance between the geometric center points of the two units to obtain the gradient change direction indication information. This information exists in the form of a two-dimensional gradient vector, whose direction points to the direction of the fastest increase in conflict energy, and whose magnitude represents the rate of change of energy per unit distance. After performing the above operation on all basic spatial analysis units, the initial conflict energy values of all units and their gradient change direction indication information with adjacent units are integrated to obtain the traffic conflict initial energy field distribution map. This distribution map uses the basic spatial analysis units as the basic grid, and each grid point carries the energy value and gradient vector.
[0015] As one implementation method, step S200 involves constructing an initial conflict situation field for the vehicle traffic status information set. Using the detection coverage of each roadside unit as the basic spatial analysis unit, and based on the spatial distribution density of the vehicle trajectory sequence data contained within the basic spatial analysis unit and the temporal fluctuation intensity of the instantaneous driving state parameters, an initial energy field distribution map of traffic conflicts in the target road network area within a continuous collaborative acquisition cycle is generated. Specifically, this may include the following steps S210~S240: Step S210: Extract vehicle trajectory sequence data from the vehicle traffic status information set corresponding to each roadside unit, perform spatial coordinate analysis on each trajectory point in the vehicle trajectory sequence data, and obtain the set of distribution position coordinates of each trajectory point within the basic spatial analysis unit.
[0016] Trajectory sequence data of all vehicles is extracted from the vehicle traffic status information collected from each roadside unit. Each trajectory sequence data consists of multiple trajectory points, and each trajectory point contains spatial coordinate information, which is usually stored in latitude and longitude format. Spatial coordinate analysis is performed on each trajectory point, converting its latitude and longitude coordinates into projected coordinates in a preset plane coordinate system of the target road network area, obtaining the precise distribution coordinates of each trajectory point within the basic spatial analysis unit. The distribution coordinates of all trajectory points constitute the distribution coordinate set of this basic spatial analysis unit.
[0017] Step S220: Calculate the number of trajectory points that exist simultaneously in each unit time interval of the spatial basic analysis unit within the uninterrupted collaborative acquisition cycle based on the distribution location coordinate set. Arrange the number of trajectory points in chronological order to generate the vehicle density time series corresponding to the spatial basic analysis unit. Use the difference between the maximum and minimum values of the vehicle density time series within the uninterrupted collaborative acquisition cycle as a measure of the spatial distribution density.
[0018] Based on the distribution location coordinate set obtained in step S210, the uninterrupted collaborative acquisition cycle is divided into multiple consecutive equal-length intervals, with the length of each unit time interval consistent with the sampling cycle of the roadside unit. For each unit time interval, the vehicle identifiers corresponding to all trajectory points in the distribution location coordinate set within that time interval are counted. After removing duplicate vehicle identifiers, the total number of vehicles simultaneously present in the basic spatial analysis unit within that time interval is calculated. This number represents the number of trajectory points in that time interval. Since each trajectory point corresponds to the presence of one vehicle at that moment, this number is equivalent to the number of vehicles in that time interval. The number of vehicles calculated for each unit time interval is arranged in chronological order to obtain the vehicle density time series corresponding to that basic spatial analysis unit. The maximum and minimum values of this vehicle density time series are calculated throughout the entire uninterrupted collaborative acquisition cycle. The difference between the maximum and minimum values is used as a measure of the spatial distribution density. The larger the value of this indicator, the more drastic the temporal fluctuations in vehicle density within the basic spatial analysis unit, the higher the dispersion of vehicle arrivals and departures, and the more significant the changes in spatial distribution density.
[0019] Step S230: Extract the instantaneous driving state parameters corresponding to the vehicle trajectory sequence data from the vehicle traffic status information set corresponding to each roadside unit. The instantaneous driving state parameters include the instantaneous speed value of the vehicle. Perform time-series difference operation on the instantaneous speed value of the vehicle to generate a speed fluctuation amplitude sequence. Calculate the cumulative value of the fluctuation amplitude of the speed fluctuation amplitude sequence within the uninterrupted collaborative acquisition period as a measure of the intensity of time fluctuation.
[0020] From the vehicle traffic status information set corresponding to each roadside unit, instantaneous driving state parameters corresponding to the vehicle trajectory sequence data are extracted, with the core parameter being the instantaneous vehicle speed value. For all vehicles within the basic spatial analysis unit, their instantaneous speed values at each sampling time are summarized. A temporal difference operation is performed on the speed values of all vehicles, i.e., the change in speed value between adjacent sampling times is calculated. The speed changes at all adjacent sampling times are arranged in chronological order to obtain a speed fluctuation amplitude sequence. This sequence reflects the fluctuation of traffic flow speed over time within the basic spatial analysis unit. The cumulative value of the speed fluctuation amplitude sequence over the entire uninterrupted collaborative acquisition period is calculated; for example, by taking the absolute value of each fluctuation amplitude value in the sequence and summing them. The resulting cumulative value is a measure of the severity of time fluctuations. The larger this value, the more frequent and severe the changes in vehicle speed within the basic spatial analysis unit, and the higher the instability of the traffic flow.
[0021] As one implementation method, step S230 involves extracting instantaneous driving state parameters corresponding to vehicle trajectory sequence data from the vehicle traffic state information set corresponding to each roadside unit. The instantaneous driving state parameters include the instantaneous vehicle speed value. A time-series difference operation is performed on the instantaneous vehicle speed value to generate a speed fluctuation amplitude sequence. The cumulative value of the fluctuation amplitude sequence within the uninterrupted collaborative acquisition period is calculated as a measure of the severity of time fluctuations. Specifically, this may include the following steps S231~S234: Step S231: Obtain the instantaneous speed values of all vehicles at each acquisition time point within the uninterrupted collaborative acquisition cycle of the spatial basic analysis unit, calculate the arithmetic mean of the instantaneous speed values of all vehicles at each acquisition time point, obtain the average speed value at each acquisition time point, and arrange the average speed values in chronological order to generate an average speed time series.
[0022] For the current basic spatial analysis unit, there are multiple discrete acquisition time points within the uninterrupted collaborative acquisition cycle. The interval between these acquisition time points is determined by the sampling frequency of the roadside units. At each acquisition time point, the speed values of all tracked vehicles are extracted from their instantaneous speed values within the basic spatial analysis unit. The arithmetic mean of these speed values is calculated by summing the speed values of all vehicles and dividing by the total number of vehicles, yielding the average speed value corresponding to that acquisition time point. The average speed values calculated for each acquisition time point are arranged in chronological order to obtain the average speed time series of the basic spatial analysis unit.
[0023] Step S232: Perform a first-order difference operation on the average velocity time series, subtract the average velocity value of the previous acquisition time point from the average velocity value of the later acquisition time point to obtain the velocity change difference between each adjacent acquisition time point, and arrange all velocity change differences in chronological order to generate a velocity fluctuation amplitude sequence.
[0024] The average velocity time series generated in step S231 is used as input, and a first-order difference operation is performed on the series. Specifically, for each element in the series except the first element, the value of the element is subtracted from the value of the preceding element, and the difference is the velocity change difference between adjacent time points. For example, if the average velocity time series is V1, V2, V3, ..., Vn, then the calculated velocity change difference is V2-V1, V3-V2, ..., Vn-V(n-1). All the calculated velocity change differences are arranged in the corresponding time order to obtain the velocity fluctuation amplitude sequence. Each value in this sequence represents the direction and magnitude of the average velocity change between two adjacent sampling times; a positive value indicates an increase in velocity, and a negative value indicates a decrease in velocity.
[0025] Step S233: Take the absolute value of each velocity change difference in the velocity fluctuation amplitude sequence to obtain the velocity fluctuation amplitude absolute value sequence. Calculate the sum of all values in the velocity fluctuation amplitude absolute value sequence and use the sum as the fluctuation amplitude cumulative value of the basic spatial analysis unit within the uninterrupted collaborative acquisition cycle.
[0026] Step S234: Use the cumulative value of fluctuation amplitude as a measure of the intensity of time fluctuation corresponding to the basic spatial analysis unit.
[0027] The cumulative value of the fluctuation amplitude calculated in step S233 is directly used as a measure of the intensity of time fluctuation in the basic spatial analysis unit. The larger the value of this indicator, the more severe the fluctuation of vehicle speed in the time dimension within the basic spatial analysis unit, the more unstable the traffic flow, and the higher the risk of traffic conflicts.
[0028] Step S240: Perform feature stitching on the spatial distribution density measurement index and the temporal fluctuation intensity measurement index to generate the initial conflict energy value corresponding to the basic spatial analysis unit, and calculate the difference between the initial conflict energy values between adjacent basic spatial analysis units. Use the ratio of the difference to the spatial distance between adjacent basic spatial analysis units as the gradient change direction indication information of the initial conflict energy value in the spatial dimension. Repeat the above operation for all basic spatial analysis units to generate the traffic conflict initial energy field distribution map.
[0029] For each basic spatial analysis unit, the calculated spatial density and temporal fluctuation intensity metrics are used as two independent feature components. These two components are concatenated to obtain a two-dimensional feature vector, which represents the initial conflict energy value for that basic spatial analysis unit. The first dimension of this two-dimensional vector carries information about spatial density, and the second dimension carries information about temporal fluctuation intensity. After calculating the initial conflict energy values for all units, an adjacency graph is constructed between the basic spatial analysis units. For each pair of adjacent basic spatial analysis units, the vector difference between their initial conflict energy values is calculated by subtracting the corresponding components of the two two-dimensional vectors to obtain a new two-dimensional difference vector. Simultaneously, the Euclidean distance between the geometric centers of these two adjacent units is calculated. Each component of the two-dimensional difference vector is divided by this spatial distance value to obtain a new two-dimensional vector, which represents the gradient direction of the initial conflict energy value in the spatial dimension. Its direction points to the direction of the fastest increase in conflict energy, and the value of each component represents the rate of change of the corresponding energy component per unit distance. The above-mentioned calculations of initial conflict energy and gradient direction are performed by traversing all basic spatial analysis units. The calculation results of all units are then summarized to obtain the distribution map of the initial energy field of traffic conflict.
[0030] As one implementation method, step S240 involves concatenating the spatial distribution density measurement index and the temporal fluctuation intensity measurement index to generate the initial conflict energy value corresponding to the basic spatial analysis unit. The difference between the initial conflict energy values and those of adjacent basic spatial analysis units is then calculated. The ratio of this difference to the spatial distance between adjacent basic spatial analysis units is used as the gradient change direction indicator information of the initial conflict energy value in the spatial dimension. Specifically, this may include the following steps S241-S245: Step S241: Determine the set of adjacent basic spatial analysis units that share a boundary in spatial location with the current basic spatial analysis unit, and obtain the spatial distribution density measurement index and the temporal fluctuation intensity measurement index corresponding to the current basic spatial analysis unit.
[0031] Based on the spatial layout of all roadside units within the target road network area, establish the spatial topological relationships between basic spatial analysis units. For the currently processed basic spatial analysis unit, identify other basic spatial analysis units that share a boundary with it in spatial location. These units are physically adjacent and together constitute the set of adjacent basic spatial analysis units for the current unit. From the data structure that has already been computed, obtain the values of the spatial distribution density metric and the corresponding temporal fluctuation intensity metric for the current basic spatial analysis unit.
[0032] Step S242: Take the spatial distribution density measurement index corresponding to the current basic spatial analysis unit as the first component, take the temporal fluctuation intensity measurement index corresponding to the current basic spatial analysis unit as the second component, and perform feature concatenation on the first and second components to generate a two-dimensional feature vector composed of the first and second components as the initial value of the conflict energy corresponding to the current basic spatial analysis unit.
[0033] The spatial density measure of the current basic spatial analysis unit is used as the first component of the two-dimensional feature vector, and the temporal fluctuation intensity measure is used as the second component. These two components are combined sequentially to form a single two-dimensional feature vector, which represents the initial conflict energy of the current basic spatial analysis unit. This vector is mathematically represented as a two-dimensional ordered pair of real numbers, where the first real number represents the spatial density and the second real number represents the temporal fluctuation intensity.
[0034] Step S243: Traverse each adjacent spatial basic analysis unit in the set of adjacent spatial basic analysis units, obtain the initial conflict energy value corresponding to the adjacent spatial basic analysis unit, calculate the difference between the first component of the initial conflict energy value corresponding to the current spatial basic analysis unit and the first component of the initial conflict energy value corresponding to the adjacent spatial basic analysis unit as the first component difference value, calculate the difference between the second component of the initial conflict energy value corresponding to the current spatial basic analysis unit and the second component of the initial conflict energy value corresponding to the adjacent spatial basic analysis unit as the second component difference value, and use the two-dimensional difference vector composed of the first component difference value and the second component difference value as the conflict energy difference value from the current spatial basic analysis unit to the adjacent spatial basic analysis unit.
[0035] For each adjacent unit in the set of adjacent spatial basic analysis units determined in step S241, the initial conflict energy value corresponding to that adjacent unit is first obtained. This value is also in the form of a two-dimensional feature vector, containing a first component and a second component. The first component of the initial conflict energy value of the current unit is subtracted from the first component of the initial conflict energy value of the adjacent unit to obtain the first component difference. The second component of the initial conflict energy value of the current unit is subtracted from the second component of the initial conflict energy value of the adjacent unit to obtain the second component difference. The first component difference and the second component difference are combined into a new two-dimensional vector, which is the conflict energy difference from the current spatial basic analysis unit to the adjacent spatial basic analysis unit. This difference vector reflects the comprehensive difference between the two adjacent units in terms of spatial distribution density and temporal fluctuation intensity.
[0036] Step S244: Obtain the coordinates of the geometric center point of the current spatial basic analysis unit and the coordinates of the geometric center point of the adjacent spatial basic analysis unit, and calculate the spatial distance between the current spatial basic analysis unit and the adjacent spatial basic analysis unit based on the coordinates of the geometric center point.
[0037] Each spatial basic analysis unit corresponds to the detection coverage area of a roadside unit, which has a regular geometric shape. The planar coordinates of the geometric center point of the current spatial basic analysis unit and the planar coordinates of the geometric center points of adjacent spatial basic analysis units are extracted. Based on these two center point coordinates, the Euclidean distance between the two points is calculated, which is the square root of the sum of the squares of the differences in the x-coordinates and the squares of the differences in the y-coordinates. The calculation result is used as the spatial distance value between the current spatial basic analysis unit and its adjacent spatial basic analysis unit. This distance value characterizes the physical spatial distance between the two units.
[0038] Step S245: Divide each component of the conflict energy difference by the spatial distance value to obtain a two-dimensional gradient vector. Combine the two-dimensional gradient vector and its corresponding pointing direction as the gradient change direction indication information of the initial conflict energy value in the spatial dimension.
[0039] Dividing the first component difference of the two-dimensional vector of conflict energy difference calculated in step S243 by the spatial distance value calculated in step S244 yields the first component of the gradient vector. Dividing the second component difference of this two-dimensional vector by the spatial distance value yields the second component of the gradient vector. The two-dimensional vector composed of these two components is the two-dimensional gradient vector. The direction of this gradient vector is consistent with the direction of the conflict energy difference, and its magnitude represents the rate of change of conflict energy per unit spatial distance. Combining this two-dimensional gradient vector with its corresponding direction (i.e., the direction from the current basic spatial analysis unit to the adjacent basic spatial analysis unit) serves as an indication of the gradient change direction of the initial conflict energy value in the spatial dimension. This indication indicates the degree of change in conflict energy when moving a unit distance along this direction.
[0040] Step S300: Call the pre-built spatiotemporal graph neural network model to predict the spatiotemporal evolution of conflict energy in the initial energy field distribution map of traffic conflict. Use the graph structure propagation layer of the spatiotemporal graph neural network model to capture the energy transfer path between each basic spatial analysis unit. Use the temporal cyclic layer of the spatiotemporal graph neural network model to capture the inertia of energy value change over time within each basic spatial analysis unit. Generate a dynamic evolution map of traffic conflict energy in the target road network area within a future preset prediction time window. The dynamic evolution map of traffic conflict energy includes an energy evolution path network with basic spatial analysis units as nodes and the predicted arrival time of the energy peak corresponding to each evolution path node.
[0041] The spatiotemporal graph neural network model is a pre-trained deep learning model used to process graph-structured data with spatiotemporal dependencies. The model's input is the initial energy field distribution map of traffic conflicts generated in step S200. This distribution map is organized as graph-structured data, where each spatial basic analysis unit corresponds to a node in the graph. The initial feature vector of a node is the initial value of the conflict energy (two-dimensional feature vector) of that unit, and edges between nodes are established based on the adjacency relationships between spatial basic analysis units. The model contains two core processing modules: a graph structure propagation layer and a temporal recurrent layer. The graph structure propagation layer is responsible for information propagation in the spatial dimension. This layer uses graph convolution operations to enable each node to aggregate the feature information of its neighboring nodes, simulating the diffusion and transmission of conflict energy along the road network connection path in space. After processing by the graph structure propagation layer, the feature vector of each node incorporates its neighborhood spatial context information, resulting in the node features after energy propagation. The temporal recurrent layer is responsible for evolutionary modeling in the temporal dimension. This layer uses a recurrent gated unit structure to process the feature sequence of each node within the historical time window. The cyclic gating unit captures the natural evolution of conflict energy values within nodes over time through update and reset gate mechanisms, including the inertia of energy accumulation, stabilization, or gradual decay. The temporal cyclic layer outputs the temporal evolution pattern encoding of each node at the last moment of the historical time window. This encoding is fused with the node features after energy propagation to obtain temporally enhanced node features containing the temporal evolution pattern. Finally, the model maps the temporally enhanced node features to multiple prediction time points within a future preset prediction time window through the evolution prediction decoding layer, outputting the predicted energy value of each node at each prediction time point. The predicted energy value is also in the form of a two-dimensional feature vector. Based on the predicted energy values of all nodes at all prediction time points, the moment when each component of the predicted energy value of each node reaches its maximum value is extracted as the predicted energy peak arrival time of that node. Simultaneously, directed edges connecting nodes are constructed according to the spatial adjacency relationships between nodes and the changing trends of predicted energy values, resulting in an energy evolution path network. All nodes and their connections, along with the predicted energy peak arrival times of each node, together constitute a dynamic evolution map of traffic conflict energy.
[0042] In one implementation, step S300 may specifically include the following steps S310 to S350: Step S310: Input the initial energy field distribution map of traffic conflict into the input adaptation layer of the spatiotemporal graph neural network model, perform tensor quantization encoding on the initial conflict energy values corresponding to each basic spatial analysis unit in the initial energy field distribution map of traffic conflict, generate the initial energy node feature tensor with the basic spatial analysis unit as the node, and generate the adjacency matrix according to the spatial adjacency relationship between each basic spatial analysis unit.
[0043] The input adaptation layer can be composed of three functional modules cascaded in sequence, such as a node feature encoding module, a time dimension expansion module, and an adjacency matrix construction module.
[0044] The node feature encoding module receives the initial energy field distribution map of traffic conflicts as input. This map contains the identification information of all spatial basic analysis units within the target road network area and their corresponding initial conflict energy values. The initial conflict energy value is a two-dimensional feature vector, where the first component is the value of a spatial distribution density indicator, and the second component is the value of a temporal fluctuation intensity indicator. The node feature encoding module first traverses all spatial basic analysis units within the target road network area, processing them sequentially according to a preset unit index order. For each traversed spatial basic analysis unit, the module extracts the corresponding two-dimensional feature vector from the initial energy field distribution map of traffic conflicts. Internally, the module maintains an empty two-dimensional array, where the number of rows equals the total number of spatial basic analysis units, and the number of columns is fixed at 2. During the traversal, the module uses the index of the current unit as the row number, fills the first component value of the extracted two-dimensional feature vector into the first column of that row, and fills the second component value into the second column of that row. Once all basic spatial analysis units have been traversed, the two-dimensional array is filled, resulting in a two-dimensional tensor with a dimension equal to the number of nodes multiplied by 2. This tensor is the initial energy node feature tensor. The index of each row in this tensor corresponds to the identifier of a basic spatial analysis unit, and the two elements of each row correspond to the values of the spatial density and temporal fluctuation intensity metrics of that unit, respectively.
[0045] The time dimension expansion module receives the initial energy node feature tensor output by the node feature encoding module. This tensor has a dimension of number of nodes × feature dimension 2. Since the temporal recurrent layer in the spatiotemporal graph neural network model requires the input data to have an explicit time dimension structure to process time-series information, and the current input only contains the initial conflict energy value at a single time point (i.e., the end of the uninterrupted collaborative acquisition cycle), a time dimension needs to be introduced. The time dimension expansion module inserts a new dimension after the feature dimension of the initial energy node feature tensor. This dimension represents the time step. Specifically, the two-dimensional tensor with a dimension of number of nodes × 2 is reshaped by adding a dimension after the second dimension (feature dimension), making it a three-dimensional tensor with a dimension of number of nodes × 1 × 2. The newly added dimension has a size of 1, indicating that there is currently only one historical time step of data. This three-dimensional tensor is the initial energy node feature tensor after time dimension expansion. Its dimensional structure is the number of time steps multiplied by the number of nodes multiplied by the feature dimension, reserving structural space for subsequent concatenation of inputs from multiple historical time steps.
[0046] The adjacency matrix construction module is responsible for generating an adjacency matrix based on the spatial adjacency relationships between basic spatial analysis units. This module first creates a two-dimensional square matrix with dimensions equal to the number of nodes multiplied by the number of nodes, and initializes all elements in the matrix to 0. Then, the module retrieves a pre-stored spatial topology table of basic spatial analysis units, which records the correspondence between each basic spatial analysis unit and its neighboring units that share a spatial boundary. The module iterates through all basic spatial analysis units. For the unit currently being processed, it queries the spatial topology table for all neighboring unit identifiers. For each found neighboring unit, the module sets the elements in the adjacency matrix corresponding to the current unit's row and the adjacent unit's column to 1, and also sets the elements in the adjacent unit's row and the current unit's column to 1, thus ensuring the symmetry of the adjacency matrix and reflecting the bidirectional nature of spatial adjacency relationships. During processing, the module does not set the unit's own index to 1; that is, the elements on the diagonal of the adjacency matrix remain 0, indicating that the node is not adjacent to itself. After all units and their adjacency relationships have been processed, the generated two-dimensional square matrix is the adjacency matrix. The row and column index order of this matrix is completely consistent with the unit index order used in the node feature encoding module, ensuring that the subsequent graph structure propagation layer can correctly align the node features with the connection relationships between nodes.
[0047] Step S320: Input the initial energy node feature tensor and adjacency matrix into the graph structure propagation layer of the spatiotemporal graph neural network model. Through the graph convolution operation of the graph structure propagation layer, energy features are propagated and aggregated between nodes to simulate the diffusion process of conflict energy along the spatial connection path, and generate the energy propagation node feature tensor after incorporating neighborhood spatial context information.
[0048] The graph structure propagation layer receives the initial energy node feature tensor and adjacency matrix generated in step S310 as input. This layer contains a graph convolution operation module, which collects feature information from its neighboring nodes (including itself) for each target node and fuses this information using an aggregation function to update the target node's feature representation. The graph structure propagation layer first performs a linear transformation on the initial energy node feature tensor, mapping the input feature dimension to the hidden layer dimension within the model. Then, based on the adjacency matrix, it determines the set of neighboring nodes for each node, including the node itself and other nodes with direct spatial adjacency. For each target node, it extracts its own feature vector and the feature vectors of all its neighboring nodes from the linearly transformed feature tensor. These feature vectors are then aggregated using a mean aggregation method, which sums the feature vectors of all neighboring nodes and divides by the number of neighboring nodes to obtain the neighborhood aggregated feature vector. The target node's own feature vector is then element-wise added to and fused with the neighborhood aggregated feature vector. The fused vector is input into a non-linear activation function, and after processing by the activation function, the updated feature vector for the target node is obtained. The above operations are performed in parallel on all nodes, and the updated feature vectors of all nodes are concatenated according to the node index order to obtain the node feature tensor after energy propagation. The feature vector of each node in this tensor has incorporated the context information of its neighborhood space, reflecting the spatial diffusion effect of conflict energy.
[0049] In one implementation, step S320 may specifically include the following steps S321 to S324: Step S321: Input the initial energy node feature tensor into the feature linear transformation sublayer of the graph structure propagation layer, perform dimensional transformation on the initial energy node feature tensor, and generate a transformed node feature tensor that matches the internal processing dimension of the graph structure propagation layer.
[0050] The graph structure propagation layer first includes a feature linear transformation sublayer containing a learnable weight matrix. This sublayer receives an initial energy node feature tensor as input, with a feature dimension of 2 (corresponding to two components: spatial density and temporal volatility). The sublayer performs matrix multiplication on the input tensor and the weight matrix, linearly mapping the feature vector of each node from 2D to a pre-defined hidden layer dimension within the graph structure propagation layer, such as 64 or 128 dimensions. After the linear transformation, a transformed node feature tensor is generated, with a dimension equal to the number of nodes multiplied by the hidden layer dimension.
[0051] Step S322: Determine the set of neighboring nodes for each target node based on the adjacency matrix. The set of neighboring nodes includes the target node itself and other nodes that have a direct spatial adjacency relationship with the target node.
[0052] Iterate through all nodes. For the target node currently being processed, parse the row vector corresponding to that node in the adjacency matrix. This row vector is a binary sequence of length equal to the number of nodes, where the node corresponding to the column index with a value of 1 is a neighbor node with a direct spatial adjacency relationship to the target node. Add the target node's own index to this set to obtain the final set of neighboring nodes. This set contains the target node itself and all its spatially adjacent nodes.
[0053] Step S323: Extract the feature vectors corresponding to each node in the neighborhood node set from the transformed node feature tensor, and perform mean aggregation operation on the feature vectors corresponding to each node in the neighborhood node set to obtain the neighborhood aggregated feature vector that aggregates the neighborhood node set information.
[0054] Based on the index of each node in the neighborhood node set determined in step S322, the corresponding feature vector is extracted from the transformed node feature tensor. The extracted feature vector set contains the hidden feature representations of all nodes in the neighborhood node set. A mean aggregation operation is performed on these feature vectors, that is, all extracted feature vectors are added element-wise along their corresponding dimensions, and then the result is divided by the total number of nodes in the neighborhood node set to obtain a new feature vector, which is the neighborhood aggregated feature vector. This aggregated vector integrates the feature information of the target node itself and all its spatially adjacent nodes.
[0055] Step S324: Element-wise add and fuse the feature vector corresponding to the target node with the neighborhood aggregated feature vector, and then pass it through a non-linear activation function to generate the energy propagation node feature corresponding to the target node. Repeat the above operation for all target nodes, and concatenate the energy propagation node features corresponding to all target nodes to generate the energy propagation node feature tensor.
[0056] Extract the feature vector of the target node from the transformed node feature tensor. Then, fuse this feature vector with the neighborhood aggregation feature vector obtained in step S323 element-wise, i.e., add the values of the corresponding dimensions of the two vectors to obtain a new feature vector. Input this fused feature vector into a nonlinear activation function, which uses a modified linear unit function (MRU). This function sets negative values in the input vector to zero and keeps positive values unchanged. After processing by the nonlinear activation function, the energy-propagated node feature corresponding to the target node is obtained. Perform the above feature extraction, aggregation, fusion, and activation operations sequentially on all nodes in the graph structure to obtain the energy-propagated node feature for each node. Stack and concatenate the energy-propagated node features of all nodes according to their node index order to obtain the energy-propagated node feature tensor. The dimension of this tensor is the number of nodes multiplied by the hidden layer dimension.
[0057] Step S330: Input the node feature tensor after energy propagation into the temporal recurrent layer of the spatiotemporal graph neural network model. Through the recurrent gating unit of the temporal recurrent layer, perform temporal dependency modeling on the feature sequence corresponding to each node, capture the natural decay or cumulative inertia of the internal conflict energy value of each node over time, and generate a temporally enhanced node feature tensor containing the time evolution law.
[0058] The temporal recurrent layer receives the node feature tensor generated in step S320 after energy propagation. This tensor contains feature information from only a single time step. However, to model the temporal evolution, feature sequences for each node across multiple historical time steps are needed. In the actual model input setting, the initial energy field distribution map of the traffic conflict is actually a sequence input of multiple historical time steps. Steps S310 to S320 are repeated for each historical time step, thereby generating a feature sequence within the historical time window for each node. The temporal recurrent layer processes the corresponding feature sequence for each node independently. The temporal recurrent layer employs a recurrent gating unit structure, specifically designed for processing sequence data. The recurrent gating unit includes two control mechanisms: an update gate and a reset gate. The update gate determines how much information from the hidden state of the previous time step is retained in the current time step, while the reset gate determines how much information from the hidden state of the previous time step is ignored. For each node's feature sequence, the recurrent gating unit processes each feature vector in the sequence sequentially. At each time step, the recurrent gating unit calculates the candidate hidden state based on the current input feature vector, the hidden state of the previous time step, the output of the update gate, and the output of the reset gate. Then, it updates the final hidden state at the current time step based on the result of the update gate. After processing the last time step of the sequence, the final hidden state output at that time step contains the temporal evolution information of the entire historical sequence. This hidden state is used as the temporal evolution pattern encoding vector corresponding to that node. This temporal evolution pattern encoding vector is concatenated and fused with the node features after energy propagation at the last time step to obtain the temporally enhanced node features containing the temporal evolution pattern. The above operation is performed on all nodes, and the temporally enhanced node features of all nodes are stacked and concatenated to obtain the temporally enhanced node feature tensor.
[0059] In one implementation, step S330 may specifically include the following steps S331 to S335: Step S331: For each node in the node feature tensor after energy propagation, extract the node features corresponding to each time point in the uninterrupted collaborative acquisition cycle, and arrange them into a node feature time sequence vector according to the time order.
[0060] In the actual operation of the model, the node feature tensor after energy propagation is formed by superimposing data from multiple historical time steps. For each node, the feature vector corresponding to each historical time step is extracted from this tensor. These feature vectors are arranged in chronological order to obtain the node feature time-series vector sequence. The length of the sequence is equal to the number of historical time steps, and each element in the sequence is a feature vector of fixed dimension.
[0061] Step S332: Input the node feature time-series vector sequence into the cyclic gating unit of the time-series cyclic layer in sequence. The cyclic gating unit includes an update gate and a reset gate. The update gate controls the proportion of the hidden state information of the previous time step that is retained in the current time step. The reset gate controls the degree to which the hidden state information of the previous time step is ignored.
[0062] The recurrent gating unit contains an update gate and a reset gate. The update gate is implemented through a fully connected layer with an activation function. Its input is the current feature vector and the previous hidden state, and its output is a numerical vector between 0 and 1. The value of each dimension in this vector represents the proportion of information in the corresponding dimension of the previous hidden state that is retained in the current time step. The reset gate is also implemented through a fully connected layer with an activation function. Its input is also the current feature vector and the previous hidden state, and its output is a numerical vector between 0 and 1. The value of each dimension in this vector represents the degree to which information in the corresponding dimension of the previous hidden state is ignored.
[0063] Step S333: When the cyclic gating unit processes the node feature time-series vector sequence at each time step, it calculates the candidate hidden state of the current time step based on the feature vector input at the current time step, the hidden state at the previous time step, and the outputs of the update gate and reset gate, and updates the final hidden state of the current time step.
[0064] First, the hidden state from the previous time step is reset using the output of the reset gate. This is done by multiplying the previous hidden state element-wise with the reset gate output to obtain the reset hidden state. Then, the feature vector input at the current time step is concatenated with the reset hidden state and fed into a fully connected layer with a hyperbolic tangent activation function to calculate the candidate hidden state for the current time step. The candidate hidden state integrates the current input information and the reset historical information. Finally, the previous hidden state and the candidate hidden state are weighted and fused using the output of the update gate. This involves multiplying the previous hidden state element-wise with the update gate output, multiplying the candidate hidden state element-wise with (1 - update gate output), and then summing the two results to obtain the final hidden state for the current time step.
[0065] Step S334: After the cyclic gating unit processes the last time step of the node feature temporal vector sequence, extract the final hidden state output by the last time step as the temporal evolution mode encoding vector corresponding to the node.
[0066] The cyclic gating unit processes each feature vector in the node's temporal feature vector sequence sequentially. After processing the last (latest) feature vector in the sequence, the final hidden state calculated at that time step contains temporal dependency information from the beginning to the end of the sequence. This final hidden state is extracted and used as the temporal evolution pattern encoding vector corresponding to that node. This encoding vector, in the form of high-dimensional features, characterizes the evolution of the node's internal conflict energy value within the entire historical time window, including trends and fluctuation patterns.
[0067] Step S335: Concatenate and fuse the temporal evolution mode encoding vector corresponding to the node with the node feature after energy propagation corresponding to the node in the last time step to generate the temporal enhanced node feature corresponding to the node containing the temporal evolution law. Repeat the above operation for all nodes, concatenate the temporal enhanced node features corresponding to all nodes to generate the temporal enhanced node feature tensor.
[0068] For each node, the temporal evolution pattern encoding vector obtained in step S334 is concatenated with the node feature vector after energy propagation at the last historical time step. The concatenation operation links the two vectors end-to-end, resulting in a new vector whose dimension is equal to the sum of the dimensions of the two vectors. This new vector integrates the node's feature information after graph propagation in the spatial dimension and its evolutionary pattern information after sequence modeling in the temporal dimension; it is called the temporally enhanced node feature. This concatenation operation is performed sequentially on all nodes in the graph structure to obtain the temporally enhanced node features for each node. The temporally enhanced node features of all nodes are then stacked and concatenated according to their node index order to obtain the temporally enhanced node feature tensor. This tensor serves as the input to the subsequent prediction and decoding layer.
[0069] Step S340: Input the temporal augmentation node feature tensor into the evolutionary prediction decoding layer of the spatiotemporal graph neural network model. Predict the future state of the temporal augmentation node feature tensor through the fully connected mapping network of the evolutionary prediction decoding layer. Output the predicted energy value of each node at each prediction time point within the preset prediction time window in the future. The predicted energy value is a two-dimensional feature vector. The first component of the two-dimensional feature vector corresponds to the future predicted value of the spatial distribution density, and the second component of the two-dimensional feature vector corresponds to the future predicted value of the intensity of time fluctuation.
[0070] The evolutionary prediction decoding layer receives a temporally enhanced node feature tensor as input, which contains feature representations of all nodes incorporating spatiotemporal information. The goal of the evolutionary prediction decoding layer is to map these features to multiple prediction time points within a pre-defined future prediction time window, outputting the predicted energy value of each node at each prediction time point. Internally, the evolutionary prediction decoding layer consists of multiple cascaded sublayers, including a feature expansion sublayer, a gated linear unit network (GIN), a residual convolutional module, a temporal reshaping sublayer, and a numerical mapping layer. The feature expansion sublayer first expands the dimensionality of the input features, extending the feature dimension of each node to an intermediate dimension proportional to the length of the future prediction time window, preparing for subsequent multi-step predictions. The GIN uses a dual-gating mechanism to filter the expanded features. This mechanism includes two parallel linear transformation paths. One path, after passing through an activation function, serves as the gating signal, which is then multiplied element-wise with the output of the other path, thereby retaining effective features relevant to future energy prediction and suppressing redundant features. The residual convolution module performs deep feature extraction through multiple stacked convolutional layers. Each convolutional layer is followed by batch normalization and activation functions. Internally, residual connections are introduced to directly add the input to the convolutional output, mitigating the gradient vanishing problem in deep networks and extracting deep evolutionary patterns between features. The temporal reshaping sublayer reorganizes the deep evolutionary features into a pre-output tensor with a defined temporal dimension. The tensor's dimension is the number of nodes multiplied by the number of prediction time points multiplied by the feature dimension. The numerical mapping layer, the final layer of this decoding layer, employs a two-neuron fully connected network structure. For each node's feature vector at each prediction time point, it maps it to a two-dimensional prediction vector. The first value of this two-dimensional vector is the future predicted value of the spatial density of the node at that prediction time point, and the second value is the future predicted value of the drastic temporal fluctuation. The predicted energy values of all nodes at all prediction time points collectively constitute the output of the evolutionary prediction decoding layer.
[0071] In one implementation, step S340 may specifically include the following steps S341 to S345: Step S341: Input the temporal enhancement node feature tensor into the feature expansion sublayer of the evolutionary prediction decoding layer. Through the linear transformation unit of the feature expansion sublayer, expand the feature dimension of the temporal enhancement node feature tensor to an intermediate dimension that is proportional to the length of the future preset prediction time window, and generate the expanded feature tensor.
[0072] The feature expansion sublayer contains a linear transformation unit consisting of a learnable weight matrix. This sublayer receives the temporally augmented node feature tensor as input, with its feature dimension being the temporally augmented dimension. The linear transformation unit performs matrix multiplication on the input feature tensor and the weight matrix, linearly mapping the feature vector of each node from the temporally augmented dimension to a new dimension. The size of this new dimension is proportional to the length of the pre-defined future prediction time window. For example, if the future prediction time window contains T prediction time points, the expanded feature dimension is typically set to T multiplied by a pre-defined hidden layer dimension, enabling subsequent networks to generate independent feature representations for each time point. After the linear transformation, an expanded feature tensor is generated, with its dimension being the number of nodes multiplied by the expanded feature dimension.
[0073] Step S342: Input the expanded feature tensor into the gated linear unit network of the evolution prediction decoding layer. Through the dual-gating mechanism of the gated linear unit network, the expanded feature tensor is subjected to feature filtering and nonlinear transformation to retain effective features related to future energy prediction and suppress redundant features, thereby generating the gated and filtered feature tensor.
[0074] The first branch performs a linear transformation on the expanded feature tensor, outputting a tensor with the same dimension as the input. The second branch also performs a linear transformation on the expanded feature tensor, but the transformed tensor is processed by a non-linear activation function (usually the sigmoid function), outputting a gated tensor with values ranging from 0 to 1. Each element in the gated tensor represents the importance weight of the corresponding feature. The output of the first branch is multiplied element-wise with the gated tensor to obtain the gated feature tensor. This mechanism allows the network to dynamically select which features are important for subsequent prediction tasks and which features can be suppressed, thereby enhancing the model's expressive power and reducing the risk of overfitting. The dimension of the gated feature tensor output by the gated linear unit network is the same as the dimension of the input expanded feature tensor.
[0075] Step S343: Input the gated feature tensor into the residual convolution module of the evolution prediction decoding layer. Through multiple stacked convolutional layers and residual connections of the residual convolution module, perform deep feature extraction on the gated feature tensor to generate a deep evolution feature tensor.
[0076] The residual convolution module consists of multiple stacked residual blocks. Each residual block contains two convolutional layers, two batch normalization layers, and one residual connection. The convolutional layers use one-dimensional convolution, with the kernel sliding along the feature dimension to extract dependencies between local features. Each convolutional layer is followed by a batch normalization layer to normalize the convolutional output, accelerating network convergence and improving generalization ability. The residual connection directly adds the input of the residual block to the output after processing by the two convolutional layers element-wise, enabling the network to learn the residual mapping between input and output, effectively alleviating the gradient vanishing problem in deep networks and allowing the construction of deeper feature extraction structures. After gating, the feature tensor passes through multiple residual blocks sequentially. Each residual block further abstracts and refines features, ultimately outputting a deep evolutionary feature tensor containing higher-level, more abstract spatiotemporal evolutionary features.
[0077] Step S344: Input the deep evolutionary feature tensor into the temporal reshaping sublayer of the evolutionary prediction decoding layer, and segment and rearrange the deep evolutionary feature tensor according to the number of time steps of the future preset prediction time window to generate a pre-output tensor with a clear temporal dimension structure. The dimensions of the pre-output tensor correspond to the number of nodes, the number of prediction time points, and the feature dimension.
[0078] After processing by the residual convolution module, the deep evolutionary feature tensor still retains a flat vector representation in its feature dimension, lacking an explicit temporal dimension structure. The temporal reshaping sublayer reshapes this tensor. Specifically, based on the number of prediction time points included in the future preset prediction time window, the temporal reshaping sublayer divides the feature vector of each node into multiple sub-vectors, each sub-vector corresponding to a prediction time point. These sub-vectors are then rearranged according to the order of the prediction time points to obtain a new three-dimensional tensor. The first dimension of this three-dimensional tensor corresponds to the node index, the second dimension corresponds to the prediction time point index, and the third dimension corresponds to the feature dimension of each time point. After temporal reshaping, the generated pre-output tensor has a clear temporal dimension structure, facilitating the subsequent independent generation of predicted values for each time point.
[0079] Step S345: Input the pre-output tensor into the numerical mapping layer of the evolution prediction decoding layer. Through the dual-neuron fully connected network of the numerical mapping layer, map the feature vector corresponding to each prediction time point in the pre-output tensor into a two-dimensional prediction vector to obtain the prediction energy value of each node at each prediction time point within the future preset prediction time window. The first component of the two-dimensional prediction vector corresponds to the future prediction value of the spatial distribution density, and the second component of the two-dimensional prediction vector corresponds to the future prediction value of the intensity of time fluctuation.
[0080] The numerical mapping layer is the final layer of the evolutionary prediction decoding layer. It consists of a fully connected network with two output neurons. The numerical mapping layer receives a pre-output tensor from the temporal reshaping sublayer. Each node in this tensor corresponds to a feature vector at each prediction time point. The numerical mapping layer performs a linear transformation on this feature vector, mapping it to a 2D space. The output 2D vector is the predicted energy value of that node at that prediction time point. The first value of this vector is the future predicted value of the spatial distribution density, and the second value is the future predicted value of the temporal fluctuation intensity. This mapping operation is repeated for all nodes and all prediction time points, ultimately outputting the predicted energy values of all nodes at all prediction time points within a preset future prediction time window.
[0081] Step S350: Based on the predicted energy values of each node at each predicted time point within the future preset prediction time window, the moment when each component of the predicted energy value of each node reaches its maximum value within the future preset prediction time window is taken as the arrival time of the energy peak. Based on the spatial adjacency relationship between each node and the changing trend of the predicted energy value, a directed edge for energy transfer connecting each node is constructed to generate a dynamic evolution map of traffic conflict energy composed of nodes and directed edges for energy transfer.
[0082] After outputting the predicted energy values of all nodes at all prediction time points in step S340, the predicted energy value sequence of each node is analyzed. The predicted energy value of each node is a two-dimensional vector sequence containing a sequence of predicted values for spatial distribution density and a sequence of predicted values for temporal fluctuation intensity. The prediction time points corresponding to the maximum values of these two sequences within the prediction time window are calculated respectively. A weighted average is taken between the peak arrival times of spatial distribution density and temporal fluctuation intensity to obtain the predicted comprehensive energy peak arrival time of the node. Then, directed edges for energy transfer are constructed based on the spatial adjacency relationships between nodes. For each pair of spatially adjacent nodes, the temporal relationship between the predicted energy value sequences of the two nodes is analyzed. If the predicted energy value sequence of node A reaches a peak at a certain time point, and the predicted energy value sequence of node B shows an upward trend in peak value at subsequent time points, and this trend is spatially continuous, then a directed edge is constructed from node A to node B, representing energy transfer from A to B. All adjacent node pairs are traversed, and the connection relationships of the directed edges are determined based on the changing trends of the predicted energy values. By integrating all nodes and their corresponding predicted energy peak arrival times, as well as the directed edges for energy transfer between nodes, a dynamic evolution map of traffic conflict energy is obtained. This map is presented in the form of a graph structure, where nodes represent basic spatial analysis units, directed edges represent the propagation direction of conflict energy, and the predicted energy peak arrival time associated with each node represents the time point at which that unit reaches the maximum conflict risk.
[0083] Step S400: Based on the topological connection relationship of the energy evolution path network in the traffic conflict energy dynamic evolution map and the time sequence of the predicted energy peak arrival time, identify the potential outbreak source units of traffic conflict events occurring in the target road network area within the next preset time period and the expected ripple unit sequence of traffic conflict events propagating outward from the potential outbreak source units, and generate conflict propagation situation prediction information containing the spatial coordinates of the potential outbreak source units and the propagation arrival time sequence of each unit in the expected ripple unit sequence.
[0084] In one implementation, step S400 may specifically include the following steps S410 to S450: Step S410: Analyze all nodes in the traffic conflict energy dynamic evolution map and their corresponding predicted energy peak arrival times. Sort all nodes in ascending order according to the weighted average of the first and second component peak arrival times in the predicted energy peak arrival times, and generate a node energy peak time sorting list.
[0085] The identifiers of all nodes and their corresponding predicted peak energy arrival times are extracted from the traffic conflict energy dynamic evolution map. The predicted peak energy arrival time for each node comprises two components: the peak time of the spatial distribution density component and the peak time of the temporal fluctuation intensity component. A weighted average of these two component peak times is calculated for each node. The weighting coefficients can be preset according to the importance of the two indicators in the actual scenario; for example, the weight of the spatial distribution density peak is set to 0.6, and the weight of the temporal fluctuation intensity peak is set to 0.4. After calculating the comprehensive peak time for each node, all nodes are sorted in ascending order of their comprehensive peak times to generate a node energy peak time sorting list.
[0086] Step S420: Extract nodes from the node energy peak time sorting list that are within a preset number range as a candidate burst source unit set. The predicted arrival time of the energy peak of the nodes in the candidate burst source unit set is earlier than that of the vast majority of other nodes.
[0087] Based on a preset candidate number parameter, a specified number of nodes are extracted from the head of the node energy peak time sorting list. For example, the preset number can be set to 10% of the total number of nodes, or directly set to a fixed value such as 5. These extracted nodes rank highest in the sorting list, meaning that their energy peak arrival time is the earliest, and they are the areas most likely to experience traffic conflicts first. These nodes are then assigned to the candidate outbreak source unit set.
[0088] Step S430: Analyze the out-degree connection relationship of each node in the candidate burst source unit set in the energy evolution path network, count the number of directed edges pointing to other nodes for each candidate burst source unit, and select the candidate burst source unit with the most directed edges as the potential burst source unit.
[0089] For each node in the candidate source unit set, analyze all directed edges originating from that node in the dynamic evolution graph of traffic conflict energy. Count the number of these directed edges; this number represents the out-degree of the node. The out-degree reflects the node's ability to propagate conflict energy outward; the larger the out-degree, the wider the spatial range of the node's influence and the more propagation paths. Compare the out-degrees of all candidate source units and select the node with the largest out-degree as the potential source unit. If multiple nodes have the same and maximum out-degree, further compare the predicted arrival times of the energy peak at these nodes and select the node with the earliest peak arrival time as the potential source unit.
[0090] Step S440: Starting from the potential burst source unit, perform a breadth-first traversal along the directed edges in the energy evolution path network, and record the nodes passed through during the traversal and their corresponding predicted energy peak arrival times.
[0091] Breadth-first search (BFS) is a graph traversal algorithm that expands outwards layer by layer from the starting node, based on the number of hops from the starting node. The traversal begins with the potential source unit, which is designated as layer 0. Then, all nodes pointed to by directed edges originating from the current layer are identified; these nodes constitute the next layer. During the traversal, each visited node and its corresponding predicted energy peak arrival time are recorded. The traversal continues until no new nodes can be found. BFS ensures that affected units are recorded in hop order from the source node.
[0092] In one implementation, step S440 may specifically include the following steps S441 to S445: Step S441: Use the potential burst source unit as the node set of the current traversal level, and record the predicted value of the energy peak arrival time corresponding to the potential burst source unit as the propagation arrival time sequence of the first layer node.
[0093] Initialize the breadth-first traversal process, adding potential eruption source units to the node set of the current traversal level. Record the predicted arrival time of the energy peak of the potential eruption source unit as the propagation arrival time sequence of the first layer (i.e., the starting layer) nodes. This time sequence indicates the time when the conflict event erupts at this source unit.
[0094] Step S442: Extract all directed edges from the energy evolution path network that start from each node in the current traversal level's node set, and obtain the destination node pointed to by all directed edges as the candidate node set for the next traversal level.
[0095] Iterate through each node in the current level's node set, identifying all directed edges originating from that node in the traffic conflict energy dynamic evolution graph. Collect the destination nodes pointed to by these directed edges, adding all these destination nodes to a temporary set to obtain the candidate node set for the next traversal level. This set may contain duplicate nodes, as multiple current level nodes may simultaneously point to the same destination node.
[0096] Step S443: Check if there are duplicate nodes in the candidate node set of the next traversal level, remove duplicate nodes, and obtain the unique node set of the next traversal level.
[0097] The candidate node set generated in step S442 is deduplicated, that is, the nodes that appear repeatedly in the set are removed to ensure that each node appears only once in the next traversal level. The deduplicated set is the unique node set for the next traversal level, and each node in this set represents a different unit that can be reached from the current level by taking one hop.
[0098] Step S444: Record the predicted arrival time of the energy peak for each node in the unique node set of the next traversal level, use the predicted arrival time of the energy peak as the propagation arrival time sequence of the next traversal level, and update the unique node set of the next traversal level to the node set of the current traversal level.
[0099] For each node in the unique node set of the next traversal level obtained in step S443, the predicted arrival time of the energy peak corresponding to that node is extracted from the traffic conflict energy dynamic evolution map, and the predicted value is recorded as the propagation arrival time sequence of that node. Then, this unique node set is assigned to the node set of the current traversal level, in preparation for the next round of traversal.
[0100] Step S445: Repeat the operations of extracting directed edges, obtaining candidate nodes, deduplication, and recording the propagation arrival time sequence until no new nodes for the next traversal level can be obtained. Save all nodes recorded during the traversal process and their corresponding propagation arrival time sequence in traversal level order.
[0101] The operations from S442 to S444 are executed iteratively. In each iteration, all nodes pointed to by outgoing edges from the current level node are considered as candidates. After deduplication, the nodes of the next level are obtained, and the propagation arrival time of these nodes is recorded. Then, the current level is updated to the next level. If, in a certain iteration, no directed edge pointing to a new node can be found from the current level node, or all the found destination nodes have been visited, then no new next traversal level node can be obtained, and the traversal terminates. All visited nodes and their corresponding propagation arrival time are saved in the traversal level order to obtain the wavelet sequence organized by propagation distance level.
[0102] Step S450: Arrange the nodes passed through during the traversal in order from earliest to latest according to the weighted average of their predicted energy peak arrival times, and generate a node sequence that propagates outward from the potential burst source unit as the expected affected unit sequence, and use the predicted energy peak arrival times of each node in the expected affected unit sequence as the propagation arrival time sequence.
[0103] During the breadth-first traversal in step S440, nodes are recorded hierarchically according to their hop distance from the source. However, nodes within the same hierarchical level may differ in their arrival times of energy peaks. To more accurately describe the temporal order of conflict propagation, all nodes recorded during the traversal (including potential source units) are rearranged in ascending order based on the weighted average of their predicted energy peak arrival times. The resulting node sequence is the expected affected unit sequence, where the node order reflects the temporal order of the conflict event's propagation from the source. The predicted energy peak arrival time for each node in the sequence serves as the propagation arrival time sequence for that unit, indicating the time it takes for the conflict's impact to reach that unit.
[0104] Step S500: Based on the spatial coordinates of potential outbreak source units and the propagation arrival time of each unit in the expected affected unit sequence in the conflict propagation situation prediction information, generate differentiated collaborative working mode adjustment instructions for each roadside unit in the target road network area, and distribute the differentiated collaborative working mode adjustment instructions to the corresponding roadside units through the dedicated communication network of roadside units, so as to trigger each roadside unit to perform the corresponding data acquisition working mode switching operation according to its own position and propagation arrival time in the expected affected unit sequence.
[0105] In one implementation, step S500 may specifically include the following steps S510 to S550: Step S510: Analyze the conflict propagation situation prediction information, obtain the spatial coordinates of potential outbreak source units, determine the first roadside unit identifier covering the potential outbreak source units based on the spatial coordinates, and mark the working mode corresponding to the first roadside unit identifier as the highest priority continuous tracking mode.
[0106] Spatial coordinates of potential outbreak source units are extracted from conflict propagation situation prediction information. Based on these coordinates, the detection coverage of each roadside unit within the target road network area is queried to determine the roadside unit covering the coordinate point. A unique identifier for each roadside unit is obtained and marked as the first roadside unit identifier. The first roadside unit is assigned the highest priority continuous tracking mode, which requires the roadside unit to continuously collect data at the highest acquisition frequency supported by the system, without frequency reduction or sleep operations.
[0107] Step S520: Obtain the spatial coordinates and corresponding propagation arrival time of each unit in the expected affected unit sequence, determine the corresponding roadside unit identifier covering each unit according to the spatial coordinates of each unit, and assign different working mode switching timestamps to the corresponding roadside unit identifiers according to the order of propagation arrival time.
[0108] The expected affected unit sequence is extracted from the conflict propagation situation prediction information. Each unit in the sequence is traversed to obtain its spatial coordinates and corresponding propagation arrival time. Based on the spatial coordinates of each unit, the roadside unit identifier covering that unit is determined. According to the order of propagation arrival times, a working mode switching timestamp is assigned to each roadside unit. This timestamp is typically set to a lead time before the unit's propagation arrival time, ensuring that the roadside units can complete the working mode switching and warm-up before the conflict impact arrives.
[0109] Step S530: Determine the first preset number of units in the expected affected unit sequence with the earliest propagation arrival time-weighted average value as the core affected unit set, and mark the working mode corresponding to the roadside unit identifier covering the core affected unit set as the second highest priority pre-start enhanced acquisition mode.
[0110] All units in the expected affected unit sequence are sorted according to the weighted average of their propagation arrival times. A predetermined number of units, such as the first three, are extracted and grouped into the core affected unit set. The units in the core affected unit set represent the areas most affected during conflict propagation and require focused monitoring. A second-highest priority pre-start enhanced acquisition mode is assigned to the roadside unit identifiers covering these units. This mode requires roadside units to switch their data acquisition frequency from the current frequency to a preset enhanced acquisition frequency, which is between the highest and base frequencies, upon reaching their assigned operating mode switch timestamp.
[0111] Step S540: Determine the remaining units in the expected affected unit sequence, excluding the core affected unit set, as the general affected unit set, and mark the working mode corresponding to the roadside unit identifier covering the general affected unit set as the regular priority standby monitoring mode.
[0112] All units in the expected affected unit sequence that are not included in the core affected unit set are grouped into a general affected unit set. These units are areas subsequently affected during the conflict propagation process, with the impact arriving relatively late. A regular priority standby monitoring mode is assigned to the roadside unit identifiers covering these units. This mode requires roadside units to remain on standby within a preset time range, i.e., operating at low power consumption and low acquisition frequency, but automatically increasing the acquisition frequency by one level at a specific time point or at the end of the time range to cope with potential conflict impacts.
[0113] Step S550: Mark the working modes of all roadside unit identifiers in the target road network area, except for the first roadside unit identifier and the roadside unit identifiers of each roadside unit in the expected coverage unit sequence, as low-priority basic acquisition modes, and associate and encapsulate all roadside unit identifiers and their corresponding working mode markers and working mode switching timestamps to generate differentiated collaborative working mode adjustment instructions.
[0114] Identify all roadside unit identifiers within the target road network area. Exclude the first roadside unit identifier and all roadside unit identifiers from the expected coverage unit sequence. The remaining roadside unit identifiers are tagged with a low-priority basic data acquisition mode. This mode requires roadside units to perform regular data acquisition at the system's preset basic acquisition frequency to maintain basic traffic monitoring functions. Associate all roadside unit identifiers with their corresponding working mode tags. For modes requiring time switching, also associate the working mode switching timestamp. Encapsulate this association information to obtain complete differentiated collaborative working mode adjustment instructions.
[0115] In one implementation, step S550 may specifically include the following steps S551 to S555: Step S551: Based on the order of the working mode switching timestamps, sort the identifiers of each roadside unit corresponding to the second highest priority pre-start enhanced acquisition mode, and generate a first scheduling sub-instruction containing the sorted roadside unit identifiers and their corresponding switching timestamps.
[0116] Collect all roadside unit identifiers marked as second-highest priority pre-start enhanced acquisition mode and their corresponding operating mode switching timestamps. Sort these roadside unit identifiers according to the order of their switching timestamps to generate an ordered list. Encapsulate this list and the switching timestamp information it contains into a first scheduling sub-instruction. This sub-instruction is used to instruct these roadside units to synchronously or sequentially switch to the enhanced acquisition mode at a specified time.
[0117] Step S552: Based on the weighted average of the propagation arrival time of each unit in the expected affected unit sequence, group the roadside unit identifiers corresponding to the conventional priority standby monitoring mode, classify the roadside unit identifiers corresponding to units whose propagation arrival time weighted average is within a preset first time range into the first standby group, classify the roadside unit identifiers corresponding to units whose propagation arrival time weighted average is within a preset second time range into the second standby group, and generate a second scheduling sub-instruction containing grouping information and the time range to be activated for each group.
[0118] Collect all roadside unit identifiers marked as being in the regular priority standby monitoring mode and their corresponding propagation arrival times. Based on the weighted average of these propagation arrival times, divide them into different standby groups. For example, roadside units with a weighted average within a first time range are grouped into the first standby group, and those with a weighted average within a second time range are grouped into the second standby group. Each group corresponds to a waiting-to-activate time range, indicating the time interval during which the roadside units in that group need to remain in a standby state. Encapsulate the grouping information and the waiting-to-activate time ranges for each group into a second scheduling sub-instruction.
[0119] Step S553: Generate a third scheduling sub-instruction containing a continuous tracking duration parameter for the first roadside unit identifier corresponding to the highest priority continuous tracking mode, and generate a fourth scheduling sub-instruction containing a basic acquisition frequency parameter for other roadside unit identifiers corresponding to the low priority basic acquisition mode.
[0120] A third scheduling sub-instruction is generated for the first roadside unit marked as the highest priority continuous tracking mode. This instruction includes a continuous tracking duration parameter, which specifies the duration for which the roadside unit continuously collects data at the highest frequency. A fourth scheduling sub-instruction is generated for all roadside units marked as the low priority basic acquisition mode. This instruction includes a basic acquisition frequency parameter, which specifies the frequency value at which these roadside units perform regular acquisitions.
[0121] Step S554: Add unified instruction header information to all scheduling sub-instructions. The instruction header information includes the instruction generation timestamp, instruction validity period, and target road network area identifier. Assemble and splice the instruction header information with the first scheduling sub-instruction, the second scheduling sub-instruction, the third scheduling sub-instruction, and the fourth scheduling sub-instruction to obtain a complete instruction data packet.
[0122] A unified instruction header is constructed, comprising three parts: an instruction generation timestamp to record the time the instruction was generated; an instruction validity period to specify the duration for which the instruction is valid; and a target road network area identifier to indicate the road network area to which the instruction applies. This instruction header is then assembled and concatenated with the first, second, third, and fourth scheduling sub-instructions generated in steps S551 to S553 according to a preset format to obtain a complete instruction data packet.
[0123] Step S555: Perform cyclic redundancy check encoding on the complete instruction data packet to generate a final instruction frame containing the checksum, which serves as the instruction for adjusting the differentiated collaborative working mode.
[0124] Cyclic redundancy check (CRC) encoding is performed on the complete instruction data packet generated in step S554 to calculate a checksum. This checksum is appended to the end of the instruction data packet to obtain the final instruction frame. This checksum is used by the receiving end to verify whether any errors occurred during the transmission of the instruction, ensuring the integrity and accuracy of the instruction. This final instruction frame is the differentiated cooperative working mode adjustment instruction and can be distributed through the roadside unit's dedicated communication network.
[0125] As one implementation method, in step S500, the differentiated collaborative working mode adjustment instruction is distributed to each corresponding roadside unit through the dedicated communication network of the roadside unit, so as to trigger each roadside unit to perform the corresponding data acquisition working mode switching operation according to its own position and propagation arrival time in the expected affected unit sequence. Specifically, it may include the following steps S560~S5100: Step S560: The differentiated collaborative working mode adjustment instruction is broadcast to all roadside units within the target road network area via the dedicated communication network of roadside units. The differentiated collaborative working mode adjustment instruction contains a unique identifier for each roadside unit, its corresponding working mode mark, and a working mode switching timestamp.
[0126] The differentiated collaborative working mode adjustment instructions generated in step S555 are distributed through the dedicated communication network of roadside units. Distribution uses a broadcast method, meaning the instructions are sent to all roadside units within the target road network area at once, rather than being sent point-to-point. The broadcast method improves the efficiency of instruction distribution, ensuring that all roadside units receive the instructions almost simultaneously. The instruction data packet contains a unique identifier for each roadside unit, along with a working mode flag and a working mode switching timestamp assigned to that identifier.
[0127] Step S570: After receiving the differentiated cooperative working mode adjustment instruction, each roadside unit performs cyclic redundancy check decoding on the instruction and extracts the working mode flag and working mode switching timestamp corresponding to its own unique identifier.
[0128] Upon receiving a broadcast instruction, each roadside unit within the target road network area first performs a cyclic redundancy check (CRC) decoding on the instruction data packet, extracts the checksum at the end of the instruction, and calculates the checksum of the received data packet using the same verification algorithm. The two are then compared to verify data integrity. After successful verification, each roadside unit parses the instruction content, searches for an entry matching its own unique identifier, and extracts its assigned operating mode flag and operating mode switching timestamp.
[0129] Step S580: The first roadside unit marked as the highest priority continuous tracking mode parses the continuous tracking duration parameter in the third scheduling sub-instruction, immediately adjusts its own data acquisition frequency to the highest preset frequency, and continuously collects vehicle traffic status information in the coverage area at the highest preset frequency within the time period corresponding to the continuous tracking duration parameter.
[0130] The first roadside unit, marked as the highest priority continuous tracking mode, extracts the continuous tracking duration parameter from the third scheduling sub-instruction after parsing the instruction. This unit immediately performs a working mode switch, adjusting its data acquisition frequency from the current value to the system's preset highest acquisition frequency, and maintains this highest frequency for data acquisition within the time period specified by the continuous tracking duration parameter, without performing frequency reduction operations, to ensure close monitoring of potential conflict source areas.
[0131] Step S590: The roadside unit marked as the second highest priority pre-start enhanced acquisition mode parses the working mode switching timestamp corresponding to itself in the first scheduling sub-instruction. When the working mode switching timestamp is reached, it switches its own data acquisition frequency from the current frequency to the enhanced acquisition frequency and continues to acquire data at the enhanced acquisition frequency until a new adjustment instruction is received.
[0132] The roadside unit marked as having the second-highest priority pre-start enhanced acquisition mode parses the operating mode switching timestamp assigned to it from the first scheduling sub-instruction. This unit maintains its current data acquisition frequency until its local clock reaches the switching timestamp. At that moment, the unit performs an operating mode switch, increasing its data acquisition frequency from the current value to a preset enhanced acquisition frequency, and continues data acquisition at this enhanced frequency until it receives the next round of operating mode adjustment instructions.
[0133] Step S5100: The roadside unit marked as the regular priority standby monitoring mode parses its own group and corresponding waiting time range in the second scheduling sub-instruction, maintains standby status within the waiting time range, and automatically increases the data acquisition frequency by one level when the waiting time range ends. Other roadside units marked as the low priority basic acquisition mode parse the basic acquisition frequency parameters in the fourth scheduling sub-instruction and adjust their own data acquisition frequency to the frequency value corresponding to the basic acquisition frequency parameters.
[0134] Roadside units marked as being in regular priority standby monitoring mode parse their own group and corresponding activation time range from the second scheduling sub-instruction. This unit remains in standby mode within the activation time range, operating at the current frequency or a lower frequency, without performing high-frequency data collection. When the local clock reaches the end of the activation time range, the unit automatically increases its data collection frequency by one level, switching from the current frequency to a higher preset frequency level. Other roadside units marked as being in low-priority basic data collection mode parse the basic data collection frequency parameters from the fourth scheduling sub-instruction and adjust their own data collection frequency to the frequency value specified by these parameters to maintain basic traffic monitoring functions.
[0135] This invention also provides an early warning system, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the steps in the short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural network provided in this invention.
[0136] Please see details. Figure 3 This is a schematic diagram of the structure of an early warning system provided in an embodiment of the present invention. Figure 3 As shown, the aforementioned early warning system 1000 may include: a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the early warning system 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 3 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.
[0137] exist Figure 3 In the warning system 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface; and the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the methods provided in the above embodiments.
[0138] It should be understood that the early warning system 1000 described in the embodiments of the present invention can perform the foregoing text. Figure 2 The implementation principle and beneficial effects of the short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural network described in the corresponding embodiments will not be repeated here.
Claims
1. A short-term traffic conflict prediction method based on RSU group collaboration and spatiotemporal graph neural network, characterized in that, include: The system acquires a set of vehicle traffic status information synchronously acquired by multiple roadside units arranged in a network within a target road network area during an uninterrupted collaborative acquisition cycle. The set of vehicle traffic status information is generated by each roadside unit after continuously tracking the vehicles passing within its detection range. The set of vehicle traffic status information includes spatially continuous vehicle trajectory sequence data and timestamp markers and instantaneous driving status parameters corresponding to each trajectory point in the vehicle trajectory sequence data. An initial conflict situation field is constructed for the vehicle traffic status information set. The detection coverage of each roadside unit is used as the basic spatial analysis unit. Based on the spatial distribution density of the vehicle trajectory sequence data contained in the basic spatial analysis unit and the temporal fluctuation intensity of the instantaneous driving status parameters, a traffic conflict initial energy field distribution map of the target road network area is generated within the uninterrupted collaborative acquisition cycle. The traffic conflict initial energy field distribution map includes the initial conflict energy value corresponding to each basic spatial analysis unit and the gradient change direction indication information of the initial conflict energy value in the spatial dimension. A pre-built spatiotemporal graph neural network model is invoked to predict the spatiotemporal evolution of conflict energy in the initial energy field distribution map of the traffic conflict. The graph structure propagation layer of the spatiotemporal graph neural network model is used to capture the energy transfer paths between the basic spatial analysis units. The temporal cyclic layer of the spatiotemporal graph neural network model is used to capture the inertia of energy value change over time within each basic spatial analysis unit. A dynamic evolution map of traffic conflict energy in the target road network area within a future preset prediction time window is generated. The dynamic evolution map of traffic conflict energy includes an energy evolution path network with the basic spatial analysis units as nodes and the predicted arrival time of the energy peak corresponding to each evolution path node. Based on the topological connection relationship of the energy evolution path network in the traffic conflict energy dynamic evolution map and the time sequence of the predicted arrival time of the energy peak, potential outbreak source units of traffic conflict events occurring in the target road network area within the next preset time period and expected spillover unit sequences of the traffic conflict events propagating outward from the potential outbreak source units are identified, and conflict propagation situation prediction information containing the spatial coordinates of the potential outbreak source units and the propagation arrival time sequence of each unit in the expected spillover unit sequence is generated. Based on the spatial coordinates of the potential outbreak source unit in the conflict propagation situation prediction information and the propagation arrival time of each unit in the expected affected unit sequence, a differentiated collaborative working mode adjustment instruction is generated for each roadside unit in the target road network area. The differentiated collaborative working mode adjustment instruction is distributed to each corresponding roadside unit through the dedicated communication network of the roadside unit to trigger each roadside unit to perform a corresponding data acquisition working mode switching operation according to its own position in the expected affected unit sequence and the propagation arrival time.
2. The method according to claim 1, characterized in that, The initial conflict situation field is constructed by building the vehicle traffic state information set. Using the detection coverage of each roadside unit as the basic spatial analysis unit, and based on the spatial distribution density of the vehicle trajectory sequence data contained within the basic spatial analysis unit and the temporal fluctuation intensity of the instantaneous driving state parameters, a traffic conflict initial energy field distribution map of the target road network area within the continuous collaborative acquisition period is generated, including: Extract vehicle trajectory sequence data from the vehicle traffic status information set corresponding to each roadside unit, and perform spatial coordinate analysis on each trajectory point in the vehicle trajectory sequence data to obtain the distribution position coordinate set of each trajectory point within the basic spatial analysis unit. The number of trajectory points that exist simultaneously in each unit time interval of the spatial basic analysis unit is calculated based on the distribution location coordinate set. The number of trajectory points is arranged in chronological order to generate the vehicle density time series corresponding to the spatial basic analysis unit. The difference between the maximum and minimum values of the vehicle density time series in the uninterrupted collaborative acquisition period is used as the spatial distribution density measurement index. Extract the instantaneous driving state parameters corresponding to the vehicle trajectory sequence data from the vehicle traffic state information set corresponding to each roadside unit. The instantaneous driving state parameters include the instantaneous speed value of the vehicle. Perform time-series difference operation on the instantaneous speed value of the vehicle to generate a speed fluctuation amplitude sequence. Calculate the cumulative value of the fluctuation amplitude of the speed fluctuation amplitude sequence within the uninterrupted collaborative acquisition period as a measure of the intensity of time fluctuation. The spatial distribution density metric and the temporal fluctuation intensity metric are concatenated to generate the initial conflict energy value corresponding to the basic spatial analysis unit. The difference between the initial conflict energy value and the adjacent basic spatial analysis units is calculated. The ratio of the difference to the spatial distance between adjacent basic spatial analysis units is used as the gradient change direction indication information of the initial conflict energy value in the spatial dimension. The above operation is performed on all basic spatial analysis units to generate the traffic conflict initial energy field distribution map.
3. The method according to claim 2, characterized in that, The step of extracting instantaneous driving state parameters corresponding to the vehicle trajectory sequence data from the vehicle traffic state information set corresponding to each roadside unit, wherein the instantaneous driving state parameters include the instantaneous vehicle speed value, performing a time-series difference operation on the instantaneous vehicle speed value to generate a speed fluctuation amplitude sequence, and calculating the cumulative value of the fluctuation amplitude of the speed fluctuation amplitude sequence within the uninterrupted collaborative acquisition period as a measure of the severity of time fluctuation, includes: The instantaneous speed values of all vehicles corresponding to each acquisition time point within the uninterrupted collaborative acquisition cycle are obtained by the spatial basic analysis unit. The arithmetic mean of the instantaneous speed values of all vehicles corresponding to each acquisition time point is calculated to obtain the average speed value corresponding to each acquisition time point. The average speed values are then arranged in chronological order to generate an average speed time series. Perform a first-order difference operation on the average velocity time series, subtract the average velocity value of the previous acquisition time point from the average velocity value of the later acquisition time point, and obtain the velocity change difference between each adjacent acquisition time point. Arrange all velocity change differences in time order to generate the velocity fluctuation amplitude sequence. Take the absolute value of each velocity change difference in the velocity fluctuation amplitude sequence to obtain a velocity fluctuation amplitude absolute value sequence. Calculate the sum of all values in the velocity fluctuation amplitude absolute value sequence and use the sum as the fluctuation amplitude cumulative value of the spatial basic analysis unit within the uninterrupted collaborative acquisition cycle. The cumulative value of the fluctuation amplitude is used as a measure of the intensity of time fluctuation corresponding to the basic spatial analysis unit.
4. The method according to claim 2, characterized in that, The step of concatenating the spatial distribution density metric and the temporal fluctuation intensity metric to generate the initial conflict energy value corresponding to the basic spatial analysis unit, and calculating the difference between the initial conflict energy value and adjacent basic spatial analysis units, and using the ratio of the difference to the spatial distance between adjacent basic spatial analysis units as the gradient change direction indication information of the initial conflict energy value in the spatial dimension, includes: Determine the set of adjacent basic spatial analysis units that share a boundary in spatial location with the current basic spatial analysis unit, and obtain the spatial distribution density measurement index and the temporal fluctuation intensity measurement index corresponding to the current basic spatial analysis unit. The spatial distribution density measurement index corresponding to the current basic spatial analysis unit is taken as the first component, and the temporal fluctuation intensity measurement index corresponding to the current basic spatial analysis unit is taken as the second component. The first component and the second component are feature-concatenated to generate a two-dimensional feature vector composed of the first component and the second component as the initial value of the conflict energy corresponding to the current basic spatial analysis unit. Traverse each adjacent spatial basic analysis unit in the set of adjacent spatial basic analysis units, obtain the initial value of the conflict energy corresponding to the adjacent spatial basic analysis unit, calculate the difference between the first component of the initial value of the conflict energy corresponding to the current spatial basic analysis unit and the first component of the initial value of the conflict energy corresponding to the adjacent spatial basic analysis unit as the first component difference, calculate the difference between the second component of the initial value of the conflict energy corresponding to the current spatial basic analysis unit and the second component of the initial value of the conflict energy corresponding to the adjacent spatial basic analysis unit as the second component difference, and use the two-dimensional difference vector composed of the first component difference and the second component difference as the conflict energy difference from the current spatial basic analysis unit to the adjacent spatial basic analysis unit; Obtain the coordinates of the geometric center point of the current spatial basic analysis unit and the coordinates of the geometric center point of the adjacent spatial basic analysis unit, and calculate the spatial distance between the current spatial basic analysis unit and the adjacent spatial basic analysis unit based on the coordinates of the geometric center point; Divide each component of the conflict energy difference by the spatial distance value to obtain a two-dimensional gradient vector. Combine the two-dimensional gradient vector and its corresponding pointing direction as the gradient change direction indication information of the initial conflict energy value in the spatial dimension.
5. The method according to claim 1, characterized in that, The method involves calling a pre-built spatiotemporal graph neural network model to predict the spatiotemporal evolution of conflict energy in the initial energy field distribution map of the traffic conflict. The model utilizes the graph structure propagation layer of the spatiotemporal graph neural network model to capture the energy transfer paths between the basic spatial analysis units, and uses the temporal cyclic layer of the spatiotemporal graph neural network model to capture the inertia of energy value changes over time within each basic spatial analysis unit. This generates a dynamic evolution map of traffic conflict energy in the target road network area within a future preset prediction time window, including: The initial energy field distribution map of traffic conflict is input into the input adaptation layer of the spatiotemporal graph neural network model. The initial conflict energy values corresponding to each basic spatial analysis unit in the initial energy field distribution map of traffic conflict are tensor-encoded to generate an initial energy node feature tensor with the basic spatial analysis unit as the node. An adjacency matrix is generated according to the spatial adjacency relationship between each basic spatial analysis unit. The initial energy node feature tensor and the adjacency matrix are input into the graph structure propagation layer of the spatiotemporal graph neural network model. Energy features are propagated and aggregated between nodes through graph convolution operations of the graph structure propagation layer, simulating the diffusion process of conflict energy along the spatial connection path, and generating energy propagation node feature tensors that integrate neighborhood spatial context information. The node feature tensor after energy propagation is input into the temporal recurrent layer of the spatiotemporal graph neural network model. The feature sequence corresponding to each node is modeled by the recurrent gating unit of the temporal recurrent layer, and the natural decay or cumulative inertia of the internal conflict energy value of each node over time is captured to generate a temporal enhanced node feature tensor containing the time evolution law. The temporal enhancement node feature tensor is input into the evolution prediction decoding layer of the spatiotemporal graph neural network model. The future state of the temporal enhancement node feature tensor is predicted through the fully connected mapping network of the evolution prediction decoding layer. The predicted energy value of each node is output at each prediction time point within a preset prediction time window in the future. The predicted energy value is a two-dimensional feature vector. The first component of the two-dimensional feature vector corresponds to the future predicted value of the spatial distribution density, and the second component of the two-dimensional feature vector corresponds to the future predicted value of the intensity of time fluctuation. Based on the predicted energy values of each node at each predicted time point within the future preset prediction time window, the moment when each component of the predicted energy value of each node reaches its maximum value within the future preset prediction time window is taken as the energy peak arrival time. Based on the spatial adjacency relationship between each node and the changing trend of the predicted energy value, directed energy transfer edges connecting each node are constructed to generate the dynamic evolution map of traffic conflict energy composed of nodes and directed energy transfer edges.
6. The method according to claim 5, characterized in that, The process of inputting the initial energy node feature tensor and the adjacency matrix into the graph structure propagation layer of the spatiotemporal graph neural network model, and performing energy feature propagation and aggregation between nodes through graph convolution operations of the graph structure propagation layer to simulate the diffusion process of conflict energy along spatial connection paths, generates an energy-propagated node feature tensor that integrates neighborhood spatial context information, including: The initial energy node feature tensor is input into the feature linear transformation sublayer of the graph structure propagation layer, and the initial energy node feature tensor is transformed to generate a transformed node feature tensor that matches the internal processing dimension of the graph structure propagation layer. The adjacency matrix is used to determine the set of neighboring nodes for each target node. The set of neighboring nodes includes the target node itself and other nodes that have a direct spatial adjacency relationship with the target node. The feature vectors corresponding to each node in the neighborhood node set are extracted from the transformed node feature tensor. The mean aggregation operation is performed on the feature vectors corresponding to each node in the neighborhood node set to obtain the neighborhood aggregated feature vector that aggregates the information of the neighborhood node set. The feature vector corresponding to the target node is added and fused element by element with the neighborhood aggregated feature vector, and then passed through a nonlinear activation function to generate the energy propagation node feature corresponding to the target node. The above operation is performed on all target nodes, and the energy propagation node features corresponding to all target nodes are concatenated to generate the energy propagation node feature tensor.
7. The method according to claim 6, characterized in that, The step involves inputting the node feature tensor after energy propagation into the temporal recurrent layer of the spatiotemporal graph neural network model. Through the recurrent gating unit of the temporal recurrent layer, temporal dependency modeling is performed on the feature sequence corresponding to each node. This captures the natural decay or cumulative inertia of the internal conflict energy value of each node over time, generating a temporally enhanced node feature tensor containing temporal evolution patterns. This includes: For each node in the energy propagation node feature tensor, extract the energy propagation node features corresponding to each time point within the uninterrupted collaborative acquisition cycle, and arrange them into a node feature time sequence vector according to the chronological order. The node feature time-series vector sequence is sequentially input into the loop gating unit of the time-series loop layer. The loop gating unit includes an update gate and a reset gate. The update gate controls the proportion of the hidden state information from the previous moment that is retained in the current moment. The reset gate controls the degree to which the hidden state information from the previous moment is ignored. When the cyclic gating unit processes each time step of the node feature time-series vector sequence, it calculates the candidate hidden state of the current time step based on the feature vector input at the current time step, the hidden state at the previous time step, and the outputs of the update gate and the reset gate, and updates the final hidden state of the current time step. After the cyclic gating unit processes the last time step of the node feature temporal vector sequence, the final hidden state output by the last time step is extracted as the temporal evolution mode encoding vector corresponding to the node. The temporal evolution pattern encoding vector corresponding to the node is concatenated and fused with the node feature after energy propagation corresponding to the last time step to generate the temporal enhanced node feature corresponding to the node containing the temporal evolution law. The above operation is performed on all nodes, and the temporal enhanced node features corresponding to all nodes are concatenated to generate the temporal enhanced node feature tensor.
8. The method according to claim 5, characterized in that, The process of inputting the temporal augmentation node feature tensor into the evolutionary prediction decoding layer of the spatiotemporal graph neural network model, and using the fully connected mapping network of the evolutionary prediction decoding layer to predict the future state of the temporal augmentation node feature tensor, outputs the predicted energy value of each node at each prediction time point within a preset prediction time window, including: The temporal enhancement node feature tensor is input into the feature expansion sublayer of the evolutionary prediction decoding layer. The feature dimension of the temporal enhancement node feature tensor is expanded to an intermediate dimension that is proportional to the length of the future preset prediction time window through the linear transformation unit of the feature expansion sublayer, thereby generating the expanded feature tensor. The expanded feature tensor is input into the gated linear unit network of the evolution prediction decoding layer. The expanded feature tensor is subjected to feature filtering and nonlinear transformation through the dual-gating mechanism of the gated linear unit network. Effective features related to future energy prediction are retained, redundant features are suppressed, and a gated and filtered feature tensor is generated. The gated and filtered feature tensor is input into the residual convolution module of the evolution prediction decoding layer. The gated and filtered feature tensor is subjected to deep feature extraction through multiple stacked convolutional layers and residual connections of the residual convolution module to generate a deep evolution feature tensor. The deep evolutionary feature tensor is input into the temporal reshaping sublayer of the evolutionary prediction decoding layer. The deep evolutionary feature tensor is segmented and rearranged according to the number of time steps of the future preset prediction time window to generate a pre-output tensor with a clear temporal dimension structure. The dimensions of the pre-output tensor correspond to the number of nodes, the number of prediction time points, and the feature dimension. The pre-output tensor is input into the numerical mapping layer of the evolution prediction decoding layer. The feature vector corresponding to each prediction time point in the pre-output tensor is mapped into a two-dimensional prediction vector through the two-neuron fully connected network of the numerical mapping layer. The predicted energy value of each node is obtained at each prediction time point within the future preset prediction time window. The first component of the two-dimensional prediction vector corresponds to the future predicted value of the spatial distribution density, and the second component of the two-dimensional prediction vector corresponds to the future predicted value of the intensity of time fluctuation.
9. The method according to claim 1, characterized in that, The step of identifying potential source units of traffic conflict events occurring in the target road network region within the next preset time period, based on the topological connectivity of the energy evolution path network in the traffic conflict energy dynamic evolution map and the temporal sequence of predicted energy peak arrival times, includes: Analyze all nodes in the traffic conflict energy dynamic evolution map and their corresponding predicted energy peak arrival times. Sort all nodes in ascending order according to the weighted average of the first and second component peak arrival times in the predicted energy peak arrival times, and generate a node energy peak time sorting list. Nodes ranked within a preset number range in the node energy peak time sorting list are extracted as a candidate burst source unit set. The predicted arrival time of the energy peak of the nodes in the candidate burst source unit set is earlier than that of the vast majority of other nodes. Analyze the out-degree connection relationship of each node in the candidate burst source unit set in the energy evolution path network, count the number of directed edges pointing to other nodes for each candidate burst source unit, and select the candidate burst source unit with the most directed edges as the potential burst source unit. Starting from the potential eruption source unit, a breadth-first traversal is performed along the directed edge direction in the energy evolution path network, and the nodes passed during the traversal and their corresponding predicted energy peak arrival times are recorded in sequence. The nodes traversed during the traversal process are arranged in ascending order according to the weighted average of their predicted energy peak arrival times, generating a node sequence that propagates outward from the potential eruption source unit as the expected spillover unit sequence. The predicted energy peak arrival times of each node in the expected spillover unit sequence are used as the propagation arrival time sequence.
10. An early warning system, characterized in that, include: processor; And a memory, wherein the memory stores computer-readable code that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 9.