Knowledge graph construction method in knowledge domain

By using the combination of prime index and Jieba word segmenter in the construction of knowledge graph, a concise knowledge graph is constructed, which solves the problems of bloated knowledge graph and low efficiency, and realizes efficient knowledge graph construction and search.

CN117390201BActive Publication Date: 2024-10-01NANJING TIPOSI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311463001.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2024-10-01
Estimated Expiration
2043-11-06

AI Technical Summary

Technical Problem

Existing knowledge graphs become bloated due to too many nodes in a certain knowledge field, resulting in poor combinatorial search efficiency and making it difficult to effectively construct a concise and efficient knowledge graph.

Method used

By determining the knowledge entities and relationship knowledge in the knowledge field, prime index and Jieba word segmentation are used to divide the entities, forming a relationship node matrix, and judging the connection relationship based on the prime index product and common divisor between nodes to build a concise knowledge graph.

Benefits of technology

It achieves simplicity and efficient search of the knowledge graph, reduces the number of nodes, and improves the speed and efficiency of combinatorial search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117390201B_ABST
    Figure CN117390201B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for constructing a knowledge graph in a knowledge field, and belongs to the technical field of knowledge graph construction. The present invention includes the following steps: determining the knowledge field for constructing the knowledge graph, extracting all entities in the knowledge field and performing prime number indexing, extracting all the theorems, inferences, properties, axioms, laws or formulas recognized in the knowledge field as relational knowledge, and performing entity extraction and prime number indexing on the relational knowledge; taking the relational knowledge and the entities contained in the relational knowledge as nodes of the knowledge graph, and connecting the nodes to form a knowledge graph by checking whether there are the same entities between the nodes. In the process of constructing a knowledge graph for a certain knowledge field, the present invention uses relational nodes as nodes of the knowledge graph, and uses whether there are the same knowledge entities between the relational nodes as the judgment of whether the two relational nodes are connected, so that the nodes of the entire knowledge graph are greatly reduced and will not be too bloated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for constructing a knowledge graph in a knowledge field, and belongs to the technical field of knowledge graph construction. Background Art

[0002] Knowledge graphs were originally used to store entities extracted from web page information and information about the relationships between entities. Each entity has its own attributes, which cover a range of things such as people, events, and places. The relationship between two entities acts as a bridge between entities, connecting the two entities together. The two entities and the relationship between them constitute knowledge information, which is called a triple. Structurally, a knowledge graph is a directed graph, that is, a data structure with many-to-many relationships. In this data structure, entities can be regarded as vertices of the graph and relationships can be regarded as edges of the graph. Many entities and their relationships can be stored in a knowledge graph. These entities and their relationships constitute new triples of knowledge. Moreover, this triple structure gives the two entities a clear logical relationship, which can better perform knowledge fusion, knowledge reasoning, and upper-level application construction. Therefore, knowledge graphs are mostly used in existing human-known knowledge fields (such as elementary mathematics knowledge fields, elementary physics knowledge fields, etc.). Through knowledge graphs, the complex knowledge content in a certain knowledge field is visualized, structured, and logicalized, which reduces the difficulty of learning the content in the knowledge system and also facilitates the search for the content in the knowledge system. The existing technology connects all nouns and simple relationships between nouns in a knowledge system through multiple triples to form a knowledge graph. The entire knowledge graph uses nouns as nodes. Too many nodes make the entire knowledge graph too bloated and contain a lot of invalid content. At the same time, the overly bloated knowledge graph has poor efficiency when performing combined search. Summary of the invention

[0003] The technical problem to be solved by the present invention is: how to construct a concise and efficient knowledge graph in a certain knowledge field.

[0004] The technical solution proposed by the present invention is: a method for constructing a knowledge graph in a knowledge field, comprising the following steps:

[0005] Step 1: Determine the knowledge domain where the knowledge graph needs to be constructed, and extract all knowledge entities in the knowledge domain through the Chinese named entity recognition method to form a knowledge entity set A, as shown in the following formula (1):

[0006] A={A1, A2, ..., A n} (1),

[0007] In formula (1), A1 is the first knowledge entity extracted from the knowledge domain, A2 is the second knowledge entity extracted from the knowledge domain, and A nThe last knowledge entity extracted from the knowledge domain;

[0008] All entities in the knowledge entity set A are prime-indexed using different prime numbers p in the extraction order to form a prime-indexed knowledge entity set A. p , as shown in the following formula (2),

[0009]

[0010] In formula (2), is the first knowledge entity extracted from the knowledge domain indexed by the prime number p1, is the second knowledge entity extracted from the knowledge domain indexed by prime number p2, is a prime number p n The last knowledge entity extracted from the knowledge domain to be indexed;

[0011] Step 2: Extract all the recognized theorems, inferences, properties, axioms, laws or formulas in the knowledge domain as relational knowledge to form a relational knowledge set B, as shown in the following formula (3):

[0012] B={B1, ​​B2, ..., B m} (3),

[0013] In formula (3), B1 is the first relational knowledge extracted from the knowledge domain, B2 is the second relational knowledge extracted from the knowledge domain, and B m The last relational knowledge extracted from the knowledge domain;

[0014] The first relational knowledge in the relational knowledge set B is divided into entities by using the Jieba word segmenter, and the results of the division are collected to form the first relational knowledge entity set. As shown in the following formula (4),

[0015]

[0016] In formula (4), a1, a2, ..., a q are all natural numbers greater than or equal to 1 and less than or equal to n, and a1≠a2≠...≠a q ;

