A traffic accident influence time prediction method and system based on size model cooperation

CN122988129APending Publication Date: 2026-10-27JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611420980.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

主要困难在于事故持续时间的长尾分布特性:大多数事件持续时间较短,而少数中等和长持续时间事件却对整体延误和运营成本产生不成比例的影响

Benefits of technology

[0031]1. 提升长时事故影响时间类别的预测性能:本发明通过大语言模型根据事故场景信息和专家模型预测结果生成专家贡献权重,并对多个专家模型输出进行加权聚合,充分利用不同预测模型在不同事故场景下的互补优势,提高了长持续时间事故事件的预测能力,有效缓解传统预测模型在长尾分布场景下面对少量长时事件时预测性能不足的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122988129A_ABST
    Figure CN122988129A_ABST
Patent Text Reader

Abstract

The application discloses a traffic accident influence time prediction method and system based on large and small models, and belongs to the intelligent traffic system and artificial intelligence technical field.The method comprises the following steps: (1) obtaining structured feature information of a traffic accident, and constructing an accident scene input representation; (2) inputting the feature into an expert model pool composed of multiple heterogeneous small-scale machine learning models, and obtaining prediction results of the influence time categories of each model; (3) inputting the accident feature information and the prediction results of each expert model into a large language model, and generating decision contribution weights of each expert model based on the semantic understanding and reasoning ability of the large language model; and (4) weighting and aggregating each prediction result according to the contribution weights to obtain a final prediction result.Through the semantic reasoning and decision fusion ability of the large language model, the self-adaptive cooperation of the expert model is realized, the long-time accident influence time prediction performance is effectively improved, the stability of the medium and short-time prediction is maintained, and an effective scheme for the large language model assisted intelligent traffic structured prediction is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent transportation systems and artificial intelligence technology, specifically relating to a method and system for predicting the impact time of traffic accidents using a combination of large and small models. Background Technology

[0002] Highway accidents are a major source of non-recurring congestion, with their impact spreading beyond the accident site through spillover, secondary collisions, and cascading delays. For traffic management centers, it is crucial not only to detect accidents promptly but also to accurately predict the duration of their impact. Inaccurate predictions can have serious consequences: underestimating the impact time may delay interventions and exacerbate congestion; while overestimation may trigger unnecessary control measures and reduce system credibility. Although machine learning and deep learning methods have made significant progress in accident duration prediction, achieving reliable and robust predictions remains challenging. The main difficulty lies in the long-tailed distribution of accident durations: most events are short-lived, while a few medium- and long-lasting events disproportionately impact overall delays and operating costs. In complex real-world scenarios, especially in prediction tasks requiring semantic understanding, the predictive performance of these models deteriorates significantly. Large language models, pre-trained on large-scale corpora, offer a promising approach to addressing these issues. In addition to powerful text understanding capabilities, large language models possess rich world knowledge and contextual reasoning abilities, enabling them to perform higher-level semantic parsing from structured inputs. Summary of the Invention

[0003] This invention addresses the problems of existing technologies by providing a method and system for predicting the duration of traffic accident impacts through a combination of large and small model collaboration. This method combines the advantages of large language models and traditional machine learning methods. By integrating semantic priors from large language models into a structured prediction process, it establishes joint modeling between numerical relationships and higher-order contextual dependencies, achieving higher accuracy in predicting the duration of traffic accidents. This invention provides a practical framework for using large language models for structured prediction tasks in intelligent transportation systems.

[0004] To address the above technical problems, this invention provides the following technical solution: a method for predicting the impact time of traffic accidents using a combination of large and small models, comprising the following steps:

[0005] S1. Obtain traffic accident information and construct a structured feature representation of traffic accidents;

[0006] S2. Input the structured features of traffic accidents into an expert model pool consisting of multiple heterogeneous small-scale prediction models, and obtain the prediction results of the impact time category corresponding to each expert model.

[0007] S3. Input the structured accident feature information and the prediction results of each expert model into the large language model, and use the large language model as a decision routing module to generate weight information to characterize the contribution of each expert model.

[0008] S4. The prediction results of each expert model are weighted and aggregated according to the contribution weight of the expert model to obtain the final prediction result of the traffic accident impact time.

