LLMs-based accident trigger source analysis and ODC element extraction and classification method and system

Through the method of combining LLMs and FS prompt technology, the trigger sources of accidents of autonomous driving vehicles are extracted and classified, and a systematic ODC element framework is formed, which solves the extraction and classification problems in the existing technology and improves the risk assessment and decision-making capabilities of autonomous driving systems. .

CN119166819APending Publication Date: 2024-12-20HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411325876.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The prior art is difficult to comprehensively and accurately extract the trigger source of accidents of autonomous vehicles in complex traffic scenarios, and lacks a systematic ODC element framework, which affects the safety decision-making capabilities of autonomous driving systems.

Method used

Using the method of combining Prompt engineering based on LLMs with FS examples, the trigger source in the accident data is extracted and sorted into an ODC element classification framework that meets the national standard requirements through word vectorization and clustering technology, and using ChatGPT's Text-embedding-3 -large model and improved K-means algorithm for data preprocessing and clustering.

Benefits of technology

It improves the accuracy and efficiency of accident trigger source extraction, reduces manual intervention, forms a complete ODC element classification framework, and enhances the risk assessment capabilities of autonomous driving systems in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166819A_ABST
    Figure CN119166819A_ABST
Patent Text Reader

Abstract

The invention discloses an LLMs-based accident trigger source analysis and ODC element extraction and classification method and system, and the method comprises the steps: carrying out the preprocessing of original accident data, obtaining the accident data of a to-be-processed traffic accident analysis task, inputting the accident data into LLMs which passes through a Prompt module and is guided to learn through the FS technology, and obtaining a to-be-processed traffic accident analysis task; the LLMs extracts a trigger source in the accident data to be processed by using the learned trigger source extraction method, performs word vectorization on the extracted trigger source, and constructs a trigger source word vector space; clustering trigger source word vectors in the trigger source word vector space, using a search algorithm to retrieve trigger source texts and embed the trigger source texts into a database, finding out the trigger source texts closest to the trigger source word vectors, extracting three-level classifications of the ODC elements from the trigger source word vectors, sorting the three-level classifications of the ODC elements into a two-level classification framework of a national standard file, and storing the three-level classifications of the ODC elements into a second-level classification framework of the national standard file. And an ODC element secondary classification framework meeting national standard requirements is formed. According to the method, the extraction efficiency of the key ODC elements can be effectively improved, and the accuracy and efficiency of element grading and classification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of autonomous driving hazard identification, and in particular to an accident trigger source analysis and ODC (Operational Design Condition) element extraction and classification method and system based on LLMs (Large Language Models in English and large language models in Chinese). Background Art

[0002] With the rapid development and application of autonomous driving technology, its safety issues in complex traffic scenarios have gradually become the focus of research. In particular, in high-risk traffic interaction scenarios such as unprotected left turns and sudden pedestrian crossings, autonomous driving systems may face unpredictable accident risks. In this context, how to effectively identify and respond to these potential accident triggers is crucial to ensuring the safety of autonomous vehicles.

[0003] At present, the identification of hazards in autonomous driving mainly relies on methods such as accident analysis, test evaluation and theoretical analysis. Although these methods can identify potential accident trigger sources to a certain extent, due to the complexity and variability of the traffic environment, traditional methods often find it difficult to comprehensively and accurately extract accident trigger sources in all possible risk scenarios. In addition, manual analysis of large-scale traffic accident data is not only inefficient, but also prone to missing key trigger factors. In recent years, the rapid development of artificial intelligence and LLMs has provided new technical means for the identification of accident trigger sources in the field of autonomous driving. Based on the powerful language processing and data analysis capabilities of LLMs, accident-related trigger source information can be automatically extracted from massive traffic accident data. However, current research focuses on the identification and extraction of trigger sources, and there is still a lack of research on how to systematically classify these trigger sources and construct them into an ODC element framework.

[0004] Constructing the ODC element framework is a key link in ensuring the safety of autonomous driving systems. By clarifying the relationship between external environmental conditions and the internal state of the system, the framework can provide a solid foundation for the safe operation of autonomous driving systems in different scenarios. At present, although the technology for extracting trigger sources has gradually matured, how to further systematize these extracted trigger sources, form an ODC element framework and effectively classify them is still a key issue that needs to be urgently solved in the field of autonomous driving safety. Without the support of this framework, autonomous driving systems may find it difficult to accurately assess risks under specific environmental conditions when dealing with complex traffic scenarios, which in turn affects the system's ability to make safe decisions.

[0005] Prior art 1 proposes a method of using STPA (System Theoretic Process Analysis in English, System Theoretic Process Analysis in Chinese) to identify potential accident trigger sources of LKAS (Lane Keeping Assist System in English, Lane Keeping Assist System in Chinese). The method first performs a detailed functional decomposition and control structure modeling of LKAS, and then extracts the corresponding accident trigger sources by identifying potential unsafe control behaviors in the system and deeply analyzing their causes. The STPA analysis method can systematically analyze the potential dangerous factors and trigger sources in the lane keeping assist system. However, this accident trigger source extraction method based on STPA has a low degree of automation, heavily relies on manual analysis by experts, and is not efficient when dealing with complex scenarios. In addition, STPA requires a large amount of detailed data input and needs to build a complex system control structure model, which is difficult to adapt to the dynamically changing traffic accident analysis task scenario and lacks flexibility. At the same time, its analysis results cannot be directly output in a structured format and need to be further sorted before they can be used in subsequent steps.

[0006] Prior art 2 designs a unified ODD (Operational Design Domain in English, Operational Design Domain in Chinese) monitoring framework to deal with the expected functional safety risks that may be caused when vehicles exceed the ODD boundary in complex traffic scenarios. The framework consists of three modules: weather condition monitoring (such as abnormal weather such as rain, snow, fog, etc.), vehicle behavior monitoring (such as abnormal behavior such as traffic rule violations), and road condition monitoring (such as abnormal road conditions such as road defects, unexpected obstacles, and slippery roads). The trigger sources of each module are analyzed to monitor the ODD elements involved. Finally, the practicality and effectiveness of the ODD monitoring framework in mitigating functional safety risks were verified in the application. However, by analyzing the trigger sources of the three modules of weather conditions, vehicle behavior, and abnormal road conditions, and directly using their results as the definition of ODD, in order to mitigate the expected functional safety risks through ODD monitoring, this method has obvious deficiencies in the implementation process. The main problem is that this method fails to include the step of systematically extracting key ODD elements from the trigger sources. This lack makes it difficult to effectively screen and identify the trigger sources when they are small, numerous and fragmented. Therefore, it is necessary to establish an ODD element framework from a system perspective to fully cover the hazard trigger sources. Summary of the invention

