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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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 ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