[0017] Then, all the remaining relational knowledge in the relational knowledge set B are divided into entities in turn, and the results of the division are collected in turn to form the corresponding relational knowledge entity set, and all the relational knowledge entity sets are collected to form the relational knowledge entity set matrix B A , as shown in the following formula (5),

[0018]

[0019] In formula (5), b1, b2, ..., b q are all natural numbers greater than or equal to 1 and less than or equal to n, and b1≠b2≠...≠b q ; n1, n2, ..., n q are all natural numbers greater than or equal to 1 and less than or equal to n, and n1≠n2≠...≠n q ;

[0020] Step 3: Combine the first relationship knowledge B1 in the relationship knowledge set B and the first relationship knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the first relational node C1 for constructing the knowledge graph of the knowledge domain. Then, according to the construction method of the first relationship node C1, the relationship nodes corresponding to the remaining relationship knowledge in the relationship knowledge set B are constructed in sequence, and all the relationship nodes are collected to form a relationship node matrix C, as shown in the following formula (6):

[0021]

[0022] In formula (6), C2 is the second relationship knowledge B2 and the second relationship knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form a second relational node for constructing the knowledge graph of the knowledge domain; C n is the last relational knowledge B n and the final relation knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the last relational node for constructing the knowledge graph of the knowledge domain;

[0023] The prime number indexes of all the relational knowledge entities contained in all the relational nodes are multiplied in turn to form the label of the relational node, and all the labeled relational nodes are collected to form the labeled relational node matrix C q , as shown in the following formula (6),

[0024]

[0025] In formula (6), is the first labeled relation node with a label; q1 is the label of C1 and is the result of multiplying the prime indexes of all relational knowledge entities in C1; is a second labeled relation node with a label; q2 is the label of C2 and is the result of multiplying the prime indexes of all relational knowledge entities in C2; is the last labeled relation node with a tag; q nIt is the C n The mark and is the C n The result of multiplying the prime indexes of all relational knowledge entities in ;

[0026] Step 4: Transform the relationship node matrix C q All the labeled relationship nodes in the matrix are connected in pairs to see whether there is an intersection between the relationship knowledge entity sets contained in the two labeled relationship nodes to be judged. If there is an intersection, the two labeled relationship nodes are connected; if there is no intersection, it means that there is no connection between the two labeled nodes and no connection is required; when the relationship node matrix C q After all the labeled relationship nodes are connected and judged in pairs in turn, the knowledge graph of the knowledge domain is completed.

[0027] Furthermore, the connection judgment process in step 4 can also be performed according to the following process: see whether there is a common divisor other than 1 between the labels of the two label relationship nodes to be judged. If so, the two label relationship nodes are connected; if not, it means that there is no connection between the two label nodes and no connection is required.

[0028] Beneficial effects of the present invention: Since the present invention uses relationship nodes as nodes of the knowledge graph in the process of constructing a knowledge graph for a certain knowledge field, and uses whether there are the same knowledge entities between relationship nodes as the judgment of whether two relationship nodes are connected, the nodes of the entire knowledge graph are greatly reduced. At the same time, since the recognized theorems, inferences, properties, axioms, laws or formulas in a knowledge field are limited, the knowledge graph we construct is also concise and not too bloated. At the same time, the entities contained in the nodes are represented by the prime index product, and multiple combinations of multi-entity query nodes can be completed quickly. It is only necessary to calculate the corresponding target entity index product and the entity prime index product contained in the node to have a non-1 common divisor to perform a combined search. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a partial knowledge graph of the elementary mathematics knowledge field constructed in Example 1.

[0030] Figure 2 It is a partial knowledge graph of the elementary physics knowledge field constructed in Example 2.

[0031] Figure 3 It is a partial knowledge graph of the elementary geographical knowledge field constructed in Example 3.

[0032] Figure 4 It is a partial knowledge graph of the elementary biological knowledge field constructed in Example 4. DETAILED DESCRIPTION

[0033] The following is a further description of a knowledge graph construction method for a knowledge field of the present invention in conjunction with specific embodiments and drawings.

[0034] Embodiment 1

[0035] The present invention provides a method for constructing a knowledge graph in a knowledge field, comprising the following steps:

[0036] Step 1: Determine that the knowledge domain for which the knowledge graph needs to be constructed is the elementary mathematics knowledge domain. Use the Chinese named entity recognition method to extract all knowledge entities in the People's Education Press mathematics textbook in the elementary mathematics knowledge domain to form a knowledge entity set A, as shown in the following formula (1):

[0037] A={A1, A2, ..., A n} (1),

[0038] In formula (1), A1 is the first knowledge entity extracted from the People's Education Press textbook, A2 is the second knowledge entity extracted from the People's Education Press textbook, and A n It is the last knowledge entity extracted from the People's Education Press textbook;

[0039] For example, we extract knowledge entities from the People's Education Press textbooks using the Chinese named entity recognition method. Some of the extracted knowledge entities are shown in Table 1 below.

[0040] vector <![CDATA[A1]]> Orthogonal decomposition <![CDATA[A8]]> triangle <![CDATA[A2]]> Absolute value <![CDATA[A9]]> Cosine <![CDATA[A3]]> Positive <![CDATA[A 10 ]]> Quantity Product <![CDATA[A4]]> negative number <![CDATA[A 11 ]]> horn <![CDATA[A5]]> Opposite number <![CDATA[A 12 ]]> side <![CDATA[A6]]> rational numbers <![CDATA[A 13 ]]> vertical <![CDATA[A7]]> plural <![CDATA[A 14 ]]>