[0009] Furthermore, the aforementioned step S1 includes the following steps:

[0010] S1.1 Collect relevant data on highway traffic accidents, including: accident time, accident type, weather conditions, road environment, and information on the vehicles involved, and perform preprocessing.

[0011] S1.2. Based on the data processed in step S1.1, extract structured features and construct a d-dimensional accident feature vector. ;

[0012] The structured features include time features (hourly time period, weekend indicator), vehicle features (number of vehicles involved, proportion of heavy trucks), severity features (ordered injury level), and environmental features (weather conditions, visibility).

[0013] S1.3. The impact time of traffic accidents is divided into three categories according to the duration: short-term events with a duration of less than 15 minutes, medium-term events with a duration of 15 minutes or more but less than 60 minutes, and long-term events with a duration of 60 minutes or more. The impact time categories are used as prediction targets.

[0014] Furthermore, the aforementioned step S2 includes the following sub-steps:

[0015] S2.1 Construct an expert model pool containing multiple heterogeneous prediction models. The expert model pool includes, but is not limited to, attention-based models, recurrent neural network models, traditional machine learning models, and prediction models constructed based on large language model prompting mechanisms, so as to form a set of expert models with different modeling mechanisms.

[0016] S2.2, Let the models in the expert model pool constructed in step S2.1 be represented as follows: The structured feature vector obtained in step S1 enter The prediction results were obtained. .

[0017] Furthermore, the aforementioned step S3 includes the following steps:

[0018] S3.1. Combine the structured feature vector F obtained in step S1 with the prediction result obtained in step S2. By concatenating the features, a joint feature vector is obtained. , Represents structured feature vectors;

[0019] Step S3.2: The joint feature vector obtained in step S3.1 Input the large language model, which jointly analyzes the accident scene features and expert model prediction information to generate decision parameters that characterize the contribution of the expert model;

[0020] Step S3.3: Normalize the decision parameters obtained in step S3.2 to obtain the expert model contribution weight vector. , LLM(·) represents the inference function of a large language model.

[0021] Furthermore, in step S3.2 above, when the large language model generates the contribution weights of the expert models, the historical prediction performance information of each expert model in different impact time categories is used as an auxiliary input, and together with the accident feature information and expert prediction results, it is provided to the large language model to assist the large language model in allocating expert contribution weights.

[0022] Furthermore, in step S4 above, the expert model weight vector obtained in step S3.3 is... Compared with the prediction results obtained in step S2 Weighted aggregation is performed to obtain the final predicted time of impact of traffic accidents. The expert model weight vector satisfies the normalization constraint. E represents the total number of expert models. , Let represent the trust weight and prediction result of the e-th expert model, respectively.

[0023] This invention also provides a traffic accident impact time prediction system based on large and small model collaboration, used in the aforementioned traffic accident impact time prediction method based on large and small model collaboration, comprising:

[0024] The feature acquisition module is used to acquire structured feature information of traffic accidents, construct input representations of traffic accident scenes, and output structured feature representations.

[0025] The expert model pool consists of multiple heterogeneous small-scale prediction models. Each expert model is used to receive the structured feature representation and output its corresponding prediction result for the time category of influence.

[0026] The decision routing module, which is a large language model, is used to receive the structured feature information and the prediction results of each expert model, and generate weight information to characterize the contribution of each expert model.

[0027] The weighted aggregation module is used to weight and aggregate the prediction results of each expert model according to the contribution weight of each expert model output by the decision routing module, so as to obtain the final prediction result of the traffic accident impact time.

[0028] The present invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described in the present invention.

[0029] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described in the present invention.

[0030] Compared with the prior art, the beneficial technical effects of the present invention using the above technical solution are as follows:

[0031] 1. Improve the predictive performance of long-duration accident impact time categories: This invention generates expert contribution weights based on accident scenario information and expert model prediction results using a large language model, and performs weighted aggregation of multiple expert model outputs. It fully utilizes the complementary advantages of different prediction models in different accident scenarios, improves the predictive ability of long-duration accident events, and effectively alleviates the problem of insufficient prediction performance of traditional prediction models in long-tailed distribution scenarios when dealing with a small number of long-duration events.

