A traffic accident severity prediction method and system based on multi-agent reinforcement learning

CN122311472BActive Publication Date: 2026-08-11SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,这些方法存在以下局限性:1)难以有效融合多源异构特征,包括数值特征、类别特征以及事故描述等文本特征;2)模型的可解释性差,难以提供决策依据;3)缺乏对领域知识的系统性整合,模型泛化能力有限;4)在面对动态变化的交通环境时,自适应调整能力不足

Benefits of technology

[0016] 1. This invention utilizes heterogeneous multi-agent division of labor to process feature subsets with different semantics, fully leveraging the advantages of expert models in various fields, and then dynamically fusions them through a reinforcement learning coordinator for comprehensive decision-making, effectively improving prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122311472B_ABST
    Figure CN122311472B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for predicting the severity of traffic accidents based on multi-agent reinforcement learning. First, it obtains traffic accident feature vectors containing multi-source heterogeneous features and constructs a heterogeneous multi-agent system composed of machine learning agents and multiple large language model agents. Based on domain knowledge and feature importance, feature subsets are divided. Each agent performs local inference and outputs a structured tuple containing actions, confidence scores, and inference text. Through a centralized coordination mechanism, a coordinator using the PPO reinforcement learning algorithm dynamically integrates the outputs of all agents, learning to generate coordinated actions containing the final prediction category and agent weight allocation. Finally, interpretable accident severity categories, overall system confidence scores, and integrated inference text are generated. This invention achieves efficient fusion and collaborative inference of multi-source information, significantly improving prediction accuracy, decision interpretability, and adaptability to dynamic traffic environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent transportation and artificial intelligence technology, specifically relating to a method and system for predicting the severity of traffic accidents based on multi-agent reinforcement learning. Background Technology

[0002] Predicting the severity of traffic accidents is crucial for traffic management, emergency response, and accident prevention. Traditional prediction methods primarily rely on statistical models or single machine learning models, utilizing structured data from accident reports (such as vehicle speed, weather, and road type). However, these methods have the following limitations: 1) They struggle to effectively integrate multi-source heterogeneous features, including numerical features, categorical features, and textual features such as accident descriptions; 2) The models have poor interpretability, making it difficult to provide a basis for decision-making; 3) They lack systematic integration of domain knowledge, resulting in limited model generalization ability; and 4) They lack the ability to adaptively adjust to dynamically changing traffic environments.

[0003] In recent years, reinforcement learning has demonstrated its powerful capabilities in sequential decision-making problems, while multi-agent systems have advantages in handling complex, multi-domain tasks. However, there is currently no solution that combines heterogeneous multi-agent systems with reinforcement learning coordination mechanisms specifically for predicting the severity of traffic accidents. Therefore, there is an urgent need for an intelligent prediction method that can integrate multi-source information, possess interpretability, and adapt to dynamic environments. Summary of the Invention

[0004] Purpose of the invention: In order to solve the problems existing in the prior art, the present invention provides a method and system for predicting the severity of traffic accidents based on multi-agent reinforcement learning.

[0005] Technical solution: This invention discloses a method for predicting the severity of traffic accidents based on multi-agent reinforcement learning, specifically as follows: Obtaining multi-source feature vectors of traffic accidents And preprocessing is performed, the multi-source features include numerical features, category features and text features; Construct a heterogeneous multi-agent system, which includes machine learning agents and several large language model agents; the large language model agents include large language model agents that process environmental features, large language model agents that process location features, large language model agents that process spatiotemporal features, and large language model agents that process vehicle features. Coordinator for multi-source feature vectors Semantic segmentation is performed to obtain feature subsets corresponding to each large language model agent, and each feature subset is distributed to the corresponding large language model agent, thus converting the multi-source feature vectors... Input to the machine learning agent; Each agent independently executes its local inference process and outputs structured tuples. ,in The action output by the i-th agent is also the predicted category of accident severity. Let be the confidence level of the prediction made by the i-th agent. The inference text used as the basis for feature association analysis and category determination in the i-th intelligent agent; Each intelligent agent will use structured tuples It is transmitted back to the coordinator through a centralized coordination mechanism; The coordinator uses a reinforcement learning algorithm to dynamically integrate the structured tuples of all agents and output coordinated actions. ,in Let be the candidate actions after coordination at time t. Weight allocation for the outputs of each agent; The coordinator is based on the coordination action Generate final prediction results, including the final accident severity category. The overall confidence level of the interactive system composed of heterogeneous multi-agent systems and coordinators and integrated reasoning texts .

