A knowledge graph construction method based on JERPE

By using a multi-agent reinforcement learning method based on JERPE to initialize state features and iteratively update parameters, the problem of error accumulation in knowledge graph construction is solved, and efficient and accurate knowledge graph construction is achieved.

CN116257637BActive Publication Date: 2026-04-28SHANXI INFORMATION IND TECH RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANXI INFORMATION IND TECH RES INST CO LTD
Filing Date
2023-03-08
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The knowledge graphs constructed using existing technologies suffer from error accumulation, resulting in inaccurate knowledge graphs.

Method used

We employ a JERPE-based approach, using multi-agent reinforcement learning to initialize primary and secondary state features, utilizing a sliding window to process data sources, and updating multi-agent parameters by maximizing rewards. We iteratively extract entity relationships and attributes to construct a knowledge graph.

Benefits of technology

It enables automatic joint extraction of entity relationship attributes, reduces the error of traditional pipeline extraction, and improves the accuracy and efficiency of knowledge graph construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257637B_ABST
    Figure CN116257637B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of map construction method, and particularly relates to a knowledge map construction method based on JERPE, which comprises the following steps: obtaining data sources required for constructing a knowledge map and performing sliding window processing on text data; initializing primary state features; initializing secondary state features; taking the primary state features and the secondary state features as an environment in which an intelligent agent is located, and maximizing a reward to update parameters of the multi-intelligent agent; obtaining the next time primary state features of the current time from the multi-intelligent update; obtaining the next time secondary state features of the current time; and completing entity relationship attribute extraction to construct a knowledge map. The application can solve the accumulated error problem existing in traditional pipeline extraction, and efficiently and accurately realize construction of a knowledge map. The application can provide strong technical support for information retrieval, intelligent dialogue and many other applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of knowledge graph construction methods, specifically relating to a knowledge graph construction method based on JERPE. Background Technology

[0002] Currently, with the rapid development of information technology, the level of informatization in various fields is gradually increasing. Knowledge graphs, as a particularly important technology, are applied in many areas such as retrieval and intelligent dialogue. Benefiting from their inherent advantage in revealing the relationships between real-world entities, these relationships provide more comprehensive features for the representation of each node, resulting in excellent semantic reasoning capabilities. Therefore, knowledge graph construction technology has also received widespread attention as a key technology.

[0003] Knowledge extraction, a crucial and fundamental task in natural language processing, aims to extract data that meets specific needs. Currently, most extraction tasks are based on pipeline extraction, which leads to the accumulation of errors. As a fundamental step in knowledge graph construction, knowledge extraction involves the extraction of entities, relationships, and attributes. However, knowledge graphs constructed using existing technologies often contain a certain degree of error. Therefore, addressing the problem of error accumulation in traditional knowledge graph construction methods is of great significance. Summary of the Invention

[0004] To address the technical problem that knowledge graphs constructed using existing technologies often contain a certain degree of error, this invention provides a knowledge graph construction method based on JERPE, which can accurately and automatically construct knowledge graphs.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0006] A knowledge graph construction method based on JERPE includes the following steps:

[0007] S1. Obtain the data source needed to build the knowledge graph and perform sliding window processing on text data with a length exceeding 600 characters in the data source;

[0008] S2. Initialize the initial state features, which include entity pairs, relationships between entity pairs, and positional feature information of each attribute of an entity pair.

[0009] S3. Initialize secondary state features, which include entity pairs and the distance between entities and attributes.

[0010] S4. Primary state features and secondary state features serve as the environment in which the agent exists, maximizing rewards to update the parameters of the multi-agent system;

[0011] S5. Update the primary state features of the next time step based on the multi-intelligence obtained in S4.

[0012] S6. Based on S5, obtain the secondary state characteristics of the next time step from the current time step;

[0013] S7, iterating through S4, S5, and S6, completes the extraction of entity relationship attributes to construct the knowledge graph.

[0014] In step S1, the data source from which information needs to be extracted is obtained and the data is segmented.

[0015] The data sources include text data of public comments in the field of government services, text data of government agency websites about agency introductions, and text data of relevant personnel introductions;

[0016] The data segmentation involves performing sliding window processing on texts with a length exceeding 512 in the data source. The sliding step size is set to 50, which can decompose long texts into texts of length 512 for information extraction, thereby reducing the computational complexity of long texts.

[0017] The initial state features are initialized in S2. Includes the first state component S t1 Second state component S t2 ..., the tenth state component S t10 ;

[0018] The initialization primary state features are:

[0019]