[0041] Table 1

[0042] All knowledge entities in the knowledge entity set A are prime-indexed using different prime numbers p in the extraction order to form a prime-indexed knowledge entity set A. p , as shown in the following formula (2),

[0043]

[0044] In formula (2), is the first knowledge entity indexed by prime number p1, is the second knowledge entity indexed by prime number p2, is a prime number p n The last knowledge entity to be indexed;

[0045] For example, all knowledge entities in Table 1 are prime-indexed. The prime-indexed knowledge entities are shown in Table 2 below.

[0046]

[0047]

[0048] Table 2

[0049] Step 2: Extract all the blue-marked theorems, inferences, properties, axioms, laws or formulas in the People's Education Press mathematics textbook as relational knowledge to form a relational knowledge set B, as shown in the following formula (3):

[0050] B={B1, ​​B2, ..., B m} (3),

[0051] In formula (3), B1 is the first relational knowledge extracted from the mathematics textbook of the People's Education Press, B2 is the second relational knowledge extracted from the mathematics textbook of the People's Education Press, and B m It is the last relational knowledge extracted from the People's Education Press mathematics textbook.

[0052] For example, some relational knowledge extracted from the mathematics textbooks published by People's Education Press is shown in Table 3 below.

[0053]

[0054] Table 3

[0055] The first relational knowledge in relational knowledge set B is divided into entities through Jieba word segmenter and the results of the division are collected to form the first relational knowledge entity set. As shown in the following formula (4),

[0056]

[0057] In formula (4), a1, a2, ..., a q are all natural numbers greater than or equal to 1 and less than or equal to n, and a1≠a2≠...≠a q ;

[0058] Then all the remaining relational knowledge in the relational knowledge set B are divided into entities in turn, and the results of the division are collected in turn to form the corresponding relational knowledge entity set, and all the relational knowledge entity sets are collected to form the relational knowledge entity set matrix B A , as shown in the following formula (5),

[0059]

[0060] In formula (5), b1, b2, ..., b q are all natural numbers greater than or equal to 1 and less than or equal to n, and b1≠b2≠...≠b q ; n1, n2, ..., n q are all natural numbers greater than or equal to 1 and less than or equal to n, and n1≠n2≠...≠n q ;

[0061] For example, the relational knowledge in Table 3 is divided into knowledge entities through Jieba word segmenter. The division results are shown in Table 4 below.

[0062]

[0063]

[0064] Table 4

[0065] Step 3: Combine the first relationship knowledge B1 in the relationship knowledge set B and the first relationship knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the first relational node C1 for constructing the knowledge graph of the knowledge domain. Then, according to the construction method of the first relationship node C1, the relationship nodes corresponding to the remaining relationship knowledge in the relationship knowledge set B are constructed in sequence, and all the relationship nodes are collected to form a relationship node matrix C, as shown in the following formula (6):

[0066]

[0067] In formula (6), C2 is the second relation knowledge B2 and the second relation knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the second relational node for constructing the knowledge graph of the knowledge domain; C n It is the last relation knowledge B n And the final relational knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the last relational node for constructing the knowledge graph of the knowledge domain;

[0068] The prime indexes of all relational knowledge entities contained in all relational nodes are multiplied in turn to form the label of the relational node, and all the labeled relational nodes are collected to form the labeled relational node matrix C. q , as shown in the following formula (6),

[0069]

[0070] In formula (6), is the first labeled relation node with a label; q1 is the label of C1 and is the result of multiplying the prime indexes of all relation knowledge entities in C1; is the second labeled relation node with a label; q2 is the label of C2 and is the result of multiplying the prime indexes of all relational knowledge entities in C2; is the last labeled relation node with a tag; q n It is C n The sign is C nThe result of multiplying the prime indexes of all relational knowledge entities in ;

[0071] For example, all the relational knowledge in Table 4 is marked, and the results after marking are shown in Table 5 below.

[0072]

[0073]

[0074] Table 5

[0075] Step 4: Transform the relationship node matrix C q All the labeled relationship nodes in the are connected in pairs one by one to see whether there is an intersection between the relationship knowledge entity sets contained in the two labeled relationship nodes to be judged. If there is an intersection, the two labeled relationship nodes are connected; if there is no intersection, it means that there is no connection between the two labeled nodes and they do not need to be connected; the connection judgment process can also be carried out according to the following process: see whether there is a common factor other than 1 between the labels of the two labeled relationship nodes to be judged. If so, the two labeled relationship nodes are connected; if not, it means that there is no connection between the two labeled nodes and they do not need to be connected. When the relationship node matrix C q After all the labeled relationship nodes are connected and judged in pairs in turn, the knowledge graph of the knowledge domain is constructed.

[0076] The connection judgment is performed on some of the relationship nodes in Table 5 in pairs. The partial knowledge graph in the field of elementary mathematics knowledge is as follows: Figure 1 shown.

[0077] Embodiment 2

[0078] The present invention provides a method for constructing a knowledge graph in a knowledge field, comprising the following steps:

[0079] Step 1: Determine that the knowledge domain for which the knowledge graph needs to be constructed is the elementary physics knowledge domain. Use the Chinese named entity recognition method to extract all knowledge entities in the People's Education Press physics textbook in the elementary physics knowledge domain to form a knowledge entity set A, as shown in the following formula (1):

[0080] A={A1, A2, ..., A n} (1),

