Power standard clause difference identification method and system based on knowledge representation learning

By constructing a knowledge graph of power standard clauses and utilizing uncertainty knowledge representation learning and deep learning models, the differences between power equipment standard and specification documents are identified. This solves the problem of high manpower consumption in traditional methods, and enables rapid and accurate identification and prompting of differences in clause content, thereby improving the efficiency of power equipment management.

CN116644733BActive Publication Date: 2026-11-24STATE GRID CORPORATION OF CHINA +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310593941.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2026-11-24
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

Existing power equipment standards and specifications contain inconsistencies, contradictions, and mutual exclusions, making it difficult for grassroots work teams to make choices. Traditional methods are unable to effectively identify and locate the differences in the clauses, resulting in a significant waste of manpower.

Method used

A knowledge graph of power standard clauses is constructed using a knowledge representation learning approach. An uncertain knowledge representation learning model is used to obtain vector representations of entities and relationships. Combined with a deep learning text similarity calculation model, the semantic similarity of sentences and triple similarity of standard clauses are identified, enabling accurate location and precise prompting of clause content differences.

Benefits of technology

It can quickly and accurately locate differences in the terms and conditions and provide hints of these differences, reducing manpower consumption, improving work efficiency and quality, and supporting the unified management of standard terms and conditions for power equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116644733B_ABST
    Figure CN116644733B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for identifying differences in power standard clauses based on knowledge representation learning. The method includes: (1) acquiring a knowledge graph of power standard clauses, retrieving the standard clause information to be identified based on entity names, including the file code, file name, directory, and clause content of the clause; (2) using an uncertain knowledge representation learning model to obtain the representation vectors of entities and relations in the knowledge graph; (3) calculating the semantic similarity of sentences of two standard clauses based on the clause content using a deep learning-based text similarity calculation model; (4) when the semantic similarity of sentences of two standard clauses is higher than a first threshold, using a clause difference identification model to solve the triple similarity of the two standard clauses, thereby realizing clause difference identification. This invention can quickly and accurately locate differences in clause content and provide precise prompts for the differences, providing technical support for the unification of power equipment standard clauses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer application technology, and in particular relates to a method and system for identifying differences in power standard clauses based on knowledge representation learning. Background Technology

[0002] Power equipment plays a vital role in the power grid system, ensuring its safe and stable operation. With the continuous improvement of the power grid system, the types and complexity of power equipment have increased, leading to a significant increase in relevant standards and specifications. The differences between these standards and specifications are also growing. However, these standards may contain inconsistencies, contradictions, and even mutual exclusions. These differences can cause difficulties for grassroots work teams in choosing the right standards, impacting work efficiency. Effectively utilizing this knowledge and identifying the differences between standard clauses is a crucial aspect of refined power equipment management.

[0003] Existing research in the power sector mainly focuses on power knowledge graph construction, equipment fault detection, and power information security, with limited research on discrepancies in power standard documents. Based on current development trends in the power industry, discrepancy identification in standard clauses is expected to be a pressing issue. Knowledge graphs, as an important branch of artificial intelligence, possess excellent knowledge representation and interpretability, and are widely used in various fields, such as semantic search, intelligent question answering, personalized recommendations, and decision support. However, their application in the power sector is still in its early stages. Knowledge representation learning, by achieving distributed representations of entities and relationships, can realize semantic computation and reasoning between entities, significantly improving computational efficiency and effectively mitigating data sparsity. However, in the process of constructing knowledge graphs for power equipment standard clauses, there are uncertainties such as noise and errors that are difficult to remove. Traditional knowledge representation learning methods cannot meet the representation requirements of uncertain knowledge graphs. Furthermore, due to the sheer number and complex sentence structures of standard clauses, relying solely on experts to find discrepancies would consume a significant amount of manpower. Therefore, there is an urgent need to propose a technology capable of locating discrepancies in clause content and providing precise hints about these discrepancies. Summary of the Invention

