Intelligent substation configuration file checking method and system based on artificial intelligence

Through the intelligent substation configuration file verification method based on artificial intelligence, semantic analysis and feature fusion technology, the problems of resource consumption and efficiency of traditional calibration methods are solved, and efficient and accurate configuration file verification is achieved.

CN120524944APending Publication Date: 2025-08-22国网甘肃省电力公司金昌供电公司
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510611605.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

When facing large-scale substation configuration files, traditional verification methods consume huge resources and are inefficient, making it difficult to deal with complex semantic problems and non-standard configuration expressions.

Method used

Using the intelligent substation profile verification method based on artificial intelligence, through semantic analysis, feature learning and feature fusion technology, the neural network model and support vector machine model are used to identify the key features and potential risk points of the profile, and provide multi-dimensional proofreading results.

Benefits of technology

It significantly improves the accuracy and comprehensiveness of the calibration, reduces the computational complexity and memory requirements, and realizes efficient configuration file calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120524944A_ABST
    Figure CN120524944A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent substation configuration file checking method and system based on artificial intelligence, and relates to the field of artificial intelligence, and the method comprises the steps: responding to an input signal of a to-be-checked configuration file, extracting n character strings of the to-be-checked configuration file, carrying out the semantic analysis of each character string, and obtaining a semantic analysis result, n is an integer greater than 1; key features of the analysis result are extracted from the semantic analysis result, feature learning is conducted on each key feature through a preset feature learning algorithm, and high-level feature representation of each key feature is obtained; combining all high-level feature representations of the analysis result to obtain a feature set; and inputting the feature set into an artificial intelligence model to obtain a proofreading result of the to-be-checked configuration file and a preset reference configuration file. According to the method and the device, the problem of huge resource consumption caused by a traditional checking mode can be solved in the face of large-scale data or complex comparison requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence, and in particular to a method and system for calibrating configuration files of smart substations based on artificial intelligence. Background Art

[0002] Smart substations are a vital component of modern power systems, and their stable and reliable operation is crucial to the security of the entire power grid. Substation automation systems rely on numerous configuration files to define critical information such as device parameters, communication logic, and protection settings. These configuration files are often generated by different engineers or tools, and are complex, voluminous, and interdependent. Even minor configuration errors, such as improper parameter settings, incorrect logic references, or device model mismatches, can cause device failure or malfunction, or even trigger cascading failures, threatening power grid security. Therefore, accurate and efficient verification of substation configuration files is essential to ensure proper system operation. Traditional verification methods often rely on manual review or simple automated scripts. Manual review is inefficient, error-prone, and inadequate for handling massive and complex configuration files. Simple automated scripts, such as text comparison tools, can improve efficiency to some extent, but they often struggle to address semantic issues, structural differences, and non-standardized configuration expressions.

[0003] As substations expand in size and become more intelligent, the number and complexity of configuration files have increased dramatically. With hundreds or even thousands of devices, each with detailed configuration parameters and logical relationships, the total size of configuration files can reach tens or even hundreds of megabytes. Furthermore, configuration files are not simply key-value pairs; they contain complex logical relationships, communication message definitions, device model descriptions, and more, resulting in rich structural and semantic information. This context places higher demands on the efficiency and accuracy of verification methods.

[0004] Traditional verification methods use string comparison techniques to determine whether a string appears within a longer string and where it appears. These are typically implemented using the KMP (Knuth-Morris-Pratt) algorithm, the BM (Boyer-Moore) algorithm, or the RK (Rabin-Karp) algorithm.

[0005] The core of the above traditional algorithms lies in precise, literal character sequence matching, and they are good at quickly locating an identical string fragment in a large amount of text. They achieve the calculation process by loading all the content into memory.

[0006] However, when dealing with large amounts of data or complex comparisons, processing large files inherently requires a large amount of memory to store the file contents or partial representations, such as hash values ​​and index structures. Complex character-by-character or line-by-line comparisons, especially when backtracking or maintaining state information, consume significant CPU resources. For large-scale configuration files (for example, a site-wide collection of configuration files), loading all content into memory for intensive computation places extremely high demands on both the memory and processor of the computing device, resulting in significant resource consumption. Summary of the Invention

[0007] The embodiments of the present application provide an artificial intelligence-based smart substation configuration file verification method and system, which are used to solve the problem of huge resource consumption caused by traditional verification methods when facing large-scale data or complex comparison requirements.

[0008] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0009] In a first aspect, a method for verifying a configuration file of an intelligent substation based on artificial intelligence is provided, which is applied to electronic equipment, wherein the electronic equipment is deployed with an artificial intelligence model, and the method comprises:

[0010] In response to an input signal of the configuration file to be verified, extracting n character strings of the configuration file to be verified, and performing semantic analysis on each character string to obtain a semantic analysis result, where n is an integer greater than 1;

[0011] Extract key features of the analysis results from the semantic analysis results, and use a preset feature learning algorithm to learn each key feature to obtain a high-level feature representation of each key feature;

[0012] Merge all high-level feature representations of the analysis results to obtain a feature set, where the feature set includes character frequency, word frequency, semantic vectors, structural features, and contextual information;

[0013] The feature set is input into the artificial intelligence model to obtain the proofreading result of the configuration file to be verified and the preset benchmark configuration file.

[0014] In a possible implementation of the first aspect, performing semantic analysis on each character string to obtain a semantic analysis result includes:

[0015] Perform word segmentation on each string to obtain a word sequence;

[0016] Perform part-of-speech tagging on word sequences to identify keywords, parameter values, and structure identifiers in the configuration files to be verified;

[0017] Based on the preset substation configuration file grammar rule library, perform syntactic analysis on the word sequence and construct a grammar tree;

[0018] According to the syntax tree, the semantic structure and contextual relationship of the string are extracted to build a semantic network;

[0019] Generate semantic analysis results based on the semantic network.

[0020] In another possible implementation of the first aspect, generating a semantic analysis result based on the semantic network includes:

[0021] Identify entity nodes and relationship edges in the semantic network and build a semantic representation model for the configuration file to be verified;

[0022] Calculate the centrality and importance weight of each entity node in the semantic network, and rank all entity nodes based on the centrality and importance weight using a preset importance scoring function;

[0023] The top m physical nodes are used as key configuration items, where m is a preset positive integer;

[0024] Use the preset knowledge base to perform semantic reasoning on key configuration items and generate semantic categories;

[0025] Calculate semantic similarity of key configuration items and determine the relationship type between key configuration items based on the similarity between the key configuration items;

[0026] Integrate semantic categories and relationship types to obtain semantic analysis results.

[0027] In another possible implementation of the first aspect, the artificial intelligence model is a neural network model or a support vector machine model, and the feature set is input into the artificial intelligence model to obtain a calibration result between the configuration file to be calibrated and the preset reference configuration file, including:

[0028] When the artificial intelligence model is a neural network model, the feature set is input into a multi-layer perceptron network, and a high-dimensional representation of the feature vector is obtained through forward propagation calculation;

[0029] The high-dimensional representation is weighted by the attention layer to obtain the weighted feature representation;

[0030] Calculate the similarity between the weighted feature representation and the feature representation of the preset benchmark configuration file to obtain the file similarity rate;

[0031] The anomaly detection layer identifies abnormal patterns in the feature representation and obtains the abnormal item identification results;

[0032] Based on the file similarity and abnormal item identification results, the risk level assessment result is calculated through the risk assessment layer, where the proofreading result includes the file similarity, abnormal item identification results and risk level assessment results;

[0033] When the artificial intelligence model is a support vector machine model, the feature set is mapped to a high-dimensional feature space through a kernel function;

[0034] In a high-dimensional feature space, the feature set is input into multiple binary classification support vector machines to obtain multiple output results;

[0035] Integrate the output results of all binary support vector machines and determine the abnormal item recognition results;

[0036] Based on the abnormal item identification result, the file similarity rate is determined, wherein the proofreading result includes the abnormal item identification result and the file similarity rate.

[0037] In another possible implementation of the first aspect, all high-level feature representations of the analysis results are merged to obtain a feature set, including:

[0038] Based on the attention mechanism, all high-level feature representations of the analysis results are merged to obtain a feature set.

[0039] In another possible implementation of the first aspect, after all high-level feature representations of the analysis results are combined to obtain a feature set, the method further includes:

[0040] Determining a feature distribution of the configuration file to be verified based on the feature set;

[0041] Dynamically adjust the order in which the comparison strategy in the AI ​​model processes high-level feature representations based on feature distribution;

[0042] Based on the model confidence output by the artificial intelligence model, the model parameters and comparison strategy of the artificial intelligence model are optimized.

[0043] In another possible implementation of the first aspect, dynamically adjusting the order in which the comparison strategy in the artificial intelligence model processes high-level feature representations includes:

[0044] Calculate the information entropy and mutual information represented by each high-level feature in the feature set;

[0045] Construct at least one feature importance ranking based on information entropy and mutual information;

[0046] Randomly determine a feature importance ranking from at least one feature importance ranking as a feature processing priority queue;

[0047] Adjust the processing order of high-level feature representations in the AI ​​model based on the feature processing priority queue;

[0048] During the process of the artificial intelligence model processing the feature processing priority queue, the contribution of each high-level feature representation to the verification result is monitored in real time, and the feature processing priority queue is updated in real time according to the contribution, until all feature importance rankings are processed by the artificial intelligence model as the feature processing priority queue.

[0049] In another possible implementation of the first aspect, optimizing model parameters and comparison strategies of the artificial intelligence model based on the model confidence output by the artificial intelligence model includes:

[0050] According to the model confidence, the decision points with confidence less than the preset threshold are identified;

[0051] For decision points with confidence less than a preset threshold, the corresponding configuration rules and cases are retrieved from the preset substation configuration file knowledge base;

[0052] Based on the retrieved configuration rules and cases, an enhanced feature representation of the decision point is constructed;

[0053] Re-input the enhanced feature representation into the AI ​​model to obtain an updated proofreading result;

[0054] Compare the proofreading results before and after the update and calculate the sensitivity index of the model parameters;

[0055] Based on the sensitivity index, the gradient descent algorithm is used to optimize the model parameters of the artificial intelligence model;

[0056] Based on the optimized model parameters, the comparison strategy of the artificial intelligence model is updated.

[0057] In a second aspect, the present application provides an electronic device, comprising:

[0058] a memory configured to store instructions; and

[0059] The processor is configured to call the instructions from the memory and implement the above-mentioned artificial intelligence-based smart substation configuration file verification method when executing the instructions.

[0060] In a third aspect, the present application provides an artificial intelligence-based smart substation configuration file verification system, comprising:

[0061] The above electronic equipment.