[0007] The object of the present invention is to provide an accident trigger source analysis and ODC element extraction and classification method and system based on LLMs to overcome or at least alleviate at least one of the above-mentioned defects of the prior art.

[0008] To achieve the above object, the present invention provides an accident trigger source analysis and ODC element extraction and classification method based on LLMs, which includes:

[0009] According to the Chinese standard files and accident data files of the traffic accident analysis task, the Prompt module is obtained by combining the framework of the Prompt project with the FS (Few-Shot) example. The Prompt guide words provided by the Prompt module are used to guide LLMs to learn the trigger source extraction method of the accident data file and the ODC element classification principle of the national standard file.

[0010] After preprocessing the original accident data, the accident data of the traffic accident analysis task to be processed is obtained and input into the LLMs after learning guided by the Prompt module. The LLMs use the learned trigger source extraction method to extract the trigger source in the accident data to be processed, and use the learned ODC element classification principle to combine the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements.

[0011] The method of "combining the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements" specifically includes:

[0012] The extracted trigger sources are word-vectorized to construct a trigger source word vector space; the trigger source word vectors in the trigger source word vector space are clustered, and the trigger source text embedding database is retrieved using a search algorithm to find the trigger source text closest to the trigger source word vector, so as to extract the three-level classification of ODC elements from the trigger source word vector, and organize the three-level classification of ODC elements into the secondary classification framework of the national standard file to form an ODC element secondary classification framework that meets the requirements of the national standard.

[0013] Furthermore, the Promote module includes:

[0014] A role definition unit, which is used to pre-set a role for LLMs according to the traffic accident analysis task, so as to ensure that LLMs have the background and perspective corresponding to the role during the extraction process, and can complete the traffic accident analysis task according to the preset role;

[0015] A task prompt unit, which is used to provide task prompts to LLMs to guide LLMs to focus on the key trigger source elements of the traffic accident analysis task, thereby efficiently extracting the required information and outputting the corresponding format as required;

[0016] The context information unit contains context information related to the traffic accident analysis task, enabling LLMs to make judgments and learn based on the context information;

[0017] FS example unit, which is used to guide LLMs to perform traffic accident analysis tasks by providing a small number of representative examples in FS prompts, so that LLMs can extract trigger sources in new traffic accident analysis tasks;

[0018] An input information unit is used to receive actual data that LLMs need to process, and extract key trigger sources from processing the actual data by combining roles, task prompts and contexts;

[0019] The output format unit is used to convert the key trigger source into a trigger source in a format compatible with LLMs and output it.

[0020] Furthermore, “forming an ODC element classification framework that meets the requirements of the national standard” specifically includes:

[0021] According to the first-level classification and second-level classification of ODC elements under the national standard file, the third-level classification of ODC elements is added to obtain a complete ODC element classification framework, as shown in Table 1 below:

[0022] Table 1

[0023]

[0024]

[0025] Furthermore, data preprocessing includes:

[0026] Data cleaning: 1a. Remove duplicate data, irrelevant data and noise data from the original accident data; 1b. Aggregate the original accident data into separate fields to simplify the data content; 1c. Identify and delete invalid data in the original accident data; 1d. Delete the data that is missing from the core part of the original accident data;

[0027] Data formatting: 1e. Merge the accident data after data cleaning.

[0028] Furthermore, the extracted trigger sources are vectorized using the Text-embedding-3-large text embedding model in ChatGPT. Specifically, the following steps are performed:

[0029] 31a. Map the words corresponding to each extracted trigger source into an initial embedding vector to obtain a word vector;

[0030] 31b. Use the self-attention mechanism to simultaneously focus on all the word vectors obtained in 31a and calculate the influence between the two word vectors, so that the trigger source word vector generated by the Text-embedding-3-large text embedding model not only contains the information of the local context, but also can capture the semantic relationship between the two word vectors;

[0031] 31c. Through the multi-layer Transformer encoder, the context information of the word vector is gradually aggregated to generate a vector containing global semantics. The vector of global semantics is used to integrate the word meaning, syntactic structure and context information;

[0032] 31d. Generate a high-dimensional trigger source word vector and output it.

[0033] The present invention also provides an accident trigger source analysis and ODC element extraction and classification system based on LLMs, which includes:

[0034] The Prompt module is used to combine the framework of the Prompt project with the FS example according to the national standard file and accident data file of the traffic accident analysis task, and use the Prompt guide words to guide LLMs to learn the trigger source extraction method of the accident data file and the ODC element classification principle of the national standard file;

[0035] LLMs, after being guided by the Prompt module for learning, are used to receive the accident data of the traffic accident analysis task to be processed, and use the learned trigger source extraction method to extract the trigger source in the accident data to be processed, and use the learned ODC element hierarchical classification principle to combine the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements;

[0036] The method of "combining the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements" specifically includes:

[0037] The extracted trigger sources are word-vectorized to construct a trigger source word vector space; the trigger source word vectors in the trigger source word vector space are clustered, and the trigger source text embedding database is retrieved using a search algorithm to find the trigger source text closest to the trigger source word vector, so as to extract the three-level classification of ODC elements from the trigger source word vector, and organize the three-level classification of ODC elements into the secondary classification framework of the national standard file to form an ODC element secondary classification framework that meets the requirements of the national standard.

[0038] Furthermore, the Promote module includes:

[0039] A role definition unit, which is used to pre-set a role for LLMs according to the traffic accident analysis task, so as to ensure that LLMs have the background and perspective corresponding to the role during the extraction process, and can complete the traffic accident analysis task according to the preset role;

[0040] A task prompt unit, which is used to provide task prompts to LLMs to guide LLMs to focus on the key trigger source elements of the traffic accident analysis task, thereby efficiently extracting the required information and outputting the corresponding format as required;

