A large language model enhanced scene safety constraint generation method

CN122152662BActive Publication Date: 2026-10-16HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610219776.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-24
Publication Date
2026-10-16
Estimated Expiration
2046-02-24

AI Technical Summary

Technical Problem

但是现有的基于LLM的场景安全分析方法虽然在生成效率上具备优势,但普遍缺乏有效的语义锚定与结构化约束机制,导致分析结果容易出现泛化甚至脱离物理边界的“幻觉”,难以保证严谨的可追溯性

Benefits of technology

[0040] The present invention discloses a method for generating scene safety constraints enhanced by a large language model. The adaptive multi-layer safety analysis framework instantiates the large language model into a safety analysis agent and executes a standardized process of "generation-self-inspection-iterative alignment" on the basis of the multi-layer interaction model, thereby achieving efficient augmentation of scene safety constraints in typical autonomous driving scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152662B_ABST
    Figure CN122152662B_ABST
Patent Text Reader

Abstract

The application discloses a large language model enhanced scene safety constraint generation method, and belongs to the technical field of safety analysis. In order to solve the problem of completeness and coverage of safety analysis. The application comprises the following steps: constructing a multi-layer interaction model under an automatic driving scene; defining system-level loss and danger, and deducing baseline unsafe control behavior and baseline scene safety constraint according to the system-level loss and danger, to form an expert safety constraint set; based on the system-level loss and danger and the multi-layer interaction model under the automatic driving scene, using a large language model to perform safety analysis, and then removing redundancy, generalization and baseline coverage checking of the candidate set by experts to obtain supplementary scene safety constraints; and merging the supplementary scene safety constraints and the baseline scene safety constraints to form a final safety constraint set. The adaptive multi-layer safety analysis framework instantiates the large language model into a safety analysis intelligent agent, and realizes efficient augmentation of safety constraints in the automatic driving typical scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of safety analysis technology and autonomous driving control technology, specifically relating to a method for generating scene safety constraints with large language model enhancement. Background Technology

[0002] To assess the risks of complex systems and validate the SOTIF (Safety-Obsessed-Information Fact-Check) of autonomous driving, experts and scholars have proposed various modeling and analysis methods. In early research, Systems-Theoretic Process Analysis (STPA) was widely used to handle safety-critical systems with complex interactive characteristics. Based on control theory, STPA treats accidents as defects in the control structure rather than simple component failures, aiming to identify potential unsafe control actions (UCAs) and their causal scenarios within the control loop. Compared to traditional fault tree analysis and failure mode and effects analysis, STPA is more effective in analyzing software-intensive systems and functional dependencies between components. However, a significant drawback of STPA is its heavy reliance on human experience. Faced with the vast number of long-tail scenarios and highly dynamic interactions in open worlds, manual analysis suffers from high modeling uncertainty, low efficiency, and a tendency to overlook edge risks.

[0003] To handle dynamic interaction scenarios with high uncertainty, Natural Language Mapping (LLM) has been gradually introduced into system safety engineering. Currently, LLM-assisted safety analysis techniques for autonomous driving need to handle massive amounts of unstructured scene descriptions and complex logical reasoning. However, while existing LLM-based scene safety analysis methods have advantages in generation efficiency, they generally lack effective semantic anchoring and structured constraint mechanisms. This leads to analysis results that are prone to generalization or even deviating from physical boundaries, making it difficult to guarantee rigorous traceability. Furthermore, existing technologies mostly focus on generating static natural language documents, with little research addressing how to efficiently transform these informal safety constraints into computable and verifiable engineering prior knowledge. This results in a significant conversion barrier between static hazard analysis and dynamic system verification, failing to directly guide the engineering implementation of autonomous driving systems. Summary of the Invention

[0004] The problem this invention aims to solve is to ensure the completeness and coverage of security analysis, and proposes a method for generating scene security constraints enhanced by a large language model.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for generating scene safety constraints enhanced by a large language model includes the following steps:

[0007] S1. Construct a multi-layered interaction model for autonomous driving scenarios;

