# US 2021/0342371 A1 · Method and Apparatus for Processing Knowledge Graph

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0342371 A1
- Document ID: US20210342371A1
- Status: Published application
- Kind: A1
- Application number: 17/280,925
- Filed: 2019-07-30
- Published: 2021-11-04
- Earliest claimed: 2018-09-30
- Assignees: Beijing Gridsum Technology Co., Ltd.
- Applicants: Beijing Gridsum Technology Co., Ltd.
- Inventors: Xuhong HAN
- Web page: https://patentgrep.com/patent/US20210342371A1

## CPC

- G06F 16/288: {Entity relationship models}
- G06F 16/285: {Clustering or classification}
- G06F 40/216: using statistical methods
- G06N 5/02: Knowledge representation; Symbolic representation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The disclosure discloses a method and apparatus for processing knowledge graph. The method includes that: multiple groups of entity data and multiple candidate relationship templates are acquired from a text to be analyzed, the candidate relationship template being configured to describe a relationship between multiple pieces of entity data in a group of entity data; for each group of entity data, the number of times for which the candidate relationship template matched with the group of entity data in the text to be analyzed is matched successfully is determined; a probability of correct matching between each group of entity data and each candidate relationship template is determined according to the number of times for which each group of entity data is matched successfully with each candidate relationship template; and an entity data relationship in a knowledge graph is supplemented according to the probability of correct matching between each group of entity data and the candidate relationship template.

## Claims

### Claim 1

A method for processing knowledge graph, comprising:
acquiring multiple groups of entity data and multiple candidate relationship templates from a text to be analyzed, the candidate relationship template being configured to describe a relationship between multiple pieces of entity data in a group of entity data;
for each group of entity data, determining the number of times for which the candidate relationship template matched with the group of entity data in the text to be analyzed is matched successfully;
determining a probability of correct matching between each group of entity data and each candidate relationship template according to the number of times for which each group of entity data is matched successfully with each candidate relationship template; and
supplementing an entity data relationship in a knowledge graph according to the probability of correct matching between each group of entity data and the candidate relationship template.

### Claim 2 (depends on 1)

The method as claimed in claim 1, wherein acquiring the multiple groups of entity data and the multiple candidate relationship templates comprises:
acquiring a present entity relationship in the knowledge graph, a data class corresponding to the present entity relationship is defined as a target entity class;
extracting the multiple groups of entity data corresponding to the target entity class from statements of the text to be analyzed according to the present entity relationship;
deleting a predetermined semantic word from remaining words of each statement after extraction is completed, the predetermined semantic word at least comprising a stop word; and
combining remaining words of each statement after deletion to obtain the multiple candidate relationship templates.

### Claim 3 (depends on 1)

The method as claimed in claim 1, wherein determining the probability of correct matching between each group of entity data and each candidate relationship template according to the number of times for which each group of entity data is matched successfully with each candidate relationship template comprises:
constructing a matrix, the matrix comprising each group of entity data, the candidate relationship template matched successfully with the group of entity data and the number of times for which they are matched successfully; and
iterating the matrix through a preset sequencing algorithm to obtain the probability of correct matching between each group of entity data and each candidate relationship template.

### Claim 4 (depends on 3)

The method as claimed in claim 3, wherein the preset sequencing algorithm is a bipartite graph sequencing algorithm.

### Claim 5 (depends on 1)

The method as claimed in claim 1, wherein determining the probability of correct matching between each group of entity data and each candidate relationship template comprises:
acquiring a first total number of matches between each group of entity data and each candidate relationship template;
determining a second total number of correct matches between each group of entity data and each candidate relationship template; and
determining the probability of correct matching between each group of entity data and each candidate relationship template according to the second total number and the first total number.

### Claim 6 (depends on 5)

The method as claimed in claim 5, wherein supplementing the entity data relationship in the knowledge graph comprises:
acquiring a probability value of correct matching between each group of entity data and each candidate relationship template;
selecting the entity data corresponding to the probability value greater than a preset probability threshold;
determining the selected entity data as entity data to be supplemented;
supplementing the entity data to be supplemented to the knowledge graph;
defining the template capable of matching an entity data relationship correctly in each candidate relationship template as a target relationship template; and
extracting a target new text through the target relationship template, and supplementing extracted entity data to the knowledge graph.

### Claim 7 (depends on 1)

The method as claimed in claim 1, wherein supplementing the entity data relationship in the knowledge graph further comprises:
acquiring a matching probability value between each group of entity data and each candidate relationship template; selecting the entity data corresponding to the matching probability value within a preset probability range, and determining whether the entity data is target entity data or not according to a preset formula, the preset formula being:
f
pair
=
∑
r
=
1
m
⁢
count
kr
*
IF
⁡
(
pattern_prob
r
>
threshold
)
∑
r
=
1
m
⁢
count
kr
,
where pattern_probr is a ratio of the number of the templates capable of establishing correct entity data relationships in the candidate relationship templates to the total number of the templates, countkr is the number of times for which the kth group of entity data is matched with the rth candidate relationship template, threshold is the preset probability range, the IF function is 1 when the condition is met, otherwise is 0, and when fpair is greater than a target threshold, present entity data is the target entity data; and
supplementing the target entity data to the knowledge graph.

### Claim 8

An apparatus for processing knowledge graph, comprising:
an acquisition unit, configured to acquire multiple groups of entity data and multiple candidate relationship templates from a text to be analyzed, the candidate relationship template being configured to describe a relationship between multiple pieces of entity data in a group of entity data;
a first determination unit, configured to, for each group of entity data, determine the number of times for which the candidate relationship template matched with the group of entity data in the text to be analyzed is matched successfully;
a second determination unit, configured to determine a probability of correct matching between each group of entity data and each candidate relationship template according to the number of times for which each group of entity data is matched successfully with each candidate relationship template; and
a supplementing unit, configured to supplement an entity data relationship in a knowledge graph according to the probability of correct matching between each group of entity data and the candidate relationship template.

### Claim 9 (depends on 1)

A non-transitory storage medium, configured to store a program, wherein the program is executed by a processor to control a device where the non-transitory storage medium is located to execute the method for processing knowledge graph as claimed in claims 1.

### Claim 10

(canceled)

### Claim 11 (depends on 7)

The method as claimed in claim 7, wherein the preset probability range refers to a probability range where probability values are lower than a second probability threshold in the probability of correct matching between each group of entity data and the candidate relationship template.

### Claim 12 (depends on 7)

The method as claimed in claim 7, wherein the entity data is data obtained by performing word extraction on each statement or a relationship description language.