[0041] The context information unit contains context information related to the traffic accident analysis task, enabling LLMs to make judgments and learn based on the context information;

[0042] FS example unit, which is used to guide LLMs to perform traffic accident analysis tasks by providing a small number of representative examples in FS prompts, so that LLMs can extract trigger sources in new traffic accident analysis tasks;

[0043] An input information unit is used to receive actual data that LLMs need to process, and extract key trigger sources from processing the actual data by combining roles, task prompts and contexts;

[0044] The output format unit is used to convert the key trigger source into a trigger source in a format compatible with LLMs and output it.

[0045] Furthermore, “forming an ODC element classification framework that meets the requirements of the national standard” specifically includes:

[0046] According to the first-level classification and second-level classification of ODC elements under the national standard file, the third-level classification of ODC elements is added to obtain a complete ODC element classification framework, as shown in Table 1 below:

[0047] Table 1

[0048]

[0049]

[0050] Further, the accident trigger source analysis and ODC element extraction and classification system based on LLMs also includes: a data preprocessing unit, which is used to preprocess the original accident data input into LLMs to obtain accident data for the traffic accident analysis task to be processed;

[0051] The data preprocessing procedures include:

[0052] Data cleaning: 1a. Remove duplicate data, irrelevant data and noise data from the original accident data; 1b. Aggregate the original accident data into separate fields to simplify the data content; 1c. Identify and delete invalid data in the original accident data; 1d. Delete the data that is missing from the core part of the original accident data;

[0053] Data formatting: 1e. Merge the accident data after data cleaning.

[0054] Furthermore, the extracted trigger sources are vectorized using the Text-embedding-3-large text embedding model in ChatGPT. Specifically, the following steps are performed:

[0055] 31a. Map the words corresponding to each extracted trigger source into an initial embedding vector to obtain a word vector;

[0056] 31b. Use the self-attention mechanism to simultaneously focus on all the word vectors obtained in 31a and calculate the influence between the two word vectors, so that the trigger source word vector generated by the Text-embedding-3-large text embedding model not only contains the information of the local context, but also can capture the semantic relationship between the two word vectors;

[0057] 31c. Through the multi-layer Transformer encoder, the context information of the word vector is gradually aggregated to generate a vector containing global semantics. The vector of global semantics is used to integrate the word meaning, syntactic structure and context information;

[0058] 31d. Generate a high-dimensional trigger source word vector and output it.

[0059] The present invention has the following advantages due to the adoption of the above technical solution:

[0060] 1. Through the carefully designed prompt, LLMs can make inferences and judgments in the context of specific roles and traffic accident analysis tasks, effectively reducing misjudgments and biases and improving the accuracy of extracting trigger sources; introducing FS prompt technology in Prompt reduces dependence on large-scale data sets and improves the generalization ability of the model; using Prompt to guide LLMs to extract accident trigger sources realizes the automatic extraction of accident trigger sources, reduces manual intervention, and effectively improves the overall efficiency of the system.

[0061] 2. By adopting the Text-embedding-3-large text embedding model in ChatGPT, the trigger source words initially extracted by LLMs are vectorized. Compared with the static word embedding method, the context sensitivity of the word vector is improved, and it has obvious advantages and stronger generalization ability in dealing with polysemy and ambiguity of word vectors.

[0062] 3. By adopting the improved K-means algorithm based on density Canopy to cluster the trigger source word vectors, compared with the traditional K-means algorithm, the sensitivity of the traditional K-means to the initial cluster center, noise and outliers is reduced, and the problem that the random selection of the initial center may cause the algorithm to fall into the local optimal solution is avoided. At the same time, the amount of calculation is greatly reduced; the three-level classification of ODC elements formed by clustering is organized into the secondary classification framework of the national standard to form a complete ODC element hierarchical classification framework, which effectively improves the accuracy and efficiency of element hierarchical classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 It is a flowchart of an accident trigger source analysis and ODC element extraction and classification method based on LLMs according to an embodiment of the present invention.

[0064] Figure 2 It is a schematic diagram of the first and second levels of the ODC element set according to an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In the drawings, the same or similar reference numerals are used to represent the same or similar elements or elements with the same or similar functions. The embodiments of the present invention are described in detail below in conjunction with the drawings.

[0066] In the description of the present invention, the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the scope of protection of the present invention.

[0067] Against the backdrop of the rapid development of autonomous driving technology, ADS (Automated Driving Systems in English, and Advanced Driver Assistance Systems in Chinese) and ADAS (Advanced Driver Assistance Systems in English, and Advanced Driver Assistance Systems in Chinese) have made significant progress in improving vehicle safety. However, autonomous driving systems still face many challenges when facing complex traffic environments, especially in terms of traffic accident data trigger source extraction and key ODC element analysis and classification (data analysis after trigger source extraction). Traditional accident trigger source extraction methods such as STPA, fault tree analysis, and HAZOP (Hazard and Operability Analysis in English, and Hazard and Operability Analysis in Chinese) mainly rely on manual analysis, resulting in low accuracy and efficiency in accident trigger source identification, and it is difficult to fully explore the trigger sources and potential problems of ADS when dealing with complex systems and analyzing large-scale accident data.

[0068] like Figure 1 As shown, the accident trigger source analysis and ODC element extraction and classification method based on LLMs is characterized by including:

[0069] According to the Chinese standard document of traffic accident analysis task (GB / T 20230388-T-339 "Design and operation conditions of automatic driving system for intelligent connected vehicles") and accident data files, the framework of Prompt project is combined with FS example to obtain Prompt module. The Prompt guide words provided by Prompt module are used to guide LLMs to learn the trigger source extraction method of accident data files and the ODC element classification principles of national standard files.

[0070] After preprocessing the original accident data, the accident data for the traffic accident analysis task to be processed is obtained and input into the LLMs after learning guided by the Prompt module. The LLMs use the learned trigger source extraction method to extract the trigger source in the accident data to be processed, and use the learned ODC element hierarchical classification principle to combine the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements.

[0071] The method of "combining the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements" specifically includes:

[0072] The extracted trigger sources are word-vectorized to construct a trigger source word vector space; the trigger source word vectors in the trigger source word vector space are clustered, and the trigger source text embedding database is retrieved using a search algorithm to find the trigger source text closest to the trigger source word vector, so as to extract the three-level classification of ODC elements from the trigger source word vector, and organize the three-level classification of ODC elements into the secondary classification framework of the national standard file to form an ODC element secondary classification framework that meets the requirements of the national standard.

[0073] In the above embodiment, the dataset selection of the original accident data is mainly based on the AVOID (Autonomous Vehicle Operation Incident Dataset) dataset as the basic data source. The AVOID dataset is an open autonomous vehicle collision dataset with a rich sample size, diverse data sources and high-quality data assurance. The dataset covers three types of vehicles: autonomous driving system vehicles, advanced driver assistance system vehicles and low-speed autonomous driving shuttles. The data mainly comes from NHTSA (National Highway Traffic Safety Administration), CA DMV (California Department of Motor Vehicles) and global accident news reports, and is manually verified and summarized to ensure the accuracy and consistency of the data.

[0074] The AVOID dataset contains more than 1,000 accident reports from 2014 to 2023, systematically summarizing the pre-collision conditions, event nature, and road and environmental characteristics, providing extensive and reliable sample support for studying the trigger sources of autonomous vehicle collisions. The dataset is presented in the form of four comma-separated value (CSV) files, namely "ADS(SAEL3-5).csv", "ADAS(SAE L2).csv", "Shuttle(SAE L3-5).csv" and "Crash_news(SAE L2).csv", covering collision information from CA DMV reports, NHTSA data tables and news reports. The collision characteristics are classified into seven major categories, including: vehicle condition, pre-collision conditions, road and environment, collision results, vehicle contact area (own vehicle) and contact area of ​​other vehicles. The distribution map of AVOID data sources is shown in Table 2.

[0075] Table 2

[0076]

[0077] In order to ensure the consistency and availability of data, the "raw accident data preprocessing" provided in this embodiment mainly performs data cleaning and formatting on the AVOID data set, specifically including:

[0078] 1a. Removal of duplicate data, irrelevant data, and noise data: In the original AVOID dataset, there is a lot of irrelevant information, such as personal information of investigators, accident reporting time, reporting type, and reporting method, etc. In order to improve the quality of the data, this irrelevant information was completely removed.

[0079] 1b. Processing of redundant information: Clean redundant accident description information, summarize it into separate fields, and simplify the data content.

[0080] Specifically, there is a lot of duplication in the original accident report about weather conditions, pre-collision location information, and collision result information. The original data lists all weather conditions and collision locations in multiple tables, and uses "yes" or "no" to indicate the existence of specific conditions. The present invention cleans up these redundant information and extracts the corresponding weather information and collision location information into separate fields, reducing redundant data and improving the simplicity and readability of the data.

[0081] 1c. Identification and deletion of invalid data: By writing a Python script to automatically read the data and traverse all rows and columns, identify the content containing invalid data, and identify records containing "may contain personally identifiable information", "may contain confidential business information" and invalid entries such as "Unknown" and "N / A". These invalid data are effectively eliminated during the data cleaning process.

[0082] 1d. Missing value processing: In the process of data cleaning, the processing of missing values ​​is particularly critical. Direct deletion is used for the missing parts of core data.

[0083] Specifically, for missing content in the Narrative column, since it is the most important source of information in the accident report, the data in the row where the blank Narrative column is located will be deleted to ensure the integrity and information quality of the data set.

[0084] 1e. Data merging: After data cleaning, the cleaned collision information, road conditions, weather environment information, etc. contained in the accident report are merged into a single column to optimize the structure of the accident data and provide a high-quality data foundation for subsequent LLMs training and processing.

[0085] Specifically, the cleaned data are uniformly merged into the Narrative field to expand the Narrative's complete description of the accident data. The structure of the merged AVOID dataset is more compact and consistent, and can effectively capture multi-dimensional information, such as time, location, environment, driving behavior, etc.

[0086] By cleaning and merging data, data redundancy is avoided and data structural consistency is ensured. This processing method not only helps to improve the accuracy and robustness of LLMs in analysis, but also provides the model with richer contextual information when dealing with complex accident scenarios, thereby further enhancing the system's analysis and decision-making capabilities.

[0087] In the above embodiment, in the design of artificial intelligence traffic accident analysis tasks, the construction of Prompt combined with FS prompt technology is crucial to ensure that the model efficiently performs specific traffic accident analysis tasks. Prompt guides LLMs to learn the trigger source extraction method of accident data files and the ODC element classification principle of national standard files through the synergy of multiple parts such as role definition, task prompts, context information, example provision, input content and output format.

[0088] In this embodiment, the FS prompt technology is introduced in the example providing part of the framework of the Prompt project, in particular, as an important means for LLMs to understand and extract various elements of ODC of accident trigger sources. FS prompt is a technology used in natural language processing traffic accident analysis tasks. It guides LLMs to understand and perform specific traffic accident analysis tasks by providing a small number of examples to pre-trained LLMs, and quickly generalizes them with a small number of representative examples to adapt to new traffic accident analysis tasks and scenarios, which can significantly reduce data requirements and improve the application efficiency of the model. In the Prompt guidance process, the application of these components is particularly important because they help LLMs to learn quickly with few examples and thus effectively reason and judge. The following is a detailed description of the components of the Prompt module:

[0089] 2a. Role definition unit, which is used to pre-set a role for LLMs according to the traffic accident analysis task. The role is usually highly related to the traffic accident analysis task to ensure that LLMs have the background and perspective corresponding to the role during the extraction process and can complete the traffic accident analysis task according to the preset role. This role setting helps LLMs maintain a consistent analysis perspective during the execution of the traffic accident analysis task.

[0090] 2b. Task prompt unit, which is used to provide clear task prompts for LLMs to guide LLMs to focus on the key trigger source elements of the traffic accident analysis task, as opposed to the irrelevant elements, so as to efficiently extract the required information and output the corresponding format as required.

[0091] 2c. Context information unit, which contains context information related to the traffic accident analysis task. The context may include historical data or relevant background information required for LLMs to perform the traffic accident analysis task. This provides rich contextual support for the model, enabling LLMs to make judgments and learn based on the context information.