[0008] S2. Based on the multi-layer interaction model in the autonomous driving scenario obtained in step S1, define system-level losses and hazards, and deduce baseline unsafe control behaviors and baseline scenario safety constraints accordingly to form an expert safety constraint set.

[0009] S3. Based on the system-level losses and hazards defined in step S2 and the multi-layer interaction model under the autonomous driving scenario obtained in step S1, safety analysis is performed using a large language model. Subsequently, experts perform redundancy removal, degeneralization, and baseline coverage verification on the candidate set to obtain supplementary scenario safety constraints.

[0010] S4. Merge the supplementary scene security constraints obtained in step S3 with the baseline scene security constraint set obtained in step S2 to form the final security constraint set.

[0011] Furthermore, the multi-layer interaction model constructed in step S1 for the autonomous driving scenario includes an interaction concept model (ICM) and a scenario refinement model (SRM), resulting in a closed-loop interaction centered on the main vehicle, depicting the interaction between the main vehicle and four types of external scenario elements, namely, environment, road, traffic infrastructure, and target.

[0012] Furthermore, the specific implementation method of step S2 includes the following steps:

[0013] S2.1. Based on the multi-layer interaction model in the autonomous driving scenario obtained in step S1, construct the topological relationship between the main vehicle and the external environment in the interaction concept model, expressed as:

[0014]

[0015] in, For interactive conceptual models; The main vehicle in the interactive concept model; A collection of scene elements in an interactive conceptual model; From arrive The output set; for arrive The feedback set; A collection of ontology elements in an interactive conceptual model; The topology of the interactive conceptual model network;

[0016] S2.2. Define the set of scene elements, expressed as:

[0017]

[0018] in, These respectively represent objectives, transportation infrastructure, roads, and the environment;

[0019] S2.3. Anchor safety objectives at the macro-interaction level and define safety losses from vehicle collisions and personal injuries;

[0020] S2.4. Use the scenario refinement model to semantically deconstruct the abstract elements in the interaction concept model, identify the induced dangers corresponding to specific interaction variables when they are affected by environmental conditions, and obtain the safe operation boundary;

[0021] S2.5. Based on the safety operation boundary, define a scenario-level hazardous event with physical parameters when the boundary is exceeded under specific environmental conditions; based on the multi-layer interaction structure and the scenario-level hazardous event, identify baseline unsafe control behaviors and transform them into a set of baseline scenario safety constraints with formal semantic support.

[0022] Furthermore, the specific implementation method of step S3 includes the following steps:

[0023] S3.1. Define expert instructions A template for a quadruple containing four core dimensions:

[0024]

[0025] in, As a context anchor, it is used to indicate the current analysis stage and role setting; R is for data injection, used to represent input data or knowledge boundaries; R is for reasoning logic, used to represent the thought chain or methodological constraints that the model must follow. Output constraints are used to represent the desired output format and formal requirements;

[0026] S3.2. Based on the quadruple template and the expert security constraint set obtained in step S2, perform security analysis using a large language model.

[0027] Furthermore, the specific implementation method of step S3.2 includes the following steps:

[0028] S3.2.1. First, activate the SAA's Automotive Functional Safety Engineer role through the prompting process and set up the analysis flow based on the multi-layer interaction model in the autonomous driving scenario;

[0029] S3.2.2. Inject predefined system-level losses and system-level hazards as immutable boundary constraints into the large language model to achieve semantic alignment from the perspective of model analysis.

[0030] S3.2.3. The large language model captures the multi-layered interaction structure between the main vehicle, the interaction concept model, and the scene refinement model, and constructs a heterogeneous graph mapping function, the expression of which is:

[0031]

[0032] in, For heterogeneous graph mapping functions, A collection of physical entity nodes in an interactive conceptual model; This refers to the set of specific semantic variables in the scene refinement model.

[0033] S3.2.4. The large language model proposes candidate scenario security constraints, then manually filters and instructs the large language model to freeze valid scenario security constraints. The expression is:

[0034]

[0035] in, This represents the knowledge state at time t+1. The knowledge state at time t; For expert verification operators, This is the original set of candidate UCAs generated by the model in the current step.

