SCD file processing method and device based on knowledge graph, terminal equipment and storage medium
By generating virtual terminal tables and soft clamp lists, and combining knowledge graph models and Levenshtein distance algorithms, the problem of low efficiency in SCD file processing is solved, and automated verification and efficient file validation are achieved.
Patent Information
- Application Number
- CN202511568545.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-06
AI Technical Summary
Existing technologies for processing SCD files based on knowledge graphs are inefficient, while manual verification methods are inefficient, have a high error rate, and require a large workload.
By acquiring the SCD file of the substation system, a virtual terminal table and a soft pressure plate list are generated based on a preset parsing method. Similarity distance values are calculated, and information visualization or file anomalies are marked using a knowledge graph model. File verification is performed by combining DOM4J parsing and the Levenshtein distance algorithm.
It enables automated verification of SCD files, improving processing efficiency, reducing human error, and enhancing the accuracy and speed of file verification.
Smart Images

Figure CN121480490A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of file verification, and in particular to an SCD file processing method and device based on a knowledge graph, a terminal device and a storage medium. BACKGROUND
[0002] In a substation system, there is a substation system configuration description (SCD) file defined based on the IEC 61850 standard, which is used to describe the complete structure and device interaction relationship of the substation automation system. In the prior art, the SCD file is mainly verified by a traditional manual method, which is low in efficiency, high in error rate and heavy in workload. Therefore, the existing SCD file processing based on a knowledge graph has the technical problem of low efficiency. SUMMARY
[0003] The present application provides an SCD file processing method and device based on a knowledge graph, a terminal device and a storage medium, which can solve the problem of low efficiency in the prior art SCD file processing based on a knowledge graph.
[0004] The SCD file processing method based on a knowledge graph provided by the present application comprises the following steps:
[0005] An SCD file of a substation system is obtained;
[0006] The SCD file is parsed based on a preset parsing method to generate a virtual terminal table and a soft press plate list;
[0007] A similarity distance value is calculated according to the virtual terminal table and the soft press plate list;
[0008] It is determined whether the similarity distance value is less than a distance threshold value;
[0009] If yes, the SCD file is information-visualized based on a knowledge graph model.
[0010] If no, the SCD file is marked as abnormal;
[0011] Further, the SCD file is parsed based on the preset parsing method to generate the virtual terminal table and the soft press plate list, which comprises the following steps:
[0012] The SCD file is parsed by a DOM4J parsing method to obtain functional soft press plate data and the names and description information of a plurality of terminal devices;
[0013] According to the name and description information of each terminal device, the device type and soft pad transmission information of each terminal device are determined, and according to the corresponding string of the device type and soft pad transmission information of each terminal device, a virtual terminal table is determined;
[0014] According to the name of each terminal device, the link type is determined;
[0015] Based on the link type, the soft pad transmission information is screened to obtain soft pad transmission data;
[0016] According to the corresponding string of the soft pad transmission data and the functional soft pad data, a soft pad list is determined.
[0017] Further, the link type includes an SV link and a GOOSE link; and the determination of the link type according to the name of each terminal device includes:
[0018] The name of the terminal device is subjected to prefix judgment;
[0019] If the prefix is SVIN, the link type is an SV link;
[0020] If the prefix is GOIN, the link type is a GOOSE link.
[0021] Further, the screening of the soft pad transmission information based on the link type to obtain the soft pad transmission data includes:
[0022] The link type is judged;
[0023] If it is an SV link, the soft pad transmission information with transmission types of receiving and sending is selected to generate first soft pad transmission data;
[0024] If it is a GOOSE link, the soft pad transmission information with a transmission type of receiving is selected to generate second soft pad transmission data;
[0025] Based on the generated first soft pad transmission data and second soft pad transmission data, soft pad transmission data is obtained.
[0026] Further, the calculation of the similarity distance value according to the virtual terminal table and the soft pad list includes:
[0027] The similarity distance value is calculated by substituting the virtual terminal table and the soft pad list into a similarity distance calculation formula; wherein the similarity distance calculation formula includes:
[0028]
[0029] In the formula, s (L i ,Lj ) is a similar distance value, ω k is the similarity weight of the kth data attribute, K is the number of attributes of the SCD file string, s(T ik , T jk ) is the similarity between the kth data attribute values of T j and T j ik is the edit distance between the kth data attribute values of T jk and T j j ik is the kth data attribute value of T i ; T jk is the kth data attribute value of T j ; L i represents the string length of the virtual terminal table, L j represents the string length of the soft platen list; τ(T ik ) is the normalized value of the kth data attribute of T i ; τ(T jk ) is the normalized value of the kth data attribute of T j .
[0030] Further, the information visualization of the SCD file based on the knowledge graph model comprises:
[0031] The non-structured data in the SCD file is processed by the knowledge graph database to make the non-structured data displayed to the user; wherein the non-structured data comprises: version, fixed value and communication parameters of the SCD file.
[0032] Further, after the information visualization of the SCD file based on the knowledge graph model, it comprises:
[0033] A preset search length is obtained;
[0034] According to the search length, the string composed of the virtual terminal table of the first SCD file is partitioned to obtain a plurality of first partitions; according to the search length, the string composed of the virtual terminal table of the second SCD file is partitioned to obtain a plurality of second partitions; wherein the length of each first partition is equal to the search length, and the length of each second partition is equal to the search length;
[0035] The relative position of each first partition in the corresponding string of the first SCD file and the relative position of each second partition in the corresponding string of the second SCD file are obtained;
[0036] The first partition and the second partition with the same relative position are compared in terms of hash values, and the first partition and the second partition with the same hash values are marked to obtain a plurality of first marked partitions and a plurality of second marked partitions, and a matching linked list is generated according to the plurality of first marked partitions and the plurality of second marked partitions.
[0037] Another embodiment of the present application also provides a knowledge graph-based SCD file processing device, which comprises a data acquisition module, a data analysis module, a data calculation module, a data judgment module, a visualization module and a marking module.
[0038] The data acquisition module is configured to acquire an SCD file of a transformer substation system.
[0039] The data analysis module is configured to analyze the SCD file based on a preset analysis mode to generate a virtual terminal table and a soft pressboard list.
[0040] The data calculation module is configured to calculate a similarity distance value according to the virtual terminal table and the soft pressboard list.
[0041] The data judgment module is configured to judge whether the similarity distance value is less than a distance threshold value.
[0042] The visualization module is configured to perform information visualization on the SCD file based on a knowledge graph model if the similarity distance value is less than the distance threshold value.
[0043] The marking module is configured to mark the SCD file as abnormal if the similarity distance value is not less than the distance threshold value.
[0044] Another embodiment of the present application also provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the steps of the knowledge graph-based SCD file processing method provided by the present application are implemented.
[0045] Another embodiment of the present application also provides a computer readable storage medium item, which comprises a stored computer program, and when the computer program runs, the device where the computer readable storage medium is located executes the steps of the knowledge graph-based SCD file processing method provided by the present application.
[0046] The present application has the following beneficial effects:
[0047] The application discloses a kind of based on knowledge graph's SCD file processing method, comprising: obtaining the SCD file of substation system;Based on the analysis mode of pre-set, the SCD file is parsed, and virtual terminal table and soft pressboard list are generated;According to the virtual terminal table and the soft pressboard list, similar distance value is calculated;It is judged whether the similar distance value is less than distance threshold value;If yes, based on knowledge graph model, the SCD file is information visualized.If no, mark SCD file exception.The application is parsed to SCD file, and according to the virtual terminal table and the soft pressboard list obtained by parsing, the virtual terminal table and the soft pressboard list are calculated with similar distance value, when less than distance threshold value, information is visualized, when greater than distance threshold value, exception is marked, realize the automatic check of SCD file, and the SCD file processing efficiency based on knowledge graph is greatly improved. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0049] Figure 1 is a flowchart of the SCD file processing method based on knowledge graph provided by an embodiment of the present application;
[0050] Figure 2 is a structural schematic diagram of the SCD file processing device based on knowledge graph provided by an embodiment of the present application;
[0051] Figure 3 is a GOOSE virtual circuit visualization diagram provided by an embodiment of the present application;
[0052] Figure 4 is a verification accuracy diagram provided by an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the present application will be described clearly and completely in the following combined with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this application; the use of the terms "including," "comprising," or "having" and variations thereof herein is intended to be broad and encompass the terms "consisting of" and "consisting essentially of" and variations thereof. Unless otherwise required by context, singular terms shall include pluralities and vice versa. Unless otherwise required by context, the use herein of the singular is also to be construed as a use of the plural and vice versa.
[0055] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise explicitly specified.
[0056] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative embodiments to each other. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0057] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0058] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two), and similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0059] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connecting", "connecting", "fixing" and the like should be broadly understood, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanical connection, or it can be electrical connection; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0060] Reference Figure 1To address the low efficiency issue in existing knowledge graph-based SCD file processing technologies, an embodiment of the present invention provides a knowledge graph-based SCD file processing method, comprising:
[0061] 101. Obtain the SCD file of the substation system.
[0062] 102. Based on a preset parsing method, the SCD file is parsed to generate a virtual terminal table and a soft pressure plate list.
[0063] Furthermore, the SCD file is parsed based on a preset parsing method to generate a virtual terminal table and a soft-switch board list, including:
[0064] The SCD file is parsed using DOM4J to obtain functional soft pressure board data and the names and descriptions of several terminal devices.
[0065] Based on the name and description information of each terminal device, determine the device type and soft-plate transmission information of each terminal device, and determine the virtual terminal table based on the string corresponding to the device type and soft-plate transmission information of each terminal device;
[0066] The link type is determined based on the name of each terminal device.
[0067] Based on the link type, the information transmitted by the soft pressure board is filtered to obtain the data transmitted by the soft pressure board.
[0068] A list of soft pressure plates is determined based on the strings corresponding to the soft pressure plate transmission data and the functional soft pressure plate data.
[0069] In one specific embodiment, the SCD file is read and parsed using JAVA's DOM4J parsing method.
[0070] In one specific embodiment, the virtual terminal list includes, but is not limited to: protection devices, measurement and control devices, smart terminals, merging units, etc.; the soft pressure board list includes: functional soft pressure boards, GOOSE receiving soft pressure boards, GOOSE transmitting soft pressure boards, and SV receiving soft pressure boards.
[0071] Furthermore, the link types include: SV links and GOOSE links; determining the link type based on the name of each terminal device includes:
[0072] Perform prefix determination on the name of the terminal device;
[0073] If the prefix is SVIN, then the link type is SV link;
[0074] If the prefix is GOIN, then the link type is a GOOSE link.
[0075] It should be noted that SVIN stands for "Sampled Value Input"; GOIN stands for "GOOSE Input"; GOOSE stands for "GenericObject Oriented Substation Event"; and SV stands for "Sampled Value".
[0076] In one specific embodiment, the link type is obtained by parsing the prefix attribute value under the LN node.
[0077] In a specific embodiment, SV links and GOOSE links are distinguished based on the reference name of the receiving virtual terminal in the SCD file. SV links are prefixed with SVIN, while GOOSE links are prefixed with GOIN. In the logical devices of the SV and GOOSE process layers of the IED, traversing the Inputs section under its LN0 node yields all the receiving link information for that intelligent electronic device (IED). GOOSE transmit and receive soft pressure plates, while SV receive soft pressure plates are configured only in the protection device and stored in the dsReplayRna dataset under the corresponding IED logical contact PROT. By mapping virtual loops to soft pressure plates, the secondary virtual loop information of GOOSE and SV subscribed by the entire IED can be obtained.
[0078] Furthermore, the step of filtering the soft-plate transmission information based on link type to obtain soft-plate transmission data includes:
[0079] Determine the link type;
[0080] If it is an SV link, select the soft pressure plate transmission information with the transmission type of receiving and sending, and generate the first soft pressure plate transmission data;
[0081] If it is a GOOSE link, select the transmission type as received soft pressure plate transmission information and generate the second soft pressure plate transmission data;
[0082] Based on the generated first soft pressure plate transmission data and second soft pressure plate transmission data, soft pressure plate transmission data is obtained.
[0083] 103. Calculate the similarity distance value based on the virtual terminal table and the soft pressure plate list.
[0084] Further, the step of calculating the similarity distance value based on the virtual terminal table and the soft pressure plate list includes:
[0085] The similarity distance value is calculated by substituting the virtual terminal list and the soft pressure plate list into the similarity distance calculation formula; wherein, the similarity distance calculation formula includes:
[0086]
[0087] In the formula, s(L i ,L j ) represents the similarity distance value, ω k s(T) represents the similarity weight of the k-th data attribute, where K is the number of attributes in the SCD file string. ik ,T jk ) for L j and L j The similarity between the k-th data attribute values, D(T) ik ,T jk ) for L j and L j Edit distance between the k-th data attribute values; T ik For L i The value of the k-th data attribute; T jk For L j The value of the k-th data attribute; L i L represents the string length of the virtual terminal table. j The string length representing the list of soft pressure plates; τ(T ik ) for L i The normalized value of the k-th data attribute; τ(T) jk ) for L j The normalized value of the kth data attribute.
[0088] In one specific embodiment, the similarity distance value was calculated using the Levenshtein distance algorithm.
[0089] The Levenshtein distance algorithm is used to verify SCD files, while the edit distance algorithm is used to measure the similarity between the IED virtual terminal and the soft clamping board features. Edit distance refers to the minimum number of edits required to transform one string into another; edit operations include replacing a character with another, inserting a character, deleting a character, etc. The smaller the edit distance between two strings, the greater their similarity.
[0090] 104. Determine whether the similarity distance value is less than the distance threshold.
[0091] In one specific embodiment, the distance threshold can be adaptively set by the user.
[0092] 105. If so, then the SCD file is visualized based on a knowledge graph model.
[0093] Furthermore, the information visualization of the SCD file based on the knowledge graph model includes:
[0094] The unstructured data in the SCD file is visualized using a knowledge graph database so that it can be displayed to the user; wherein, the unstructured data includes: the version, fixed value, and communication parameters of the SCD file.
[0095] Understandably, document visualization based on a knowledge graph model (KG) is used for SCD. A knowledge graph (KG) is a novel intelligent knowledge representation method that constructs a vast semantic network through nodes and edges. Nodes represent concepts or entities in the physical world, and edges represent the topological connections and semantic relationships between nodes. The graph visualizes information, showcasing concepts, entities, and their relationships. The creation statement is as follows:
[0096] MATCH(i:IED)-[r]->(d:Private)RETURN i, r, d can display the inclusion relationship between IED and private attributes. The knowledge graph model can automatically display the data relationships between various nodes, assisting maintenance or operation personnel in understanding the modified and expanded content of SCD files and assisting in the verification of SCD file content.
[0097] Further, after visualizing the SCD file based on the knowledge graph model, the process includes:
[0098] Get the preset search length;
[0099] Based on the search length, the string composed of the virtual terminal table of the first SCD file is partitioned to obtain several first partitions; based on the search length, the string composed of the virtual terminal table of the second SCD file is partitioned to obtain several second partitions; wherein, the length of each first partition is equal to the search length, and the length of each second partition is equal to the search length.
[0100] Get the relative position of the string corresponding to each first partition in the first SCD file, and the relative position of the string corresponding to each second partition in the second SCD file;
[0101] The hash values of the first and second partitions with the same relative position are compared, and the first and second partitions with the same hash value are marked to obtain several first marked partitions and several second marked partitions. Based on the several first marked partitions and several second marked partitions, a matching linked list is generated.
[0102] In one specific embodiment, during the parsing of the SCD file, virtual links are extracted using the input attribute in the file.
[0103] In one specific embodiment, the differences between virtual links of different versions of SCD files are compared as follows: A minimum matching length is specified, and a search length S is also specified. Two strings T (i.e., the string composed of the virtual terminal tables of the first SCD file) and P (i.e., the string composed of the virtual terminal tables of the second SCD file) are partitioned. String T corresponds to several first partitions, and string P corresponds to several second partitions. The same hash function is used to calculate the hash value of each partition and store them separately. The hash values are compared. If the hash values are the same, the two substrings of length S are considered to match, and the matched partitions are marked as the first and second marked partitions. Next, a greedy matching is performed on the strings following these two substrings. If subsequent characters are still the same, the matching continues until no match is possible. Simultaneously, the matching length, the starting position of the match in string T (i.e., the starting position of the first marked partition), and the starting position of the match in string P (i.e., the starting position of the second marked partition) are recorded, completing information storage. The matching continues for other substrings of length S. For each pair of matching substrings, a greedy matching is performed, and the matching length, starting position, etc., are recorded to form a matching linked list. Once all substrings of length S have been matched, the marking process continues to generate a matching linked list.
[0104] This SCD file differentiation display method verifies relevant content information to determine if there are differences between two versions of the SCD file. If differences exist, it compares virtual link information and displays the differences in virtual links between the two SCD files. By highlighting the differences between different versions, it provides relevant professionals with comparative information, allowing them to better understand the data before and after the modification.
[0105] 106. If not, mark the SCD file as abnormal.
[0106] It is understood that this embodiment can improve the verification efficiency of SCD files in smart substations: by combining knowledge graphs with the Levenstein distance algorithm for text verification, and by visually extracting SCD text features to improve verification accuracy, it meets the need for accurate and rapid processing of SCD file verification methods.
[0107] To better illustrate this, the following example is provided:
[0108] Visualization of SCD files for smart substations:
[0109] Taking the GOOSE virtual circuit for the three-phase inconsistency start-up failure protection between the first set of protection for the #1 main transformer and the first set of protection for the 220kV bus as an example, the verification results of the virtual circuit information are shown in Table 1.
[0110] Table 1
[0111]
[0112]
[0113] As can be seen from Table 1, the similarity between the GOOSE virtual loop link information in the example and the standard link information is very high, all exceeding 0.9. In particular, the similarity between "PT2201A" and "PM2201A" is close to 100%, indicating that the link information is basically consistent with the standard SCD text.
[0114] In addition, six nodes and five edges are introduced on the knowledge graph to store the sending IED name, sending data reference path, sending soft platen, receiving soft platen, receiving data reference path, and receiving IED name, respectively. Each node's attributes store the Chinese descriptions of the sending and receiving IEDs, the specific functions of the virtual circuit, and the dual naming of the sending and receiving soft platens. Edges define the relationship between two nodes as either ports or virtual circuits. Nodes and edges can use different types of visual elements (such as color and shape) to enhance the expression of specific meanings. Table 1 shows the final GOOSE virtual circuit visualization construction results. Figure 3 As shown.
[0115] To demonstrate the verification accuracy of the proposed method, six comparative experiments were conducted, comparing the verification accuracy of six virtual circuits in the SCD file using three methods: Levenstein distance fuzzy matching and Word2Vector similarity for SCD text verification, text verification using K-means clustering optimized with the KNN algorithm, and text verification based on a CNN model. The verification results are as follows: Figure 4 As shown.
[0116] To verify the effectiveness of the difference analysis of the SCD files, two SCD files of CL1101 for 110kV line monitoring and control were selected for comprehensive comparison. The details of the IED virtual connection differences transmitted on both sides are shown in Table 2.
[0117] Table 2
[0118]
[0119] like Figure 2 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided;
[0120] An embodiment of the present invention provides an SCD file processing device based on knowledge graph, including: a data acquisition module 201, a data parsing module 202, a data calculation module 203, a data judgment module 204, a visualization module 205, and a tagging module 206;
[0121] The data acquisition module is used to acquire the SCD file of the substation system;
[0122] The data parsing module is used to parse the SCD file based on a preset parsing method to generate a virtual terminal table and a soft pressure plate list.
[0123] The data calculation module is used to calculate similarity distance values based on the virtual terminal table and the soft pressure plate list;
[0124] The data judgment module is used to determine whether the similarity distance value is less than a distance threshold;
[0125] The visualization module is used to visualize the SCD file based on a knowledge graph model if the condition is met.
[0126] The marking module is used to mark the SCD file as abnormal if otherwise.
[0127] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the knowledge graph-based SCD file processing method provided by any of the above-described method embodiments of the present invention.
[0128] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0129] Beneficial effects:
[0130] This embodiment acquires the SCD file of a substation system; parses the SCD file based on a preset parsing method to generate a virtual terminal table and a soft pressure plate list; calculates a similarity distance value based on the virtual terminal table and the soft pressure plate list; determines whether the similarity distance value is less than a distance threshold; if so, visualizes the SCD file based on a knowledge graph model; otherwise, marks the SCD file as abnormal. This invention parses the SCD file, calculates the similarity distance value for the virtual terminal table and soft pressure plate list obtained from the parsing, visualizes the information when the distance is less than the distance threshold, and marks abnormalities when the distance is greater than the distance threshold, thus achieving automated verification of SCD files and greatly improving the efficiency of SCD file processing based on knowledge graphs.
[0131] Based on the above embodiments of the knowledge graph-based SCD file processing method, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the knowledge graph-based SCD file processing method of any embodiment of the present invention.
[0132] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0133] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0134] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0135] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the knowledge graph-based SCD file processing method described in any of the above-described method embodiments of the present invention.
[0136] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0137] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A knowledge graph-based SCD file processing method, characterized in that, include: Obtain the SCD file of the substation system; Based on a preset parsing method, the SCD file is parsed to generate a virtual terminal table and a soft pressure plate list. Calculate the similarity distance value based on the virtual terminal table and the soft pressure plate list; Determine whether the similarity distance value is less than a distance threshold; If so, the SCD file is visualized based on a knowledge graph model; If not, mark the SCD file as abnormal.
2. The SCD file processing method based on knowledge graph as described in claim 1, characterized in that, The SCD file is parsed based on a preset parsing method to generate a virtual terminal table and a soft-switch board list, including: The SCD file is parsed using DOM4J to obtain functional soft pressure board data and the names and descriptions of several terminal devices. Based on the name and description information of each terminal device, determine the device type and soft-plate transmission information of each terminal device, and determine the virtual terminal table based on the string corresponding to the device type and soft-plate transmission information of each terminal device; The link type is determined based on the name of each terminal device. Based on the link type, the information transmitted by the soft pressure board is filtered to obtain the data transmitted by the soft pressure board. A list of soft pressure plates is determined based on the strings corresponding to the soft pressure plate transmission data and the functional soft pressure plate data.
3. The SCD file processing method based on knowledge graph as described in claim 2, characterized in that, The link types include: SV link and GOOSE link; determining the link type based on the name of each terminal device includes: Perform prefix determination on the name of the terminal device; If the prefix is SVIN, then the link type is SV link; If the prefix is GOIN, then the link type is a GOOSE link.
4. The SCD file processing method based on knowledge graph as described in claim 3, characterized in that, The process of filtering the soft-plate transmission information based on link type to obtain soft-plate transmission data includes: Determine the link type; If it is an SV link, select the soft pressure plate transmission information with the transmission type of receiving and sending, and generate the first soft pressure plate transmission data; If it is a GOOSE link, select the transmission type as received soft pressure plate transmission information and generate the second soft pressure plate transmission data; Based on the generated first soft pressure plate transmission data and second soft pressure plate transmission data, soft pressure plate transmission data is obtained.
5. The SCD file processing method based on knowledge graph as described in claim 4, characterized in that, The step of calculating the similarity distance value based on the virtual terminal table and the soft pressure plate list includes: The similarity distance value is calculated by substituting the virtual terminal list and the soft pressure plate list into the similarity distance calculation formula; wherein, the similarity distance calculation formula includes: In the formula, s(L i ,L j ) represents the similarity distance value, ω k s(T) represents the similarity weight of the k-th data attribute, where K is the number of attributes in the SCD file string. ik ,T jk ) for L j and L j The similarity between the k-th data attribute values, D(T) ik ,T jk ) for L j and L j The edit distance between the k-th data attribute values; T ik For L i The value of the k-th data attribute; T jk For L j The value of the k-th data attribute; L i L represents the string length of the virtual terminal table. j The string length representing the list of soft pressure plates; τ(T) ik ) for L i The normalized value of the k-th data attribute; τ(T) jk ) for L j The normalized value of the kth data attribute.
6. The SCD file processing method based on knowledge graph as described in claim 5, characterized in that, The information visualization of the SCD file based on the knowledge graph model includes: The unstructured data in the SCD file is visualized using a knowledge graph database so that it can be displayed to the user; wherein, the unstructured data includes: the version, fixed value, and communication parameters of the SCD file.
7. The SCD file processing method based on knowledge graph as described in claim 6, characterized in that, After visualizing the SCD file based on the knowledge graph model, the process includes: Get the preset search length; Based on the search length, the string composed of the virtual terminal table of the first SCD file is partitioned to obtain several first partitions; based on the search length, the string composed of the virtual terminal table of the second SCD file is partitioned to obtain several second partitions; wherein, the length of each first partition is equal to the search length, and the length of each second partition is equal to the search length. Get the relative position of the string corresponding to each first partition in the first SCD file, and the relative position of the string corresponding to each second partition in the second SCD file; The hash values of the first and second partitions with the same relative position are compared, and the first and second partitions with the same hash value are marked to obtain several first marked partitions and several second marked partitions. Based on the several first marked partitions and several second marked partitions, a matching linked list is generated.
8. A knowledge graph-based SCD file processing device, characterized in that, include: The system includes a data acquisition module, a data parsing module, a data calculation module, a data judgment module, a visualization module, and a labeling module. The data acquisition module is used to acquire the SCD file of the substation system; The data parsing module is used to parse the SCD file based on a preset parsing method to generate a virtual terminal table and a soft pressure plate list. The data calculation module is used to calculate similarity distance values based on the virtual terminal table and the soft pressure plate list; The data judgment module is used to determine whether the similarity distance value is less than a distance threshold; The visualization module is used to visualize the SCD file based on a knowledge graph model if the condition is met. The marking module is used to mark the SCD file as abnormal if otherwise.
9. A terminal device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the knowledge graph-based SCD file processing method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the knowledge graph-based SCD file processing method as described in any one of claims 1-7.