[0081] In formula (1), A1 is the first knowledge entity extracted from the People's Education Press textbook, A2 is the second knowledge entity extracted from the People's Education Press textbook, and A n It is the last knowledge entity extracted from the People's Education Press textbook;

[0082] For example, we extract knowledge entities from the People's Education Press textbooks using the Chinese named entity recognition method. Some of the extracted knowledge entities are shown in Table 6 below.

[0083]

[0084]

[0085] Table 6

[0086] All knowledge entities in the knowledge entity set A are prime-indexed using different prime numbers p in the extraction order to form a prime-indexed knowledge entity set A. p , as shown in the following formula (2),

[0087]

[0088] In formula (2), is the first knowledge entity indexed by prime number p1, is the second knowledge entity indexed by prime number p2, is a prime number p n The last knowledge entity to be indexed;

[0089] For example, all knowledge entities in Table 6 are prime-indexed, and the prime-indexed knowledge entities are shown in Table 7.

[0090] Current <![CDATA[A1]]> <![CDATA[P1=2]]> Mechanical Energy <![CDATA[A 14 ]]> <![CDATA[P 14 =43]]> element <![CDATA[A2]]> <![CDATA[P2=3]]> Gravitational potential energy <![CDATA[A 15 ]]> <![CDATA[P 15 =47]]> Circuit <![CDATA[A3]]> <![CDATA[P3=5]]> Elastic potential energy <![CDATA[A 16 ]]> <![CDATA[P 16 =53]]> in parallel <![CDATA[A4]]> <![CDATA[P4=7]]> Mechanical movement <![CDATA[A 17 ]]> <![CDATA[P 17 =59]]> Series Connection <![CDATA[A5]]> <![CDATA[P5=11]]> energy <![CDATA[A 18 ]]> <![CDATA[P 18 =61]]> object <![CDATA[A6]]> <![CDATA[P6=13]]> Acceleration <![CDATA[A 19 ]]> <![CDATA[P 19 =67]]> balance <![CDATA[A7]]> <![CDATA[P7=17]]> quality <![CDATA[A 20 ]]> <![CDATA[P 20 =71 <!-- 9 -->]]> force <![CDATA[A8]]> <![CDATA[P8=19]]> direction <![CDATA[A 21 ]]> <![CDATA[P 21 =73]]> achievement <![CDATA[A9]]> <![CDATA[P9=23]]> power supply <![CDATA[A 22 ]]> <![CDATA[P 22 =79]]> distance <![CDATA[A 10 ]]> <![CDATA[P 10 =29]]> Electromotive force <![CDATA[A 23 ]]> <![CDATA[P 23 =83]]> product <![CDATA[A 11 ]]> <![CDATA[P 11 =31]]> resistance <![CDATA[A 24 ]]> <![CDATA[P 24 =89]]> kinetic energy <![CDATA[A 12 ]]> <![CDATA[P 12 =37]]> power <![CDATA[A 25 ]]> <![CDATA[P 25 =97]]> Potential Energy <![CDATA[A 13 ]]> <![CDATA[P 13 =41]]> Voltage <![CDATA[A 26 ]]> <![CDATA[P 26 =101]]>

[0091] Table 7

[0092] Step 2: Extract all theorems, inferences, properties, axioms, laws or formulas in the People's Education Press physics textbook as relational knowledge to form a relational knowledge set B, as shown in the following formula (3):

[0093] B={B1, ​​B2, ..., B m} (3),

[0094] In formula (3), B1 is the first relational knowledge extracted from the People's Education Press physics textbook, B2 is the second relational knowledge extracted from the People's Education Press physics textbook, and B m It is the last relational knowledge extracted from the People's Education Press physics textbook.

[0095] For example, some relational knowledge extracted from the People's Education Press physics textbook is shown in Table 8 below.

[0096]

[0097] Table 8

[0098] The first relational knowledge in relational knowledge set B is divided into entities through Jieba word segmenter and the results of the division are collected to form the first relational knowledge entity set. As shown in the following formula (4),

[0099]

[0100] In formula (4), a1, a2, ..., a q are all natural numbers greater than or equal to 1 and less than or equal to n, and a1≠a2≠...≠a q ;

[0101] Then all the remaining relational knowledge in the relational knowledge set B are divided into entities in turn, and the results of the division are collected in turn to form the corresponding relational knowledge entity set, and all the relational knowledge entity sets are collected to form the relational knowledge entity set matrix B A , as shown in the following formula (5),

[0102]

[0103] In formula (5), b1, b2, ..., b q are all natural numbers greater than or equal to 1 and less than or equal to n, and b1≠b2≠...≠b q ; n1, n2, ..., n q are all natural numbers greater than or equal to 1 and less than or equal to n, and n1≠n2≠...≠n q ;

[0104] For example: the relational knowledge in Table 8 is divided into knowledge entities through the Jieba word segmenter. The division results are shown in Table 9 below.

[0105]

[0106]

[0107] Table 9

[0108] Step 3: Combine the first relationship knowledge B1 in the relationship knowledge set B and the first relationship knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the first relational node C1 for constructing the knowledge graph of the knowledge domain. Then, according to the construction method of the first relationship node C1, the relationship nodes corresponding to the remaining relationship knowledge in the relationship knowledge set B are constructed in sequence, and all the relationship nodes are collected to form a relationship node matrix C, as shown in the following formula (6):

[0109]

[0110] In formula (6), C2 is the second relation knowledge B2 and the second relation knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the second relational node for constructing the knowledge graph of the knowledge domain; C n It is the last relation knowledge B n And the final relational knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the last relational node for constructing the knowledge graph of the knowledge domain;