[0036] S3.2.5. Generate supplementary scenario security constraints based on frozen unsafe control behaviors, with the following expression:

[0037]

[0038] in, For unsafe control behavior, For a specific scene context, For scenario safety constraints.

[0039] The beneficial effects of this invention are:

[0040] The present invention discloses a method for generating scene safety constraints enhanced by a large language model. The adaptive multi-layer safety analysis framework instantiates the large language model into a safety analysis agent and executes a standardized process of "generation-self-inspection-iterative alignment" on the basis of the multi-layer interaction model, thereby achieving efficient augmentation of scene safety constraints in typical autonomous driving scenarios.

[0041] The present invention describes a method for generating scene security constraints with a large language model enhancement. It constructs a semantic anchoring prompting method based on a multi-layer interaction model and uses an interaction concept model / scene refinement model to construct a structured context as prompt words, setting clear physical boundaries for the large model and effectively suppressing the "illusion" and generalization phenomena in security analysis.

[0042] The present invention discloses a method for generating scene safety constraints with large language model enhancement. It constructs a convergent human-computer collaboration mechanism based on "expert screening and freezing" and designs a closed-loop feedback mechanism including "proposal-screening-freezing-writing back". By locking valid entries and writing expert negative opinions into the memory bank, it solves the redundancy and logical non-convergence problems that are easy to occur in iterative analysis and ensures high coverage of analysis results.

[0043] This invention presents a method for generating scene safety constraints enhanced by a large language model. By introducing a multi-layered interaction model as a semantic anchor and combining iterative closed-loop "model generation—expert screening," it constructs a high-confidence analysis process integrating domain expert knowledge and physical constraints to ensure the completeness and coverage of system safety analysis. Furthermore, this invention aims to further operationalize scene safety constraints in natural language form into executable engineering constraints with explicit triggering logic, breaking down the barriers between static document analysis and dynamic system verification. This method can provide verifiable safety priors for the development of autonomous driving systems, thereby achieving an engineering closed loop and improved efficiency in SOTIF analysis. Attached Figure Description

[0044] Figure 1 This is a flowchart of a method for generating scene safety constraints with large language model enhancement as described in this invention;

[0045] Figure 2 This is a structural block diagram of a method for generating scene safety constraints with large language model enhancement according to the present invention.

[0046] Figure 3 This is a multi-layered interaction model for the autonomous driving operation scenario of this invention. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described specific embodiments are merely a part of the embodiments of the invention, and not all of them. The components of the specific embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations, and the invention may also have other embodiments.

[0048] Therefore, the following detailed description of specific embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected specific embodiments of the invention. All other specific embodiments obtained by those skilled in the art based on these specific embodiments without inventive effort are within the scope of protection of this invention.

[0049] To further understand the invention's content, features, and effects, the following specific embodiments are provided, along with accompanying drawings. Figure 1 -Appendix Figure 3 Detailed explanation is as follows:

[0050] Example 1:

[0051] A method for generating scene safety constraints enhanced by a large language model includes the following steps:

[0052] S1. Construct a multi-layered interaction model for autonomous driving scenarios;

[0053] Furthermore, the multi-layer interaction model constructed in step S1 for the autonomous driving scenario includes an interaction concept model (ICM) and a scenario refinement model (SRM), resulting in a closed-loop interaction centered on the main vehicle, depicting the interaction between the main vehicle and four types of external scenario elements, namely, environment, road, traffic infrastructure, and target.

[0054] Furthermore, one of the foundations of AM-SAF is the scenario-system multi-layer interaction model, such as... Figure 2 As shown (demonstrating the hierarchical construction and semantic refinement logic of the model), this framework comprises two levels: an interaction concept model and a scene refinement model, which together provide a structured interaction context for SAA. The interaction concept model, centered on the main vehicle, depicts its closed-loop interactions with four types of external scene elements. Figure 2 A conceptual model of interaction in autonomous driving scenarios is presented: a closed-loop control relationship of output-feedback exists between the vehicle, the target (dynamic traffic participants), traffic infrastructure, road levels, and the environment. A detailed scenario model is provided: based on the conceptual model, scenario elements are semantically subdivided, such as traffic infrastructure including traffic signs, control equipment, and overpasses. Simultaneously, "output / feedback" is specified, such as speed and traffic signs. Figure 2 It showcases a detailed model of the autonomous driving scenario.

