An accident responsibility identification method fusing retrieval enhancement generation and thought chain
By constructing a legal knowledge base with an accident scenario index and causal reasoning using a multimodal large language model, the problems of rigid rules and lack of legal knowledge in traffic accident liability determination are solved, achieving efficient and interpretable liability determination and generating a determination report that complies with legal norms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV
- Filing Date
- 2026-03-27
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies for determining liability in traffic accidents suffer from rigid rules, an inability to understand multimodal data, and a lack of specific legal knowledge, leading to inaccurate liability determinations, insufficient interpretability, and the potential to create a "legal illusion."
A traffic law knowledge base indexed by accident scenario elements is constructed. Causal reasoning is performed through a multimodal large language model to generate a structured road traffic accident determination report that conforms to law enforcement standards. This includes keyframe extraction, construction of the law knowledge base, multimodal retrieval, and responsibility reasoning driven by thought chain prompts.
It enables accurate, interpretable, and legally reliable liability determination in complex accident scenarios, improves the accuracy and standardization of the judgment results, and solves the problems of inaccurate judgment and insufficient legal credibility of traditional methods.
Smart Images

Figure CN121920970B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of intelligent transportation and artificial intelligence, and in particular relates to an accident liability determination method that integrates retrieval enhancement generation and thought chain. Background Technology
[0002] Traffic accident liability determination is a core aspect of law enforcement by public security traffic management departments, and the fairness and accuracy of its results directly affect the legitimate rights and interests of the parties involved and the credibility of the judiciary. Currently, my country's traffic accident handling process is undergoing a transformation from a traditional manual model to an intelligent assisted model. On the one hand, traditional handling methods heavily rely on traffic police's on-site investigation, experience-based judgment, and compliance with regulations, resulting in cumbersome and time-consuming procedures that can easily cause traffic congestion during peak accident periods. On the other hand, while the promotion of online services such as "rapid accident video processing" has improved the efficiency of handling incidents to some extent, the core still relies on manual remote evidence collection, fault analysis, and liability determination, failing to fundamentally change the nature of "manual operation." Therefore, constructing an efficient, objective, and legally compliant intelligent liability determination method has become an urgent need to improve the modernization of road traffic safety governance capabilities.
[0003] Domestic and international research on intelligent determination of liability in traffic accidents has mainly followed two paths. One is a rule-driven approach, which uses knowledge engineering to transform traffic regulations and traffic police enforcement experience into an explicit rule base in the form of "if-then" statements. The system then outputs the liability determination result by matching accident characteristics with the rules. The other is a data-driven approach, which mainly utilizes machine learning or deep learning models to train on structured accident data to predict the category of liability.
[0004] However, existing technical solutions all have significant shortcomings in practical applications. Rule-driven methods are difficult to cover complex scenarios due to the rigidity of the rules, while data-driven methods lack deep reasoning capabilities because they cannot understand the semantics of multimodal accidents. Furthermore, neither can directly generate a "Road Traffic Accident Determination Letter" that conforms to law enforcement standards. Although the development of multimodal large language models has provided new possibilities for integrating image, video, and text information for complex logical reasoning, when directly applied to liability determination, the lack of effective constraints from specific traffic regulations makes the models prone to "illusion" phenomena such as misquoting legal clauses and logical fallacies in liability analysis. This results in a serious lack of credibility and reliability of the output at the legal level, making it difficult to meet the stringent requirements of objectivity, accuracy, and interpretability in law enforcement practice. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide an accident liability determination method that integrates retrieval enhancement generation and thought chain, overcoming the shortcomings of existing technologies, such as inaccurate liability determination, insufficient interpretability, and the tendency to generate "illusions" of legal clauses due to rigid rules, inability to understand multimodal data, and lack of specific legal knowledge support. This method aims to achieve accurate, interpretable, and legally reliable liability determination in complex accident scenarios.
[0006] Technical solution: The accident liability determination method based on fusion retrieval enhancement generation and thought chain as described in this invention includes the following steps:
[0007] S1. Acquire traffic accident monitoring video, extract key frames and preprocess the traffic accident monitoring video to obtain a time-series image feature sequence;
[0008] S2. Construct a traffic law knowledge base indexed by accident scenario elements, and based on the time-series image feature sequence, retrieve a set of legal clauses related to the accident scenario from the traffic law knowledge base through scenario-legal provision semantic mapping.
[0009] S3. Construct a thought chain prompt containing a causal logic chain template for liability determination. Input the time-series image feature sequence, legal clause set, and thought chain prompt into a multimodal large language model to drive the model to perform causal reasoning based on video evidence and legal constraints, and finally generate a structured road traffic accident determination report that conforms to law enforcement standards.
[0010] This invention, by integrating retrieval-enhanced generation and thought chain technology, first extracts temporal image features from accident videos, overcoming the limitation of existing technologies in effectively parsing multimodal evidence. Then, it constructs a traffic regulation knowledge base using accident scenario elements as an index and accurately recalls relevant clauses, solving the drawbacks of traditional methods that lack specific regulatory knowledge support and are prone to generating "illusions" of legal clauses, thus ensuring the reliability of the legal basis. Finally, using thought chain prompts containing causal logic chain templates, it drives a multimodal large language model to perform rigorous causal reasoning based on video evidence and regulatory constraints, breaking through the bottleneck of inaccurate judgments caused by rigid rules, and ultimately generating a structured accident report. This series of steps collaboratively achieves accurate, interpretable, and legally reliable liability determination in complex accident scenarios, significantly improving the accuracy and standardization of the judgment results.
[0011] Preferably, step S1, which involves extracting keyframes and preprocessing the traffic accident surveillance video, includes:
[0012] Keyframes are extracted from the traffic accident surveillance video using a fixed time interval sampling method, resulting in a keyframe sequence. ,in This represents the sequence length, corresponding to the video duration. For each frame of the extracted image; [The extracted frame of the image] Perform Base64 encoding and convert to a string. To adapt to the input interface of a multimodal large language model, the time-series image feature sequence is formed.
[0013] This preferred solution extracts keyframes by using a fixed time interval sampling method, ensuring that time-series images covering the entire accident process are uniformly acquired from the monitoring video. This preserves the dynamic temporal characteristics of the accident's evolution and provides a coherent visual basis for subsequent accurate analysis of accident responsibility. At the same time, converting each image frame into a Base64 encoded string not only achieves efficient encapsulation of multimodal data but also enables it to directly adapt to the input interface of multimodal large language models. This ensures seamless integration of visual features and textual information, laying a reliable data foundation for deep inference by the model.
[0014] Preferably, step S2, which involves constructing a traffic regulation knowledge base indexed by accident scenario elements, includes:
[0015] The original text of traffic regulations is structured and parsed, segmented at the clause level, and each clause is associated with at least one accident scenario label and its semantic feature vector. The accident scenario labels are obtained based on historical accident cases or regulatory interpretation databases.
[0016] A deep neural network encoding model trained on a large-scale corpus of traffic regulations and accident cases was selected to encode the content of each clause and its associated accident scenario labels into a high-dimensional feature vector.
[0017] The high-dimensional feature vectors, the text corresponding to the clauses, and their metadata are stored in a vector database. A multi-level index is established between the text corresponding to the clauses, the accident scenario tags, and the high-dimensional feature vectors to complete the construction of the traffic regulations knowledge base.
[0018] This optimized approach, through the construction of a traffic regulation knowledge base, firstly performs structured parsing of the original regulatory text and associates it with accident scenario tags mined from historical cases, endowing the regulatory clauses with multi-dimensional semantic scenario features that can be understood by machines. Then, it employs a deep neural network model trained on traffic-related corpora to jointly encode the clause content and scenario tags into high-dimensional vectors, achieving a deep digital expression of regulatory semantics. Finally, by establishing a multi-level index between vectors, text, and tags, it constructs a highly efficient retrieval knowledge base centered on scenario elements. This series of optimizations significantly improves the accuracy and recall rate of scenario-legal semantic mapping in subsequent steps, enabling the model to dynamically match the most relevant regulatory clauses based on specific accident scenarios. This fundamentally solves the judgment bias and legal illusion problems caused by the rigidity of regulatory matching in traditional methods, laying a solid knowledge foundation for subsequent accurate and interpretable liability determination.
[0019] Preferably, the set of legal provisions related to the recall and accident scenario mentioned in step S2 includes:
[0020] Based on the time-series image feature sequence, a structured scenario description containing accident elements is generated using a multimodal large language model; keywords of violations are extracted from the structured scenario description to construct a keyword query. The text describing the accident, its causes, and violations in the structured accident description is used as a semantic query. ;
[0021] A complementary retrieval strategy is employed, utilizing the aforementioned keywords for each query. and semantic query Parallel retrieval from the traffic regulations knowledge base yields the first sorted list. Second sorted list ; the first sorted list Second sorted list The clauses are then merged, reordered based on their merging scores, and the top K clauses are selected to form the final set of legal clauses.
[0022] This preferred solution employs a legal clause recall approach. First, it utilizes a multimodal large language model to transform visual evidence into structured scenario descriptions and violation keywords, achieving a precise conversion from unstructured video to searchable semantic information. Next, it adopts a complementary retrieval strategy combining keyword and semantic queries to recall candidate clauses in parallel from the knowledge base. This ensures both precise keyword matching and deep semantic connections, effectively avoiding the limitations of a single retrieval method. Finally, through a fusion and re-ranking mechanism, it selects the set of legal clauses most relevant to the accident scenario. This process significantly improves the accuracy and comprehensiveness of the legal clause recall, ensuring that the legal provisions used for subsequent liability determination are highly consistent with the actual case. It overcomes the problems of liability determination bias and legal illusion caused by inaccurate legal matching from the outset, providing crucial support for generating rigorous and reliable accident reports.
[0023] Preferably, the complementary retrieval strategy includes sparse retrieval based on keyword matching and dense retrieval based on the semantic similarity of accident scenarios:
[0024] The sparse retrieval method involves using the BM25 algorithm to calculate the keyword query. With each text block in the knowledge base The word frequency relevance score is calculated, and the top-N candidate legal provisions are returned in descending order of score to generate the first sorted list. ;
[0025] The dense retrieval is achieved by using the bge-base-zh-v1.5 model to process the semantic queries. Encoded as query vector Calculate the query vector With all high-dimensional normal vectors in the knowledge base Calculate the cosine similarity between the methods and return the Top-N candidate methods in descending order of similarity to generate a second sorted list. .
[0026] This preferred solution employs sparse retrieval based on the BM25 algorithm, leveraging the word frequency correlation between keyword queries and text blocks to quickly identify legal clauses containing precise violation terms, ensuring direct matching of search results. Simultaneously, it utilizes dense retrieval based on vector similarity, employing the bge-base-zh-v1.5 model to encode semantic queries into vectors and calculate cosine similarity. This allows for in-depth mining of the deep semantic connections between query statements and legal provisions, recalling relevant content even if the query expression is not entirely consistent with the original legal text. By executing these two retrieval strategies in parallel, the complementary advantages of word frequency matching and semantic understanding are fully utilized, significantly improving the comprehensiveness and accuracy of legal retrieval, providing rich and precise legal support for subsequent liability determination.
[0027] Preferably, the first sorted list Second sorted list The fusion process employs the Reverse Rank Flush (RRF) algorithm for any text block. The formula for calculating its fusion score is:
[0028]
[0029] in, Represents a text block In the sorted list The ranking position in the middle, It is the smoothing constant; according to All candidate legal provisions are sorted in descending order, and the top-K highest-scoring provisions are selected to form the final search result set. As a collection of legal provisions.
[0030] This preferred solution employs a reciprocal sorting fusion algorithm to aggregate the sorted lists generated by sparse and dense searches. It weights the ranking of the same text block across different lists, effectively integrating the complementary advantages of the two heterogeneous search results. The algorithm introduces a smoothing constant to prevent lower-ranked items from receiving zero scores, ensuring fair evaluation of all candidate legal provisions. Finally, based on the fusion score, all candidate legal provisions are sorted in descending order, and the Top-K most relevant clauses are extracted. This significantly improves the overall relevance and stability of the recall results, providing high-quality, double-verified legal evidence for subsequent liability reasoning and overcoming the bias and omission problems that may arise from a single search method.
[0031] Preferably, the thought chain prompts mentioned in step S3 are used to guide the multimodal large language model to simulate the logic of traffic police handling cases and to make step-by-step reasoning. The reasoning steps include at least:
[0032] Dynamic evidence analysis stage: Based on the timeline, the feature sequence of the time-series image is extracted to identify vehicle trajectory, interactive actions and changes in traffic environment;
[0033] Accident Fact Reconstruction Phase: Integrate the identification results from each moment on the timeline to construct the continuous process of the accident and key conflict points;
[0034] Causal chain tracing phase: Based on the reconstructed facts, trace the actions and forces of each party involved in the conflict, and identify direct and indirect causes;
[0035] Legal provision matching and verification stage: The actions of each participating party that have been traced are subjected to binding verification and matching with the recalled set of legal provisions to determine the specific provisions that have been violated;
[0036] Responsibility Conclusion Generation Stage: Based on the analysis results of the above stages, a structured responsibility determination conclusion and complete supporting evidence are output.
[0037] This optimized solution, through the design of thought chain prompts, rigorously deconstructs the liability determination process of a multimodal large language model into five progressive reasoning stages: dynamic evidence analysis, accident fact reconstruction, causal chain tracing, legal provision matching and verification, and liability conclusion generation. This accurately simulates the case-handling thinking of traffic police officers who conduct step-by-step analysis based on video evidence and following legal logic. This mechanism not only guides the model to deeply understand the complex interactions and causal relationships in temporal visual information, overcoming the limitations of traditional methods that can only perform shallow pattern recognition, but also ensures that each step of reasoning is based on the dual constraints of video evidence and legal provisions, achieving a traceable and verifiable complete logical chain from evidence to facts and then to legal application. Ultimately, this method significantly improves the accuracy, logical rigor, and legal compliance of liability determination, fundamentally solving the industry problems of insufficient interpretability and the susceptibility to reasoning illusions inherent in black-box models.
[0038] Preferably, the structured road traffic accident determination report described in step S3 is constrained by JSON Schema in its output format. The JSON Schema defines a data structure that includes core fields such as the description of the accident facts, legal basis, and liability determination results.
[0039] This preferred solution employs JSON Schema to strictly constrain the output format of road traffic accident liability determination reports. It defines a data structure for core fields, including a description of the accident facts, legal basis, and liability determination results, ensuring the standardization, structure, and machine readability of the model-generated results. This formatted output not only facilitates seamless integration and data exchange with external systems but also enhances the standardization and consistency of the determination reports by enforcing field integrity. This provides solid technical support for the automated processing and archiving of liability determinations, overcoming the format chaos and information loss problems that may result from free text output.
[0040] Preferably, after generating the road traffic accident report, an adaptive quality assessment and feedback optimization step is also included:
[0041] Obtain the liability determination results output by the model and the set of legal clauses they reference; compare the liability determination results with a pre-set standard answer database, and count the number of samples whose liability determination results match those in the standard answer database. And calculate the accuracy rate of liability determination. The calculation formula is:
[0042]
[0043] in, This represents the total number of accident samples; the set of legal clauses cited is compared with a preset set of standard legal clauses, and the number of samples with correctly cited legal clauses is counted. And calculate the accuracy rate of legal clause citations. The calculation formula is:
[0044]
[0045] The criteria for determining the correctness of legal clause citations are as follows: the legal clauses cited by the model are consistent with the applicable clauses of the standard, and no clauses that are inconsistent with the accident situation or are outdated are cited.
[0046] This preferred solution introduces an adaptive quality assessment and feedback optimization step after generating the traffic accident liability determination report. It systematically compares and quantitatively analyzes the liability determination results output by the model and the legal clauses it references, achieving dual verification of the accuracy of liability determination and compliance with legal application. This allows for an objective assessment of the model's reliability in liability allocation and legal citation. At the same time, by identifying issues such as liability judgment deviations and improper or outdated clause citations, it provides data support and feedback for the continuous optimization and iteration of the model, improving the standardization, consistency, and interpretability of the traffic accident liability determination process, and enhancing the credibility and practical application value of the determination results.
[0047] Preferably, the adaptive quality assessment and feedback optimization step further includes document text quality assessment:
[0048] Obtain the text of the road traffic accident determination report generated by the multimodal large language model, and the expert-annotated reference text associated with the corresponding accident sample; based on text similarity calculation, evaluate the key information coverage of the road traffic accident determination report text, the key information coverage evaluation includes: calculating the length of the longest common subsequence between the road traffic accident determination report text and the expert-annotated reference text, which is used to measure the completeness of the accident fact elements;
[0049] Based on deep semantic matching, a semantic consistency assessment is performed on the road traffic accident determination report text. The semantic consistency assessment includes: using a pre-trained language model to calculate the similarity score between the road traffic accident determination report text and the expert-annotated reference text at the contextual semantic level.
[0050] The GPT-4O large language model is introduced as a review model to conduct a standardization assessment of the road traffic accident determination text. The standardization assessment includes: under the setting of temperature parameter 0, driving the review model to conduct a comprehensive score from five aspects: the accuracy of accident facts contained in the road traffic accident determination text, the completeness of accident elements, the logical consistency of liability inference, the matching degree between cited legal provisions and facts, and the compliance of document format and expression.
[0051] If any result of the information coverage assessment, semantic consistency assessment, or normativity assessment is lower than a preset dynamic threshold, a feedback control signal is triggered. The feedback control signal is used to mark the current accident sample and re-execute step S3 for secondary reasoning.
[0052] This optimized solution employs an adaptive quality assessment and feedback optimization mechanism to rigorously verify the generated accident report from multiple dimensions: First, it accurately assesses the completeness of factual elements through text similarity calculation and longest common subsequence analysis; then, it utilizes a pre-trained language model to deeply compare semantic consistency, ensuring the accurate transmission of core meaning; finally, it introduces a large language model under zero randomness settings for expert-level review in terms of factual accuracy, logical consistency, legal provision matching, and format compliance. If any dimension—completeness, semantics, or standardization—failes to meet the standard, automatic feedback is triggered, marking the sample and driving the model to perform secondary reasoning and correction. This closed-loop optimization process significantly enhances the authority and reliability of the generated documents, effectively preventing omissions of key facts, semantic deviations, and errors in legal application. Mechanistically, it ensures that every accident report meets high-standard, verifiable enforcement requirements, achieving complete quality control from generation to verification of liability determination.
[0053] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: 1. By constructing a legal knowledge base indexed by accident scenarios, this invention deeply integrates video evidence analysis with legal clause constraints, directly solving the core defects of existing technologies, such as the difficulty in understanding dynamic video evidence due to rigid rules, and the fabrication of legal provisions by large models due to the lack of dedicated knowledge support. This achieves accurate and reliable judgment of complex accident scenarios; 2. By designing thought chain prompts containing causal logic chain templates, the model is driven to strictly follow the expert case-handling logic of "evidence analysis - fact reconstruction - causal tracing - legal provision matching" for step-by-step reasoning, fully presenting... The conclusion's reasoning path and legal basis avoid the drawbacks of the black-box output of traditional methods; 3. Adopting a complementary retrieval strategy of "keyword matching + semantic similarity" and combining it with a multi-level index structure, it can accurately recall legal clauses highly relevant to specific accident scenarios, effectively solving the problems of weak generalization ability and inaccurate citation of professional legal provisions by general models; 4. Introducing a multi-dimensional quantitative assessment and adaptive feedback system to perform accuracy statistics, semantic consistency evaluation, and standardization scoring on the identification results. Once a quality defect is found, secondary reasoning optimization is triggered, effectively suppressing accidental errors and ensuring the stability and standardization of the system output. Attached Figure Description
[0054] Figure 1 This is a schematic diagram of the method architecture of the present invention;
[0055] Figure 2 This is a schematic diagram of the timing keyframes for a typical traffic accident involving the opening and closing of a vehicle door, as presented in this invention. Detailed Implementation
[0056] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0057] This invention provides a method for determining accident liability by integrating enhanced retrieval generation and thought chain analysis, used to assist traffic police in determining liability in traffic accidents. The overall architecture of the method is as follows: Figure 1 As shown, it mainly consists of three core modules: a video keyframe extraction and preprocessing module, a traffic law knowledge enhancement module, and a multimodal responsibility reasoning module based on thought chains. The specific steps are as follows:
[0058] Step 1: Video Keyframe Extraction and Preprocessing
[0059] Using a fixed time interval sampling method to analyze traffic accident surveillance videos Keyframes are extracted to preserve key temporal and spatial changes before and after the incident while reducing computational load. The sampling frequency is set to 1 frame / second, and the resulting keyframe sequence is represented as follows: ,in This represents the sequence length, corresponding to the video duration (in seconds). To adapt to the input interface of multimodal large language models, this is applied to each extracted image frame. Convert it to a string using Base64 encoding. This is to facilitate cross-modal splicing with text prompts later.
[0060] Step 2: Construction and Retrieval of Traffic Regulations Knowledge Base
[0061] During the construction phase of the traffic regulations knowledge base, a precise segmentation strategy based on regular expressions was adopted to segment the "Road Traffic Safety Law of the People's Republic of China (2021 Revision)" and the "Implementation Regulations of the Road Traffic Safety Law of the People's Republic of China (2017 Revision)" into clauses as the smallest unit. Each segmented text block... It includes complete clause content and metadata such as source regulations, chapter, and clause number. Considering the linguistic characteristics of Chinese legal texts, the BAAI / bge-base-zh-v1.5 model, specifically optimized for Chinese semantics, is selected as the encoder to process each legal text block. Mapped to high-dimensional normal vectors Finally, all legal provision vectors and their corresponding original texts and metadata are stored in the ChromaDB vector database.
[0062] In the retrieval stage, in order to take into account both keyword matching and semantic similarity, a hybrid retrieval strategy combining BM25 retrieval and vector retrieval is adopted. First, a structured accident description is generated based on the accident keyframe by a multimodal large language model, and two retrieval queries are constructed accordingly: (1) Keyword query composed of accident violation keywords. (2) Semantic queries consisting of accident details, cause analysis and violation text. This is used to enhance the recall of synonyms and incident context information.
[0063] Subsequently, the system performs sparse retrieval based on the BM25 algorithm and dense retrieval based on vector cosine similarity in parallel. The sparse retrieval is calculated using the BM25 algorithm. With all terms in the knowledge base The frequency relevance scores between the terms were used to recall the responses in descending order of scores. The candidate legal provisions are denoted as a sorted list. Meanwhile, dense retrieval utilizes the bge-base-zh-v1.5 model to integrate semantic queries. Encoded as query vector ,calculate With all law vectors Recall based on cosine similarity between the two pairs of samples, sorted by cosine similarity. The candidate legal provisions are denoted as a sorted list. .
[0064] Reciprocal Rank Fusion (RRF) is used to merging two sorted lists. and To merge. For any legal provision. The formula for calculating its RRF score is:
[0065]
[0066] in, Indicating legal provisions In the sorted list The ranking position in the middle, Set as the smoothing constant. Ultimately based on Reorder all candidate legal provisions and select... The highest-scoring clauses constitute the final set of legal grounds. This information is embedded as context into the liability reasoning module, providing accurate legal support for liability determination.
[0067] Step 3: Responsibility Reasoning Strategy Based on Mind Chain
[0068] The responsibility reasoning module employs a Chain-of-Thought (CoT) prompting strategy to guide a multimodal large language model in simulating the case-handling logic of traffic police officers through step-by-step reasoning. The prompt word design includes clear instruction constraints and structured output definitions, requiring the model to execute the following five steps sequentially: The first stage is frame-by-frame observation and description, requiring the model to identify and describe key traffic scenes, vehicle / pedestrian actions, interaction relationships, traffic signs, and changes in each keyframe according to timestamp order; the second stage is accident reconstruction, reconstructing the complete timeline of vehicle interaction and collision based on observation results; the third stage is accident causation analysis, deeply analyzing the direct and indirect causes of the accident and identifying the specific violations and faults of all traffic participants; the fourth stage is traffic law matching, mandating that the model match the legal basis provided by the traffic law knowledge enhancement module. The first stage involves selecting applicable legal provisions and establishing a mapping relationship between violations and specific clauses; the fifth stage is liability determination, which outputs the final liability determination conclusion by comprehensively considering the facts of the accident and the legal basis.
[0069] To ensure that the output can be directly used to generate a standard "Road Traffic Accident Determination Certificate", JSONSchema is used to strictly constrain the output format, defining a data structure that includes core fields such as a description of the accident facts, legal basis, and liability determination results.
[0070] The final input is the complete contextual information of the multimodal large language model. It consists of three parts: accident time series image feature pairs sequence A collection of legal clauses retrieved via the traffic law knowledge enhancement module. And prompt words containing the aforementioned thought chain hints and structured output constraints. The multimodal large language model performs responsibility reasoning based on this multimodal context, generating a draft of the "Road Traffic Accident Determination Certificate" that conforms to the standards.
[0071] Numerical Experiment:
[0072] To verify the effectiveness of this method, the experiment was conducted on a case-by-case evaluation using a dataset of 30 real traffic accident cases. Figure 2 shows a typical traffic accident case of "opening and closing car doors obstructing the passage of other vehicles," and the ground truth results and model output results are as follows:
[0073] True / False: An electric bicycle traveling from south to north collided with an orange sedan parked on the road after the driver opened a door, resulting in vehicle damage and injuries. The driver of the orange sedan violated Article 63, Paragraph 4 of the "Regulations for the Implementation of the Road Traffic Safety Law of the People's Republic of China," which states: "Doors shall not be opened or passengers shall not get on or off before the vehicle has come to a complete stop, and opening or closing doors shall not obstruct the passage of other vehicles and pedestrians." The driver of the orange sedan bears full responsibility for the accident, and the electric bicycle rider bears no responsibility.
[0074] Model Output: The driver of the orange sedan temporarily stopped on a narrow road and opened the right-side door, colliding with an electric bicycle traveling in the same direction on the right. This resulted in the electric bicycle rider falling and damage to the bicycle. The orange sedan driver's actions violated Article 63 of the "Regulations for the Implementation of the Road Traffic Safety Law of the People's Republic of China," which states: "No one may open car doors or allow passengers to get on or off before the vehicle has come to a complete stop, and opening or closing car doors shall not obstruct the passage of other vehicles and pedestrians." No clear violation was observed from the electric bicycle driver. The orange sedan driver bears full responsibility for this accident; the electric bicycle driver bears no responsibility.
[0075] The model output results are consistent with the true values in terms of liability determination and legal citation, verifying the effectiveness of this method.
[0076] This experiment evaluates the model output from three dimensions: ① Accuracy of liability determination: whether the liability division determined by the model is consistent with the true value result; ② Accuracy of legal citation: whether the legal provisions cited by the model are consistent with the standard applicable provisions and whether there are no irrelevant citations; ③ Quality of document generation: the coverage of accident fact elements, semantic consistency and document standardization are measured by three indicators: ROUGE-L, BERTScore and LLMScore.
[0077] Table 1 presents the liability determination results, accuracy of legal citations, and document generation quality evaluation for all cases. Experimental results show that the method exhibits good robustness in complex and diverse accident scenarios, with a liability determination accuracy rate of 80.00% and a legal citation accuracy rate of 56.67%. Regarding document generation quality, the generated accident reports achieved ROUGE-L and BERTScores of 0.4412 and 0.5653 respectively, and an LLMScore score of 73.5 based on a large model. This indicates that the accident reports have reached a usable level in terms of coverage of key factual elements, semantic consistency, and document standardization, and can provide valuable initial drafts of accident reports for frontline accident handling.
[0078] Table 1. Case-by-case evaluation results of liability determinations in 30 traffic accidents.
[0079]
[0080] To verify the contribution of the proposed method to accident liability determination, the method was compared with a general multimodal large language model that did not incorporate thought chain reasoning and retrieval enhancement. The results are shown in Table 2. Compared to the baseline model, the proposed method improved the accuracy of liability determination from 73.33% to 80.00%, indicating that thought chain reasoning can effectively improve the stability of liability determination. In the dimension of legal provision citation, the baseline method's accuracy in citing legal provisions was only 6.67%. The provisions it generated often appeared reasonable but were actually seriously inconsistent with the actual legal provisions, exhibiting a clear "illusion" phenomenon, which greatly limited the model's usability and credibility in real traffic enforcement scenarios. In contrast, the proposed method improved the accuracy of legal provision citation to 56.67%. The results demonstrate that while general multimodal large models possess a certain level of visual understanding and common-sense inference capabilities, they are prone to issues such as clause illusion, miscitation, or non-standard citation when lacking support from domain-specific legal knowledge. The method proposed in this invention, by introducing a traffic law knowledge base and explicitly injecting key clauses into the generation process using RAG technology, effectively constrains the model's generation space, thereby significantly improving the accuracy and standardization of legal citations. In terms of document quality, ROUGE-L, BERTScore, and LLMScore significantly improved from baselines of 0.1690, 0.3265, and 38.7 to 0.4412, 0.5653, and 73.5, respectively, further indicating that the method proposed in this invention can significantly improve document generation quality, making the generated accident report closer to the writing level of professional traffic police officers in terms of format and content.
[0081] Table 2. Experimental Results of Baseline Model Comparison
[0082]
[0083] This invention uses traffic accident surveillance video as input, constructs a traffic law knowledge base, employs a hybrid retrieval strategy and a reciprocal ranking fusion algorithm to recall relevant legal provisions, and designs a mind chain prompt strategy to drive the model to perform multi-step responsibility reasoning, ultimately automatically generating a structured "Road Traffic Accident Determination Certificate". Experimental results on real accident datasets show that this method can effectively improve the accuracy of traffic accident responsibility determination and the accuracy of legal provision citation, significantly alleviate the large model illusion problem, and the generated accident determination certificate has practical law enforcement reference value.
Claims
1. A method for determining accident liability that integrates retrieval-enhanced generation and thought chain analysis, characterized in that, Includes the following steps: S1. Acquire traffic accident monitoring video, extract key frames and preprocess the traffic accident monitoring video to obtain a time-series image feature sequence; The keyframe extraction and preprocessing of the traffic accident surveillance video includes: Keyframes are extracted from the traffic accident surveillance video using a fixed time interval sampling method, resulting in a keyframe sequence. ,in This represents the sequence length, corresponding to the video duration. For each frame of the extracted image; [The extracted frame of the image] Perform Base64 encoding and convert to a string. To adapt to the input interface of a multimodal large language model, the time-series image feature sequence is formed; S2. Construct a traffic law knowledge base indexed by accident scenario elements, and based on the time-series image feature sequence, retrieve a set of legal clauses related to the accident scenario from the traffic law knowledge base through scenario-legal provision semantic mapping. The construction of a traffic regulation knowledge base indexed by accident scenario elements includes: The original text of traffic regulations is structured and parsed, segmented at the clause level, and each clause is associated with at least one accident scenario label and its semantic feature vector. The accident scenario labels are obtained based on historical accident cases or regulatory interpretation databases. A deep neural network encoding model trained on a large-scale corpus of traffic regulations and accident cases was selected to encode the content of each clause and its associated accident scenario labels into a high-dimensional feature vector. The high-dimensional feature vector, the text corresponding to the clause, and its metadata are stored in a vector database. A multi-level index is established between the text corresponding to the clause, the accident scenario label, and the high-dimensional feature vector to complete the construction of the traffic regulations knowledge base. The set of legal provisions related to the recall and accident scenarios includes: Based on the time-series image feature sequence, a structured scenario description containing accident elements is generated using a multimodal large language model; keywords of violations are extracted from the structured scenario description to construct a keyword query. Furthermore, the accident process, causal analysis, and violation text in the structured accident description are used as semantic queries. ; A complementary retrieval strategy is employed, utilizing the aforementioned keywords for each query. and semantic query Parallel retrieval from the traffic regulations knowledge base yields the first sorted list. Second sorted list ; the first sorted list Second sorted list The clauses are then merged, reordered based on their merging scores, and the top K clauses are selected to form the final set of legal clauses. S3. Construct a thought chain prompt containing a causal logic chain template for liability determination, input the time-series image feature sequence, legal clause set, and thought chain prompt into a multimodal big language model, drive the model to perform causal reasoning based on video evidence and legal constraints, and finally generate a structured road traffic accident determination letter that conforms to law enforcement standards. The thought chain prompts are used to guide the multimodal large language model to simulate the logic of traffic police case handling and to make step-by-step reasoning. The reasoning steps include at least the following: Dynamic evidence analysis stage: Based on the timeline, the feature sequence of the time-series image is extracted to identify vehicle trajectory, interactive actions and changes in traffic environment; Accident Fact Reconstruction Phase: Integrate the identification results from each moment on the timeline to construct the continuous process of the accident and key conflict points; Causal chain tracing phase: Based on the reconstructed facts, trace the actions and forces of each party involved in the conflict, and identify direct and indirect causes; Legal provision matching and verification stage: The actions of each participating party that have been traced are subjected to binding verification and matching with the recalled set of legal provisions to determine the specific provisions that have been violated; Responsibility Conclusion Generation Stage: Based on the analysis results of the above stages, a structured responsibility determination conclusion and complete supporting evidence are output.
2. The method according to claim 1, characterized in that, The complementary retrieval strategies include sparse retrieval based on keyword matching and dense retrieval based on the semantic similarity of accident scenarios: The sparse retrieval method involves using the BM25 algorithm to calculate the keyword query. With each text block in the knowledge base The word frequency relevance score is calculated, and the top-N candidate legal provisions are returned in descending order of score to generate the first sorted list. The dense retrieval refers to using the bge-base-zh-v1.5 model to perform semantic queries. Encoded as query vector Calculate the query vector With all high-dimensional normal vectors in the knowledge base Calculate the cosine similarity between the methods and return the Top-N candidate methods in descending order of similarity to generate a second sorted list. .
3. The method according to claim 1, characterized in that, The first sorted list Second sorted list The fusion process employs the Reverse Rank Flush (RRF) algorithm for any text block. The formula for calculating its fusion score is: in, Represents a text block In the sorted list The ranking position in the middle, It is the smoothing constant; according to All candidate legal provisions are sorted in descending order, and the top-K highest-scoring provisions are selected to form the final search result set. As a collection of legal provisions.
4. The method according to claim 1, characterized in that, The structured road traffic accident determination report described in step S3 is constrained by the JSON Schema output format. The JSON Schema defines a data structure that includes core fields such as the description of the accident facts, legal basis, and liability determination results.
5. The method according to claim 1, characterized in that, After generating the road traffic accident report, an adaptive quality assessment and feedback optimization step is also included: Obtain the liability determination results output by the model and the set of legal clauses they reference; compare the liability determination results with a pre-set standard answer database, and count the number of samples whose liability determination results match those in the standard answer database. And calculate the accuracy rate of liability determination. The calculation formula is: in, This represents the total number of accident samples; the set of legal clauses cited is compared with a preset set of standard legal clauses, and the number of samples with correctly cited legal clauses is counted. And calculate the accuracy rate of legal clause citations. The calculation formula is: The criteria for determining the correctness of legal clause citations are as follows: the legal clauses cited by the model are consistent with the applicable clauses of the standard, and no clauses that are inconsistent with the accident situation or are outdated are cited.
6. The method according to claim 5, characterized in that, The adaptive quality assessment and feedback optimization steps also include document text quality evaluation: Obtain the text of the road traffic accident determination report generated by the multimodal large language model, as well as the expert-annotated reference text associated with the corresponding accident sample; Based on text similarity calculation, a key information coverage assessment is performed on the road traffic accident determination report text. The key information coverage assessment includes: calculating the length of the longest common subsequence between the road traffic accident determination report text and the expert-annotated reference text, which is used to measure the completeness of the accident fact elements. Based on deep semantic matching, a semantic consistency assessment is performed on the road traffic accident determination report text. The semantic consistency assessment includes: using a pre-trained language model to calculate the similarity score between the road traffic accident determination report text and the expert-annotated reference text at the contextual semantic level. The GPT-4O large language model is introduced as a review model to conduct a standardization assessment of the road traffic accident determination text. The standardization assessment includes: under the setting of temperature parameter 0, driving the review model to conduct a comprehensive score from five aspects: the accuracy of accident facts contained in the road traffic accident determination text, the completeness of accident elements, the logical consistency of liability inference, the matching degree between cited legal provisions and facts, and the compliance of document format and expression. If any result of the information coverage assessment, semantic consistency assessment, or normativity assessment is lower than a preset dynamic threshold, a feedback control signal is triggered. The feedback control signal is used to mark the current accident sample and re-execute step S3 for secondary reasoning.