[0062] The above technical solution, compared with traditional string matching technology, can understand the semantic content and structural relationships of configuration files, is no longer limited to surface text matching, and greatly improves the accuracy and comprehensiveness of verification. Feature learning and fusion technology converts high-dimensional and sparse original features into low-dimensional and dense representations, significantly reducing computational complexity and memory requirements, making the verification of large-scale configuration files efficient and feasible. The intelligent comparison model based on deep learning can automatically identify key configuration items and potential risk points, and provide multi-dimensional verification results and explainable analysis, which not only improves verification efficiency, but also enhances the reliability and understandability of the results. Overall, through the four key steps of semantic analysis, feature learning, feature fusion and intelligent comparison, the problems of low efficiency and high resource consumption faced by traditional verification methods are effectively solved.

[0063] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 A flowchart of a method for verifying configuration files of an intelligent substation based on artificial intelligence provided in an embodiment of the present application;

[0065] Figure 2 A schematic diagram of a parallel processing flow of an artificial intelligence model provided in an embodiment of the present application;

[0066] Figure 3 A structural diagram of a neural network model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0068] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.

[0069] In addition, if there are descriptions involving the first, second, etc. in the embodiments of the present application, the descriptions of the first, second, etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as the first and second may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0070] Figure 1 The following schematically shows a flow chart of a method for checking configuration files of a smart substation based on artificial intelligence according to an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides an artificial intelligence-based smart substation configuration file verification method, which is applied to electronic equipment, and the electronic equipment is deployed with an artificial intelligence model. The method may include the following steps.

[0071] S110, in response to an input signal of the configuration file to be verified, extracting n character strings from the configuration file to be verified, and performing semantic analysis on each character string to obtain a semantic analysis result, where n is an integer greater than 1;

[0072] S120, extracting key features of the analysis results from the semantic analysis results, and performing feature learning on each key feature using a preset feature learning algorithm to obtain a high-level feature representation of each key feature;

[0073] S130, merging all high-level feature representations of the analysis results to obtain a feature set, wherein the feature set includes character frequency, word frequency, semantic vector, structural feature, and contextual association information;

[0074] S140: Input the feature set into the artificial intelligence model to obtain a calibration result between the configuration file to be verified and the preset reference configuration file.

[0075] In this embodiment, the electronic device can be a tablet computer, desktop computer, laptop computer, handheld computer, wearable device, notebook computer, ultra-mobile personal computer (UMPC), netbook computer, or other device with a processor. Of course, the electronic device can also be a server. The specific form of the electronic device is not particularly limited in this embodiment of the application.

[0076] In this embodiment, the artificial intelligence model is trained based on historical data and is used to verify the substation configuration file. The historical data includes historical verification configuration files and corresponding verification results. The trained artificial intelligence model can output verification results when the configuration file to be verified is input in real time. It should be noted that the input configuration file to be verified can be one or more, and this application does not limit this.

[0077] Upon receiving an input signal, the configuration file verification task is executed. The input signal indicates the configuration file that needs verification. This signal can be initiated manually by the user, for example, by selecting the file to be verified through the user interface and clicking a button component after completing a configuration file modification, before commissioning, or during a regular inspection. It can also be triggered by an automated process, such as automatically initiating the verification process upon detecting a configuration file version update.

[0078] In response to the input signal of the configuration file to be verified, n character strings of the configuration file to be verified are extracted, and each character string is semantically analyzed to obtain a semantic analysis result. Specifically, when the electronic device receives the input signal of the configuration file to be verified, the configuration file is first preprocessed, including file decoding, format recognition and preliminary cleaning. For configuration files in XML format, a DOM parser is used to load the file into memory to form a tree structure; for configuration files in SCL format, an IEC 61850 parser is used for processing. After the preprocessing is completed, the configuration file is segmented into n meaningful character string units based on its structural features. The segmentation method can be based on the natural delimiters of the configuration file (such as XML tags, node boundaries) or semantic boundaries (such as device description blocks, communication configuration blocks).

[0079] For large configuration files, a sliding window technique is used, and the window size is set to k (such as 1024 bytes). Each time the window is moved forward, a certain proportion (such as 20%) of the overlapping area is retained to ensure that the semantics across windows are not broken. Each extracted string then enters the semantic analysis process. First, lexical analysis is performed to identify basic elements such as keywords, parameter values, and identifiers in the configuration file. Then, syntactic analysis is performed. Based on the pre-defined substation configuration file grammar rule library, a syntax tree is constructed to capture the structural information of the string. Finally, semantic analysis is performed to identify entities such as equipment, parameters, and communication relationships described in the string and their mutual relationships by establishing an entity relationship diagram. The results of the semantic analysis include a structured semantic network, an entity relationship diagram, and a list of attributes of key configuration items.

[0080] The key features of the analysis results are extracted from the semantic analysis results, and the preset feature learning algorithm is used to perform feature learning on each key feature to obtain a high-level feature representation of each key feature. Specifically, multi-dimensional key features are first extracted from the semantic analysis results, including structural features, content features, and relationship features. Structural features reflect the organizational structure of the configuration file, such as node depth, number of sub-nodes, node type distribution, etc.; content features include the numerical range of parameter values, data types, and naming rule compliance; relationship features describe the logical associations between entities, such as the communication relationship between devices, the dependency relationship of protection functions, etc. For each type of feature, there is a corresponding feature extraction algorithm: structural features are calculated by recursively traversing the syntax tree; content features are extracted through statistical analysis and pattern matching; and relationship features are extracted from the semantic network through graph algorithms.

[0081] The extracted raw features are often high-dimensional and sparse, requiring feature learning to obtain a more compact and expressive representation. For textual features, pre-trained language models such as Word2Vec are used to map the technical terms and parameter descriptions in the configuration files into a low-dimensional dense vector space. For structural features, graph neural networks (GNNs) are used to learn structured representations of nodes. For numerical features, autoencoders are used for nonlinear dimensionality reduction, preserving key information while reducing redundancy. After feature learning is complete, each key feature is mapped to a high-dimensional vector that captures the essential attributes and implicit patterns of the original feature, providing a solid foundation for subsequent similarity calculations and anomaly detection.

[0082] All high-level feature representations from the analysis results are combined to form a feature set, which includes character frequency, word frequency, semantic vectors, structural features, and contextual information. Specifically, a multi-level feature fusion strategy is employed to integrate high-level feature representations of different dimensions into a unified feature set. First, each feature is normalized to eliminate dimensionality differences and make different features comparable during the fusion process. For character frequency features, the frequency of occurrence of each character in the configuration file is counted to construct a character distribution histogram. Spectral features are then extracted using a Fourier transform to capture periodic patterns in character usage. For word frequency features, the TF-IDF algorithm is used to calculate the importance weights of professional terms and key parameters in the configuration file, highlighting highly discriminative vocabulary. Semantic vector features are derived from the output of the language model in the previous step. Each keyword or phrase is mapped into a high-dimensional vector, preserving its position and relationship in the semantic space. Structural features include the configuration file's hierarchical depth, branching complexity, and node connectivity patterns, and are quantitatively represented using graph theory metrics such as centrality and clustering coefficient. Contextual association information describes the dependencies and logical constraints between configuration items and is extracted through conditional probability matrices or association rule mining algorithms.

[0083] During the feature fusion stage, a weighted fusion method based on an attention mechanism is employed to dynamically adjust the importance weights of various features. Specifically, a multi-head attention network is designed, with each attention head responsible for learning a correlation pattern between features. The outputs of these multiple heads are then combined to form a comprehensive feature representation. This fusion approach adaptively emphasizes the feature dimensions most valuable for the current profile verification while suppressing noise and redundant information. The fused feature set is a high-dimensional tensor that retains the rich information of the original features while maintaining structure and low redundancy, providing high-quality input data for subsequent AI models.

[0084] The feature set is input into the AI ​​model to generate a comparison result between the configuration file to be verified and the preset baseline configuration file. Specifically, the AI ​​model utilizes a deep learning architecture, consisting of three main components: a feature encoding layer, a comparison layer, and a decision layer. The feature encoding layer receives the fused feature set and further extracts high-level features through a multilayer perceptron network. Each layer is equipped with batch normalization and nonlinear activation functions to enhance the model's expressiveness and training stability. The comparison layer compares the features of the configuration file to be verified with the preset baseline configuration file. It utilizes a twin network architecture, with two weighted sub-networks processing the features of the verification file and the baseline file, respectively. Feature similarity is then calculated using metrics such as cosine similarity, Euclidean distance, or Manhattan distance. To account for the varying importance of different configuration file components, an attention mechanism is introduced to automatically learn weight coefficients for key configuration items. Based on the comparison results, the decision layer outputs multi-dimensional comparison results, including an overall similarity score, a list of abnormal configuration items, and a risk level assessment. Model training utilizes a multi-task learning framework, simultaneously optimizing the loss functions for similarity prediction, anomaly detection, and risk assessment. This improves overall performance through knowledge sharing across tasks. To address the diversity and complexity of configuration files, the model also integrates domain adaptation technology, automatically adjusting internal parameters based on different substation configuration files. Finally, the model not only outputs calibration results but also provides interpretable analysis, helping engineers understand the calibration process and the rationale behind the results through feature importance visualization and decision path tracing.

[0085] Compared with traditional string matching technology, this embodiment can understand the semantic content and structural relationships of configuration files, and is no longer limited to surface text matching, which greatly improves the accuracy and comprehensiveness of verification. Feature learning and fusion technology converts high-dimensional and sparse original features into low-dimensional and dense representations, significantly reducing computational complexity and memory requirements, making the verification of large-scale configuration files efficient and feasible. The intelligent comparison model based on deep learning can automatically identify key configuration items and potential risk points, and provide multi-dimensional verification results and explainability analysis, which not only improves the verification efficiency, but also enhances the reliability and comprehensibility of the results. Overall, through the four key steps of semantic analysis, feature learning, feature fusion and intelligent comparison, the problems of low efficiency and high resource consumption faced by traditional verification methods are effectively solved.

[0086] In one implementation of this embodiment, performing semantic analysis on each character string to obtain a semantic analysis result includes the following steps:

[0087] S210, performing word segmentation processing on each character string to obtain a word unit sequence;

[0088] S220, performing part-of-speech tagging on the word sequence to identify keywords, parameter values, and structure identifiers in the configuration file to be verified;

[0089] S230, based on a preset substation configuration file grammar rule library, perform syntactic analysis on the word sequence and construct a grammar tree;

[0090] S240, extracting the semantic structure and contextual relationship of the character string according to the syntax tree to construct a semantic network;

[0091] S250: Generate semantic analysis results based on the semantic network.

[0092] During the smart substation configuration file verification process, each extracted string must first undergo refined word segmentation, breaking down continuous character sequences into meaningful, minimal semantic units, or tokens. Because substation configuration files have a unique format and specialized terminology, traditional natural language word segmentation methods are difficult to directly apply. Therefore, a multi-strategy word segmentation approach is employed.

