Traffic accident liability affirmation automatic generation system and method based on large language model

The traffic accident liability determination system based on a large language model has achieved automated traffic accident liability determination, solving the problems of low efficiency and insufficient interpretability caused by reliance on experience in existing technologies. It improves the accuracy and reliability of liability determination and ensures the independence and security of the system.

CN122065982APending Publication Date: 2026-05-19TONGJI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TONGJI UNIV
Filing Date
2026-04-01
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing methods for determining liability in traffic accidents rely too heavily on the experience of law enforcement personnel, resulting in low efficiency, limited generalizability, and insufficient interpretability, making it difficult to guarantee the objectivity and scientific rigor of liability determination.

Method used

An automatic traffic accident liability determination system based on a large language model is adopted, which includes an accident semantic parsing module, a violation identification and attribution module, an accident liability determination knowledge base module, a liability determination reasoning enhancement module, a model fine-tuning and optimization module, a liability determination reasoning decision module, and a large model interaction module. Through semantic parsing, knowledge base matching, and model fine-tuning, the system realizes an automated liability determination process.

Benefits of technology

It improves the accuracy and consistency of traffic accident liability determination, reduces the workload of manual liability determination, avoids the risk of data leakage, ensures the independent operation of the system without external network conditions, provides reasonable liability determination basis, and reduces uncertainty and inference bias.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122065982A_ABST
    Figure CN122065982A_ABST
Patent Text Reader

Abstract

The invention provides a traffic accident liability affirmation automatic generation system and method based on a large language model, and relates to the technical field of intelligent traffic and artificial intelligence. Comprising the following steps: an accident semantic analysis module analyzes a traffic accident record text to obtain a standardized fact; the illegal recognition attribution module judges driving behaviors based on the standardized facts to obtain an attribution result; the accident responsibility knowledge base module integrates laws and regulations and rules to obtain a knowledge base; a responsibility-fixing reasoning enhancement module matches the attribution result with the knowledge base to obtain enhanced knowledge; the model fine tuning optimization module executes fine tuning by adopting a low-rank adaptation technology to obtain a large vertical domain model; a responsibility-fixing reasoning decision-making module performs reasoning judgment based on the vertical domain large model and the enhanced knowledge to obtain a decision-making result; and the big model interaction module converts the decision result to obtain standardized responsibility determination output. The problems that responsibility determination depends on personal experience, efficiency is not high, and interpretability is insufficient are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of intelligent transportation and artificial intelligence technology, and in particular to an automatic generation system and method for determining liability in traffic accidents based on a large language model. Background Technology

[0002] With the acceleration of global urbanization and the increasing complexity of transportation systems, the frequency of traffic accidents is also on the rise. Against this backdrop, the importance of traffic safety management is becoming increasingly prominent. According to laws and regulations, handling traffic accidents involves on-site investigation, liability determination, penalties, compensation, and mediation. Among these stages, the determination of traffic accident liability is crucial, affecting not only the fairness of legal rulings and compensation but also the impartiality of road traffic governance. Its core essence lies in legally defining the roles played by relevant parties in the formation of damage in a traffic accident and allocating responsibility. Previous research has largely focused on finding methods for accurately identifying and determining accident liability; however, most of these studies rely on similarity analysis of past cases and primarily use traditional liability determination theories, over-relying on the experience of law enforcement personnel, which to some extent makes it difficult to guarantee the objectivity and scientific rigor of liability determination. Furthermore, because traffic accidents can be caused by complex factors related to drivers, vehicles, road conditions, and other environmental factors, law enforcement personnel often find it difficult to distinguish the causal relationship of the collision and the influence of contributing factors, thus significantly reducing the accuracy of accident liability determination.

[0003] Therefore, the application of advanced technologies, such as artificial intelligence, particularly the introduction of Large Language Models (LLMs) into traffic accident liability determination, offers a new technological path for research in this field due to their superior semantic understanding and reasoning capabilities, as well as their strong generalization and adaptability. By introducing high-quality, expert-selected domain-specific data for fine-tuning or training, large models are expected to overcome the "shallow analysis" bottleneck of general-purpose models, achieving a leap from "simple information assistance" to "complex logic-based liability determination," thereby significantly improving the accuracy of liability determination in complex scenarios. However, most existing general-purpose large language models suffer from limitations in application scenarios, insufficient generalization ability, and data privacy and security issues, making them difficult to directly apply to traffic accident liability determination. Summary of the Invention

[0004] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide an automatic generation system and method for traffic accident liability determination based on a large language model. This invention solves the problems in existing traffic accident liability determination methods and models that rely too much on the personal experience of law enforcement officers, have low efficiency in determining liability, lack generalization, and have insufficient interpretability.

