Search

CN-122017447-A - Distribution terminal automatic testing method and system based on distribution network semantic knowledge graph

CN122017447ACN 122017447 ACN122017447 ACN 122017447ACN-122017447-A

Abstract

A distribution terminal automatic test method and system based on distribution network semantic knowledge graph. The method comprises the steps of obtaining running data of a power distribution terminal and readings of an environmental sensor, carrying out entity alignment and relation mapping to generate a multi-mode data set with semantic labels, extracting association features of semantic entities by combining a random forest algorithm with semantic constraints to construct a semantic relation matrix with weight attributes, determining interference degrees of environmental factors on entity association, adjusting elements of the relation matrix according to the interference degrees, generating a test scene behavior sequence by combining topological constraints in a knowledge graph, carrying out fault point prediction by adopting a graph neural network algorithm, positioning a coordinate set based on a probability labeling problem, identifying an uncovered interaction relation path, and generating a multi-dimensional test coverage assessment report containing semantic description. According to the scheme provided by the invention, the cooperative working mechanism is evaluated from the system level, so that the accuracy of the test result in the actual running environment is improved, and the test coverage is increased.

Inventors

  • SUN XIAO
  • LI QIRAN
  • ZHAO XIAOLONG
  • ZHANG ZHAOYU
  • SUN HANXUAN
  • WANG HAONAN
  • LI XUE
  • HUANG RUI
  • YANG BORAN
  • ZHANG JIE
  • LI XINLONG
  • ZHANG ZHIKUN
  • GAO SHUO
  • TAO FUCHENG
  • WANG WEI
  • WANG HAO
  • LI JINJIN
  • DU PENG
  • LIU MINGYUAN

Assignees

  • 国网冀北电力有限公司唐山供电公司

Dates

Publication Date
20260512
Application Date
20251204