[0111] The prime indexes of all relational knowledge entities contained in all relational nodes are multiplied in turn to form the label of the relational node, and all the labeled relational nodes are collected to form the labeled relational node matrix C. q , as shown in the following formula (6),

[0112]

[0113] In formula (6), is the first labeled relation node with a label; q1 is the label of C1 and is the result of multiplying the prime indexes of all relation knowledge entities in C1; is the second labeled relation node with a label; q2 is the label of C2 and is the result of multiplying the prime indexes of all relational knowledge entities in C2; is the last labeled relation node with a tag; q n It is C n The sign is C n The result of multiplying the prime indexes of all relational knowledge entities in ;

[0114] For example, all the relational knowledge in Table 9 is marked, and the results after marking are shown in Table 10 below.

[0115]

[0116] Table 10

[0117] Step 4: Transform the relationship node matrix C q All the labeled relationship nodes in the are connected in pairs one by one to see whether there is an intersection between the relationship knowledge entity sets contained in the two labeled relationship nodes to be judged. If there is an intersection, the two labeled relationship nodes are connected; if there is no intersection, it means that there is no connection between the two labeled nodes and they do not need to be connected; the connection judgment process can also be carried out according to the following process: see whether there is a common factor other than 1 between the labels of the two labeled relationship nodes to be judged. If so, the two labeled relationship nodes are connected; if not, it means that there is no connection between the two labeled nodes and they do not need to be connected. When the relationship node matrix C qAfter all the labeled relationship nodes are connected and judged in pairs in turn, the knowledge graph of the knowledge domain is constructed.

[0118] The connection judgment is performed on some of the relationship nodes in Table 10 one by one. The partial knowledge graph in the field of elementary physics knowledge is as follows: Figure 2 shown.

[0119] Embodiment 3

[0120] The present invention provides a method for constructing a knowledge graph in a knowledge field, comprising the following steps:

[0121] Step 1: Determine that the knowledge domain for which the knowledge graph needs to be constructed is the elementary geography knowledge domain. Use the Chinese named entity recognition method to extract all knowledge entities in the People's Education Press geography textbook in the elementary geography knowledge domain to form a knowledge entity set A, as shown in the following formula (1):

[0122] A={A1, A2, ..., A n} (1),

[0123] In formula (1), A1 is the first knowledge entity extracted from the People's Education Press textbook, A2 is the second knowledge entity extracted from the People's Education Press textbook, and A n It is the last knowledge entity extracted from the People's Education Press textbook;

[0124] For example, we extract knowledge entities from the People's Education Press textbooks using the Chinese named entity recognition method. Some of the extracted knowledge entities are shown in Table 11 below.

[0125]

[0126]

[0127] Table 11

[0128] All knowledge entities in the knowledge entity set A are prime-indexed using different prime numbers p in the extraction order to form a prime-indexed knowledge entity set A. p , as shown in the following formula (2),

[0129]

[0130] In formula (2), is the first knowledge entity indexed by prime number p1, is the second knowledge entity indexed by prime number p2, is a prime number p n The last knowledge entity to be indexed;

[0131] For example, all knowledge entities in Table 11 are prime-indexed. The prime-indexed knowledge entities are shown in Table 12.

[0132] temperature <![CDATA[A1]]> <![CDATA[P1=2]]> Steep cliff <![CDATA[A 25 ]]> <![CDATA[P 25 =97]]> Intensive <![CDATA[A2]]> <![CDATA[P2=3]]> Contours <![CDATA[A 26 ]]> <![CDATA[P 26 =101]]> Sparse <![CDATA[A3]]> <![CDATA[P3=5]]> Long wave radiation <![CDATA[A 27 ]]> <![CDATA[P 27 =103 <!-- 15 -->]]> Surface runoff <![CDATA[A4]]> <![CDATA[P4=7]]> valley <![CDATA[A 28 ]]> <![CDATA[P 28 =107]]> Solar radiation <![CDATA[A5]]> <![CDATA[P5=11]]> airflow <![CDATA[A 29 ]]> <![CDATA[P 29 =109]]> ocean <![CDATA[A6]]> <![CDATA[P6=13]]> coal <![CDATA[A 30 ]]> <![CDATA[P 30 =113]]> Ridge <![CDATA[A7]]> <![CDATA[P7=17]]> water <![CDATA[A 31 ]]> <![CDATA[P 31 =127]]> energy <![CDATA[A8]]> <![CDATA[P8=19]]> Heat <![CDATA[A 32 ]]> <![CDATA[P 32 =131]]> Solar radiation <![CDATA[A9]]> <![CDATA[P9=23]]> Sea-land cycle <![CDATA[A 33 ]]> <![CDATA[P 33 =137]]> hot <![CDATA[A 10 ]]> <![CDATA[P 10 =29]]> Thermal Energy <![CDATA[A 34 ]]> <![CDATA[P 34 =139]]> Air circulation <![CDATA[A 11 ]]> <![CDATA[P 11 =31]]> Water Resources <![CDATA[A 35 ]]> <![CDATA[P 35 =149]]> Electricity <![CDATA[A 12 ]]> <![CDATA[P 12 =37]]> Low pressure <![CDATA[A 36 ]]> <![CDATA[P 36 =151]]> Underground runoff <![CDATA[A 13 ]]> <![CDATA[P 13 =41]]> Life Activities <![CDATA[A 37 ]]> <![CDATA[P 37 =157]]> latitude <![CDATA[A 14 ]]> <![CDATA[P 14 =43]]> Rivers <![CDATA[A 38 ]]> <![CDATA[P 38 =163]]> High pressure <![CDATA[A 15 ]]> <![CDATA[P 15 =47]]> land <![CDATA[A 39 ]]> <![CDATA[P 39 =167]]> wind <![CDATA[A 16 ]]> <![CDATA[P 16 =53]]> precipitation <![CDATA[A 40 ]]> <![CDATA[P 40 =173]]> mountain peak <![CDATA[A 17 ]]> <![CDATA[P 17 =59]]> slope <![CDATA[A 41 ]]> <![CDATA[P 41 =179]]> Water Cycle <![CDATA[A 18 ]]> <![CDATA[P 18 =61]]> convection <![CDATA[A 42 ]]> <![CDATA[P 42 =181]]> Steep <![CDATA[A 19 ]]> <![CDATA[P 19 =67]]> Atmospheric movement <![CDATA[A 43 ]]> <![CDATA[P 43 =191]]> Earth <![CDATA[A 20 ]]> <![CDATA[P 20 =71]]> Water vapor <![CDATA[A 44 ]]> <![CDATA[P 44 =193]]> physics <![CDATA[A 21 ]]> <![CDATA[P 21 =73]]> Conduction <![CDATA[A 45 ]]> <![CDATA[P 45 =197]]> Contours <![CDATA[A 22 ]]> <![CDATA[P 22 =79]]> Atmospheric thermal circulation <![CDATA[A 46 ]]> <![CDATA[P 46 =199]]> atmosphere <![CDATA[A 23 ]]> <![CDATA[P 23 =83]]> weather <![CDATA[A 47 ]]> <![CDATA[P 47 =211]]> oil <![CDATA[A 24 ]]> <![CDATA[P 24 =89]]> Light <![CDATA[A 48 ]]> <![CDATA[P 48 =223]]>