[0005] To achieve the above objectives, the present invention provides the following solution: An automatic traffic accident liability determination generation system based on a large language model includes: The accident semantic parsing module is used to extract and parse the accident fact elements in the original traffic accident text record to obtain a standardized accident fact representation. The violation identification and attribution module is used to determine the driving behavior of the parties involved in the accident based on the standardized accident fact representation to identify whether there is a traffic violation, and to establish a preliminary causal relationship between the traffic violation and the accident result to obtain the violation attribution result. The accident liability determination knowledge base module is used to acquire relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination, and build a knowledge base with classification index and semantic association functions to obtain a standardized accident liability determination knowledge base. The liability determination reasoning enhancement module is used to semantically match the standardized accident fact representation with the attribution result of the illegal behavior in the accident liability determination standardization knowledge base to obtain liability reasoning enhancement knowledge. The model fine-tuning and optimization module is used to perform targeted fine-tuning of the pre-trained large language model using the low-rank adaptation method, so as to obtain the fine-tuned accident liability determination vertical domain large model. The liability determination reasoning and decision-making module is used to integrate the standardized accident fact representation, the attribution results of illegal acts, and the enhanced liability reasoning knowledge of the fine-tuned accident liability determination vertical domain model to reason and judge the degree of responsibility of each participating party and obtain the liability determination reasoning and decision-making result. The large model interaction module is used to receive the original traffic accident text record input by the user, and combined with the prompting engineering guide, the fine-tuned accident liability determination vertical domain large model performs standardized output of the liability determination reasoning decision result to obtain the standardized liability determination result; The local deployment and operation module is used to deploy and run the above-mentioned functional modules on a local server to complete the automatic processing from input to the output of the standardized accountability result.

[0006] An automatic generation method for traffic accident liability determination based on a large language model includes: Semantic extraction and parsing of accident fact elements in the original traffic accident text records are performed to obtain a standardized accident fact representation. Based on the standardized accident fact representation, the driving behavior of the parties involved in the accident is judged to identify whether there is any traffic violation, and a preliminary causal relationship between the traffic violation and the accident result is established to obtain the attribution result of the traffic violation. Acquire relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination, and build a knowledge base with classification index and semantic association functions to obtain a standardized knowledge base for accident liability determination; The standardized accident fact representation and the attribution result of the illegal behavior are semantically matched in the accident liability determination standardization knowledge base to obtain enhanced knowledge of liability reasoning. A low-rank adaptation method was used to perform targeted fine-tuning on the pre-trained large language model, resulting in a fine-tuned accident liability determination vertical domain large model. By integrating the standardized accident fact representation, the attribution results of illegal acts, and the enhanced knowledge of liability reasoning, the fine-tuned accident liability determination vertical domain model is used to reason and judge the degree of liability of each participating party, and obtain the liability determination reasoning decision result. The system receives the original traffic accident text record input by the user, and, in conjunction with the prompting engineering guidance, the finely tuned accident liability determination vertical domain large model performs standardized output of the liability determination reasoning decision result to obtain a standardized liability determination result. The above functional modules are deployed and run on a local server to complete the automatic processing from input to the output of the standardized accountability result.

[0007] The present invention discloses the following technical effects: This invention provides an automatic generation system and method for traffic accident liability determination based on a large language model. By introducing a low-rank adaptation method, the pre-trained large language model is fine-tuned according to instructions for accident liability determination. This enables the model to automatically complete the parsing of key accident information, identification of liability elements, and liability determination based on user-inputted accident process text, thereby outputting structured and standardized accident liability determination results. This effectively reduces the workload of manual liability determination and improves the consistency and reliability of the determination results. The invention deploys the large language model and its built knowledge base uniformly on a local GPU environment server, realizing fully automated local processing from accident description input to liability determination result output. Compared to processing methods relying on cloud-based large models, this invention effectively avoids the potential leakage risks of accident party information, accident details, and law enforcement data during transmission. Simultaneously, the local deployment architecture allows the system to operate stably even without external network access or under network restrictions, exhibiting good independence and engineering applicability. By combining retrieval-enhanced generation technology, relevant laws, regulations, law enforcement standards, and typical accident cases related to traffic accident liability determination are constructed into a dynamically updated local knowledge base, which is deeply integrated with the reasoning process of the large language model. When the model performs the task of determining liability, it can retrieve matching legal provisions and similar accident cases in real time as the basis for judgment, thereby providing reasonable evidence to support the determination of liability while generating the conclusion, effectively reducing the illusion problem of large language models and reducing the uncertainty and inference bias that may arise in the task of determining liability in accidents. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0009] Figure 1 A schematic diagram of the system structure of an automatic generation system for traffic accident liability determination based on a large language model provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the low-rank adaptation method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the search enhancement generation technology provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a large model interactive page provided in an embodiment of the present invention. Reference numerals: 1-Accident semantic parsing module, 2-Violation identification and attribution module, 3-Accident liability determination knowledge base module, 4-Liability determination reasoning enhancement module, 5-Liability determination reasoning decision module, 6-Model fine-tuning and optimization module, 7-Large model interaction module, 8-Local deployment and operation module. Detailed Implementation