[0020] Where t = 0, S is a 512×10 dimensional binary vector. t1 S t2 ... S t10 These are 512-dimensional binary vectors; the first component S t1 The first component is the feature information of the starting position of the first entity in the entity pair; the second component is S. t2 The first entity in the entity pair has end position feature information; the third component S t3 The fourth component S represents the attribute start position feature information of the first entity in the entity pair. t4 The fifth component S represents the attribute end position feature information of the first entity in the entity pair. t5 The sixth component S represents the feature information of the starting position of the second entity in the entity pair. t6 The end position feature information of the second entity in the entity pair; the seventh component S t7 The attribute start position feature information of the second entity in the entity pair; the eighth component S t8The attribute end position feature information of the second entity in the entity pair; Ninth component S t9 This refers to the starting position information of the entity-to-relationship; the tenth component S. t1 This provides information about the end position of the entity-to-entity relationship.

[0021] The secondary state features are initialized in S3. Includes the first state component S t1 Second state component S t12 Third state component S t13 ;

[0022] The initialization secondary state features are:

[0023]

[0024]

[0025]

[0026]

[0027] Where t = 0, S is a 512×3 dimensional binary vector. t11 S t12 S t13 , respectively, are 512-dimensional binary vectors; S t11 This refers to the distance feature information between the first and second entities in an entity pair; S t12 For the attribute distance feature information between the first entity and the first entity in the entity pair, S t13 This refers to the attribute distance feature information between the second entity and the second entity in an entity pair.

[0028] The initialization primary state features obtained from S2 and S3 in S4 Initialize secondary state features The multi-agent system makes a policy selection A at time t. t And obtain the maximum reward R to update the environment state at the next time step:

[0029] The strategy selection A t for:

[0030] A t =[a t1 ,a t2 ,…,a tN ]

[0031] Where t = 0, N = 10, A t Given a 512×10 dimensional binary vector, a tk(k = 1, 2, ..., N) represents the action space of the k-th agent; a t1 a t2 ... a tN Each is a 512-dimensional binary vector, representing the action component of the k-th agent at time t; a t1 The position index of 1 in the middle represents the action policy of the first agent at time t regarding the starting position of the first entity in the entity pair; a t2 The position index of 1 in the middle represents the action policy of the second agent at time t for the end position of the first entity in the entity pair; a t3 The position index of 1 in the middle represents the action policy of the third agent at time t for the starting position of the first entity attribute in the entity pair; a t4 The position index of 1 in the middle represents the action policy of the fourth agent at time t for the end position of the first entity attribute in the entity pair; a t5 The position index of 1 in the middle represents the action policy of the 5th agent at time t regarding the starting position of the second entity in the entity pair; a t6 The position index of 1 in the middle represents the action policy of the 6th agent at time t for the end position of the second entity in the entity pair; a t7 The position index of 1 in the middle represents the action policy of the 7th agent at time t regarding the starting position of the second entity attribute in the entity pair; a t8 The position index of 1 in the middle represents the action policy of the 8th agent at time t for the end position of the second entity attribute in the entity pair; a t9 The position index of 1 represents the action policy of the 9th agent at time t regarding the starting position of the entity pair relation; a t10 The position index of 1 in the middle is the action policy of the 10th agent at time t for the end position of the entity pair relationship.

[0032] The environmental state at the next moment in S4 includes a first component and a second component;

[0033] The first component is:

[0034]

[0035]

[0036] S (t+1)n =softmax(σ(a) tn W tn (n = 1, 2, ..., 10)

[0037] S (t+1)n =S.index_select(argmax(S (t+1)n ))

[0038] Where t = 0, the Wki The W is a 512×512 dimensional learnable parameter vector. tn S is a 512×512 dimensional learnable parameter vector; S is a 512 dimensional vector of all zeros; argmax() represents the index of the maximum value; and index_select() represents setting the specified value to 1.

[0039] The second component is:

[0040]

[0041] Where t = 0, S (t+1)11 S (t+1)12 S (t+1)13 According to S (t+1)1 S (t+1)2 S (t+1)10 It was obtained from the middle.

[0042] The maximum reward in S4 is:

[0043]

[0044]

[0045]

[0046]

[0047]

[0048]

[0049] Wherein, r(s) i ) represents the current reward, and γ represents the discount factor; false indicates that the entity attribute location information in the current state is different from the corresponding real location information, and true indicates that the entity attribute location information in the current state is the same as the corresponding real location information; J(θ) represents the current reward. m,t ) represents the reward objective function for all states; θ t+1 , This represents the corresponding policy gradient algorithm.