[0004] Purpose of the invention: This invention addresses the characteristics of knowledge graphs in power equipment standards by proposing a method and system for identifying differences in power standard clauses based on knowledge representation learning. This method fully mines the standard information in the knowledge graph, accurately locates differences in clause content, and provides precise prompts for the differences.

[0005] Technical solution: Firstly, a method for identifying differences in electricity standard clauses based on knowledge representation learning is provided, including the following steps:

[0006] (1) Obtain the knowledge graph of power standard clauses and retrieve the standard clause information that needs to be identified based on the entity name, including the document code, document name, directory and clause content of the clause;

[0007] (2) The uncertainty knowledge representation learning model is used to obtain the representation vectors of entities and relations in the knowledge graph. The uncertainty refers to the noise generated in the process of constructing the knowledge graph. The uncertainty knowledge representation learning model obtains the representation vectors of entities and relations by calculating the confidence score of the triples in the knowledge graph and minimizing the loss function composed of the triple score and the confidence score of the triples.

[0008] (3) Based on the content of the clauses, use a deep learning-based text similarity calculation model to calculate the semantic similarity of the sentences of the two standard clauses;

[0009] (4) When the semantic similarity of the sentences of two standard clauses is higher than the first threshold, the clause difference identification model is used to calculate the triple similarity of the two standard clauses, and the clause difference identification is realized based on the triple similarity.

[0010] Furthermore, obtaining the knowledge graph of electricity standard clauses includes:

[0011] The dependency parsing-based triple extraction method extracts triples (h, r, t) from power standard clause documents, where h is the head entity, r is the relation, and t is the tail entity. A knowledge graph is constructed with entities as nodes, relations as edges, and file encoding, file name, and directory as attribute information.

[0012] Further, step (2) includes:

[0013] (2-1) Obtain triple information from the knowledge graph and initialize entity and relation vectors;

[0014] (2-2) Use the existing triples in the knowledge graph as positive samples, and obtain negative samples by randomly replacing the head or tail entities in the positive samples.

[0015] (2-3) Calculate the confidence level of each triplet sample to obtain the uncertainty triplet representation <(h,r,t),c>, where (h,r,t) is the triplet, h represents the head entity, r represents the relation, t represents the tail entity, and c is the confidence level;

[0016] (2-4) Divide the negative sample set into new sample sets P and Q, and set three different loss functions L based on the positive sample set T and the two new sample sets P and Q. T L P L Q ;

[0017] (2-5) The total loss function obtained by combining the three loss functions N represents the number of negative samples. By minimizing the total loss function, an uncertain knowledge representation learning model is trained to obtain vector representations of entities and relationships.

[0018] Furthermore, the confidence level of a triple is calculated using the following formula:

[0019]

[0020] Where b and ω are model hyperparameters, and ||||2 represents the second norm of the vector;

[0021] The three loss functions are defined as follows:

[0022]

[0023]

[0024]

[0025] Where f() represents the mapping function used to constrain the value of the triple to [0,1], c' is the confidence score corresponding to the triple (h′,r′,t′), and c″ is the confidence score corresponding to the triple (h″,r″,t″).

[0026] Further, step (3) includes:

[0027] (3-1) Segment the content of the two standard clauses into words, and truncate the segmentation results to a fixed length len. Map each word in the text to a d-dimensional word embedding vector, and finally obtain a len*d-dimensional vector.

[0028] (3-2) The len*d dimension vector is used as input to extract key information in the text through a convolutional neural network, the semantic information of the context is extracted and learned through a bidirectional gated recurrent neural network, the dimension of the vector is reduced through a pooling layer, and finally the above information is integrated through a fully connected layer to obtain the sentence vector representation;

[0029] (3-3) The Manhattan distance between the two text semantic vectors x1 and x2 is calculated as the text similarity.

[0030] Further, in step (4), the triplet similarity of two standard clauses is calculated using the clause difference identification model, and clause difference identification is achieved based on the triplet similarity, including:

[0031] (4-1) Based on the attribute values ​​of the clauses, obtain the sets of triples X and Y corresponding to the two clauses x and y in the knowledge graph of standard clauses of power equipment, and the sets X and Y are non-empty sets;

[0032] (4-2) Calculate the head entity similarity, relation similarity, and tail entity similarity between each triplet in set X and each triplet in set Y. Represent the two vectors whose similarity needs to be calculated as y1 and y2. The similarity calculation formula is as follows:

[0033]

[0034] Where dim2 represents the dimensions of vectors y and y2. and Let y1 and y2 represent the values ​​in the i-th dimension.

[0035] Furthermore, identifying clause differences based on triple similarity includes:

[0036] Based on the comparison between the calculated triplet similarity threshold and the specified second threshold, it is determined whether two representation vectors are similar. When the similarity between the two vectors is higher than the second threshold, the two representation vectors are determined to be similar, that is, the entities / relationships are similar.

[0037] Considering the three cases of head entity similarity, relation similarity, and tail entity similarity, for triples with any two or more similarities, determine that the two triples have overlapping content and record the similarity of the triples.

[0038] Based on the cross-determination results of the triple content and combined with the similarity of triples, the differences in the clauses are identified.

[0039] Secondly, a system for identifying differences in electricity standard terms based on knowledge representation learning is provided, including:

[0040] The information acquisition module is used to acquire the knowledge graph of power standard clauses and retrieve the standard clause information that needs to be identified based on the entity name, including the document code, document name, directory, and clause content of the clause.

[0041] The vector representation module is used to obtain the representation vectors of entities and relations in a knowledge graph using an uncertain knowledge representation learning model. The uncertainty refers to the noise generated during the construction of the knowledge graph. The uncertain knowledge representation learning model obtains the representation vectors of entities and relations by calculating the confidence score of the triples in the knowledge graph and minimizing the loss function composed of the triple score and the confidence score of the triples.

[0042] The semantic similarity module is used to calculate the sentence semantic similarity between two standard clauses based on the content of the clauses using a deep learning-based text similarity calculation model.

[0043] The triplet similarity module is used to calculate the triplet similarity between two standard clauses when the semantic similarity of their sentences is higher than a first threshold, and then use the clause difference identification model to identify the clause differences based on the triplet similarity.

[0044] Thirdly, a computer device is provided, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the knowledge representation learning-based method for identifying differences in power standard terms as described in the first aspect of the invention.

[0045] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the knowledge representation learning-based method for identifying differences in power standard clauses as described in the first aspect of the present invention.

[0046] Beneficial Effects: This invention proposes a method, system, device, and computer-readable medium for identifying differences in power equipment standard clauses based on knowledge representation learning. The method uses a knowledge graph of power equipment standard clauses as the data source, employs an uncertain knowledge representation learning method to obtain vector representations of entities and relations corresponding to triples, uses a deep learning text similarity calculation model to obtain sentence similarity for preliminary screening, and then uses a clause difference identification model to identify differences in clause content. Starting from the knowledge graph of power equipment technical clauses, this method completes knowledge representation before calculating similarity, reducing the time for clause difference identification. It determines whether there is content overlap in triples based on entity similarity and relation similarity, and determines clause differences based on triple similarity information. This method can quickly and accurately locate clause content differences and provide precise hints of the differences. This method can provide technical support for the unification of power equipment standard clauses, thereby effectively reducing the workload of grassroots teams and improving employee work efficiency and quality. Attached Figure Description

[0047] Figure 1 This is a flowchart of the method for identifying differences in electricity standard clauses according to the present invention;

[0048] Figure 2 This is a schematic diagram of the text similarity calculation model according to the present invention. Detailed Implementation

[0049] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0050] In one embodiment, the present invention proposes a method for identifying differences in power standard clauses based on knowledge representation learning. The method uses a knowledge graph of power equipment standard clauses as the data source, utilizes an uncertain knowledge representation learning model to obtain entity and relation representation vectors, and uses a clause difference precision prompting model to locate the differences in clause content and provide precise prompts.