[0010] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0011] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0012] like Figure 1 As shown, this invention provides an automatic generation system for traffic accident liability determination based on a large language model, comprising: Accident Semantic Analysis Module 1 is used to extract and parse the accident fact elements in the original traffic accident text record to obtain a standardized accident fact representation. The violation identification and attribution module 2 is used to judge the driving behavior of the parties involved in the accident based on the standardized accident fact representation to identify whether there is a traffic violation, and to establish a preliminary causal relationship between the traffic violation and the accident result to obtain the violation attribution result. Module 3 of the Accident Liability Determination Knowledge Base is used to acquire relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination, and build a knowledge base with classification index and semantic association functions to obtain a standardized accident liability determination knowledge base. The liability determination reasoning enhancement module 4 is used to perform semantic matching between the standardized accident fact representation and the attribution result of the illegal behavior in the accident liability determination standardization knowledge base to obtain liability reasoning enhancement knowledge. Model fine-tuning and optimization module 6 is used to perform targeted fine-tuning of the pre-trained large language model using the low-rank adaptation method to obtain the fine-tuned accident liability determination vertical domain large model. The liability determination reasoning and decision-making module 5 is used to integrate the standardized accident fact representation, the attribution results of illegal acts, and the enhanced liability reasoning knowledge of the fine-tuned accident liability determination vertical domain model to reason and judge the degree of responsibility of each participating party and obtain the liability determination reasoning and decision-making results. The large model interaction module 7 is used to receive the original traffic accident text record input by the user, and combined with the prompt engineering guide, the fine-tuned accident liability determination vertical domain large model performs standardized output of the liability determination reasoning decision result to obtain the standardized liability determination result; Local deployment and operation module 8 is used to deploy and run the above-mentioned functional modules on a local server to complete the automatic processing from input to the output of the standardized accountability result.

[0013] Specifically, the accident semantic analysis module 1 is responsible for semantically analyzing the original traffic accident text record, automatically extracting structured accident fact elements such as accident time, location, participating parties, driving direction, traffic behavior, collision relationship, and accident consequences to form a standardized accident fact representation; the violation identification and attribution module 2 is responsible for judging the driving behavior of the accident participants based on the accident fact analysis results, identifying whether there are violations such as drunk driving, speeding, failure to yield, and illegal lane changing, and establishing a preliminary causal relationship between the violations and the accident results; the accident liability determination knowledge base module 3 is responsible for constructing and maintaining a set of laws, regulations, judicial interpretations, and typical liability determination rules related to traffic accident liability determination, and organizing the rules in a semantic rule form that can be understood by a large language model to support rule constraints in the liability reasoning process; the liability determination reasoning enhancement module 4 is responsible for semantic matching between the identified violation types and accident circumstances in the accident liability determination rule set and historical typical cases to obtain liability determination basis and reference cases highly relevant to the current accident. The system is designed to enhance the reliability and consistency of liability reasoning. Module 5, responsible for determining liability, is based on a specially fine-tuned traffic accident liability determination vertical domain large language model. It integrates accident facts, attribution results of illegal acts, and enhanced liability reasoning knowledge to infer and judge the degree of responsibility of each party involved in the accident. Module 6, responsible for model fine-tuning and optimization, uses a low-rank adaptation method to perform targeted fine-tuning of the pre-trained large language model, ensuring the model maintains its general language understanding capabilities while enhancing its adaptability to traffic violation identification, legal text understanding, and liability reasoning tasks. Module 7, responsible for running the locally deployed, fine-tuned accident liability determination vertical domain large language model DeepSeek-R1-Distill-Qwen-7B, and combining the aforementioned enhanced retrieval knowledge results, guides and constrains the model's analysis and generation process through prompting engineering. It performs illegal act identification, liability element analysis, and liability logic reasoning on the input accident description text, outputting the final structured liability determination result. Module 8 provides computing power support, using dual NVIDIA... The accident semantic parsing module, violation identification and attribution module, accident liability determination knowledge base module, liability determination reasoning enhancement module, liability determination reasoning decision module, model fine-tuning and optimization module, and large model interaction module are deployed and run on the RTX4090 GPU server to complete the fully automated processing from accident description input to liability determination result output, ensuring the privacy and security of accident data and liability determination results.

[0014] Furthermore, the accident semantic parsing module 1 includes: The text segmentation and extraction submodule is used to segment the original traffic accident text record and extract structured fields containing accident road segment, accident process description field, illegal behavior description field, accident consequences and liability type to obtain structured feature information. The semantic parsing construction submodule is used to perform semantic extraction and parsing on the structured feature information to obtain the standardized accident fact representation.

[0015] Specifically, over 30,000 accident text data were segmented and feature extraction was performed. The feature information included structured fields such as accident section, accident process description, illegal behavior description, accident consequences, and liability type, ensuring that the corpus content of the labeled data was clearly structured and maximizing the efficiency of model training.