[0093] First, based on the rule-based word segmentation strategy, a special regular expression pattern is designed for the specific format features of the configuration file, such as XML tags, JSON key-value pairs, equal sign assignments, etc., to accurately identify the boundaries of these structured elements. For example, for an XML-formatted configuration file, it can identify '<Device name=QA1 type=Circuit Breaker> '. Secondly, based on the word segmentation strategy of the dictionary, a professional dictionary containing professional terms in the substation field, equipment names, parameter types, etc. is constructed, and professional terms in the text are identified through the maximum forward matching algorithm. The dictionary contains equipment names such as circuit breakers, mutual inductors, and protection devices, as well as parameter names such as rated voltage and rated current. Thirdly, based on the statistical word segmentation strategy, the n-gram model statistical method is used to learn the probability distribution of word boundaries and deal with unregistered words and ambiguous segmentation problems. For complex parameter descriptions or non-standard expressions, such as the range of overvoltage protection settings, they can be correctly segmented through statistical models. The word segmentation results include case unification, synonym replacement, abbreviation expansion, etc., to generate standardized word sequences.

[0094] Part-of-speech tagging is performed on word sequences to identify keywords, parameter values, and structure identifiers in the configuration file to be verified. Part-of-speech tagging is the process of assigning grammatical roles and semantic categories to each word based on word segmentation. A specialized part-of-speech tagging system was designed based on the characteristics of substation configuration files. This system includes several main categories, such as device (DEV), parameter (PARAM), value (VAL), unit (UNIT), operation (OP), and structure (STRUCT). Each main category also contains several subcategories. For example, the device category is subdivided into circuit breakers (DEV-CB), transformers (DEV-CT), and protection devices (DEV-PROT). Part-of-speech tagging uses a deep learning-based sequence tagging model, and a fine-tuned BERT-based model can be used for its specific implementation. The model input is a word sequence and its contextual information, and the output is the part-of-speech tag corresponding to each word.

[0095] Model training uses a large sample of labeled substation configuration files to optimize model parameters through supervised learning. Part-of-speech tagging results include not only the word's category label but also a confidence score, indicating the reliability of the tagging. Tagging results with low confidence are marked as pending for reference in subsequent processing.

[0096] Based on a pre-defined grammatical rule base for substation configuration files, grammatical analysis is performed on word sequences to construct a grammatical tree. Syntactic analysis aims to reveal the dependencies and hierarchical structure between word units, transforming linear word sequences into a tree-like grammatical representation. Substation configuration files have specific grammatical rules that differ from natural languages, necessitating the construction of a dedicated grammatical rule base. This rule base consists of three main components: First, basic grammatical rules, which describe the basic structural units of the configuration file, such as device definition (device type + device identifier + parameter list) and parameter definition (parameter name + assignment symbol + parameter value + [unit]). Second, domain-specific rules, which describe grammatical structures unique to the substation domain, such as communication mapping (source node + target node + data attribute). Third, constraint rules, which describe dependencies and value constraints between parameters, such as the requirement that rated voltage and rated current must be defined simultaneously and that time parameters must be non-negative. Syntactic analysis utilizes an improved graph-augmented attention network, which combines traditional dependency parsing with deep learning techniques.

[0097] In specific implementation, the labeled word sequence is first input into the network, and the long-distance dependencies between words are captured through a multi-layer self-attention mechanism. Then, a graph convolution layer is introduced to integrate preset grammatical rules as prior knowledge into the analysis process to guide the establishment of dependency relationships. Finally, a syntax tree is constructed in a bottom-up manner, where each non-leaf node represents a grammatical structure and the leaf nodes correspond to the original words. For complex configuration items, such as protection logic definitions, the syntax tree may have a multi-layer nested structure to accurately express logical conditions, action sequences, and temporal relationships. During the construction process, grammatical consistency is checked and sections that violate grammatical rules, such as missing parameters and type mismatches, are marked. The construction of the syntax tree makes the logical relationships and hierarchical structure of the configuration file clearly visible.

[0098] According to the syntax tree, the semantic structure and contextual relationship of the string are extracted to construct a semantic network. A semantic network is a graph structure used to represent the semantic relationships and interaction patterns between entities in a configuration file. The process of constructing a semantic network first extracts core entities and relationships from the syntax tree. Core entities include device entities (such as circuit breakers, transformers), parameter entities (such as rated values, protection settings), functional entities (such as protection functions, control logic), etc. The relationships between entities include subordinate relationships (devices contain parameters), reference relationships (logic references device status), mapping relationships (data is mapped to communication points), etc. The extraction process uses a depth-first traversal algorithm, starting from the root node of the syntax tree, recursively visiting each subtree to identify semantic entities and relationships.

[0099] After extraction, an initial semantic network is constructed, where nodes represent entities and edges represent relationships. Each node and edge is labeled with attributes describing its type, properties, and constraints. Next, semantic extension and context association are performed. Semantic extension involves supplementing implicit entities and relationships based on domain knowledge. For example, when a distance protection function is identified, domain knowledge can be used to infer that it requires voltage and current inputs, even if these are not explicitly stated in the configuration file. Context association involves establishing entity associations across different configuration sections, such as associating data points in the communication configuration with device parameters. This step utilizes a relational reasoning mechanism based on a graph attention network (GAT). Through multiple rounds of message passing, the node representation vectors are updated and the semantic associations between nodes are strengthened. To handle large configuration files, a hierarchical semantic network structure is introduced. The network is divided into multiple subgraphs, each representing a functional module or device unit. Interactions between subgraphs are represented by cross-graph connections. This hierarchical structure preserves detailed local semantics while capturing the global system architecture.

[0100] Generate semantic analysis results based on the semantic network. The semantic analysis results are a structured representation of the configuration file content, containing information from multiple dimensions to support subsequent feature extraction and comparison. The process of generating semantic analysis results first involves quantitative analysis of the semantic network and calculation of the following network feature indicators: node centrality (measures the importance of entities), calculated using the HITS algorithm; community structure (identifies functional modules or logical units), using preset community detection algorithms such as Louvain or InfoMap; path characteristics (describes the connection pattern between entities), including the shortest path length, the number of paths, etc.; network density and clustering coefficient (reflects the degree of network connection).

[0101] Based on the above network indicators, key entities and core relationships in the configuration file are identified. For example, nodes with high centrality usually represent key devices or parameters in the system, and densely connected subgraphs usually represent tightly coupled functional modules. Next, semantic classification and labeling are performed. For each entity node in the semantic network, a semantic category label such as core device, auxiliary parameter, etc. is assigned based on its attributes and context. The classification process adopts a semi-supervised classification method based on graph representation learning, such as graph convolutional network (GCN) or graph attention network (GAT). At the same time, the semantic similarity matrix between entities is calculated, and the cosine similarity metric is used to quantify the strength of the semantic association between entities.

[0102] Based on semantic classification and similarity, a hierarchical clustering tree of configuration items is constructed to reflect the organizational structure and attribution relationships between configuration items. Furthermore, abnormal pattern detection is performed to identify inconsistencies, redundancies, or missing components in the semantic network. Anomaly detection utilizes graph-based anomaly detection methods, such as autoencoders based on reconstruction errors. The resulting semantic analysis results are a multidimensional data structure containing information such as entity lists, relationship matrices, semantic categories, importance scores, and anomaly markers. These results are output in structured JSON or XML formats for easy subsequent processing. The semantic analysis results not only preserve the original information of the configuration file but also, through semantic enhancement and structured representation, provide richer and more valuable semantic knowledge, laying the foundation for feature extraction and intelligent comparison.

[0103] Compared with the traditional string matching-based method, this embodiment can understand the semantic content and structural relationships of the configuration file and is no longer limited to superficial text comparison. The word segmentation and part-of-speech tagging steps can accurately identify professional terms, parameter values ​​and structural identifiers in the configuration file, providing basic semantic units for subsequent analysis. The syntactic analysis step reveals the hierarchical structure and dependency relationships between configuration items by constructing a syntax tree. The semantic network construction step converts the linear text representation into a semantic representation of a graph structure, capturing the complex associations between entities. The semantic analysis result generation step provides rich semantic knowledge and structured representation through multi-dimensional quantitative analysis. This semantic analysis-based method can effectively handle the complexity and diversity of substation configuration files, provides a solid foundation for subsequent feature extraction and intelligent comparison, and significantly improves the accuracy and comprehensiveness of configuration file verification.

[0104] In one implementation of this embodiment, generating a semantic analysis result based on a semantic network includes the following steps:

[0105] S310, identifying entity nodes and relationship edges in the semantic network, and constructing a semantic representation model of the configuration file to be verified;

[0106] S320, calculating the centrality and importance weight of each entity node in the semantic network, and ranking all entity nodes based on the centrality and importance weight using a preset importance scoring function;

[0107] S330: Taking the top m physical nodes as key configuration items, where m is a preset positive integer;

[0108] S340, using a preset knowledge base, performing semantic reasoning on key configuration items to generate semantic categories;

[0109] S350: Calculate semantic similarity of key configuration items, and determine the relationship type between the key configuration items based on the similarity between the key configuration items;

[0110] S360: Integrate semantic categories and relationship types to obtain semantic analysis results.

[0111] Identify entity nodes and relationship edges in the semantic network and construct a semantic representation model for the configuration file to be verified. Specifically, entity nodes include four main categories: equipment entities (such as circuit breakers, transformers, and protection devices), parameter entities (such as rated voltage, current setting, and time constant), functional entities (such as overcurrent protection, distance protection, and automatic reclosing), and structural entities (such as logical nodes, data sets, and report control blocks). Each type of entity node has a specific set of attributes. For example, equipment entities have attributes such as model, manufacturer, and installation location, while parameter entities have attributes such as value, unit, and range. Relationship edges describe the semantic associations between entities, mainly including subordination relationships (such as devices containing parameters and functions depending on devices), reference relationships (such as logic referencing data points and protection functions referencing measured values), mapping relationships (such as mapping physical quantities to communication points), and constraint relationships (such as value constraints between parameters and mutual exclusion constraints between functions).

[0112] Each relationship edge carries attributes such as relationship type, directionality, and weight. To accurately identify these entities and relationships, a graph pattern matching-based approach is employed. A series of graph pattern templates, such as the star pattern (a central device node connecting multiple parameter nodes), the chain pattern (a protection logic chain), and the ring pattern (a data flow loop), are designed. A subgraph isomorphism algorithm is used to search for matching substructures in the semantic network. During the recognition process, a context-aware entity disambiguation algorithm is introduced to determine the exact semantic role of an entity in the current context based on its local network structure and global position.

[0113] After identifying entities and relationships, a semantic representation model for the configuration file is constructed. This model uses a multi-layered heterogeneous graph structure, consisting of an entity layer, a relationship layer, and an attribute layer. The entity layer contains all identified entity nodes, the relationship layer describes the various relationships between entities, and the attribute layer stores detailed attributes of entities and relationships.

[0114] The centrality and importance weight of each entity node in the semantic network are calculated. Based on these centrality and importance weights, all entity nodes are ranked using a pre-set importance scoring function. Centrality is a key metric in graph theory that measures the importance of a node in a network. In the semantic network of the substation configuration file, different types of centrality reflect the importance of entity nodes along different dimensions. First, degree centrality is calculated, which represents the number of directly connected neighbors of a node and reflects the entity's direct influence.