[0133] Table 12

[0134] Step 2: Extract all theorems, inferences, properties, axioms, laws or formulas in the geography textbooks of the People's Education Press as relational knowledge to form a relational knowledge set B, as shown in the following formula (3):

[0135] B={B1, ​​B2, ..., B m} (3),

[0136] In formula (3), B1 is the first relation knowledge extracted from the geography textbook of the People's Education Press, B2 is the second relation knowledge extracted from the geography textbook of the People's Education Press, and B m It is the last relational knowledge extracted from the People's Education Press geography textbook.

[0137] For example, some relational knowledge extracted from the geography textbook of the People's Education Press is shown in Table 13 below.

[0138]

[0139] Table 13

[0140] The first relational knowledge in relational knowledge set B is divided into entities through Jieba word segmenter and the results of the division are collected to form the first relational knowledge entity set. As shown in the following formula (4),

[0141]

[0142] In formula (4), a1, a2, ..., a q are all natural numbers greater than or equal to 1 and less than or equal to n, and a1≠a2≠...≠a q ;

[0143] Then all the remaining relational knowledge in the relational knowledge set B are divided into entities in turn, and the results of the division are collected in turn to form the corresponding relational knowledge entity set, and all the relational knowledge entity sets are collected to form the relational knowledge entity set matrix B A , as shown in the following formula (5),

[0144]

[0145] In formula (5), b1, b2, ..., b qare all natural numbers greater than or equal to 1 and less than or equal to n, and b1≠b2≠...≠b q ; n1, n2, ..., n q are all natural numbers greater than or equal to 1 and less than or equal to n, and n1≠n2≠...≠n q ;

[0146] For example, the relational knowledge in Table 13 is divided into knowledge entities through the Jieba word segmenter. The division results are shown in Table 14 below.

[0147]

[0148]

[0149] Table 14

[0150] Step 3: Combine the first relationship knowledge B1 in the relationship knowledge set B and the first relationship knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the first relational node C1 for constructing the knowledge graph of the knowledge domain. Then, according to the construction method of the first relationship node C1, the relationship nodes corresponding to the remaining relationship knowledge in the relationship knowledge set B are constructed in sequence, and all the relationship nodes are collected to form a relationship node matrix C, as shown in the following formula (6):

[0151]

[0152] In formula (6), C2 is the second relation knowledge B2 and the second relation knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the second relational node for constructing the knowledge graph of the knowledge domain; C n It is the last relation knowledge B n And the final relational knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the last relational node for constructing the knowledge graph of the knowledge domain;

[0153] The prime indexes of all relational knowledge entities contained in all relational nodes are multiplied in turn to form the label of the relational node, and all the labeled relational nodes are collected to form the labeled relational node matrix C. q , as shown in the following formula (6),

[0154]

[0155] In formula (6), is the first labeled relation node with a label; q1 is the label of C1 and is the result of multiplying the prime indexes of all relation knowledge entities in C1; is the second labeled relation node with a label; q2 is the label of C2 and is the result of multiplying the prime indexes of all relational knowledge entities in C2; is the last labeled relation node with a tag; q n It is C n The sign is C n The result of multiplying the prime indexes of all relational knowledge entities in ;

[0156] For example, all the relational knowledge in Table 14 is marked, and the results after marking are shown in Table 15 below.

[0157]

[0158]

[0159]

[0160] Table 15