[0016] Furthermore, the violation identification and attribution module 2 includes: The illegal behavior identification submodule is used to identify the driving behavior of the parties involved in the accident based on the standardized accident fact representation to identify whether there are illegal traffic behaviors such as drunk driving, speeding, failure to yield, and illegal lane changing, and to obtain the specific illegal behavior type; The causal association establishment submodule is used to establish a preliminary causal relationship between the illegal traffic behavior and the accident result based on the specific type of illegal behavior, and to obtain the attribution result of the illegal behavior.

[0017] Furthermore, the accident liability determination knowledge base module 3 includes: The text segmentation module is used to obtain relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination. Through segmentation processing, the obtained unstructured text is converted into segmented data to obtain text segmented data. The vector database construction submodule is used to convert the text block data into vectorized data using a vectorization model, and to uniformly store the vectorized data in the vector database to build a knowledge base with classification index and semantic association functions, thereby obtaining the standardized knowledge base for accident liability determination.

[0018] Specifically, we will collect and organize policy provisions and legal articles related to the determination of liability in traffic accidents, as well as typical accident liability determination case data, in order to build a standardized knowledge base for accident liability determination with classification index and semantic association functions, and regularly update it to gradually enrich and improve the knowledge base data, and make it more timely and scientific.

[0019] Furthermore, the liability determination reasoning enhancement module 4 includes: The similarity matching submodule is used to perform semantic matching by calculating the cosine similarity between the standardized accident fact representation and the attribution result of the illegal behavior in the accident liability determination standardization knowledge base to obtain relevant liability determination basis and reference cases, and obtain matching reference information. The weight assignment input submodule is used to assign different weights based on the similarity between the liability determination criteria and the reference cases in the matching reference information, and to use the weighted matching reference information as input to obtain the liability reasoning enhancement knowledge.

[0020] Specifically, by utilizing the accident facts and attribution results of illegal acts extracted from traffic accident records, and combining them with laws and regulations, typical liability determination rules, and historical cases in the accident liability determination knowledge base, semantic matching and reasoning enhancement are performed to improve the reliability and consistency of accident liability reasoning. This module introduces semantic retrieval technology, combining liability determination rules and information from historical cases, and infers the division of responsibility in traffic accidents based on a large language model. Its main principle can be divided into two steps: Semantic matching: By calculating the semantic similarity between accident records and liability determination rules or typical cases in the knowledge base, the most relevant reference information for the current accident is obtained; Enhanced Reasoning: Based on relevant cases and rules in the matching, the accuracy and consistency of the large language model in reasoning responsibility are improved.

[0021] Cosine similarity is used to calculate the similarity between the current incident text and the knowledge base entry. The formula is as follows: ; in, It is a vector dot product. It is the Euclidean norm. After obtaining relevant cases or rules, the liability determination reasoning enhancement module 4 will strengthen the reasoning through the following steps: 1) Weighting: Assign different weights to relevant information based on the similarity between the matched cases and the rules; 2) Input to the reasoning model: This enhanced information is used as input to the fine-tuned accident liability determination language model for reasoning. Based on the matching results of historical cases and legal provisions, the model comprehensively assesses the extent of liability of the parties involved, taking into account both the accident facts and illegal acts.

[0022] Furthermore, the model fine-tuning and optimization module 6 includes: The weight freezing submodule is used to keep all the original weights in the pre-trained large language model unchanged to avoid a large amount of computation during the full fine-tuning process, and to obtain a frozen original weight model. The low-rank matrix processing submodule is used to insert two low-rank matrices into the query layer and value layer of the self-attention mechanism of the frozen original weight model, respectively, and calculate the product of the two low-rank matrices to obtain the weight increment matrix. The weight update submodule is used to add the weight increment matrix to the corresponding original weights to complete the weight update, so that the update of the pre-trained large language model is only performed through the low-rank matrix, and the fine-tuned accident liability vertical domain large model is obtained.

[0023] Specifically, it is responsible for fine-tuning the pre-trained large language model using low-rank adaptation (LoRA) technology, enabling it to more efficiently adapt to the specific needs of traffic accident liability determination tasks. The implementation steps of low-rank adaptation are as follows: Freeze original weights: Keep all parameters in the pre-trained model (such as weights in a Transformer) unchanged, avoiding the large amount of computation required during full fine-tuning.

[0024] Introducing low-rank matrices: Two low-rank matrices are inserted into the key parameter layers of the model (including Query, Key, and Value layers) so that model updates are performed only through these low-rank matrices, rather than through full parameter updates; Weight calculation update: The product of the two low-rank matrices is added to the parameters of the original model, thereby completing the fine-tuning of the pre-trained large model.

[0025] More specifically, the calculation expression for the weight update is: ; in, This is the output vector of the large model after fine-tuning. The input vector for the model; and That is, the low-rank matrix learned during the fine-tuning process.