[0092] 2d. An example providing unit is used to provide a small number of representative examples (usually about 10) in the FS prompt that can analyze and describe detailed hazardous events and accurately extract the corresponding trigger sources, so as to guide LLMs to perform traffic accident analysis tasks, so that LLMs can quickly adapt to and accurately extract trigger sources in new traffic accident analysis tasks. Among them, the new traffic accident analysis task can be understood as extracting trigger sources from other accident data.

[0093] 2e. The input information unit is used to receive the actual data that the LLMs need to process, and extract key trigger source information from the actual data when processing it by combining the role, task prompts and context.

[0094] 2f. Output format unit, which is used to convert the key trigger source information into a trigger source in a format compatible with LLMs, so that the subsequent system or module can parse and apply it. According to actual needs, the format compatible with LLMs can be a structured data format, such as JSON or XML, for further automated processing.

[0095] Specifically, in practical applications, the traffic accident analysis task is determined as follows: record historical conversation messages by defining a global variable messages, upload national standard files and accident data files, and extract file contents.

[0096] Through the framework of the Prompt project, the national standard files and accident data files are combined to guide the LLMs model, and the FS example guides the model to learn how to extract the accident trigger source and the ODC element classification principle, so as to automatically identify the accident trigger source. At the same time, an effective artificial intelligence dialogue system is built, and the system structure is as follows:

[0097] The role definition unit pre-sets the role of LLMs as an expert who is proficient in the analysis of the operating conditions of the design of autonomous driving and the analysis of traffic accidents; the task prompts in the traffic accident analysis task are: first learn according to the trigger source examples extracted from the accident data in the FS, then analyze other accident data, extract the trigger source that caused the accident, and output it in JSON format; the context information is: the description of the ODC elements in the national standard document GB / T 20230388-T-339 "Design and Operation Conditions of Autonomous Driving Systems for Intelligent Connected Vehicles" and the description of the hierarchical classification of ODC elements; the example provision includes the following two aspects: hierarchical description of the ODC elements in the national standard so that the model can understand the hierarchical classification logic of the ODC elements in the national standard; the accident trigger source extraction results are provided for the merged accident data description to help the model understand how to extract the corresponding trigger source for subsequent accident data. Input: new traffic accident description or new task prompts, etc.; Output: Output the extracted trigger source in JSON format. Through the above processing, the system can generate expected output based on user input and context information, ensuring that the output format is suitable for subsequent processing. The implementation of this system not only demonstrates the key role of Prompt technology in the design of artificial intelligence traffic accident analysis tasks, but also highlights the great potential of FS prompts in improving the generalization ability and adaptability of models.

[0098] In the above embodiment, the "word vectorization" in which the extracted trigger source is word vectorized is a technology in natural language processing, which maps each word in the vocabulary to a point in a high-dimensional space, and each point is represented as a vector. Word vectorization is used to capture the semantic relationship between words, so that words with close distances in the vector space are also semantically similar. In the word vectorization process, text data needs to be converted into vectors for computer processing. Common word vectorization methods include TF-IDF, Word2Vec, BERT, FastText, GPT series, etc.

[0099] For the trigger source words initially extracted by LLMs, it is first necessary to select a suitable word vector model, and then convert the extracted trigger source words into high-dimensional vector representations. These word vector representations retain the semantic relationship between the trigger source words and can capture their importance in different accident scenarios. Specifically, the Text-embedding-3-large text embedding model in ChatGPT adopted in this embodiment can convert text into high-dimensional vector representations. This process is usually called word vectorization. Word vectorization refers to the conversion of words or text in natural language into a numerical form that can be processed by neural networks. In the word vectorization process of the Text-embedding-3-large text embedding model, the model will generate a vector representation that can capture semantic information based on the context.

[0100] The specific steps for word vectorization using the Text-embedding-3-large text embedding model are as follows:

[0101] 31a. Trigger source word embedding: Each extracted trigger source word is mapped to an initial embedding vector, i.e., a word vector. These embedding vectors are pre-trained and can reflect the basic semantic features of the word. Unlike static word embedding methods (such as Word2Vec), the word vectors generated by Text-embedding-3-large are context-sensitive, i.e., the same word will generate different vectors in different contexts.

[0102] 31b. Self-attention mechanism: The Text-embedding-3-large text embedding model is based on the Transformer architecture, and its core is the self-attention mechanism. Self-attention allows the model to simultaneously focus on all trigger source words in the Text-embedding-3-large text embedding model and calculate the influence between each trigger source word. This mechanism can capture long-distance dependencies, so that the trigger source word vector generated by the Text-embedding-3-large text embedding model not only contains local context information, but also captures global semantic relationships.

[0103] 31c. Context aggregation: Through multiple layers of Transformer encoders, the Text-embedding-3-large text embedding model gradually aggregates the context information of the triggering source word and generates vectors containing global semantics. These vectors integrate the word's meaning, syntactic structure, and role in the context.

[0104] 31d. Output trigger source word vector: Finally, the Text-embedding-3-large text embedding model generates a high-dimensional vector representation. Each input trigger source word is mapped to a fixed-length vector.

[0105] After the above steps generate word vectors, we get a set of trigger source word vectors, each of which is a point in the space. The construction process of the entire trigger source word vector space includes:

[0106] 32a. Construct a vector matrix: Integrate all generated trigger source word vectors into a matrix. If there are n trigger source word vectors, and all of them are d-dimensional vectors, then the dimension of the vector matrix is ​​n×d;

[0107] 32b. Define distance or similarity measurement: In the vector space, the distance or similarity between different trigger source word vectors reflects their semantic similarity. Commonly used measurement methods include cosine similarity, Euclidean distance, Manhattan distance, etc.

[0108] Specifically, since this embodiment adopts the Text-embedding-3-large text embedding model of ChatGPT, the cosine similarity is used, that is:

[0109]

[0110] Where: A and B both represent trigger source word vectors, A·B represents the dot product of two trigger source word vectors, and ||A|| and ||B|| both represent the modulus of the trigger source word vector.