[0032] 2. Adaptive expert weight allocation for accident scenarios: Unlike fixed-weight fusion or simple voting integration methods, this invention uses a large language model to comprehensively analyze accident feature information and expert prediction results, and adaptively adjusts the contribution of each expert model according to different input scenarios, so that different prediction models can play a role in suitable accident scenarios, thereby improving the flexibility and effectiveness of the prediction process.

[0033] 3. Improve the analyzability of the prediction process: By generating explicit expert model contribution weights, this invention can reflect the degree of role of different expert models in prediction tasks of different accident impact time categories, providing a basis for analyzing the applicable scenarios of each prediction model and optimizing model combinations, thereby improving the analyzability of the collaborative prediction process of large and small models.

[0034] 4. Excellent adaptability and scalability: This invention employs an expert model pool composed of multiple heterogeneous small-scale prediction models, independent of any specific prediction model type. Expert models can be replaced or expanded according to actual application needs. Simultaneously, the large language model integrates the prediction results from different experts to make comprehensive decisions, enabling the method to be applicable to various traffic accident scenarios, thus improving its generalization ability and practical application value. Attached Figure Description

[0035] Figure 1 A framework for predicting the impact time of traffic accidents by combining large and small models is presented;

[0036] Figure 2 This is a schematic diagram of the location of the road segment under study in an embodiment of the present invention;

[0037] Figure 3 This is a comparison chart of the prediction performance of the present invention with that of various expert models in different duration categories in the embodiments;

[0038] Figure 4 Sensitivity analysis of the number of experts in the embodiments within the framework proposed in this invention;

[0039] Figure 5 This is a weighted heatmap of the expert model assigned under three accident impact times in the embodiments of the method proposed in this invention. Detailed Implementation

[0040] To better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.

[0041] In this invention, various aspects of the invention are described with reference to the accompanying drawings, in which numerous illustrative embodiments are shown. Embodiments of the invention are not limited to those depicted in the drawings. It should be understood that the invention is implemented through any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail below, because the concepts and embodiments disclosed herein are not limited to any particular implementation. Furthermore, some aspects of the invention disclosed may be used alone or in any suitable combination with other aspects of the invention disclosed.

[0042] In this embodiment, a large language model is used as the expert model decision module to comprehensively analyze the output results of multiple heterogeneous small-scale prediction models and generate expert model contribution weights. To verify the applicability of different large language models to this method, this embodiment uses three large language models—Qwen3-32B, DeepSeek-V3, and Pangu-718B—for testing. The inference parameters are set as follows: temperature parameter is 0.7, top-p parameter is 0.9, maximum generation length is 512 tokens, and the model output format is limited to JSON format.

[0043] like Figure 1 As shown, this invention provides a method for predicting the impact time of traffic accidents using a combination of large and small models. The specific implementation steps are as follows:

[0044] Step 1: Traffic accident data preprocessing and feature construction:

[0045] Step 1.1: Taking the section of G15 Shenhai Expressway from Guzhu Interchange to Wu'ao Interchange in Zhejiang Province, China as the research object, such as... Figure 2 The section of road is approximately 142 kilometers long. Highway traffic accident data was collected from 2019 to 2025, resulting in 21,737 real accident records. The collected data underwent data cleaning, outlier removal, and missing value processing. Outlier removal included removing records with negative durations and records with durations exceeding 24 hours.

[0046] Step 1.2: Extract structured features, including hourly time periods and weekend indicators to represent time features; the number of vehicles involved and the proportion of heavy trucks to represent vehicle features; ordered injury levels to represent the severity of injuries and fatalities; and weather conditions and visibility to represent environmental features, constructing a d-dimensional accident feature vector. .

[0047] Step 1.3: Divide the duration of the accident impact into three categories: short-term events with an impact time of less than 15 minutes, medium-term events with an impact time of 15 to 60 minutes, and long-term events with an impact time of more than 60 minutes. These three categories are used as the target labels for classification prediction. In this embodiment, short-term events, medium-term events, and long-term events account for 42.71%, 41.55%, and 15.74%, respectively, and the data shows a certain degree of long-tail distribution. Divide the dataset into training set and test set in an 8:2 ratio.

[0048] Step 2: Construction of the expert model pool and preliminary prediction:

[0049] Step 2.1: Construct an expert model pool containing multiple heterogeneous prediction models. This embodiment constructs an expert model pool containing multiple heterogeneous prediction models, including traditional machine learning models, deep learning models, and prediction models built based on cue-based learning strategies. The traditional machine learning models include Logistic Regression (LR), Support Vector Machine (SVM), XGBoost, Random Forest (RF), and LightGBM; the deep learning models include Backpropagation Neural Network (BP), Gated Recurrent Unit (GRU), Informer, Prophet, and Transformer; in addition, prediction experts (ZeroShot, FewShot) built based on zero-shot learning and few-shot learning strategies are introduced to form a heterogeneous expert model set.

[0050] Step 2.2: Input the accident feature vector F constructed in Step 1.2 into all 10 expert models in the expert model pool. Each expert model independently generates preliminary prediction results for the three accident impact time categories based on F, and all preliminary prediction results are aggregated into a prediction result set. .

[0051] Step 3: Generation of decision weights for the large language model:

[0052] Step 3.1: Concatenate the accident feature vector F with the prediction result set Y to obtain the joint feature vector. ;

[0053] Step 3.2: Combine the joint feature vectors The input is a large language model, which comprehensively analyzes the accident scene features and the prediction results of the expert model to generate weight parameters to represent the degree of contribution of the expert model. In this embodiment, taking Qwen3-32B as an example, the inference parameters of the large language model are set to temperature 0.7, top-p 0.9, maximum generation length of 512 tokens, and the output format is limited to JSON format.

[0054] Step 3.3: Normalize the expert weight parameters generated by the large language model to obtain the expert model contribution weight vector. In this embodiment, the softmax function is used to achieve weight normalization: .

[0055] Step 4: Weighted aggregation outputs the final prediction result:

[0056] The expert weight vector w obtained in step 3.3 is weighted and aggregated with the preliminary prediction results Y of each expert model obtained in step 2.2 to obtain the final traffic accident impact time classification prediction result. The weights of each expert satisfy the normalization constraint. .

[0057] Combination Figure 3 As shown, this embodiment was experimentally verified using 21,737 real accident data points. The experimental results are as follows:

[0058] (1) Prediction Performance: The MoE routing framework in this embodiment maintains high prediction accuracy across the three duration categories. Under the Qwen3-32B configuration, the accuracy is 0.78 for short-term events, 0.64 for medium-term events, and 0.70 for long-term events. The prediction accuracy for long-term events is significantly better than most single expert models, effectively solving the problem of decreased prediction performance of traditional models for long-term events in long-tailed distribution scenarios. Under three different large language model configurations—Qwen3-32B, DeepSeek-V3, and Pangu-718B—the framework maintains stable and robust performance.

[0059] Table 1 below shows the performance accuracy of various models for different accident durations.

[0060] Table 1

[0061]

[0062] (2) Weight distribution analysis: Analysis of the weight distribution of the output of the large language model shows that the large language model can use prior knowledge to identify the advantages of different experts. It assigns lower weights to expert models that perform relatively poorly, such as zero-shot learning and few-shot learning, while assigning higher weights to expert models that perform well in a specific time interval, such as support vector machine, logistic regression and XGBoost. The weight distribution mechanism intuitively reflects the interpretability of the framework.

[0063] (3) Sensitivity analysis of the number of expert models: such as Figures 4 to 5 When the number of expert models was gradually reduced for sensitivity analysis, the prediction accuracy of short-term and medium-term events remained stable, while the prediction accuracy of long-term events continued to decline from 73% to 60%. This indicates that the prediction of long-term events relies more on the diversity of experts, and maintaining sufficient expert diversity is crucial for handling complex and long-term accident cases.

[0064] Table 2 below shows the sensitivity analysis data of the performance of the method proposed in this invention to the number of expert models.

[0065] Table 2

[0066]

[0067] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the specific embodiments described above. The specific embodiments and descriptions in the specification are merely for further illustrating the principles of the invention. Various changes and modifications can be made to the present invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the claims and their equivalents.

[0068] While the present invention has been described above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the claims.

Claims

