Virtual terminal loop rule base construction method and device

By automatically extracting virtual terminal loop information in SCD files using neural network models and building a virtual terminal loop rule library, the problem of inefficient manual construction is solved and the stability and reliability of the power grid is improved.

CN119940254APending Publication Date: 2025-05-06CYG SUNRI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411788413.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Manually constructing virtual terminal loop rule databases is inefficient, which affects the safe and stable operation of the power grid.

Method used

By inputting the SCD file to the trained first neural model, text features are extracted and text vectors are generated, and then text vectors are input to the trained second neural model to generate a target tag sequence, thereby automatically extracting entity information and relationships and building a virtual terminal loop rule library.

Benefits of technology

The automatic construction of virtual terminal loop rule database is realized, which improves construction efficiency, reduces manual intervention, and enhances the stability and reliability of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940254A_ABST
    Figure CN119940254A_ABST
Patent Text Reader

Abstract

The invention provides a virtual terminal loop rule base construction method and device. The method comprises the steps that an SCD file is input into a trained first neural model, a text vector output by the trained first neural model is obtained, each embedded vector in the text vector is used for representing knowledge information of a virtual terminator loop of the SCD file, the text vector is input into a trained second neural model, and the second neural model is used for representing knowledge information of a virtual terminator loop of the SCD file. Obtaining a target label sequence output by a trained second neural network, wherein the target label sequence comprises annotation results of all entities in the SCD file; according to the target label sequence, extracting entity information and relationships among entities from the SCD file; and generating a virtual terminal loop rule base of the SCD file according to the information of each entity and the relationship between the entities. According to the method, the information related to the virtual terminal loop in the SCD file is automatically obtained, then the entities and the relations in the CSD file are automatically extracted, then the virtual terminal loop rule base is automatically constructed, and the construction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of power systems, and in particular, relates to a method and device for constructing a virtual terminal loop rule library. Background Art

[0002] In modern power grids, smart substations are an important component, and the safe and stable operation of their secondary equipment plays a vital role in the reliability and stability of the entire power grid. The SCD (Substation Configuration Description) file in the smart substation describes the configuration and connection relationship of each device in the substation, among which the virtual terminal loop is the basis for ensuring the safe and stable operation of secondary equipment and power grids. Therefore, it is necessary to check the virtual terminal loop in the SCD file.

[0003] Usually, a rule base is constructed through manual configuration, and then the rule base is used to verify the correctness of the virtual terminal loop, but the manual configuration method is inefficient. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium and a computer program product for constructing a virtual terminal loop rule base, which can solve the problem of low efficiency in manually constructing a rule base.

[0005] In a first aspect, an embodiment of the present application provides a method for constructing a virtual terminal loop rule base, comprising:

[0006] Get the SCD file;

[0007] Inputting the SCD file into the trained first neural model to obtain a text vector output by the trained first neural model, wherein each embedding vector in the text vector is used to represent knowledge information of the virtual terminal loop of the SCD file;

[0008] Inputting the text vector into a trained second neural model to obtain a target label sequence output by the trained second neural network, wherein the target label sequence includes annotation results of each entity in the SCD file;

[0009] Extracting entity information and relationships between entities from the SCD file according to the target tag sequence;

[0010] Generate a virtual terminal loop rule base of the SCD file according to the entity information and the relationship between the entities;

[0011] The trained first neural model is used to extract text features of the SCD file; determine a text vector of the SCD file according to the text features, and output the text vector;

[0012] The trained second neural model is used to determine the label information of each embedding vector according to the context information of the embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence.

[0013] In a second aspect, an embodiment of the present application provides a virtual terminal loop rule construction device, comprising:

[0014] Data processing module, used to obtain SCD files;

[0015] It is also used to input the SCD file into the trained first neural model to obtain the text vector output by the trained first neural model, wherein each embedded vector in the text vector is used to represent the knowledge information of the virtual terminal loop of the SCD file;

[0016] Also used for inputting the text vector into a trained second neural model to obtain a target label sequence output by the trained second neural network, wherein the target label sequence includes annotation results of each entity in the SCD file;

[0017] A construction module is used to extract information of each entity and the relationship between each entity from the SCD file according to the target tag sequence;

[0018] It is also used to generate a virtual terminal loop rule base of the SCD file according to the entity information and the relationship between the entities;

[0019] The trained first neural model is used to extract text features of the SCD file; determine a text vector of the SCD file according to the text features, and output the text vector;

[0020] The trained second neural model is used to determine the label information of each embedding vector according to the context information of the embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence.