[0050] The initial state feature at the next time step in S5 is obtained by maximizing the reward to update the multi-agent parameters in S4.

[0051] The secondary state feature at the next time step in S6 is obtained from the primary state feature at the next time step in S5.

[0052] Compared with the prior art, the beneficial effects of this invention are:

[0053] This invention leverages the advantages of efficient computation and information interaction among multiple agents in reinforcement learning to achieve automatic joint extraction of entity relationship attributes. It solves the problem of accumulated errors in traditional pipeline-based extraction and efficiently and accurately constructs knowledge graphs. This provides strong technical support for applications in information retrieval, intelligent dialogue, and many other areas. Attached Figure Description

[0054] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0055] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0056] Figure 1 This is a diagram illustrating the method steps of the present invention;

[0057] Figure 2 This is the multi-agent reinforcement learning graph of the present invention;

[0058] Figure 3 This is a primary state diagram of the present invention;

[0059] Figure 4 This is a secondary state diagram of the present invention. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. These descriptions are only for further illustrating the features and advantages of the present invention, and not for limiting the claims of the present invention. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0061] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0062] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0063] This embodiment provides a knowledge graph construction method based on JERPE to solve the problem of error accumulation in traditional knowledge graph construction methods.

[0064] The technical solution adopted in this embodiment is as follows:

[0065] A knowledge graph construction method based on JERPE, such as Figure 1 As shown, it includes the following steps:

[0066] S1: Obtain the data source needed to build the knowledge graph and perform sliding window processing on text data with a length exceeding 600 characters in the data source;

[0067] S2: Initialize the initial state features, which include entity pairs, relationships between entity pairs, and positional feature information of each attribute of an entity pair.

[0068] S3: Initialize secondary state features, which include entity pairs and the distance between entities and attributes;

[0069] S4: Primary state features and secondary state features serve as the environment in which the agent exists, maximizing rewards to update the parameters of the multi-agent system;

[0070] S5: Update the primary state features of the next time step based on the multi-intelligence obtained in S4;

[0071] S6: Obtain the secondary state characteristics of the next time step based on S5;

[0072] S7: Iterate through S4, S5, and S6 to extract entity relationship attributes and construct the knowledge graph.

[0073] The specific technical solution is as follows:

[0074] Step S1: Obtain the data source from which information needs to be extracted and perform data segmentation:

[0075] The data sources include text data of public comments in the field of government services, text data of introductions of government agencies on their official websites, and text data of introductions of relevant personnel.

[0076] Data segmentation involves using a sliding window to process texts longer than 512 characters from the data source. The sliding step size is set to 50, which can break down long texts into texts of length 512 for information extraction, thus reducing the computational complexity of long texts.

[0077] like Figure 3 As shown, step S2 initializes the primary state features. Includes the first state component S t1 Second state component S t2 ..., the tenth state component S t10 Specifically, it is as follows:

[0078] The initial state characteristics are initialized as shown in formula (1):

[0079]

[0080] In formula (1), t = 0. S is a 512×10 dimensional binary vector. t1 S t2 S t10 Each is a 512-dimensional binary vector. The first component S... t1 The first component is the feature information of the starting position of the first entity in the entity pair; the second component is S. t2 The first entity in the entity pair has end position feature information; the third component S t3 The fourth component S represents the attribute start position feature information of the first entity in the entity pair. t4 The fifth component S represents the attribute end position feature information of the first entity in the entity pair. t5 The sixth component S represents the feature information of the starting position of the second entity in the entity pair. t6 The end position feature information of the second entity in the entity pair; the seventh component S t7 The attribute start position feature information of the second entity in the entity pair; the eighth component S t8 The attribute end position feature information of the second entity in the entity pair; Ninth component S t9 This refers to the starting position information of the entity-to-relationship; the tenth component S. t10 This provides information about the end position of the entity-to-entity relationship.

[0081] like Figure 4 As shown, step S3 initializes the secondary state features. Includes the first state component S t1 Second state component S t12 Third state component S t13 Specifically, it is as follows:

[0082] The initialization of secondary state characteristics is shown in formula (2):

[0083]

[0084]

[0085]

[0086]

[0087] In formula (2), t = 0. S is a 512×3 dimensional binary vector. t11 S t12 S t13 , which are 512-dimensional binary vectors. S t11 This refers to the distance feature information between the first and second entities in an entity pair; S t12 For the attribute distance feature information between the first entity and the first entity in the entity pair, S t13 This refers to the attribute distance feature information between the second entity and the second entity in an entity pair.