[0115] For directed graphs, we distinguish between in-degree centrality and out-degree centrality, which respectively reflect the frequency of an entity being referenced and the frequency of an entity referencing others. The calculation formula for degree centrality is:

[0116]

[0117] Among them, C D (v) is the degree centrality, d(v) is the degree of node v, and n is the total number of nodes in the network. For example, the current transformer node, which is frequently referenced by other protection functions, has a high in-degree centrality, indicating that it is a key data source.

[0118] Next, we calculate the closeness centrality, which measures the average distance between a node and all other nodes in the network, reflecting the accessibility of the entity in the entire system. The calculation formula for closeness centrality is:

[0119]

[0120] where d(v,u) is the shortest path length from node v to node u. For example, the main protection device located at the core of the profile usually has a high closeness centrality because it has direct or indirect connections with multiple system components.

[0121] The betweenness centrality is calculated again to measure the frequency of a node as a transit point for the shortest path between other pairs of nodes in the network, reflecting the entity's control over information flow. The calculation formula for betweenness centrality is:

[0122]

[0123] Among them, σ st is the number of shortest paths from node s to node t, σ st (v) is the number of shortest paths from s to t that passes through node v. For example, a communication gateway node that connects multiple functional modules usually has a high betweenness centrality because it controls the data exchange between different modules.

[0124] In addition, eigenvector centrality is calculated, which takes into account the importance of other nodes connected to a node and reflects the spread of influence of the entity in the network. Eigenvector centrality is based on a recursive definition: the importance of a node depends on the importance of its neighboring nodes. The calculation formula involves the eigenvalue equation:

[0125] Ax=λx;

[0126] Where A is the adjacency matrix, λ is the maximum eigenvalue, x is the corresponding eigenvector, and the eigenvector centrality of a node is the corresponding component in the eigenvector.

[0127] Finally, a multi-metric importance scoring function is used to combine various centrality metrics and domain-specific weighting factors to calculate the overall importance score for each entity node. The scoring function uses a weighted summation method, with weight coefficients determined empirically. Based on the calculated importance scores, all entity nodes are sorted in descending order to obtain a list of entities ranked by importance.

[0128] The top m ranked entity nodes are considered key configuration items, where m is a preset positive integer. The value of m can be determined in several ways: a fixed threshold method, where a fixed value is set based on experience, such as m = 50 or m = 100; a proportional threshold method, where the value is determined based on a certain proportion of the total number of entities in the configuration file, such as m = total number of entities × 10%; an adaptive threshold method, where the value is automatically determined based on the distribution characteristics of the importance scores, such as selecting entities with importance scores significantly above the average level; or a cumulative contribution rate method, where the value is selected for entities whose cumulative importance scores reach a certain proportion (e.g., 80%) of the total.

[0129] In practical applications, the adaptive threshold method can be combined with the cumulative contribution rate method, that is, first calculate the cumulative distribution function of the importance scores of all entity nodes, then find the position where the cumulative contribution rate reaches the preset threshold (such as 80%), and use the number of entities corresponding to this position as the m value. If the calculated m value is too large or too small, upper and lower limits can be set to constrain it to ensure that the m value is within a reasonable range. For example, for a configuration file containing 1,000 entity nodes, if the cumulative sum of the importance scores of the first 50 nodes has reached 85% of the total, and the system preset cumulative contribution rate threshold is 80%, then the m value can be set to 50. However, if the upper limit of the m value set by the system is 30, then m = 30 will be taken as the final value.

[0130] Using a preset knowledge base, semantic reasoning is performed on key configuration items to generate semantic categories. Semantic reasoning is the process of semantically interpreting and classifying key configuration items based on domain knowledge, and requires the use of a preset substation configuration knowledge base. This knowledge base includes multiple aspects such as equipment ontology, parameter specifications, functional models, and configuration rules. The equipment ontology layer describes the classification system, attribute characteristics, and relationships between various types of equipment in the substation. It is represented in the OWL format and includes a class hierarchy (e.g., protection device is a subclass of equipment, and overcurrent protection device is a subclass of protection device), attribute definitions (e.g., equipment model, manufacturer, rated parameters, etc.), and instance relationships (e.g., typical configurations of specific equipment models).

[0131] The parameter specification layer defines the value ranges, units, accuracy requirements, and default values ​​for various parameters, as well as the constraints between parameters, such as the inequalities that certain protection settings must satisfy. The functional model layer describes the implementation mechanisms, input-output relationships, and performance indicators of various substation functions, represented using a combination of function block diagrams and state machines. The configuration rule layer contains various rules that must be followed during the configuration process, such as compatibility rules, security rules, and optimization rules, represented using production rules (if-then form). Based on this knowledge base, the semantic reasoning process first performs entity matching, matching key configuration items with conceptual entities in the knowledge base to determine their position within the knowledge system. This matching utilizes a multi-strategy fusion approach, including exact matching (based on exact matching of identifiers or names), fuzzy matching (approximate matching based on string similarity), and semantic matching (based on similarity matching of semantic vectors). After entity matching, relational reasoning is performed to infer potential implicit relationships between key configuration items based on the relational patterns defined in the knowledge base.

[0132] Relational reasoning uses a rule-based reasoning engine, applying logical rules such as transitivity and symmetry, as well as domain-specific reasoning rules. For example, if configuration item A is a parameter of device X, and configuration item B is a parameter of device Y, and the knowledge base defines a master-slave relationship between devices X and Y, then a parameter correspondence between configuration items A and B can be inferred. Based on the results of entity matching and relational reasoning, a semantic category label is assigned to each key configuration item. A semantic category is an abstract description of the semantic role and functional characteristics of a configuration item, encompassing multiple dimensions such as functional category, importance category, security level, and configuration difficulty. Semantic category assignment utilizes a combination of rule-based and machine learning approaches. The rule-based approach directly applies classification rules from the knowledge base, while the machine learning approach trains classification models, such as support vector machines, based on historical data. Ultimately, each key configuration item is assigned a set of semantic category labels, forming a multi-dimensional semantic description.

[0133] Calculate semantic similarity for key configuration items and, based on the similarity between them, determine the type of relationship between them. Semantic similarity quantifies the degree of semantic association between key configuration items, providing a basis for identifying the type of relationship between them. Semantic similarity can be calculated using the cosine similarity algorithm, which calculates the similarity score between each pair of vectors. Scores typically range from -1 to 1 or 0 to 1, with scores closer to 1 indicating greater semantic similarity.

[0134] Based on the calculated semantic similarity, a threshold method or clustering method is used to determine the relationship type between key configuration items. Relationship types include equivalence relationships (configuration items with identical functions), complementarity relationships (configuration items with complementary functions), dependency relationships (one configuration item depends on another), and conflict relationships (configuration items with potentially conflicting configuration values). For example, a similarity greater than 0.95 indicates an equivalence relationship, 0.78 less than or equal to 0.95 indicates a complementarity relationship, 0.60 less than or equal to 0.78 indicates a dependency relationship, and a similarity less than or equal to 0.60 that satisfies specific conflict rules indicates a conflict relationship. If the similarity is 0.80, within the interval (0.78, 0.95), it indicates that the key configuration items complement each other functionally.

[0135] Semantic categories and relationship types are integrated to produce semantic analysis results. The semantic analysis results are a structured representation of the core semantic content of the configuration file. The integration process begins by constructing a semantic structure graph, a multi-level directed graph structure in which nodes represent key configuration items and edges represent relationships between configuration items. Both nodes and edges carry attribute labels describing their semantic characteristics and relationship types. The semantic structure graph is constructed using a hierarchical layout strategy, grouping configuration items according to functional modules, device types, or system levels to form a clear hierarchical structure. For example, configuration items related to protection functions can be grouped together, and configuration items related to communication configurations can be grouped together. Each group can then be further subdivided according to specific functions or devices. The graph layout algorithm uses force-directed layout or hierarchical layout methods to ensure visual clarity and aesthetics.

[0136] The constructed semantic structure diagram not only displays the characteristics of the configuration items themselves, but also the various relationships between them. Next, semantic aggregation analysis is performed. Based on the semantic structure diagram, a series of aggregation indicators are calculated to describe the overall semantic characteristics of the configuration file. These indicators include: functional coverage, which indicates the scope and completeness of the functions covered by the configuration file; structural complexity, which indicates the complexity of the relationships between configuration items; consistency index, which indicates the degree of semantic consistency between configuration items; redundancy, which indicates the degree of information redundancy in the configuration file; and critical path, which indicates the most important functional links in the configuration file. These aggregation indicators are calculated using graph algorithms. For example, functional coverage can be obtained by calculating the coverage ratio of semantic categories, structural complexity can be calculated by the average degree or clustering coefficient of the graph, and consistency index can be evaluated by the connectivity or community structure of the graph.

[0137] Based on the semantic structure diagram and aggregation indicators, a semantic summary is generated, which is a concise summary of the core content of the configuration file. The semantic summary includes a list of key configuration items, descriptions of major functional modules, descriptions of key relationships, and abnormal point markings. Summary generation uses template-based natural language generation technology to convert structured semantic information into easy-to-understand text descriptions. For example, for a protection configuration file, the semantic summary may include that the configuration file defines five protection functions, including overcurrent protection, distance protection, and differential protection, among which there is functional overlap between overcurrent protection and distance protection, and coordinated settings may be required. Finally, the semantic structure diagram, aggregation indicators, and semantic summary are combined into a complete semantic analysis result and output in a structured data format (such as JSON or XML).

[0138] This embodiment constructs a semantic representation model of the configuration file by identifying entity nodes and relationship edges in the semantic network, laying the foundation for subsequent analysis. By calculating the centrality and importance weight of the entity nodes and sorting them using a preset scoring function, the importance of the configuration items is quantified. Then, the top m entity nodes are selected as key configuration items to ensure the focus and efficiency of the analysis. Next, semantic reasoning is performed on the key configuration items using the preset knowledge base to generate multi-dimensional semantic category labels. Subsequently, the relationship types between the key configuration items are determined through semantic similarity calculation, revealing the semantic connection between the configuration items. Finally, the semantic categories and relationship types are integrated to generate a complete semantic analysis result including a semantic structure diagram, aggregation indicators and semantic summaries. Compared with the traditional text matching-based method, this semantic network-based analysis method can more deeply understand the semantic content and structural relationships of the configuration file, providing a richer and more accurate semantic basis for subsequent configuration file verification and analysis, and significantly improving the intelligence level and accuracy of the smart substation configuration file verification.

[0139] In one implementation of this embodiment, the artificial intelligence model is a neural network model or a support vector machine model. Inputting the feature set into the artificial intelligence model to obtain a calibration result of the configuration file to be calibrated and the preset reference configuration file includes the following steps:

[0140] S410: When the artificial intelligence model is a neural network model, input the feature set into a multilayer perceptron network, and obtain a high-dimensional representation of the feature vector through forward propagation calculation;

[0141] S420, performing feature weighting on the high-dimensional representation through the attention layer to obtain a weighted feature representation;

[0142] S430, calculating similarity between the weighted feature representation and the feature representation of the preset reference configuration file to obtain a file similarity rate;