[0021] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspects above is implemented.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the above-mentioned first aspects is implemented.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the methods described in the first aspect.

[0024] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0025] In the embodiment of the present application, the SCD file is input into the trained first neural model to obtain the text vector output by the trained first neural model, and each embedded vector in the text vector is used to characterize the knowledge information of the virtual terminal loop of the SCD file, wherein the trained first neural model is used to extract the text features of the SCD file; the text vector of the SCD file is determined according to the text features, and the text vector is output, so as to realize the automatic acquisition of the information related to the virtual terminal loop in the SCD file, and provide a basis for extracting entities and relationships;

[0026] Input the text vector into the trained second neural model to obtain a target label sequence output by the trained second neural network, the target label sequence including annotation results of each entity in the SCD file, wherein the trained second neural model is used to determine the label information of the embedding vector according to the context information of the embedding vector for each embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence to realize automatic extraction of entities and relationships in the CSD file;

[0027] According to the target label sequence, the information of each entity and the relationship between each entity are extracted from the SCD file; according to the information of each entity and the relationship between each entity, the virtual terminal loop rule base of the SCD file is generated, and the virtual terminal loop rule base is automatically constructed without manual construction of the rule base, thereby improving the construction efficiency.

[0028] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0030] Figure 1 This is a first flow chart of a method for constructing a virtual terminal loop rule base provided in an embodiment of the present application;

[0031] Figure 2is a schematic diagram of the structure of a trained first neural model provided in an embodiment of the present application;

[0032] Figure 3 This is a second flow chart of the method for constructing a virtual terminal loop rule base provided in one embodiment of the present application;

[0033] Figure 4 It is a structural schematic diagram of a virtual terminal loop rule construction device provided in an embodiment of the present application;

[0034] Figure 5 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0035] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0036] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0037] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0038] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0039] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0040] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0041] In one embodiment, Figure 1 This is a first flow chart of a method for constructing a virtual terminal loop rule base provided in an embodiment of the present application. Figure 1 As shown, the method comprises:

[0042] S11: Obtain the SCD file.

[0043] In the application, the SCD file can be obtained by the user inputting the SCD file.

[0044] Among them, the SCD file includes the description, type, category, function identifier, and affiliated IED of the virtual terminal loop. The description is a textual explanation of the virtual terminal loop, the type is used to characterize the functional type of the virtual terminal loop, the category is used to characterize the category to which the virtual terminal loop belongs in the scene, and the function identifier is used to identify the virtual terminal loop; the affiliated IED is used to characterize the intelligent electronic device to which the virtual terminal belongs.

[0045] Types include GOOSE (generic object oriented substation event) input, GOOSE output, SV (sampled value) input, and SV output. The belonging IED (Intelligent Electronic Device) indicates that there is a subordinate relationship between the virtual terminal and the IED, including SV connection and GOOSE connection, based on which a connection can be formed with other virtual terminals.

[0046] S12: Input the SCD file into the trained first neural model to obtain the text vector output by the trained first neural model.

[0047] Among them, each embedded vector in the text vector is used to represent the knowledge information of the virtual terminal loop of the SCD file.

[0048] The trained first neural model is used to extract text features of the SCD file; a text vector of the SCD file is determined according to the text features, and the text vector is output.

[0049] In the application, the first neural model is pre-built and pre-trained using the virtual terminal loop annotated in the SCD file, so that the trained first neural model can process power system related texts and improve the accuracy and efficiency of the model in processing power system related texts.

[0050] For example, the first neural model constructed can set the number of layers to 6, the number of hidden units in each layer to 1024, the learning rate to 0.001, and the number of training rounds to 50.

[0051] The SCD file may be preprocessed before being input into the trained first neural model. Specifically, the preprocessing includes structured preprocessing, cleaning invalid data, duplicate data and erroneous data in the SCD file, converting the data format into a unified format, establishing data relationships, etc.

[0052] To further learn the features of the SCD file, the SCD file can be input into the trained first neural model in units of sentences.

[0053] In a possible implementation, the trained first neural model includes a trained extraction network and a plurality of trained Transformer networks that are sequentially connected.

[0054] The trained extraction network is used to extract word vectors, sentence vectors, and position vectors from the SCD file, and transfer the word vectors, sentence vectors, and position vectors to the trained Transformer network.

[0055] In the application, the trained extraction network encodes the SCD file and converts it into word vectors, sentence vectors, and position vectors. The word vector represents the word, the sentence vector represents the sentence, and the position vector represents the position of the word and the sentence.