[0051] Reference Figure 1 The method of the present invention includes the following steps:

[0052] Step 1: Obtain the knowledge graph of electricity standard clauses, and retrieve the standard clause information that needs to be identified based on the entity name, including the document code, document name, directory, and clause content of the clause.

[0053] In this invention, "electricity standard clauses" are also called "electricity equipment standard clauses" or "electricity equipment standard specifications." For ease of description, "electricity standard clauses" will be used to refer to "electricity equipment standard clauses" in the following text. Correspondingly, "electricity standard clauses knowledge graph" refers to "electricity equipment standard clauses knowledge graph."

[0054] According to an embodiment of the present invention, step 1 specifically includes the following sub-steps:

[0055] Sub-step A1: Obtain the knowledge graph of electricity standard clauses. Further, a knowledge graph of electricity standard clauses can be obtained using domain knowledge graph construction technology based on the content of relevant documents. As an example, the original text information of the electricity standard clauses is shown in Table 1:

[0056] Table 1. Original Text Information of Electricity Standard Clauses

[0057]

[0058] The process of constructing a knowledge graph includes:

[0059] (a) Triple extraction is performed on the electricity standard clauses. The triple format is (h, r, t), where h is the head entity, r is the relation, and t is the tail entity. The extraction of entities and relations is based on the triple extraction method of dependency syntax. Examples of extraction are shown in Table 2.

[0060] Table 2 shows the triplet extracted from the electricity standard clauses.

[0061]

[0062] (b) Construct a knowledge graph with entities as nodes, relationships as edges, and file encoding, file name, and directory as attribute information.

[0063] Sub-step A2: Use Cypher statements to query the standard clause information that needs to be compared and identified based on the entity name in the knowledge graph.

[0064] For example, to perform a difference search on relevant standard clauses related to "insulators," it's necessary to first perform a fuzzy match of triples related to "insulators." This can be done using the Cypher statement to query within a knowledge graph. The Cypher statement is as follows:

[0065] Match(h:Entity)-[r:Relation]->(t:Entity)whereh.namecontains'insulator'ort.namecontains'insulator'Returnh,r,t,r.term.

[0066] This can return all entities whose entity names contain "insulator", the triple associated with that entity, and the terms r.term.

[0067] Step 2: Establish an uncertain knowledge representation learning model to obtain representation vectors for entities and relationships.

[0068] According to an embodiment of the present invention, step 2 specifically includes the following sub-steps:

[0069] Sub-step B1: Obtain triple information such as entities and relations from the knowledge graph.

[0070] Retrieve all entities from the knowledge graph and assign an e_num number to each entity, resulting in an entity set E = {[entity1, e_num1], [entity2, e_num2]...[entity...} n ,e_num n ]}, where n represents the number of entities. In this embodiment of the invention, a total of 1562 entities were obtained, numbered 0-1561, and the entity set is E={[mutual inductance surge arrester,0],[voltage device,1]...[high voltage switchgear,1561]}.

[0071] Retrieve all relation types from the knowledge graph and assign a number r_num to each relation type, resulting in a relation set R = {[relation1, r_num1], [relation2, r_num2]...[relation...} m ,r_num m ]}, where m represents the number of relation types. In this embodiment of the invention, a total of 286 relations are obtained, with relation numbers ranging from 0 to 285, and R = {[less than, 0], [greater than, 1]...[exceeds, 285]}.

[0072] Retrieve all triples in the knowledge graph, T = {[h1,r1,t1],[h2,r2,t2]...[h s ,rs ,t s Let ]} be the set of triples obtained, and s represent the number of triples. h i ,r i ,t i These represent the head entity number, relation number, and tail entity number, respectively. In this embodiment of the invention, a total of 1133 triples were obtained, T = {[1361,52,1222],[127,13,1478]...[15,30,701]}.

[0073] Sub-step B2: Initialize entity and relation vectors.

[0074] Using the entity set E and relation set R obtained in step B1 as input, initialize the entity and relation representation vectors with a specified dimension d = 100, that is, each entity vector in E. Each relation vector in R