[0143] S440, identifying abnormal patterns in the feature representation through the abnormality detection layer to obtain abnormal item recognition results;

[0144] S450: Calculate a risk level assessment result through the risk assessment layer based on the file similarity and the abnormal item identification result, wherein the proofreading result includes the file similarity, the abnormal item identification result, and the risk level assessment result;

[0145] S460: When the artificial intelligence model is a support vector machine model, mapping the feature set to a high-dimensional feature space through a kernel function;

[0146] S470, in the high-dimensional feature space, inputting the feature set into multiple binary classification support vector machines respectively to obtain multiple output results;

[0147] S480, integrating the output results of all binary support vector machines and determining an abnormal item recognition result;

[0148] S490: Determine the file similarity based on the abnormal item identification result, wherein the proofreading result includes the abnormal item identification result and the file similarity.

[0149] like Figure 2 As shown in the figure, when the artificial intelligence model is a neural network model, the feature set is input into the multi-layer perceptron network, and the high-dimensional representation of the feature vector is obtained through forward propagation calculation. The multi-layer perceptron network is a feedforward neural network consisting of an input layer, multiple hidden layers, and an output layer, which can effectively learn the nonlinear relationship between features. Figure 3 In this implementation, the feature set first undergoes preprocessing, including normalization and standardization, to ensure that features of different dimensions are treated fairly by the network. Normalization is used to map feature values ​​to the range [0, 1]. The preprocessed feature set is organized into a feature vector. The architecture of the multilayer perceptron network consists of an input layer (with nodes equal to the feature dimension n), three hidden layers (with nodes of 512, 256, and 128, respectively), and an output layer (with 64 nodes, representing the dimension of the high-dimensional representation). The hidden layers use the ReLU activation function to introduce nonlinearity and avoid the vanishing gradient problem. To enhance the network's generalization capability, a dropout layer is added after each hidden layer to randomly discard a certain percentage (typically 20%) of the neuron outputs to prevent overfitting. Through this multi-layer structure, the network is able to extract abstract representations of features layer by layer, from low-level features (such as the attributes of a single configuration item) to high-level features (such as the relationship patterns between configuration items). Ultimately, a 64-dimensional high-dimensional representation vector Z is obtained. This vector captures the core semantic information and structural characteristics of the original feature set, providing a foundation for subsequent attention mechanisms and similarity calculations.

[0150] The high-dimensional representation is passed through the attention layer to perform feature weighting to obtain a weighted feature representation. In this embodiment, a self-attention mechanism is used to enable the model to learn the relationships between the various dimensions within the feature vector. The core idea of ​​the self-attention mechanism is to calculate the correlation between each element in the feature vector and all elements, and weight them based on these correlations. The specific implementation uses scaled dot product attention: first, the high-dimensional representation vector is transformed through three different linear transformations to obtain a query vector (Query), a key vector (Key), and a value vector (Value). Then, the dot product of the query vector and the key vector is calculated, and the scaled and normalized results are obtained to obtain the attention weight. To further improve the expressive power of the attention mechanism, multi-head attention technology is used. The attention mechanism is executed multiple times in parallel (usually 8 heads), each time using a different linear transformation, and the results are then spliced ​​together. Multi-head attention allows the model to focus on different subspaces of the feature space simultaneously, capturing richer feature relationships. The output of the attention layer is a vector with the same dimensions as the input, but the value of each dimension has been weighted according to its importance in the overall profile. Through the attention mechanism, the model can automatically identify key features and important configuration items in the configuration file, and give them higher weights in subsequent analysis, thereby improving the accuracy and pertinence of the verification.

[0151] The weighted feature representation is then compared to the feature representation of a preset baseline configuration file to obtain a file similarity. In this embodiment, the feature representation of the preset baseline configuration file is first obtained. The baseline configuration file is a standard configuration file, typically derived from a successfully deployed project or a standard template provided by the device manufacturer. The baseline configuration file also undergoes feature extraction, multi-layer perceptron network processing, and attention layer weighting to obtain its weighted feature representation.

[0152] To comprehensively assess the similarity between two configuration files, we use multiple similarity metrics and perform a weighted fusion. First, cosine similarity calculates the cosine of the angle between two vectors, ranging from -1 to 1, with larger values ​​indicating greater similarity. Second, Euclidean distance calculates the distance between two vectors in Euclidean space. This distance is normalized and converted to similarity, ensuring it falls within the range of 0 to 1. The final file similarity is a weighted average of the cosine similarity and the Euclidean distance, with the weighting factor determined manually. The resulting file similarity is a numerical value within the range of 0 to 1, typically converted to a percentage, such as 85.7%, indicating the overall similarity between the configuration file to be verified and the baseline.

[0153] The anomaly detection layer identifies abnormal patterns in the feature representation and obtains anomaly identification results. Anomaly detection is used to identify configuration items in the configuration file that deviate from the normal pattern. These anomalies may be misconfigurations, incompatible settings, or security risks. In this embodiment, the anomaly detection layer uses a deep autoencoder structure, which consists of two parts: an encoder and a decoder. It can learn the normal pattern of the data and detect anomalies that deviate from this pattern. The encoder compresses the weighted feature representation into a low-dimensional latent space, and the decoder attempts to reconstruct the original features from the latent representation. The encoder consists of three fully connected layers with dimensions of 64→32→16, each followed by a ReLU activation function and batch normalization; the decoder also consists of three fully connected layers with dimensions of 16→32→64, and the structure is symmetrical to the encoder. The training goal of the autoencoder is to minimize the reconstruction error, that is, the mean squared error between the original features and the reconstructed features.

[0154] The autoencoder is trained on a large number of normal configuration files to learn the characteristic distribution of normal configurations. During the detection phase, the reconstruction error of the feature representation of the configuration file to be verified is calculated. If the error exceeds a preset threshold, an anomaly is considered to be present. The output of anomaly detection is a list of anomaly items. Each anomaly item contains the identifier of the abnormal configuration item, the anomaly type, the degree of anomaly (severe, moderate, minor), and a description of the anomaly. Anomaly types include value anomalies (configuration values ​​outside the normal range), relationship anomalies (the relationship between configuration items does not conform to the specification), and structural anomalies (the configuration structure is incomplete or redundant). The results of anomaly identification provide an important basis for subsequent risk assessment and are the core content of the configuration file verification report.

[0155] Based on the file similarity and the abnormal item identification results, the risk level assessment results are calculated through the risk assessment layer, wherein the proofreading results include the file similarity, the abnormal item identification results and the risk level assessment results. The risk assessment layer is used to comprehensively evaluate the risks existing in the configuration file and give an overall risk level judgment. In this embodiment, each identified abnormal item is given a risk score, and the scoring takes into account the following factors: abnormality severity, which indicates the severity of the consequences that the abnormality may cause, and is divided into four levels: fatal (10 points), serious (7 points), medium (4 points) and minor (1 point); abnormality probability, which indicates the possibility of the abnormality being triggered in actual operation, and is divided into three levels: high (10 points), medium (5 points) and low (1 point); impact range, which indicates the system range that the abnormality may affect, and is divided into three levels: global (10 points), module (5 points) and local (1 point).

[0156] The risk level assessment results include the overall risk level, risk score, and a list of major risk points (the top five anomalies sorted in descending order by risk score). The final proofreading result is a comprehensive report consisting of three main sections: File Similarity, presented as a percentage, indicating the overall similarity between the configuration file to be verified and the baseline configuration file; Anomaly Identification Results, detailing all detected anomaly configuration items and their characteristics; and Risk Level Assessment Results, providing an overall risk assessment of the configuration file.

[0157] When the AI ​​model is a support vector machine model, the feature set is mapped to a high-dimensional feature space through a kernel function. Support vector machines are used to handle complex classification problems in high-dimensional feature spaces. In the configuration file verification scenario, the SVM model can be used as an alternative or supplement to the neural network model, especially when training data is limited, and its performance is more stable. First, the feature set is preprocessed, including missing value processing, outlier detection, and feature standardization. Missing value processing uses mean / median filling or K-nearest neighbor filling based on similar samples; outlier detection uses the Z-score method to truncate or replace values ​​outside the normal range; feature standardization uses Z-score standardization to ensure that all features are on a similar scale.

[0158] The core idea of ​​SVM is to find an optimal hyperplane so that samples of different categories are separated by the maximum interval. However, in complex problems such as profile verification, data is usually not linearly separable, and features need to be mapped to a higher-dimensional space through a kernel function so that they become linearly separable in the high-dimensional space. Commonly used kernel functions include: linear kernel, polynomial kernel, radial basis function, sigmoid kernel, etc. In this embodiment, the RBF kernel is mainly used because it can effectively handle the nonlinear relationship in the profile features, and there is only one main parameter that needs to be adjusted, which simplifies the model selection process. The selection of the kernel function and parameter optimization are performed through grid search combined with cross-validation to ensure the generalization ability of the model. Through the kernel function mapping, the feature vector X in the original feature space is implicitly mapped to a high-dimensional feature space, in which configuration features of different categories are more easily separated. It is worth noting that SVM allows the inner product in the high-dimensional space to be calculated directly through the kernel function without explicitly calculating the high-dimensional mapping, which greatly improves the computational efficiency.

[0159] In the high-dimensional feature space, the feature set is input into multiple binary support vector machines respectively to obtain multiple output results. In this embodiment, a one-to-many strategy is adopted to train a binary SVM model for each anomaly type, and each model is responsible for judging whether the configuration item belongs to a specific anomaly type. Common anomaly types include: value out-of-bounds anomaly (configuration parameter value exceeds the reasonable range), relationship conflict anomaly (logical conflict between configuration items), structure missing anomaly (incomplete configuration structure), redundant configuration anomaly (there are unnecessary repeated configurations), format error anomaly (configuration format does not meet the specifications), etc. For each anomaly type i, a binary SVM model is trained, and the decision function of the model is:

[0160]

[0161] Among them, m is the number of training samples, α j is the Lagrange multiplier, y j ∈{-1, 1} is the training sample X j The decision function outputs a label (1 for anomaly type, -1 for non-anomaly), K is the kernel function, and b is the bias term. A 1 indicates that an anomaly of that type has been detected, while a -1 indicates that an anomaly of that type has not been detected. In this way, each binary SVM model can accurately detect anomalies of a specific type and output an anomaly type label and an anomaly severity score.