[0056] The trained Transformer network is used to extract text features of the SCD file based on word vectors, sentence vectors, and position vectors using a dynamic masking strategy; determine the text vector of the SCD file based on the text features, and output the text vector.

[0057] In the application, the trained Transformer network adopts a dynamic mask strategy. Whenever a piece of data is input to the trained Transformer network, a new mask pattern will be generated, and the mask pattern of the input data will be dynamically changed. It can flexibly learn professional corpus features, and thus better extract the text features of the SCD file. In the process of determining the text vector of the SCD file based on the text features, the similarity between vectors is judged based on the cosine similarity of the vectors, and the vectors are aligned and disambiguated.

[0058] Correspondingly, the embedding vector in the text vector can represent information such as words, sentences, and positions.

[0059] In one possible implementation, Figure 2 is a schematic diagram of the structure of a trained first neural model provided in an embodiment of the present application. Figure 2 As shown in Figure 1, the trained Transformer network includes a multi-head attention layer, a normalization layer, a fully connected layer, and a normalization layer connected in sequence. The output of the multi-head attention layer is S oftmax is the normalization function, Q = A n ×ω Q ,K=A n ×ω K ,V=A n ×ω V , A n is the data input to the multi-head attention layer, ω is the weight, d k is the vector dimension. The normalization layer is used to normalize the data input to the normalization layer. The output result of the fully connected layer is M MH (Q,K,V)=C oncat (h1, h2, ...h m )ω o , is the weight matrix of m heads, ω o is the additional weight matrix.

[0060] In the application, the multi-head attention layer uses the self-attention mechanism. The input SCD file is modeled through the multi-head attention layer and the fully connected layer, and effective information that meets the task is filtered out from a large amount of data, professional text information in the power field is obtained, and the text vector is obtained.

[0061] It is understandable that by extracting text features based on word vectors, sentence vectors and position vectors through the trained first neural network, and then determining the text vector based on the text features, comprehensive professional information in the power field, including semantic expressions at the word level, can be extracted. Because the distribution of vocabulary in the power field is significantly different from that in other fields, the distribution of professional vocabulary in SCD files is more dense, and the general language model (such as the BERT model, etc.) masks the characters of the Chinese corpus and cannot mask the words, making it difficult for the general language model to learn and understand, and thus unable to extract text features well.

[0062] S13: Input the text vector into the trained second neural model to obtain the target label sequence output by the trained second neural network.

[0063] Among them, the target label sequence includes the annotation results of each entity in the SCD file.

[0064] The trained second neural model is used to determine the label information of each embedding vector according to the context information of the embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence.

[0065] In the application, the second neural model is pre-built, and the output result of the trained first neural model is used to train the second neural model, so that the trained second neural model can extract corresponding entities and relationships.

[0066] In a possible implementation, the trained second neural model includes a trained BiGRU network (bidirectional gated recurrent network) and a trained CRF network (conditional random field network).

[0067] In this example, the number of hidden units of the constructed BiGRU network is 512. The parameters of the constructed CRF network are the default values.

[0068] The trained BiGRU network is used to determine the latent vector of each embedded vector according to the context information of the embedded vector, and transmit the latent vector of each embedded vector to the trained CRF network. The information of each dimension in the latent vector represents the score of the corresponding label, and the label information includes the score of the embedded vector under each label.

[0069] In applications, the trained BiGRU network can effectively store and update contextual information, understand contextual information, maintain dependencies between data, and improve model analysis capabilities.

[0070] Specifically, the text vector input to the trained BiGRU network includes multiple embedding vectors, expressed as X*={x*1,x*2,…,x* n}. n is the sentence length. The trained BiGRU network includes the reset gate r t and update gate z t At time step t, r t The calculation formula is z t The calculation formula is Among them, w and u are weight coefficients, x* ct is the embedding vector at time step t, h t-1 is the information of the previous time step. At time step t, the calculation formula for the candidate hidden layer is

[0071] Then the proportion of filtered information in the hidden layer is controlled and added to the candidate hidden layer to obtain the final output hidden layer. The calculation formula for the final output hidden layer is

[0072] For each embedding vector x* c , the forward GRU combines the c The SCD context information of x* c Encode it and record it as Backward GRU from x* n to x* c The SCD context information of x* c Encode it and record it as Finally, connect Represents the encoding information of SCD vocabulary c, denoted as

[0073] The trained CRF network is used to determine the prediction probability of each label sequence according to the latent vector of each embedded vector; the label sequence with the largest prediction probability is determined as the target label sequence, and the target label sequence is output.