[0075] Sub-step B3: Obtain positive and negative samples.

[0076] According to an embodiment of the present invention, a positive sample refers to a triplet that already exists in the knowledge graph; that is, the set of triples T obtained in sub-step B1 is the set of positive samples. A negative sample refers to a set of triplet samples F obtained by randomly replacing the head or tail entity in a positive sample, where F = {[h1,r1′,t1′],[h2′,r2′,t2′]...[h s ′,r s ′,t s ′]}.

[0077] For example: positive sample T = {[1361,52,1222],[127,13,1478]...[15,30,701]}, negative sample F = {[1361,52,122],[126,13,1478]...[355,30,701]}.

[0078] Sub-step B4: Calculate the confidence level of each triplet sample to obtain the uncertain triplet representation.

[0079] In this invention, uncertainty refers to the noise generated during the construction of the knowledge graph. Confidence level is used to measure the degree of uncertainty of the triples.

[0080] For each triple (h, r, t), where h represents the head entity, r represents the relation, and t represents the tail entity, substep B2 yields the initial d-dimensional vector representation of the entities and relations, i.e. This invention designs a formula for calculating sample confidence using a triplet scoring function. First, the triplet scoring function formula is as follows:

[0081] f(h,r,t)=||h+rt||2

[0082] Secondly, the value of f(h,r,t) is constrained to [0,1] using a mapping function, and parameters b and ω are introduced (these two parameters are initially randomly initialized and will be continuously optimized during model training in sub-step B6), resulting in the following confidence calculation formula:

[0083]

[0084] In this invention, uncertainty is measured by scoring the triple representation vectors using a scoring function (i.e., the confidence calculation formula). Here, ||||2 represents the second norm or 2-norm of the vector. ||h+rt||2 is the vector distance calculation for the triples, and the parameters b and ω map the vector distance to confidence using a linear mapping. These parameters are optimized during model training. This means constraining the confidence score to the range [0,1].

[0085] By calculating the confidence of all triples in the positive and negative sample sets, the uncertain triple representation <(h,r,t),c> is obtained. This is the uncertain knowledge representation learning model described in this invention. Using this model, entities and relations in the knowledge graph can be represented as better vectors.

[0086] In this embodiment of the invention, for the triple (h,r,t), sub-step B2 yields the initial 100-dimensional vector representation of the entity and relation, i.e. Substituting these values ​​into the confidence level calculation formula yields the confidence level c, ultimately resulting in the uncertainty knowledge representation <(h,r,t),c>.

[0087] Sub-step B5: Divide the negative sample set into new sample sets P and Q, and set the loss function.

[0088] According to an embodiment of the present invention, the negative sample set is arranged in ascending order of confidence, and the half of the samples with higher confidence is selected as a new set P in a 1:1 ratio, while the half of the samples with lower confidence is selected as a new sample set Q. At this time, three different loss functions are set based on the positive sample set T and the two new sample sets P and Q:

[0089]

[0090]

[0091]

[0092] Sub-step B6: Train the uncertain knowledge representation learning model by minimizing the total loss function to obtain vector representations of entities and relations.

[0093] According to an embodiment of the present invention, the total loss function obtained by combining the three loss functions is:

[0094]

[0095] N represents the number of negative samples. By minimizing the total loss function, the parameters b and ω during model training are optimized using the backpropagation algorithm, thereby optimizing the model representation vectors h, r, t.

[0096] Step 3: Establish a deep learning-based text similarity calculation model to calculate the semantic similarity of sentences between two standard clauses.

[0097] Reference Figure 2 According to an embodiment of the present invention, step 3 specifically includes the following sub-steps:

[0098] Sub-step C1: Preprocessing. The two standard clauses are segmented into words, and the segmentation results are truncated to a fixed length len. The value of len can be customized; text shorter than len is padded with 0. Word2vec is used to map each word in the text to a d-dimensional word embedding vector, ultimately obtaining a len*d-dimensional vector as input.