[0006] Furthermore, domain knowledge rules and feature importance analysis are employed to analyze multi-source feature vectors. Semantic segmentation is performed; the feature importance analysis employs the random forest feature importance algorithm.

[0007] Furthermore, when each agent independently performs local inference, it employs a multi-source feature fusion and context-aware inference mechanism.

[0008] Furthermore, the PPO algorithm is used as the update strategy for the reinforcement learning algorithm; The state at time t in the reinforcement learning algorithm is: Where A represents the set of machine learning agents and several large language model agents. Include The actual coordinated actions at each moment, the reward value, the output of all agents, and the state vector encoded by one-hot encoding and normalized unified encoding; The reward function in reinforcement learning algorithms is : ; in, Basic classification reward function, , , All are preset weighting coefficients; For class imbalance-aware reward function, To support the reward function for confidence level, For ordered misclassification penalty items; The expression is: ; in, The severity of the accident is categorized by inverse frequency weights. For indicator functions, used when At the same time, additional rewards are given for correctly identifying minority class samples; The actual accident severity category at time t; The expression is: ; in, To support the average confidence of the current candidate action, the expression is: ; in, The output action is the set of agents whose actions are the current candidate actions. At time t The confidence level of the k-th agent; The expression is: ; in, Used to map accident severity categories to levels.

[0009] Furthermore, the reinforcement learning algorithm employs an Actor-Critic architecture, where the input to the Actor network is the state. The output is a coordinated action. The input to the Critic network is the state. The output is the state value; the training process uses a pruned objective function. For stable training, the pruning objective function is: ; in, For policy networks, For policy network parameters, For the expected symbol, For the current policy network in state Take coordinated action The probability, Indicates the old policy network in state Take coordinated action The probability, The dominant function represents the coordinated action. Compared to the quality of average movements, This is the cutting factor; This is the clipping function.

[0010] Furthermore, the training process of the reinforcement learning algorithm includes: Step A: Construct a simulation environment based on historical traffic accident datasets. The samples in the simulation environment contain multi-source feature vectors of traffic accidents. Corresponding to the severity category labels of real accidents; Step B: The coordinator interacts with the multi-agent system to collect trajectories, which include states, coordinated actions, and reward functions. A trajectory caching mechanism is used to stabilize the data distribution. Step C: After collecting each batch of trajectories, update the Actor network and Critic network using the PPO algorithm; Step D: After the interactive system is deployed, online adjustments to the interactive system are triggered by data drift detection to continuously adapt to dynamic traffic scenarios.

[0011] Furthermore, integrated reasoning texts The generation logic is to combine the reasoning text of each agent, supplement the explanation of the overall confidence of the interaction system and the basis for the judgment of the prediction category, and form an interpretable final reasoning text.

[0012] A traffic accident severity prediction system based on multi-agent reinforcement learning includes: The feature input module is used to obtain multi-source feature vectors of traffic accidents. And perform preprocessing; The multi-agent reasoning module is used to build a heterogeneous multi-agent system, which includes machine learning agents and several large language model agents. Each language model agent independently executes its local reasoning process and outputs structured tuples. ; The coordination module is used to coordinate structured tuples The data is fed back to the coordinator through a centralized coordination mechanism; the coordinator dynamically integrates the structured tuples of all agents and outputs coordinated actions. The decision output module is used to generate the final accident severity category, overall confidence level, and integrated reasoning text based on coordinated actions.

[0013] A computer device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of a traffic accident severity prediction method based on multi-agent reinforcement learning.

[0014] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a traffic accident severity prediction method based on multi-agent reinforcement learning.

[0015] Beneficial effects:

[0016] 1. This invention utilizes heterogeneous multi-agent division of labor to process feature subsets with different semantics, fully leveraging the advantages of expert models in various fields, and then dynamically fusions them through a reinforcement learning coordinator for comprehensive decision-making, effectively improving prediction accuracy.

[0017] 2. In this invention, each agent provides a structured output containing reasoning text, and the coordinator generates integrated reasoning text, so that the final prediction result has clear feature association analysis and decision basis, which improves the transparency and credibility of the system.