[0074] In the application, although the BiGRU layer considers context information, it does not consider the dependency between labels, and cannot guarantee the accuracy of the prediction results, resulting in the prediction results not meeting the target constraints. Therefore, combined with the characteristics of power grid operation data, the trained CRF model is used to learn the constraint rules based on the BiGRU feature learning, and the output results of the trained BiGRU layer are modified by considering the dependency between adjacent entity labels to obtain the global optimal label sequence, reduce the possibility of the model outputting illegal sequences, reduce unreasonable label predictions, and achieve accurate extraction of entities and relationships in the power field.

[0075] Specifically, the calculation formula for the predicted probability of the label sequence is The calculation formula of the scoring function is: X is the input data of the trained CRF network, y is the label sequence, f is the number of input data, and Y X is the set of all possible labels, is the correct label column, ρy i ,y i+1 is the transition probability between two adjacent label sequences, is the score of the yi label sequence of the i-th embedding vector. Get the label sequence with the highest predicted probability.

[0076] S14: Extract entity information and the relationship between entities from the SCD file according to the target label sequence.

[0077] In the application, according to the meaning of the label, the information of each entity and the relationship between entities are extracted from the corresponding position in the SCD file.

[0078] S15: Generate a virtual terminal loop rule library of the SCD file according to the information of each entity and the relationship between each entity.

[0079] In a possible implementation, step S15 includes:

[0080] S151: For each entity, map the entity information belonging to the same entity to the node of the entity, and map the relationship between the entities to the edge between the nodes of the entity to obtain a knowledge graph.

[0081] In the application, the entity nodes are set with corresponding knowledge ontology concepts, and the entity information belonging to the same entity is mapped to the corresponding nodes.

[0082] In applications, the knowledge graph can be represented as Graph = (E, R, Θ), where E (e1, e2, …, e u ) is the entity set, and u is the number of entities. v} is a set of relations, v is the number of relations, Θ = {s1,s2,…,s w} is a triple set, and the triple s = (e, γ, e) represents the entity relationship entity, which is the basis for the knowledge graph. The knowledge graph is a network structure.

[0083] The knowledge processing and knowledge fusion are realized by step S151, so as to realize the information extraction of the virtual terminal loop in the SCD file.

[0084] S152: Construct a virtual terminal loop rule base based on the knowledge graph.

[0085] In the application, the parameters of the knowledge graph can be pre-set. For example, the number of nodes in the knowledge graph is 1000, the knowledge ontology concept of the node is set, the number of edges is 5000, and the maximum depth of the graph is 5.

[0086] It should be noted that the method described in this embodiment uses the network to identify and extract the knowledge information of the virtual terminal loop in the SCD file, which can accurately identify and extract entities and relationships, map the entities and relationships to nodes and edges on the knowledge graph, and obtain the knowledge graph, so that when the SCD file is obtained, the virtual terminal loop rule base can be easily maintained and updated, so that the virtual terminal loop rule base has good scalability and easy maintenance characteristics, and can adapt to the development and changes of the power grid.

[0087] For example, the update frequency may be once every six months, and the maintenance frequency may be once a week.

[0088] It is understandable that the existing manual configuration of the virtual terminal loop rule base requires a lot of manpower and time. The method described in this embodiment can automatically build the virtual terminal loop rule base, which can reduce the manpower and time required and improve the construction efficiency.

[0089] Manually constructing a virtual terminal loop rule base requires personnel to have a deep understanding and familiarity with the content of the SCD file, which places high demands on personnel. The method described in this embodiment can automatically construct a virtual terminal loop rule base, reduce the requirements on personnel, and reduce the difficulty of constructing a virtual terminal loop rule base.

[0090] When constructing a virtual terminal loop rule base manually, the rule base may have omissions or misconfigurations of rules, resulting in missed detection or false detection. The method described in this embodiment uses the network to identify and extract the knowledge information of the virtual terminal loop in the SCD file, which can accurately identify and extract entities and relationships, so as to be able to construct an accurate virtual terminal loop rule base, reduce missed detection and false detection, and improve the construction accuracy. And the method described in this embodiment uses the network to identify and extract the knowledge information of the virtual terminal loop in the SCD file, which can process complex and diverse SCD files.