[0161] Step 4: Transform the relationship node matrix C q All the labeled relationship nodes in the are connected in pairs one by one to see whether there is an intersection between the relationship knowledge entity sets contained in the two labeled relationship nodes to be judged. If there is an intersection, the two labeled relationship nodes are connected; if there is no intersection, it means that there is no connection between the two labeled nodes and they do not need to be connected; the connection judgment process can also be carried out according to the following process: see whether there is a common factor other than 1 between the labels of the two labeled relationship nodes to be judged. If so, the two labeled relationship nodes are connected; if not, it means that there is no connection between the two labeled nodes and they do not need to be connected. When the relationship node matrix C q After all the labeled relationship nodes are connected and judged in pairs in turn, the knowledge graph of the knowledge domain is constructed.

[0162] The connection judgment is performed on some of the relationship nodes in Table 15 in pairs. The partial knowledge graph in the field of elementary geographical knowledge is as follows: Figure 3 shown.

[0163] Embodiment 4

[0164] The present invention provides a method for constructing a knowledge graph in a knowledge field, comprising the following steps:

[0165] Step 1: Determine that the knowledge domain for which the knowledge graph needs to be constructed is the elementary biology knowledge domain. Use the Chinese named entity recognition method to extract all knowledge entities in the biology textbook of the People's Education Press in the elementary biology knowledge domain to form a knowledge entity set A, as shown in the following formula (1):

[0166] A={A1, A2, ..., A n} (1),

[0167] In formula (1), A1 is the first knowledge entity extracted from the People's Education Press textbook, A2 is the second knowledge entity extracted from the People's Education Press textbook, and A n It is the last knowledge entity extracted from the People's Education Press textbook;

[0168] For example, we extract knowledge entities from the People's Education Press textbooks using the Chinese named entity recognition method. Some of the extracted knowledge entities are shown in Table 16 below.

[0169]

[0170]

[0171] Table 16

[0172] All knowledge entities in the knowledge entity set A are prime-indexed using different prime numbers p in the extraction order to form a prime-indexed knowledge entity set A. p , as shown in the following formula (2),

[0173]

[0174] In formula (2), is the first knowledge entity indexed by prime number p1, is the second knowledge entity indexed by prime number p2, is a prime number p n The last knowledge entity to be indexed;

[0175] For example, all knowledge entities in Table 16 are prime-indexed. The prime-indexed knowledge entities are shown in Table 17.

[0176]

[0177]

[0178] Table 17

[0179] Step 2: Extract all theorems, inferences, properties, axioms, laws or formulas in the biology textbooks of the People's Education Press as relational knowledge to form a relational knowledge set B, as shown in the following formula (3):

[0180] B={B1, ​​B2, ..., B m} (3),

[0181] In formula (3), B1 is the first relation knowledge extracted from the biology textbook of People's Education Press, B2 is the second relation knowledge extracted from the biology textbook of People's Education Press, and B mIt is the last relational knowledge extracted from the biology textbook of People's Education Press.

[0182] For example, some relational knowledge extracted from the biology textbook of the People's Education Press is shown in Table 18 below.

[0183]

[0184]

[0185] Table 18

[0186] The first relational knowledge in relational knowledge set B is divided into entities through Jieba word segmenter and the results of the division are collected to form the first relational knowledge entity set. As shown in the following formula (4),

[0187]

[0188] In formula (4), a1, a2, ..., a q are all natural numbers greater than or equal to 1 and less than or equal to n, and a1≠a2≠...≠a q ;

[0189] Then all the remaining relational knowledge in the relational knowledge set B are divided into entities in turn, and the results of the division are collected in turn to form the corresponding relational knowledge entity set, and all the relational knowledge entity sets are collected to form the relational knowledge entity set matrix B A , as shown in the following formula (5),

[0190]

[0191] In formula (5), b1, b2, ..., b q are all natural numbers greater than or equal to 1 and less than or equal to n, and b1≠b2≠...≠b q ; n1, n2, ..., n q are all natural numbers greater than or equal to 1 and less than or equal to n, and n1≠n2≠...≠n q ;

[0192] For example, the relational knowledge in Table 18 is divided into knowledge entities through the Jieba word segmenter. The division results are shown in Table 19 below.

[0193]

[0194] Table 19

[0195] Step 3: Combine the first relationship knowledge B1 in the relationship knowledge set B and the first relationship knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the first relational node C1 for constructing the knowledge graph of the knowledge domain. Then, according to the construction method of the first relationship node C1, the relationship nodes corresponding to the remaining relationship knowledge in the relationship knowledge set B are constructed in sequence, and all the relationship nodes are collected to form a relationship node matrix C, as shown in the following formula (6):

[0196]

[0197] In formula (6), C2 is the second relation knowledge B2 and the second relation knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the second relational node for constructing the knowledge graph of the knowledge domain; C n It is the last relation knowledge B n And the final relational knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the last relational node for constructing the knowledge graph of the knowledge domain;

[0198] The prime indexes of all relational knowledge entities contained in all relational nodes are multiplied in turn to form the label of the relational node, and all the labeled relational nodes are collected to form the labeled relational node matrix C. q , as shown in the following formula (6),

[0199]

[0200] In formula (6), is the first labeled relation node with a label; q1 is the label of C1 and is the result of multiplying the prime indexes of all relation knowledge entities in C1; is the second labeled relation node with a label; q2 is the label of C2 and is the result of multiplying the prime indexes of all relational knowledge entities in C2; is the last labeled relation node with a tag; q n It is C n The sign is C n The result of multiplying the prime indexes of all relational knowledge entities in ;

[0201] For example, all the relational knowledge in Table 19 is marked, and the results after marking are shown in Table 20 below.