[0026] Furthermore, and more specifically, by fine-tuning the parameters of the local large language model, it can be trained to output specific accident liability determination results. The details are as follows: To address the task of determining liability based on traffic accident record texts, this paper formalizes the accident liability determination problem as a natural language understanding and classification problem. Let a traffic accident record text be represented as: ; in, Indicates the first individual tokens This is the length of the accident description text. This text contains key information such as the accident location, violations, and consequences. The corresponding accident liability tag is defined as follows: {Full responsibility, primary responsibility, shared responsibility, secondary responsibility, no responsibility}; In the formula, This represents the set of accident liability categories. Therefore, the task of determining accident liability can be modeled as follows: given accident text... Predicting liability categories under certain conditions The conditional probability distribution, i.e.: ; In the formula, This represents the parameter set of the large model. The model first maps the input text into a continuous vector representation and then models the relationships between different semantic elements in the accident text through a self-attention mechanism. Specifically, the input embedding... It is obtained by superimposing word embeddings and positional encoding: ; In the formula, This represents the word embedding of each token in the accident text. Position encoding is used to characterize the structure of a text sequence. In the... In a multi-layer Transformer, the model's self-attention mechanism can be defined as: ; ; ; ; in, , and The projection matrix is ​​learnable. The key vector dimension is used. This mechanism can effectively capture the global dependencies between feature elements such as road segments, illegal behaviors, and accident consequences in accident texts, providing context-aware semantic representations for subsequent liability determination. In the model fine-tuning stage, the traditional full-parameter fine-tuning method adapts to accident liability determination by directly updating model weights. Its principle can be expressed as: ; in, For the model weights to be updated, For the original weights, This represents the weights in the Transformer layer that need to be changed. However, this method has a large parameter size and requires high training costs.

[0027] Furthermore, a low-rank adaptation (LoRA) training method is employed for more efficient fine-tuning of large models. This method introduces two learnable low-rank matrices while freezing the original weight parameters of the pre-trained model. A and BThe product of these weights is then added to the original weights. Through this mechanism, LoRA can achieve performance comparable to full fine-tuning while significantly reducing the number of trainable parameters (typically by several orders of magnitude) and GPU memory usage, while maintaining efficiency during the inference phase. Furthermore, users can train different LoRA models for different downstream tasks, and after fine-tuning, only the newly added weights (shared across different tasks) need to be saved, requiring far less memory compared to storing the entire model's weights.

[0028] Furthermore, the LoRA module is injected into the query and value linear projection submodules of the Transformer self-attention mechanism, and its original linear mapping form is as follows: ; in, , , They represent the first The projection matrices of Query, Key, and Value in the layered self-attention module. When employing the LoRA fine-tuning strategy, this paper maintains... , , The original weights are frozen, and low-rank incremental parameters are introduced only in the Query and Value branches. The corresponding weight update can be expressed as: ; in, , , Let be the rank of the low-rank decomposition. This is the hidden state dimension. Therefore, the... The Query and Value expressions of the layer after LoRA fine-tuning and adaptation can be rewritten as follows: ; ; The newly added low-rank term only participates in gradient updates during the fine-tuning stage, while the original weights remain unchanged. This significantly reduces the size of trainable parameters while achieving efficient adaptation of the model to accident liability determination tasks.

[0029] Furthermore, the large model fine-tuning training process utilized the PyTorch framework. The dataset contained all extracted accident feature information, with a training set to test set ratio of 8:2. The initial learning rate was set to 5e4, and cosine annealing was used for learning rate scheduling. `lora_rank` (rank of the low-rank matrix) was 8; `lora_alpha` (scaling factor) was 16; `lora_dropout` (dropout rate) was 0.2; the maximum sample size was set to 800, the batch size to 64, and the training epochs to 20. The optimizer chosen was Adam (Adaptive Moment Estimation): an adaptive learning rate optimization algorithm that combines the advantages of momentum and adaptive learning rate, enabling the model to converge quickly and stably to the optimal point.

[0030] Furthermore, the liability determination reasoning and decision-making module 5 includes: The logical reasoning construction submodule is used to utilize the finely tuned accident liability determination vertical domain model, combined with the thinking chain technology to integrate the standardized accident fact representation, the attribution results of illegal acts, and the enhanced knowledge of liability reasoning, to logically reason about the extent of responsibility of each participating party and obtain the reasoning logic chain. The reasoning and decision display submodule is used to make reasoning judgments on the degree of responsibility of each participating party based on the reasoning logic chain, and to display the entire reasoning process from semantic parsing, illegal identification to legal attribution in real time on the interface, so as to obtain the responsibility determination reasoning decision result.

