Edge computing traffic light emergency control method and device for sudden traffic events
Through edge computing and pre-training models combined with real-time traffic data, traffic light control parameters are dynamically generated, which solves the response delay and congestion spread of signal control in unexpected traffic events, and achieves rapid response and safety guarantees.
Patent Information
- Application Number
- CN202510354561.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-03-25
AI Technical Summary
Existing traffic signal control methods are difficult to quickly respond to abnormal traffic fluctuations in traffic emergencies, resulting in congestion spread, pedestrians and vehicles competing for right of passage and response delays. Decisions under the traditional centralized cloud computing architecture are limited by data transmission delays, making it difficult to provide real-time decision support for emergencies.
Real-time traffic flow information is obtained through edge computing, combined with vehicle density distribution data, pedestrian activity trajectory data and emergency location identification, and dynamic traffic light control parameters are generated using the pre-trained traffic signal adaptive model, dynamically adjust the execution priority of control instructions, and realize multi-dimensional data collaborative analysis and rapid response.
Accurate positioning and scope of impact identification of unexpected traffic events is achieved, the global perception of traffic flow is improved, the scientificity of signal control parameters and multi-objective optimization are ensured, and the control strategy is dynamically adjusted to quickly restore intersection traffic capacity and eliminate conflict risks.
Smart Images