[0111] In one embodiment, after completing the vectorization processing of the trigger source words, the next step is to cluster these vectors according to the ODC elements in the national standard GB / T 20230388-T-339 "Design and operation conditions of automatic driving systems for intelligent connected vehicles" so as to accurately extract ODC elements from the trigger source. Figure 2 As shown, this process involves classifying the trigger source word vector into the secondary classification of the corresponding ODC element.

[0112] K-means algorithm is a widely used cluster analysis method. Its core idea is to find the best partition of data through an iterative process and divide the data set into k clusters. The algorithm first randomly selects the cluster center, and then assigns each data point to the nearest cluster by calculating the distance between each data point and each center. Then the center position of the cluster is updated and the above process is repeated. When the change of the cluster center is less than the set threshold or the maximum number of iterations is reached during the iteration, the algorithm stops, thus completing the cluster assignment of the data point. The characteristic of this algorithm is that the convergence criterion is based on the error square sum function. In each process of reclassifying data, the K-means algorithm needs to readjust the assignment of all data points and update the center position of each cluster, and then enter the next round of data reorganization. When all cluster fittings reach convergence, the algorithm stops iterating. At this time, the cluster assignment of the data point no longer changes, and the position of the cluster center is also fixed.

[0113] Given a trigger source word vector dataset Among them, x i represents the i-th trigger source word vector data point, i represents the index of the trigger source word vector data point, n represents the total number of data points in the trigger source word vector data set, each trigger source word vector data point is m-dimensional, and the data set X is divided into K clusters, that is The cluster c k The cluster center is μ k , k represents the index of the cluster. Then the cluster center μ k With cluster c k The sum of squared errors for each point in is:

[0114]

[0115] Therefore, the objective function of K-means can be defined as:

[0116]

[0117] Where J(C) represents the total error sum of squares after the entire trigger source word vector dataset X is divided into clusters C, ||x i -μ k || 2 Represents the distance between the trigger source data point and the cluster center.

[0118] The main steps of the K-means algorithm are as follows (1)-(3):

[0119] (1) Initialization: Randomly select k data points from the data set as the initial cluster centers.

[0120] (2) Iterative process: For each data point in the data set, its distance to all cluster centers is calculated and it is classified into the cluster represented by the nearest cluster center. Once all data points are assigned to the corresponding clusters, the center of each cluster is recalculated based on the average position of all points in the cluster.

[0121] (3) Convergence and termination: Repeat the allocation and update steps until the position of the cluster center no longer changes significantly or the preset number of iterations is reached. The algorithm terminates when the clustering results are stable, that is, when the cluster members and the center position no longer change significantly.

[0122] Through the analysis of the algorithm, we can know that the time complexity of the K-means algorithm is O(n·k·t), where n represents the number of sample data points contained in the data set, k represents the number of clusters contained in the data set, and t represents the number of algorithm iterations. Therefore, K-means has the characteristics of high computational efficiency and simple and easy implementation. Its data fitting time is short, suitable for processing large-scale data, and performs well in scenarios with regular cluster shapes and relatively uniform data distribution. However, the algorithm still has many shortcomings, such as: 1) Dependence on initial value selection: K-means is very sensitive to the selection of the initial cluster center, and randomly selecting the initial center may cause the algorithm to fall into a local optimal solution; 2) Sensitive to noise and outliers: K-means uses distance as the basis for division, and is very sensitive to noise points and outliers in the data, which may have a great impact on the center of the cluster, resulting in inaccurate clustering results.

[0123] In view of the shortcomings of the traditional K-means algorithm, which is sensitive to the initial cluster center and noise, an improved K-means algorithm based on density Canopy is introduced. The Canopy algorithm is a density-based clustering algorithm, which is often used for the preliminary clustering of large-scale data. Its main idea is to use two distance thresholds T1 and T2 (T1>T2) to quickly and roughly cluster the data, thereby reducing the amount of calculation. The main methods for determining the distance threshold are: empirical setting method, cross-validation method, data-driven method, adaptive method, etc. The Canopy algorithm is usually used for K-means preprocessing to help determine the initial cluster center.

[0124] First, select a data point as the initial center point, which should be the point with the largest local density.

[0125] Secondly, two density thresholds are defined, namely the high density threshold ρ1 and the low density threshold ρ2, where ρ1>ρ2. When the density of a point is greater than ρ1, it is determined to be the core of the cluster; when the density of the point is lower than ρ2, it is classified as other clusters or noise points.

[0126] Then, Canopy clusters can be formed, all points with a distance less than r1 from the center point and a density higher than ρ1 are divided into the same Canopy cluster, and these points are removed. This process is repeated until all data points are assigned to the corresponding cluster or marked as noise points.

[0127] Finally, a representative point (usually the point with the highest density in the cluster) is selected from each Canopy cluster as the initial clustering center of the K-means algorithm. In this way, the initial center is more representative and can prevent the K-means algorithm from falling into a local optimum.

[0128] Compared with the traditional K-means algorithm, the improved K-means algorithm based on density Canopy has the following advantages: 1) The initial center is more reasonable: Through the Canopy algorithm preprocessing, a more reasonable initial clustering center is selected, avoiding the local optimal solution problem caused by the random selection of centers in the K-means algorithm; 2) Reduced computational complexity: The Canopy algorithm reduces the computational complexity of the subsequent K-means algorithm through fast coarse-grained clustering, which is especially suitable for large-scale data; 3) Reduced noise impact: Since the Canopy algorithm introduces two thresholds, it can filter noise data to a certain extent, reducing the sensitivity of K-means to noise data.

[0129] Specifically, in order to obtain the three-level classification of ODC elements, the trigger source data set cluster K=22 based on the improved K-means algorithm based on density Canopy is initially set. The Canopy algorithm is first used to determine the initial cluster center, and then the K-means algorithm is iterated until the algorithm converges. After the trigger source word vector clustering is completed, the nearest neighbor search algorithm is used to retrieve the trigger source text embedding database, find the trigger source text closest to the word vector, and then form the three-level classification of ODC elements. According to the two-level classification of ODC elements under the national standard, the clustered three-level ODC elements are classified and sorted into them, and finally a complete ODC element hierarchical classification framework is formed. An example is shown in Table 1 below.

[0130] Table 1