[0162] The outputs of all binary support vector machines are integrated to determine the anomaly identification result. In this embodiment, the integration process adopts a multi-level strategy. First, for each configuration item, the outputs of all binary SVM models are collected, including the class label (1 for abnormal, -1 for normal) and the decision value (the distance to the decision boundary). Then, a voting mechanism is used to determine whether the configuration item is an anomaly: if at least one model outputs an abnormal label, it is preliminarily determined to be an anomaly; if multiple models output abnormal labels, the probability of an anomaly is higher. To resolve potential conflicts between different anomaly types, a rule-based conflict resolution mechanism is introduced. For example, if a configuration item is simultaneously identified as a value out-of-bounds anomaly and a format error anomaly, the format error anomaly is prioritized because the format error may cause value parsing errors. The conflict resolution rules are formulated based on domain knowledge and the causal relationship between anomaly types, forming a priority matrix to guide decision-making in conflict situations. For configuration items identified as anomalies by multiple models, the primary anomaly type needs to be determined. This method uses a decision value-based approach: the anomaly type corresponding to the model with the largest absolute decision value is selected as the primary type, as a larger decision value indicates a higher classification confidence. At the same time, all identified anomaly types are recorded as secondary anomaly types. The final anomaly identification result is a structured list. Each anomaly item contains the following information: configuration item identifier (such as XML path or configuration key name), primary anomaly type, secondary anomaly type (if any), anomaly confidence, and an anomaly description (a text description generated based on the anomaly type). Anomalies are sorted in descending order of confidence, allowing users to prioritize high-confidence anomalies.

[0163] Based on the abnormal item identification results, the file similarity is determined. The proofreading results include the abnormal item identification results and the file similarity. In the case of the support vector machine model, the calculation of the file similarity is different from that of the neural network model. In this embodiment, the file similarity = 1 - the number of abnormal items / the total number of configuration items.

[0164] This implementation method maps the feature set to a high-dimensional feature space through a kernel function, so that complex nonlinear relationships can be effectively captured. In the high-dimensional space, multiple specialized binary support vector machines detect different types of anomalies respectively, forming a fine-grained anomaly recognition system. Through a scientific integration method, the output results of each classifier are organically combined, which not only improves the accuracy of anomaly recognition, but also enhances the robustness of the model. Finally, based on the abnormal item recognition results, a weighted calculation method is used to determine the file similarity, which can effectively identify various types of anomalies and errors, providing a strong guarantee for the safe and stable operation of the power system. Compared with traditional methods, it not only improves the accuracy and recall rate of verification, but also greatly reduces the need for manual intervention, realizing the intelligent and efficient verification of substation configuration files.

[0165] In one implementation of this embodiment, merging all high-level feature representations of the analysis results to obtain a feature set includes the following steps:

[0166] S510. Based on the attention mechanism, all high-level feature representations of the analysis results are merged to obtain a feature set.

[0167] In this embodiment, the process of merging all high-level feature representations of the analysis results to obtain a feature set is mainly achieved by a method based on the attention mechanism. Specifically, in step S510, all high-level feature representations of the analysis results are merged based on the attention mechanism to obtain a feature set.

[0168] First, high-level feature representations from different analysis modules are collected. Each high-level feature representation can be represented in vector form. To facilitate subsequent processing, these feature representations of different dimensions are first mapped to the same dimensional space through linear projection. Next, the attention mechanism is used to perform weighted merging of these feature representations. The core idea of ​​the attention mechanism is to calculate the importance weight of each feature representation, and then perform weighted summation based on these weights. In this embodiment, the self-attention mechanism is used to implement this process. First, the query vector (Query), key vector (Key) and value vector (Value) are calculated for each feature representation:

[0169] Q i =W Q H i '

[0170] K i =W K H i '

[0171] V i =W V H i ';

[0172] Where W Q 、W K and W V are the linear transformation matrices of query, key and value respectively, which are also learned through training. Then, the attention weight matrix is ​​calculated:

[0173]

[0174] Where n is the total number of feature representations, Is a scaling factor used to prevent the gradient from disappearing due to excessive dot product results. ij It indicates the degree of attention that the i-th feature represents to the j-th feature.

[0175] Based on the calculated attention weights, the value vectors are weighted summed to obtain the context vector for each feature representation:

[0176]

[0177] Finally, all processed feature representations are weighted averaged or concatenated to obtain the final feature set:

[0178]

[0179] where w i is the weight of each feature representation. This can be calculated using an additional attention layer or set to a fixed value (e.g., equal weight). By combining high-level feature representations based on the attention mechanism, we can adaptively capture the correlations between different features, highlight the contributions of important features, and suppress the interference of irrelevant features, resulting in a richer and more effective feature set. Compared to simple feature concatenation or averaging, this approach can better preserve useful information and improve the performance of subsequent tasks.

[0180] This implementation improves the quality and expressiveness of feature representation by adaptively learning the importance weights between features, highlighting key information and suppressing redundancy and noise. The introduction of a multi-head attention mechanism further enhances the model's ability to capture complex relationships, enabling the feature fusion process to simultaneously focus on different aspects of information.

[0181] In one implementation of this embodiment, after all high-level feature representations of the analysis results are combined to obtain a feature set, the following steps are further included:

[0182] S610, determining a feature distribution of the configuration file to be verified based on the feature set;

[0183] S620, dynamically adjusting the processing order of the comparison strategy in the artificial intelligence model for high-level feature representations based on the feature distribution;

[0184] S630. Optimize the model parameters and comparison strategy of the artificial intelligence model based on the model confidence output by the artificial intelligence model.

[0185] After merging all high-level feature representations of the analysis results to obtain a feature set, this embodiment further includes determining the feature distribution of the configuration file to be verified based on the feature set. The feature set is the high-level feature representation merged based on the attention mechanism in the aforementioned step S510, denoted as F∈R d , where d is the feature dimension.

[0186] In order to determine the feature distribution of the configuration file to be verified, it is necessary to first perform statistical analysis on the feature set. The determination of feature distribution mainly includes the central tendency, dispersion, distribution shape and correlation between features. Specifically, for each dimension F in the feature set i , calculate its mean μ i , standard deviation σ i , skewness S i and kurtosis K i :

[0187]

[0188] Where n is the number of samples, F i,j In addition, it is also necessary to calculate the correlation coefficient matrix R between features, where the element R ij Represents the Pearson correlation coefficient between feature i and feature j:

[0189]

[0190] Determining the feature distribution not only helps to understand the intrinsic structure and characteristics of the data, but also guides the optimization of subsequent processing steps and improves the adaptability and accuracy of the model.

[0191] Based on the feature distribution, the AI ​​model's comparison strategy dynamically adjusts the order in which high-level feature representations are processed. The comparison strategy refers to the method used in the AI ​​model to compare and match different high-level feature representations. This dynamic adjustment of the processing order, based on the feature distribution information determined in the previous step, aims to improve the model's efficiency and accuracy.

[0192] First, the features are ranked based on their information gain or importance score. Information gain can be measured by calculating the mutual information between the features and the target variable:

[0193]

[0194] Where X is the feature variable, Y is the target variable, p(x,y) is the joint probability distribution, and p(x) and p(y) are the marginal probability distributions. The higher the mutual information, the greater the contribution of the feature to the predicted target.

[0195] Based on feature importance ranking, the following strategies can be used to dynamically adjust the processing order: prioritizing high-importance features allows for faster acquisition of key information and accelerated decision-making. Specifically, an importance threshold can be set. Features with an importance greater than the threshold are allocated more computing resources or processed earlier. Dynamically adjusting the processing order optimizes the allocation of computing resources and improves the model's responsiveness and accuracy. A reasonable processing order can significantly improve system performance, particularly when processing large-scale data or in real-time applications. Furthermore, dynamic adjustment can adapt to changes in data distribution, enhancing the model's robustness and adaptability.

[0196] Optimize the model parameters and comparison strategies of AI models based on the model confidence level output by the AI ​​model. Model confidence reflects the model's confidence in its predictions and is an important basis for evaluating model performance and guiding optimization.

[0197] The confidence score is usually a probability value or a calibrated uncertainty estimate output by the model. For classification tasks, the confidence score can be the probability value output by the softmax function:

[0198]

[0199] where z i is the original output of the model for category i, and K is the total number of categories.

[0200] In this embodiment, decision points with confidence levels less than a preset threshold are first identified; for decision points with confidence levels less than the preset threshold, corresponding configuration rules and cases are retrieved from a preset substation configuration file knowledge base; based on the retrieved configuration rules and cases, an enhanced feature representation of the decision point is constructed; the enhanced feature representation is re-input into the artificial intelligence model to obtain an updated proofreading result; the proofreading results before and after the update are compared, and the sensitivity index of the model parameters is calculated; based on the sensitivity index, the model parameters of the artificial intelligence model are optimized using a gradient descent algorithm; based on the optimized model parameters, the comparison strategy of the artificial intelligence model is updated, and the comparison strategy includes feature weight allocation, similarity calculation method, and anomaly detection threshold.

[0201] This implementation achieves adaptive optimization and performance improvement of artificial intelligence models through a technical solution that determines the feature distribution of the configuration file to be verified based on the feature set, dynamically adjusts the processing order of the comparison strategy, and optimizes model parameters and comparison strategies based on the confidence distribution. Dynamic adjustment of the processing order optimizes the allocation of computing resources and improves the response speed and efficiency of the model; optimization based on the confidence distribution enhances the accuracy and reliability of the model. This not only improves the adaptability of the model in complex environments, but also enhances the interpretability and credibility of decisions. Especially in scenarios where data distribution changes dynamically, this solution can capture distribution changes in a timely manner and make corresponding adjustments to maintain the stability and effectiveness of model performance.

[0202] In one implementation of this embodiment, dynamically adjusting the order in which the comparison strategy in the artificial intelligence model processes high-level feature representations includes the following steps:

[0203] S710, calculating the information entropy and mutual information represented by each high-level feature in the feature set;

[0204] S720. Construct at least one feature importance ranking based on information entropy and mutual information.

[0205] S730. Randomly determine a feature importance ranking from at least one feature importance ranking as a feature processing priority queue;

[0206] S740, adjusting the processing order of high-level feature representations in the artificial intelligence model according to the feature processing priority queue;

[0207] S750. During the processing of the feature processing priority queue by the artificial intelligence model, the contribution of each high-level feature representation to the verification result is monitored in real time, and the feature processing priority queue is updated in real time according to the contribution, until all feature importance rankings are processed as feature processing priority queues by the artificial intelligence model.

[0208] In this embodiment, if all feature importance rankings are processed, if the contribution is less than the preset contribution threshold, the original priority queue is updated instead of changing the feature importance ranking.

[0209] Calculate the information entropy and mutual information for each high-level feature representation in the feature set. The feature set is the set of high-level feature representations obtained by merging the previous steps, and contains multiple feature dimensions. Information entropy is a measure of feature uncertainty or information content, while mutual information measures the correlation between the feature and the target variable. For each high-level feature representation in the feature set, its information entropy must first be calculated. For discrete features, the formula for calculating information entropy is:

[0210]

[0211] Among them, X is the characteristic variable, p(x i ) is the characteristic value x i The higher the information entropy value, the greater the uncertainty of the feature and the more information it contains.

[0212] Calculate the mutual information between each feature and the target variable. Mutual information measures the degree of mutual dependence between two variables and is calculated as:

[0213]

[0214] Where X is the feature variable, Y is the target variable, p(x, y) is the joint probability distribution, and p(x) and p(y) are the marginal probability distributions. A higher mutual information value indicates a stronger correlation between the feature and the target variable, and a greater contribution of the feature to the predicted target. By calculating information entropy and mutual information, we can comprehensively assess the information content and predictive power of a feature, providing a basis for subsequent feature importance ranking.