Figure CN120220434B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of data processing and machine learning, and in particular to an edge computing traffic light emergency control method and device for sudden traffic events. Background Art
[0002] In the field of traffic signal control, existing technologies generally employ fixed timing schemes or adaptive control methods based on simple traffic flow detection. For example, some systems use geomagnetic sensors or cameras to measure the length of vehicle queues in a single lane and adjust the green light duration based on a preset threshold. Other systems rely on statistical patterns in historical traffic data to generate periodic signal timing schemes. However, during unexpected traffic events (such as accidents or road obstructions), these methods often struggle to effectively address abnormal fluctuations in traffic flow. Specifically, fixed timing schemes fail to detect localized traffic disruptions caused by emergencies, while adaptive control based on single-lane traffic data lacks multi-dimensional correlation analysis of pedestrian activity, sudden changes in vehicle density, and the impact range of the event. This can easily lead to the following problems: First, signal switching frequency and phase duration cannot match the vehicle evacuation needs in the emergency area, causing congestion to spread rapidly to adjacent intersections; second, the competition between pedestrian traffic demand and vehicle right of way intensifies, posing a safety hazard; and third, historical data-driven models struggle to capture dynamic traffic conditions in a timely manner, resulting in significant response delays. Furthermore, signal control decisions in traditional centralized cloud computing architectures are limited by data transmission delays, making it difficult to provide real-time decision support for emergency response to emergencies. Therefore, a traffic light emergency control method is urgently needed that can integrate multi-source traffic data, quickly identify the impact range of an event, and dynamically optimize signal control parameters to improve intersection efficiency and the safety of traffic participants during sudden traffic events. Summary of the Invention
[0003] The present invention provides an edge computing traffic light emergency control method and device for sudden traffic events.
[0004] According to one aspect of the present invention, a method for edge computing traffic light emergency control for sudden traffic events is provided, the method comprising:
[0005] Obtaining real-time traffic flow information at the target intersection, including vehicle density distribution data, pedestrian activity trajectory data, and location identifiers of sudden traffic events;
[0006] Based on the location identifier of the sudden traffic event, the emergency response area of the target intersection is determined, and the dynamic offset between the historical traffic flow characteristics and the current traffic flow characteristics in the emergency response area is extracted through the edge computing node;
[0007] Inputting the dynamic offset into a pre-trained traffic signal adaptive model to generate a set of traffic light control parameters corresponding to the emergency response area, the traffic light control parameter set including a phase switching frequency parameter, a green light duration parameter, and a directional traffic priority parameter;
[0008] According to the traffic light control parameter set, a control instruction sequence is sent to the traffic light at the target intersection, and based on the real-time change trend of the vehicle density distribution data and pedestrian activity trajectory data, the execution priority of the control instruction sequence is dynamically adjusted.
[0009] According to another aspect of the present invention, there is provided a control device comprising:
[0010] at least one processor;
[0011] and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method.
[0012] The present invention has at least the following beneficial effects:
[0013] The edge computing traffic light emergency control method for traffic emergencies provided by the present invention can comprehensively capture the traffic state changes at the target intersection and accurately locate the direct impact range of the emergency by obtaining vehicle density distribution data, pedestrian activity trajectory data and location identification of the emergency in the real-time traffic flow information of the target intersection; based on the dynamic offset extraction of historical traffic flow characteristics and current traffic flow characteristics, it effectively quantifies the real-time impact of the emergency, and quickly generates a response strategy in combination with the local processing capability of the edge computing node; through the pre-trained traffic signal adaptive model, the dynamic offset is converted into a set of phase switching frequency parameters, green light duration parameters and directional traffic priority parameters to ensure the scientific nature and multi-objective optimization capabilities of the signal control parameters; according to the real-time change trend of vehicle density and pedestrian trajectory, the execution priority of the control instruction is dynamically adjusted, so that the traffic light control can adapt to the dynamic evolution characteristics of the emergency. In this way, vehicle density distribution data can reflect the occupancy of road resources, pedestrian activity trajectory data can capture pedestrian traffic needs, emergency location identification can clarify the core area of emergency response, and collaborative analysis of multi-dimensional data can enhance the global perception of traffic conditions; dynamic offset calculation of historical and current traffic characteristics can identify abnormal traffic flow fluctuation patterns caused by emergencies, providing key input for model decision-making; traffic signal adaptive models map complex traffic states into executable signal control instructions through parameterized control strategies, taking into account both vehicle traffic efficiency and pedestrian safety; dynamic priority adjustment mechanisms ensure the flexibility and timeliness of control strategies through real-time feedback on changes in vehicle and pedestrian flow trends, thereby achieving rapid recovery of intersection traffic capacity and effective mitigation of conflict risks in sudden traffic events.
[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.
[0016] Figure 1 A schematic diagram of an application scenario of an edge computing traffic light emergency control method for sudden traffic events according to an embodiment of the present invention is shown.
[0017] Figure 2A flowchart of an edge computing traffic light emergency control method for sudden traffic events according to an embodiment of the present invention is shown.
[0018] Figure 3 A schematic diagram of the composition of a control device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0019] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, and various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] Figure 1 A schematic diagram of an application scenario provided according to an embodiment of the present invention is shown. The application scenario includes one or more traffic sensing devices 101, a control device 120, and one or more communication networks 110 coupling the one or more traffic sensing devices 101 to the control device 120. The traffic sensing device 101 can be configured to execute one or more applications.
[0021] exist Figure 1 In the configuration shown, the control device 120 may include one or more components that implement the functions performed by the control device 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. A user operating the traffic sensing device 101 may in turn utilize one or more applications to interact with the control device 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the application scenario. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0022] The traffic sensing device 101 may be various types of sensors or a combination thereof, such as millimeter wave radar, ground coil sensor, image sensor, infrared sensor, thermal imager, temperature sensor, etc.
[0023] The control device 120 may include one or more general-purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. The control device 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, the control device 120 may run one or more services or software applications that provide the functionality described below.
[0024] The application scenario of the present invention may also include one or more databases 130. In some embodiments, these databases can be used to store data and other information. For example, one or more of the databases 130 can be used to store information such as real-time traffic flow information and historical traffic flow characteristics. The database 130 can reside in various locations. For example, the database used by the control device 120 can be local to the control device 120, or can be remote from the control device 120 and can communicate with the control device 120 via a network-based or dedicated connection. The database 130 can be of different types. In some embodiments, the database used by the control device 120 can be, for example, a relational database. One or more of these databases can store, update, and retrieve data to and from the database in response to commands.
[0025] Please refer to Figure 2 , is a flow chart of an edge computing traffic light emergency control method for sudden traffic events provided by an embodiment of the present invention, comprising the following steps S100 to S400:
[0026] Step S100: Acquire real-time traffic flow information of a target intersection, wherein the real-time traffic flow information includes vehicle density distribution data, pedestrian activity trajectory data, and location identifiers of sudden traffic events.
[0027] Specifically, real-time traffic flow information refers to a collection of traffic status data collected in real time by sensor networks, cameras, and onboard communication units deployed at target intersections. Vehicle density distribution data specifically represents the number of vehicles in each lane per unit time, their vehicle type classification, and their concentration in different areas of the intersection. For example, by using geomagnetic sensors to detect the dwell time and movement speed of vehicles in the lanes, combined with traffic images captured by cameras, it was calculated that 12 small passenger cars and 3 large trucks pass through the north-south main lane every minute, and that congestion in the west right-turn lane has led to a queue length of 80 meters. Pedestrian activity trajectory data, using thermal imaging cameras and pedestrian re-identification algorithms, tracks the spatiotemporal distribution of pedestrian crossing behavior. For example, at the southeast corner crosswalk, 25 pedestrians were detected moving from east to west every minute at an average speed of 1.2 meters per second, while pedestrians were stranded on the northwest safety island. The location of a traffic emergency is coordinate information generated through multi-source data fusion technology. When the traffic accident detection system identifies abnormal parking behavior or airbag triggering signals, it combines the on-board GPS data with the timestamp of the roadside unit to determine the precise geographic coordinates of the incident. For example, the latitude and longitude of (116.403°E, 39.914°N) is marked as the location of a three-vehicle rear-end collision and mapped to the three-dimensional spatial model of the intersection through the digital twin model. The implementation of this step relies on the edge computing gateway to perform millisecond-level preprocessing of the raw data, including noise filtering, data alignment, and format standardization, to ensure that the subsequent analysis module obtains a high-confidence input data source.
[0028] As an implementation manner, the location identifier of the traffic emergency may be obtained by the following steps:
[0029] Step S110: receiving real-time video stream data uploaded by the monitoring device at the target intersection, and performing moving target detection on each frame of the real-time video stream data.
[0030] Among them, the real-time video stream data is sourced from high-definition network cameras deployed on the four-way poles at the target intersection. For example, it transmits a H.264 encoded video stream with a resolution of 1920×1080 at a rate of 25 frames per second. The moving target detection can adopt an improved YOLOv5 algorithm to achieve real-time processing on the edge computing node. For example, in the video frame at the T-th second, three moving targets are detected on the north-south lane: a white sedan with the license plate number沪A12345 (bounding box coordinates [450,320,580,400]), an unlicensed new energy logistics vehicle (bounding box coordinates [620,280,750,380]), and a group of pedestrians at the southeast crosswalk (bounding box coordinates [200,600,300,720]). The detection process synchronously outputs the class confidence of the moving targets. For example, the average confidence of the vehicle targets reaches 98.7%, and the detection confidence of the pedestrian group is 94.2%. The detection results are stored in a structured data format, including timestamp, target ID, coordinate information, and predicted motion vector.
[0031] Step S120: Extract the position change sequence of the detected moving targets and calculate the position offset between adjacent frames of the moving targets.
[0032] Exemplarily, the position change sequence can be generated by a target tracking algorithm. For example, Kalman filter tracking is implemented on the white sedan, and the centroid coordinate sequence of five consecutive frames is (512,360)→(515,362)→(518,365)→(522,368)→(525,370). The Euclidean distance offsets between adjacent frames are calculated to be 3.6 pixels, 4.2 pixels, 4.5 pixels, and 3.6 pixels respectively. The position offset, for example, can be calculated by introducing perspective transformation correction. According to the camera calibration parameters, the pixel offset is converted into the actual physical displacement. For example, it is detected that the displacement of the new energy logistics vehicle between frames at the (T + 0.4)-th second reaches 12 pixels, and the corresponding actual displacement is 4.8 meters after coordinate system conversion. The abnormal displacement threshold is set considering the road speed limit and object type. For example, the reasonable displacement threshold for a car in a congested section is 0 - 3 meters per second. When it is detected that a certain target's displacement reaches 5.2 meters per second for three consecutive frames, an alarm is triggered.
[0033] Step S130: If the position offset continuously exceeds the preset abnormal displacement threshold, it is determined that the area where the moving target is located is a suspected sudden traffic event area.
[0034] Exemplarily, the preset abnormal displacement threshold can adopt a dynamic adjustment mechanism. For example, in rainy and foggy weather conditions, the vehicle threshold is lowered to 3.5 meters per second, and the pedestrian threshold is set to 1.8 meters per second. When a white car is detected to have three excessive displacements (4.8 meters, 5.1 meters, and 5.3 meters) within 0.8 seconds, the system automatically demarcates an area with a radius of 15 meters centered on the car as a suspected area, and the geographic coordinate range is marked as X: 450-580, Y: 300-420. The judgment process implements multi-source verification. For example, the sonar sensor data in the area is analyzed synchronously. When an abnormal sound of 106 decibels is detected, the suspected level is raised to level one.
[0035] Step S140: Sending a high-resolution snapshot instruction to the monitoring device through the edge computing node to obtain multi-angle detailed images of the suspected sudden traffic incident area.
[0036] The high-resolution snapshot command can trigger the camera to switch to 3840×2160 resolution mode, taking three consecutive shots of the suspected area at a rate of 60 frames per second, while activating the collaborative shooting mechanism of adjacent poles. For example, the main camera obtains the front-view image (azimuth angle 0°), auxiliary camera 1 captures the 45° side view image, and auxiliary camera 2 captures the top-view image. The multi-angle images are aligned through the time synchronization protocol. For example, at 18:15:23.455, the three-view images are captured synchronously to form a stereo observation data set. The image enhancement algorithm automatically adjusts the exposure parameters. For example, in a backlit scene, the gain value is increased to 18dB to ensure that the details of the scattered objects are clearly visible.
[0037] Step s150: classifying the event type of the multi-angle detail image. If the classification result is a vehicle collision or a road obstacle, the suspected traffic emergency area is marked as the location identifier of the traffic emergency.
[0038] For example, the event type classification model can employ a multimodal fusion architecture. For example, the front view image is fed into a ResNet-50 network to extract global features, the side view image is segmented using the Point Rend algorithm, and the top view image is used to measure the area of debris distribution. The classification process implements cross-view feature alignment. For example, if front bumper debris is identified in the front view (with a 92% confidence level), the scattered area is measured to be 3.2 square meters in the top view, and the side view shows an 8.7-meter-long skid mark from an adjacent vehicle, the combined result is a vehicle collision. When the classification confidence exceeds 85%, a geofence with a radius of 20 meters is generated based on the geometric center point of the suspected area (X: 515, Y: 370) as a location marker. After coordinate system conversion, it corresponds to the WGS84 longitude and latitude (121.4732°E, 31.2315°N), with an accuracy error within ±0.3 meters.
[0039] As an implementation manner, the above step s150 of classifying the event type of the multi-angle detail image may specifically include:
[0040] Step s151: inputting the multi-angle detail image into a pre-trained event classification model to extract key object contour features and scene context features in the image.
[0041] Exemplarily, the pre-trained event classification model can be improved based on the EfficientNet-B7 architecture, and its multi-scale feature pyramid can simultaneously process inputs of different resolutions. The key object contour features are extracted through the deformable convolution layer. For example, the radially distributed outlines of glass fragments are identified in the front view, and the feature vector dimension is 1024 dimensions. The scene context features are captured by the spatial attention module. For example, indirect evidence such as the long-on state of the brake lights of adjacent vehicles (lasting more than 0.8 seconds) and the irregular shaking pattern of street trees are detected. The feature fusion layer splices the contour features of the front view with the topological features of the top view to form a 2560-dimensional joint feature vector, which is input into the classification decision layer.
[0042] Step S152: Identify visual patterns of scattered vehicle parts, road cracks, or fallen pedestrians based on the key object contour features.
[0043] For example, the identification of scattered vehicle parts can be achieved using a component-level segmentation network. For example, 16 irregular metal fragments were detected, of which 3 had brand logo features (confidence level 89%) and 5 showed high-temperature deformation characteristics. Road crack detection combined U-Net segmentation with Inception-v3 classification to identify a 2.3-meter-long and 0.15-meter-wide crack-like damage. The crack direction was at an angle of 32° to the vehicle's sliding trajectory. Pedestrian fall action recognition was achieved through a posture estimation model, which detected that the spatial distribution of key points on the human body conformed to the fall posture template (the height difference between the hip joint and the ankle joint was less than 30 cm) and was maintained for more than 5 seconds.
[0044] Step S153: Analyze the sudden change in speed of adjacent vehicles or the collective turning behavior of the pedestrian group in the direction of movement based on the scene context features.
[0045] For example, the dense optical flow method can be used to analyze the sudden change in the speed of adjacent vehicles. For example, it is detected that the speed of the rear vehicle drops from 36 km / h to 8 km / h in 0.4 seconds, and the deceleration reaches 7 m / s. 2, exceeding the normal braking threshold. Pedestrian collective turning behavior was identified using a trajectory clustering algorithm. For example, 83% of pedestrian trajectories east of the accident site were detected turning from due west to southwest within 10 seconds, with an average turning angle of 45°, forming a statistically significant group behavior pattern. A graph neural network was used to analyze the spatiotemporal correlation between contextual and target features, establishing a causal chain between factors such as debris distribution, vehicle displacement, and pedestrian turning.
[0046] Step S154: If the scattered vehicle parts are identified and there is a sudden change in speed, the event type is determined to be a vehicle collision.
[0047] For example, sufficient conditions for a vehicle collision include: the number of scattered objects ≥ 5 pieces, and the distribution area ≥ 2m 2 , while the average deceleration of adjacent vehicles is ≥ 4m / s 2 For example, 12 pieces of debris were detected in a fan-shaped distribution (area 3.8m 2 ), the decelerations of the three vehicles behind are 6.2m / s 2 , 5.8m / s 2 , 7.1m / s 2 The collision energy was estimated to be 82kJ, meeting the standard for a medium-sized collision. The judgment process implemented a multi-evidence chain verification. When video analysis showed the airbag deployment signal of the vehicle involved, the classification confidence level increased to 98%.
[0048] Step S155: If the road crack is identified and there is a collective turning behavior of the pedestrian group in the direction of movement, the event type is determined to be a road obstacle.
[0049] For example, the criteria for determining road obstacles include requiring crack width ≥ 5cm and a group turning ratio ≥ 60%. For example, a transverse crack with a width of 8cm and a depth of 12cm is detected, and 82% of pedestrian trajectories in the west-to-east direction experience an average path deviation of 38° at 5 meters from the obstacle, accompanied by a 23% decrease in cadence. The control device 120 verifies the municipal facilities database and immediately marks it as a sudden road obstacle event when no construction plan is registered in the area. The classification result triggers a work order in the road maintenance system, and the obstacle coordinate information is updated synchronously on the navigation map.
[0050] Step S200: Based on the location identifier of the sudden traffic event, the emergency response area of the target intersection is determined, and the dynamic offset between the historical traffic flow characteristics and the current traffic flow characteristics in the emergency response area is extracted through the edge computing node.
[0051] For example, the emergency response area is a dynamic impact range defined by integrating road topology, traffic control rules, and vehicle diffusion models, centered on the location of the traffic incident. For example, if a traffic accident occurs 50 meters north of an intersection, the emergency response area will encompass a 200-meter radius of the northbound through lane, the adjacent left-turn lane, and the associated crosswalk. Historical traffic flow characteristics refer to typical traffic patterns in the area during the same time period and weather conditions, stored in an edge database. These include parameters such as vehicle speed, pedestrian crossing frequency, and signal cycle times. For example, during the Friday evening rush hour, the average vehicle flow in the area is 45 vehicles per minute, with a peak pedestrian crossing rate of 60 per minute. Current traffic flow characteristics are real-time data captured by a real-time sensor network. For example, an accident caused a 300-meter congestion zone in the northbound lane, resulting in a surge in eastbound detours to 65 vehicles per minute. Dynamic offsets are calculated by comparing historical and current features. Dynamic time warping algorithms are used to quantify changes in traffic flow patterns. For example, northbound lane traffic decreased by 82% year-over-year, eastbound right-turn traffic increased by 140%, and three unplanned pedestrian detours were added. Edge computing nodes perform spatiotemporal correlation analysis during this process. For example, the standard deviation of vehicle speeds within a 50-meter radius around the accident site was increased from a historical value of 8 km / h to a current value of 32 km / h, serving as a quantitative indicator of traffic flow disruption.
[0052] As an embodiment, step S200, extracting the dynamic offset between the historical traffic flow characteristics and the current traffic flow characteristics within the emergency response area through the edge computing node, may specifically include:
[0053] Step S210: Retrieve historical traffic flow characteristics of the emergency response area within a preset time window from the local database of the edge computing node, wherein the historical traffic flow characteristics include historical average vehicle speed, historical pedestrian waiting time, and historical congestion index.
[0054] Historical traffic flow characteristics refer to a set of traffic status statistics persistently stored by edge computing nodes. They are derived from the aggregated analysis of sensor data collected at the target intersection over periodic periods. The preset time window is set based on the periodicity of traffic patterns. For example, for a traffic incident during the evening rush hour on a weekday, historical data from 5:00 PM to 7:00 PM daily for the past four weeks is retrieved for that area. Historical average vehicle speed is calculated using the difference in vehicle travel time captured by geomagnetic sensors and license plate recognition cameras. Specifically, it is the weighted average of vehicle movement rates in each lane during that period. For example, the historical average vehicle speed for north-south through lanes is 32 km / h, and for east-west left-turn lanes it is 18 km / h. Historical pedestrian waiting time is generated using data synchronized between pedestrian detection cameras and traffic light status. It represents the time interval from when a pedestrian triggers the request button to when they receive green light permission. For example, the historical pedestrian waiting time at the southeast crosswalk has a mean of 45 seconds and a standard deviation of 8 seconds. The historical congestion index incorporates multi-dimensional data such as lane occupancy, queue length, and number of stops, using a normalized scoring system of 0-10. For example, if a queue of more than 200 meters is detected on the north entrance for five consecutive minutes, its historical congestion index is assigned a score of 8.7. The local database uses time series compression storage technology to ensure millisecond-level response to query requests. For example, if a traffic accident occurs at 6:15 PM, the edge computing node immediately retrieves the historical feature data set for that coordinate point in the same minute-by-minute time slice (6:14:30 PM to 6:15:30 PM) over the past four weeks.
[0055] Step S220: performing time dimension alignment processing on the current traffic flow feature so that the timestamp of the current traffic flow feature is consistent with the time window range of the historical traffic flow feature.
[0056] Time dimension alignment involves matching real-time traffic flow data with the time granularity of historical data on the time axis to eliminate bias caused by inconsistent data sampling intervals. For example, historical traffic flow characteristics are stored as averages at a 5-minute granularity, while the raw data for current traffic flow characteristics is updated once per second. Therefore, the current data needs to be resampled to 5-minute interval statistics using a sliding window averaging method. During this process, if a traffic accident occurs at 18:15:03, the complete historical time window data from 18:10:00 to 18:15:00 is extracted and the current time slice is extended to 18:15:00 to 18:20:00 for alignment. For incomplete time slice data, linear interpolation is used to fill in missing values. For example, if only the first three minutes of data are collected for the 18:15:00 to 18:20:00 time slice, the value for the next two minutes is predicted based on the average vehicle speed trend during the first three minutes. Dynamic time warping algorithms are used to align unevenly sampled data. For example, this involves mapping discrete event timestamps of pedestrian wait times to a fixed time grid in historical data, ensuring a consistent number of samples within each statistical period. This alignment ensures that current and historical traffic flow characteristics have comparable time bases. For example, an accident triggering time of 18:15:03 is aligned to the start of the 18:15:00 time slice in the historical data.
[0057] Step S230: Calculate the speed difference coefficient between the historical average vehicle speed and the current average vehicle speed, and the waiting time difference coefficient between the historical pedestrian waiting time and the current pedestrian waiting time.
[0058] The speed variance coefficient reflects traffic flow congestion by quantifying the degree of deviation between the historical baseline and the real-time state. It is calculated, for example, as the Euclidean distance between the historical average vehicle speed and the current average vehicle speed divided by the historical standard deviation. For example, if the historical average vehicle speed is 32 km / h with a standard deviation of 4.5 km / h, and the current average vehicle speed drops sharply to 9 km / h, the speed variance coefficient is |32 - 9| / 4.5 ≈ 5.11, indicating severe abnormal congestion in that lane. The waiting time variance coefficient uses a relative difference percentage algorithm, calculated, for example, as (current pedestrian waiting time - historical pedestrian waiting time) / historical pedestrian waiting time × 100%. For example, if the historical pedestrian waiting time is 45 seconds and is currently extended to 120 seconds due to traffic control, the waiting time variance coefficient is (120 - 45) / 45 × 100% ≈ 166.7%, indicating a significant decrease in pedestrian traffic efficiency. During this process, edge computing nodes simultaneously calculate the speed variance matrix for each lane. For example, the speed variance coefficient for east-west through lanes is 2.3, for left-turn lanes it is 5.1, and for pedestrians waiting it is 82%, forming a multi-dimensional map of traffic state changes. The variance coefficient calculation results are filtered through thresholds. For example, a speed variance coefficient exceeding 3.0 triggers a level 2 alert, while exceeding 5.0 activates the emergency response protocol.
[0059] Step S240: Based on the speed difference coefficient and the waiting time difference coefficient, a multidimensional feature vector of the dynamic offset is constructed, and the multidimensional feature vector is scaled and unified through the normalization layer of the edge computing node to obtain a normalized multidimensional feature vector, which is used to characterize the dynamic offset.
[0060] A multidimensional feature vector is a data structure that maps coefficients of variation from different dimensions into a unified mathematical space. For example, a speed variation coefficient of 5.11, a wait time variation coefficient of 166.7%, and a congestion index change of 8.2 are combined into a three-dimensional vector [5.11, 1.667, 8.2]. The normalization layer uses a min-max scaling algorithm to linearly transform each dimension of data to the interval [0, 1]. For example, if the speed variation coefficient is set to a maximum threshold of 10, 5.11 is converted to 0.511; the wait time variation coefficient is capped at 200%, 1.667 is converted to 0.833; and the congestion index is simply divided by 10 to obtain 0.82. The resulting normalized multidimensional feature vector is [0.511, 0.833, 0.82]. Its geometric modulus reflects the degree of overall traffic state deviation, and the vector direction identifies the primary influencing dimension. For example, edge computing nodes can achieve pattern matching by calculating feature vector similarity. For example, when the cosine similarity between the current feature vector and the feature vector in the historical accident database exceeds 0.95, it is determined to be a similar event and the preset treatment plan is loaded. Normalization processing eliminates the interference of dimensional differences on model input, ensuring that the subsequent traffic signal adaptive model can accurately analyze the weight relationship between each dimension. For example, in the vector [0.511, 0.833, 0.82], the waiting time difference coefficient accounts for the largest proportion, and the model will prioritize adjusting the pedestrian phase control parameters.
[0061] Step S300: Input the dynamic offset into a pre-trained traffic signal adaptive model to generate a set of traffic light control parameters corresponding to the emergency response area, wherein the set of traffic light control parameters includes a phase switching frequency parameter, a green light duration parameter, and a directional traffic priority parameter.
[0062] For example, the pre-trained traffic signal adaptation model is a multi-objective optimization system built on a deep reinforcement learning framework. It can be trained through a large number of intersection state simulations in a simulation environment. The dynamic offset data received by the model is converted into a 128-dimensional tensor through a feature encoding layer and then fed into a neural network containing long-short-term memory units for spatiotemporal feature extraction. The phase switching frequency parameter is calculated based on the dynamic distribution of traffic pressure. For example, the east-west through-the-line phase is adjusted from a fixed 120-second cycle to a rapid 90-second rotation, while the phase duration of the damaged north-south lane is compressed to 30 seconds. The green light duration parameter is jointly optimized using a congestion propagation model and queuing theory. For example, to divert eastbound traffic, the left-turn green light is extended from 40 seconds to 65 seconds, with a minimum safe passage time of 15 seconds. The directional traffic priority parameter is dynamically adjusted based on emergency rescue needs. When an ambulance RFID signal is detected, the traffic weight coefficient for the relevant direction is forcibly increased to the highest level, the current phase is interrupted, and a dedicated green channel is activated. The model's output layer uses a Softmax function to generate a multi-dimensional parameter combination, and a constraint satisfaction module ensures that the parameter set complies with road traffic safety regulations. For example, the yellow light time between adjacent phases is always no less than 3 seconds, and the minimum guaranteed cycle for pedestrians crossing the street does not exceed two signal cycles.
[0063] As an embodiment, step S300, inputting the dynamic offset into a pre-trained traffic signal adaptive model to generate a set of traffic signal control parameters corresponding to the emergency response area, may specifically include:
[0064] Step S310: calling the feature fusion layer of the traffic signal adaptive model, performing spatial correlation coding on the dynamic offset and the location identifier of the sudden traffic event, and generating an event perception feature map.
[0065] The feature fusion layer is the network component responsible for spatially integrating multi-source data in the traffic signal adaptation model. For example, it achieves a deep binding of traffic state features and geographic location through geometric topological mapping and an attention mechanism. The location identifier of a traffic emergency is input as latitude and longitude coordinates. For example, the accident point is located in the target intersection coordinate system (120.35°E, 31.78°N). This coordinate system establishes a plane rectangular coordinate system with the intersection center as the origin, with the east-west X-axis and the north-south Y-axis. The normalized multidimensional feature vector carried by the dynamic offset is input into the spatial association encoding module along with the location identifier. Each dimension of the dynamic offset is mapped to a corresponding geographic spatial unit. For example, when the emergency response area is divided into a 10m x 10m grid, grid unit G23 (coordinate range X: 50-60m, Y: 30-40m) corresponding to the speed difference coefficient of 0.511 in the dynamic offset is marked as the core area affected by the incident. For example, the event-aware feature map stores the event impact intensity at each spatial unit using a three-dimensional tensor data structure. For example, the eigenvalue generated at grid cell G23 is 0.87, while the eigenvalue at adjacent grid cell G24 decays to 0.52, reflecting the propagation pattern of the accident's impact decreasing with distance. The feature map also encodes directional dependence. For example, the propagation coefficient for the northbound lane at the accident site is 30% higher than that for the southbound lane, reflecting the asymmetry of the direction of traffic flow obstruction.
[0066] As an implementation manner, step S310 of spatially associating and encoding the dynamic offset with the location identifier of the traffic emergency to generate an event perception feature map may specifically include:
[0067] Step S311: converting the location identifier of the traffic emergency into a spatial coordinate grid in the target intersection coordinate system, wherein the division granularity of the spatial coordinate grid is positively correlated with the lane distribution density of the emergency response area.
[0068] For example, the construction of the spatial coordinate grid is based on the lane detection results and the digital elevation model. For example, a high-precision grid of 1 meter × 1 meter is used in the core area with a lane density of 3 lanes per 10 meters, while a coarse-grained grid of 5 meter × 5 meter is used in the auxiliary road area with a density of 1 lane per 10 meters. The location of the sudden traffic incident is mapped to the grid system through a coordinate transformation matrix. For example, the GPS coordinates of the accident point (116.403°E, 39.914°N) are located on the grid G1015 (X: 150-151m, Y: 15-16m) after projection transformation. The grid division algorithm is dynamically adjusted according to the lane topology. For example, a polar coordinate system grid is used at the roundabout, with each sector area corresponding to an angular resolution of 10 degrees and a radial resolution of 2 meters. This process preserves the road geometry. For example, the grid cells of the bus lane are marked as special types and the weight allocation for ordinary vehicles is prohibited.
[0069] Step S312: Based on the coverage of historical traffic flow characteristics corresponding to each grid unit in the spatial coordinate grid and the dynamic offset, the dynamic offset is spatially weighted according to the grid unit to generate a dynamic offset distribution map.
[0070] Exemplarily, the spatial weighting of dynamic offsets can be assigned using an inverse distance weighted interpolation algorithm. For example, the initial weight of grid G1015, where the accident point is located, is 1.0, and the weights of adjacent grids decay inversely proportional to the square of the distance. Grid G1016 (distance 1 meter) has a weight of 0.8, and G1115 (distance 1.41 meters) has a weight of 0.5. The coverage of historical traffic flow characteristics is determined by kernel density estimation. For example, the historical traffic flow influence radius of the northbound through lane is calculated to be 50 meters. In this case, the dynamic offsets of all grid cells within this range need to be superimposed with a lane characteristic correction factor of 0.6. The dynamic offset distribution map stores the composite offset values of each grid cell in matrix form. For example, the normalized multidimensional feature vector [0.511, 0.833, 0.82] of grid G1015 is converted to [0.511×1.0, 0.833×0.9, 0.82×0.8] after spatial weighting, reflecting the attenuation effect of geographic location on each offset. The distribution graph also records the time decay factor. For example, the weight of the offset in the 5th minute after the accident is automatically reduced to 70% of the initial value.
[0071] Step S313: performing multi-scale spatial convolution processing on the offset data in each grid cell in the dynamic offset distribution map, extracting the radiation impact characteristics of the sudden traffic event on adjacent lanes, and superimposing the geometric constraints of the spatial coordinate grid.
[0072] For example, multi-scale spatial convolution employs parallel processing using three convolution kernels: 3×3, 5×5, and 7×7. For example, a 3×3 convolution kernel extracts local lane-to-lane impact features, capturing a 23% decrease in northbound traffic speed within a 10-meter radius of the accident site. A 5×5 convolution kernel identifies regional propagation patterns, revealing a pressure increase in the eastbound detour lane with a radius of up to 50 meters. A 7×7 convolution kernel reveals global network-wide chain reactions, detecting an abnormal 10% fluctuation in traffic flow at an intersection 1 kilometer away. Geometric constraints are implemented using road topology masks. For example, a radiation impact coefficient cap of 0.3 is enforced on sidewalk grid cells to prevent vehicle congestion features from erroneously propagating to pedestrian control areas. The convolutional feature map preserves road connectivity information, for example, limiting impact propagation along the lanes and prohibiting ineffective diffusion across the median.
[0073] Step S314: Based on the superposition result of the radiation impact feature and the geometric constraint condition, an initial spatial correlation feature map is generated, and the initial spatial correlation feature map is input into the bidirectional attention mechanism layer for cross-region dependency modeling.
[0074] For example, the initial spatial correlation feature map integrates radiation intensity and road structure information. For example, in the grid cell of the northbound through lane, the convolution output value of 0.75 is multiplied by the lane connectivity coefficient of 0.9 to obtain a final eigenvalue of 0.675. The bidirectional attention mechanism layer includes a direction perception module and a regional association module: the direction perception module calculates the attention weight of each grid cell in the east-west and north-south axes. For example, the attention score of the grid on the east side of the accident site in the east-west direction is 0.92, which is significantly higher than the 0.35 on the west side; the regional association module establishes a cross-lane influence transmission path. For example, it identifies that the correlation coefficient of the pressure of the eastbound detour traffic flow is transmitted to the southbound branch road through the auxiliary road with a value of 0.68. The attention weight matrix is normalized by the softmax function to ensure the additivity of the influence coefficients in each direction.
[0075] Step S315: In the bidirectional attention mechanism layer, the direction-sensitive correlation between each grid unit in the initial spatial correlation feature map and the sudden traffic event location identifier is calculated, and an event perception feature map containing the event impact propagation path is generated through adaptive weighted fusion.
[0076] Exemplarily, the direction-sensitive correlation is calculated using the direction cosine similarity algorithm. For example, the direction of the line connecting the grid unit G2015 and the accident point G1015 is 30 degrees east of south, and the cosine value of the angle between it and the north reference direction is 0.866. This value is used as a directional attenuation factor in the correlation calculation. Adaptive weighted fusion dynamically adjusts the weights of each propagation path according to the real-time traffic status. For example, during the morning rush hour, the propagation weight of the main commuting direction (north to south) is increased to 1.2, and the non-main direction is reduced to 0.8. The event impact propagation path is visualized through the heat map gradient. For example, the impact intensity of the accident point in the north direction drops to 0.4 at 50 meters, and the east direction still maintains an impact value of 0.6 at 100 meters due to the detour requirement. The final event perception feature map stores the comprehensive features of each grid unit in the three dimensions of space, direction, and intensity in the form of a three-dimensional tensor.
[0077] Step s316: Mark the grid cells in the event perception feature map whose correlation exceeds a preset threshold as high-priority control areas, and map the boundary coordinates of the high-priority control areas to the directional traffic priority parameters in the traffic light control parameter set.
[0078] Exemplarily, the preset threshold is dynamically set based on the road grade. For example, in an urban expressway scenario, the correlation threshold is set to 0.7, and for branches to 0.5. When the correlation of grid cell G1015 reaches 0.87, the lane in which it is located and the adjacent 50-meter area are designated as a high-priority control area. The boundary coordinates are extracted using a convex hull algorithm. For example, the coordinates of grid cells with a correlation ≥ 0.7 are input into the Graham scan algorithm to generate a minimum enclosing polygon vertex sequence. The directional traffic priority parameters are set based on the lane directions covered by the area. For example, when the high-priority control area includes the east-south left-turn lane and the north-bound through lane, the directional traffic priority parameters are set to Level 3 and Level 2, respectively. The parameter mapping process preserves geometric topological relationships. For example, the high-priority control area in the roundabout area is partitioned by polar angles, with each sector corresponding to a specific phase priority number. In the final generated traffic light control parameter set, the directional traffic priority parameters carry geofence information to ensure that signal control is accurately matched to the physical road structure.
[0079] Step S320: Predicting the vehicle arrival rate change curve and the pedestrian gathering density change curve of the emergency response area within a future time interval based on the event perception feature map through the time series prediction layer of the traffic signal adaptive model.
[0080] For example, the time series prediction layer can employ a gated recurrent unit network architecture, with input being the time-evolving sequence of the event-aware feature map and output being a traffic state prediction for the next five minutes. The vehicle arrival rate curve is generated by analyzing the cumulative vehicle rate for each grid cell in the event-aware feature map. For example, the vehicle arrival rate within 200 meters north of the accident site is predicted to increase linearly from the current 12 vehicles per minute to 28 vehicles per minute over the next 10 minutes, while the arrival rate in the eastbound detour lane exhibits a nonlinear trend, initially peaking at 35 vehicles before falling back to 22 vehicles. The pedestrian density curve is calculated based on a heat map diffusion model. For example, the current pedestrian density on the sidewalk west of the accident site is 0.8 people per square meter, but is predicted to increase to 1.2 people per square meter in the next five minutes due to pedestrian detours. Exceeding the safety threshold triggers an evacuation warning. The prediction process utilizes multimodal data fusion techniques, for example, using the pedestrian growth rate during the evening rush hour in historical data for the same period as a benchmark, and adding a weight of 1.3 times the current event impact coefficient to modify the slope parameter of the prediction curve. The output results of the time series prediction layer are annotated with confidence intervals to indicate their reliability. For example, the 95% confidence interval of the vehicle arrival rate prediction value is ±3 vehicles / minute. When the interval width exceeds the preset threshold, the manual review mechanism is activated.
[0081] As an embodiment, the step S320, predicting a vehicle arrival rate change curve and a pedestrian gathering density change curve of the emergency response area within a future time interval based on the event perception feature map, may specifically include:
[0082] Step S321: Divide the event perception feature map into a continuous feature map time series according to the time dimension, and extract the spatial influence intensity distribution corresponding to each time slice in the feature map time series.
[0083] A feature map time series is a four-dimensional data structure formed by slicing a three-dimensional event perception feature map along the time axis. Its temporal resolution matches the decision cycle of the traffic signal control system. For example, for the predicted demand for the next 15 minutes, the event perception feature map is divided into 30 time slices at 30-second intervals, with each time slice storing the three-dimensional feature value of each grid cell at that moment. The spatial impact intensity distribution is generated by aggregating the feature values of each grid cell in the feature map time series. For example, at time slice T5 (150 seconds after the accident), the radiation impact feature value of grid cell G1015 is 0.87, and the geometric constraint coefficient is 0.9. The superposition calculation results in a spatial impact intensity value of 0.783 for this cell. This distribution is visualized using a two-dimensional matrix. For example, within the X-axis of 100-150m and the Y-axis of 0-50m, a red high-impact area (intensity value ≥ 0.7) and a yellow medium-impact area (intensity value 0.4 ≤ < 0.7) are marked, clearly showing that the accident's impact on the eastbound detour lane extended to 120 meters.
[0084] Step S322: Based on the spatial impact intensity distribution, identify the spatial overlapping areas of the main paths of the vehicle traffic direction and the pedestrian activity hot spots in the emergency response area, and generate a path-hot spot coupling feature vector.
[0085] For example, the main path can be determined through vehicle trajectory cluster analysis. For example, the east-west straight lane forms a dense traffic belt with a width of up to 3 lanes due to the need for detours, and its path centerline is composed of continuous grid cells G2015-G2018-G2021. Pedestrian activity hotspots are identified using a kernel density estimation algorithm. For example, the northwest side crosswalk forms an elliptical hotspot with a diameter of 15 meters during the evening rush hour, with a density peak of 1.5 people / square meter. Spatial overlapping area detection is achieved through geo-fence intersection operations. For example, the intersection area of the main path G2015-G2021 and the pedestrian hotspot HZ03 is grid cells G2017-G2019, which is marked as a high-risk area for conflict. The path-hotspot coupling eigenvector is composed of three dimensions: path pressure index, hotspot density index, and overlapping area ratio. For example, when the main path pressure index is 0.82, the hotspot density index is 1.3, and the overlapping ratio is 35%, the eigenvector [0.82, 1.3, 0.35] is generated to quantify the potential intensity of pedestrian-vehicle conflict.
[0086] Step S323: Retrieve historical event data similar to the path-hotspot coupling feature vector from the historical database of the edge computing node, and extract association rules between the vehicle arrival rate fluctuation pattern and the pedestrian density growth pattern in the historical events.
[0087] For example, historical event similarity matching can use the cosine similarity algorithm. For example, the current feature vector [0.82, 1.3, 0.35] has a similarity of 0.98 with the feature vector [0.79, 1.28, 0.33] of the historical record E029, indicating that they are similar events. Association rule mining is implemented using the Apriori algorithm. For example, it was found that when the third dimension (overlap ratio) of the path-hotspot coupling feature vector exceeds 30%, the probability of the vehicle arrival rate fluctuating, first increasing and then decreasing, within the subsequent 10 minutes is 87%, and the probability of pedestrian density showing a step-by-step increase is 73%. Historical event data carries a time-stamped sequence of traffic parameter changes. For example, in the similar event E029, the vehicle arrival rate peaked at 48 vehicles / minute in the fifth minute after the accident, and the pedestrian density exceeded the safety threshold of 1.2 people / square meter in the eighth minute.
[0088] Step S324: performing spatiotemporal alignment on the association rules and the spatial influence intensity distribution of the current event perception feature map, and constructing a spatiotemporal fusion feature including vehicle motion inertia and pedestrian group behavior tendency.
[0089] For example, the spatiotemporal alignment process can employ a dynamic time warping algorithm. For example, the time axis of the vehicle arrival rate curve for historical event E029 is compressed by 15% to accommodate the earlier peak period of the current event. Vehicle inertia characteristics are calculated using the standard deviation of acceleration in historical data. For example, the average deceleration of eastbound vehicles to avoid the accident site is 40%, and this feature is encoded as an inertia coefficient of 0.6. Pedestrian group behavior trends are obtained through smartphone signaling data mining. For example, a 20% increase in pedestrian traffic at a subway station exit 500 meters west of the accident site can be inferred to increase the probability of pedestrians choosing a detour route to 65%. The spatiotemporal fusion features ultimately form a multidimensional tensor structure. For example, in time slice T10, the eastbound lane inertia coefficient of 0.6, the pedestrian detour probability of 0.65, and the real-time spatial impact intensity of 0.78 are fused to form the feature unit [0.6, 0.65, 0.78].
[0090] Step S325: calling the pre-trained time series prediction model, taking the spatiotemporal fusion features as input, and predicting the gradient change direction of the vehicle arrival rate increment ratio and pedestrian gathering density of each lane in the future time interval step by time.
[0091] For example, the time series prediction model can employ a long short-term memory network architecture with an attention mechanism, whose input layer expands the spatiotemporal fusion feature tensor into a sequence of time steps. The incremental proportion of vehicle arrival rate is calculated as the relative rate of change in the number of vehicles in adjacent time slices. For example, the arrival rate of the eastbound through lane is predicted to increase from 28 vehicles / minute to 32 vehicles / minute between time slices T5 and T6, an incremental proportion of 14.3%. The direction of change in pedestrian density gradient is derived using a thermodynamic diffusion model. For example, after the density of the northwest hot zone reaches 1.2 people / square meter in time slice T8, the gradient direction vector points southeast, indicating that pedestrians are beginning to disperse toward the auxiliary road. The prediction process performs multiple rounds of Monte Carlo simulations. For example, 100 sample predictions are made for the arrival rate of the eastbound lane, with a 90% confidence interval of 29-35 vehicles / minute to ensure the robustness of the results.
[0092] Step S326: Generate a vehicle arrival rate change curve at consecutive time points based on the vehicle arrival rate increment ratio, and fit the pedestrian gathering density change curve based on the gradient change direction, and mark the intersection time point of the two curves as a phase switching trigger signal.
[0093] For example, the vehicle arrival rate curve can be smoothed using cubic spline interpolation. For example, the discrete predicted values of 28 vehicles at T5, 32 vehicles at T6, and 37 vehicles at T7 are connected into a continuous curve, and the interpolated value at time T6.5 is 34 vehicles / minute. The pedestrian density curve is generated by integrating the gradient direction field. For example, at time T8, the southeast gradient causes the density to decrease by 0.1 people / square meter every 30 seconds, resulting in an exponential decay curve. Crossover time points are detected using a numerical approximation algorithm. For example, when the vehicle arrival rate curve reaches 35 vehicles / minute at time T7.2 and the pedestrian density curve simultaneously drops to 1.0 people / square meter, this is determined to be a demand balance point, and a phase switching trigger signal, SIG 07, is generated. This signal carries a timestamp and location code, for example, labeled "2023-09-15T17:23:45@G2017," to ensure the temporal and spatial accuracy of control instructions.
[0094] Step S330: Determine the initial value of the phase switching frequency parameter according to the intersection of the vehicle arrival rate change curve and the pedestrian gathering density change curve.
[0095] Exemplarily, the calculation of the initial value of the phase switching frequency parameter is based on the principle of traffic pressure equilibrium. When the vehicle arrival rate curve and the pedestrian density curve intersect on the time axis, it indicates that the vehicle traffic demand and pedestrian crossing demand have reached a critical equilibrium at that moment. For example, the forecast shows that eight minutes after the accident, the vehicle arrival rate in the eastbound left-turn lane will rise to 32 vehicles / minute, while the pedestrian density on the northwest sidewalk will reach 1.1 people / square meter. At this time, the control device 120 determines that the east-west straight-through phase switching frequency needs to be adjusted from a fixed period of 90 seconds to a dynamic range of 60-120 seconds. The initial value generation algorithm uses differential equations to solve the optimal switching point. For example, an optimization model with delay minimization as the objective function is established, and the initial phase switching frequency value is calculated to be 78 seconds using the Lagrange multiplier method. This process takes into account multi-directional competition. For example, when the demand for north-south ambulance lanes surges, the mandatory insertion of a dedicated phase causes the baseline value of the east-west phase switching frequency to be lowered to 65 seconds. After the initial value is set, conflict detection is required. For example, it is necessary to verify whether the phase switching causes the green light time of adjacent intersections to overlap beyond the safety threshold. If a conflict is detected, the calculation is recalculated until the constraints are met.
[0096] As an embodiment, the step S330 of determining the initial value of the phase switching frequency parameter according to the intersection of the vehicle arrival rate change curve and the pedestrian gathering density change curve can be specifically implemented as follows:
[0097] Step S331: Detect the intersection of the vehicle arrival rate change curve and the pedestrian gathering density change curve on the time axis, and extract the vehicle arrival rate rising slope and pedestrian density growth rate in a preset time window before and after the intersection.
[0098] Exemplarily, the preset time window is set according to the traffic flow response delay. For example, the 3 minutes before and 2 minutes after the intersection are selected to form an asymmetric observation interval. The rising slope of the vehicle arrival rate is calculated by linear regression. For example, in the T4-T7 time window, the arrival rate of the eastbound lane increases from 22 vehicles / minute to 38 vehicles / minute, and the slope is calculated as (38-22) / (3×60)=0.089 vehicles / second. The pedestrian density growth rate is calculated using the instantaneous derivative. For example, at the intersection T7.2, the derivative of the density curve is -0.015 people / square meter·second, and the sign density begins to decrease. This step simultaneously calculates the direction-specific parameters. For example, the arrival rate slope of the north-south bus lane is calculated separately as 0.021 vehicles / second, which is distinguished from the ordinary lane.
[0099] Step S332: Based on the ratio of the rising slope of the vehicle arrival rate to the pedestrian density growth rate, the conflict intensity coefficient of the vehicle and pedestrian traffic demand at the intersection is calculated, and the conflict intensity coefficient is mapped to a preset phase switching frequency level interval.
[0100] Exemplarily, the conflict intensity coefficient is calculated as |vehicle arrival rate slope / pedestrian density slope|. For example, when the vehicle slope is 0.089 vehicles / second and the pedestrian slope is -0.015 people / square meter·second, the coefficient is 5.93. The preset level intervals are dynamically divided according to the road type. For example, four levels are set for urban main roads: coefficient <3 corresponds to level 1 (frequency 90-120 seconds), 3≤coefficient <6 corresponds to level 2 (60-90 seconds), 6≤coefficient <9 corresponds to level 3 (40-60 seconds), and coefficient ≥9 corresponds to level 4 (emergency mode). The current coefficient of 5.93 is mapped to level 2, generating an initial frequency range of 60-90 seconds. The mapping process takes into account the direction weight. For example, the weight coefficient of the east-bound main road is 1.2, the actual level is adjusted to 2.4, and the corresponding frequency range is corrected to 50-75 seconds.
[0101] Step S333: Determine the dynamic adjustment step size of the phase switching frequency parameter in the initial stage according to the peak maintenance duration of the vehicle arrival rate change curve after the intersection and the descending inflection point position of the pedestrian gathering density change curve.
[0102] Exemplarily, the peak maintenance duration is detected by the zero point of the second derivative of the curve. For example, the vehicle arrival rate is maintained at more than 38 vehicles / minute for 110 seconds after T7.2, and this duration is used as the frequency adjustment benchmark. The inflection point of the pedestrian density decrease is detected by the extreme value of the curvature. For example, the curvature reaches its maximum value at the time point T7.8, indicating the highest point of evacuation efficiency. The dynamic adjustment step is calculated as the ratio of the peak duration to the inflection point interval. For example, the 110-second peak duration and the 60-second interval from T7.2 to T7.8 give a step coefficient of 1.83. This coefficient is converted into a phase switching step rule. For example, the basic adjustment step is set to 10 seconds, and the actual step is 10×1.83≈18 seconds, allowing the frequency to be evaluated and adjusted every 18 seconds based on the initial value of 78 seconds.
[0103] Step S334: extracting the association rule between the phase switching frequency and the conflict intensity coefficient in the historical time window before the intersection, and generating an initial candidate value set of the phase switching frequency parameter in combination with the dynamic adjustment step size.
[0104] For example, association rules can be generated through decision tree mining. For example, in historical data, the frequency of successful control cases corresponding to the conflict intensity coefficient range of 5.0-6.0 is mostly concentrated in the range of 70-85 seconds. The candidate value set is generated using an arithmetic sequence. For example, with the baseline value of 78 seconds as the center, the candidate set {73, 78, 83} is generated at intervals of ±5 seconds. Then, the periodic evaluation requirement with a dynamic step size of 18 seconds is added, expanding the candidate set to {73, 78, 83, 91}. The candidate values are filtered by physical constraints. For example, values below the minimum safe period of 45 seconds are excluded, and the final valid set is {73, 78, 83}.
[0105] Step S335: Input the initial candidate value set into the pre-trained phase decision model, evaluate the comprehensive impact weight of each candidate value on the vehicle delay rate and pedestrian waiting time reduction rate in the emergency response area, and select the candidate value with the highest comprehensive impact weight as the initial value of the phase switching frequency parameter.
[0106] Exemplarily, the phase decision model can adopt a multi-objective optimization framework, where the vehicle delay rate is calculated as ∑(actual travel time - free flow time), and the pedestrian waiting time reduction rate is calculated as (historical waiting time - predicted waiting time) / historical waiting time. For example, the candidate value of 78 seconds corresponds to a vehicle delay rate of 35 vehicles / hours and a pedestrian waiting reduction rate of 18%; the candidate value of 83 seconds corresponds to a delay rate of 42 vehicles / hours and a reduction rate of 23%. The comprehensive impact weight is calculated using the entropy weight method. Assuming a delay rate weight of 0.6 and a reduction rate weight of 0.4, the score for 78 seconds is 35×0.6+18×0.4=29.4, and the score for 83 seconds is 42×0.6+23×0.4=35.6. Finally, 83 seconds is selected as the initial value. A real-time correction factor is introduced into the evaluation process. For example, when an emergency vehicle is detected approaching, the vehicle delay weight is temporarily increased to 0.8.
[0107] Step S336: Generate a phase switching instruction test sequence based on the initial value, and verify the effect of the test sequence on alleviating conflicts between vehicles and pedestrians after the intersection in the simulation environment of the edge computing node. If the verification passes, lock the initial value; otherwise, re-trigger the association rule extraction and candidate value generation steps.
[0108] Exemplarily, the phase switching instruction test sequence includes phase order, duration and transition rules, for example, "Phase B lasts 83 seconds → yellow light 3 seconds → Phase C lasts 45 seconds". The simulation environment loads a real-time snapshot of the road network status, including vehicle position, speed and pedestrian distribution data. Verification indicators include the number of conflict point passes (for example, it is predicted that the number of conflicts in the eastbound lane will drop from 28 to 9 during T7.2-T8.0), the average delay change (vehicle delays are reduced by 12%), etc. When the simulation results show that the pedestrian density drops to 0.9 people / square meter at the T8.5 time point and there are no new conflicts, the verification is judged to be successful, and 83 seconds is written into the control parameter set. If secondary congestion is detected in the westbound lane (the queue length exceeds 150 meters), it will fall back to the candidate value of 78 seconds for re-verification until a feasible solution is found or the manual intervention protocol is triggered.
[0109] Step S340: Based on the initial value, the directional weight of the green light duration parameter is iteratively adjusted through the parameter optimization layer of the traffic signal adaptive model until the directional traffic priority parameter satisfies a preset conflict avoidance constraint condition.
[0110] For example, the parameter optimization layer can employ a hybrid optimization strategy combining a genetic algorithm and gradient descent. This strategy models the green light duration parameter as a multidimensional decision variable, with each dimension assigned a weight corresponding to the travel time in a specific direction. For example, the initial green light duration for east-west through traffic is 55 seconds, with a weight of 0.7; the initial green light duration for north-south damaged lanes is 30 seconds, with a weight of 0.3. During the iteration process, the directional weights are dynamically adjusted based on real-time traffic pressure. If the eastbound detour traffic volume increases by 150 vehicles per hour, the weight is increased to 0.8 using a gradient ascent rule, correspondingly extending the green light duration to 62 seconds. Furthermore, to ensure the safe passage of pedestrians, the weight of the northbound crosswalk is increased to 0.4, forcing a dedicated 15-second phase. Conflict avoidance constraints are implemented using a set of linear inequalities, for example, ensuring that the yellow light duration during phase transitions is ≥3 seconds and that the green light interval between vehicles and pedestrians in the same direction is ≥5 seconds. Constraint satisfaction is verified after each iteration. If a 2-second overlap between a westbound right turn and a pedestrian phase is detected, a weight rollback mechanism is triggered, and the directional priority parameters are recalculated. The optimization termination condition is that the change in the directional weight is less than 0.01 in three consecutive iterations. At this time, the final traffic light control parameter set is generated, for example, the phase switching frequency is 78 seconds, the east-west straight green light is 62 seconds, and the north pedestrian phase priority level is increased to Level 2.
[0111] As an implementation method, the traffic signal adaptive model can be trained by the following steps:
[0112] Step s301: Collect training data corresponding to multiple historical traffic emergencies, where the training data includes real-time traffic flow data when the event occurs, traffic signal adjustment records after the event is handled, and traffic recovery efficiency indicators after the event ends.
[0113] Historical traffic emergencies refer to incidents with complete handling records, screened from the traffic management department's accident database. For example, the four-vehicle rear-end collision at an urban arterial intersection on May 15, 2023, involves real-time traffic flow data from the incident period (5:23 PM to 6:45 PM). Specifically, this includes a vehicle speed matrix collected by geomagnetic sensors (updated every second), pedestrian crossing frequency captured by pedestrian detection cameras (counted every minute), and a traffic light status change log recorded by the roadside unit. Traffic signal adjustment records after the incident are stored as a sequence of time-stamped control commands. For example, the "extend the east-west through green light to 65 seconds" command issued 8 minutes after the accident and the "increase the northbound left turn phase priority to Level 2" configuration parameter triggered 12 minutes after the accident. Traffic recovery efficiency metrics are quantified by comparing traffic conditions before and after incident resolution. For example, average vehicle delays decreased from 82 seconds during peak incident periods to 37 seconds after resolution, the standard deviation of pedestrian waiting times decreased from 45 seconds to 18 seconds, and the road capacity recovery rate increased to 92%. The data collection process adheres to integrity verification rules. For example, only incidents with a resolution period of at least 30 minutes and sensor coverage exceeding 95% are selected for inclusion in the training set.
[0114] Step S302: performing spatiotemporal slicing processing on the real-time traffic flow data to generate training samples matching the dimensions of the emergency response area, and converting the traffic signal adjustment records into a label parameter set of the training samples.
[0115] Exemplarily, spatiotemporal slicing can employ a sliding window mechanism to partition continuous time series data into fixed-length spatiotemporal units. For example, a 5-minute time slice and a 50-by-50-meter spatial grid are used to resample the vehicle speed matrix generated during the incident. Each training sample contains a multimodal feature tensor within the emergency response area. For example, in the 17:25-17:30 time slice, the average vehicle speed in grid G1015 is 18 km / h, the pedestrian density is 0.7 people / square meter, and the signal state is Phase C active. Label parameter sets are generated by parsing control commands in traffic signal adjustment records. For example, a command to "extend the green light to 65 seconds" is mapped to a green light duration parameter of 65, and Phase Priority Level 2 is encoded as a directional traffic priority parameter of 0.8. During data dimension alignment, a bilinear interpolation algorithm is used to align the raw sensor data to the standard grid coordinate system of the emergency response area. For example, lane-level vehicle speed data is aggregated to a 5-meter grid cell to ensure consistent spatial resolution among the training samples.
[0116] Step S303: Constructing a neural network structure of an initial traffic signal adaptive model, wherein the neural network structure includes a graph convolution branch for extracting spatial dependencies and a recurrent neural network branch for capturing temporal dependencies.
[0117] For example, the graph convolution branch constructs a graph attention network based on the road network topology. Nodes represent the real-time traffic state characteristics of each lane, and edge weights are determined by both lane connectivity and historical traffic flow correlation. For example, an initial edge weight of 0.75 is set between the nodes connecting the north-south through lane and the east-west left-turn lane based on historical data statistics to reflect the intensity of traffic competition between the two during peak hours. The recurrent neural network branch uses a gated recurrent unit architecture with a time step synchronized with the spatiotemporal slice interval. For example, each 5-minute time slice corresponds to a time step input, and the memory unit retains the traffic state evolution characteristics of the previous three time steps. The outputs of the spatial and temporal branches are fused through a feature concatenation layer. For example, the 32-dimensional spatial feature vector extracted by the graph convolution and the 64-dimensional temporal feature vector output by the recurrent neural network are concatenated into a 96-dimensional joint feature, which is then input into a fully connected layer for dimensionality reduction. A residual connection module is embedded in the network structure to ensure the efficient transfer of deep-level features. For example, a cross-layer connection is introduced after the fifth convolution layer, superimposing the original input features with the convolution output in a ratio of 0.3:0.7.
[0118] Step S304: inputting the training samples into the initial traffic signal adaptive model, calculating the mean square error loss between the label parameter set and the model output parameters, and updating the connection weights of the neural network structure by a gradient descent algorithm.
[0119] Exemplarily, the mean squared error loss function simultaneously considers the coordinated optimization of multiple objective parameters. For example, errors are calculated for the phase switching frequency parameter, the green light duration parameter, and the directional priority parameter, and the weighted sum is calculated according to a weight ratio of 0.4:0.4:0.2. The gradient descent process uses an adaptive moment estimation optimization algorithm, with an initial learning rate set to 0.001. When the validation set loss does not decrease for five consecutive training epochs, a learning rate decay mechanism is triggered, for example, reducing the learning rate to one-tenth of the original value. A gradient clipping strategy is implemented during the weight update process, limiting parameter adjustments to no more than 0.1 to prevent model oscillation. Each training batch contains 32 spatiotemporal slice samples, and forward and backward propagation calculations are performed in a GPU-accelerated environment. For example, processing a full training set containing 2000 slices requires 63 batches of iterations, with a single batch processing time of 850 milliseconds. The model performs a snapshot every 10 training epochs, recording the current optimal weight combination for subsequent restoration.
[0120] Step S305: When the improvement of the traffic recovery efficiency index on the validation data set reaches a preset threshold, the training is stopped and the model parameters are deployed to the edge computing node.
[0121] The validation dataset includes historical events not included in training, such as the bridge closure incident on June 10, 2023. Traffic recovery efficiency metrics are calculated by comparing the model's predictions with the actual response. A preset threshold is set at a minimum 15% improvement in a comprehensive metric, including the geometric mean of vehicle delay reduction, pedestrian wait time optimization, and road capacity restoration. When the model achieves an 18.7% improvement over three consecutive validation cycles, an early stopping mechanism is triggered to terminate the training process. Model parameters are quantized and compressed before deployment. For example, 32-bit floating-point weights are converted to 8-bit integers, reducing the model size to one-quarter of its original size while maintaining 98.3% prediction accuracy. A / B testing is conducted during deployment. For example, the new and old versions of the model are run simultaneously on edge computing nodes to compare the conflict resolution efficiency of the response in a simulated environment. The new model is ultimately replaced when it achieves an 83% success rate in 1,000 tests. The model update mechanism sets a rollback protection strategy. If the prediction error exceeds the safety threshold for five consecutive times after deployment, it will automatically revert to the previous stable version and trigger an alarm notification.
[0122] Step S400: sending a control instruction sequence to the traffic light at the target intersection according to the traffic light control parameter set, and dynamically adjusting the execution priority of the control instruction sequence based on the real-time change trend of the vehicle density distribution data and pedestrian activity trajectory data.
[0123] The control command sequence is a standard NTCIP-compliant control command set, consisting of phase activation commands, timing parameter update commands, and priority override commands. For example, a mandatory switching command "Immediately terminate Phase B" is first sent, followed by a parameter modification command "Extend the green light on Phase C to 55 seconds," and finally a configuration update command for the "Directional Priority Table Version 3.2" is written. The dynamic adjustment mechanism is implemented using an online learning algorithm, incrementally analyzing sensor data every 500 milliseconds. For example, if vehicle density distribution data indicates a sudden 20% decrease in eastbound detour traffic, the green light delay execution priority for that direction is automatically lowered. Similarly, if the general pedestrian detection system detects that the number of people stranded on the northwest side exceeds a safety threshold, an emergency pedestrian phase command is immediately inserted at the head of the queue. The execution engine employs a double buffering mechanism to ensure the continuity of command switching, while a CRC checksum and retransmission protocol ensure the reliable transmission of control commands. The priority adjustment strategy comprehensively considers multimodal conflicts. For example, when a fire truck's priority request overlaps with a pedestrian's crossing request, arbitration is performed based on a pre-set emergency response hierarchy to ensure absolute priority for critical rescue routes.
[0124] As an embodiment, in step S400, dynamically adjusting the execution priority of the control instruction sequence based on the real-time change trend of the vehicle density distribution data and the pedestrian activity trajectory data may specifically include the following steps:
[0125] Step S410: monitoring the position coordinates and movement direction of a new vehicle in the emergency response area, and calculating the shortest path distance between the new vehicle and the location identifier of the sudden traffic incident.
[0126] For example, the location coordinates of newly added vehicles are obtained through collaborative positioning with an onboard GPS unit and a roadside multi-target tracking radar. For example, a white van was detected traveling west to east along the Yan'an Elevated Road at 8.5 meters per second at 31.23 degrees north latitude and 121.47 degrees east longitude. The shortest path distance is calculated based on a real-time road network topology map, using a dynamic Dijkstra algorithm to determine the optimal route under current traffic conditions. For example, if the van needed to detour to the accident site via the Yan'an East Road overpass, the total path length would be calculated to be 1.2 kilometers. Excluding the Tibet Middle Road ramp, which was closed due to road traffic control, the effective distance is adjusted to 1.5 kilometers. The path distance is dynamically updated once per second. When the emergency lane on Xinxing Road is temporarily opened, the path is immediately recalculated and updated to 1.0 kilometers. The calculation process incorporates real-time traffic flow data. For example, if a queue length of 80 meters is detected at the Henan Middle Road intersection, the path weight coefficient is automatically increased by 0.3 to reflect the actual traffic difficulty.
[0127] Step S420: predicting the time interval for the newly added vehicles to arrive at the traffic emergency area based on the shortest path distance and the current average speed of the vehicles.
[0128] For example, the current average vehicle speed is calculated by fusing data from floating vehicles with data from fixed detectors. For example, on the Nanjing East Road to Bund section, the average instantaneous speed uploaded by taxi onboard terminals is 18 kilometers per hour, while the cross-sectional speed calculated by geomagnetic sensors is 15 kilometers per hour. The weighted average yields a current average vehicle speed of 16.2 kilometers per hour. The time interval prediction model uses a sliding window regression algorithm. For example, at a 1.5-kilometer path distance, the initial predicted arrival time is 5 minutes and 33 seconds. When the vehicle speed is detected to drop to 5 kilometers per hour 200 meters ahead, the model dynamically adjusts the predicted value to 8 minutes and 17 seconds. The reliability of the prediction results is annotated with confidence intervals. For example, at a 95% confidence level, the time interval ranges from 7 minutes and 45 seconds to 8 minutes and 49 seconds. This interval width serves as the risk assessment basis for emergency response decisions.
[0129] Step S430: If the time interval is less than the preset emergency response time threshold, the green light duration parameter of the lane where the newly added vehicle is located is increased to the first priority level.
[0130] Exemplarily, the preset emergency response time threshold is dynamically configured based on the severity of the incident. For example, in the Level 2 emergency response state, the threshold is set at 10 minutes. When an ambulance's estimated arrival time interval is detected to be 7 minutes and 22 seconds, the priority adjustment mechanism is triggered. The green light duration parameter is adjusted upwards according to a hierarchical control strategy. The first priority level corresponds to an upper limit of 150% of the baseline value. For example, the original east-west through-the-road green light duration of 60 seconds is increased to 90 seconds, while the yellow light transition time of the adjacent phase is compressed to 2 seconds. Priority adjustment instructions are sent to the signal controller via a dedicated short-range communication protocol. For example, at the intersection of Yan'an East Road and Zhongshan East First Road, upon receiving the priority instruction, the signal controller immediately interrupts the current phase cycle and forcibly inserts an east-west through-the-road green light extension instruction. The adjustment process implements a conflict detection mechanism. If it detects that the remaining time for pedestrians to cross the street is less than 5 seconds, a 3-second all-red phase is automatically inserted to ensure pedestrian safety.
[0131] Step S440: Synchronously detecting abnormal gathering areas in the pedestrian activity trajectory data. If the abnormal gathering area overlaps with the location identifier of the sudden traffic event, a pedestrian-only passage time window is allocated in the directional passage priority parameter.
[0132] For example, abnormal gathering areas were identified through the fusion of thermal imaging camera and millimeter-wave radar data. For example, at the crosswalk south of the accident site, a pedestrian crossing rate of 45 people per minute was detected, exceeding the historical peak by 120%, and the median crowd retention time reached 85 seconds. A geofence intersection algorithm was used to determine location overlap. When the geographic coordinate boundary of the pedestrian gathering area overlapped with the 50-meter buffer zone of the accident site by more than 60%, a pedestrian priority response mechanism was activated. Pedestrian-only time windows were allocated based on the principle of minimal interference. For example, a 30-second dedicated green light was inserted during low-traffic periods in the north-south direction, while the east-west green light duration was simultaneously shortened to 40 seconds. When time window parameters were entered into the directional priority parameter table, conflicts with emergency rescue routes were verified. If a fire truck was detected needing to cross a pedestrian-only phase area, pedestrian priority was automatically downgraded and detour guidance was sent to the variable message board.
[0133] As an embodiment, in step S440, allocating a pedestrian-only passage time window in the directional passage priority parameter includes:
[0134] Step S441: obtaining the real-time movement direction distribution of pedestrians in the abnormal gathering area, and extracting the target movement direction with the highest frequency in the real-time movement direction distribution as the dominant pedestrian flow direction.
[0135] Exemplarily, the real-time movement direction distribution is constructed using a binocular stereo vision sensor and a pedestrian re-identification algorithm. For example, at the east entrance of Nanjing East Road Pedestrian Street, 62% of pedestrians were detected moving due west, 28% diverted to the northwest, and the remaining 10% stayed and watched. The target movement direction is extracted using a method that combines kernel density estimation with directional clustering. For example, a density peak is detected in the 0°-30° direction range, and the dominant flow direction of pedestrians is determined to be 10° west-northwest. The data sampling interval is 500 milliseconds. When the standard deviation of the dominant flow direction is detected to exceed 15°, a directional stability check is triggered to eliminate temporary directional fluctuation interference. The vector representation of the dominant flow direction includes two dimensions: angle and intensity. For example, the intensity coefficient of the 10° west-northwest direction is 0.78, which is used to quantify the significance of the movement trend of the pedestrian group.
[0136] Step S442: Based on the pedestrian dominant flow direction and the vehicle travel direction of each lane in the emergency response area, determine a target conflict lane set that has an intersection conflict with the pedestrian dominant flow direction.
[0137] Exemplarily, lane traffic direction data can be derived from a pre-deployed general road network digital twin model. For example, the direction angle of the north-to-south straight lane on Zhongshan East Road is 175°, and the intersection angle with the pedestrian dominant flow direction of 10° northwest is 15°, which is determined to be a potential conflict point. Conflict detection uses geometric topology analysis. When the angle between the lane centerline and the extension line of the pedestrian dominant flow direction is less than 45° and the projection distance is less than 5 meters, it is marked as a first-level conflict lane. For example, it was detected that the west-to-east left-turn lane of Jiangxi Middle Road (direction angle 85°) formed a 75° intersection angle with the pedestrian dominant flow direction. Because the projection distance was only 2.3 meters, it was included in the target conflict lane set. The conflict level classification takes into account the traffic flow intensity. When the hourly flow of the conflict lane exceeds 800 vehicles, it is automatically upgraded to a special conflict lane, triggering stricter control measures.
[0138] Step S443: Based on the real-time vehicle flow and pedestrian density of each lane in the target conflict lane set, predict the vehicle arrival peak time and pedestrian waiting time of the target conflict lane within a preset future time interval.
[0139] Exemplarily, the prediction of vehicle arrival peak can be implemented using a general autoregressive integrated moving average model. For example, in the conflict lane of Jiangxi Middle Road, the model predicts that the peak arrival rate will be 42 vehicles per minute in 6 minutes and 15 seconds based on the current arrival rate of 28 vehicles per minute. The pedestrian waiting time exceeding the limit is calculated through a survival analysis model. When the pedestrian density exceeds 1.2 people / square meter and the average waiting time exceeds 90 seconds, an over-limit warning is triggered. For example, the current mean pedestrian waiting time is 68 seconds, and the model predicts that the threshold will be reached in 4 minutes and 50 seconds. The prediction process implements a dynamic correction mechanism, inputting the latest observation data into the model every 30 seconds to recalibrate the parameters. For example, when a sudden passenger flow is detected at the subway station, the pedestrian waiting time growth rate parameter is increased from 5% to 8% per minute.
[0140] Step S444: Based on the overlapping time period between the vehicle arrival peak moment and the pedestrian waiting time exceeding the limit, generate multiple pedestrian passage time window candidate sets, each of the pedestrian passage time window candidate sets includes a start time and a duration.
[0141] Exemplarily, the generation of the time window candidate set follows the phase coordination principle. For example, the vehicle peak time is detected at T+6:15 and the pedestrian overload time is T+4:50. The overlapping time period T+4:50 to T+6:15 is used to generate three candidate sets: candidate set A (T+5:00 to T+5:30), candidate set B (T+5:30 to T+6:00), and candidate set C (T+5:15 to T+6:00). The duration setting meets the minimum executable unit requirements, for example, not less than 20 seconds and not more than 90 seconds, to avoid signal cycle fragmentation. The start time of the candidate set is aligned with the existing signal phase cycle. For example, the remaining time of the current phase is 12 seconds, and the start time of candidate set A is set to be activated immediately after the end of the current cycle.
[0142] Step S445: Evaluate the influence weight of each candidate set of pedestrian travel time windows on the overall travel efficiency of the emergency response area through the edge computing node, and select the candidate set with the highest influence weight as the final pedestrian-only travel time window.
[0143] For example, the impact weighting model integrates a multi-objective optimization function to calculate the quantitative impact of each candidate set on indicators such as vehicle delay, pedestrian safety, and emergency rescue. For example, candidate set B increases total vehicle delay by 85 vehicle hours but reduces the risk of pedestrian injury by 23%, resulting in a weighted overall score of 72. Candidate set C increases delay by 120 vehicle hours but reduces the risk by 35%, resulting in a score of 68. The evaluation process incorporates real-time constraints. For example, if an ambulance is detected to be expected to pass at T+5:45, candidate set B is eliminated due to time overlap. Ultimately, candidate set A, with the highest score, is selected, and its time window parameters are written to the signal control queue.
[0144] Step S446: Allocate an independent control instruction for the final pedestrian-only passage time window in the directional passage priority parameter, and simultaneously prohibit the green light signal of the target conflict lane set within the final pedestrian-only passage time window.
[0145] Exemplarily, the independent control instructions follow the standard format of the NTCIP protocol. For example, the instruction "Phase PedestrianEW Start=17:23:45Duration=30" is generated to specify that the east-west pedestrian phase starts at the specified time and lasts for 30 seconds. The green light prohibition of the target conflict lane is achieved through the phase mask. For example, in the west-to-east left turn phase parameter table of Jiangxi Middle Road, the period from T+5:00 to T+5:30 is marked as the red light mandatory period. After the instruction is issued, a double verification mechanism is implemented, and the execution status is confirmed by the signal status transmitted back by the roadside unit. When a phase switching abnormality is detected, the backup control plan is automatically triggered. After the time window ends, the original phase parameters are restored, and the effect evaluation process is started to count the actual reduction in pedestrian waiting time and the vehicle delay data caused, which are used to optimize the subsequent decision-making model.
[0146] As an optional implementation, after the step S400 of dynamically adjusting the execution priority of the control instruction sequence, the method may further include:
[0147] Step S500: continuously collecting traffic flow recovery indicators of the emergency response area, wherein the traffic flow recovery indicators include a vehicle queue length reduction rate, a pedestrian average waiting time reduction rate, and a lane capacity recovery coefficient.
[0148] The traffic flow recovery index is a comprehensive set of evaluation parameters that quantifies the degree to which the traffic system returns to normal operation after an abnormal state. Data collection relies on a network of monitoring equipment deployed at the boundaries and core locations of the emergency response area. The vehicle queue length reduction rate is calculated in real time using a video recognition algorithm. For example, the number of vehicles in the queue 200 meters north of the accident site has dropped from a peak of 58 to the current 32, with a calculated per-minute reduction rate of (58-32) / (58×5)=8.97%. The average pedestrian wait time reduction rate is calculated based on the difference in timestamps between pedestrian crossing request signals. For example, the average pedestrian wait time at the southeast crosswalk has decreased from 85 seconds at the beginning of the incident to 63 seconds at the current time, with a reduction rate calculated as (85-63) / 85×100%=25.88%. The lane capacity recovery coefficient is determined by the ratio of cross-sectional flow to free flow speed. For example, the current capacity of the eastbound bypass lane is 1200 vehicles per hour, with a recovery coefficient of 0.75 compared to the baseline value of 1600 vehicles per hour. The data collection frequency is synchronized with the signal control cycle, and a recovery status snapshot containing three-dimensional indicators is generated every 30 seconds and stored in the ring buffer of the edge computing node for real-time analysis.
[0149] Step S600: Compare the traffic flow recovery index with a preset recovery reference curve, and calculate the deviation between the actual recovery progress and the expected recovery progress.
[0150] For example, the preset recovery baseline curve can be derived from a weighted average model of historical incident response results. For example, in a Level 2 traffic accident scenario, the baseline curve stipulates that the vehicle queue length should decrease by 35% and the pedestrian waiting time should be shortened by at least 20% within 30 minutes after the accident. Deviation calculation uses a dynamic time warping algorithm to align the time axis of the actual measurement sequence with the baseline curve. For example, the actual vehicle queue reduction rate reaches 28% at the 10th minute, while the baseline curve is 32% at the corresponding time. After time alignment, the root mean square error is 4.2 percentage points. The comprehensive deviation of the multi-dimensional indicators is aggregated using the entropy weight method, assigning a weight of 0.5 to the vehicle indicator, 0.3 to the pedestrian indicator, and 0.2 to the traffic capacity indicator. When the actual vehicle queue reduction rate error is 8%, the pedestrian waiting time reduction rate error is -5% (inverse growth), and the traffic capacity error is 12%, the comprehensive deviation is calculated as 8×0.5+5×0.3+12×0.2=7.9. The deviation threshold is dynamically set according to the event level. For example, the second-level response allows a deviation upper limit of 10, and an alarm is triggered when the current value reaches 12.3.
[0151] Step S700: If the deviation exceeds the allowable error range, a parameter recalibration mechanism of the traffic signal adaptive model is triggered. The parameter recalibration mechanism includes the following steps:
[0152] Step S701: Freeze the weight parameters of the graph convolution branch of the traffic signal adaptive model, and unlock the hidden layer nodes of the recurrent neural network branch.
[0153] Exemplarily, the weight freezing operation is implemented by setting a gradient mask, and only the parameters of the recurrent neural network branch are updated during the backpropagation process. For example, the weight matrix of the 128-dimensional spatial feature extraction layer of the graph convolution branch is locked, while the input gate and forget gate parameters of the 64 gated recurrent unit nodes of the recurrent neural network branch remain trainable. Unlocking the hidden layer nodes involves adjusting the slope of the activation function. For example, the output gate tanh function of the long short-term memory unit is replaced by the LeakyReLU function to enhance short-term memory capacity. During parameter recalibration, the model retains the ability to extract spatial features, but strengthens the adaptive learning of temporal evolution patterns. For example, when it is detected that changes in night lighting conditions lead to an increase in video detection errors, the focus is on optimizing the robustness of the time series prediction module.
[0154] Step S702: injecting the current traffic state feature vector into the recurrent neural network branch, and recalculating the direction weight distribution ratio of the green light duration parameter.
[0155] For example, the current traffic state feature vector is generated by encoding real-time sensor data. For example, metrics such as the eastbound lane queue length of 32 vehicles, pedestrian wait time of 63 seconds, and traffic capacity of 0.75 are normalized into an input feature vector of [0.4, 0.63, 0.75]. The directional weight distribution ratio is dynamically adjusted using an attention mechanism. For example, the northbound bypass lane at the accident site initially has a weight of 0.7. After the injection of new feature vectors, the model detects increased pressure in the eastbound lane and increases its weight to 0.8, while simultaneously reducing the weight of the westbound secondary lane to 0.2. The recalculation process performs five rounds of iterative optimization, each round injecting the latest traffic state snapshot. For example, after the third iteration, the green light duration on the north-south main road increased from 55 seconds to 60 seconds, while the east-west secondary road decreased from 40 seconds to 35 seconds, and the weight ratio was adjusted to [0.6, 0.4].
[0156] Step S703: When the deviation drops to within the allowable error range, the parameter recalibration mechanism is released and the model full parameter update mode is restored.
[0157] Exemplarily, the deviation monitoring adopts a sliding window mechanism. For example, when the comprehensive deviation is lower than the threshold value of 10 for three consecutive control cycles (90 seconds), the recovery is judged to be effective. The release mechanism is implemented by gradient mask removal, the weight of the graph convolution branch is re-added to the training parameter set, and the activation function of the recurrent neural network branch is restored to the original configuration. The full parameter update mode adopts an elastic weight consolidation algorithm to retain the temporal pattern features learned during the recalibration. For example, in subsequent training, an elastic coefficient of 0.3 is applied to the weight change of the recurrent neural network branch to prevent catastrophic forgetting. An integrity check is performed immediately after the model is restored. For example, it verifies whether the recognition accuracy of the newly added construction fence area by the spatial feature extraction module meets the standard. If it fails, the supplementary training process is triggered.
[0158] The activation conditions of the parameter recalibration mechanism include:
[0159] Condition 1: It is detected that the vehicle queue length reduction rate does not reach the expected threshold value for three consecutive control cycles.
[0160] Exemplarily, the control cycle is synchronized with the traffic light phase switching cycle. For example, in the 90-second fixed cycle mode, the mechanism is activated when the vehicle queue reduction rate is lower than 80% of the corresponding value of the baseline curve for three consecutive cycles (4 minutes and 30 seconds). The expected threshold is dynamically adjusted according to the handling stage. For example, the threshold for 0-15 minutes after the accident is set to a reduction rate of 5% per minute, and increased to 8% for 15-30 minutes. When the actual monitoring value is measured to have a reduction rate of 3.2%, 4.1%, and 3.8% respectively during the period of 18:15-18:19:30, it is determined that the three consecutive cycles do not meet the standard, triggering parameter recalibration.
[0161] Or, condition two: the rate of reduction of the average waiting time of pedestrians shows a reverse growth trend within a preset time period.
[0162] For example, a negative growth trend is determined by the sign of the linear regression slope. For example, if pedestrian waiting time increases from 62 seconds to 68 seconds within a 10-minute monitoring window, the reduction rate is calculated to be -8.9%, and the slope is positive. Preset time periods are set based on the intensity of pedestrian crossing demand, for example, 5 minutes during evening peak hours and 10 minutes during off-peak hours. If a sustained increase in waiting time is detected between 7:00 PM and 7:05 PM, with a slope exceeding 0.5 seconds per minute, the calibration mechanism is immediately activated.
[0163] Or, condition three: the difference between the lane capacity recovery coefficient and the collaborative control index of the adjacent intersection exceeds the collaborative tolerance.
[0164] For example, the coordination tolerance is set based on regional traffic balance principles. For example, within a 500-meter radius of coordinated control, a maximum variance of 15% is permitted. When the eastbound detour lane recovery coefficient at the accident site reaches 0.75, while the corresponding coefficient at the adjacent Zhongshan East 1st Road intersection reaches 0.95, and the 20% variance exceeds the threshold, cross-intersection parameter calibration is triggered. Coordinated control metrics are acquired in real time via V2X communication. For example, phase state and traffic flow data from adjacent intersection signals are received, and the spectral radius variance of the coordination coefficient matrix is calculated.
[0165] Please refer to Figure 3 , is a structural block diagram of the control device 120 of the present invention. The control device 120 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the control device 120 can also be stored in the RAM 1003. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004. In other words, the control device 120 provided in an embodiment of the present application includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned edge computing traffic light emergency control method for sudden traffic events.
[0166] Multiple components in the control device 120 are connected to the I / O interface 1005, including: an input unit 1006, an output unit 1007, a storage unit 1008, and a communication unit 1009. The input unit 1006 can be any type of device that can input information to the control device 120. The input unit 1006 can receive input digital or character information and generate key signal input related to user settings and / or function control of the server, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and / or a remote control. The output unit 1007 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1008 can include but is not limited to a magnetic disk and an optical disk. The communication unit 1009 allows the control device 120 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, for example, a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device and / or the like.
[0167] The computing unit 1001 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as the edge computing traffic light emergency control method for traffic emergencies. For example, in some embodiments, the edge computing traffic light emergency control method for traffic emergencies can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on the control device 120 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the edge computing traffic light emergency control method for traffic emergencies described above can be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured in any other appropriate manner (e.g., by means of firmware) to execute an edge computing traffic light emergency control method for sudden traffic events.
[0168] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present invention can be achieved. This is not limited herein.
[0169] Although the embodiments or examples of the present invention have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only limited by the claims after authorization and their equivalents. Various elements in the embodiments or examples can be omitted or replaced by their equivalents. In addition, the steps can be performed in an order different from that described in the present invention. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that as technology evolves, many of the elements described here can be replaced by equivalent elements that appear after the present invention.
Claims
1. An edge computing traffic light emergency control method for sudden traffic events, characterized in that: The method comprises: Obtaining real-time traffic flow information at the target intersection, including vehicle density distribution data, pedestrian activity trajectory data, and location identifiers of sudden traffic events; Based on the location identifier of the sudden traffic event, the emergency response area of the target intersection is determined, and the dynamic offset between the historical traffic flow characteristics and the current traffic flow characteristics in the emergency response area is extracted through the edge computing node; Inputting the dynamic offset into a pre-trained traffic signal adaptive model to generate a set of traffic light control parameters corresponding to the emergency response area, the traffic light control parameter set including a phase switching frequency parameter, a green light duration parameter, and a directional traffic priority parameter; Sending a control instruction sequence to the traffic light at the target intersection according to the traffic light control parameter set, and dynamically adjusting the execution priority of the control instruction sequence based on the real-time change trend of the vehicle density distribution data and the pedestrian activity trajectory data; The dynamically adjusting the execution priority of the control instruction sequence based on the real-time change trend of the vehicle density distribution data and the pedestrian activity trajectory data includes: Monitoring the position coordinates and movement direction of new vehicles in the emergency response area, and calculating the shortest path distance between the new vehicles and the location identifier of the traffic emergency; Predicting the time interval for the newly added vehicles to arrive at the traffic emergency area based on the shortest path distance and the current average speed of the vehicles; If the time interval is less than the preset emergency response time threshold, the green light duration parameter of the lane where the newly added vehicle is located is raised to the first priority level; Synchronously detect abnormal gathering areas in pedestrian activity trajectory data. If the abnormal gathering areas overlap with the location identifier of the sudden traffic incident, then: Obtaining the real-time movement direction distribution of pedestrians in the abnormal gathering area, and extracting the target movement direction with the highest frequency in the real-time movement direction distribution as the pedestrian dominant flow direction; Determining a target conflict lane set that intersects and conflicts with the pedestrian dominant flow direction based on the pedestrian dominant flow direction and the vehicle travel directions of each lane in the emergency response area; Predicting the peak vehicle arrival time and pedestrian waiting time of the target conflict lane within a preset future time interval based on the real-time vehicle flow and pedestrian density of each lane in the target conflict lane set; Based on the overlapping time period between the vehicle arrival peak moment and the pedestrian waiting time, a plurality of pedestrian passage time window candidate sets are generated, each of the pedestrian passage time window candidate sets including a start time and a duration; Evaluate, by the edge computing node, the influence weight of each candidate set of pedestrian passage time windows on the overall passage efficiency of the emergency response area, and select the candidate set with the highest influence weight as the final pedestrian-only passage time window; An independent control instruction is allocated to the final pedestrian-only passage time window in the directional passage priority parameter, and the green light signal of the target conflict lane set within the final pedestrian-only passage time window is simultaneously prohibited.
2. The method according to claim 1, characterized in that The extracting of the dynamic offset between the historical traffic flow characteristics and the current traffic flow characteristics in the emergency response area by the edge computing node includes: Retrieving historical traffic flow characteristics of the emergency response area within a preset time window from a local database of the edge computing node, the historical traffic flow characteristics including historical average vehicle speed, historical pedestrian waiting time, and historical congestion index; Performing time dimension alignment processing on the current traffic flow feature so that the timestamp of the current traffic flow feature is consistent with the time window range of the historical traffic flow feature; Calculating a speed difference coefficient between the historical average vehicle speed and the current average vehicle speed, and a waiting time difference coefficient between the historical pedestrian waiting time and the current pedestrian waiting time; Based on the speed difference coefficient and the waiting time difference coefficient, a multidimensional feature vector of the dynamic offset is constructed, and the multidimensional feature vector is scaled and unified by the normalization layer of the edge computing node to obtain a normalized multidimensional feature vector, which is used to characterize the dynamic offset.
3. The method according to claim 2, characterized in that Inputting the dynamic offset into a pre-trained traffic signal adaptive model to generate a set of traffic signal light control parameters corresponding to the emergency response area includes: Invoking the feature fusion layer of the traffic signal adaptive model, spatially correlating the dynamic offset with the location identifier of the sudden traffic event to generate an event perception feature map; Predicting a vehicle arrival rate change curve and a pedestrian gathering density change curve of the emergency response area within a future time interval based on the event perception feature map through the time series prediction layer of the traffic signal adaptive model; Determining an initial value of the phase switching frequency parameter according to an intersection of the vehicle arrival rate variation curve and the pedestrian gathering density variation curve; Based on the initial value, the directional weight of the green light duration parameter is iteratively adjusted through the parameter optimization layer of the traffic signal adaptive model until the directional traffic priority parameter satisfies a preset conflict avoidance constraint condition.
4. The method according to claim 3, characterized in that The traffic signal adaptive model is trained by the following steps: Collecting training data corresponding to multiple historical traffic emergencies, including real-time traffic flow data at the time of the incident, traffic signal adjustment records after the incident, and traffic recovery efficiency indicators after the incident; Performing spatiotemporal slicing processing on the real-time traffic flow data to generate training samples that match the dimensions of the emergency response area, and converting the traffic signal adjustment records into a label parameter set of the training samples; Constructing a neural network structure of an initial traffic signal adaptation model, wherein the neural network structure includes a graph convolution branch for extracting spatial dependencies and a recurrent neural network branch for capturing temporal dependencies; Inputting the training samples into the initial traffic signal adaptive model, calculating the mean square error loss between the label parameter set and the model output parameters, and updating the connection weights of the neural network structure by a gradient descent algorithm; When the improvement of the traffic recovery efficiency index on the validation data set reaches a preset threshold, the training is stopped and the model parameters are deployed to the edge computing node.
5. The method according to claim 1, wherein The location identifier of the traffic emergency is obtained by the following steps: Receive real-time video stream data uploaded by the monitoring device at the target intersection, and perform moving target detection on each frame of the real-time video stream data; Extracting a position change sequence of a detected moving object and calculating a position offset of the moving object between adjacent frames; If the position offset continuously exceeds a preset abnormal displacement threshold, the area where the moving target is located is determined to be a suspected traffic emergency area; Sending a high-resolution snapshot instruction to the monitoring device through the edge computing node to obtain multi-angle detailed images of the suspected sudden traffic incident area; The multi-angle detail image is classified into an event type. If the classification result is a vehicle collision or a road obstacle, the suspected traffic emergency area is marked as a location identifier of the traffic emergency.
6. The method according to claim 5, characterized in that The classifying the event type of the multi-angle detail image includes: Inputting the multi-angle detail image into a pre-trained event classification model to extract key object contour features and scene context features in the image; Recognize visual patterns of scattered vehicle parts, road cracks, or fallen pedestrians based on the key object contour features; Analyzing the sudden change in speed of adjacent vehicles or the collective turning behavior of the movement direction of a group of pedestrians based on the scene context features; If the scattered vehicle parts are identified and there is a sudden change in speed, the event type is determined to be a vehicle collision; If the road crack is identified and there is a collective turning behavior of the pedestrian group in the direction of movement, the event type is determined to be a road obstacle.
7. The method according to claim 4, characterized in that After dynamically adjusting the execution priority of the control instruction sequence, the method further includes: Continuously collecting traffic flow recovery indicators in the emergency response area, wherein the traffic flow recovery indicators include the vehicle queue length reduction rate, the pedestrian average waiting time reduction rate, and the lane capacity recovery coefficient; Comparing the traffic flow recovery index with a preset recovery benchmark curve to calculate the deviation between the actual recovery progress and the expected recovery progress; If the deviation exceeds the allowable error range, a parameter recalibration mechanism of the traffic signal adaptive model is triggered, and the parameter recalibration mechanism includes the following steps: Freezing the weight parameters of the graph convolution branch of the traffic signal adaptive model and unlocking the hidden layer nodes of the recurrent neural network branch; Injecting the current traffic state feature vector into the recurrent neural network branch and recalculating the directional weight distribution ratio of the green light duration parameter; When the deviation drops to within the allowable error range, the parameter recalibration mechanism is released and the model full parameter update mode is restored; The activation conditions of the parameter recalibration mechanism include: detecting that the vehicle queue length reduction rate fails to reach the expected threshold value for three consecutive control cycles; Or, the average pedestrian waiting time reduction rate shows a reverse growth trend within a preset time period; Or, the difference between the lane capacity recovery coefficient and the collaborative control index of the adjacent intersection exceeds the collaborative tolerance.
8. A control device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Traffic signal lamp adjusting method and device, equipment and storage medium
CN118334883A
Traffic flow regulation and control method based on sensing, calculation and control integrated intelligent traffic lights
CN118629235A