Claims (10)

  1. 1. The automatic testing method for the power distribution terminal based on the distribution network semantic knowledge graph is characterized by comprising the following steps of: Step S1, acquiring real-time operation data and environment sensor readings of a power distribution terminal, and performing entity alignment and relation mapping on the real-time operation data and the environment sensor readings based on a distribution network semantic knowledge graph to generate a multi-mode data set with semantic annotation; S2, according to the multi-mode data set with semantic annotation, extracting association features of semantic entities by utilizing a random forest algorithm in combination with semantic constraints of the distribution network semantic knowledge graph, and constructing a semantic relation matrix with weight attributes, wherein the weight attributes reflect semantic dependency strength based on the knowledge graph; s3, extracting environmental factors from the semantic relation matrix, determining the interference degree of the environmental factors on entity association, adjusting elements of the semantic relation matrix according to the interference degree to reflect parameter changes, and obtaining a corrected semantic relation matrix; S4, generating a test scene behavior sequence based on the corrected semantic relation matrix and combining with topological constraints in the distribution network semantic knowledge graph, and predicting potential fault points by adopting a graph neural network algorithm to output a problem positioning coordinate set with probability labels; S5, identifying an uncovered interaction relation path by adopting a knowledge graph path reasoning algorithm based on the problem positioning coordinate set, and generating a multi-dimensional test coverage evaluation report containing semantic description; and S6, determining a coverage blind area according to the uncovered interaction relation path, dynamically generating a supplementary test script aiming at the coverage blind area based on a rule reasoning engine of the knowledge graph, and executing feedback data through the supplementary test script to update entity state attributes in the knowledge graph.
  2. 2. The automatic testing method for power distribution terminals based on semantic knowledge graph of distribution network according to claim 1, wherein the step S1 further comprises: Acquiring operation data and environmental sensor readings through a power distribution terminal interface, performing entity alignment on the acquired data by adopting a pre-established distribution network semantic knowledge graph, and identifying key entities in the operation data and the sensor readings to obtain an aligned entity set; performing relation mapping operation on the aligned entity sets, constructing a correlation network among the entities based on semantic relations in the knowledge graph, determining a semantic correlation result, and generating a multi-mode data set with semantic labels by combining information of operation data and sensor readings; the distribution network semantic knowledge graph is a structured semantic network and describes each functional module in the distribution terminal system and semantic relations among the functional modules.
  3. 3. The automatic testing method for power distribution terminals based on the distribution network semantic knowledge graph according to claim 2, wherein the step S2 further comprises: According to the complete structured multi-mode data set, learning the characteristics related to semantic entities in the data set by adopting a random forest algorithm, and identifying the category attribute and boundary information of each semantic entity by combining with the predefined entity type label in the distribution network semantic knowledge graph; invoking node attributes and side information related to the identified entity in the knowledge graph, taking the graph semantic constraint as a priori condition of feature selection, and extracting entity association features conforming to semantic logic from the multi-modal data; calculating importance scores of the associated features by adopting a random forest algorithm, determining a quantization result, and combining semantic dependency rules among entities in the map to endow the entity pairs with weight values reflecting semantic dependency intensity to construct a semantic relation matrix with weight attributes, wherein the weight values reflect the semantic dependency intensity based on the knowledge map.
  4. 4. The automatic testing method for power distribution terminals based on semantic knowledge graph of distribution network according to claim 3, wherein the step S3 further comprises: Extracting environmental factors from the semantic relation matrix, performing preliminary decomposition on the environmental factors and entity association, acquiring interference degree of the environmental factors on the entity association, comparing by adopting a preset threshold, and performing preliminary adjustment on elements of the semantic relation matrix if the interference degree exceeds the threshold to obtain preliminary corrected matrix data; according to the preliminarily corrected matrix data, acquiring dynamic information of parameter variation, analyzing a mapping relation between the parameter variation and the interference degree, determining an adjusted element weight, and carrying out secondary updating optimization on matrix elements by combining the semantic relation and the internal relation of entity association to obtain an optimized relation matrix; performing sparsification treatment on the optimized relation matrix, reserving key semantic association and reducing redundant information to obtain a sparsified optimized matrix, analyzing residual interference of environmental factors on entity association, and calculating a quantized value of each entity on the residual interference in the association relation; And carrying out local element correction on the area with the quantized value of the residual interference exceeding a preset correction threshold according to the quantized value of the residual interference, and obtaining a corrected semantic relation matrix.
  5. 5. The automatic testing method of power distribution terminals based on semantic knowledge graph of distribution network according to claim 4, wherein in step S4, a graph neural network algorithm is adopted to predict potential fault points, and a problem positioning coordinate set with probability labels is output, and further comprising: Converting the generated test scene behavior sequence into graph structure data representation which can be processed by a graph neural network, taking each functional semantic entity in a power distribution terminal as a graph node, wherein node attributes comprise module types, real-time operation parameters and historical state sequences, and taking interaction behaviors among the entities as edges, wherein the edge attributes comprise semantic dependency weights, interaction frequencies and real-time state information; Deep characterization learning is carried out on the graph structure through a graph rolling network GCN or a graph annotation meaning network GAT model, the graph rolling network generates a globally perceived node embedded vector through aggregation of node neighbor features, and the graph annotation meaning network highlights key associated edges and abnormal node features by using a attention mechanism and is used for capturing a hidden mode; inputting the node characteristic vector obtained by learning into a fault classification module, matching with a predefined fault characteristic library in a knowledge graph, and calculating the occurrence probability of each node under different fault modes to obtain a potential fault point set; Based on the mapping relation between semantic entities and physical equipment maintained in the knowledge graph, extracting physical deployment information corresponding to each abnormal node in the potential fault point set to form three-dimensional physical coordinates, and carrying out probability labeling on each physical coordinate by combining the node fault probability value output by the graph neural network; And carrying out probability fusion and normalization processing on the condition that multiple modules are coupled in the same physical position, dynamically correcting the probability value of the key position according to the fault propagation path and the influence weight defined in the knowledge graph, and outputting a problem positioning coordinate set with probability labeling.
  6. 6. The automatic testing method for power distribution terminals based on semantic knowledge graph of distribution network according to claim 5, wherein the step S5 further comprises: based on the problem positioning coordinates, extracting interaction relation information related to the problem positioning coordinates from the knowledge graph, analyzing hidden association in the interaction relation by adopting a path reasoning algorithm, and identifying an interaction relation path which is not covered by the current test scene to obtain detailed mapping of the uncovered path; Constructing a multi-dimensional test coverage frame according to detailed mapping of the uncovered paths and combining semantic description rules, wherein the test coverage frame is used for evaluating an analysis basis of test coverage conditions, determining coverage degrees of a test scene on different dimensions, and if the relevance of the uncovered paths in the analysis basis of the test coverage is lower than a preset threshold, adjusting the mapping relation of the uncovered paths through complementary processing of semantic description; Based on the adjusted test coverage frame, generating intermediate data of multi-dimensional evaluation, comprising quantitative evaluation of each dimension test coverage condition and specific information of an uncovered path, combining corresponding rules of coordinate information and a relation path, combining semantic description of problem positioning coordinates and interactive relation, structuring the intermediate data into content of an evaluation document, generating a multi-dimensional test coverage evaluation report comprising the semantic description according to the structured content, and determining an output form of an evaluation result.
  7. 7. The automatic testing method for power distribution terminals based on semantic knowledge graph of distribution network according to claim 6, wherein the step S6 further comprises: Acquiring entity information related to a coverage blind area from a knowledge graph based on the identified uncovered interaction relation path and the problem positioning coordinates, determining missing data points in the blind area range, and generating a corresponding supplementary test script according to the missing data points in the blind area range by adopting a rule reasoning engine in the knowledge graph; executing an automatic test flow on the generated supplementary test script, recording an execution result of the test script and judging the integrity of feedback data, wherein the test script comprises output data and state change of each test step, and if the integrity of the feedback data accords with a preset threshold value, mapping the feedback data to a corresponding entity in a knowledge graph and updating the entity state attribute; And if the integrity of the feedback data is lower than a preset threshold value, readjusting the content of the test script through a rule reasoning engine to obtain an optimized test script, re-executing an automatic test flow based on the optimized test script, obtaining new script execution feedback data, and updating entity state attributes in a knowledge graph.
  8. 8. Distribution terminal automation test system based on join in marriage net semantic knowledge map, characterized by comprising: the alignment mapping module is used for acquiring real-time operation data and environment sensor readings of the power distribution terminal, performing entity alignment and relation mapping on the real-time operation data and the environment sensor readings based on the distribution network semantic knowledge graph, and generating a multi-mode data set with semantic annotation; The feature extraction module is used for extracting the associated features of the semantic entities by combining the semantic constraint of the distribution network semantic knowledge graph through a random forest algorithm according to the multimodal data set with the semantic annotation, and constructing a semantic relation matrix with weight attributes, wherein the weight attributes reflect semantic dependency strength based on the knowledge graph; The environment interference judging module is used for extracting environment factors from the semantic relation matrix, determining the interference degree of the environment factors on entity association, adjusting elements of the semantic relation matrix according to the interference degree to reflect parameter changes, and obtaining a corrected semantic relation matrix; The problem positioning module is used for generating a test scene behavior sequence based on the corrected semantic relation matrix and combining with topological constraints in the distribution network semantic knowledge graph, predicting potential fault points by adopting a graph neural network algorithm, and outputting a problem positioning coordinate set with probability labels; the path identification module is used for identifying an uncovered interaction relation path by adopting a knowledge graph path reasoning algorithm based on the problem positioning coordinate set and generating a multi-dimensional test coverage evaluation report containing semantic description; The knowledge graph updating module is used for determining a coverage blind area according to the uncovered interaction relation path, dynamically generating a supplementary test script aiming at the coverage blind area based on a rule reasoning engine of the knowledge graph, and executing feedback data through the supplementary test script to update entity state attributes in the knowledge graph.
  9. 9. A terminal comprises a processor and a storage medium, and is characterized in that: The storage medium is used for storing instructions; The processor is configured to operate according to the instructions to perform the steps of the distribution terminal automation test method based on the distribution network semantic knowledge graph according to any one of claims 1-7.
  10. 10. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor implements the steps of the distribution terminal automation test method based on distribution network semantic knowledge graph according to any one of claims 1-7.