[0088] In step S4, the initial primary state features obtained in steps S2 and S3 are used as a basis. Initialize secondary state features like Figure 2 As shown, the multi-agent strategy A is selected at time t. t And obtain the maximum reward R to update the environment state at the next time step:

[0089] Strategy A t As shown in formula (6):

[0090] A t =[a t1 a t2 , ..., a tN (6)

[0091] In formula (6), t = 0, N = 10, and A t Given a 512×10 dimensional binary vector, a tk (k = 1, 2, ..., N) represents the action space of the k-th agent; a t1 a t2 ... a tN Each is a 512-dimensional binary vector, representing the action component of the k-th agent at time t. t1 The position index of 1 in the middle represents the action policy of the first agent at time t regarding the starting position of the first entity in the entity pair; a t2 The position index of 1 in the middle represents the action policy of the second agent at time t for the end position of the first entity in the entity pair; at3 The position index of 1 in the middle represents the action policy of the third agent at time t for the starting position of the first entity attribute in the entity pair; a t4 The position index of 1 in the middle represents the action policy of the fourth agent at time t for the end position of the first entity attribute in the entity pair; a t5 The position index of 1 in the middle represents the action policy of the 5th agent at time t regarding the starting position of the second entity in the entity pair; a t6 The position index of 1 in the middle represents the action policy of the 6th agent at time t for the end position of the second entity in the entity pair; a t7 The position index of 1 in the middle represents the action policy of the 7th agent at time t regarding the starting position of the second entity attribute in the entity pair; a t8 The position index of 1 in the middle represents the action policy of the 8th agent at time t for the end position of the second entity attribute in the entity pair; a t9 The position index of 1 represents the action policy of the 9th agent at time t regarding the starting position of the entity pair relation; a t10 The position index of 1 in the middle is the action policy of the 10th agent at time t for the end position of the entity pair relationship.

[0092] The environmental state at the next moment includes a first component and a second component. The first component is shown in formulas (7), (8), (9), and (10):

[0093]

[0094]

[0095] S (t+1)n =softmax(σ(a) tn W tn (n = 1, 2, ..., 10) (9)

[0096] S (t+1)n =S.index_select(argmax(S (t+1)n (10)

[0097] In formulas (7), (8), (9), and (10), t = 0, and in formula (8), W ki W is a 512×512 dimensional learnable parameter vector, in formula (9) tn S is a 512×512 dimensional learnable parameter vector; in formula (10), S is a 512 dimensional all-zero vector, argmax() represents the index of the maximum value, and index_select() represents setting the specified value to 1.

[0098] The second component is shown in formula (11):

[0099]

[0100] Where t = 0, S (t+1)11 S (t+1)12 S (t+1)13 According to S (t+1)1 S (t+1)2 S (t+1)10 It was obtained from the middle.

[0101] Maximizing rewards is shown in formulas (12), (13), (14), (15), (16), and (17):

[0102]

[0103]

[0104]

[0105]

[0106]

[0107]

[0108] In formula (12), r(s) i ) represents the current reward, and γ represents the discount factor; in formula (14), false indicates that the entity attribute location information in the current state is different from the corresponding real location information, and true indicates that false indicates that the entity attribute location information in the current state is the same as the corresponding real location information; in formula (15), J(θ) m,t ) represents the reward objective function for all states; the corresponding policy gradient algorithms are represented in formulas (16) and (17).

[0109] The initial state features at the next time step described in step S5 are obtained by maximizing the reward and updating the multi-agent parameters in step S4.

[0110] The secondary state feature at the next time step in step S6 is obtained from the primary state feature at the next time step in step S5, which is the same as in formula (2).

[0111] The above description only illustrates the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention, and all such changes should be included within the protection scope of the present invention.

Claims

1. A knowledge graph construction method based on JERPE, characterized in that: Includes the following steps: S1. Obtain the data source needed to build the knowledge graph and perform sliding window processing on text data with a length exceeding 512 in the data source; S2. Initialize the initial state features, which include entity pairs, relationships between entity pairs, and positional feature information of each attribute of an entity pair. S3. Initialize secondary state features, which include entity pairs and the distance between entities and attributes. S4. Treat the primary state features and secondary state features as the environment in which the agent is located, and update the parameters of the multi-agent by maximizing the reward; S5. Update the primary state features of the next time step based on the parameters of the multi-agent obtained in S4. S6. Based on S5, obtain the secondary state characteristics of the next time step from the current time step; S7, iterating through S4, S5, and S6, completes the extraction of entity relationship attributes to construct the knowledge graph.

2. The knowledge graph construction method based on JERPE according to claim 1, characterized in that: In step S1, the data source from which information needs to be extracted is obtained and the data is segmented: The data sources include text data of public comments in the field of government services, text data of government agency websites about agency introductions, and text data of relevant personnel introductions; The data segmentation involves performing a sliding window process on texts with a length exceeding 512 in the data source. The sliding step size is set to 50, which decomposes the long text into texts of length 512 for information extraction, thereby reducing the computational complexity of long texts.

3. The knowledge graph construction method based on JERPE according to claim 1, characterized in that: The primary state characteristics in S2 Includes first state components Second state components ..., tenth state component ; The primary state characteristics are: in, , It is a 512×10 dimensional binary vector. , , , These are 512-dimensional binary vectors; the first component The first component is the feature information of the starting position of the first entity in the entity pair; the second component is... The third component is the feature information of the end position of the first entity in the entity pair; The fourth component is the attribute start position feature information of the first entity in the entity pair; The fifth component is the attribute end position feature information of the first entity in the entity pair. The sixth component is the feature information of the starting position of the second entity in the entity pair. The seventh component represents the end position feature information of the second entity in the entity pair. The eighth component is the attribute start position feature information of the second entity in the entity pair. The ninth component is the attribute end position feature information of the second entity in the entity pair. This refers to the starting position information of the entity-to-relationship; the tenth component. This provides information about the end position of the entity-to-relationship pair.

4. The knowledge graph construction method based on JERPE according to claim 3, characterized in that: The secondary state features in S3 Includes first state components Second state components Third state component ; The secondary state characteristics are: in, , It is a 512×3 dimensional binary vector. , , , which are 512-dimensional binary vectors; This refers to the distance feature information between the first and second entities in an entity pair; The attribute distance feature information between the first entity and the first entity in the entity pair. This refers to the attribute distance feature information between the second entity and the second entity in an entity pair.

5. The knowledge graph construction method based on JERPE according to claim 4, characterized in that: The primary state features obtained from S2 and S3 in S4 Secondary state characteristics Multiple agents make policy choices at time t. And obtain the maximum reward To update the environment state for the next time step: The strategy selection for: in, N=10 It is a 512×10 dimensional binary vector. This represents the action space of the k-th agent. ; , , , Each is a 512-dimensional binary vector, representing the action component of the k-th agent at time t; The action strategy of the first agent at time t for the starting position of the first entity in the entity pair; The action strategy of the second agent at time t for the end position of the first entity in the entity pair; The action strategy of the third agent at time t for the starting position of the attribute of the first entity in the entity pair; The action strategy of the 4th agent at time t for the end position of the attribute of the first entity in the entity pair; Let a be the action strategy of the 5th agent at time t for the starting position of the second entity in the entity pair; t6 Let a be the action strategy of the 6th agent at time t for the ending position of the second entity in the entity pair; t7 Let a be the action policy of the 7th agent at time t for the starting position of the second entity attribute in the entity pair; t8 Let a be the action policy of the 8th agent at time t for the end position of the second entity attribute in the entity pair; t9 Let a be the action policy of the 9th agent at time t regarding the starting position of the entity pair relation; t10 Let t be the action strategy of the 10th agent for the end position of the entity pair relationship at time t.

6. The knowledge graph construction method based on JERPE according to claim 5, characterized in that: The environmental state at the next moment in S4 includes a first component and a second component; The first component is: in, The The learnable parameter vector is 512×512 dimensional. S is a 512×512 dimensional learnable parameter vector; S is a 512 dimensional vector of all zeros; argmax() represents the index of the maximum value; and index_select() represents setting the specified value to 1.

7. The knowledge graph construction method based on JERPE according to claim 6, characterized in that: The second component is: Where t=0, , , according to , , , It was obtained from the middle.

8. The knowledge graph construction method based on JERPE according to claim 7, characterized in that: The maximum reward in S4 is: Among them, the For the current reward, the The discount factor; false indicates that the entity attribute location information in the current state is different from the corresponding true location information, and true indicates that the entity attribute location information in the current state is the same as the corresponding true location information; The reward objective function representing all states; , This represents the corresponding policy gradient algorithm.

Citation Information

Patent Citations

  • Multi-agent knowledge reasoning method and system based on deep reinforcement learning

    CN115526317A

  • Dialogue strategy method for task-oriented dialogue system

    WO2021121436A1