[0018] 3. A class balance reward is introduced into the reinforcement learning reward function to encourage the model to focus on minority class samples, mitigating the prediction bias caused by the scarcity of severe accident samples. Existing reinforcement learning reward functions only use a globally uniform classification accuracy reward, failing to consider the extremely imbalanced nature of traffic accident datasets. Minor accidents have a very high proportion of samples, while minority class samples such as severe accidents are scarce, easily leading the model to learn majority class features, resulting in missed detections of severe accidents and prediction bias. Therefore, this invention adds a class balance reward term to the overall reinforcement learning reward function, setting dynamic weights inversely proportional to the number of samples in each class, assigning higher reward weights to the scarce severe accident category. During multi-agent inference fusion, this guides the model to focus on minority class risk features. This design effectively mitigates prediction bias caused by class imbalance, reduces the missed detection rate of high-risk accidents, improves the identification accuracy of severe accidents, and enhances the model's robustness to imbalanced traffic data.

[0019] 4. The reinforcement learning-based coordinator can learn the optimal fusion strategy through continuous interaction with the environment and supports online fine-tuning, enabling the system to adapt to the dynamic changes in traffic data distribution. Attached Figure Description

[0020] Figure 1 This is an overall flowchart of the traffic accident severity prediction method provided by the present invention.

[0021] Figure 2 This is a schematic diagram of the interaction between the heterogeneous multi-agent system and the coordinator provided by the present invention.

[0022] Figure 3 This is a schematic diagram of the training process of the reinforcement learning coordinator provided by the present invention.

[0023] Figure 4This is a flowchart of the traffic accident severity prediction system provided by the present invention. Detailed Implementation

[0024] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0025] This invention discloses a method and system for predicting the severity of traffic accidents based on multi-agent collaboration and reinforcement learning. The method first obtains traffic accident feature vectors containing multi-source heterogeneous features and constructs a heterogeneous multi-agent system composed of machine learning agents and multiple domain-specific large-scale language model agents. Based on domain knowledge and feature importance, the features are divided into corresponding subsets. Each agent performs local inference and outputs a structured tuple containing the predicted category, confidence level, and inference text. Through a centralized coordination mechanism, a coordinator using the PPO reinforcement learning algorithm dynamically integrates the outputs of all agents, learning to generate coordinated actions containing the final predicted category and agent weight allocation. Finally, interpretable accident severity categories, overall system confidence levels, and integrated inference text are generated. This invention achieves efficient fusion and collaborative inference of multi-source information, significantly improving prediction accuracy, decision interpretability, and adaptability to dynamic traffic environments.

[0026] This embodiment describes in detail the implementation process of the prediction method, and the overall flowchart is as follows: Figure 1 As shown:

[0027] S1. Obtain multi-source feature vectors of traffic accidents. The multi-source features include numerical features, categorical features, and textual features. Including features related to time, location, weather, vehicles, and personnel, a set of predicted accident severity categories is determined. K represents the total number of categories; weather is a category feature.

[0028] S2. Construct a heterogeneous multi-agent system, which includes a machine learning agent and several large language model agents. The large language model agents include at least specialized agents for processing environmental features, location features, spatiotemporal correlation features and vehicle features, respectively.

[0029] S3. Based on domain knowledge rules and feature importance analysis, analyze multi-source feature vectors. Semantic segmentation is performed to obtain feature subsets corresponding to the professional domains of each agent, and each feature subset is distributed to the corresponding agent; multi-source feature vectors are then processed. Input into the machine learning agent.

[0030] S4. Each agent independently executes its local inference process and outputs structured tuples. ,in The action output by the i-th agent is also the predicted category of accident severity. The confidence level of this prediction. This refers to reasoning text that includes feature association analysis and category determination criteria.

[0031] S5. Each intelligent agent will transfer the structured tuples. It is transmitted back to the coordinator through a centralized coordination mechanism.

[0032] S6. The coordinator uses a reinforcement learning algorithm to learn the policy function. It dynamically integrates the structured tuples of all agents and outputs coordinated actions. ,in Let be the candidate actions after coordination at time t. Weights are assigned to the outputs of each agent.

[0033] S7, The coordinator, based on the coordination action... Generate final prediction results, including the final accident severity category. The overall confidence level of the system (in this case, the system is an interactive system consisting of a coordinator and a heterogeneous multi-agent system). and integrated reasoning texts .