[0099] Sub-step C2: Extract key information from the text using a convolutional neural network, extract and learn semantic information of the context using a bidirectional gated recurrent neural network, reduce the dimensionality of the vectors using a pooling layer, and finally integrate the above information through a fully connected layer to obtain the sentence vector representation.

[0100] Sub-step C3: Sentence similarity calculation. The Manhattan distance between the text semantic vectors x1 and x2 obtained in sub-step C2 is used as the text similarity. The formula is as follows:

[0101]

[0102] Where dim1 represents the dimension of semantic vector x.

[0103] For example, the semantic similarity d = 0.56 between "After the suspension clamp is installed, the insulator should be perpendicular to the ground plane. In some cases, its offset angle along the line direction from the vertical position should not exceed 2°, and the maximum offset value should generally not exceed 400mm. The installation position of the suspension clamp on the tower on the continuous uphill (downhill) slope should meet the design specifications." and "The maximum offset of the insulator string along the line direction of the straight tower (excluding the pre-offset considered in the design) should not be greater than 300mm or 7.5°".

[0104] In this invention, for clauses whose standard clause sentence similarity d is greater than a specified threshold k1, a triplet similarity comparison is further performed to obtain information on the differences between clause content.

[0105] Step 4: Establish a clause difference identification model, solve the triple similarity of two standard clauses, and realize clause difference identification.

[0106] According to an embodiment of the present invention, step 4 specifically includes the following sub-steps:

[0107] Sub-step D1: Obtain the triples for the two power standard clauses respectively. Based on the clause attribute values, obtain the sets X and Y of triples corresponding to clauses x and y in the power equipment standard clause knowledge graph, where sets X and Y are non-empty sets. Examples are shown in Table 3:

[0108] Table 3 Examples of Triplets in Electricity Standard Clauses

[0109]

[0110]

[0111] Sub-step D2: Calculate the head entity similarity, relation similarity, and tail entity similarity between each triplet in set X and each triplet in set Y. These are collectively referred to as triplet similarity.

[0112] The following triplet similarity calculation formula is used in this invention:

[0113]

[0114] Since we need to calculate head entity similarity, relation similarity, and tail entity similarity separately, to avoid redundancy in the formulas, we will represent the two vectors for which similarity needs to be calculated as y1 and y2. For example, head entity similarity requires calculating the similarity between the head entity in triple 1 and the head entity in triple 2, where y1 refers to the first head entity and y2 refers to the second head entity. Here, dim2 represents the dimension of vectors y1 and y2. and Let y1 and y2 represent the values ​​in the i-th dimension.

[0115] The representation vectors of entities and relations are obtained from step 2. In this embodiment, the triplet similarity threshold k2 = 0.75 is set. When the similarity between two vectors is higher than k2, the two representation vectors are determined to be similar, that is, the entities / relationships are similar.

[0116] For example, the results of judging the similarity between the three-element group X (insulator offset angle along the line direction, not exceeding 2°) and the three-element group Y (insulator string offset along the line direction, not exceeding 300mm or 7.5°) are shown in Table 4 below.

[0117] Table 4 Examples of similarity comparisons between two triples

[0118]

[0119] Sub-step D3: Determine whether there is content overlap between the two triples.

[0120] According to an embodiment of the present invention, the triple content overlap determination rule is as follows: considering three cases—head entity similarity, relation similarity, and tail entity similarity—triples with any two or more similarities are determined to have content overlap, and the triple similarity is recorded. Examples are shown in Table 5:

[0121] Table 5 Examples of Triple Similarity Judgments

[0122]

[0123] Sub-step D4: Locating differences in clause content. Based on the cross-referencing results of the triplet content obtained in sub-step D3, and considering the similarity of triplet content, locate the differences in clause content.

[0124] For example: Based on the 'Similarity Cases' and 'Whether Content Overlaps Exists' columns obtained in sub-step D3 (Table 5 Example of Triple Similarity Judgment), locate the differences between the clauses, as shown in the third row of Table 5:

[0125]