1. A method for predicting the impact time of traffic accidents using a combination of large and small models, characterized in that, Includes the following steps: S1. Obtain traffic accident information and construct a structured feature representation of traffic accidents; S2. Input the structured features of traffic accidents into an expert model pool consisting of multiple heterogeneous small-scale prediction models, and obtain the prediction results of the impact time category corresponding to each expert model. S3. Input the structured accident feature information and the prediction results of each expert model into the large language model, and use the large language model as a decision routing module to generate weight information to characterize the contribution of each expert model. S4. The prediction results of each expert model are weighted and aggregated according to the contribution weight of the expert model to obtain the final prediction result of the traffic accident impact time.

2. The method for predicting the impact time of traffic accidents using a combination of large and small models according to claim 1, characterized in that, Step S1 includes the following steps: S1.1 Collect relevant data on highway traffic accidents, including: accident time, accident type, weather conditions, road environment, and information on the vehicles involved, and perform preprocessing. S1.

2. Based on the data processed in step S1.1, extract structured features and construct a d-dimensional accident feature vector. ; The structured features include time features (hourly time period, weekend indicator), vehicle features (number of vehicles involved, proportion of heavy trucks), severity features (ordered injury level), and environmental features (weather conditions, visibility). S1.

3. The impact time of traffic accidents is divided into three categories according to the duration: short-term events with a duration of less than 15 minutes, medium-term events with a duration of 15 minutes or more but less than 60 minutes, and long-term events with a duration of 60 minutes or more. The impact time categories are used as prediction targets.

3. The method for predicting the impact time of traffic accidents using a combination of large and small models according to claim 1, characterized in that, Step S2 includes the following sub-steps: S2.1 Construct an expert model pool containing multiple heterogeneous prediction models. The expert model pool includes, but is not limited to, attention-based models, recurrent neural network models, traditional machine learning models, and prediction models constructed based on large language model prompting mechanisms, so as to form a set of expert models with different modeling mechanisms. S2.2, Let the models in the expert model pool constructed in step S2.1 be represented as follows: The structured feature vector obtained in step S1 enter The prediction results were obtained. .

4. The method for predicting the impact time of traffic accidents using a combination of large and small models according to claim 1, characterized in that, Step S3 includes the following steps: S3.

1. Combine the structured feature vector F obtained in step S1 with the prediction result obtained in step S2. By concatenating the features, a joint feature vector is obtained. , Represents structured feature vectors; Step S3.2: The joint feature vector obtained in step S3.1 Input the large language model, which jointly analyzes the accident scene features and expert model prediction information to generate decision parameters that characterize the contribution of the expert model; Step S3.3: Normalize the decision parameters obtained in step S3.2 to obtain the expert model contribution weight vector. , LLM(·) represents the inference function of a large language model.

5. The method for predicting the impact time of traffic accidents using a combination of large and small models according to claim 4, characterized in that, In step S3.2, when the large language model generates the contribution weights of the expert models, the historical prediction performance information of each expert model in different impact time categories is used as an auxiliary input. This information, along with the accident feature information and the expert prediction results, is provided to the large language model to assist it in allocating the expert contribution weights.

6. The method for predicting the impact time of traffic accidents using a combination of large and small models according to claim 4, characterized in that, In step S4, the expert model weight vector obtained in step S3.3 is... Compared with the prediction results obtained in step S2 Weighted aggregation is performed to obtain the final predicted time of impact of traffic accidents. The expert model weight vector satisfies the normalization constraint. E represents the total number of expert models. , Let represent the trust weight and prediction result of the e-th expert model, respectively.

7. A traffic accident impact time prediction system based on a combination of large and small models, used in the traffic accident impact time prediction method based on a combination of large and small models as described in claim 1, characterized in that, include: The feature acquisition module is used to acquire structured feature information of traffic accidents, construct input representations of traffic accident scenes, and output structured feature representations. The expert model pool consists of multiple heterogeneous small-scale prediction models. Each expert model is used to receive the structured feature representation and output its corresponding prediction result for the time category of influence. The decision routing module, which is a large language model, is used to receive the structured feature information and the prediction results of each expert model, and generate weight information to characterize the contribution of each expert model. The weighted aggregation module is used to weight and aggregate the prediction results of each expert model according to the contribution weight of each expert model output by the decision routing module, so as to obtain the final prediction result of the traffic accident impact time.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.