[0215] At least one feature importance ranking is constructed based on the information entropy and mutual information. Feature importance ranking refers to ranking features according to their importance. Based on the information entropy and mutual information calculated in step S710, multiple different feature importance rankings can be constructed.

[0216] First, feature importance ranking can be constructed directly based on mutual information. Higher mutual information values ​​indicate a stronger correlation between the feature and the target variable, so features can be sorted from high to low by mutual information value. This ranking method is simple and intuitive, and can quickly identify features that are highly correlated with the target variable. Second, feature importance ranking can be constructed by combining information entropy and mutual information. The information gain ratio is a commonly used combination method. It is defined as the ratio of mutual information to feature information entropy. The information gain ratio takes into account the information content of the feature itself and can balance the advantage of high-entropy features in mutual information calculation.

[0217] In other embodiments, in order to increase the diversity of sorting, randomness can be introduced or multiple sorting methods can be integrated. For example, features can be randomly sub-sampled and importance rankings can be calculated on different feature subsets; or the original data can be sampled and sorting can be constructed on different data subsets. The above method can generate multiple feature importance sortings with differences, increasing the robustness and exploratory nature of subsequent processing. By constructing multiple feature importance sortings, the importance of features can be evaluated from different angles, avoiding the deviation that may be caused by a single sorting method, and providing a more comprehensive priority reference for subsequent feature processing.

[0218] A feature importance ranking is randomly determined from at least one feature importance ranking as a feature processing priority queue. The feature processing priority queue determines the order in which the AI ​​model processes high-level feature representations, significantly impacting the model's efficiency and performance. The process of randomly selecting a feature importance ranking can employ equal-probability random selection, i.e., randomly selecting one from all available feature importance rankings with equal probability.

[0219] After determining the feature importance ranking, it is converted into a feature processing priority queue. Each element in the queue corresponds to a high-level feature representation, and the order of the elements represents the feature's processing priority. The queue can be implemented as an array, linked list, or priority queue, depending on specific needs. Randomly determining the feature processing priority queue introduces diversity in the processing order, preventing the model from falling into local optima and helping to discover potentially more optimal processing orders.

[0220] According to the feature processing priority queue, the processing order of high-level feature representation in the artificial intelligence model is adjusted, so that the previously determined feature processing priority queue is applied to the actual model processing flow, and the dynamic adjustment of the processing order of high-level feature representation is realized.

[0221] When the AI ​​model is a neural network model, the processing order can be adjusted through attention mechanisms or feature gating. For example, attention weights can be designed based on priority queues so that the model pays more attention to high-priority features:

[0222] When the AI ​​model is a support vector machine model, feature weighting can be used to adjust the importance of different features. Features with higher priority can be given greater weights to enhance their influence in the decision-making process:

[0223]

[0224] Among them, w i is feature x i The weight of the feature can be adjusted according to the priority of the feature.

[0225] By adjusting the processing order based on the feature processing priority queue, the model can more efficiently utilize features with high information content and strong relevance to the target, improving processing efficiency and prediction accuracy. This dynamic adjustment mechanism also enables the model to adapt to different data distributions and task requirements.

[0226] As the AI ​​model processes the feature processing priority queue, it monitors the contribution of each high-level feature representation to the verification result in real time and updates the feature processing priority queue in real time based on the contribution until all feature importance rankings are processed by the AI ​​model as a feature processing priority queue. In this embodiment, if all feature importance rankings are processed and the contribution is less than a preset contribution threshold, the original priority queue is updated rather than changing the feature importance ranking.

[0227] Based on the monitored contribution, the feature processing priority queue is updated in real time. The update method can be to directly reorder based on contribution, or to locally adjust the existing queue. For example, the idea of ​​bubble sort can be used to move features with high contribution but low priority to the front of the queue. After all pre-built feature importance rankings are processed, if the feature contribution is less than the preset contribution threshold, the original priority queue needs to be updated instead of replacing the new feature importance ranking. Updating the original priority queue can be achieved by following the steps below:

[0228] S1. Calculate the latest contribution of each feature in the current queue;

[0229] S2. Re-rank the features according to their contribution;

[0230] S3. Adjust the sorting results, taking into account the dependencies between features and processing efficiency;

[0231] S4. Use the adjusted order as the new priority queue.

[0232] Preset contribution thresholds can be determined based on historical data analysis or adjusted dynamically. By monitoring and updating the feature processing priority queue in real time, the model can adaptively adjust its processing strategy, prioritizing features that contribute most to the results, improving processing efficiency and prediction accuracy. Furthermore, after all preset orderings have been tried, updating the original queue rather than simply replacing it allows for better utilization of acquired empirical knowledge while maintaining exploratory capabilities.

[0233] This implementation method realizes intelligent dynamic optimization of the feature processing process through steps such as information entropy and mutual information calculation, feature importance ranking construction, random determination of processing priority queues, adjustment of processing order, and real-time monitoring and updating. The real-time monitoring and updating mechanism enables the model to adaptively adjust the processing strategy, giving priority to high-contribution features, while controlling the update strategy through the contribution threshold, and maintaining the optimization capability after all rankings have been processed. This dynamic adjustment mechanism significantly improves the processing efficiency, prediction accuracy and adaptability of the model, and is particularly suitable for scenarios with a large number of features, complex data distribution or dynamic changes. Compared with the traditional fixed processing order, this solution can better tap the potential of features, reduce the waste of computing resources, and improve overall performance.

[0234] In one implementation of this embodiment, optimizing the model parameters and comparison strategy of the artificial intelligence model based on the model confidence output by the artificial intelligence model includes the following steps:

[0235] S810: Identify, based on the model confidence, a decision point whose confidence is less than a preset threshold;

[0236] S820. For a decision point whose confidence level is less than a preset threshold, retrieve corresponding configuration rules and cases from a preset substation configuration file knowledge base;

[0237] S830, constructing an enhanced feature representation of the decision point based on the retrieved configuration rules and cases;

[0238] S840, re-inputting the enhanced feature representation into the artificial intelligence model to obtain an updated proofreading result;

[0239] S850, comparing the proofreading results before and after the update, and calculating the sensitivity index of the model parameters;

[0240] S860, based on the sensitivity index, use the gradient descent algorithm to optimize the model parameters of the artificial intelligence model;

[0241] S870. Update the comparison strategy of the artificial intelligence model based on the optimized model parameters.

[0242] Decision points are specific configuration items or parameters that the model needs to make judgments about. In substation configuration file verification, these can include various configuration items, such as protection settings, device parameters, and logical relationships. First, confidence information needs to be extracted from the output of the AI ​​model. In this embodiment, confidence is the probability value of the model output.

[0243] For decision points with a confidence level lower than a preset threshold, the corresponding configuration rules and cases are retrieved from the preset substation configuration file knowledge base. The substation configuration file knowledge base is a structured database containing configuration rules, standards, historical cases, and expert knowledge, which is used to assist the model in understanding and processing complex configuration relationships. The retrieval process first requires clarifying the feature representation of the decision point, including its type, attributes, contextual information, etc. For example, for a protection setting parameter, its feature representation may include the parameter name, the type of device to which it belongs, the voltage level, the line characteristics, etc. Based on these features, a retrieval query is constructed to find relevant configuration rules and cases in the knowledge base.

[0244] The search results include two types of information: configuration rules and historical cases. Configuration rules refer to configuration principles outlined by standards, specifications, or expert summaries, such as the operating time of a certain type of relay should not exceed a specific value or a parameter should be proportional to line impedance. Historical cases refer to successful configuration examples in the past, including parameter settings, contextual conditions, and configuration rationale.

[0245] Based on the retrieved configuration rules and cases, an enhanced feature representation of the decision point is constructed. Enhanced feature representation fuses the original features with information retrieved from the knowledge base to generate richer, more expressive feature vectors, thereby improving the model's decision-making capabilities. The process of constructing an enhanced feature representation includes three steps: feature extraction, feature transformation, and feature fusion.

[0246] During the feature extraction phase, valuable information is extracted from the retrieved configuration rules and cases. For configuration rules, information such as rule type, applicable conditions, constraints, and recommended value range can be extracted; for historical cases, information such as case parameters, contextual conditions, configuration reasons, and success rates can be extracted. This information can be obtained through methods such as rule parsing, text analysis, or structured data extraction. For example, for the rule that the first stage setting value of 500kV line distance protection should be 80%-85% of the line impedance, structured information such as voltage level (500kV), protection type (distance protection), stage (first stage), and setting principle (80%-85% of the line impedance) can be extracted.

[0247] During the feature conversion phase, the extracted information is converted into quantifiable features. For categorical information (such as rule type and applicable conditions), one-hot encoding or embedding vectors can be used. For numerical information (such as recommended value range and success rate), it can be used directly or normalized. For textual information (such as configuration reasons), natural language processing techniques can be used to convert it into semantic vectors.

[0248] In the feature fusion stage, the original features are fused with the transformed new features to generate the final enhanced feature representation. The fusion method can be simple feature concatenation, weighted fusion, or an attention mechanism. Feature concatenation directly concatenates the original feature vector and the new feature vector into a longer vector.

[0249] By constructing an enhanced feature representation, domain knowledge and historical experience can be explicitly incorporated into the model's decision-making process, compensating for the shortcomings of the original features and improving the model's ability to understand complex configuration relationships. This knowledge-enhanced feature representation approach is particularly suitable for handling highly specialized and rule-intensive substation configuration file verification tasks.

[0250] The enhanced feature representation is re-input into the AI ​​model to obtain updated proofreading results. This step is to apply the previously constructed enhanced feature representation to the actual proofreading process, and obtain more accurate results through model re-evaluation.

[0251] The adjusted enhanced features are input into the artificial intelligence model for inference to obtain the prediction results, which are the updated proofreading results.

[0252] By re-inputting the enhanced feature representation into the model, we can fully utilize the domain knowledge and historical experience retrieved from the knowledge base to improve the model's ability to understand complex configuration relationships, especially for those decision points that originally had low confidence, which can significantly improve the accuracy and reliability of proofreading.

[0253] Compare the proofreading results before and after the update, and calculate the sensitivity index of the model parameters. The sensitivity index is a quantitative indicator that measures the degree of influence of the model parameters on the output change, which is used to guide the subsequent parameter optimization process. First, it is necessary to define a method to compare the proofreading results before and after the update. For classification tasks, you can compare whether the predicted category has changed; for regression tasks, you can calculate the change in the predicted value; for probability output, you can calculate the change in the probability distribution. Next, based on the changes in the proofreading results, calculate the sensitivity index of the model parameters. The sensitivity index reflects the degree of influence of parameter changes on the model output, and can be calculated by gradient or finite difference method. For differentiable models, the norm of the gradient can be used as the sensitivity index S(θ j ):

[0254]

[0255] Among them, θ j is the jth parameter of the model, is the model output.