[0091] The method described in this embodiment automatically constructs a virtual terminal loop rule base to obtain an accurate virtual terminal loop rule base. Using the virtual terminal loop rule base to check the virtual terminal loop, it is possible to timely discover and correct virtual terminal loop errors, reduce the situation where virtual terminal loop errors cause secondary equipment failures, improve the stability and reliability of the power grid, and provide a basis for the safe and stable operation of the power grid.

[0092] In this embodiment, the SCD file is input into the trained first neural model to obtain the text vector output by the trained first neural model, and each embedded vector in the text vector is used to characterize the knowledge information of the virtual terminal loop of the SCD file, wherein the trained first neural model is used to extract the text features of the SCD file; the text vector of the SCD file is determined according to the text features, and the text vector is output, so as to realize the automatic acquisition of the information related to the SCD file and the virtual terminal loop, and provide a basis for extracting entities and relationships;

[0093] Input the text vector into the trained second neural model to obtain a target label sequence output by the trained second neural network, the target label sequence including annotation results of each entity in the SCD file, wherein the trained second neural model is used to determine the label information of the embedding vector according to the context information of the embedding vector for each embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence to realize automatic extraction of entities and relationships in the CSD file;

[0094] According to the target label sequence, the information of each entity and the relationship between each entity are extracted from the SCD file; according to the information of each entity and the relationship between each entity, the virtual terminal loop rule base of the SCD file is generated, and the virtual terminal loop rule base is automatically constructed without manual construction of the rule base, thereby improving the construction efficiency.

[0095] In one embodiment, Figure 3 This is a second flow chart of the method for constructing a virtual terminal loop rule base provided in an embodiment of the present application. Figure 3 As shown, after generating the knowledge graph of the SCD file, it also includes:

[0096] S16: Store and visualize the knowledge graph to display the knowledge graph.

[0097] In the application, the knowledge graph can be stored and visualized through the Neo4j graph database (open source NoSQL graph database) to display the knowledge graph.

[0098] This embodiment displays the knowledge graph by storing and visualizing the knowledge graph so that the user can intuitively and directly know the rules of the virtual terminal loop of the SCD file.

[0099] It should be understood that the order of execution of the steps in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In addition, the data collection in the above embodiments is compliant, and its use or implementation does not involve any infringement on the public interest.

[0100] Corresponding to the method described in the above embodiment, for the convenience of explanation, only the part related to the embodiment of the present application is shown.

[0101] In one embodiment, Figure 4 Schematic diagram of the structure of a virtual terminal loop rule construction device provided by an embodiment of the present application. Figure 4 As shown, the device comprises:

[0102] The data processing module 10 is used to obtain the SCD file;

[0103] It is also used to input the SCD file into the trained first neural model to obtain the text vector output by the trained first neural model, and each embedded vector in the text vector is used to represent the knowledge information of the virtual terminal loop of the SCD file;

[0104] It is also used to input the text vector into the trained second neural model to obtain a target label sequence output by the trained second neural network, where the target label sequence includes annotation results of each entity in the SCD file;

[0105] A construction module 11 is used to extract information of each entity and the relationship between each entity from the SCD file according to the target label sequence;

[0106] It is also used to generate a virtual terminal loop rule base of the SCD file based on the information of each entity and the relationship between each entity;

[0107] The trained first neural model is used to extract text features of the SCD file; a text vector of the SCD file is determined according to the text features, and the text vector is output;

[0108] The trained second neural model is used to determine the label information of each embedding vector according to the context information of the embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence.

[0109] In one embodiment, a construction module is specifically used to map, for each entity, entity information belonging to the same entity to the entity's node; map the relationship between entities to the edge between the nodes of each entity to obtain a knowledge graph; and construct a virtual terminal loop rule base based on the knowledge graph.

[0110] In one embodiment, the device further comprises:

[0111] The display module is used to store and visualize the knowledge graph to display the knowledge graph.

[0112] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 5 As shown, the electronic device 2 of this embodiment includes: at least one processor 20 ( Figure 5 Only one is shown in the figure), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps of any of the above-mentioned method embodiments when executing the computer program 22.

[0113] The electronic device 2 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 2 may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 2 and does not constitute a limitation on the electronic device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0114] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0115] In some embodiments, the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2. In other embodiments, the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 2. Further, the memory 21 may also include both an internal storage unit of the electronic device 2 and an external storage device. The memory 21 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.

[0116] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0117] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific information of each functional unit and module is only for the convenience of distinguishing each other, and is not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0118] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0119] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some cases, the computer-readable medium cannot be an electric carrier signal and a telecommunication signal.