[0031] Furthermore, the large model interaction module 7 includes: The prompt instruction generation submodule is used to receive the original traffic accident text record input by the user, and combine the prompt engineering to organize the original traffic accident text record with the responsibility reasoning enhancement knowledge in an orderly manner to form a standardized input that meets the model reasoning requirements, and obtain standardized prompt instructions; The standardized result output submodule is used to guide the fine-tuned accident liability determination vertical domain large model to standardize the output of the liability determination reasoning decision result in conjunction with the standardized prompt instructions, and generate an accident determination report containing basic accident information, accident process, liability determination basis and final conclusion, thus obtaining the standardized liability determination result.

[0032] Specifically, a locally deployed DeepSeek-R1-Distill-Qwen-7B is used as the base model for parameter fine-tuning. Upon receiving user-inputted traffic accident description text, it integrates enhanced output results from a knowledge base, enabling automatic analysis and reasoning of the accident process while ensuring the security and privacy of the input data. This module guides and constrains the input structure and generation process of the large language model through prompting engineering, systematically organizing accident description information, relevant legal provisions, accident liability determination standards, and typical case knowledge to form standardized input that meets the model's reasoning needs. This guides the model to progressively analyze and logically reason about the illegal acts, causal relationships, and liability boundaries of the accident parties. Finally, the large model interaction module generates standardized accident liability determination results according to a preset output format.

[0033] Furthermore, the locally deployed runtime module 8 includes: The hardware environment configuration submodule is used to deploy the above 7 functional modules in a local server configured with 2 graphics processors, 1 central processing unit and 4 memory, to provide the necessary computing resources for model loading, batch inference and long context generation, and to obtain a local computing environment. The safety automation operation submodule is used to automatically process the process from receiving the original traffic accident text record to outputting the standardized liability determination result, relying on the local computing environment.

[0034] Specifically, this module is responsible for providing the necessary computing resources and storage capacity for the deployment, inference, and training of local large language models. It utilizes a local GPU server equipped with two NVIDIA RTX 4090 GPUs, one Intel Core i9-14900K processor, and four 32GB DDR5 memory modules, sufficient to meet the computational demands of model loading, batch inference, and long context generation. In terms of software, the server system runs on Ubuntu 22.04 LTS, and includes the CUDA 12.8 runtime library and the PyTorch 2.7.1 deep learning framework to ensure the required computing power for the model and the real-time performance of the responsible inference process.

[0035] Furthermore, such as Figure 2-4 As shown, Figure 2 This diagram illustrates the low-rank adaptation method in the automatic traffic accident liability determination generation system and method based on a large language model, as shown in the embodiment. This technique first uses a pre-trained large language model as the base model and, while keeping the original model parameters unchanged, structurally modifies the key linear transformation layer in the model. In the specific implementation process, the system uses the original weight matrix... WThese parameters are treated as frozen and do not participate in gradient updates, thus preserving the model's original general language comprehension capabilities. Simultaneously, two trainable low-rank matrices are introduced into the original linear mapping structure. A and B , where the matrix A The dimension is r×d matrix B The dimension is d×r ,in d Let d represent the feature dimension of the original weight matrix, and r represent a low-rank dimension much smaller than d. In this way, the model parameters are no longer updated directly on the original weight matrix, but rather through the increment matrix Δ formed by the product of low-rank matrices. W This allows for the supplementation and correction of the original weights. During the forward computation, the input feature vector x is first processed by the frozen original weight matrix. W Perform a linear mapping, while using a low-rank matrix. A and B The resulting adaptation structure generates weight increments, thus forming new mapping relationships. This allows for the injection of task-specific knowledge while maintaining the original semantic expressive power. In this way, the model's actual weights can be represented as the sum of the original weights and the low-rank update matrix, thereby achieving efficient learning of knowledge in the field of traffic accident liability determination.

[0036] Figure 3 This diagram illustrates the retrieval-enhanced generation technology used in the automatic traffic accident liability determination system and method based on a large language model, as illustrated in this embodiment. This technology, based on retrieval-enhanced generation, first integrates multi-source liability determination reference data, including accident case descriptions, relevant legal provisions, and historical judgments. Through segmentation, the unstructured long text is converted into chunked data. Then, a vectorization model is used to convert the chunked text into vectorized data, which is uniformly stored in a vector database, constructing the system's professional knowledge foundation. When executing liability determination tasks, the system optimizes input commands through prompting, triggering a retrieval mechanism to match and extract the most relevant legal basis and similar cases from the vector database. The extracted contextual information is embedded into the input sequence of the large accident liability determination model, enabling the model to perform logical reasoning based on authentic legal texts and precedents. The resulting liability determination output not only possesses the semantic understanding capabilities of the large language model but also has the support of legal facts, thus solving the "illusion" problem that may occur when the large model handles specific legal vertical fields, significantly improving the interpretability and professional accuracy of the liability determination results.