[0034] Specifically, in step S2, the domain-specific large-scale language model intelligent agent includes an environment intelligent agent, a location intelligent agent, a spatiotemporal intelligent agent, and a vehicle intelligent agent; the environment intelligent agent is used to process feature subsets related to weather, visibility, and road conditions; the location intelligent agent is used to process feature subsets related to road type, intersection attributes, and speed limit; the spatiotemporal intelligent agent is used to process feature subsets related to time and space; and the vehicle intelligent agent is used to process feature subsets related to vehicle type and vehicle status.

[0035] The feature importance analysis described in step S3 is implemented using the random forest feature importance algorithm.

[0036] The local reasoning of the machine learning agent and the domain-specific large language model in step S4 adopts a multimodal feature fusion and context-aware reasoning mechanism. The multimodal feature fusion includes the fusion of multi-source features such as text, numerical values, and categories.

[0037] The reinforcement learning algorithm described in step S6 is the PPO algorithm, and the state, coordinated action, and reward function of the reinforcement learning are defined as follows:

[0038] (1) State The state at time t is the sum of structured tuples output by all agents and the set of historical information, i.e. ,in Include The actual coordination decision at each moment, the reward value, the output of all agents, and the state vector through one-hot encoding and normalized unified encoding.

[0039] (2) Coordinated movements The coordinated action consists of two parts: the final predicted category and the agent's weight allocation. ,in, Let be the candidate actions after coordination at time t. Weights are assigned to the outputs of each agent.

[0040] (3) Reward function A multi-objective weighted combined reward function is adopted, namely:

[0041] ;

[0042] in, Basic classification reward function, , , All are preset weighting coefficients; For class imbalance-aware reward function, To support the reward function for confidence level, This is a penalty item for misclassification in an ordered manner.

[0043] The expression is:

[0044] ;

[0045] in, The severity of the accident is categorized by inverse frequency weights. For indicator functions, used when At the same time, additional rewards are given for correctly identifying minority class samples; The actual accident severity category at time t;

[0046] The expression is:

[0047] ;

[0048] in, To support the average confidence of the current candidate action, the expression is:

[0049] ;

[0050] in, The output action is the set of agents whose actions are the current candidate actions. At time t The confidence level of the k-th agent;

[0051] The expression is:

[0052] ;

[0053] in, Used to map accident severity categories to levels.

[0054] In its implementation, the reinforcement learning adopts an Actor-Critic architecture, where the input to the Actor network is the state. The output is the coordinated action distribution; the input of the Critic network is the state. The output is the state value; the training process uses a pruned objective function. For stable training, the pruning objective function is:

[0055] ;

[0056] in, The dominant function represents the coordinated action. The relative quality of actions compared to the average action is used to guide the direction of strategy updates. This is the cutting factor.

[0057] The logic for generating the integrated reasoning text in step S7 is to combine the reasoning texts of each agent, supplement the explanation of the overall confidence of the interactive system and the basis for determining the prediction category, and form an interpretable final reasoning text.

[0058] The training process of the reinforcement learning algorithm includes:

[0059] Step A: Construct a simulation environment based on historical traffic accident datasets. The samples in the simulation environment contain feature vectors and corresponding labels for the severity of real accidents.

[0060] Step B: The coordinator interacts with the multi-agent system to collect trajectories. A trajectory caching mechanism is used to stabilize data distribution;

[0061] Step C: For each batch of trajectories collected, the PPO algorithm is used to update the Actor network and Critic network, with a learning rate of 3e-4 and 10-20 iterations.

[0062] Step D: After the model is deployed, online fine-tuning is triggered by data drift detection to continuously adapt to dynamic traffic scenarios.

[0063] On the other hand, embodiments of the present invention also provide a traffic accident severity prediction system based on multi-agent reinforcement learning, used to implement the above prediction method, such as... Figure 4 As shown, the system includes:

[0064] Feature input module: Receives raw features from the data source and calls the preprocessor to generate a standardized multi-source feature vector X;

[0065] Multi-agent inference module: This module contains pre-trained machine learning models and four domain-specific large language models. It receives feature subset distribution instructions from the coordination module, performs inference in parallel, and returns structured tuples.

[0066] Coordination Module: This is the core module, containing the trained PPO policy model. It is responsible for scheduling communication, integrating information, and executing reinforcement learning decision logic.

[0067] Decision output module: Receives coordination actions, formats the final prediction results (category, confidence level, text report), and provides them to the user via API or interface.

[0068] The system can be deployed in the cloud or on edge servers to provide traffic control centers with real-time, interpretable assessments of accident severity.

[0069] The following are examples:

[0070] 1) Data Acquisition and Preprocessing

[0071] Historical accident records are retrieved from traffic management department accident databases, meteorological databases, and road GIS databases. Each record contains the following multi-source features: time (e.g., hour, day of the week, whether it is a holiday), location (e.g., GPS coordinates, administrative division), weather (e.g., temperature, precipitation, wind speed, visibility), vehicle (e.g., type, vehicle age, vehicle speed, damaged parts), and other numerical features, categorical features (features of categorical variables), and some textual descriptive features. Numerical features are normalized (e.g., Min-Max normalization), categorical features are one-hot encoded or embedded, and text features are extracted using a pre-trained large-scale language model (e.g., Qwen2.5-7B-Instruct; the agents in this embodiment all use Qwen2.5-7B-Instruct). All processed features are concatenated to form a multi-source feature vector X. Accident severity is divided into K levels (e.g., K=3, corresponding to minor, moderate, and severe) based on casualties and property damage, forming a category set Y.

[0072] 2) Constructing heterogeneous multi-agent systems

[0073] The system includes a general machine learning agent and four domain-specific large language model agents. The environment agent is used to process feature subsets related to weather, visibility, and road conditions; the location agent is used to process feature subsets related to road type, intersection attributes, and speed limit; the spatiotemporal agent is used to process feature subsets related to time and space; and the vehicle agent is used to process feature subsets related to vehicle type and vehicle status.

[0074] 3) Feature segmentation

[0075] First, domain knowledge is used to initially categorize features into the four domains mentioned above. Then, a random forest model is trained on historical data to calculate the importance score of each feature to the prediction target. Combining domain knowledge and feature importance, the multi-source feature vector X is precisely divided into four feature subsets, corresponding to environment, location, spatiotemporal, and vehicle agents, respectively. All source feature vectors X are then input into a general machine learning agent.

[0076] 4) Local reasoning

[0077] Each agent receives its own subset of features and performs independent reasoning. The machine learning agent directly outputs the predicted accident severity category and probability distribution. Simultaneously, using interpretable tools such as SHAP, it generates concise descriptions of feature importance as reasoning text. Domain-specific large language models, combined with their input feature descriptions, perform context-aware reasoning, outputting the predicted category, confidence level, and a natural language reasoning text. For example, the environmental agent might output: "Based on input features (low visibility, slippery road surface), the model judges the accident severity to be serious injury level with a confidence level of 85%. Basis: Low visibility and slippery road surfaces significantly increase the difficulty of vehicle control and the risk of collision." Each agent ultimately outputs a structured tuple. .

[0078] 5) Centralized coordination and communication

[0079] like Figure 2 As shown, the coordinator, acting as the central node, first distributes the preprocessed total feature vector X to the corresponding agents according to the partitioning rules. After each agent completes local inference, it converts the structured tuples... It is sent back to the coordinator.

[0080] 6) Strengthen learning and coordination in decision-making

[0081] The coordinator internally runs an agent based on the PPO algorithm. Its state... The tuples returned by all agents at the current moment and the history of decisions made in the past. It is composed of, and after encoding, forms a state vector.

[0082] Coordinating actions of the coordinator It is a compound action. This means selecting one category from the set of categories Y as the final prediction candidate. Let be a continuous vector, representing the confidence level of each agent. Assign a dynamic weight ,satisfy Used to calculate the overall confidence level of the system. .

[0083] reward function The design is as follows:

[0084] ;

[0085] In this embodiment, if If it matches the real label, then +1 otherwise -0.5.

[0086] coefficient , , Configured using grid search and cross-validation.

[0087] The coordinator's policy network is based on the state The output coordinates the distribution of actions, and the value network evaluates the state value. Training is performed using the PPO pruning objective function to stabilize the learning process.

[0088] The reinforcement learning adopts an Actor-Critic architecture, where the input to the Actor network is the state. The output is the coordinated action distribution; the input of the Critic network is the state. The output is the state value; the training process uses a pruned objective function. For stable training, the pruning objective function is:

[0089] ;

[0090] in The dominant function represents the coordinated action. The relative quality of actions compared to the average action is used to guide the direction of strategy updates. This is the cutting factor.

[0091] 7) Generate the final prediction results

[0092] The coordinator performs candidate actions and ultimately predicts the category. Overall system confidence ,in From Integrated reasoning text The generation method is as follows: the coordinator summarizes the reasoning texts of each agent. and their weights Please provide further explanation.

