Method and device for constructing triplet knowledge base

A construction method and a technology of triples, which are applied in database models, structured data retrieval, etc., can solve the problems of occupying a large amount of storage memory and high redundancy of data storage

Active Publication Date: 2020-12-18
IFLYTEK CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For the case where the entities with the same name and aliases exist in the triplet data, if the existing method is used for storage, it will lead to high redundancy of data storage, which will lead to the problem of occupying a lot of storage memory

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for constructing triplet knowledge base
  • Method and device for constructing triplet knowledge base
  • Method and device for constructing triplet knowledge base

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0072] see figure 1 , a schematic flowchart of a method for constructing a triple knowledge base provided in this embodiment, the method comprising:

[0073] S101: Construct the knowledge base corresponding to the triple set, each triple in the triple set includes the first element, the second element and the third element in sequence, and the knowledge base corresponding to the triple set includes the first A data structure, a second data structure, a third data structure, a fourth data structure, and a fifth data structure.

[0074] In this embodiment, the triplet set may only include each different (entity, attribute, value) triplet, or only each different (entity, relationship, entity) triplet , or include both different triples of (entity, attribute, value) and different triples of (entity, relationship, entity).

[0075] In the triplet set, for a triplet of type (entity, attribute, value), define the "entity" on the left as the first element, define the "attribute" in ...

no. 2 example

[0126] At present, the existing triple data storage method still has the problem of low retrieval efficiency based on its storage form. For example, when using a relational database to store triple data, each query requires a large number of connection Table query, which will lead to slow retrieval speed in high-concurrency scenarios. Therefore, in scenarios that require high real-time performance of the system, such as knowledge questions and answers, intelligent customer service, etc., the existing database will not be able to meet the demand. However, in this embodiment, the retrieval speed is improved because there is no need to perform linked table query as in the prior art.

[0127] In this embodiment, each of the above data structures can be stored in a binary file, and when triple information needs to be queried, the binary file can be loaded into the memory for efficient retrieval.

[0128] Specifically, the structure of the binary file is as follows Figure 7 As sho...

no. 3 example

[0147] see Figure 9 , which is a schematic composition diagram of an apparatus for constructing a triple knowledge base provided in this embodiment, the apparatus 900 includes:

[0148] A knowledge base construction unit 901, configured to construct a knowledge base corresponding to a set of triples, each triple in the set of triples includes a first element, a second element, and a third element in turn, and the knowledge base includes The following data structures:

[0149] The first data structure is used to store each different first element in each triple and each different identifier used to find the relevant information of each different first element in the fifth data structure;

[0150] The second data structure is used to store each different second element in each triple;

[0151] a third data structure for storing each third element in each triple;

[0152] The fourth data structure is used to store the index of each second element in each triple in the second ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a construction method and device of a triple knowledge base. five data structures are constructed, and a first data structure is used for storing different first elements in each triple in a triple set and identifiers used for finding related information of the first elements in a fifth data structure; The second data structure is used for storing different second elements;The third data structure is used for storing each third element; The fourth data structure is used for storing the index of each second element in the second data structure and the first storage position of each third element in the third data structure; And the fifth data structure is used for storing a second storage position of the related information of the second element and the third element corresponding to each first element in the fourth data structure. Therefore, since only different first elements and different second elements in the triple set are stored in the first data structure and the second data structure, occupation of a storage memory can be reduced.

Description

technical field [0001] The present application relates to the technical field of natural language processing, in particular to a method and device for constructing a triple knowledge base. Background technique [0002] A triple is a concise and formalized knowledge representation composed of (entity, attribute, value) or (entity, relation, entity). For example, in the two triples (Andy Lau, gender, male) and (Andy Lau, spouse, Zhu Liqian), the entity of the first triple is "Andy Lau", and the value of its attribute "gender" is "male". , the two entities of the second triple are "Andy Lau" and "Zhu Liqian", and their previous relationship is "spouse". On the basis of triplet data, applications such as knowledge storage, knowledge question and answer, intelligent retrieval, intelligent customer service, and knowledge graph can be realized. In practice, the number of triplets is huge, and the triplet data should be organized reasonably. Forming a fast search and scalable know...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & AuthorityPatents(China)
IPC IPC(8): G06F16/28
Inventor汪强兵艾坤梅林海
OwnerIFLYTEK CO LTD