[0256] By calculating sensitivity indices, we can identify parameters and features that have a significant impact on model output, providing guidance for subsequent parameter optimization. Parameters with high sensitivity generally require more careful adjustment, as changes in them can lead to significant changes in model output; whereas parameters with low sensitivity may require more significant adjustments to effectively impact model performance.

[0257] Based on the sensitivity index, the gradient descent algorithm is used to optimize the model parameters of the artificial intelligence model. Gradient descent is an iterative optimization algorithm that adjusts the parameters along the gradient direction of the objective function to minimize the loss function. In this step, based on the sensitivity index calculated previously, the gradient descent process is adjusted to achieve more effective parameter optimization. First, define a loss function suitable for the current task. Next, adjust the learning rate of gradient descent based on the sensitivity index. For parameters with high sensitivity, a smaller learning rate is used to avoid excessive parameter changes that lead to model instability; for parameters with low sensitivity, a larger learning rate is used to accelerate convergence. The adaptive learning rate can be expressed as:

[0258]

[0259] Here, η0 is the base learning rate and ∈ is a small constant to prevent division by zero.

[0260] The optimization process should include appropriate stopping conditions, such as reaching the maximum number of iterations. Gradient descent optimization based on sensitivity metrics allows for more targeted adjustments to model parameters, improving optimization efficiency and model performance. In particular, refined optimization of parameters that significantly impact calibration results can significantly improve the model's accuracy and reliability when handling low-confidence decision points.

[0261] Based on the optimized model parameters, update the comparison strategy of the artificial intelligence model. The comparison strategy refers to the methods and standards for how the model evaluates and compares different configuration items when performing configuration file verification. The purpose of updating the comparison strategy is to enable the model to identify configuration errors and anomalies more accurately and efficiently. First, based on the optimized model parameters, update the feature weight distribution. Feature weights reflect the importance of different features in the decision-making process and can be extracted from the optimized model parameters. For example, for neural networks, feature importance can be extracted through sensitivity analysis or attention weights. Next, update the similarity calculation method. Similarity calculation is the core of the comparison process and is used to evaluate the degree of match between configuration items and standards or historical cases. Based on the optimized model parameters, the form and parameters of the similarity function can be adjusted. For example, you can move from simple Euclidean distance or cosine similarity to more complex Mahalanobis distance or kernel similarity:

[0262]

[0263] Among them, ∑ is the feature covariance matrix, which can be estimated from the optimized model. For kernel similarity, you can choose a kernel function that is suitable for the current data distribution, such as Gaussian kernel, polynomial kernel, etc.:

[0264]

[0265] Here, σ is the kernel width parameter, which can be adjusted according to the data distribution and model performance.

[0266] In addition, the anomaly detection threshold needs to be updated. The anomaly detection threshold is used to determine whether a configuration item is abnormal or incorrect and is an important part of the comparison strategy. Based on the optimized model and historical data, the appropriate threshold can be recalculated. The threshold can be set based on the distribution characteristics of normal samples, such as using the 3-sigma rule:

[0267] T=μ+3σ;

[0268] Among them, μ and σ are the mean and standard deviation of the similarity scores of normal samples, respectively. The updated comparison strategy should be able to adapt to the needs of different types of configuration items and different scenarios. To this end, an adaptive comparison strategy can be designed to dynamically adjust the comparison parameters according to the type, importance and historical performance of the configuration items. For example, for critical safety-related configuration items, stricter thresholds and more comprehensive feature comparisons can be adopted; for non-critical configuration items, relatively loose standards can be adopted to improve processing efficiency. By updating the comparison strategy, the artificial intelligence model can more accurately identify configuration errors and anomalies during the verification of substation configuration files, reduce false positives and missed negatives, and improve the overall quality and efficiency of the verification. In particular, for those decision points that originally had low confidence levels, the optimized comparison strategy can significantly improve the accuracy and reliability of the verification.

[0269] This implementation method first identifies decision points with low confidence, then retrieves relevant rules and cases from the professional knowledge base, constructs an enhanced feature representation, re-evaluates the proofreading results, and calculates sensitivity indicators by comparing the results before and after the update. Based on these indicators, the gradient descent algorithm is used to optimize the model parameters, and the comparison strategy is updated, including feature weight allocation, similarity calculation method, and anomaly detection threshold. This closed-loop optimization mechanism enables the model to continuously learn and adapt to complex configuration rules and changing environments, especially for those boundary situations that were originally difficult to accurately judge. Compared with traditional methods, this solution significantly improves the accuracy, reliability, and efficiency of verification, reduces the need for manual intervention, realizes the intelligent upgrade of substation configuration file verification, and provides a strong guarantee for the safe and stable operation of the power system.

[0270] An embodiment of the present application further provides an electronic device, including:

[0271] a memory configured to store instructions; and

[0272] The processor is configured to call the instructions from the memory and implement the above-mentioned artificial intelligence-based smart substation configuration file verification method when executing the instructions.

[0273] The present application also provides an artificial intelligence-based smart substation configuration file verification system, including:

[0274] The above electronic equipment.

[0275] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0276] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0277] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0278] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0279] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0280] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0281] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0282] It should also be noted that the terms include, comprise, or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "includes a..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus that includes the element.

[0283] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for checking configuration files of smart substations based on artificial intelligence, characterized in that: Applied to electronic equipment, the electronic equipment is deployed with an artificial intelligence model, which is trained based on historical data and is used to verify the substation configuration file. The method includes: In response to an input signal of a configuration file to be verified, extracting n character strings of the configuration file to be verified, and performing semantic analysis on each character string to obtain a semantic analysis result, where n is an integer greater than 1; Extract key features of the analysis results from the semantic analysis results, and use a preset feature learning algorithm to learn each key feature to obtain a high-level feature representation of each key feature; Merge all high-level feature representations of the analysis results to obtain a feature set; The feature set is input into the artificial intelligence model to obtain the proofreading result of the configuration file to be verified and the preset benchmark configuration file.

2. The method according to claim 1, characterized in that Perform semantic analysis on each string to obtain semantic analysis results, including: Perform word segmentation on each string to obtain a word sequence; Perform part-of-speech tagging on word sequences to identify keywords, parameter values, and structure identifiers in the configuration files to be verified; Based on the preset substation configuration file grammar rule library, perform syntactic analysis on the word sequence and construct a grammar tree; According to the syntax tree, the semantic structure and contextual relationship of the string are extracted to build a semantic network; Generate semantic analysis results based on the semantic network.

3. The method according to claim 2, characterized in that Generate semantic analysis results based on the semantic network, including: Identify entity nodes and relationship edges in the semantic network and build a semantic representation model for the configuration file to be verified; Calculate the centrality and importance weight of each entity node in the semantic network, and rank all entity nodes based on the centrality and importance weight using a preset importance scoring function; The top m physical nodes are used as key configuration items, where m is a preset positive integer; Use the preset knowledge base to perform semantic reasoning on key configuration items and generate semantic categories; Calculate semantic similarity of key configuration items and determine the relationship type between key configuration items based on the similarity between the key configuration items; Integrate semantic categories and relationship types to obtain semantic analysis results.

4. The method according to claim 1, wherein The artificial intelligence model is a neural network model or a support vector machine model. The feature set is input into the artificial intelligence model to obtain the calibration results of the configuration file to be verified and the preset reference configuration file, including: When the artificial intelligence model is a neural network model, the feature set is input into a multi-layer perceptron network, and a high-dimensional representation of the feature vector is obtained through forward propagation calculation; The high-dimensional representation is weighted by the attention layer to obtain the weighted feature representation; Calculate the similarity between the weighted feature representation and the feature representation of the preset benchmark configuration file to obtain the file similarity rate; The anomaly detection layer identifies abnormal patterns in the feature representation and obtains the abnormal item identification results; Based on the file similarity and abnormal item identification results, the risk level assessment result is calculated through the risk assessment layer, where the proofreading result includes the file similarity, abnormal item identification results and risk level assessment results; When the artificial intelligence model is a support vector machine model, the feature set is mapped to a high-dimensional feature space through a kernel function; In a high-dimensional feature space, the feature set is input into multiple binary classification support vector machines to obtain multiple output results; Integrate the output results of all binary support vector machines and determine the abnormal item recognition results; Based on the abnormal item identification result, the file similarity rate is determined, wherein the proofreading result includes the abnormal item identification result and the file similarity rate.

5. The method according to claim 1, wherein Merge all high-level feature representations of the analysis results to obtain a feature set, including: Based on the attention mechanism, all high-level feature representations of the analysis results are merged to obtain a feature set.

6. The method according to claim 1, characterized in that After merging all high-level feature representations of the analysis results to obtain a feature set, it also includes: Determining a feature distribution of the configuration file to be verified based on the feature set; Dynamically adjust the order in which the comparison strategy in the AI ​​model processes high-level feature representations based on feature distribution; Based on the model confidence output by the artificial intelligence model, the model parameters and comparison strategy of the artificial intelligence model are optimized.

7. The method according to claim 6, characterized in that Dynamically adjust the order in which the comparison strategy in the AI ​​model processes high-level feature representations, including: Calculate the information entropy and mutual information represented by each high-level feature in the feature set; Construct at least one feature importance ranking based on information entropy and mutual information; Randomly determine a feature importance ranking from at least one feature importance ranking as a feature processing priority queue; Adjust the processing order of high-level feature representations in the AI ​​model based on the feature processing priority queue; During the process of the artificial intelligence model processing the feature processing priority queue, the contribution of each high-level feature representation to the verification result is monitored in real time, and the feature processing priority queue is updated in real time according to the contribution, until all feature importance rankings are processed by the artificial intelligence model as the feature processing priority queue.

8. The method according to claim 6, characterized in that Based on the model confidence of the AI ​​model output, optimize the model parameters and comparison strategy of the AI ​​model, including: According to the model confidence, the decision points with confidence less than the preset threshold are identified; For decision points with confidence less than a preset threshold, the corresponding configuration rules and cases are retrieved from the preset substation configuration file knowledge base; Based on the retrieved configuration rules and cases, an enhanced feature representation of the decision point is constructed; Re-input the enhanced feature representation into the AI ​​model to obtain an updated proofreading result; Compare the proofreading results before and after the update and calculate the sensitivity index of the model parameters; Based on the sensitivity index, the gradient descent algorithm is used to optimize the model parameters of the artificial intelligence model; Based on the optimized model parameters, the comparison strategy of the artificial intelligence model is updated.

9. An electronic device, characterized in that: include: a memory configured to store instructions; as well as A processor is configured to call the instructions from the memory and implement the artificial intelligence-based smart substation configuration file verification method according to any one of claims 1 to 8 when executing the instructions.

10. An artificial intelligence-based intelligent substation configuration file verification system, characterized in that: include: An electronic device according to claim 9.

Citation Information

Cited By

  • Real-time adaptive constant value checking method and system for relay protection device

    CN120873637A

  • Compliance file generation method based on OpenXml analysis and template depth configuration

    CN121614451A

  • Compliant file generation method based on openxml analysis and template deep configuration

    CN121614451B

  • Precise information comparison method and system based on intelligent project file checking

    CN121960406A