[0093] like Figure 3 As shown, the training process of the reinforcement learning algorithm includes:

[0094] Step A: Construct a simulation environment based on historical traffic accident datasets. The samples in the simulation environment contain feature vectors and corresponding labels for the severity of real accidents.

[0095] Step B: The coordinator interacts with the multi-agent system to collect trajectories. A trajectory caching mechanism is used to stabilize data distribution;

[0096] Step C: For each batch of trajectories collected, the PPO algorithm is used to update the Actor network and Critic network, with a learning rate of 3e-4 and 10-20 iterations.

[0097] Step D: After the model is deployed, online fine-tuning is triggered by data drift detection to continuously adapt to dynamic traffic scenarios.

[0098] To verify the technical effects described in this invention, this embodiment conducts a simulation experiment based on a publicly available traffic accident dataset. Using the traffic accident dataset, 12,000 historical accident records from 2022 were selected and divided into a training set and a test set at an 8:2 ratio. The dataset includes a set of accident severity categories. These correspond to mild, moderate, and severe, with the categories accounting for 69% for mild, 30% for moderate, and 1% for severe, which is consistent with the unbalanced category characteristics in real-world scenarios.

[0099] To verify the beneficial effects of the present invention, two comparison methods were set up:

[0100] Comparison with Option 1: A single machine learning model (XGBoost) that directly inputs all multi-source feature vectors for prediction;

[0101] Comparison Scheme 2: Multi-agent equal-weight fusion scheme, where the inference results of agents in different domains are integrated with equal weight.

[0102] The experimental results are shown in Table 1. As can be seen from Table 1, the proposed solution significantly outperforms both the first and second solutions in all metrics. Compared to a single machine learning model, the proposed solution improves Macro-F1 (Macro-averaged F1-score) by 28.8%, Macro-Recall (Macro-averaged Recall) by 20.2%, Macro-Precision (Macro-averaged Precision / Macro-averaged Detection Precision) by 10.3%, and Fatal Recall by 34.6%, significantly reducing the false negative rate of high-risk incidents. Compared to the equal-weighted multi-agent fusion solution (Solution 2), the proposed solution improves Macro-F1 by 10.9%, Macro-Recall by 11.2%, Macro-Precision by 6.3%, and Fatal Recall by 17%, verifying the effectiveness of the reinforcement learning dynamic weight coordination mechanism.

[0103] Table 1 Comparison of Indicators for Different Schemes

[0104] Option 1 44.3% 43.3% 70.2% 35% Option 2 62.2% 52.6% 74.2% 52.6% This invention 73.1% 63.8% 80.5% 69.6%

[0105] The simulation data above fully demonstrates that in real traffic accident datasets with imbalanced categories, this invention effectively captures the impact of different domain features on the severity of accidents through multi-agent division of labor modeling and dynamic coordination of reinforcement learning. The overall prediction performance is significantly better than that of a single model and a fixed-weight fusion scheme. At the same time, it can more accurately identify high-risk accident samples, providing key support for traffic emergency rescue and risk management.

[0106] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0107] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0108] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the methods described in the above embodiments.

[0109] It is understood that the systems, devices, and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.

[0110] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0111] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0112] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0113] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the severity of traffic accidents based on multi-agent reinforcement learning, characterized in that, Specifically: Obtaining multi-source feature vectors of traffic accidents And preprocessing is performed, the multi-source features include numerical features, category features and text features; Construct a heterogeneous multi-agent system, which includes machine learning agents and several large language model agents; the large language model agents include large language model agents that process environmental features, large language model agents that process location features, large language model agents that process spatiotemporal features, and large language model agents that process vehicle features. Coordinator for multi-source feature vectors Semantic segmentation is performed to obtain feature subsets corresponding to the large language model agent, and each feature subset is distributed to the corresponding large language model agent, thus converting the multi-source feature vectors... Input to the machine learning agent; Each agent independently executes its local inference process and outputs structured tuples. ,in The action output by the i-th agent is also the predicted category of accident severity. Let be the confidence level of the prediction made by the i-th agent. The inference text used as the basis for feature association analysis and category determination in the i-th intelligent agent; Each intelligent agent will use structured tuples It is transmitted back to the coordinator through a centralized coordination mechanism; The coordinator uses a reinforcement learning algorithm to dynamically integrate the structured tuples of all agents and output coordinated actions. ,in Let be the candidate actions after coordination at time t. Weight allocation for the outputs of each agent; The coordinator is based on the coordination action Generate final prediction results, including the final accident severity category. The overall confidence level of the interactive system composed of heterogeneous multi-agent systems and coordinators and integrated reasoning texts ; The update strategy of the reinforcement learning algorithm adopts the PPO algorithm; The state at time t in the reinforcement learning algorithm is: Where A represents the set of machine learning agents and several large language model agents. Include The actual coordinated actions at each moment, the reward value, the output of all agents, and the state vector encoded by one-hot encoding and normalized unified encoding; The reward function in reinforcement learning algorithms is : ; in, Basic classification reward function, , , All are preset weighting coefficients; For class imbalance-aware reward function, To support the reward function for confidence level, For ordered misclassification penalty items; The expression is: ; in, The severity of the accident is categorized by inverse frequency weights. For indicator functions, used when At the same time, additional rewards are given for correctly identifying minority class samples; The actual accident severity category at time t; The expression is: ; in, To support the average confidence of the current candidate action, the expression is: ; in, The output action is the set of agents whose actions are the current candidate actions. At time t The confidence level of the k-th agent; The expression is: ; in, Used to map accident severity categories to levels.