[0037] Figure 4This is a schematic diagram of the large-scale model interaction page in the automatic generation system and method for traffic accident liability determination based on a large language model, as illustrated in the embodiment. The large-scale model interaction interface for accident liability determination demonstrates the high level of integration and intelligence of this patented technology on the user end. Its core relies on the large-scale model for vertical domain accident liability determination and the large-scale model interaction module defined in the patent. This interface presents the logical closed loop of the system in handling complex liability determination tasks in an explicit way. That is, after receiving the accident description, the system uses the liability determination reasoning decision module and thinking chain technology to display the entire reasoning process from semantic parsing, violation identification to legal attribution in real time at the top of the interface, thereby solving the problem of insufficient interpretability of traditional models. At the same time, the system combines retrieval-enhanced generation technology, which ensures that the reasoning logic has real legal support by automatically searching the knowledge base of laws, regulations and typical cases in the background. It also automatically generates a standardized "Accident Determination Letter" at the bottom of the interface, which includes basic accident information, accident process, liability determination basis and final conclusion. The visualization of the reasoning chain enhances the transparency and professionalism of law enforcement.

[0038] This embodiment also provides an automatic generation method for traffic accident liability determination based on a large language model, including: Semantic extraction and parsing of accident fact elements in the original traffic accident text records are performed to obtain a standardized accident fact representation. Based on the standardized accident fact representation, the driving behavior of the parties involved in the accident is judged to identify whether there is any traffic violation, and a preliminary causal relationship between the traffic violation and the accident result is established to obtain the attribution result of the traffic violation. Acquire relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination, and build a knowledge base with classification index and semantic association functions to obtain a standardized knowledge base for accident liability determination; The standardized accident fact representation and the attribution result of the illegal behavior are semantically matched in the accident liability determination standardization knowledge base to obtain enhanced knowledge of liability reasoning. A low-rank adaptation method was used to perform targeted fine-tuning on the pre-trained large language model, resulting in a fine-tuned accident liability determination vertical domain large model. By integrating the standardized accident fact representation, the attribution results of illegal acts, and the enhanced knowledge of liability reasoning, the fine-tuned accident liability determination vertical domain model is used to reason and judge the degree of liability of each participating party, and obtain the liability determination reasoning decision result. The system receives the original traffic accident text record input by the user, and, in conjunction with the prompting engineering guidance, the finely tuned accident liability determination vertical domain large model performs standardized output of the liability determination reasoning decision result to obtain a standardized liability determination result. The above functional modules are deployed and run on a local server to complete the automatic processing from input to the output of the standardized accountability result.

[0039] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0040] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An automatic generation system for traffic accident liability determination based on a large language model, characterized in that, include: The accident semantic parsing module is used to extract and parse the accident fact elements in the original traffic accident text record to obtain a standardized accident fact representation. The violation identification and attribution module is used to judge the driving behavior of the parties involved in the accident based on the standardized accident fact representation to identify whether there is a traffic violation, and to establish a preliminary causal relationship between the traffic violation and the accident result to obtain the violation attribution result. The accident liability determination knowledge base module is used to acquire relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination, and build a knowledge base with classification index and semantic association functions to obtain a standardized accident liability determination knowledge base. The liability determination reasoning enhancement module is used to semantically match the standardized accident fact representation with the attribution result of the illegal behavior in the accident liability determination standardization knowledge base to obtain liability reasoning enhancement knowledge. The model fine-tuning and optimization module is used to perform targeted fine-tuning of the pre-trained large language model using the low-rank adaptation method, so as to obtain the fine-tuned accident liability determination vertical domain large model. The liability determination reasoning and decision-making module is used to integrate the standardized accident fact representation, the attribution results of illegal acts, and the enhanced knowledge of liability reasoning into the fine-tuned accident liability determination vertical domain model to reason and judge the degree of responsibility of each participating party and obtain the liability determination reasoning and decision-making result. The large model interaction module is used to receive the original traffic accident text record input by the user, and combined with the prompting engineering to guide the fine-tuned accident liability determination vertical domain large model to standardize the liability determination reasoning decision result and obtain the standardized liability determination result. The local deployment and operation module is used to deploy and run the above-mentioned functional modules on a local server to complete the automatic processing from input to the output of the standardized accountability result.

2. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The accident semantic parsing module includes: The text segmentation and extraction submodule is used to segment the original traffic accident text record and extract structured fields containing accident road segment, accident process description field, illegal behavior description field, accident consequences and liability type to obtain structured feature information. The semantic parsing construction submodule is used to perform semantic extraction and parsing on the structured feature information to obtain the standardized accident fact representation.

3. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The violation identification and attribution module includes: The illegal behavior identification submodule is used to identify the driving behavior of the parties involved in the accident based on the standardized accident fact representation to identify whether there are illegal traffic behaviors such as drunk driving, speeding, failure to yield, and illegal lane changing, and to obtain the specific illegal behavior type; The causal association establishment submodule is used to establish a preliminary causal relationship between the illegal traffic behavior and the accident result based on the specific type of illegal behavior, and to obtain the attribution result of the illegal behavior.

4. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The accident liability determination knowledge base module includes: The text segmentation module is used to obtain relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination. Through segmentation processing, the obtained unstructured text is converted into segmented data to obtain text segmented data. The vector database construction submodule is used to convert the text block data into vectorized data using a vectorization model, and to uniformly store the vectorized data in the vector database to build a knowledge base with classification index and semantic association functions, thereby obtaining the standardized knowledge base for accident liability determination.

5. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The liability determination reasoning enhancement module includes: The similarity matching submodule is used to perform semantic matching by calculating the cosine similarity between the standardized accident fact representation and the attribution result of the illegal behavior in the accident liability determination standardization knowledge base to obtain relevant liability determination basis and reference cases, and obtain matching reference information. The weight assignment input submodule is used to assign different weights based on the similarity between the liability determination criteria and the reference cases in the matching reference information, and to use the weighted matching reference information as input to obtain the liability reasoning enhancement knowledge.

6. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The model fine-tuning and optimization module includes: The weight freezing submodule is used to keep all the original weights in the pre-trained large language model unchanged to avoid a large amount of computation during the full fine-tuning process, and to obtain a frozen original weight model. The low-rank matrix processing submodule is used to insert two low-rank matrices into the query layer and value layer of the self-attention mechanism of the frozen original weight model, respectively, and calculate the product of the two low-rank matrices to obtain the weight increment matrix. The weight update submodule is used to add the weight increment matrix to the corresponding original weights to complete the weight update, so that the update of the pre-trained large language model is only performed through the low-rank matrix, and the fine-tuned accident liability vertical domain large model is obtained.

7. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The responsibility determination reasoning and decision-making module includes: The logical reasoning construction submodule is used to utilize the finely tuned accident liability determination vertical domain model, combined with the thinking chain technology to integrate the standardized accident fact representation, the attribution results of illegal acts, and the enhanced knowledge of liability reasoning, to logically reason about the extent of responsibility of each participating party and obtain the reasoning logic chain. The reasoning and decision display submodule is used to make reasoning judgments on the degree of responsibility of each participating party based on the reasoning logic chain, and to display the entire reasoning process from semantic parsing, illegal identification to legal attribution in real time on the interface, so as to obtain the responsibility determination reasoning decision result.

8. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The large model interaction module includes: The prompt instruction generation submodule is used to receive the original traffic accident text record input by the user, and combine the prompt engineering to organize the original traffic accident text record with the responsibility reasoning enhancement knowledge in an orderly manner to form a standardized input that meets the model reasoning requirements, and obtain standardized prompt instructions; The standardized result output submodule is used to guide the fine-tuned accident liability determination vertical domain large model to standardize the output of the liability determination reasoning decision result in conjunction with the standardized prompt instructions, and generate an accident determination report containing basic accident information, accident process, liability determination basis and final conclusion, thus obtaining the standardized liability determination result.

9. The automatic generation system for traffic accident liability determination based on a large language model according to claim 1, characterized in that, The locally deployed and running module includes: The hardware environment configuration submodule is used to deploy the above 7 functional modules in a local server configured with 2 graphics processors, 1 central processing unit and 4 memory, to provide the necessary computing resources for model loading, batch inference and long context generation, and to obtain a local computing environment. The safety automation operation submodule is used to automatically process the process from receiving the original traffic accident text record to outputting the standardized liability determination result, relying on the local computing environment.

10. A method for automatically generating traffic accident liability determination based on a large language model, characterized in that, include: Semantic extraction and parsing of accident fact elements in the original traffic accident text record are performed to obtain a standardized accident fact representation; Based on the standardized accident fact representation, the driving behavior of the parties involved in the accident is judged to identify whether there is any traffic violation, and a preliminary causal relationship between the traffic violation and the accident result is established to obtain the attribution result of the traffic violation. Acquire relevant laws, regulations, judicial interpretations, typical liability determination rules, and historical typical cases related to accident liability determination, and build a knowledge base with classification index and semantic association functions to obtain a standardized knowledge base for accident liability determination; The standardized accident fact representation and the attribution result of the illegal behavior are semantically matched in the accident liability determination standardization knowledge base to obtain enhanced knowledge of liability reasoning. A low-rank adaptation method was used to perform targeted fine-tuning on the pre-trained large language model, resulting in a fine-tuned accident liability determination vertical domain large model. By integrating the standardized accident fact representation, the attribution results of illegal acts, and the enhanced knowledge of liability reasoning, the fine-tuned accident liability determination vertical domain model is used to reason and judge the degree of liability of each participating party, and obtain the liability determination reasoning decision result. The system receives the original traffic accident text record input by the user, and, in conjunction with the prompting engineering guidance, the finely tuned accident liability determination vertical domain large model performs standardized output of the liability determination reasoning decision result to obtain a standardized liability determination result. The above functional modules are deployed and run on a local server to complete the automatic processing from input to the output of the standardized accountability result.