[0131]

[0132]

[0133] In the above embodiments, in the process of accident trigger source extraction and ODC element grading and classification based on accident data and LLMs, the analysis method in the present invention is modified. For example, LLMs are combined with other prompt methods to extract accident trigger sources, and K-means clustering, mean shift clustering, spectral clustering, Gaussian mixture model clustering, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) and other clustering methods are used to extract key ODC elements. These methods can achieve roughly the same effect, but all belong to the main idea of ​​the present invention.

[0134] The analysis method provided by the present invention can effectively improve the data quality in the processing of autonomous driving collision data. By combining LLMs and FS prompt technology, the trigger sources in the accident data can be automatically extracted and identified, and the efficiency and accuracy of accident trigger source analysis can be improved. By using the Text-embedding-3-large text embedding model and the improved K-means algorithm, the subclasses formed by the clustering of trigger sources are placed under the classification framework of the national standard GB / T20230388-T-339 "Design and Operation Conditions for Autonomous Driving Systems of Intelligent Connected Vehicles", which effectively improves the efficiency of extracting key ODC elements.

[0135] Compared with the prior art 1 mentioned in the background technology, the technical solution of the present invention based on LLMs combined with FS prompts and Prompt engineering has a high degree of automation capability. Without retraining the entire model, the model is extended to accident data analysis and trigger source extraction in the traffic accident analysis task scenario, which reduces manual intervention, achieves high data efficiency and traffic accident analysis task adaptability, and has good generalization ability. At the same time, through flexible adjustment of role definitions, task prompts, etc. in the Prompt engineering, the model is more adaptable in complex situations, and through structured output (such as JSON), it is directly applicable to subsequent automated processing.

[0136] Compared with the second prior art mentioned in the background technology, the present invention adopts the Text-embedding-3-large text embedding model in ChatGPT to vectorize the trigger source words, and uses the improved K-means algorithm based on density Canopy to cluster the trigger source word vectors, and extracts the trigger source text after the word vector restoration, thereby obtaining the ODC three-level classification elements and placing them under the secondary classification framework of the national standard GB / T20230388-T-339 "Design and Operation Conditions for Autonomous Driving Systems of Intelligent Connected Vehicles", which effectively improves the efficiency of extracting key ODC elements and establishes a complete ODC element hierarchical classification framework.

[0137] The embodiment of the present invention also provides an accident trigger source analysis and ODC element extraction and classification system based on LLMs, which includes: a Prompt module and LLMs.

[0138] The Prompt module is used to combine the framework of the Prompt project with the FS example according to the national standard file and accident data file of the traffic accident analysis task, and use the Prompt guide words to guide LLMs to learn the trigger source extraction method of the accident data file and the ODC element classification principle of the national standard file;

[0139] After learning under the guidance of the Prompt module, LLMs are used to receive accident data of the traffic accident analysis task to be processed, and use the learned trigger source extraction method to extract the trigger source in the accident data to be processed, and use the learned ODC element hierarchical classification principle to combine the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements.

[0140] The method of "combining the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements" specifically includes:

[0141] The extracted trigger sources are word-vectorized to construct a trigger source word vector space; the trigger source word vectors in the trigger source word vector space are clustered, and the trigger source text embedding database is retrieved using a search algorithm to find the trigger source text closest to the trigger source word vector, so as to extract the three-level classification of ODC elements from the trigger source word vector, and organize the three-level classification of ODC elements into the secondary classification framework of the national standard file to form an ODC element secondary classification framework that meets the requirements of the national standard.

[0142] In one embodiment, the accident trigger source analysis and ODC element extraction and classification system based on LLMs also includes: a data preprocessing unit, which is used to preprocess the original accident data input into LLMs to obtain accident data for the traffic accident analysis task to be processed.

[0143] The data preprocessing procedures include:

[0144] Data cleaning: 1a. Remove duplicate data, irrelevant data and noise data from the original accident data; 1b. Aggregate the original accident data into separate fields to simplify the data content; 1c. Identify and delete invalid data in the original accident data; 1d. Delete the data that is missing from the core part of the original accident data;

[0145] Data formatting: 1e. Merge the accident data after data cleaning.

[0146] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Those skilled in the art should understand that the technical solutions described in the above embodiments may be modified, or some of the technical features thereof may be replaced by equivalents; these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for analyzing accident trigger sources and extracting and classifying ODC elements based on LLMs, characterized in that: include: According to the Chinese standard files and accident data files of the traffic accident analysis task, the Prompt module is obtained by combining the framework of the Prompt project with the FS example. The Prompt guide words provided by the Prompt module are used to guide LLMs to learn the trigger source extraction method of the accident data file and the ODC element classification principle of the Chinese standard file. After preprocessing the original accident data, the accident data of the traffic accident analysis task to be processed is obtained and input into the LLMs after learning guided by the Prompt module. The LLMs use the learned trigger source extraction method to extract the trigger source in the accident data to be processed, and use the learned ODC element classification principle to combine the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements. The method of "combining the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements" specifically includes: The extracted trigger sources are word-vectorized to construct a trigger source word vector space; the trigger source word vectors in the trigger source word vector space are clustered, and the trigger source text embedding database is retrieved using a search algorithm to find the trigger source text closest to the trigger source word vector, so as to extract the three-level classification of ODC elements from the trigger source word vector, and organize the three-level classification of ODC elements into the secondary classification framework of the national standard file to form an ODC element secondary classification framework that meets the requirements of the national standard.

2. The LLMs-based accident trigger source analysis and ODC element extraction and classification method according to claim 1, characterized in that: The Promote module includes: A role definition unit, which is used to pre-set a role for LLMs according to the traffic accident analysis task, so as to ensure that LLMs have the background and perspective corresponding to the role during the extraction process, and can complete the traffic accident analysis task according to the preset role; A task prompt unit, which is used to provide task prompts to LLMs to guide LLMs to focus on the key trigger source elements of the traffic accident analysis task, thereby efficiently extracting the required information and outputting the corresponding format as required; The context information unit contains context information related to the traffic accident analysis task, enabling LLMs to make judgments and learn based on the context information; FS example unit, which is used to guide LLMs to perform traffic accident analysis tasks by providing a small number of representative examples in FS prompts, so that LLMs can extract trigger sources in new traffic accident analysis tasks; An input information unit is used to receive actual data that LLMs need to process, and extract key trigger sources from processing the actual data by combining roles, task prompts and contexts; The output format unit is used to convert the key trigger source into a trigger source in a format compatible with LLMs and output it.