[0055] S2. Based on the multi-layered interaction model of the autonomous driving scenario obtained in step S1, define system-level losses and hazards, and deduce baseline unsafe control behaviors and baseline scenario safety constraints accordingly, forming an expert safety constraint set; further, the specific implementation method of step S2 includes the following steps:

[0056] S2.1. Based on the multi-layer interaction model in the autonomous driving scenario obtained in step S1, construct the topological relationship between the main vehicle and the external environment in the interaction concept model, expressed as:

[0057]

[0058] in, For interactive conceptual models; The main vehicle in the interactive concept model; A collection of scene elements in an interactive conceptual model; From arrive The output set; for arrive The feedback set; A collection of ontology elements in an interactive conceptual model; The topology of the interactive conceptual model network;

[0059] S2.2. Define the set of scene elements, expressed as:

[0060]

[0061] in, These respectively represent objectives, transportation infrastructure, roads, and the environment;

[0062] S2.3. Anchor safety objectives at the macro-interaction level and define safety losses from vehicle collisions and personal injuries;

[0063] S2.4. Use the scenario refinement model to semantically deconstruct the abstract elements in the interaction concept model, identify the induced dangers corresponding to specific interaction variables when they are affected by environmental conditions, and obtain the safe operation boundary;

[0064] S2.5. Based on the safety operation boundary, define a scenario-level hazardous event with physical parameters when the boundary is exceeded under specific environmental conditions; based on the multi-layer interaction structure and the scenario-level hazardous event, identify baseline unsafe control behaviors and transform them into a set of baseline scenario safety constraints with formal semantic support.

[0065] S3. Based on the system-level losses and hazards defined in step S2 and the multi-layer interaction model under the autonomous driving scenario obtained in step S1, safety analysis is performed using a large language model. Subsequently, experts perform redundancy removal, degeneralization, and baseline coverage verification on the candidate set to obtain supplementary scenario safety constraints.

[0066] Furthermore, the AM-SAF framework introduces a large language model as the SAA to augment UCAs / SCs: security analysis is performed by the large language model, and expert review feedback is fed back into the model for continued iteration. Compared to one-time questioning or weak interaction schemes, this type of bidirectional collaborative analysis, with its more intensive "expert processing—follow-up questioning," often yields a more comprehensive set of UCAs. To ensure the consistency and transferability of the analysis process, this invention proposes a general method for constructing structured instructions.

[0067] Furthermore, the specific implementation method of step S3 includes the following steps:

[0068] S3.1. Define expert instructions A template for a quadruple containing four core dimensions:

[0069]

[0070] in, As a context anchor, it is used to indicate the current analysis stage and role setting; R is for data injection, used to represent input data or knowledge boundaries; R is for reasoning logic, used to represent the thought chain or methodological constraints that the model must follow. Output constraints are used to represent the desired output format and formal requirements;

[0071] S3.2. Based on the quadruple template and the expert security constraint set obtained in step S2, perform security analysis using a large language model.

[0072] Furthermore, the specific implementation method of step S3.2 includes the following steps:

[0073] S3.2.1. First, activate the SAA's Automotive Functional Safety Engineer role through the prompting process and set up the analysis flow based on the multi-layer interaction model in the autonomous driving scenario;

[0074] Furthermore, this step aims to establish a consensus between the human and the machine regarding the analysis objectives, methodology, and role division. The agent needs to repeat and confirm the expert's input instructions. Through this "handshake" mechanism, it ensures that its internal attention mechanism is locked within the analysis boundaries set by the expert, thereby establishing a consistent and traceable semantic anchor point from the very beginning of the analysis.

[0075] Instruction instantiation:

[0076] The role is set as a SOTIF safety engineer, with the task of analyzing autonomous driving scenarios.

[0077] Standard analysis process for injection phases E1-E4.

[0078] R: Request the establishment of a "handshake" mechanism, restate and confirm the task boundaries.

[0079] Briefly reiterate the task objectives.

[0080] As shown in Table 1:

[0081] Table 1

[0082]

[0083] S3.2.2. Inject predefined system-level losses and system-level hazards as immutable boundary constraints into the large language model to achieve semantic alignment from the perspective of model analysis.

[0084] Furthermore, the experts inject predefined closed sets into the agent, including system-level losses and top-level system-level hazards. During this process, the experts anchor these sets as immutable constants within the context and establish one-way mapping logic, requiring the agent to establish a mapping from natural language descriptions to these sets. The index relationship of elements in the set. At the same time, through the restatement verification mechanism, the instruction requires the agent to output the boundary of its understanding in the form of a structured table, thereby verifying at the execution level whether the model follows the constraint of "prohibiting the creation of new elements outside the set" and achieving semantic alignment of the starting point of analysis.

[0085] Instruction instantiation:

[0086] : In the E1-analysis boundary definition stage.

[0087] Inject system-level loss set and danger set.

[0088] The principle of set closure, which prohibits creation. New elements.

[0089] Output mapping table.

[0090] As shown in Table 2:

[0091] Table 2

[0092]

[0093] S3.2.3. The large language model captures the multi-layered interaction structure between the main vehicle, the interaction concept model, and the scene refinement model, and constructs a heterogeneous graph mapping function, the expression of which is:

[0094]

[0095] in, For heterogeneous graph mapping functions, A collection of physical entity nodes in an interactive conceptual model; This refers to the set of specific semantic variables in the scene refinement model.

[0096] Furthermore, experts input a detailed description of the multi-layered interaction structure, including an interaction concept model and a scenario refinement model. After model parsing, in order to achieve accurate alignment from physical topology to semantic space, the system requires the agent to construct a heterogeneous graph mapping function. After establishing the mapping, experts perform semantic consistency verification. If a deviation is found in the model's understanding (e.g., failure to map the "rainfall" variable to the interference term of the "sensor" node), the expert will trigger a corrective feedback mechanism. By sending explicit instructions containing correct logical dependencies, the model is forced to recalibrate the mapping relationship, thereby locking the model's attention on specific physical interaction objects and environmental conditions, preventing the model from deviating from physical reality in subsequent analysis.

[0097] Instruction instantiation:

[0098] : In the E2-interaction structure understanding stage.

[0099] : Detailed textual descriptions of the injected interactive conceptual model and scene refinement model.

[0100] R: Physical association logic, which requires analyzing the collaborative relationship between physical objects and environmental conditions.

[0101] Summarize the collaborative work mechanism.

[0102] As shown in Table 3:

[0103] Table 3

[0104]

[0105] S3.2.4. The large language model proposes candidate scenario security constraints, then manually filters and instructs the large language model to freeze valid scenario security constraints. The expression is:

[0106]

[0107] in, This represents the knowledge state at time t+1. The knowledge state at time t; For expert verification operators, This is the original set of candidate UCAs generated by the model in the current step.

[0108] Furthermore, the model proposes candidate UCAs based on a multi-layered interaction structure. Subsequently, experts perform redundancy removal, degeneralization, and baseline coverage verification on the candidate set, retaining entries that are strongly correlated with autonomous driving decisions and can fill baseline blind spots. The model is then instructed to store this confirmed knowledge in short-term memory. Finally, the experts instruct the model to store this confirmed knowledge in short-term memory; this update process ensures closed-loop control from divergent generation to convergence.

[0109] Instruction instantiation:

[0110] It is in the E3-UCA identification stage.

[0111] : Specific interaction scenario information for the current autonomous driving task.

[0112] R: Interaction failure analysis logic, which performs deductions based on the scenario context.

[0113] Output a list of UCAs and associate them with the corresponding hazards.

[0114] As shown in Table 4:

[0115] Table 4

[0116]

