Power grid operation event causal tracing analysis method and system based on large language model
Patent Information
- Application Number
- CN202610930817.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2046-06-26
AI Technical Summary
[0004]有鉴于此,本申请实施例所解决的技术问题之一在于提供一种基于大语言模型的电网运行事件因果溯源分析方法及系统,解决了目前电网事件因果无法实现路径归因,以及甄别幻觉与虚假因果关联的问题
[0021]本申请有以下优点:通过获取电网运行文本并进行预处理,得到预处理文本,从而利用预配置的第一大语言模型抽取预处理文本中符合提案提示的初始候选因果对集合,进而构建初始候选因果对集合的各个元素的因果证据链条并进行评分,得到各个元素的因果证据链条的粗粒度基础评分,以确定各个元素的置信层级,并将置信层级为通过的元素进行校验,依据校验结果生成事件因果脉络分析报告,这种对置信层级以及对候选因果对进行筛选的方式,能够缩小因果脉络溯源范围,从而降低后续反事实干预校验和物理约束校验的计算开销,保证了筛选后因果对的完整性和稳定性;同时多维校验则实现了过滤模型幻觉与虚假因果关联的目的,起到了为后续调度人员提供故障链条追溯与决策辅助支持的作用。
Smart Images

Figure CN122452786B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power technology, and more specifically, to a method and system for causal source analysis of power grid operation events based on a large language model. Background Technology
[0002] With the increasing complexity of modern power grid structures, equipment failures and anomalies often trigger highly coupled chain reactions. During this evolutionary process, the dispatch control center receives and generates massive amounts of unstructured and semi-structured text information, including equipment failure reports, protection action records, and dispatch instructions, which implicitly record the complex causal relationships between events. The ability to accurately analyze and trace the causal threads of event evolution from this massive amount of text determines the effectiveness of automatic fault chain location, accident evolution trend prediction, and dispatch-assisted decision-making. In recent years, large language models, with their capabilities in natural language understanding, knowledge reasoning, and context learning, have provided new technical pathways for extracting causal relationships from events.
[0003] Current methods for causal tracing analysis of power grid operation events using large language models face challenges such as instability caused by cue sensitivity, indistinguishability of causal judgment paths within the model, and a lack of modeling of the physical causal laws of the power grid. Therefore, how to perform structural causal modeling of the causal judgment process to achieve path attribution, and how to effectively identify and filter illusory and false causal associations in the model output, remain pressing challenges. Summary of the Invention
[0004] In view of this, one of the technical problems solved by the embodiments of this application is to provide a method and system for causal tracing analysis of power grid operation events based on a large language model, which solves the current problem that the causal relationship of power grid events cannot be attributed to a path, as well as the problem of distinguishing between illusion and false causal association.
[0005] In a first aspect, this application discloses a method for causal source analysis of power grid operation events based on a large language model, the method comprising:
[0006] Obtain the raw text of the target power grid operation and preprocess it to obtain the preprocessed text;
[0007] The first large language model is pre-configured to extract an initial set of candidate causal pairs that meet the proposal prompts from the pre-processed text;
[0008] Construct the causal evidence chain for each element of the initial candidate causal pair set and score it to obtain a coarse-grained basic score for the causal evidence chain of each element.
[0009] Based on the coarse-grained basic score, the confidence level of each element is determined;
[0010] The elements with a confidence level of "pass" are identified as the target causal pairs;
[0011] The target causal pair is subjected to multidimensional verification and evaluation, and an event causal context analysis report is generated based on the evaluation results.
[0012] A second aspect of this application discloses a causal source analysis system for power grid operation events based on a large language model. The system includes:
[0013] The text preprocessing module is used to obtain the original text of the target power grid operation and preprocess it to obtain preprocessed text;
[0014] The causal pair extraction module is used to extract an initial set of candidate causal pairs that meet the proposal prompts from the preprocessed text using a pre-configured first large language model;
[0015] The causal pair scoring module is used to construct the causal evidence chain of each element in the initial candidate causal pair set and score it to obtain a coarse-grained basic score of the causal evidence chain of each element.
[0016] The causal confidence module is used to determine the confidence level of each element based on the coarse-grained basic score.
[0017] The target pair filtering module is used to identify the elements with a confidence level of "pass" as target causal pairs.
[0018] The target pair verification module is used to perform multi-dimensional verification and evaluation of the target causal pairs, and generate an event causal context analysis report based on the evaluation results.
[0019] A third aspect of this application discloses an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0020] A fourth aspect of this application discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0021] This application has the following advantages: By acquiring and preprocessing the power grid operation text, a preprocessed text is obtained. Then, a pre-configured first language model is used to extract an initial set of candidate causal pairs that meet the proposal prompts from the preprocessed text. This allows for the construction and scoring of the causal evidence chains for each element in the initial candidate causal pair set, resulting in a coarse-grained basic score for each element's causal evidence chain. This determines the confidence level of each element, and elements with a passing confidence level are verified. Based on the verification results, an event causal relationship analysis report is generated. This method of screening by confidence level and candidate causal pairs narrows the scope of causal relationship tracing, thereby reducing the computational overhead of subsequent counterfactual intervention verification and physical constraint verification, and ensuring the integrity and stability of the screened causal pairs. Simultaneously, multi-dimensional verification achieves the purpose of filtering model illusions and false causal associations, providing fault chain tracing and decision support for subsequent dispatchers. Attached Figure Description
[0022] Figure 1 A flowchart illustrating a method for causal source analysis of power grid operation events based on a large language model, provided in one embodiment of this application;
[0023] Figure 2 A flowchart illustrating a method for causal source analysis of power grid operation events based on a large language model, provided in another embodiment of this application;
[0024] Figure 3 A schematic diagram illustrating the entire causal source tracing process of a power grid operation event causal source tracing analysis method based on a large language model, provided for another embodiment of this application; and
[0025] Figure 4 This is a schematic diagram of the structure of a power grid operation event causal tracing analysis system based on a large language model, provided as an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0029] According to one embodiment of this application, a method for causal source analysis of power grid operation events based on a large language model is provided, such as... Figure 1 As shown, the method includes steps S101 to S106.
[0030] Step S101: Obtain the original text of the target power grid operation and preprocess it to obtain the preprocessed text.
[0031] In this embodiment, the raw text of the target power grid operation mainly includes various unstructured or semi-structured raw documents such as dispatch logs, fault reports, protection action reports, and operation ticket records. Different raw documents may contain a large amount of interference information unrelated to causal analysis (such as PDF headers and footers, table formats, special encodings, timestamps, garbled characters, etc.), or may use different terms, abbreviations, or expressions due to different sources. Therefore, preprocessing to standardize the text can eliminate noise, unify the format, ensure repeatability, and provide a stable and reliable text foundation for all subsequent analyses.
[0032] Step S102: Use the pre-configured first large language model to extract the initial set of candidate causal pairs in the preprocessed text that meet the proposal prompts.
[0033] In this embodiment, each element in the initial candidate causal pair set is a candidate causal pair, which is an ordered pair of text fragments. For example, consider a generative large language model. In conjunction with the proposal prompts Apply to normalized text The goal is to identify all explicit and implicit latent causal links in a text with high recall, thereby determining the original set of candidate causal pairs. . Each candidate in the set An ordered pair of event text fragments , For the first The cause event of a candidate causal pair For the first The outcome events of a candidate causal pair.
[0034] Step S103: Construct the causal evidence chain for each element of the initial candidate causal pair set and score it to obtain the coarse-grained basic score of the causal evidence chain for each element.
[0035] In this embodiment, the coarse-grained basic score is only used to characterize the completeness and stability of the causal evidence chain, thereby performing preliminary screening of candidate causal pairs obtained under high recall, filtering out candidate causal pairs that obviously do not meet the causal rationality conditions, and reducing the subsequent verification cost.
[0036] Step S104: Determine the confidence level of each element based on the coarse-grained basic score.
[0037] In this embodiment, the confidence level is used to characterize the degree of credibility of a causal pair. Specifically, the confidence level can be classified into different types, such as pass and fail, by using a threshold range.
[0038] Step S105: Identify the elements with a confidence level of Pass as the target causal pair.
[0039] Step S106: Perform multidimensional verification and evaluation on the target causal pair, and generate an event causal context analysis report based on the evaluation results.
[0040] In this application embodiment, multidimensional verification mainly includes counterfactual verification and physical rationality verification.
[0041] This application embodiment obtains and preprocesses power grid operation text to obtain preprocessed text. Then, using a pre-configured first large language model, it extracts an initial set of candidate causal pairs that meet the proposal prompts from the preprocessed text. Next, it constructs and scores the causal evidence chains of each element in the initial candidate causal pair set, obtaining a coarse-grained basic score for each element's causal evidence chain to determine the confidence level of each element. Elements with a passing confidence level are then verified, and an event causal relationship analysis report is generated based on the verification results. This method of screening by confidence level and candidate causal pairs narrows the scope of causal relationship tracing, thereby reducing the computational overhead of subsequent chain scoring and ensuring the integrity and stability of the screened causal pairs. Simultaneously, multi-dimensional verification filters out model illusions and false causal associations, providing fault chain tracing and decision support for subsequent dispatchers.
[0042] In some embodiments, step S103 further includes:
[0043] Based on the pre-configured chained prompts guiding the first language model, a causal evidence chain is constructed for each element of the initial candidate causal pair set.
[0044] Determine the chain strength score and chain structure consistency score of the causal evidence chain for each element;
[0045] The coarse-grained basic score of each element is obtained by multiplying and aggregating the chain strength score and chain structure consistency score of the causal evidence chain of each element.
[0046] The embodiments of this application are based on the axiom of causal transitivity, that is, if Causally leading to , Causally leading to Then there exists from arrive The application utilizes a large language model to explicitly construct a complete causal evidence chain from the causal event to the result event, and independently verifies each link in the chain.
[0047] The specific process is as follows:
[0048] (1) Construction of the causal evidence chain. For each candidate causal pair... Through chain prompts Guided generative models in text Constructing a causal chain of evidence:
[0049] ;
[0050] in For the intermediate causal links identified in the text ( ,in, This indicates the directness of the causal relationship, meaning there are no observable intermediate transmission steps between cause and effect. Each intermediate step... Two conditions must be met: in the text There is clear evidence to support this, and it also has a partial causal relationship with both the preceding and subsequent stages.
[0051] (2) Step-by-step independent verification. Verify each pair of adjacent links in the causal chain of evidence. ,in , A set of verification prompts with diverse expressions is used. Perform an independent causal plausibility assessment. The confidence level of a single-loop causality is defined as the arithmetic mean of the output probabilities of multiple validation prompts:
[0052] It is used to characterize the causal rationality of each local link in the causal evidence chain.
[0053] (3) Chain Strength Scoring. As a series structure, the overall reliability of a causal evidence chain is limited by its weakest link; this property is analogous to the barrel effect. In this embodiment, the overall strength of the causal evidence chain is determined by the minimum value operator, as shown in the following formula:
[0054] This minimum operator ensures that the lack of causal rationality in any single link will determine the upper bound of the reliability of the entire chain.
[0055] (4) Chain structure consistency scoring. To eliminate the interference of random fluctuations in the model inference process on chain construction, this application... In each independent call, a causal evidence chain is constructed, and the stability of the chain structure is used as a measure of the reliability of the reasoning. The structural similarity between two chains is defined as the Jaccard similarity coefficient of their intermediate sets:
[0056] ;
[0057] in Indicates the first The chain is constructed by combining the semantic sets of events from all intermediate links. A high consistency score reflects that the causal reasoning chain is rooted in a robust semantic understanding of textual evidence, rather than relying on randomly generated paths.
[0058] In this embodiment, the chain strength score and the chain consistency score are multiplied and aggregated to form a basic score, as shown in the following formula:
[0059] ,in, For the first Coarse-grained basic score for each causal pair For the first The strength score of the causal chain of a causal pair. For the first Consistency score of the chain structure of causal pairs.
[0060] Valid candidates must simultaneously satisfy two independent conditions: causal rationality at each stage and cross-step consistency of the chain structure. The absence of either condition will lead to a significant decrease in the base score. Therefore, the embodiments of this application model a strict logical conjunction relationship through product aggregation.
[0061] In some embodiments, step S104 further includes:
[0062] The coarse-grained baseline score of each element is compared with a preset coarse-grained baseline score threshold, and the confidence level of elements that is not less than the coarse-grained baseline score threshold is determined as passed.
[0063] Specifically, the coarse-grained basic scoring threshold can be customized according to business needs.
[0064] This embodiment classifies candidate causal pairs into two confidence levels: pass and fail, based on the baseline score.
[0065] ;in, Candidates that fail to pass the confidence level do not meet the basic causal rationality conditions at the coarse-grained stage and are directly filtered out according to the truncation criterion, thus not entering the subsequent intervention verification stage, effectively reducing computational complexity. Candidates that pass the confidence level will proceed to the subsequent step c for complete two-way counterfactual testing and intervention intensity gradient analysis. Specifically, the threshold for confidence level division can be set according to business needs, such as a high confidence threshold. and low confidence threshold When applying it, the filtration intensity can be selected based on cause and effect.
[0066] In some embodiments, step S106 further includes:
[0067] Step S1061 (not shown in the figure): Perform counterfactual verification and counterfactual verification intervention evaluation on the target causal pair to obtain a comprehensive causal intervention score;
[0068] Step S1062 (not shown in the figure): Perform dynamic causal feasible region verification and evaluation on the target causal pair to obtain a physical rationality score;
[0069] Step S1063 (not shown in the figure): The coarse-grained basic score, the causal intervention comprehensive score, and the physical rationality score are fused to obtain the comprehensive score of the target causal pair;
[0070] Step S1064 (not shown in the figure): The target causal pairs whose comprehensive scores are greater than the preset comprehensive score threshold are identified as high-reliability power grid operation event causal pairs, and an event causal context analysis report for the high-reliability power grid operation event causal pairs is generated.
[0071] In this embodiment, the comprehensive scoring threshold can be set by first sorting all candidate causal pairs in descending order according to their final comprehensive scores, and then setting the filtering threshold. Candidates that meet the threshold conditions constitute the final set of causal pairs for high-reliability power grid operation events: .gather Each causal pair in the model satisfies the following five reliability conditions: traceability verification of the causal evidence chain, necessity test of positive counterfactual evidence, sufficiency test of reverse counterfactual evidence, gradient analysis of counterfactual intervention intensity, and dynamic causal feasible region matching verification, thereby ensuring the reliability of the causal relationship.
[0072] In some embodiments, step S1061 further includes:
[0073] Evidence localization is performed on the target causal pair to obtain the localization results;
[0074] Quadruples based on predefined event-causal patterns for power grid operation scenarios and structural causal models for event-oriented causal extraction The location results are counterfactually verified using a pre-configured proxy model and evaluator module to obtain a counterfactual verification score, which includes a positive necessity score, a negative sufficiency score, and a specificity score.
[0075] Based on the positioning results, counterfactual causal intervention is performed to obtain intervention parameters, which include causal sensitivity, causal resistance to intervention, and causal stability.
[0076] The counterfactual verification score and the intervention parameters are fused using a geometric mean to obtain the comprehensive causal intervention score.
[0077] The quad This includes a set of power grid operation event types, a set of argument roles associated with each event type, structural constraints on causal relationships, and a set of physical causal constraint rules for the power grid.
[0078] Based on the preprocessed text, construct a structural causal model for event causal extraction. The structural causal model The causal judgment driving path includes the textual evidence path. Parameter memory path Co-occurrence statistical path .
[0079] Since causal judgments are primarily based on textual evidence... Drive, therefore for Applying negative intervention to evidence from either direction should lead to a causal judgment. Significant changes occurred. Therefore, for each candidate causal pair that passed the coarse-grained screening... Evidence alignment operators can be used (which can send evidence location cues to a large language model, requiring the model to identify and return the most concise text span that supports the judgment of a specific event from the global text). In global text In the preprocessed text, two local evidence intervals are located to support the causal and result judgments, respectively:
[0080] ; .in and From respectively The most concise text span extracted from the text that sufficiently supports the identification of causal and consequent events. If evidence alignment fails in either direction (i.e., in...), ... If sufficient support cannot be found in the text, then the candidate satisfies the condition of having no textual basis and is marked as a hallucination output.
[0081] This embodiment is based on counterfactual causal inference theory. Counterfactual intervention is applied to candidate causal pairs from both positive (denying cause) and negative (denying result) directions. The necessity and sufficiency of the causal relationship are determined by observing changes in the response to the causal judgment. Specifically, a two-way counterfactual necessity-sufficiency testing paradigm can be used. The necessity of the causal relationship is verified through a positive test, and the sufficiency of the causal relationship is verified through a negative test. This reveals parameter-dominant illusions and co-occurrence statistical spurious associations, resulting in a broader coverage of illusion detection.
[0082] In this embodiment, the event causal pattern for the power grid operation scenario is a quadruple. Specifically: .in, It is a predefined set of power grid operation event types, covering event types such as line faults, protection actions, switch tripping, safety control device actions, frequency anomalies, voltage over-limits, switching operations, and reclosing actions; It is a set of argument roles associated with each event type, including semantic roles such as faulty equipment, action time, fault nature, and action protection type; Structural constraints on causal relationships, i.e., legitimate causal pairs The type and argument completeness conditions that causal events and resultant events must satisfy; The set of physical causal constraint rules for the power grid (see step d1) encodes the inherent physical causal laws of the power system. The above four-tuples constrain the legitimacy of causal relationships at both semantic and physical levels. The event type set and argument role set provide semantic constraints for the generation of causal pairs in step b, the causal relationship structure constraints provide legitimacy criteria for the verification of the links in the causal evidence chain in step b, and the set of physical causal constraint rules provides the physical constraint basis for the construction of the dynamic causal feasible region in step d.
[0083] This embodiment models the process of judging event causal pairs using a large language model as a structural causal model. This model is used to reveal the driving forces behind causal judgments. The three competing causal paths and their superposition effect are identified by constructing a structural causal model for the event causal extraction process. The model output is modeled as the superposition result of three competing paths: textual evidence, parameter memory, and co-occurrence statistics, thereby achieving source attribution for causal judgment.
[0084] Structural causal model in this application as follows: Among them, the set of exogenous variables Characterizing random noise sources, the set of endogenous variables structural equation set Including textual evidence variables Parameter memory variables Co-occurrence statistics .
[0085] In this embodiment, textual evidence variables Representation text Local evidence information that directly supports the causal judgment. From text Evidence Alignment Operator The value of the joint determination reflects the significance of causal clues in the text.
[0086] In this embodiment, the parameter memory variable The distribution of prior knowledge representing the co-occurrence and association among event types learned by the large language model during the pre-training phase. This is unrelated to the current text and is determined solely by the inherent structure of the model's parameter space. It is the fundamental source of the illusion of parameter dominance, that is, the inherent tendency of the model to make causal association judgments based on prior memory even after textual evidence has been refuted.
[0087] In this embodiment, the co-occurrence statistical variable Representation text The statistical co-occurrence characteristics of two events at the surface level (such as positional proximity, syntactic parallel structure, etc.). Co-occurrence statistical variables. The non-zero value of is the root cause of spurious correlation causation, that is, the model misjudges the statistical correlation in the text as causation.
[0088] In this embodiment, the causal judgment output This refers to the causal pair judgments of events ultimately provided by the model. Its structural equation is: .
[0089] in, It is textual evidence Parameter memory Co-occurrence statistics With random noise A mixture function of four variables. Based on Pearl's causal inference theory, this is achieved by applying a series of... Attribution analysis of the budget can be performed to identify each path. The contributions are separated. Therefore, the model is based on the textual evidence path. The dominant causal judgment filters the path remembered by parameters. Or co-occurrence statistical path False judgments driven by dominant forces.
[0090] In this embodiment, the Forward Counterfactual Necessity Test aims to verify the necessity of a causal relationship. If the causal event is indeed necessary for the occurrence of the result event, then once the evidence in the text regarding the causal event is semantically negated, the model should no longer attribute the result event to the causal event.
[0091] Specifically, a semantic inversion operator is applied to the causal evidence interval (this operator sends a semantic negation instruction to the large language model, requiring the model to invert the semantics of the specified evidence interval while keeping the rest of the text unchanged, for example, inverting "A phase ground fault occurred" to "No fault occurred, operation is normal"). Construct a positive counterfactual context: Among them, the semantic inversion operator It has minimal perturbation, that is, it only performs semantic inversion on the evidence text while keeping the rest of the text unchanged, thus constituting a controlled variable experiment.
[0092] In this embodiment, during the necessity test of positive counterfactual facts, the context of positive counterfactual facts is considered. Above, by proxy model Re-perform causal extraction to obtain the set of causal pairs under counterfactual conditions: Then by the evaluator model For the original causal pair The semantic determination of the relationship between positive and counterfactual outcomes is performed, and the positive necessity score is defined as follows: .in Indicates in There is no such thing as in Semantically equivalent causal pairs. The value of has clear diagnostic significance for causality: a high value indicates that the causal pair has indeed disappeared after the cause is denied, confirming the necessity of causal evidence for causal judgment, corresponding to the value in SCM. The validity of the path. Conversely, a low value (i.e., the model still insists on the causal judgment after the cause is denied) reveals that the judgment is based on the parameter memory path. Dominance constitutes the illusion of parameter dominance.
[0093] In this embodiment, the Backward Counterfactual Sufficiency Test verifies the dependence of causal judgments on outcome evidence from the reverse perspective; that is, if a causal relationship is indeed established, the causal judgment should rely on genuine evidence of the outcome event in the text. Therefore, when the evidence in the text regarding the outcome event is semantically negated, the model should no longer claim that the causal event caused the outcome event. The purpose of the sufficiency test in this embodiment is to eliminate spurious causal associations dominated by co-occurrence statistical paths.
[0094] The reverse counterfactual sufficiency test process in this embodiment is as follows:
[0095] Apply the semantic inversion operator to the result evidence interval to construct a reverse counterfactual context: ;
[0096] In the context of counterfactual Re-execute causal extraction, and obtain:
[0097] The reverse sufficiency score in this embodiment is defined as follows: .in, The value of also carries path attribution significance: a high value indicates that the model no longer maintains the causal judgment when the outcome event is explicitly denied, suggesting that the causal relationship is sufficient. Conversely, a low value, meaning that the model still claims the cause led to the outcome even after the outcome event has been denied, reveals that the judgment is influenced by co-occurrence statistical paths. Dominance means that the model establishes a false causal link based solely on the superficial statistical co-occurrence of two events in the text, and does not change its judgment even if the occurrence of the resulting event is denied.
[0098] The purpose of the causal specificity verification in this embodiment is to determine the semantic robustness of the judgment, eliminate the model's excessive dependence on specific lexical expressions, and apply synonym rewriting perturbations to candidate causal pairs to verify the semantic invariance of the causal judgment.
[0099] The causal specificity process in this embodiment is as follows:
[0100] Define a synonym rewriting operator (this operator sends synonym rewriting instructions to a large language model, requiring the model to replace and rewrite the syntactic structure and vocabulary of a specified text range while strictly maintaining the semantics of the original text). Under the condition of strictly maintaining semantic equivalence, the syntactic structure and vocabulary of the two evidence intervals are jointly rewritten:
[0101] ;
[0102] Perform causal extraction again on the rewritten text to obtain... The specificity score is defined as follows: ;in This indicates that the causal pair remains stable after rewriting. The high value indicates that causal judgments are rooted in a deep understanding of semantic core, and have invariance to surface lexical changes, rather than depending on specific lexical patterns or random fluctuations.
[0103] The counterfactual causal intervention in this application refers to the counterfactual intervention intensity gradient and causal dose-effect curve analysis of the target pair. Specifically, it adopts a method of introducing a continuous intervention intensity gradient from slight semantic weakening to complete semantic negation, and characterizes the nature and strength of the causal relationship by analyzing the response curve of the causal judgment as the intervention intensity changes (causal dose-effect curve), that is, the response curve of the confidence of the causal judgment as the intervention intensity changes.
[0104] When applied, the analysis process of counterfactual intervention intensity gradient and causal dose-response curve is as follows:
[0105] (1) Definition of continuous intervention intensity operator. Define intervention intensity parameters. ,in The corresponding approach does not interfere (preserving the original semantics). This corresponds to complete semantic negation. A continuous intervention intensity operator is constructed (by specifying the intervention intensity parameter in the prompt, the large language model is guided to generate intervention texts with progressively increasing semantic deviation; the intervention intensity parameter serves as a reference indicator in the prompt to guide the model in controlling the degree of semantic weakening). ,exist Generate progressive intervention text for causal evidence intervals at discrete intensity levels:
[0106] ;
[0107] ;
[0108] in, The degree of semantic deviation between the generated evidence and the original evidence is Intervention text.
[0109] (2) Construction of causal dose-response curves. For each intervention intensity level... Causal extraction was performed on the post-intervention text, and the confidence level of the causal judgment was recorded:
[0110] ;
[0111] This yields the causal dose-response curve. .
[0112] (3) Curve morphology feature extraction and causal property determination. Three feature quantities are extracted from the causal dose-response curve, and their respective relationships with the structural causal model are analyzed. The degree of dominance of the three competitive paths corresponds one-to-one:
[0113] In this embodiment, causal sensitivity (i.e., the slope of the initial response curve) characterizes the textual evidence path. Validity, the formula is as follows:
[0114] .
[0115] The above calculation results were normalized to the interval [0,1] using a truncation function, i.e., taking the smaller value than 1. High causal sensitivity indicates that causal judgments respond significantly to even minor weakening of textual evidence; this property confirms that the causal relationship is driven by genuine textual evidence.
[0116] In this embodiment, the causal resistance to intervention (i.e., the judgment retention rate under high-intensity intervention) characterizes the memory path parameter. The degree of dominance), the formula is as follows: .
[0117] Since high causal resistance to intervention means that causal judgments remain unchanged even if evidence is significantly weakened or completely denied, this property reveals the dominant effect of parametric memory pathways.
[0118] In this embodiment, causal stability (i.e., the degree of monotonous decrease of the curve) characterizes the random fluctuation of the model output. The degree of interference), the formula is as follows: .
[0119] Low causal stability, with its curve exhibiting non-monotonic fluctuations, indicates that causal judgments are dominated by random noise and lack stable causal basis.
[0120] (4) Determination of Causal Nature Type. Based on the value combinations of the above three characteristic quantities, causal judgment can be precisely classified into four types of causal nature: Type I, Type II, Type III, and Type IV. Among them, Type I is true causality, characterized by high sensitivity, low resistance to intervention, and high stability, corresponding to causal relationships driven by stable textual evidence; Type II is parametric memory illusion, characterized by low sensitivity, high resistance to intervention, and high stability; Type III is threshold-type causality, with a critical intervention intensity, the curve is flat below the threshold and drops sharply above the threshold; Type IV is noise-dominated, characterized by low stability, and the curve shows violent fluctuations.
[0121] (5) Comprehensive score of causal intervention. Based on the three characteristic quantities of the dose-response curve and the two-way counterfactual scores of steps c2-c4, the comprehensive score of causal intervention is determined by the six-dimensional geometric mean:
[0122] ;
[0123] in Unify the reverse sufficiency score obtained in step c3 Geometric mean is used for fusion, ensuring that the overall score remains high only when all six dimensions—positive necessity, negative sufficiency, causal specificity, causal sensitivity, resistance to intervention, and stability—reach their effective thresholds. As is the nature of geometric mean, failure to meet the threshold in any dimension will cause the overall score to drop to near zero, thus identifying various sources of dishonesty.
[0124] In some embodiments, step S1062 further includes:
[0125] Based on the protection configuration file of the target power grid, determine the protection logic diagram;
[0126] Based on the joint constraints of the target power grid topology and the protection logic diagram, a dynamic causal feasible region is determined. The dynamic causal feasible region includes causal event constraints, result event constraints, a minimum time window determined by the protection setting, a maximum time window determined by the protection setting, and the legal association paths of the devices involved in the causal event and result event in the power grid topology diagram.
[0127] The target causal pair is physically constrained and matched using the dynamic causal feasible domain, and a physical rationality score is obtained based on the matching results. The matching verification includes at least: event type matching degree, precise time window compliance, and topology path consistency.
[0128] In this embodiment of the application, the protection configuration file is generally represented as a set. It includes protection setting sheets, control logic diagrams, automation system configurations, etc., and is mapped through protection logic parsing. Automatically construct protection logic diagram: .in, To protect the set of nodes in the logic diagram (each node corresponds to a protection action or control event). It is a set of directed edges (each directed edge represents a protection logic trigger relationship, and the directionality of the edge reflects the temporality of causal transmission). This is a precise time window function for each trigger relationship, and its value is uniquely determined by the action time limit setting value in the protection setting sheet.
[0129] In this embodiment, the dynamic causal feasible region refers to the set of all physically valid causal relationship templates under the power grid configuration. Represented as: Each causal feasible template Defined as a quintuple:
[0130] ;in and These are the type constraints for the causal event and the result event in the feasible causal template, respectively. and The precise time window (i.e., the minimum time window and the maximum time window) is automatically determined by the protection setting. The cause and effect events involve the legitimate associated paths of devices in the power grid topology graph.
[0131] The purpose of constructing the dynamic causal feasible region in this embodiment is to perform physical constraint verification, that is, to verify each candidate causal pair through deep causal intervention. In the dynamic causal feasible domain The search for a matching causal feasible template in the data is performed, and the physical plausibility score is defined as follows: ; where the matching function It consists of a logical conjunction of three dimensions: event type matching degree, precise time window compliance, and topological path consistency.
[0132] In this embodiment, the event type matching degree is as follows:
[0133] ;
[0134] In this embodiment, the compliance of the precise time window is as follows:
[0135] ;
[0136] This constraint verifies the time sequence and checks whether the time interval between two events strictly falls within the physical time window of this type of protection action.
[0137] In this embodiment, the topology path consistency is as follows:
[0138] .
[0139] In this embodiment, the three dimensions mentioned above are combined logically to form the final matching result: Specifically, if candidate causal pairs Throughout the causal feasible domain There is no matching causal feasible template (i.e.) If the condition is not met, it will be rejected directly based on the principle of physical infeasibility.
[0140] In some embodiments, step S1063 further includes:
[0141] The coarse-grained basic score and the causal intervention comprehensive score are linearly weighted and fused, and the linear weighted fusion result is multiplicatively hard-constrained with the physical rationality score to obtain the comprehensive score.
[0142] The comprehensive score definition in this embodiment is: Among them, hyperparameters Controlling the contribution weights between text matching evidence and deep causal verification, For coarse-grained basic scoring, For causal intervention comprehensive score, Score the physical plausibility. Applying gating in a multiplicative manner constitutes hard constraint gating, so that even if a candidate obtains a high score at the statistical level, if it violates any physical causal constraint, the final score will collapse to zero. .
[0143] The following is combined with Figure 2-3 This application will be described in detail.
[0144] First, the input power grid operation text is preprocessed. The power grid operation text can be, for example, as follows: Figure 3 The document, as shown, includes a sequence number and event description. For example, the text content might be: "On a certain day at a certain hour and minute, a momentary ground fault occurred on phase A of the I circuit from substation A to substation B; at a certain hour, minute, and second, the distance protection stage I of substation A tripped, causing the circuit breakers on both the A and B sides to trip; at a certain hour, minute, and second, the reclosing operation on the A side of substation A was successful, and the line resumed operation. At the same time, the routine inspection of a main transformer at substation C was normal." This information was obtained through document parsing and text cleaning mapping. right The process involves format parsing, redundant symbol removal, and encoding standardization. This preprocessing outputs normalized plain text. .
[0145] Next, the standardized plain text was processed. The steps for generating candidate causal pairs and performing coarse-grained scoring based on the causal evidence chain tracing are as follows: generating initial candidate causal pairs, constructing and verifying the causal evidence chain in a traceable manner, and aggregating coarse-grained basic scores and dividing confidence levels.
[0146] The initial candidate causal pair generation process is as follows: according to the proposal prompts Guided Generative Large Language Model Standardized plain text with high recall The model is obtained by considering all explicit and implicit latent causal links. The output, i.e., the original set of candidate causal pairs. Assume the model outputs the following four candidates, namely... , , and The details are as follows:
[0147] A transient ground fault occurred on phase A of a certain line, and the distance protection stage I of substation A activated. ;
[0148] The distance protection stage I of substation A tripped, causing the circuit breakers on both sides of substation A and B to trip. ;
[0149] A momentary ground fault occurred on phase A of a certain line, and the reclosing operation was successful. ;
[0150] A momentary ground fault occurred on phase A of a certain line, but the main transformer at substation C was found to be normal during inspection. .
[0151] The process of constructing and progressively verifying the causal evidence chain includes: (1) constructing and progressively verifying the causal evidence chain and (2) verifying the consistency of the chain structure.
[0152] (1) Construction of causal evidence chain and stepwise independent verification:
[0153] right : Through chain suggestions Guided Model In standard plain text Constructing a causal chain of evidence A phase A ground fault occurred on a certain line, and the distance protection stage I of substation A activated. Number of intermediate links It indicates the directness of a causal relationship. Used for a single link in the chain. One verification prompt assesses the reasonableness of causality, and the confidence level of single-loop causality. The chain strength score is determined by the minimum value operator. .
[0154] right Similar to constructing a causal chain of evidence, the strength of the chain is scored. .
[0155] right Model construction of causal chains A phase A ground fault occurred on a certain line. =Protective action, =The circuit breaker tripped, and the reclosing operation was successful. The process The causal rationality score for the successful reclosing action after the switch trips is: Since successful reclosing also depends on whether the fault is cleared instantaneously, switch tripping alone cannot fully explain successful reclosing. The chain strength score is determined by the minimum value operator. .
[0156] right The model cannot construct a reasonable chain of causal evidence; there is no explainable intermediate link between the fault and the normal operation during inspection. .
[0157] (2) Chain structure consistency verification:
[0158] right : Each independent construction produces the same direct causal chain, and the Jaccard similarity coefficient of each intermediate link set is 1.0, resulting in a chain structure consistency score. .
[0159] right The chain structure, constructed independently three times, remains consistent. .
[0160] right The three independent constructions resulted in different chain structures, with the second one lacking some intermediate links. .
[0161] right None of the three attempts to construct a stable chain structure succeeded. .
[0162] Output: Chain strength score for each candidate Consistency score of chain structure .
[0163] The coarse-grained basic score aggregation and confidence level division process is as follows: The strength scores of each candidate chain output from the above steps are... Consistency score of chain structure The two scores are multiplied and aggregated to form the base score.
[0164] For example, ; ; ; Assuming a threshold for dividing the trust hierarchy. , . The base score is 0.913 and The baseline score of 0.925 is not lower than the threshold, and the scores are classified as passing level P and proceeding to the subsequent step c for bidirectional counterfactual testing and intervention intensity gradient analysis. The base score is 0.291 and All scores of 0.018 were below the threshold and were classified as failing at level F, thus being directly filtered out. Figure 3 It can be seen that the hierarchical candidate set is as follows: The candidate set that did not pass the level is To demonstrate the verification results of subsequent steps, the following assumptions are made. It has also entered the subsequent verification stage. It has been filtered in this step and will no longer participate in subsequent calculations.
[0165] Next, for candidates that pass the confidence level, a two-way counterfactual causal necessity-sufficiency test and intervention intensity gradient analysis are performed, along with the creation and verification of dynamic causal feasible domains based on automatic parsing of protection logic, and multidimensional score fusion and threshold screening.
[0166] The causal necessity-sufficiency test process based on two-way counterfactual is as follows:
[0167] (1) Step c1: Evidence alignment and causal support interval location. The input for this step is: candidate causal pairs selected through coarse-grained screening and normalized plain text. Evidence Alignment Operator .
[0168] right Using evidence alignment operators in the normalization of plain text Two local evidence intervals were located in the middle. Locate the description interval in the text where a transient ground fault of phase A occurs on a certain line. The description interval of the substation A distance protection stage I action in the text was located. Evidence alignment in both directions was successful.
[0169] right : Locate the description interval in the text where a transient ground fault of phase A occurs on a certain line. The description interval of the successful reclosing action in the text was located. Evidence alignment in both directions was successful. The output is: the causal evidence interval for each candidate causal pair. and the evidence interval of the outcome .
[0170] (2) Step c2: Positive counterfactual necessity test. Input: The causal evidence interval output from step c1. Semantic inversion operator Standardized plain text Proxy model Evaluator Model .
[0171] right Apply the semantic inversion operator to the causal evidence interval. Reverse the scenario of a transient ground fault in phase A of a certain line to the scenario of the line operating normally without a fault, constructing a positive reverse fact context. .Will Input proxy model Re-perform causal extraction to obtain a set of counterfactual causal pairs. In a counterfactual context, since the occurrence of the fault has been denied, the surrogate model no longer extracts the causal pair between the line fault and the protection action. Evaluator Model The causal pair is determined to be nonexistent in the counterfactual outcome, i.e. Positive necessity scoring .
[0172] right Similar to performing a positive counterfactual necessity test. After reversing the causal evidence, the surrogate model still claims that the fault caused the reclosing to succeed, indicating that this judgment is based on the parameter memory path. Dominant. Positive necessity rating Output: Positive necessity score for each candidate. .
[0173] (3) Step c3: Reverse counterfactual sufficiency test. Input: Evidence interval of the result output from step c1. Semantic inversion operator Original text Proxy model Evaluator Model .
[0174] right Apply the semantic inversion operator to the result evidence interval. Constructing a reverse counterfactual context The counterfactual causal pair set is obtained by re-performing causal extraction using the proxy model. If the evidence is refuted, the model no longer maintains the causal pair, and the evaluator model determines that the causal pair does not exist. (Reverse sufficiency scoring) .
[0175] right This is similar to performing a reverse counterfactual sufficiency test. Even after the evidence is refuted, the model still claims that the fault caused the reclosing to succeed, indicating that this judgment is influenced by co-occurrence statistical paths. Dominant. Reverse sufficiency scoring Output: Reverse sufficiency scores for each candidate. .
[0176] (4) Step c4: Causal specificity verification. Input: The two evidence intervals output from step c1. and Synonymous rewriting operators Proxy model Evaluator Model .
[0177] right Under the condition of strictly preserving semantic equivalence, the synonym rewriting operator is used. The syntactic structure and vocabulary of the two evidence intervals are jointly rewritten. For example, the transient ground fault of phase A is rewritten as a short-term single-phase ground fault of phase A, and the first stage operation of distance protection is rewritten as the start of a first stage distance protection. The rewritten text is then constructed. By proxy model Re-execute causal extraction to obtain The model still stably extracts equivalent causal pairs. Specificity score. .
[0178] right Similar to performing causal specificity verification. Specificity score. Output: Specificity score for each candidate. .
[0179] (5) Step c5: Counterfactual intervention intensity gradient and causal dose-effect curve analysis. Input: Causal evidence interval output from step c1. Continuous intervention intensity operator Proxy model .
[0180] Intervention intensity gradient analysis, namely curve morphology feature extraction and causal property determination, involves extracting three characteristic quantities from the causal dose-response curve: causal sensitivity, causal resistance to intervention, and causal stability.
[0181] The calculation results are as follows: Causal sensitivity Normalized to the interval by the truncation function 1.0 was taken later; causal resistance to intervention Causal stability The curve shows a completely monotonically decreasing trend. Analysis reveals that the curve exhibits a monotonically rapid decline, belonging to the Type I true causal form, corresponding to the textual evidence path. Stable-driven causal relationships.
[0182] right Intervention intensity gradient analysis: , , , , The curve is almost horizontal, which belongs to the Type II parametric memory illusion pattern. , , .
[0183] The comprehensive causal intervention score is based on three characteristic quantities of the dose-response curve and the scores of steps c2 to c4. The comprehensive causal intervention score is determined by a six-dimensional geometric mean, and the comprehensive causal intervention score for each candidate is output through intervention intensity gradient analysis. .
[0184] The overall scoring results are as follows:
[0185] right : ;in The reverse sufficiency score is taken from step c3.
[0186] right Similar to the validation and intervention intensity gradient analysis of steps c1 to c4, a comprehensive causal intervention score was obtained. ;right : .
[0187] The process of creating and verifying dynamic causal feasible regions based on automatic resolution of protection logic includes: automatic resolution of protection logic and construction of causal feasible regions, and causal feasible region matching and verification.
[0188] The automatic parsing and causal feasible region construction steps of the protection logic take the following input: a set of power grid protection configuration files. Power grid topology diagram Output: Protection Logic Diagram With dynamic causal feasible region .
[0189] Specifically, the steps include the following:
[0190] (1) Automatic parsing of protection logic diagrams. This is achieved through protection logic parsing and mapping. Automatically build protection logic diagram from protection configuration file .
[0191] (2) Derivation of dynamic causal feasible region. Based on power grid topology. With protection logic diagram Joint constraints, deriving the dynamic causal feasible region Each causal feasible template Defined as a quintuple This includes causal feasible templates such as: Line fault, protection activated. , Same site path ; Protection action, circuit breaker trips. , Same site path .
[0192] The inputs to the causal feasible region matching verification step are: candidate causal pairs verified through causal intervention and dynamic causal feasible regions. The output is: the physical plausibility score of each candidate. .
[0193] Specifically, it includes the following:
[0194] right Matching feasible templates Event type matching degree Time interval The time window is , Topology path consistency: The faulty line and the protection device are located in the same substation. Physical rationality score .
[0195] right Matching feasible templates Similar verification passed. .
[0196] right In the dynamic causal feasible region The search revealed no feasible template for a line fault leading to a successful reclosing operation. .
[0197] The steps of multidimensional score fusion and threshold filtering include: final score fusion and threshold filtering, and determination of the final causal pair set. The input to the final score fusion step is: coarse-grained basic scores. Causal intervention comprehensive score And physical rationality score The output is: the final comprehensive score of each candidate. The calculation process is as follows: ; ; .
[0198] The inputs to the threshold screening and final causal pair determination steps are: final score and screening threshold. The output is: a set of causal pairs of high-reliability power grid operation events. In this embodiment, a threshold is set. Sort all candidates in descending order of their final scores: Its rating is 0.931. Its rating is 0.930. The rating is 0. The final score was 0, failing the threshold screening. For example, for Assume a transient ground fault occurs in phase A of a certain line. The distance protection stage I of substation A operated, with a causal sensitivity of 1.0, an anti-interference capability of 0.05, and passed the entire dynamic feasible region; Distance protection stage I of substation A activated. The circuit breakers on both sides of substation A and B tripped, with a causal sensitivity of 1.0, an anti-interference capability of 0.03, and all dynamic feasible regions were passed. Figure 3 As shown, two causal pairs constitute the fault. Protective actions The causal chain of circuit breaker tripping. Each link in this chain has passed causal evidence chain tracing verification, two-way counterfactual necessity-sufficiency test, counterfactual intervention intensity gradient analysis, and dynamic causal feasible region matching verification, which can be used for fault chain tracing and scheduling decision support.
[0199] One embodiment of this application provides a causal source analysis system for power grid operation events based on a large language model, such as... Figure 4 As shown, the device 40 includes: a text preprocessing module 401, a causal pair extraction module 402, a causal pair scoring module 403, a causal pair confidence module 404, a target pair filtering module 405, and a target pair verification module 406.
[0200] The text preprocessing module 401 is used to acquire the original text of the target power grid operation and preprocess it to obtain preprocessed text;
[0201] The causal pair extraction module 402 is used to extract an initial set of candidate causal pairs that meet the proposal prompts from the preprocessed text using a pre-configured first large language model.
[0202] The causal pair scoring module 403 is used to construct the causal evidence chain of each element in the initial candidate causal pair set and score it to obtain a coarse-grained basic score of the causal evidence chain of each element.
[0203] Causal pair confidence module 404 is used to determine the confidence level of each element based on the coarse-grained basic score;
[0204] The target pair filtering module 405 is used to determine the elements with a confidence level of "pass" as target causal pairs;
[0205] The target pair verification module 406 is used to perform multi-dimensional verification and evaluation on the target causal pair, and generate an event causal context analysis report based on the evaluation results.
[0206] This application embodiment obtains and preprocesses power grid operation text to obtain preprocessed text. Then, using a pre-configured first large language model, it extracts an initial set of candidate causal pairs that meet the proposal prompts from the preprocessed text. Next, it constructs and scores the causal evidence chains of each element in the initial candidate causal pair set, obtaining a coarse-grained basic score for each element's causal evidence chain to determine the confidence level of each element. Elements with a passing confidence level are then verified, and an event causal relationship analysis report is generated based on the verification results. This method of screening by confidence level and candidate causal pairs narrows the scope of causal relationship tracing, thereby reducing the computational overhead of subsequent chain scoring and ensuring the integrity and stability of the screened causal pairs. Simultaneously, multi-dimensional verification filters out model illusions and false causal associations, providing fault chain tracing and decision support for subsequent dispatchers.
[0207] Furthermore, the causal pair scoring module includes:
[0208] The chain construction submodule is used to guide the first large language model based on pre-configured chain prompts to construct the causal evidence chain of each element of the initial candidate causal pair set;
[0209] The chain scoring submodule is used to determine the chain strength score and chain structure consistency score of the causal evidence chain for each element;
[0210] The basic score determination submodule is used to multiply and aggregate the chain strength score and chain structure consistency score of the causal evidence chain of each element to obtain the coarse-grained basic score of each element.
[0211] Furthermore, the causal confidence module includes:
[0212] The confidence grading submodule is used to compare the coarse-grained basic score of each element with a preset coarse-grained basic score threshold, and determine the confidence level of elements that are not less than the coarse-grained basic score threshold as passing.
[0213] Furthermore, the target pair verification module includes:
[0214] The first verification submodule is used to perform counterfactual verification and counterfactual verification intervention evaluation on the target causal pair to obtain a comprehensive causal intervention score.
[0215] The second verification submodule is used to perform dynamic causal feasible domain verification and evaluation on the target causal pair to obtain a physical rationality score.
[0216] The comprehensive scoring submodule is used to integrate the coarse-grained basic score, the causal intervention comprehensive score, and the physical rationality score to obtain the comprehensive score of the target causal pair;
[0217] The reliability analysis submodule is used to identify target causal pairs whose comprehensive score is greater than a preset comprehensive score threshold as high-reliability power grid operation event causal pairs, and generate an event causal context analysis report for the high-reliability power grid operation event causal pairs.
[0218] Furthermore, the first verification submodule includes:
[0219] An evidence localization unit is used to locate the target causal pair and obtain the localization result.
[0220] Counterfactual evaluation unit, used for quadruples of event causal patterns based on predefined power grid operation scenarios. and structural causal models for event-oriented causal extraction The location results are counterfactually verified using a pre-configured proxy model and evaluator module to obtain a counterfactual verification score, which includes a positive necessity score, a negative sufficiency score, and a specificity score.
[0221] An intervention assessment unit is used to perform counterfactual causal intervention based on the positioning results and obtain intervention parameters, including causal sensitivity, causal resistance to intervention, and causal stability.
[0222] An intervention scoring determination unit is used to perform geometric mean fusion processing on the counterfactual verification score and the intervention parameters to obtain the causal intervention comprehensive score.
[0223] The quad This includes a set of power grid operation event types, a set of argument roles associated with each event type, structural constraints on causal relationships, and a set of physical causal constraint rules for the power grid.
[0224] Based on the preprocessed text, construct a structural causal model for event causal extraction. The structural causal model The causal judgment driving path includes the textual evidence path. Parameter memory path Co-occurrence statistical path .
[0225] Furthermore, the second verification submodule includes:
[0226] The logic diagram parsing unit is used to determine the protection logic diagram based on the protection configuration file of the target power grid.
[0227] The feasible region determination unit is used to determine the dynamic causal feasible region based on the joint constraints of the target power grid topology and the protection logic diagram. The dynamic causal feasible region includes causal event constraints, result event constraints, a minimum time window determined by the protection setting, a maximum time window determined by the protection setting, and the legal association paths of the devices involved in the causal event and result event in the power grid topology diagram.
[0228] The physical constraint matching unit is used to perform physical constraint verification and matching on the target causal pair using the dynamic causal feasible domain, and obtain a physical rationality score based on the matching result. The matching verification includes at least: event type matching degree, precise time window compliance, and topology path consistency.
[0229] Furthermore, the comprehensive scoring submodule includes:
[0230] The multidimensional scoring fusion unit is used to linearly weight and fuse the coarse-grained basic score and the causal intervention comprehensive score, and apply a multiplicative hard constraint to the linear weighted fusion result and the physical rationality score to obtain the comprehensive score.
[0231] The apparatus described in this embodiment can execute the method shown in Embodiment 1 of this application, and its implementation principle is similar, so it will not be described again here.
[0232] Another embodiment of this application provides an electronic device, including: a processor and a memory, wherein the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein the computer-readable instructions are executed to implement the above-described method.
[0233] Specifically, the processor can be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0234] Specifically, the processor connects to the memory via a bus, which may include a path for transmitting information. The bus can be a PCI bus or an EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc.
[0235] The memory may be ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or EEPROM, CD-ROM or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
[0236] Optionally, the memory stores the code of the computer program that executes the scheme of this application, and the execution is controlled by the processor. The processor executes the application program code stored in the memory to implement the operation of the above system.
[0237] Another embodiment of this application provides a computer-readable storage medium storing computer-executable instructions for performing the above-described method.
[0238] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0239] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0240] The above is a detailed description of the preferred embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A causal source analysis method for power grid operation events based on a large language model, characterized in that, The method includes: Obtain the raw text of the target power grid operation and preprocess it to obtain the preprocessed text; The first large language model is pre-configured to extract an initial set of candidate causal pairs that meet the proposal prompts from the pre-processed text; Construct the causal evidence chain for each element of the initial candidate causal pair set and score it to obtain a coarse-grained basic score for the causal evidence chain of each element. Based on the coarse-grained basic score, the confidence level of each element is determined; The elements with a confidence level of "pass" are identified as the target causal pairs; The target causal pair is subjected to multi-dimensional verification and evaluation, and an event causal context analysis report is generated based on the evaluation results. This includes: performing counterfactual verification and counterfactual verification intervention evaluation on the target causal pair to obtain a comprehensive causal intervention score; performing dynamic causal feasible domain verification and evaluation on the target causal pair to obtain a physical rationality score; fusing the coarse-grained basic score, the comprehensive causal intervention score, and the physical rationality score to obtain a comprehensive score for the target causal pair; identifying target causal pairs with a comprehensive score greater than a preset comprehensive score threshold as high-reliability power grid operation event causal pairs, and generating an event causal context analysis report for the high-reliability power grid operation event causal pairs. The process of performing counterfactual verification and counterfactual verification intervention evaluation on the target causal pair to obtain a comprehensive causal intervention score includes: locating evidence of the target causal pair to obtain the location result; and using a four-tuple based on a predefined event causal pattern for power grid operation scenarios. and structural causal models for event-oriented causal extraction The location results are counterfactually verified using a pre-configured proxy model and evaluator module to obtain a counterfactual verification score, which includes a positive necessity score, a negative sufficiency score, and a specificity score. Counterfactual causal intervention is then performed based on the location results to obtain intervention parameters, which include causal sensitivity, causal resistance to intervention, and causal stability. The counterfactual verification score and the intervention parameters are then fused using a geometric mean to obtain a comprehensive causal intervention score. The four-tuple... This includes a set of power grid operation event types, a set of argument roles associated with each event type, a set of structural constraints on causal relationships, and a set of power grid physical causal constraint rules; based on the preprocessed text, a structural causal model for event causal extraction is constructed. The structural causal model The causal judgment driving path includes the textual evidence path. Parameter memory path Co-occurrence statistical path .
2. The method according to claim 1, characterized in that, The process of constructing and scoring the causal evidence chains for each element of the initial candidate causal pair set, resulting in a coarse-grained basic score for the causal evidence chain of each element, includes: Guided by pre-configured chained prompts, the first large language model is constructed to establish a causal evidence chain for each element of the initial candidate causal pair set. Determine the chain strength score and chain structure consistency score of the causal evidence chain for each element; The coarse-grained basic score of each element is obtained by multiplying and aggregating the chain strength score and chain structure consistency score of the causal evidence chain of each element.
3. The method according to claim 1, characterized in that, The determination of the confidence level for each element based on the coarse-grained baseline score includes: The coarse-grained baseline score of each element is compared with a preset coarse-grained baseline score threshold, and the confidence level of elements that is not less than the coarse-grained baseline score threshold is determined as passed.
4. The method according to claim 1, characterized in that, The dynamic causal feasibility domain verification and evaluation of the target causal pair to obtain a physical plausibility score includes: Based on the protection configuration file of the target power grid, the protection logic diagram is determined; Based on the joint constraints of the target power grid topology and the protection logic diagram, a dynamic causal feasible region is determined. The dynamic causal feasible region includes causal event constraints, result event constraints, a minimum time window determined by the protection setting, a maximum time window determined by the protection setting, and the legal association paths of the devices involved in the causal event and result event in the power grid topology diagram. The target causal pair is physically constrained and matched using the dynamic causal feasible domain, and a physical rationality score is obtained based on the matching results. The matching results include at least: event type matching degree, precise time window compliance, and topology path consistency.
5. The method according to claim 1, characterized in that, The process of fusing the coarse-grained basic score, the causal intervention comprehensive score, and the physical plausibility score to obtain the comprehensive score of the target causal pair includes: The coarse-grained basic score and the causal intervention comprehensive score are linearly weighted and fused, and the linear weighted fusion result is multiplicatively hard-constrained with the physical rationality score to obtain the comprehensive score.
6. A causal source analysis system for power grid operation events based on a large language model, characterized in that, include: The text preprocessing module is used to acquire the original text of the target power grid operation and preprocess it to obtain preprocessed text; The causal pair extraction module is used to extract an initial set of candidate causal pairs that meet the proposal prompts from the preprocessed text using a pre-configured first large language model; The causal pair scoring module is used to construct the causal evidence chain of each element in the initial candidate causal pair set and score it to obtain a coarse-grained basic score of the causal evidence chain of each element. The causal confidence module is used to determine the confidence level of each element based on the coarse-grained basic score. The target pair filtering module is used to identify the elements with a confidence level of "pass" as target causal pairs. The target pair verification module is used to perform multi-dimensional verification and evaluation on the target causal pairs, and generate an event causal context analysis report based on the evaluation results; The target pair verification module includes: a first verification submodule, used to perform counterfactual verification and counterfactual verification intervention evaluation on the target causal pair to obtain a comprehensive causal intervention score; a second verification submodule, used to perform dynamic causal feasible domain verification evaluation on the target causal pair to obtain a physical rationality score; a comprehensive scoring submodule, used to fuse the coarse-grained basic score, the comprehensive causal intervention score, and the physical rationality score to obtain a comprehensive score for the target causal pair; and a reliability analysis submodule, used to identify target causal pairs with a comprehensive score greater than a preset comprehensive score threshold as high-reliability power grid operation event causal pairs, and generate an event causal context analysis report for the high-reliability power grid operation event causal pairs. The first verification submodule includes: an evidence localization unit, used to localize the target causal pair and obtain the localization result; and a counterfactual evaluation unit, used to evaluate the quadruples of predefined event causal patterns for power grid operation scenarios. and structural causal models for event-oriented causal extraction The system employs a pre-configured proxy model and evaluator module to perform counterfactual verification on the location results, obtaining a counterfactual verification score, which includes a positive necessity score, a negative sufficiency score, and a specificity score. An intervention evaluation unit is used to perform counterfactual causal intervention based on the location results, obtaining intervention parameters, which include causal sensitivity, causal resistance to intervention, and causal stability. An intervention score determination unit is used to perform geometric mean fusion processing on the counterfactual verification score and the intervention parameters to obtain a comprehensive causal intervention score. The four-tuple... This includes a set of power grid operation event types, a set of argument roles associated with each event type, a set of structural constraints on causal relationships, and a set of power grid physical causal constraint rules; based on the preprocessed text, a structural causal model for event causal extraction is constructed. The structural causal model The causal judgment driving path includes the textual evidence path. Parameter memory path Co-occurrence statistical path .
7. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-readable instructions, and the processor being configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform the method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing computer-executable instructions for performing the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Event causal reasoning method for intelligence analysis and electronic equipment
CN121960796A
Assessment system and method based on large language model, and program product
CN122264123A