Description

Distribution terminal automatic testing method and system based on distribution network semantic knowledge graph Technical Field The invention belongs to the field of power distribution terminal testing, and particularly relates to a power distribution terminal automatic testing method and system based on a distribution network semantic knowledge graph. Background In the operation and maintenance of an electric power system, the power distribution terminal test is a core link for guaranteeing the safety and stability of a power grid and the reliability of power supply, and along with the deep promotion of the construction of a smart power grid, the function of the power distribution terminal is more and more complex, the operation environment of the power distribution terminal also presents diversified characteristics, and higher requirements are provided for the comprehensiveness, the accuracy and the adaptability of a test technology. The traditional testing method mainly depends on a preset fixed flow and static scripts, is difficult to effectively cope with diversified challenges brought by different terminal models, changeable environmental conditions and sudden fault scenes, cannot deeply capture dynamic association relations among semantic entities in equipment and complex influences of environmental factors on system behaviors, and particularly lacks of quantitative analysis capability of association characteristics among semantic entities and environmental interference factors. On one hand, deep coupling and dependency relation exists among semantic entities (such as a protection unit, a metering module, a communication interface and the like) in the terminal, but the traditional method can only perform isolated function verification, cannot evaluate a cooperative working mechanism among the entities and influence on the overall performance from a system level, and on the other hand, environmental factors (such as temperature, humidity, electromagnetic interference and the like) can obviously change the terminal operation parameters and the correlation characteristics among the entities, and the existing test method lacks a dynamic sensing and self-adaptive correction mechanism for the environmental interference, so that a test result can be obviously deviated in an actual operation environment. Disclosure of Invention In order to solve the defects in the prior art, the invention provides an automatic testing method and system for a power distribution terminal based on a distribution network semantic knowledge graph, which are used for solving the technical problems that the traditional method cannot evaluate a cooperative work mechanism among entities from a system level and influence on the overall performance, the dynamic perception and self-adaptive correction mechanism for environmental interference is lacking, so that a test result may have obvious deviation in an actual running environment, test coverage is incomplete, an uncovered test path cannot be identified, and a supplementary test script cannot be dynamically generated, so that the test coverage is limited. In order to solve the technical problems, the invention adopts the following technical scheme. The invention firstly discloses a distribution terminal automatic test method based on a distribution network semantic knowledge graph, which comprises the following steps: Step S1, acquiring real-time operation data and environment sensor readings of a power distribution terminal, and performing entity alignment and relation mapping on the real-time operation data and the environment sensor readings based on a distribution network semantic knowledge graph to generate a multi-mode data set with semantic annotation; S2, according to the multi-mode data set with semantic annotation, extracting association features of semantic entities by utilizing a random forest algorithm in combination with semantic constraints of the distribution network semantic knowledge graph, and constructing a semantic relation matrix with weight attributes, wherein the weight attributes reflect semantic dependency strength based on the knowledge graph; s3, extracting environmental factors from the semantic relation matrix, determining the interference degree of the environmental factors on entity association, adjusting elements of the semantic relation matrix according to the interference degree to reflect parameter changes, and obtaining a corrected semantic relation matrix; S4, generating a test scene behavior sequence based on the corrected semantic relation matrix and combining with topological constraints in the distribution network semantic knowledge graph, and predicting potential fault points by adopting a graph neural network algorithm to output a problem positioning coordinate set with probability labels; S5, identifying an uncovered interaction relation path by adopting a knowledge graph path reasoning algorithm based on the problem positioning coordinat