[0126] Based on the overlap of content and the similarity of the head entities and relationships, the difference can be located as the tail entity, namely '2°' and '300mm or 7.5°'.

[0127] Sub-step D5: Clause Difference Notification. Based on the results of sub-step D4, if there are differences in the clauses, basic clause information will be displayed, including the clause document number, table of contents, and clause content. An example is shown in Table 6:

[0128] Table 6 Example of Clause Differences

[0129]

[0130] Based on the same technical concept as the method embodiments, the present invention also provides a power standard clause difference identification system based on knowledge representation learning, comprising:

[0131] The information acquisition module is used to acquire the knowledge graph of power standard clauses and retrieve the standard clause information that needs to be identified based on the entity name, including the document code, document name, directory, and clause content of the clause.

[0132] The vector representation module is used to obtain the representation vectors of entities and relations in a knowledge graph using an uncertain knowledge representation learning model. The uncertainty refers to the noise generated during the construction of the knowledge graph. The uncertain knowledge representation learning model obtains the representation vectors of entities and relations by calculating the confidence score of the triples in the knowledge graph and minimizing the loss function composed of the triple score and the confidence score of the triples.

[0133] The semantic similarity module is used to calculate the sentence semantic similarity between two standard clauses based on the content of the clauses using a deep learning-based text similarity calculation model.

[0134] The triplet similarity module is used to calculate the triplet similarity between two standard clauses when the semantic similarity of their sentences is higher than a first threshold, and then use the clause difference identification model to identify the clause differences based on the triplet similarity.

[0135] It should be understood that the knowledge representation learning-based power standard clause difference identification system in the embodiments of the present invention can implement all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.

[0136] The present invention also provides a computer device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the knowledge representation learning-based method for identifying differences in power standard terms as described in the first aspect of the present invention.

[0137] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the knowledge representation learning-based method for identifying differences in power standard clauses as described in the first aspect of the present invention.

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

[0139] This invention is described with reference to flowchart illustrations of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each step in the flowchart, and combinations of steps in the flowchart, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the steps in the flowchart. Figure 1 A device for a function specified in one or more processes.