[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0122] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The technicians of the virtual terminal loop can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0123] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0125] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for constructing a virtual terminal loop rule base, characterized in that: include: Get the SCD file; Inputting the SCD file into the trained first neural model to obtain a text vector output by the trained first neural model, wherein each embedding vector in the text vector is used to represent knowledge information of the virtual terminal loop of the SCD file; Inputting the text vector into a trained second neural model to obtain a target label sequence output by the trained second neural network, wherein the target label sequence includes annotation results of each entity in the SCD file; Extracting entity information and relationships between entities from the SCD file according to the target tag sequence; Generate a virtual terminal loop rule base of the SCD file according to the entity information and the relationship between the entities; The trained first neural model is used to extract text features of the SCD file; determine a text vector of the SCD file according to the text features, and output the text vector; The trained second neural model is used to determine the label information of each embedding vector according to the context information of the embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence.

2. The method according to claim 1, characterized in that The trained first neural model includes a trained extraction network and a plurality of trained Transformer networks connected in sequence; The trained extraction network is used to extract word vectors, sentence vectors, and position vectors from the SCD file, and transmit the word vectors, the sentence vectors, and the position vectors to the trained Transformer network; The trained Transformer network is used to extract text features of the SCD file based on the word vector, the sentence vector, and the position vector using a dynamic masking strategy; determine the text vector of the SCD file based on the text features, and output the text vector.

3. The method according to claim 2, characterized in that: The trained Transformer network includes a multi-head attention layer, a normalization layer, a fully connected layer, and the normalization layer connected in sequence. The output result of the multi-head attention layer is S oftmax is the normalization function, Q = A n ×ω Q ,K=A n ×ω K ,V=A n ×ω V , A n is the data input to the multi-head attention layer, ω is the weight, d k is the vector dimension, the normalization layer is used to normalize the data input to the normalization layer, and the output result of the fully connected layer is M MH (Q,K,V)=C oncat (h1, h2, ...h m )ω o , is the weight matrix of m heads, ω o is the additional weight matrix.

4. The method according to claim 1, characterized in that: The trained second neural model includes a trained BiGRU network and a trained CRF network; The trained BiGRU network is used to determine, for each of the embedding vectors, a latent vector of the embedding vector according to the context information of the embedding vector, and transmit the latent vector of each of the embedding vectors to the trained CRF network, wherein the information of each dimension in the latent vector represents the score of the corresponding label, and the label information includes the score of the embedding vector under each of the labels; The trained CRF network is used to determine the prediction probability of each label sequence according to the latent vector of each embedding vector; determine the label sequence with the largest prediction probability as the target label sequence, and output the target label sequence.

5. The method according to claim 1, characterized in that The step of generating a virtual terminal loop rule base of the SCD file according to the entity information and the relationship between the entities includes: For each entity, map each entity information belonging to the same entity to the node of the entity, and map the relationship between each entity to the edge between the nodes of each entity to obtain a knowledge graph; According to the knowledge graph, the virtual terminal loop rule base is constructed.

6. The method according to any one of claims 1 to 5, characterized in that: After generating the knowledge graph of the SCD file, the method further includes: The knowledge graph is stored and visualized to display the knowledge graph.

7. The method according to claim 6, characterized in that The SCD file includes the description, type, category, function identifier, and IED of the virtual terminal loop, wherein the description is a textual explanation of the virtual terminal loop, the type is used to characterize the function type of the virtual terminal loop, the category is used to characterize the category to which the virtual terminal loop belongs in the scene, and the function identifier is used to identify the virtual terminal loop; The home IED is used to represent the intelligent electronic device to which the virtual terminal belongs.

8. A virtual terminal loop rule construction device, characterized in that: include: Data processing module, used to obtain SCD files; It is also used to input the SCD file into the trained first neural model to obtain the text vector output by the trained first neural model, wherein each embedded vector in the text vector is used to represent the knowledge information of the virtual terminal loop of the SCD file; Also used for inputting the text vector into a trained second neural model to obtain a target label sequence output by the trained second neural network, wherein the target label sequence includes annotation results of each entity in the SCD file; A construction module is used to extract information of each entity and the relationship between each entity from the SCD file according to the target tag sequence; It is also used to generate a virtual terminal loop rule base of the SCD file according to the entity information and the relationship between the entities; The trained first neural model is used to extract text features of the SCD file; determine a text vector of the SCD file according to the text features, and output the text vector; The trained second neural model is used to determine the label information of each embedding vector according to the context information of the embedding vector; determine the target label sequence of the SCD file according to the label information of each embedding vector, and output the target label sequence.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.