[0117] S3.2.5. Generate supplementary scenario security constraints based on frozen unsafe control behaviors, with the following expression:

[0118]

[0119] in, For unsafe control behavior, For a specific scene context, For scenario safety constraints.

[0120] Furthermore, the model maps the "descriptive statement" structure of the UCA to the "normative statement" structure required by the SC. This transformation process is essentially performing an inverse logical transformation operation. Finally, experts perform a logical loop check on the generated SCs to confirm whether the generated constraints accurately correspond to the UCA frozen in the previous stage. Finally, these augmented SCs generated with the assistance of the large model are merged with the expert baseline SCs to form a final set of security constraints with significantly improved coverage.

[0121] Instruction instantiation:

[0122] : In the E4-constraint generation stage.

[0123] : The UCA set frozen in the previous stage + standard syntax examples.

[0124] R: Logical reverse derivation and style transfer.

[0125] : A set of SCs that conforms to formal semantics.

[0126] As shown in Table 5:

[0127] Table 5

[0128]

[0129] S4. Merge the supplementary scene security constraints obtained in step S3 with the baseline scene security constraint set obtained in step S2 to form the final security constraint set.

[0130] The specific data involved in this embodiment, such as system-level loss (L), hazard (H), and unsafe control behavior (UCA) (as listed in the text as H-1, H-2, etc.), are only an exemplary demonstration to verify the "semantic anchoring and iterative closed loop" methodology logic of this invention. They are intended to demonstrate the successful operation of the analysis process and do not represent the full safety analysis details and complete results of a specific autonomous driving system in actual engineering applications.

[0131] This embodiment focuses on autonomous driving scenarios under SOTIF. Based on existing multi-layer interaction models, it instantiates large language models (such as DeepSeek, Qwen, etc.) into a Safety Analysis Agent (SAA) to perform the generation-self-checking-iterative alignment process of scenario safety analysis, thus proposing an Adaptive Multi-layer Safety Analysis Framework (AM-SAF). The SAA uses the interaction structure as context, combining constraint memory and coverage / consistency verification, and outputs traceable UCAs / SCs augmented results under expert supervision. The design of AM-SAF follows the following approach:

[0132] 1) The multi-layered interaction model is responsible for providing scene layering and interaction structure. Human security experts first identify some scene security constraints within this system.

[0133] 2) SAA is responsible for "supplementary expansion". Given the Losses / Hazards and interaction structure, it proposes more unsafe control behaviors related to the scenario based on the received prompts and expert feedback.

[0134] 3) Human safety experts provide review feedback after each round of SAA output, and the results will be written back to the SAA memory to constrain subsequent iterations, ultimately forming a more comprehensive set of safety constraints for autonomous driving scenarios.

[0135] This embodiment constructs an expert-led baseline analysis path; subsequently, iterative UCA / SC augmentation and review are conducted in conjunction with human safety experts and large language models such as DeepSeek and Qwen to form a fully covered hybrid constraint set; finally, the baseline SCs are merged with the supplementary SCs generated based on frozen UCA to form a more comprehensive final autonomous driving scenario safety constraint set.

[0136] This embodiment proposes an adaptive multi-layer security analysis framework enhanced by a large language model, effectively solving the aforementioned problems. Compared with existing technologies, this invention introduces a multi-layer interaction model as a semantic context and establishes a collaborative mechanism of "model generation—expert screening—iterative closed loop." This mechanism sets clear physical and logical boundaries for the large model, effectively suppressing model illusions and ensuring that the generated scene security constraints have both high coverage and physical consistency, significantly improving the quality and confidence of security analysis results.

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