2. The method for predicting the severity of traffic accidents based on multi-agent reinforcement learning according to claim 1, characterized in that, Using domain knowledge rules and feature importance analysis, multi-source feature vectors are analyzed. Semantic segmentation is performed; the feature importance analysis employs the random forest feature importance algorithm.

3. The traffic accident severity prediction method based on multi-agent reinforcement learning according to claim 1, characterized in that, When each agent independently performs local inference, it adopts a multi-source feature fusion and context-aware inference mechanism.

4. The method for predicting the severity of traffic accidents based on multi-agent reinforcement learning according to claim 1, characterized in that, The reinforcement learning algorithm adopts an Actor-Critic architecture, where the input to the Actor network is the state. The output is a coordinated action. The input to the Critic network is the state. The output is the state value; the training process uses a pruned objective function. For stable training, the pruning objective function is: ; in, For policy networks, For policy network parameters, For the expected symbol, For the current policy network in state Take coordinated action The probability, Indicates the old policy network in state Take coordinated action The probability, The dominant function represents the coordinated action. Compared to the quality of average movements, This is the cutting factor; This is the clipping function.

5. The traffic accident severity prediction method based on multi-agent reinforcement learning according to claim 4, characterized in that, The training process of the reinforcement learning algorithm includes: Step A: Construct a simulation environment based on historical traffic accident datasets. The samples in the simulation environment contain multi-source feature vectors of traffic accidents. Corresponding to the severity category labels of real accidents; Step B: The coordinator interacts with the multi-agent system to collect trajectories, which include states, actions, and reward functions. A trajectory caching mechanism is used to stabilize the data distribution. Step C: After collecting each batch of trajectories, update the Actor network and Critic network using the PPO algorithm; Step D: After the model is deployed, the interactive system is adjusted online by detecting data drift to continuously adapt to dynamic traffic scenarios.

6. The method for predicting the severity of traffic accidents based on multi-agent reinforcement learning according to claim 1, characterized in that, Integrated reasoning text The generation logic is to combine the reasoning text of each agent, supplement the explanation of the overall confidence of the interaction system and the basis for the judgment of the prediction category, and form an interpretable final reasoning text.

7. A traffic accident severity prediction system based on multi-agent reinforcement learning according to the method described in claim 1, characterized in that, include: The feature input module is used to obtain multi-source feature vectors of traffic accidents. And perform preprocessing; The multi-agent reasoning module is used to build a heterogeneous multi-agent system, which includes machine learning agents and several large language model agents. Each language model agent independently executes its local reasoning process and outputs structured tuples. ; The coordination module will coordinate structured tuples. The data is fed back to the coordinator through a centralized coordination mechanism; the coordinator dynamically integrates the structured tuples of all agents and outputs coordinated actions. The decision output module is used to generate the final accident severity category, overall confidence level, and integrated reasoning text based on coordinated actions.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of a traffic accident severity prediction method based on multi-agent reinforcement learning as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of a traffic accident severity prediction method based on multi-agent reinforcement learning as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Power distribution network source network load storage low-carbon optimization scheduling increment reinforcement learning method and system

    CN119623567A

  • Dynamic data generation system and method based on reinforcement learning

    CN121352068A