[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.

[0141] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.

Claims

1. A method for identifying differences in electricity standard clauses based on knowledge representation learning, characterized in that, Includes the following steps: (1) Obtain the knowledge graph of power standard clauses and retrieve the standard clause information that needs to be identified based on the entity name, including the document code, document name, directory and clause content of the clause; (2) Obtain the representation vectors of entities and relations in the knowledge graph using an uncertain knowledge representation learning model. The uncertainty refers to the noise generated during the construction of the knowledge graph. The uncertain knowledge representation learning model obtains the representation vectors of entities and relations by calculating the confidence scores of triples in the knowledge graph and minimizing the loss function composed of the triple scores and the confidence scores of triples. Step (2) specifically includes: (2-1) Obtain triple information from the knowledge graph and initialize entity and relation vectors; (2-2) Take the existing triples in the knowledge graph as positive samples, and obtain negative samples by randomly replacing the head or tail entities in the positive samples; (2-3) Calculate the confidence score for each triplet sample to obtain the uncertainty triplet representation <(h,r,t),c>, where (h,r,t) is the triplet, h represents the head entity, r represents the relation, t represents the tail entity, and c is the confidence score; the formula for calculating the confidence score of the triplet is as follows: , Where b and For model hyperparameters, The second norm of a vector; The three loss functions are defined as follows: , , , Where f() represents a mapping function used to constrain the values ​​of triples to the range [0,1]. To correspond to triples The confidence score, The confidence score corresponding to the triple; (2-4) Divide the negative sample set into new sample sets P and Q, and set three different loss functions based on the positive sample set T and the two new sample sets P and Q. , , ; (2-5) The total loss function obtained by combining the three loss functions N represents the number of negative samples. By minimizing the total loss function, an uncertain knowledge representation learning model is trained to obtain vector representations of entities and relationships. (3) Based on the content of the clauses, use a deep learning-based text similarity calculation model to calculate the semantic similarity of the sentences of the two standard clauses; (4) When the semantic similarity of the sentences of two standard clauses is higher than the first threshold, the clause difference identification model is used to calculate the triple similarity of the two standard clauses, and the clause difference identification is realized based on the triple similarity.

2. The method according to claim 1, characterized in that, Accessing the knowledge graph of electricity standard clauses includes: The dependency parsing-based triple extraction method extracts triples (h, r, t) from power standard clause documents, where h is the head entity, r is the relation, and t is the tail entity. A knowledge graph is constructed with entities as nodes, relations as edges, and file encoding, file name, and directory as attribute information.

3. The method according to claim 1, characterized in that, Step (3) includes: (3-1) Segment the content of the two standard clauses into words, and truncate the segmentation results to a fixed length len. Map each word in the text to a d-dimensional word embedding vector, and finally obtain a len*d-dimensional vector; (3-2) The key information in the text is extracted by a convolutional neural network using a len*d dimension vector as input, the semantic information of the context is extracted and learned by a bidirectional gated recurrent neural network, the dimension of the vector is reduced by a pooling layer, and finally the above information is integrated by a fully connected layer to obtain the sentence vector representation; (3-3) The two text semantic vectors obtained are calculated , The Manhattan distance between them is used as a measure of text similarity.

4. The method according to claim 1, characterized in that, In step (4), the triplet similarity of two standard clauses is calculated using the clause difference identification model. Clause difference identification is achieved based on the triplet similarity, including: (4-1) Based on the attribute values ​​of the clauses, obtain the sets of triples X and Y corresponding to the two clauses x and y in the knowledge graph of the standard clauses of power equipment, and the sets X and Y are non-empty sets; (4-2) Calculate the head entity similarity, relation similarity, and tail entity similarity between each triplet in set X and each triplet in set Y. Represent the two vectors whose similarity needs to be calculated as follows: and The similarity calculation formula is as follows: , Where dim2 represents a vector and Dimensions and Representing vectors and The value in the i-th dimension.

5. The method according to claim 4, characterized in that, Identifying clause differences based on triplet similarity includes: Based on the comparison between the calculated triplet similarity threshold and the specified second threshold, it is determined whether two representation vectors are similar. When the similarity between the two vectors is higher than the second threshold, the two representation vectors are determined to be similar, that is, the entities / relationships are similar. Considering the three cases of head entity similarity, relation similarity, and tail entity similarity, for triples with any two or more similarities, determine that the two triples have overlapping content and record the similarity of the triples. Based on the cross-determination results of the triple content and combined with the similarity of triples, the differences in the clauses are identified.

6. A power standard clause difference identification system based on knowledge representation learning, used to implement the method described in any one of claims 1-5, characterized in that, include: The information acquisition module is used to acquire the knowledge graph of power standard clauses and retrieve the standard clause information that needs to be identified based on the entity name, including the document code, document name, directory, and clause content of the clause. The vector representation module is used to obtain the representation vectors of entities and relations in a knowledge graph using an uncertain knowledge representation learning model. The uncertainty refers to the noise generated during the construction of the knowledge graph. The uncertain knowledge representation learning model obtains the representation vectors of entities and relations by calculating the confidence score of the triples in the knowledge graph and minimizing the loss function composed of the triple score and the confidence score of the triples. The semantic similarity module is used to calculate the sentence semantic similarity between two standard clauses based on the content of the clauses using a deep learning-based text similarity calculation model. The triplet similarity module is used to calculate the triplet similarity between two standard clauses when the semantic similarity of their sentences is higher than a first threshold, and then use the clause difference identification model to identify the clause differences based on the triplet similarity.

7. A computer device, characterized in that, include: One or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the knowledge representation learning-based method for identifying differences in power standard terms as claimed in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for identifying differences in power standard terms based on knowledge representation learning as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Power industry information analysis method and equipment based on knowledge graph

    CN115080694A

  • Knowledge graph reasoning method and device

    CN115222050A