3. The accident trigger source analysis and ODC element extraction and classification method based on LLMs as claimed in claim 1 or 2, characterized in that: "Forming an ODC element classification framework that meets national standards" specifically includes: According to the first-level classification and second-level classification of ODC elements under the national standard file, the third-level classification of ODC elements is added to obtain a complete ODC element classification framework, as shown in Table 1 below: Table 1 4. The LLMs-based accident trigger source analysis and ODC element extraction and classification method as claimed in claim 3 is characterized in that: Data preprocessing includes: Data cleaning: 1a. Remove duplicate data, irrelevant data and noise data from the original accident data; 1b. Aggregate the original accident data into separate fields to simplify the data content; 1c. Identify and delete invalid data in the original accident data; 1d. Delete the data that is missing from the core part of the original accident data; Data formatting: 1e. Merge the accident data after data cleaning.

5. The LLMs-based accident trigger source analysis and ODC element extraction and classification method as claimed in claim 3, characterized in that: The extracted trigger sources are vectorized using the Text-embedding-3-large text embedding model in ChatGPT. Specifically: 31a. Map the words corresponding to each extracted trigger source into an initial embedding vector to obtain a word vector; 31b. Use the self-attention mechanism to simultaneously focus on all the word vectors obtained in 31a and calculate the influence between the two word vectors, so that the trigger source word vector generated by the Text-embedding-3-large text embedding model not only contains the information of the local context, but also can capture the semantic relationship between the two word vectors; 31c. Through the multi-layer Transformer encoder, the context information of the word vector is gradually aggregated to generate a vector containing global semantics. The vector of global semantics is used to integrate the word meaning, syntactic structure and context information; 31d. Generate a high-dimensional trigger source word vector and output it.

6. An accident trigger source analysis and ODC element extraction and classification system based on LLMs, characterized in that: include: The Prompt module is used to combine the framework of the Prompt project with the FS example according to the national standard file and accident data file of the traffic accident analysis task, and use the Prompt guide words to guide LLMs to learn the trigger source extraction method of the accident data file and the ODC element classification principle of the national standard file; LLMs, after being guided by the Prompt module for learning, are used to receive the accident data of the traffic accident analysis task to be processed, and use the learned trigger source extraction method to extract the trigger source in the accident data to be processed, and use the learned ODC element hierarchical classification principle to combine the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements; The method of "combining the extracted trigger source with the national standard file to form an ODC element classification framework that meets the national standard requirements" specifically includes: The extracted trigger sources are word-vectorized to construct a trigger source word vector space; the trigger source word vectors in the trigger source word vector space are clustered, and the trigger source text embedding database is retrieved using a search algorithm to find the trigger source text closest to the trigger source word vector, so as to extract the three-level classification of ODC elements from the trigger source word vector, and organize the three-level classification of ODC elements into the secondary classification framework of the national standard file to form an ODC element secondary classification framework that meets the requirements of the national standard.

7. The accident trigger source analysis and ODC element extraction and classification system based on LLMs as claimed in claim 6 is characterized in that: The Promote module includes: A role definition unit, which is used to pre-set a role for LLMs according to the traffic accident analysis task, so as to ensure that LLMs have the background and perspective corresponding to the role during the extraction process, and can complete the traffic accident analysis task according to the preset role; A task prompt unit, which is used to provide task prompts to LLMs to guide LLMs to focus on the key trigger source elements of the traffic accident analysis task, thereby efficiently extracting the required information and outputting the corresponding format as required; The context information unit contains context information related to the traffic accident analysis task, enabling LLMs to make judgments and learn based on the context information; FS example unit, which is used to guide LLMs to perform traffic accident analysis tasks by providing a small number of representative examples in FS prompts, so that LLMs can extract trigger sources in new traffic accident analysis tasks; An input information unit is used to receive actual data that LLMs need to process, and extract key trigger sources from processing the actual data by combining roles, task prompts and contexts; The output format unit is used to convert the key trigger source into a trigger source in a format compatible with LLMs and output it.

8. The accident trigger source analysis and ODC element extraction and classification system based on LLMs as claimed in claim 6 or 7, characterized in that: "Forming an ODC element classification framework that meets national standards" specifically includes: According to the first-level classification and second-level classification of ODC elements under the national standard file, the third-level classification of ODC elements is added to obtain a complete ODC element classification framework, as shown in Table 1 below: Table 1 9. The accident trigger source analysis and ODC element extraction and classification system based on LLMs as claimed in claim 8, characterized in that: Also includes: A data preprocessing unit, which is used to preprocess the original accident data input into the LLMs to obtain the accident data for the traffic accident analysis task to be processed; The data preprocessing procedures include: Data cleaning: 1a. Remove duplicate data, irrelevant data and noise data from the original accident data; 1b. Aggregate the original accident data into separate fields to simplify the data content; 1c. Identify and delete invalid data in the original accident data; 1d. Delete the data that is missing from the core part of the original accident data; Data formatting: 1e. Merge the accident data after data cleaning.

10. The accident trigger source analysis and ODC element extraction and classification system based on LLMs as claimed in claim 9, characterized in that: The extracted trigger sources are vectorized using the Text-embedding-3-large text embedding model in ChatGPT. Specifically: 31a. Map the words corresponding to each extracted trigger source into an initial embedding vector to obtain a word vector; 31b. Use the self-attention mechanism to simultaneously focus on all the word vectors obtained in 31a and calculate the influence between the two word vectors, so that the trigger source word vector generated by the Text-embedding-3-large text embedding model not only contains the information of the local context, but also can capture the semantic relationship between the two word vectors; 31c. Through the multi-layer Transformer encoder, the context information of the word vector is gradually aggregated to generate a vector containing global semantics. The vector of global semantics is used to integrate the word meaning, syntactic structure and context information; 31d. Generate a high-dimensional trigger source word vector and output it.