Power distribution terminal automatic test method and system based on distribution network semantic knowledge graph
By using an automated testing method based on the semantic knowledge graph of the distribution network, system-level testing of distribution terminals was achieved, overcoming the limitations of traditional testing methods, improving the comprehensiveness, accuracy and adaptability of the testing, and ensuring the reliability and completeness of the test results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID JIBEI ELECTRIC POWER CO LTD TANGSHAN POWER SUPPLY CO
- Filing Date
- 2025-12-04
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional power distribution terminal testing methods cannot effectively cope with different terminal models, changing environmental conditions and sudden fault scenarios. They lack quantitative analysis of the correlation characteristics between semantic entities and environmental interference factors, resulting in biased test results and incomplete coverage.
An automated testing method based on a distribution network semantic knowledge graph achieves system-level evaluation of the collaborative working mechanism between entities and environmental adaptability correction through entity alignment, semantic relationship mapping, environmental interference correction, potential fault point prediction, and dynamic generation of supplementary test scripts.
It improved the comprehensiveness and accuracy of testing, reduced test deviations caused by environmental interference, ensured the adaptability and reliability of test results, improved the test coverage, and built a continuously optimized test evaluation system.
Smart Images

Figure CN122017447A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power distribution terminal testing, and specifically relates to an automated testing method and system for power distribution terminals based on a power distribution network semantic knowledge graph. Background Technology
[0002] In power system operation and maintenance, distribution terminal testing is a core component ensuring the safety, stability, and reliability of the power grid and power supply. With the deepening of smart grid construction, the functions of distribution terminals are becoming increasingly complex, and their operating environments are exhibiting diverse characteristics, placing higher demands on the comprehensiveness, accuracy, and adaptability of testing technologies. Traditional testing methods mainly rely on pre-set fixed procedures and static scripts, making it difficult to effectively address the diverse challenges brought about by different terminal models, changing environmental conditions, and sudden fault scenarios. Furthermore, they cannot deeply capture the dynamic relationships between semantic entities within the equipment or the complex impact of environmental factors on system behavior, especially lacking the ability to quantitatively analyze the correlation characteristics between semantic entities and environmental interference factors. On the one hand, there are deep-seated coupling and dependencies between various semantic entities within the terminal (such as protection units, metering modules, and communication interfaces), while traditional methods can only perform isolated functional verification, failing to evaluate the collaborative working mechanism between entities and its impact on overall performance at the system level. On the other hand, environmental factors (such as temperature, humidity, and electromagnetic interference) can significantly change the terminal's operating parameters and the correlation characteristics between entities. Existing testing methods lack dynamic perception and adaptive correction mechanisms for environmental interference, leading to significant deviations in test results in actual operating environments. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides an automated testing method and system for distribution terminals based on a distribution network semantic knowledge graph. This addresses the technical problems of traditional methods, which cannot evaluate the collaborative working mechanism between entities and its impact on overall performance at the system level, lack dynamic perception and adaptive correction mechanisms for environmental interference, resulting in significant deviations in test results in actual operating environments, incomplete test coverage, inability to identify uncovered test paths, and inability to dynamically generate supplementary test scripts, thus limiting the scope of test coverage.
[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution.
[0005] This invention first discloses an automated testing method for distribution terminals based on a distribution network semantic knowledge graph, the method comprising the following steps: Step S1: Obtain real-time operating data of the power distribution terminal and environmental sensor readings. Based on the semantic knowledge graph of the power distribution network, perform entity alignment and relation mapping on the real-time operating data and environmental sensor readings to generate a multimodal dataset with semantic annotation. Step S2: Based on the semantically labeled multimodal dataset, the association features of semantic entities are extracted using the random forest algorithm combined with the semantic constraints of the power distribution network semantic knowledge graph, and a semantic relation matrix with weight attributes is constructed. The weight attributes reflect the semantic dependency strength based on the knowledge graph. Step S3: Extract environmental factors from the semantic relationship matrix, determine the degree of interference of the environmental factors on entity association, adjust the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, and obtain the corrected semantic relationship matrix; Step S4: Based on the corrected semantic relation matrix, and combined with the topological constraints in the distribution network semantic knowledge graph, generate a test scenario behavior sequence, use a graph neural network algorithm to predict potential fault points, and output a problem location coordinate set with probability labels; Step S5: Based on the problem location coordinate set, use the knowledge graph path reasoning algorithm to identify the uncovered interaction relationship paths and generate a multi-dimensional test coverage evaluation report containing semantic descriptions; Step S6: Determine the coverage blind spots based on the uncovered interaction relationship paths, dynamically generate supplementary test scripts for the coverage blind spots based on the rule reasoning engine of the knowledge graph, and execute the supplementary test scripts to receive feedback data in order to update the entity state attributes in the knowledge graph.
[0006] The present invention further includes the following preferred embodiments: Step S1 further includes: Operational data and environmental sensor readings are collected through the power distribution terminal interface. A pre-established semantic knowledge graph of the power distribution network is used to align the collected data with entities, identify key entities in the operational data and sensor readings, and obtain an aligned set of entities. Perform relation mapping operations on the aligned entity set, construct an association network between entities based on semantic relations in the knowledge graph, determine the semantic association results, and generate a multimodal dataset with semantic annotation by combining running data and sensor readings. The distribution network semantic knowledge graph is a structured semantic network that describes the various functional modules in the distribution terminal system and the semantic relationships between them.
[0007] Step S2 further includes: Based on the complete structured multimodal dataset, the random forest algorithm is used to learn the features related to semantic entities in the dataset. Combined with the predefined entity type labels in the power distribution network semantic knowledge graph, the category attributes and boundary information of each semantic entity are identified. By calling the node attributes and edge information related to the identified entities in the knowledge graph, and using the graph semantic constraints as a priori conditions for feature selection, entity association features that conform to semantic logic are extracted from multimodal data. The importance score of the associated features is calculated and the quantification result is determined by using the random forest algorithm. Combined with the semantic dependency rules between entities in the knowledge graph, weight values reflecting the semantic dependency strength are assigned to entity pairs to construct a semantic relation matrix with weight attributes, where the weight values reflect the semantic dependency strength based on the knowledge graph.
[0008] Step S3 further includes: Environmental factors are extracted from the semantic relation matrix, and the environmental factors and entity associations are initially decomposed to obtain the degree of interference of environmental factors on entity associations. A preset threshold is used for comparison. If the degree of interference exceeds the threshold, the elements of the semantic relation matrix are initially adjusted to obtain the initially corrected matrix data. Based on the initially corrected matrix data, dynamic information on parameter changes is obtained, the mapping relationship between parameter changes and the degree of interference is analyzed, the adjusted element weights are determined, and the matrix elements are updated and optimized a second time by combining the inherent relationship between semantic relations and entity associations to obtain the optimized relation matrix. The optimized relation matrix is sparsified to retain key semantic associations and reduce redundant information, resulting in a sparsified optimized matrix. The residual interference of environmental factors on entity associations is analyzed, and the quantification value of the residual interference of each entity on the association relationship is calculated. Based on the quantization value of the residual interference, local element correction is performed on the regions where the quantization value of the residual interference exceeds the preset correction threshold to obtain the corrected semantic relation matrix.
[0009] In step S4, a graph neural network algorithm is used to predict potential fault points and output a problem location coordinate set with probability labels, which further includes: The generated test scenario behavior sequence is transformed into a graph structure data representation that can be processed by a graph neural network. Each functional semantic entity in the power distribution terminal is a graph node, and the node attributes include module type, real-time operating parameters and historical state sequence. The interaction behavior between entities is an edge, and the edge attributes include semantic dependency weight, interaction frequency and real-time state information. Deep representation learning of graph structures is performed through graph convolutional network (GCN) or graph attention network (GAT) models. Graph convolutional network generates globally aware node embedding vectors by aggregating the features of node neighbors, while graph attention network uses attention mechanisms to highlight key related edges and abnormal node features to capture latent patterns. The learned node feature vectors are input into the fault classification module and matched with the predefined fault feature library in the knowledge graph. The probability of occurrence of each node under different fault modes is calculated to obtain the potential fault point set. Based on the semantic entity-physical device mapping relationship maintained in the knowledge graph, the physical deployment information corresponding to each abnormal node in the potential fault point set is extracted to form a three-dimensional physical coordinate. Combined with the node fault probability value output by the graph neural network, each physical coordinate is probabilistically labeled. For cases where multiple modules are coupled at the same physical location, probability fusion and normalization are performed. Based on the fault propagation path and influence weight defined in the knowledge graph, the probability values of key locations are dynamically corrected, and a problem location coordinate set with probability annotations is output.
[0010] Step S5 further includes: Based on the problem location coordinates, interactive relationship information related to the problem location coordinates is extracted from the knowledge graph. The hidden associations in the interactive relationships are analyzed using a path reasoning algorithm to identify interactive relationship paths that are not covered by the current test scenario and obtain detailed mappings of the uncovered paths. Based on the detailed mapping of uncovered paths, a multi-dimensional test coverage framework is constructed in conjunction with semantic description rules. This test coverage framework serves as the analytical basis for evaluating test coverage and determines the coverage of test scenarios in different dimensions. If the correlation of uncovered paths in the analytical basis of test coverage is lower than a preset threshold, the mapping relationship of uncovered paths is adjusted through supplementary processing of semantic description. Based on the adjusted test coverage framework, intermediate data for multi-dimensional evaluation is generated, including a quantitative assessment of the test coverage of each dimension and specific information on uncovered paths. Combining the correspondence rules between coordinate information and relationship paths, and the semantic description of problem location coordinates and interaction relationships, the intermediate data is structured into the content of the evaluation document. Based on the structured content, a multi-dimensional test coverage evaluation report containing semantic descriptions is generated, and the output format of the evaluation results is determined.
[0011] Step S6 further includes: Based on the identified uncovered interaction paths and problem location coordinates, entity information related to the coverage blind spots is obtained from the knowledge graph, the missing data points within the blind spots are determined, and the rule reasoning engine in the knowledge graph is used to generate corresponding supplementary test scripts based on the missing data points within the blind spots. An automated testing process is executed on the generated supplementary test script, the execution results of the test script are recorded, and the completeness of the feedback data is judged. The test script includes the output data and state changes of each test step. If the completeness of the feedback data meets the preset threshold, the feedback data is mapped to the corresponding entity in the knowledge graph, and the entity state attributes are updated. If the completeness of the feedback data is lower than the preset threshold, the test script content is readjusted through the rule reasoning engine to obtain an optimized test script. Based on the optimized test script, the automated test process is re-executed to obtain new script execution feedback data, which is then used to update the entity state attributes in the knowledge graph.
[0012] This invention also discloses an automated testing system for distribution terminals based on distribution network semantic knowledge graphs, utilizing the aforementioned automated testing method for distribution terminals based on distribution network semantic knowledge graphs, comprising: The alignment and mapping module is used to acquire real-time operating data of power distribution terminals and environmental sensor readings. Based on the semantic knowledge graph of the power distribution network, it performs entity alignment and relation mapping on the real-time operating data and environmental sensor readings to generate a multimodal dataset with semantic annotation. The feature extraction module is used to extract the association features of semantic entities based on the semantically labeled multimodal dataset, using the random forest algorithm combined with the semantic constraints of the power distribution network semantic knowledge graph, and construct a semantic relationship matrix with weight attributes, wherein the weight attributes reflect the semantic dependency strength based on the knowledge graph. An environmental interference judgment module is used to extract environmental factors from the semantic relationship matrix, determine the degree of interference of the environmental factors on entity association, adjust the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, and obtain a corrected semantic relationship matrix. The problem localization module is used to generate a test scenario behavior sequence based on the corrected semantic relationship matrix and the topological constraints in the distribution network semantic knowledge graph, and to use a graph neural network algorithm to predict potential fault points, outputting a problem localization coordinate set with probability labels. The path identification module is used to identify uncovered interaction relationship paths based on the problem location coordinate set, and to generate a multi-dimensional test coverage evaluation report containing semantic descriptions. The knowledge graph update module is used to determine the coverage blind spots based on the uncovered interaction relationship paths, dynamically generate supplementary test scripts for the coverage blind spots based on the rule reasoning engine of the knowledge graph, and execute the supplementary test scripts to receive feedback data in order to update the entity state attributes in the knowledge graph.
[0013] Accordingly, this application also discloses a terminal, including a processor and a storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the aforementioned automated testing method for distribution terminals based on distribution network semantic knowledge graph.
[0014] Accordingly, this application also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned automated testing method for distribution terminals based on a distribution network semantic knowledge graph.
[0015] The beneficial effects of this invention are as follows: Compared with the prior art, this invention provides an automated testing method and system for distribution terminals based on a distribution network semantic knowledge graph. It solves the problem that traditional testing methods can only perform isolated functional verification. By utilizing the distribution network semantic knowledge graph to perform entity alignment and relationship mapping on the collected distribution terminal operating data and environmental sensor readings, the deep coupling and dependency relationships between various semantic entities within the terminal (such as protection units, metering modules, communication interfaces, etc.) can be identified and associated. This allows for the evaluation of the collaborative working mechanism between entities and its impact on overall performance at the system level, achieving comprehensive system-level testing of the distribution terminal and improving the comprehensiveness and accuracy of the test. Furthermore, by determining the degree of interference of environmental factors on entity associations from the semantic relationship matrix and adjusting the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, a corrected semantic relationship matrix is obtained. This overcomes the limitation of existing testing methods lacking dynamic perception and adaptive correction mechanisms for environmental interference, enabling dynamic perception of the impact of environmental factors (such as temperature, humidity, electromagnetic interference, etc.) on terminal operating parameters and entities. The system mitigates the impact of inter-relationship characteristics and performs adaptive corrections, making test results more accurate and reliable in real-world operating environments. This significantly reduces test deviations caused by environmental interference and improves the adaptability and reliability of test results. Based on knowledge graph path reasoning, it identifies uncovered interaction paths and generates a multi-dimensional test coverage assessment report with semantic descriptions. Simultaneously, it dynamically generates supplementary test scripts for coverage blind spots using the knowledge graph's rule reasoning engine, and updates entity state attributes in the knowledge graph through script execution feedback data. This addresses the problem of incomplete test coverage in existing testing methods, not only identifying uncovered test paths but also filling gaps in test coverage through dynamic supplementary test script generation, further improving the test coverage scope. Furthermore, through multiple rounds of iterative testing, it continuously optimizes entity association weights in the graph, constructs a knowledge graph-based evaluation system for power grid stability operation indicators, and outputs an overall test accuracy assessment report based on semantic verification. This achieves continuous optimization of the testing method and continuous improvement of test results, ensuring the comprehensiveness and reliability of distribution terminal testing. Attached Figure Description
[0016] Figure 1 This is a flowchart of the automated testing method for distribution terminals based on distribution network semantic knowledge graph in this invention.
[0017] Figure 2 This is a schematic diagram of the process of extracting the association features of semantic entities and constructing a semantic relationship matrix with weight attributes in this invention.
[0018] Figure 3 This is a flowchart illustrating the use of a graph neural network algorithm for predicting potential fault points in this invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0020] The embodiments described in this application are merely some, not all, embodiments of the present invention. Based on the spirit of the present invention, other embodiments obtained by those skilled in the art without inventive effort are all within the protection scope of the present invention.
[0021] To address the shortcomings of existing technologies, this invention proposes an automated testing method and system for distribution terminals based on a distribution network semantic knowledge graph. It utilizes the distribution network semantic knowledge graph to achieve multi-source data fusion and entity association mapping, quantitatively analyzes the coupling relationships between semantic entities, and evaluates the collaborative working mechanism at the system level. By analyzing the degree of environmental interference in the semantic relationship matrix and dynamically correcting the matrix parameters, it achieves adaptive compensation for environmental factors. Based on knowledge graph path reasoning, it identifies test blind spots, dynamically generates supplementary test scripts, and optimizes entity association weights through multiple rounds of iteration to construct a continuously evolving test evaluation system, aiming to solve the problem of incomplete test coverage.
[0022] See Figure 1 As shown, the automated testing method for distribution terminals based on distribution network semantic knowledge graph disclosed in this invention includes the following steps: Step S1: Obtain real-time operating data of the power distribution terminal and environmental sensor readings. Based on the semantic knowledge graph of the power distribution network, perform entity alignment and relation mapping on the real-time operating data and environmental sensor readings to generate a multimodal dataset with semantic annotation.
[0023] In a further embodiment, step S1 specifically includes: Step S11: Collect operating data and environmental sensor readings through the power distribution terminal interface, use a pre-established distribution network semantic knowledge graph to perform entity alignment on the collected data, identify key entities in the operating data and sensor readings, and obtain the aligned entity set; Step S12: Perform relation mapping operation on the aligned entity set, construct the association network between entities based on the semantic relations in the knowledge graph, determine the semantic association results, and generate a multimodal dataset with semantic annotation by combining the information from the running data and sensor readings.
[0024] Furthermore, entity alignment is performed on the collected data, including: using graph neural networks to embed entities in the distribution network semantic knowledge graph; by learning low-dimensional vector embeddings of entities, semantically similar entities are placed closer together in the embedding space; during the alignment process, cosine similarity or Euclidean distance is used to calculate the similarity between entities in the collected data and entities in the knowledge graph, thereby achieving accurate entity alignment. The similarity is represented as: , Represents entities in the running data. Represents entities in a knowledge graph. and It is an entity embedding vector learned through a graph neural network. The numerator represents the dot product of the vectors, and the denominator represents the norm of the vectors. By calculation, the semantic similarity between entities can be quantified, thereby achieving efficient and accurate entity alignment.
[0025] The pre-established distribution network semantic knowledge graph is a structured semantic network that describes the semantic relationships between various functional modules (such as measurement modules, control modules, protection modules, etc.) in the distribution terminal system. These semantic relationships include data flow, control flow, and interactive behavior, and also cover attribute information such as module operating parameters and environmental conditions. Through the pre-established distribution network semantic knowledge graph, semantic alignment and relationship mapping of the collected real-time operating data and environmental sensor readings can be achieved, providing rich semantic information for subsequent testing and analysis.
[0026] By generating a semantically labeled multimodal dataset, the limitations of data collection and processing in traditional testing methods are solved. This not only improves the accuracy and completeness of the data, but also provides rich semantic information for subsequent testing and analysis, significantly enhancing the comprehensiveness and accuracy of the test.
[0027] Step S2: Based on the semantically labeled multimodal dataset, the association features of semantic entities are extracted using the random forest algorithm combined with the semantic constraints of the power distribution network semantic knowledge graph. A semantic relation matrix with weight attributes is constructed, whereby the weight attributes reflect the semantic dependency strength based on the knowledge graph.
[0028] Furthermore, before extracting the association features of semantic entities, the process also includes: Step S201: Using a semantically labeled multimodal dataset as input, the support vector machine algorithm is used to construct a classification decision boundary based on the semantic attributes in the data (such as the response status of the protection module and the temperature and humidity environment level). The data is accurately divided into groups corresponding to the operating status and environmental conditions. For example, the normal operation of the terminal corresponds to the normal temperature environment, and the communication module failure corresponds to the strong electromagnetic interference environment, so as to avoid data mixing in different scenarios.
[0029] Step S202: For each group of data after classification, according to the entity structure and relationship framework of the power distribution network semantic knowledge graph, the corresponding operating parameters, environmental readings and semantic tags are associated with semantic entities as the core, and stored in a queryable standardized format to construct a structured multimodal dataset; Step S203: Perform quality verification on the dataset. If a group is found to have missing data (e.g., abnormal metering module or missing humidity data) or abnormalities (e.g., voltage values exceeding the normal range defined by the graph), the missing information is supplemented by the knowledge graph reasoning mechanism, combined with predefined semantic rules and entity association relationships (e.g., calling historical data of related sensors in the same scene), and abnormal data is corrected (e.g., replacing unreasonable values according to the voltage constraints of the graph). This forms a complete structured multimodal dataset without missing data or abnormalities, providing high-quality data support for subsequent semantic relationship matrix construction and fault prediction.
[0030] See Figure 2 In a further embodiment, step S2 specifically includes: Step S21: Based on the complete structured multimodal dataset, the random forest algorithm is used to learn the features related to semantic entities in the dataset. Combined with the predefined entity type labels (such as measurement entities and control entities) in the distribution network semantic knowledge graph, the category attributes and boundary information of each semantic entity are identified (to determine the functional scope and data association domain of the entity, such as distinguishing the boundary between the local control module and the remote communication module). Random forests assess feature importance by calculating the average reduction in impurity (e.g., the reduction in the Gini index) across all decision trees for each feature. Importance is expressed as: , It is the number of decision trees in the random forest. It is the set of nodes in the t-th tree. It is the amount by which the Gini index decreases when node n is split using feature f.
[0031] Step S22: Call the node attributes (such as the functional description and parameter range of the entity) and edge information (such as the preset semantic relationship between the entity data transmission and instruction interaction) related to the identified entity in the knowledge graph, and use the semantic constraints of the graph as the prior condition for feature selection (for example, give priority to the entity pair features marked as strongly related in the graph), and extract the entity association features that conform to the semantic logic from the multimodal data (such as the data interaction delay feature of the measurement module → control module, and the instruction response success rate feature of the protection module → execution unit). Step S23: Use the random forest algorithm to calculate the importance score of the associated features and determine the quantification result. Then, combine the semantic dependency rules between entities in the graph (such as the control module must depend on the data input of the measurement module corresponding to the high-weight benchmark) to assign weight values to entity pairs that reflect the semantic dependency strength, and construct a semantic relation matrix with weight attributes, where the weight values reflect the semantic dependency strength based on the knowledge graph.
[0032] Among them, an entity pair refers to a combination of two entities with a predefined semantic relationship in a knowledge graph, such as the data interaction relationship between the measurement module and the control module; The importance score is expressed as follows:
[0033] in It is the number of trees in the random forest. It is the number of nodes in the t-th tree. It is at the nth node of the t-th tree that the feature is used. The decrease in the Gini index at split nodes.
[0034] By constructing a semantic relation matrix with weighted attributes, the problem of lacking quantitative analysis of the association characteristics between semantic entities in existing technologies is solved. This not only improves the quality and availability of data, but also provides accurate semantic association information for subsequent fault prediction, significantly improving the accuracy and reliability of testing.
[0035] Step S3: Extract environmental factors from the semantic relationship matrix, determine the degree of interference of the environmental factors on entity association, adjust the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, and obtain the corrected semantic relationship matrix.
[0036] In a further embodiment, step S3 specifically includes: Step S31: Extract environmental factors from the semantic relation matrix, perform preliminary decomposition of environmental factors and entity associations, obtain the degree of interference of environmental factors on entity associations, compare with a preset threshold, and if the degree of interference exceeds the threshold, perform preliminary adjustment of the elements of the semantic relation matrix to obtain preliminary corrected matrix data. Step S32: Based on the initially corrected matrix data, obtain dynamic information on parameter changes, analyze the mapping relationship between parameter changes and the degree of interference, determine the adjusted element weights, and combine the inherent connection between semantic relationships and entity associations to perform a second update and optimization of the matrix elements to obtain the optimized relation matrix. Step S33: Sparsify the optimized relation matrix (e.g., by using L1 regularization or setting a weight threshold to remove weakly related elements with weight values below 0.1), retain key semantic associations and reduce redundant information to obtain the sparsified optimized matrix. Analyze the residual interference of environmental factors on entity associations and calculate the quantitative value of the residual interference of each entity on the association relationship (e.g., the magnitude of weight deviation caused by interference). The quantified value of residual interference in the correlation relationship is expressed as follows: , It is an environmental factor matrix, representing the impact of environmental factors on the relationships between various entities; It is a sparse semantic relation matrix that retains key semantic associations; ⊙ represents element-wise multiplication (Hadamard product). It is the Frobenius norm, used to calculate the overall strength of a matrix; It is the residual interference quantization value, which represents the degree of environmental interference that still exists in the matrix after sparsification.
[0037] Step S34: Based on the quantization value of the residual interference, perform local element correction on the region where the quantization value of the residual interference exceeds the preset correction threshold (e.g., deviation amplitude > 5%), and obtain the corrected semantic relation matrix.
[0038] The optimized matrix after sparsification retains only the key semantic relationships, specifically the elements that significantly contribute to the semantic relationships. This means that each element in the matrix has high semantic value and can more accurately reflect the main relationships between entities.
[0039] By determining the degree of interference of environmental factors on entity association from the semantic relation matrix and adjusting the matrix elements according to the degree of interference to reflect parameter changes, the problem of lacking dynamic perception and adaptive correction mechanism for environmental interference factors in the existing technology is solved. This not only improves the accuracy and reliability of the semantic relation matrix, but also provides a solid foundation for the subsequent generation of test scenario behavior sequences, significantly improving the adaptability of the testing method to environmental interference and the accuracy of the test results.
[0040] Step S4: Based on the corrected semantic relationship matrix, and combined with the topological constraints in the distribution network semantic knowledge graph, generate a test scenario behavior sequence, use a graph neural network algorithm to predict potential fault points, and output a problem location coordinate set with probability labels.
[0041] In a further embodiment, step S4, generating a test scenario behavior sequence, specifically includes: The entity relationships and topological constraints between the functional modules of the distribution terminal are extracted from the semantic knowledge graph of the distribution network. The entity association weights in the corrected semantic relationship matrix are matched with the association strength threshold defined in the knowledge graph to select the effective semantic association set that conforms to the operation logic of the distribution system. A multi-dimensional test scenario framework is constructed based on an effective semantic association set (such as a protection linkage scenario under simulated measurement module data anomalies or communication delays). Based on the temporal rules and state transition constraints defined in the knowledge graph, the scenario framework is decomposed into a sequence of operation instructions with strict order and behavioral dependencies, generating an executable test scenario behavior sequence.
[0042] Among them, timing rules and state transition constraints are a set of rules defined in the knowledge graph to describe the behavioral logic of each functional module of the power distribution terminal at different times and states. Specifically, timing rules specify the order of module behavior; for example, the measurement module must output data before the data processing module. State transition constraints define the conditions and results of module state changes; for example, when the measurement module detects abnormal data, the control module must respond within a specific time. These rules ensure that the behavioral sequence of the test scenario conforms to the actual operating logic of the power distribution system, making the test more accurate and reliable.
[0043] See Figure 3 In a further embodiment, step S4 employs a graph neural network algorithm to predict potential fault points and outputs a problem location coordinate set with probability annotations, specifically including: Step S41: Transform the generated test scenario behavior sequence into a graph structure data representation that can be processed by a graph neural network. Take each functional semantic entity in the power distribution terminal as a graph node. The node attributes include module type, real-time operating parameters and historical state sequence. Take the interaction behavior between entities as edges. The edge attributes include semantic dependency weight, interaction frequency and real-time state information. Step S42: Perform deep representation learning on the graph structure using a graph convolutional network (GCN) or graph attention network (GAT) model. The graph convolutional network generates globally aware node embedding vectors by aggregating the features of node neighbors. The graph attention network uses the attention mechanism to highlight key related edges and abnormal node features to capture latent patterns (such as cross-module cascading failures caused by abnormal node states). Step S43: Input the learned node feature vectors into the fault classification module, match them with the predefined fault feature library in the knowledge graph, calculate the probability of occurrence of each node under different fault modes, and obtain the potential fault point set. Step S44: Based on the semantic entity and physical device mapping relationship maintained in the knowledge graph, extract the physical deployment information corresponding to each abnormal node in the potential fault point set to form a three-dimensional physical coordinate. Combine the node fault probability value output by the graph neural network to perform probability labeling on each physical coordinate. Step S45: For cases where multiple modules are coupled at the same physical location, perform probability fusion and normalization processing, and dynamically correct the probability values of key locations based on the fault propagation path and impact weights defined in the knowledge graph. Output a set of problem location coordinates with probability labels to provide operation and maintenance personnel with accurate location and handling sequence guidance.
[0044] Furthermore, the dynamically corrected fault probability is expressed as:
[0045] It is the target node, representing a module in a physical location; It is the set of neighboring nodes of node v, representing the modules directly connected to v; It is the failure probability of node u output by a graph neural network (such as GCN or GAT); It is the fault propagation weight defined in the knowledge graph from node u to node v, representing the degree of influence of u on v.
[0046] The fault classification module is a classifier or probability prediction model built based on machine learning. Its function is to receive feature vectors from graph neural networks (GCN / GAT) that contain topological information of nodes and their neighborhoods, and analyze the equipment operating status represented by the feature vectors. By comparing and calculating the input feature vectors with historical fault patterns in the knowledge base, the module outputs the probability of occurrence of each known fault type corresponding to the node, thereby transforming the abstract node features into specific and quantifiable fault risk predictions. The predefined fault feature library is a collection of historical fault cases and expert knowledge stored in a knowledge graph, which has been systematically organized and labeled. It is presented in the form of machine-readable feature vectors to describe the typical feature patterns exhibited by relevant functional entities (nodes) under various known fault modes (such as communication interruption, sampling accuracy drift, failure to operate / false operation). This feature library serves as a benchmark reference for fault diagnosis, provides a basis for comparison and probability calculation for the fault classification module, and is the knowledge foundation for achieving accurate and intelligent fault prediction.
[0047] By generating test scenario behavior sequences based on the corrected semantic relation matrix and topological constraints in the knowledge graph, and using graph neural network algorithms to predict potential fault points, the problem of lack of fault prediction and location capabilities for complex systems in existing technologies is solved. This not only improves the accuracy and reliability of fault prediction, but also provides operation and maintenance personnel with precise guidance on fault location and handling sequence, significantly improving the efficiency of testing and maintenance.
[0048] Step S5: Based on the problem location coordinate set, use the knowledge graph path reasoning algorithm to identify the uncovered interaction relationship paths and generate a multi-dimensional test coverage evaluation report containing semantic descriptions.
[0049] In a further embodiment, step S5 specifically includes: Step S51: Based on the obtained problem location coordinates, extract the interaction relationship information related to the problem location coordinates from the knowledge graph, including the interaction path, interaction frequency and interaction status between entities, and use the path reasoning algorithm to analyze the hidden associations in the interaction relationship, identify the interaction relationship path not covered by the current test scenario, and obtain the detailed mapping of the uncovered path. Step S52: Based on the detailed mapping of the uncovered paths, construct a multi-dimensional test coverage framework in conjunction with semantic description rules. This test coverage framework is used as the analytical basis for evaluating test coverage, determining the coverage of test scenarios in different dimensions such as functional modules, interaction paths, and environmental conditions. If the correlation of uncovered paths in the analytical basis of test coverage is lower than a preset threshold, the mapping relationship of uncovered paths is adjusted through supplementary processing of semantic description. Step S53: Based on the adjusted test coverage framework, generate intermediate data for multi-dimensional evaluation, including a quantitative evaluation of the test coverage of each dimension and specific information on uncovered paths. Combining the correspondence rules between coordinate information and relationship paths, and the semantic description of problem location coordinates and interaction relationships, the intermediate data is structured into the content of the evaluation document. Based on the structured content, a multi-dimensional test coverage evaluation report containing semantic descriptions is generated, and the output format of the evaluation results is determined to provide a basis for subsequent test optimization and improvement.
[0050] The mapping rule between coordinate information and relationship paths is a mapping mechanism used to associate problem location coordinates with interaction relationship paths in the knowledge graph. Specifically, it defines how to correspond physical location coordinates (such as the 3D coordinates of a device) with logical relationship paths described in the knowledge graph (such as interaction paths between modules). For example, if the physical coordinates of a device are (X, Y, Z), and the knowledge graph records an interaction path between that device and another device (such as "device A → device B"), then the mapping rule associates this physical coordinate with this interaction path. This allows the evaluation report to clearly indicate which logical interaction paths are covered and which are not at a specific physical location. This mapping rule ensures that the test coverage evaluation report accurately reflects the coverage of the test scenario at both the physical and logical levels.
[0051] By using knowledge graph path reasoning based on problem location coordinates, uncovered interaction relationship paths are identified, and a multi-dimensional test coverage evaluation report containing semantic descriptions is generated. This solves the problem of incomplete test coverage in existing technologies, not only improving the comprehensiveness of test coverage but also enhancing the readability and practicality of the evaluation report through semantic descriptions. This provides a scientific basis for subsequent test optimization and improvement, and significantly enhances the systematicness and effectiveness of the testing method.
[0052] Step S6: Determine the coverage blind spots based on the uncovered interaction relationship paths, dynamically generate supplementary test scripts for the coverage blind spots based on the rule reasoning engine of the knowledge graph, and execute the supplementary test scripts to receive feedback data in order to update the entity state attributes in the knowledge graph.
[0053] In a further embodiment, step S6 specifically includes: Step S61: Based on the identified uncovered interaction relationship paths and problem location coordinates, obtain entity information related to the coverage blind spot from the knowledge graph, determine the missing data points within the blind spot (representing entity states or interaction behaviors not covered in the current test scenario), and use the rule reasoning engine in the knowledge graph to generate corresponding supplementary test scripts based on the missing data points within the blind spot (aiming to specifically fill the gaps in test coverage and ensure that the test scenario can fully cover the operating logic and potential fault modes of the power distribution system). Step S62: Execute the automated testing process on the generated supplementary test script, record the execution results of the test script and judge the completeness of the feedback data. The test script includes the output data and state changes of each test step. If the completeness of the feedback data meets the preset threshold, the feedback data is mapped to the corresponding entity in the knowledge graph and the entity state attributes are updated. Step S63: If the completeness of the feedback data is lower than the preset threshold, the test script content is readjusted through the rule reasoning engine to obtain an optimized test script. The automated test process is then re-executed based on the optimized test script to obtain new script execution feedback data, which is used to update the entity state attributes in the knowledge graph.
[0054] By dynamically generating supplementary test scripts using a knowledge graph-based rule reasoning engine and updating entity state attributes in the knowledge graph using script execution feedback data, the problem of blind spots in test coverage and the inability to dynamically adjust it in existing technologies is solved. This not only fills the gaps in test coverage but also ensures that the test scenarios can fully cover the operating logic and potential fault modes of the power distribution system by dynamically adjusting the test scripts. This significantly improves the adaptability and accuracy of the tests and provides a more reliable guarantee for the stable operation of the power grid.
[0055] Furthermore, after updating the entity state attributes in the knowledge graph, the process also includes: constructing a power grid stability operation index evaluation system based on the knowledge graph, continuously optimizing the entity association weights in the graph through multiple rounds of iterative testing, and outputting an overall test accuracy evaluation report based on semantic verification.
[0056] Furthermore, the output, based on a semantic verification-based overall test accuracy evaluation report, specifically includes: Key indicators for stable power grid operation (such as power supply reliability, voltage qualification rate, and fault handling time) are decomposed into quantifiable entity attributes (such as protection module action response time and communication module data transmission success rate) and association rules in the knowledge graph. A power grid stable operation indicator evaluation system based on knowledge graph is constructed. Through multiple rounds of iterative testing, the module interaction data and fault prediction results of each round of testing are fed back to the knowledge graph. Combined with semantic verification rules (such as strengthening the corresponding entity association weight if the deviation between the actual fault point and the predicted coordinates is <5%), the weight values of entity associations in the knowledge graph are continuously optimized. Based on the optimized knowledge graph, an overall test accuracy quantitative evaluation report integrating semantic association relationships is generated.
[0057] By outputting an overall test accuracy evaluation report based on semantic verification, the problem of the lack of a comprehensive evaluation and continuous optimization mechanism for power grid stability operation indicators in existing technologies is solved. This not only improves the accuracy and reliability of power grid stability operation indicator evaluation, but also ensures the adaptability and precision of the test method through continuous optimization, providing strong support for the safe and stable operation of the power grid.
[0058] According to optional embodiments, based on the above method, digital twin technology is introduced to construct a three-in-one testing framework of physical terminal, virtual twin, and semantic knowledge graph. The twin maps the physical terminal state in real time, and the knowledge graph provides semantic constraints and reasoning support, realizing a full-process upgrade of dynamic scenario inference, fault virtual-real linkage prediction, and test closed-loop optimization, making up for the shortcomings of traditional methods such as the disconnect between physical and virtual and the single scenario simulation.
[0059] The specific content includes: real-time collection of physical operating parameters (such as measurement module sampling values and control module response time), physical status (shell temperature and interface connection status) and environmental data (electromagnetic field strength and dust concentration) of power distribution terminals through IoT sensors and edge computing units; construction of a 1:1 digital twin based on the terminal CAD model and historical data; synchronous updating of physical data and twin status through the MQTT protocol; calling the distribution network semantic knowledge graph containing virtual-real mapping relationships to align physical data with twin simulation data (such as aligning "twin vibration simulation value" with "equipment health status entity" in the graph); and constructing a semantic relationship network based on virtual-real data association rules to generate an enhanced multimodal dataset with physical + virtual + semantic annotations. The system drives the twin to simulate three types of operating conditions: normal, abnormal, and extreme, generating virtual test data. This data is then merged with physical data to form an expanded dataset. The XGBoost algorithm is used, combined with semantic constraints from the knowledge graph (such as increasing the weight of virtual-real current deviation features by 20% under extreme conditions), to extract semantic association features (such as data flow delay between the measurement module and the control module) and virtual-real mapping features (such as the current deviation rate between the physical and twin systems). The importance of these features is calculated using the information gain ratio and assigned weights to construct a weighted semantic-twin association matrix. Topological constraints and temporal rules are extracted from the knowledge graph (e.g., the physical terminal protection module needs to respond within 500ms after the twin simulates a fault). These are matched with high-weight association pairs (≥0.7) in the matrix to filter effective semantic association sets. The results are then input into the twin scenario inference engine to generate a dynamic test scenario framework (e.g., twin simulates measurement module drift → physical terminal control adjustment → twin simulates adjacent terminal load fluctuation). Finally, the framework is decomposed into a test scenario sequence containing physical operations, virtual operations, and semantic verification according to the virtual-real synchronization temporal rules. Then, abnormal data of physical terminals (such as communication packet loss) and twin simulation data (such as fault propagation path) are collected synchronously during the scenario execution. Fault points are initially identified by matching the virtual and real fault feature alignment module with the knowledge graph fault feature library. A graph attention-twin fusion model is constructed (nodes contain physical + virtual + semantic attributes, and edge weights are matrix quantized values). Global features are learned with the help of GAT and the twin inference results are combined to optimize the prediction and generate a set of virtual and real fusion problem location coordinates with probability annotation (such as 92% fault probability at 25cm, 30cm, and 15cm of physical communication interface, and 88% at the corresponding twin position). The system extracts virtual paths that do not trigger faults from twins, filters unexecuted operations from physical data, calls the knowledge graph path reasoning engine to identify physical (such as high humidity interface testing) and virtual (such as multi-terminal linkage) blind spots by combining virtual and real coverage rules, constructs a physical + virtual + semantic multi-dimensional evaluation framework, and generates a test coverage evaluation report containing blind spot coordinates, semantic explanations, and virtual-real consistency scores (89%). Based on blind spot information, association rules are obtained from the knowledge graph. Supplementary test scripts (such as "interface plugging and unplugging 100 times at RH=95%)" are first generated and optimized in the twin model. Then, they are simultaneously sent to the physical terminal and the twin model for execution. After collecting feedback data to verify the consistency between virtual and real (deviation ≤10%), the entity attributes of the knowledge graph (such as "interface high humidity tolerance attribute is RH≤90%)" and the twin model are updated. A mapping model of power grid stability index - virtual and real test parameters is constructed, and an overall test accuracy evaluation report is output. In the future, the adaptability of the test method can be predicted through long-term simulation of the twin model (such as simulating a 15% load increase in the next year) and pre-optimized scripts can be generated in advance to achieve full life cycle test guarantee for distribution terminals.
[0060] In a further embodiment, this invention provides a fully automated testing method for distribution terminals based on a distribution network semantic knowledge graph. This method addresses the problems of traditional distribution terminal (DTU / FTU) testing, which relies on manual operation of testing instruments, setting fault simulation quantities, and visual judgment of results. These methods suffer from insufficient intelligent test vectors, lack of standardized processes, low test case coverage, and cumbersome and error-prone testing operations due to significant differences in terminal protocols and inconsistent signal semantics among different manufacturers. By constructing a distribution network semantic knowledge graph and combining a multi-source feature matching engine with a one-click automated testing engine, this method achieves fully automated, unmanned testing of distribution terminals, from test case generation, signal application, data acquisition to result judgment. This results in a test case reuse rate of ≥80%, scenario coverage of ≥90%, a 60% reduction in the overall testing cycle, and an anomaly detection coverage of ≥90%. It significantly reduces reliance on manual labor and the risk of misjudgment, and is adaptable to the testing needs of terminals from multiple manufacturers.
[0061] In the process of constructing the semantic knowledge graph of the distribution network, the first step is to collect and preprocess the data, including data acquisition, extraction of unstructured data such as distribution terminal technical specifications, equipment manuals, and communication point tables, covering key information such as equipment model, signal point number, communication parameters (such as baud rate and IP address), fault simulation thresholds (such as short-circuit current and overvoltage setting), and functional logic (such as protection action linkage relationship). Paper documents are converted into electronic text using OCR recognition technology, and text cleaning (removing redundant annotations and standardizing terminology, such as initially standardizing remote signaling and YX) and data anonymization (removing sensitive information from manufacturers) are performed to filter out effective data related to equipment-signal-channel association.
[0062] Natural Language Processing (NLP) techniques, such as the BERT model and BiLSTM-CRF algorithm, are used to extract the three-element entity relationship between equipment, signal and channel from the preprocessed data. For example, the relationship between DTU terminal-A phase current signal-analog input channel 1 and FTU terminal-line trip remote signaling-switching input channel 3 is extracted. Based on knowledge of the power distribution network field, core concepts (equipment type: DTU / FTU; signal classification: telemetry / remote signaling / remote control; channel attributes: communication protocol, interface type) and relationships between concepts (such as equipment containing signals and signal-related channels) are defined, an ontology framework is constructed, and an initial knowledge graph is formed.
[0063] By employing knowledge representation learning algorithms (TransE, RotatE), entities and relations are embedded into a low-dimensional vector space to resolve semantic conflicts caused by synonyms (such as overcurrent protection and OC protection) and abbreviation differences (such as telemetry and YC), thus achieving semantic alignment of cross-source data. Use graph databases (such as Neo4j) to store knowledge graphs, support dynamic updates (such as adding terminal models or updating communication protocol parameters), and ensure the timeliness and accuracy of the signal-device-channel association network. The knowledge graph should cover ≥90% of the "signal-device-channel" association relationship.
[0064] The multi-source feature matching engine designs feature extraction strategies for telemetry, teleindication, and topology multimodal data generated during the testing process: For telemetry data, statistical characteristics (mean, variance, peak value) and time series characteristics (trend of change, frequency of fluctuation) of analog quantities such as voltage and current are extracted to verify the stability and compliance of the data. For remote signaling data, the status signals such as switch opening and closing, and protection actions are time-coded, such as converting the "opening-closing-opening" sequence into a "0-1-0" binary vector for analyzing the continuity of action logic; For topological data, the distribution network structure (such as the connection relationship between terminals, lines, and switches) is transformed into a graph structure representation, with devices as nodes and connection relationships as edges, to verify the topological logic rationality in the test scenario.
[0065] Feature fusion uses an attention mechanism (Transformer) to dynamically weight the weights of multi-source features, adjusts the importance of each feature according to the test scenario (such as fault simulation, conventional function test), generates a unified feature vector, and avoids misjudgment of a single data dimension. A three-dimensional verification matrix of time series - threshold - logic is constructed: the dynamic time warping (DTW) algorithm is used to compare the test signal with the standard time series template (such as the protection action response time series) to verify the signal synchronization; through the threshold interval matching algorithm, it is judged whether the telemetry data (such as voltage 10 ± 0.5 kV) is within the compliance range defined by the knowledge graph; based on the Bayesian network model, the logical linkage relationship between signals (such as when the line is short-circuited, the corresponding circuit breaker should trip) is verified, and the abnormal detection coverage rate is required to be ≥ 90%.
[0066] The one-key automated test engine disassembles the distribution terminal test functions into atomic logic modules such as setting value configuration, fault simulation, remote signal acquisition, and remote control execution. Each module defines clear interface parameters (such as fault simulation requires input of fault type, fault value, and duration), data flow constraints (such as fault simulation needs to complete setting value configuration first and then collect remote signal responses), and judgment conditions (such as the remote signal response delay ≤ 50 ms is qualified). The module logic and judgment criteria are entered into the standardized logic library to support modular call and flexible combination, and adapt to the test requirements of different terminals.
[0067] In the process of automatic generation and execution of test tasks, first, based on the semantic association rules of the distribution network semantic knowledge graph, the standard test cases (such as 10 kV line short-circuit fault test and telemetry accuracy verification) are automatically mapped to the physical signal channels. For example, the "short-circuit current test" case is mapped to the current output channel of the substation tester to determine the signal application parameters (such as 300 A, lasting 200 ms); the engine communicates with the tester and the distribution terminal through the RS485 / Ethernet interface and automatically completes: sending setting values (such as overcurrent protection setting value 15 A) and communication parameters (such as 104 protocol IP address) to the distribution terminal; controlling the tester to output fault simulation signals (voltage / current / switching quantity); real-time collecting the telemetry data (such as the actual measured current value), remote signal status (such as the switch action result), and SOE event records returned by the terminal.
[0068] Based on the three-dimensional verification matrix of the multi-source feature matching engine, the collected data is judged for time sequence compliance (such as whether the action delay meets the standard), threshold accuracy (such as whether the telemetry value is within the error range), and logical correlation (such as whether the protection action and the switch status match), and qualified / unqualified items and abnormal reasons (such as remote signaling response delay of 60ms, exceeding the 50ms threshold). It automatically generates structured test reports, including test items, expected results, actual results, judgment conclusions, and anomaly analysis. It supports exporting to PDF / Excel format for easy traceability and archiving.
[0069] The beneficial effects of this invention are as follows: Compared with the prior art, this invention provides an automated testing method and system for distribution terminals based on a distribution network semantic knowledge graph. It solves the problem that traditional testing methods can only perform isolated functional verification. By utilizing the distribution network semantic knowledge graph to perform entity alignment and relationship mapping on the collected distribution terminal operating data and environmental sensor readings, the deep coupling and dependency relationships between various semantic entities within the terminal (such as protection units, metering modules, communication interfaces, etc.) can be identified and associated. This allows for the evaluation of the collaborative working mechanism between entities and its impact on overall performance at the system level, achieving comprehensive system-level testing of the distribution terminal and improving the comprehensiveness and accuracy of the test. Furthermore, by determining the degree of interference of environmental factors on entity associations from the semantic relationship matrix and adjusting the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, a corrected semantic relationship matrix is obtained. This overcomes the limitation of existing testing methods lacking dynamic perception and adaptive correction mechanisms for environmental interference, enabling dynamic perception of the impact of environmental factors (such as temperature, humidity, electromagnetic interference, etc.) on terminal operating parameters and entities. The system mitigates the impact of inter-relationship characteristics and performs adaptive corrections, making test results more accurate and reliable in real-world operating environments. This significantly reduces test deviations caused by environmental interference and improves the adaptability and reliability of test results. Based on knowledge graph path reasoning, it identifies uncovered interaction paths and generates a multi-dimensional test coverage assessment report with semantic descriptions. Simultaneously, it dynamically generates supplementary test scripts for coverage blind spots using the knowledge graph's rule reasoning engine, and updates entity state attributes in the knowledge graph through script execution feedback data. This addresses the problem of incomplete test coverage in existing testing methods, not only identifying uncovered test paths but also filling gaps in test coverage through dynamic supplementary test script generation, further improving the test coverage scope. Furthermore, through multiple rounds of iterative testing, it continuously optimizes entity association weights in the graph, constructs a knowledge graph-based evaluation system for power grid stability operation indicators, and outputs an overall test accuracy assessment report based on semantic verification. This achieves continuous optimization of the testing method and continuous improvement of test results, ensuring the comprehensiveness and reliability of distribution terminal testing.
[0070] This invention can be a system, method, and / or computer program product. This invention also discloses an automated testing system for distribution terminals based on a distribution network semantic knowledge graph, which is based on the aforementioned automated testing method for distribution terminals based on a distribution network semantic knowledge graph. The system includes: The alignment and mapping module is used to acquire real-time operating data of power distribution terminals and environmental sensor readings. Based on the semantic knowledge graph of the power distribution network, it performs entity alignment and relation mapping on the real-time operating data and environmental sensor readings to generate a multimodal dataset with semantic annotation. The feature extraction module is used to extract the association features of semantic entities based on the semantically labeled multimodal dataset, using the random forest algorithm combined with the semantic constraints of the power distribution network semantic knowledge graph, and construct a semantic relationship matrix with weight attributes, wherein the weight attributes reflect the semantic dependency strength based on the knowledge graph. An environmental interference judgment module is used to extract environmental factors from the semantic relationship matrix, determine the degree of interference of the environmental factors on entity association, adjust the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, and obtain a corrected semantic relationship matrix. The problem localization module is used to generate a test scenario behavior sequence based on the corrected semantic relationship matrix and the topological constraints in the distribution network semantic knowledge graph, and to use a graph neural network algorithm to predict potential fault points, outputting a problem localization coordinate set with probability labels. The path identification module is used to identify uncovered interaction relationship paths based on the problem location coordinate set, and to generate a multi-dimensional test coverage evaluation report containing semantic descriptions. The knowledge graph update module is used to determine the coverage blind spots based on the uncovered interaction relationship paths, dynamically generate supplementary test scripts for the coverage blind spots based on the rule reasoning engine of the knowledge graph, and execute the supplementary test scripts to receive feedback data in order to update the entity state attributes in the knowledge graph.
[0071] Based on the spirit of this invention, those skilled in the art will readily conceive of obtaining a computer program product based on the aforementioned automated testing method for distribution terminals based on a distribution network semantic knowledge graph. The computer program product may include a computer-readable storage medium on which computer-readable program instructions are loaded to enable a processor to implement various aspects of this disclosure. That is, this application also includes a terminal comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the aforementioned automated testing method for distribution terminals based on a distribution network semantic knowledge graph.
[0072] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0073] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0074] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. An automated testing method for distribution terminals based on a distribution network semantic knowledge graph, characterized in that, Includes the following steps: Step S1: Obtain real-time operating data of the power distribution terminal and environmental sensor readings. Based on the semantic knowledge graph of the power distribution network, perform entity alignment and relation mapping on the real-time operating data and environmental sensor readings to generate a multimodal dataset with semantic annotation. Step S2: Based on the semantically labeled multimodal dataset, the association features of semantic entities are extracted using the random forest algorithm combined with the semantic constraints of the power distribution network semantic knowledge graph, and a semantic relation matrix with weight attributes is constructed. The weight attributes reflect the semantic dependency strength based on the knowledge graph. Step S3: Extract environmental factors from the semantic relationship matrix, determine the degree of interference of the environmental factors on entity association, adjust the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, and obtain the corrected semantic relationship matrix; Step S4: Based on the corrected semantic relation matrix, and combined with the topological constraints in the distribution network semantic knowledge graph, generate a test scenario behavior sequence, use a graph neural network algorithm to predict potential fault points, and output a problem location coordinate set with probability labels; Step S5: Based on the problem location coordinate set, use the knowledge graph path reasoning algorithm to identify the uncovered interaction relationship paths and generate a multi-dimensional test coverage evaluation report containing semantic descriptions; Step S6: Determine the coverage blind spots based on the uncovered interaction relationship paths, dynamically generate supplementary test scripts for the coverage blind spots based on the rule reasoning engine of the knowledge graph, and execute the supplementary test scripts to receive feedback data in order to update the entity state attributes in the knowledge graph.
2. The automated testing method for distribution terminals based on distribution network semantic knowledge graph according to claim 1, characterized in that, Step S1 further includes: Operational data and environmental sensor readings are collected through the power distribution terminal interface. A pre-established semantic knowledge graph of the power distribution network is used to align the collected data with entities, identify key entities in the operational data and sensor readings, and obtain an aligned set of entities. Perform relation mapping operations on the aligned entity set, construct an association network between entities based on semantic relations in the knowledge graph, determine the semantic association results, and generate a multimodal dataset with semantic annotation by combining running data and sensor readings. The distribution network semantic knowledge graph is a structured semantic network that describes the various functional modules in the distribution terminal system and the semantic relationships between them.
3. The automated testing method for distribution terminals based on distribution network semantic knowledge graph according to claim 2, characterized in that, Step S2 further includes: Based on the complete structured multimodal dataset, the random forest algorithm is used to learn the features related to semantic entities in the dataset. Combined with the predefined entity type labels in the power distribution network semantic knowledge graph, the category attributes and boundary information of each semantic entity are identified. By calling the node attributes and edge information related to the identified entities in the knowledge graph, and using the graph semantic constraints as a priori conditions for feature selection, entity association features that conform to semantic logic are extracted from multimodal data. The importance score of the associated features is calculated and the quantification result is determined by using the random forest algorithm. Combined with the semantic dependency rules between entities in the knowledge graph, weight values reflecting the semantic dependency strength are assigned to entity pairs to construct a semantic relation matrix with weight attributes, where the weight values reflect the semantic dependency strength based on the knowledge graph.
4. The automated testing method for distribution terminals based on distribution network semantic knowledge graph according to claim 3, characterized in that, Step S3 further includes: Environmental factors are extracted from the semantic relation matrix, and the environmental factors and entity associations are initially decomposed to obtain the degree of interference of environmental factors on entity associations. A preset threshold is used for comparison. If the degree of interference exceeds the threshold, the elements of the semantic relation matrix are initially adjusted to obtain the initially corrected matrix data. Based on the initially corrected matrix data, dynamic information on parameter changes is obtained, the mapping relationship between parameter changes and the degree of interference is analyzed, the adjusted element weights are determined, and the matrix elements are updated and optimized a second time by combining the inherent relationship between semantic relations and entity associations to obtain the optimized relation matrix. The optimized relation matrix is sparsified to retain key semantic associations and reduce redundant information, resulting in a sparsified optimized matrix. The residual interference of environmental factors on entity associations is analyzed, and the quantification value of the residual interference of each entity on the association relationship is calculated. Based on the quantization value of the residual interference, local element correction is performed on the regions where the quantization value of the residual interference exceeds the preset correction threshold to obtain the corrected semantic relation matrix.
5. The automated testing method for distribution terminals based on distribution network semantic knowledge graph according to claim 4, characterized in that, In step S4, a graph neural network algorithm is used to predict potential fault points and output a problem location coordinate set with probability labels, which further includes: The generated test scenario behavior sequence is transformed into a graph structure data representation that can be processed by a graph neural network. Each functional semantic entity in the power distribution terminal is a graph node, and the node attributes include module type, real-time operating parameters and historical state sequence. The interaction behavior between entities is an edge, and the edge attributes include semantic dependency weight, interaction frequency and real-time state information. Deep representation learning of graph structures is performed through graph convolutional network (GCN) or graph attention network (GAT) models. Graph convolutional network generates globally aware node embedding vectors by aggregating the features of node neighbors, while graph attention network uses attention mechanisms to highlight key related edges and abnormal node features to capture latent patterns. The learned node feature vectors are input into the fault classification module and matched with the predefined fault feature library in the knowledge graph. The probability of occurrence of each node under different fault modes is calculated to obtain the potential fault point set. Based on the semantic entity-physical device mapping relationship maintained in the knowledge graph, the physical deployment information corresponding to each abnormal node in the potential fault point set is extracted to form a three-dimensional physical coordinate. Combined with the node fault probability value output by the graph neural network, each physical coordinate is probabilistically labeled. For cases where multiple modules are coupled at the same physical location, probability fusion and normalization are performed. Based on the fault propagation path and influence weight defined in the knowledge graph, the probability values of key locations are dynamically corrected, and a problem location coordinate set with probability annotations is output.
6. The automated testing method for distribution terminals based on distribution network semantic knowledge graph according to claim 5, characterized in that, Step S5 further includes: Based on the problem location coordinates, interactive relationship information related to the problem location coordinates is extracted from the knowledge graph. The hidden associations in the interactive relationships are analyzed using a path reasoning algorithm to identify interactive relationship paths that are not covered by the current test scenario and obtain detailed mappings of the uncovered paths. Based on the detailed mapping of uncovered paths, a multi-dimensional test coverage framework is constructed in conjunction with semantic description rules. This test coverage framework serves as the analytical basis for evaluating test coverage and determines the coverage of test scenarios in different dimensions. If the correlation of uncovered paths in the analytical basis of test coverage is lower than a preset threshold, the mapping relationship of uncovered paths is adjusted through supplementary processing of semantic description. Based on the adjusted test coverage framework, intermediate data for multi-dimensional evaluation is generated, including a quantitative assessment of the test coverage of each dimension and specific information on uncovered paths. Combining the correspondence rules between coordinate information and relationship paths, and the semantic description of problem location coordinates and interaction relationships, the intermediate data is structured into the content of the evaluation document. Based on the structured content, a multi-dimensional test coverage evaluation report containing semantic descriptions is generated, and the output format of the evaluation results is determined.
7. The automated testing method for distribution terminals based on distribution network semantic knowledge graph according to claim 6, characterized in that, Step S6 further includes: Based on the identified uncovered interaction paths and problem location coordinates, entity information related to the coverage blind spots is obtained from the knowledge graph, the missing data points within the blind spots are determined, and the rule reasoning engine in the knowledge graph is used to generate corresponding supplementary test scripts based on the missing data points within the blind spots. An automated testing process is executed on the generated supplementary test script, the execution results of the test script are recorded, and the completeness of the feedback data is judged. The test script includes the output data and state changes of each test step. If the completeness of the feedback data meets the preset threshold, the feedback data is mapped to the corresponding entity in the knowledge graph, and the entity state attributes are updated. If the completeness of the feedback data is lower than the preset threshold, the test script content is readjusted through the rule reasoning engine to obtain an optimized test script. Based on the optimized test script, the automated test process is re-executed to obtain new script execution feedback data, which is then used to update the entity state attributes in the knowledge graph.
8. An automated testing system for distribution terminals based on a distribution network semantic knowledge graph, characterized in that, include: The alignment and mapping module is used to acquire real-time operating data of power distribution terminals and environmental sensor readings. Based on the semantic knowledge graph of the power distribution network, it performs entity alignment and relation mapping on the real-time operating data and environmental sensor readings to generate a multimodal dataset with semantic annotation. The feature extraction module is used to extract the association features of semantic entities based on the semantically labeled multimodal dataset, using the random forest algorithm combined with the semantic constraints of the power distribution network semantic knowledge graph, and construct a semantic relationship matrix with weight attributes, wherein the weight attributes reflect the semantic dependency strength based on the knowledge graph. An environmental interference judgment module is used to extract environmental factors from the semantic relationship matrix, determine the degree of interference of the environmental factors on entity association, adjust the elements of the semantic relationship matrix according to the degree of interference to reflect parameter changes, and obtain a corrected semantic relationship matrix. The problem localization module is used to generate a test scenario behavior sequence based on the corrected semantic relationship matrix and the topological constraints in the distribution network semantic knowledge graph, and to use a graph neural network algorithm to predict potential fault points, outputting a problem localization coordinate set with probability labels. The path identification module is used to identify uncovered interaction relationship paths based on the problem location coordinate set, and to generate a multi-dimensional test coverage evaluation report containing semantic descriptions. The knowledge graph update module is used to determine the coverage blind spots based on the uncovered interaction relationship paths, dynamically generate supplementary test scripts for the coverage blind spots based on the rule reasoning engine of the knowledge graph, and execute the supplementary test scripts to receive feedback data in order to update the entity state attributes in the knowledge graph.
9. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the automated testing method for distribution terminals based on distribution network semantic knowledge graphs according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the automated testing method for distribution terminals based on a distribution network semantic knowledge graph as described in any one of claims 1-7.