[0202]

[0203]

[0204] Table 20

[0205] Step 4: Transform the relationship node matrix C qAll the labeled relationship nodes in the are connected in pairs one by one to see whether there is an intersection between the relationship knowledge entity sets contained in the two labeled relationship nodes to be judged. If there is an intersection, the two labeled relationship nodes are connected; if there is no intersection, it means that there is no connection between the two labeled nodes and they do not need to be connected; the connection judgment process can also be carried out according to the following process: see whether there is a common factor other than 1 between the labels of the two labeled relationship nodes to be judged. If so, the two labeled relationship nodes are connected; if not, it means that there is no connection between the two labeled nodes and they do not need to be connected. When the relationship node matrix C q After all the labeled relationship nodes are connected and judged in pairs in turn, the knowledge graph of the knowledge domain is constructed.

[0206] The connection judgment is performed on some of the relationship nodes in Table 20 in pairs. The partial knowledge graph in the field of elementary geographical knowledge is as follows: Figure 4 shown.

Claims

1. A method for constructing a knowledge graph in a knowledge domain, characterized by: The following steps are involved: Step 1: Determine the knowledge domain where the knowledge graph needs to be constructed, and extract all knowledge entities in the knowledge domain through the Chinese named entity recognition method to form a knowledge entity set A, as shown in the following formula (1): A={A1, A2,...,An} (1), In formula (1), A1 is the first knowledge entity extracted from the knowledge domain, A2 is the second knowledge entity extracted from the knowledge domain, and A n The last knowledge entity extracted from the knowledge domain; All entities in the knowledge entity set A are prime-indexed using different prime numbers p in the extraction order to form a prime-indexed knowledge entity set A. p , as shown in the following formula (2), In formula (2), is the first knowledge entity extracted from the knowledge domain indexed by the prime number p1, is the second knowledge entity extracted from the knowledge domain indexed by prime number p2, is a prime number p n The last knowledge entity extracted from the knowledge domain to be indexed; Step 2: Extract all the recognized theorems, inferences, properties, axioms, laws or formulas in the knowledge domain as relational knowledge to form a relational knowledge set B, as shown in the following formula (3): B={B1, ​​B2,...,Bm} (3), In formula (3), B1 is the first relational knowledge extracted from the knowledge domain, B2 is the second relational knowledge extracted from the knowledge domain, and B m The last relational knowledge extracted from the knowledge domain; The first relational knowledge in the relational knowledge set B is divided into entities by using the Jieba word segmenter, and the results of the division are collected to form the first relational knowledge entity set. As shown in the following formula (4), In formula (4), a1, a2, ..., a q are all natural numbers greater than or equal to 1 and less than or equal to n, and a1≠a2≠...≠a q ; Then, all the remaining relational knowledge in the relational knowledge set B are divided into entities in turn, and the results of the division are collected in turn to form the corresponding relational knowledge entity set, and all the relational knowledge entity sets are collected to form the relational knowledge entity set matrix B A , as shown in the following formula (5), In formula (5), b1, b2, ..., b q are all natural numbers greater than or equal to 1 and less than or equal to n, and b1≠b2≠...≠b q ; n1, n2, ..., n q are all natural numbers greater than or equal to 1 and less than or equal to n, and n1≠n2≠...≠n q ; Step 3: Combine the first relationship knowledge B1 in the relationship knowledge set B and the first relationship knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the first relational node C1 for constructing the knowledge graph of the knowledge domain. Then, according to the construction method of the first relationship node C1, the relationship nodes corresponding to the remaining relationship knowledge in the relationship knowledge set B are constructed in sequence, and all the relationship nodes are collected to form a relationship node matrix C, as shown in the following formula (6): In formula (6), C2 is the second relation knowledge B2 and the second relation knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form a second relational node for constructing the knowledge graph of the knowledge domain; C n It is the last relation knowledge B n And the final relational knowledge entity set All the relational knowledge entities in the knowledge domain are extracted to form the last relational node for constructing the knowledge graph of the knowledge domain; The prime number indexes of all the relational knowledge entities contained in all the relational nodes are multiplied in turn to form the label of the relational node, and all the labeled relational nodes are collected to form the labeled relational node matrix C q , as shown in the following formula (7), In formula (7), is the first labeled relation node with a label; q1 is the label of C1 and is the result of multiplying the prime indexes of all relational knowledge entities in C1; is a second labeled relation node with a label; q2 is the label of C2 and is the result of multiplying the prime indexes of all relational knowledge entities in C2; is the last labeled relation node with a tag; q n It is the C n The mark and is the C n The result of multiplying the prime indexes of all relational knowledge entities in ; Step 4: Transform the relationship node matrix C q All the labeled relationship nodes in the are connected in pairs one by one to see whether there is an intersection between the relationship knowledge entity sets contained in the two labeled relationship nodes being judged. If there is an intersection, the two labeled relationship nodes are connected; If there is no intersection, it means that there is no connection between the two marked nodes and no connection is required; when the relationship node matrix C q After all the labeled relationship nodes are connected and judged in pairs in turn, the knowledge graph of the knowledge domain is completed.

2. The method for constructing a knowledge graph in a knowledge domain according to claim 1, characterized in that: The connection judgment process in step 4 can also be performed according to the following process: check whether there is a common divisor other than 1 between the labels of the two label relationship nodes to be judged. If so, the two label relationship nodes are connected; if not, it means that there is no connection between the two label nodes and they do not need to be connected.