[0138] Although this application has been described above with reference to specific embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of this application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in this application can be combined with each other in any way. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, this application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for generating scene safety constraints with large language model enhancement, characterized in that, Includes the following steps: S1. Construct a multi-layered interaction model for autonomous driving scenarios; S2. Based on the multi-layer interaction model in the autonomous driving scenario obtained in step S1, define system-level losses and hazards, and deduce baseline unsafe control behaviors and baseline scenario safety constraints accordingly to form an expert safety constraint set. S3. Based on the system-level losses and hazards defined in step S2 and the multi-layer interaction model under the autonomous driving scenario obtained in step S1, safety analysis is performed using a large language model. Subsequently, experts perform redundancy removal, degeneralization, and baseline coverage verification on the candidate set to obtain supplementary scenario safety constraints. S4. Merge the supplementary scene security constraints obtained in step S3 with the baseline scene security constraint set obtained in step S2 to form the final security constraint set; The specific implementation method of security analysis using large language models includes the following steps: S3.2.

1. First, activate the SAA's automotive functional safety engineer role through the prompting process and set up the analysis flow based on the multi-layer interaction model under the autonomous driving scenario; S3.2.

2. Inject predefined system-level losses and system-level hazards as immutable boundary constraints into the large language model to achieve semantic alignment from the perspective of model analysis. S3.2.

3. The large language model captures the multi-layered interaction structure between the main vehicle, the interaction concept model, and the scene refinement model, and constructs a heterogeneous graph mapping function, the expression of which is: in, For heterogeneous graph mapping functions, A collection of physical entity nodes in an interactive conceptual model; This refers to the set of specific semantic variables in the scene refinement model. S3.2.

4. The large language model proposes candidate scenario security constraints, then manually filters and instructs the large language model to freeze valid scenario security constraints. The expression is: in, This represents the knowledge state at time t+1. The knowledge state at time t; For expert verification operators, This is the set of original candidate unsafe control behaviors (UCAs) generated by the model at the current step. S3.2.

5. Generate supplementary scenario security constraints based on frozen unsafe control behaviors, with the following expression: in, For unsafe control behavior, For a specific scene context, For scenario safety constraints.

2. The method for generating scene safety constraints with large language model enhancement according to claim 1, characterized in that, The multi-layer interaction model constructed in step S1 for the autonomous driving scenario includes the Interaction Concept Model (ICM) and the Scene Refinement Model (SRM), resulting in a closed-loop interaction centered on the main vehicle, depicting the interaction between the main vehicle and four types of external scene elements, namely the environment, roads, traffic infrastructure, and targets.

3. The method for generating scene safety constraints with large language model enhancement according to claim 2, characterized in that, The specific implementation method of step S2 includes the following steps: S2.

1. Based on the multi-layer interaction model in the autonomous driving scenario obtained in step S1, construct the topological relationship between the main vehicle and the external environment in the interaction concept model, expressed as: in, For interactive conceptual models; The main vehicle in the interactive concept model; A collection of scene elements in an interactive conceptual model; From arrive The output set; for arrive The feedback set; A collection of ontology elements in an interactive conceptual model; The topology of the interactive conceptual model network; S2.

2. Define the set of scene elements, expressed as: in, These respectively represent objectives, transportation infrastructure, roads, and the environment; S2.

3. Anchor safety objectives at the macro-interaction level and define safety losses from vehicle collisions and personal injuries; S2.

4. Use the scenario refinement model to semantically deconstruct the abstract elements in the interaction concept model, identify the induced dangers corresponding to specific interaction variables when they are affected by environmental conditions, and obtain the safe operation boundary; S2.

5. Based on the safety operation boundary, define scenario-level hazardous events with physical parameters that exceed the boundary under specific environmental conditions; based on the multi-layer interaction structure and the scenario-level hazardous events, identify baseline unsafe control behaviors and transform them into a set of baseline scenario safety constraints with formal semantic support.

4. The method for generating scene safety constraints with large language model enhancement according to claim 3, characterized in that, The specific implementation method of step S3 includes the following steps: S3.

1. Define expert instructions A template for a quadruple containing four core dimensions: in, As a context anchor, it is used to indicate the current analysis stage and role setting; R is for data injection, used to represent input data or knowledge boundaries; R is for reasoning logic, used to represent the thought chain or methodological constraints that the model must follow. Output constraints are used to represent the desired output format and formal requirements; S3.

2. Based on the quadruple template and the expert security constraint set obtained in step S2, perform security analysis using a large language model.