CN111984643A - Knowledge graph construction method and device, knowledge graph system and equipment - Google Patents

Knowledge graph construction method and device, knowledge graph system and equipment Download PDF

Info

Publication number
CN111984643A
CN111984643A CN202010609624.9A CN202010609624A CN111984643A CN 111984643 A CN111984643 A CN 111984643A CN 202010609624 A CN202010609624 A CN 202010609624A CN 111984643 A CN111984643 A CN 111984643A
Authority
CN
China
Prior art keywords
knowledge graph
inference
knowledge
basic
graph
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010609624.9A
Other languages
Chinese (zh)
Inventor
张涵初
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202010609624.9A priority Critical patent/CN111984643A/en
Publication of CN111984643A publication Critical patent/CN111984643A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a knowledge graph construction method, a knowledge graph construction device, a knowledge graph system and knowledge graph equipment, wherein the method comprises the following steps: receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness; acquiring an inference rule set, wherein the inference rule set is used for showing rules needed to be used for generating an inference knowledge graph according to a basic knowledge graph; generating a reasoning knowledge graph according to the basic knowledge graph and the reasoning rule set, and storing the reasoning knowledge graph into a second storage area; merging the basic knowledge graph and the reasoning knowledge graph to obtain a first knowledge graph; and updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at every interval of the first set time so as to update the first knowledge graph. The embodiment of the invention fully ensures the timeliness of the knowledge graph, and meanwhile, the inference knowledge graph is updated only by setting time at intervals, so that the timeliness of the knowledge graph can be ensured, and a large amount of data processing is effectively avoided.

Description

Knowledge graph construction method and device, knowledge graph system and equipment
Technical Field
The invention relates to the technical field of data processing, in particular to a knowledge graph construction method and device, a knowledge graph system and equipment.
Background
Currently, the knowledge graph stores limited and static entity-attribute (or relation) -entity knowledge triples, and the loss of partial knowledge association is inevitable. In addition, the storage technology of the knowledge graph ignores the timeliness of knowledge. However, in the application process of the knowledge graph, the knowledge graph needs to be applied to derived questions containing facts described in the knowledge graph, so that the existing knowledge triples cannot directly answer the user question. For example: "are you old this year? "the knowledge base stores the birthday of a person, but does not contain the dynamic knowledge" age "related to time. But the "age" of an individual also increases over time. Therefore, the existing knowledge graph can not meet the requirements of users.
For the above problem, there are two solutions at present: 1. the dimensionality of the state is increased in the representation of the knowledge triples. That is, in the existing binary relation, a third relation parameter is introduced: a time axis. For example, the original triplet expresses the binary relation, denoted as (e1, r, e2), and the new binary relation is expressed as (e1, r, e 2; time) in the knowledge graph after the state dimension is added. For example: declaring a statement in the knowledge base according to the rules: (minuscule, age, 10, expired _ time 2020.10.01), new valid statements are re-declared after the triple has expired (time is after the expiration time expired). 2. Virtual nodes are introduced to express timeliness of knowledge triples, but introduction of virtual nodes will result in changes to the knowledge base structure itself. Therefore, the compatibility of the knowledge graph with other knowledge graphs is poor no matter the knowledge graph with the increased state dimension or the knowledge graph with the introduced virtual nodes, and the integration and the interoperation between the knowledge graphs are difficult to realize. On the other hand, because an expression mode with a temporal state is added to ensure the consistency and the real-time performance of the knowledge base, the calculation amount and the complexity of an RDF (Resource Description Framework) triple are increased to a great extent. In the two schemes, the requirements of the user on the knowledge graph cannot be well met.
Disclosure of Invention
In order to solve the problems in the knowledge graph construction process, the embodiment of the invention creatively provides a knowledge graph construction method, a knowledge graph construction device, a knowledge graph system and a processor.
According to a first aspect of the invention, there is provided a method of constructing a knowledge-graph, the method comprising: receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness; acquiring an inference rule set used for showing rules required to be used for generating the inference knowledge graph according to the basic knowledge graph; generating the inference knowledge graph according to the basic knowledge graph and the inference rule set, and storing the inference knowledge graph into a second storage area; merging the basic knowledge graph and the reasoning knowledge graph to obtain a first knowledge graph; and updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at every interval of first set time so as to update the first knowledge graph.
According to an embodiment of the invention, the method further comprises: recording and generating an updating time stamp of each inference data in the inference knowledge graph and an inference rule in the inference rule set; generating an index knowledge graph according to the inference data, the corresponding update time stamp and the utilized inference rule, and storing the index knowledge graph into a third storage area; merging the index knowledge graph to a first knowledge graph to obtain a complete knowledge graph; and judging the validity of the corresponding inference data according to the update timestamp and the inference rule at every second set time interval.
According to an embodiment of the present invention, the determining the validity of the corresponding inference data according to the update timestamp and the inference rule includes: determining basic data in the basic knowledge graph on which the inference data depends according to the inference rule; judging a predicted effective period of corresponding inference data according to the update timestamp and the dependent basic data, wherein the effective period comprises effective time and/or ineffective time; determining a current time; and judging the validity of the corresponding inference data according to the current time and the valid period.
According to an embodiment of the present invention, the inference rule is described by using a description logic.
According to an embodiment of the invention, after merging the base knowledge-graph and the inference knowledge-graph, the method further comprises: judging whether the inference knowledge graph in the complete knowledge graph conflicts with the basic knowledge graph or not according to a Tableau algorithm; and sending out reminding information when the conflict exists.
According to an embodiment of the invention, all data in the knowledge-graph is stored using a resource description framework RDF.
According to the second aspect of the present invention, there is also provided a knowledge graph system, the knowledge graph system being constructed according to the knowledge graph construction method, the knowledge graph system including: the basic knowledge layer comprises basic data of a basic knowledge graph and an inference rule set, the basic knowledge graph is used for generating the inference knowledge graph with timeliness, and the inference rule set is used for showing an inference rule set of rules required to be used for generating the inference knowledge graph with timeliness according to the basic knowledge graph; the reasoning knowledge layer comprises reasoning data of the reasoning knowledge graph generated according to the basic knowledge graph and the reasoning rule set; and updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at every interval of first set time so as to update the first knowledge graph comprising the basic knowledge graph and the inference knowledge graph.
According to an embodiment of the present invention, the knowledge graph system further includes: and the index knowledge layer comprises an index knowledge graph, and the index knowledge graph is generated according to each inference data in the inference knowledge graph, the corresponding update time stamp and the inference rule in the utilized inference rule set.
According to a third aspect of the present invention, there is also provided an apparatus for constructing a knowledge-graph, the apparatus comprising: the receiving module is used for receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness; the rule acquisition module is used for acquiring an inference rule set which is used for showing rules needed to be used for generating the inference knowledge graph according to the basic knowledge graph; the inference module is used for generating the inference knowledge map according to the basic knowledge map and the inference rule set and storing the inference knowledge map into a second storage area; the merging module is used for merging the basic knowledge graph and the reasoning knowledge graph to obtain a first knowledge graph; and the updating module is used for updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at intervals of first set time so as to update the first knowledge graph.
According to a fourth aspect of the present invention, there is also provided a processor for executing a program, wherein the instructions, when executed, are for performing the above-mentioned knowledge-graph construction method.
According to a fifth aspect of the present invention, there is also provided an apparatus comprising at least one processor, and at least one memory connected to the processor, a bus; the processor and the memory complete mutual communication through the bus; the processor is used for calling program instructions in the memory so as to execute the knowledge graph construction method.
The embodiment of the invention provides a knowledge graph construction method, a knowledge graph construction device, a knowledge graph system and a processor. Therefore, when the knowledge graph constructed according to the method is used, invalid data can be directly obtained from the knowledge graph without carrying out a large amount of operations according to the basic knowledge graph, and the efficiency of data query in the knowledge graph is ensured. Meanwhile, only a reasonable updating time interval needs to be set, the inference knowledge graph is updated, timeliness of the knowledge graph can be guaranteed, and a large amount of data processing in the knowledge graph updating process is avoided.
It is to be understood that the teachings of the present invention need not achieve all of the above-described benefits, but rather that specific embodiments may achieve specific technical results, and that other embodiments of the present invention may achieve benefits not mentioned above.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a schematic diagram illustrating an implementation flow of a method for constructing a knowledge graph according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a component structure of a knowledge graph system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a configuration of a specific application example of a knowledge graph system according to an embodiment of the present invention;
FIG. 4 is a flow chart diagram illustrating an implementation of determining validity of inference data according to an embodiment of the invention;
FIG. 5 is a schematic diagram showing the composition structure of a knowledge-graph constructing device according to an embodiment of the present invention;
fig. 6 is a schematic diagram showing a component structure of an apparatus according to an embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given only to enable those skilled in the art to better understand and to implement the present invention, and do not limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
It should be noted that the knowledge graph in the embodiment of the present invention may be various types of knowledge graphs, where a knowledge graph refers to a knowledge base for enhancing the function of a search engine, and is intended to describe various entities or concepts existing in the real world and their relationships, and it constitutes a huge semantic network graph, and nodes represent entities or concepts, and edges are constituted by attributes or relationships. For the convenience of describing the embodiment of the present invention specifically, the embodiment of the present invention is described in detail by taking an example that all data in the knowledge graph are expressed and stored by using an RDF (Resource Description Framework). For example, many complex relationships between entities are represented in the form of triples [ entity, attribute value ], [ entity 1, relationship, entity 2], and so on. For example: [ Xiao Li, father and woman, Fuxing ], [ sprout, Master and student, professor in forest ], [ Xiao hong, Sheng Di, Shanghai ], [ Xiao hong, birth time, 2010-8 months ] and the like. However, the knowledge graph may also be represented and stored in other forms in the embodiment of the present invention, which is not particularly limited in this embodiment of the present invention.
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
Fig. 1 shows a schematic implementation flow diagram of a method for constructing a knowledge graph according to an embodiment of the present invention.
Referring to fig. 1, a method for constructing a knowledge graph according to an embodiment of the present invention at least includes the following operation flows: an operation 101, receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness; operation 102, obtaining an inference rule set, where the inference rule set is used for showing rules that need to be used for generating an inference knowledge graph from a basic knowledge graph; operation 103, generating an inference knowledge graph according to the basic knowledge graph and the inference rule set, and storing the inference knowledge graph in a second storage area; an operation 104 of merging the base knowledge graph and the inference knowledge graph to obtain a first knowledge graph; at an interval of a first set time, the inference knowledge graph is updated according to the basic knowledge graph and the inference rule set to update the first knowledge graph in operation 105.
In operation 101, a basic knowledge graph is received and stored in a first storage area, and the basic knowledge graph is used for generating a time-efficient inference knowledge graph.
In one embodiment of the present invention, the basic knowledge graph refers to a static set of fact-class knowledge, such as: [ Xiaoming, sex, male ], [ Xiaoming, birthday, 6 days 2 and month 2000 ], [ Xiaohong, graduation school, Happy middle school ], [ Xiaohong, graduation time, 6 months 2011 ]. The knowledge has a common characteristic that the answer of the problem with timeliness cannot be directly determined according to the knowledge. For example: "the age of Xiaoming? "," small red graduation years? ".
At operation 102, a set of inference rules is obtained that is used to illustrate the rules that need to be used to generate an inference knowledge graph from a base knowledge graph.
In one embodiment of the present invention, the inference rule is described using description logic. Describing logic is a logic-based formalized knowledge representation. Description logic defines concepts, relationships, entities. There is also a series of operators for describing and constraining entity relationships.
For example, a logical rule statement for the age of a person is as follows:
Figure BDA0002560522150000061
here, "Xiaoming" is defined as "Xiaoming" for easier recognition by a computer, and here, based on the birthday of Xiaoming and the current time, the current time minus the birthday of Xiaoming by Rule1 may be expressed as [ Xiaoming, age, 20 ]. According to the logic Rule1, a time-efficient reasoning knowledge can be easily obtained according to knowledge in the basic knowledge graph. Therefore, similar reasoning is carried out, a plurality of reasoning knowledge can be obtained, and a reasoning knowledge map is formed.
In operation 103, an inference knowledge graph is generated based on the base knowledge graph and the set of inference rules, and the inference knowledge graph is stored to the second storage area.
For example, the basic knowledge graph includes several pieces of basic knowledge, such as: [ Xiaoming, birthday, 2.6.2000 ], etc., the inference Rule set includes several inference rules, such as Rule1 in operation 102. It should be noted that the number of the basic knowledge and the number of the inference rules may be the same or different, and they may correspond to each other. And reasoning can be carried out on a piece of basic knowledge according to different reasoning rules to obtain different reasoning knowledge. Or an inference rule is adopted to infer each basic knowledge in the multiple basic knowledge respectively and obtain corresponding inference knowledge. Of course, the inference knowledge can be obtained according to the basic knowledge and the inference rule in any other suitable manner. And all the obtained inference knowledge is used as a complete inference knowledge map and stored in a second storage area.
The inference rules of the inference knowledge graph typically involve varying times, such as: CurrentDate (? the data of the thisYear is changed in real time, but the inference knowledge obtained by the data does not necessarily change in real time, the inference knowledge can change at a determined time node, and the timeliness of the inference knowledge can be ensured only by reasoning and updating the inference knowledge at a certain time interval. Therefore, the inference knowledge map is stored in the second storage area and is stored separately from the basic knowledge map, so that the inference knowledge can be updated regularly or irregularly. Therefore, when the inference knowledge is updated, only each inference knowledge of the inference knowledge graph in the second storage area needs to be traversed to detect timeliness and update, and each basic knowledge in the basic knowledge graph does not need to be traversed to detect timeliness and update. The data processing amount is effectively reduced, and therefore the processing efficiency of the knowledge graph is improved.
At operation 104, the base knowledge-graph and the inference knowledge-graph are merged to obtain a first knowledge-graph.
In an embodiment of the invention, the combination of the basic knowledge graph and the inference knowledge graph is a simple combination process, and all knowledge included in the basic knowledge graph and the inference knowledge graph is used as a complete knowledge graph to be called by other modules or users. For example: for the intelligent robot, when determining the problem proposed by the user through voice input and the like, all knowledge in the basic knowledge graph and the inference knowledge graph can be traversed, or the result of the problem can be queried and determined from the first knowledge graph obtained by combining the basic knowledge graph and the inference knowledge graph according to a certain query rule.
In one embodiment of the invention, after the basic knowledge graph and the inference knowledge graph are combined, whether the inference knowledge graph and the basic knowledge graph in the complete knowledge graph conflict or not is judged according to a Tableau algorithm; and sending out reminding information when the conflict exists.
For example, after the basic knowledge graph and the inference knowledge graph are combined, the obtained knowledge in the first knowledge graph may have conflict problems between the satisfiability, the inclusiveness and other knowledge. For example, a periodic meeting schedule is declared in the base knowledge graph [ new product quality example, period, 10 days ], at which time, if there is a rule declaration in the inference rule set, for example: new product quality example will be held 7 days before the product is released. And reasoning according to the related knowledge in the basic knowledge graph by using the reasoning rule to obtain the corresponding reasoning knowledge which possibly has time and time conflicts with the periodic meeting arrangement in the basic knowledge graph in terms of time. In the embodiment of the invention, the inference rule described by description logic is adopted, the description logic is a decidable subset of first-order logic, and the Tableau algorithm is a proof wheel of a section of logic, so that the Tableau algorithm suitable for the invention can be constructed according to the description logic and the Tableau algorithm and is used for judging the inference problem of the knowledge graph.
It should be noted that, for the time of judging whether the inference knowledge graph in the complete knowledge graph conflicts with the basic knowledge graph, the judgment can be performed immediately after the basic knowledge graph and the inference knowledge graph are combined to obtain the first knowledge graph; it may also be determined after each update of the first knowledge-graph in operation 105 below, as well as after each combination of the first knowledge-graph and each update of the first knowledge-graph. And sending out reminding information when the knowledge graph is judged to have conflict at any time. Therefore, the inference rule and the relevant basic knowledge in the basic knowledge graph can be checked according to the sent reminding information so as to perfect the knowledge graph.
At operation 105, the inference knowledgegraph is updated to update the first knowledgegraph according to the base knowledgegraph and the set of inference rules at intervals of a first set time.
And updating the inference knowledge map according to the basic knowledge map and the inference rule set, which is essentially the process of generating the inference knowledge map again according to the basic knowledge map and the inference rule set. Referring back to operation 103, similar operation steps are performed to complete the update of the inference knowledge graph.
In an embodiment of the present invention, the first setting time may be a fixed time duration, for example: 2 hours, 1 day, 2 days, one week, 15 days, etc. It may also be a set update time point, for example: the knowledge map system is applied to an intelligent robot or an intelligent customer service system and the like, and can set the first set time as the restarting time of the intelligent robot or the intelligent customer service system every time, without setting a specific time interval for updating the inference knowledge map.
In one embodiment of the invention, the update time stamp of each inference data in the generated inference knowledge graph and the inference rule in the inference rule set used are also recorded; generating an index knowledge graph according to the inference data, the corresponding update time stamp and the utilized inference rule, and storing the index knowledge graph into a third storage area; merging the index knowledge graph to the first knowledge graph to obtain a complete knowledge graph; and judging the validity of the corresponding inference data according to the update timestamp and the inference rule at every second set time interval.
In one embodiment of the present invention, the following operation steps are adopted to judge the validity of the corresponding inference data according to the update timestamp and the inference rule: determining basic data in a basic knowledge graph on which the inference data depends according to an inference rule; judging the expected effective period of the corresponding inference data according to the update timestamp and the dependent basic data, wherein the effective period comprises effective time and/or ineffective time; determining a current time; and judging the validity of the corresponding inference data according to the current time and the validity period.
For example, referring back to operations 101-103, inference knowledge [ Xiaoming, age, 20] is generated when the inference knowledge graph is first generated or updated in 6.6.2020 based on the basic knowledge [ Xiaoming, birthday, 2.6.2000 ] and the inference Rule 1. Then the inference data [ Xiaoming, age, 20] here is updated at 6.6.2020, and the inference Rule used is Rule 1. And simplifying the description of the inference data in the generated index knowledge graph according to the inference data, the corresponding update time stamp and the utilized inference rule according to a preset naming rule. For example: [ Xiaoming, Age, 20] is described as "Age".
From the data in the index knowledge base, it can be determined that inference data [ Xiaoming, age, 20] is generated from Rule1 and basic knowledge [ Xiaoming, birthday, 2.6.2000 ] and the update time is 2020, 6.6. The failure time of the reasoning knowledge [ Xiaoming, age, 20] can be determined to be 2021, 2 and 5 days according to the basic data [ Xiaoming, birthday, 2 and 6 days in 2000 ]. If the current time is 30 days 6 months in 2020, the inference data [ Xiaoming, age, 20] is valid data.
Similarly, based on the above knowledge graph construction method, an embodiment of the present invention further provides a knowledge graph system, where the knowledge graph system is constructed according to the above knowledge graph construction method, as shown in fig. 2, and the knowledge graph system 20 includes: the basic knowledge layer 201 comprises basic data of a basic knowledge graph and an inference rule set, wherein the basic knowledge graph is used for generating an inference knowledge graph with timeliness, and the inference rule set is used for showing an inference rule set of rules required to be used for generating the inference knowledge graph with timeliness according to the basic knowledge graph; an inference knowledge layer 202 comprising inference data of an inference knowledge graph generated from the base knowledge graph and an inference rule set; and updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at every interval of first set time so as to update the first knowledge graph comprising the basic knowledge graph and the inference knowledge graph.
In an embodiment of the present invention, the knowledge graph system further includes an index knowledge layer, where the index knowledge layer includes an index knowledge graph, and the index knowledge graph is generated according to each inference data in the inference knowledge graph, the corresponding update timestamp, and the inference rule in the set of inference rules that is utilized.
Fig. 3 is a schematic diagram illustrating a composition structure of a specific application example of a knowledge graph system according to an embodiment of the present invention, and referring to fig. 3, the knowledge graph system includes a basic knowledge layer 301, an inference knowledge layer 302, and an index knowledge layer 303.
The basic knowledge layer 301 is factual knowledge in a certain field, describes recognized concepts and relations in the field, and stores general static knowledge. The description and storage may be made using common specifications, such as: and describing and storing by using a resource description framework RDF. The base knowledge layer 301 includes a kernel layer knowledge base including a base knowledge graph and a logic rule base including an inference rule set.
Inference knowledge layer 302 contains triples generated using logical rules, which are new knowledge generated based on the underlying knowledge graph and set of inference rules stored in underlying knowledge layer 301.
The indexing knowledge layer 303 stores metadata for the inference knowledge layer 302 and may also be considered as a supplement to the information of the inference knowledge layer 302. The inference data of each inference knowledge layer 302 has information about the state information of the inference data, which may be the generation or update time, and the inference rule used in the index knowledge layer. The inference data triplets of the inference knowledge layer 302 do not directly store their own state information, but rather are stored by the external indexing knowledge layer 303 with their state information and the inference rules utilized.
The inference module 305 performs inference operations based on the underlying knowledge layer 301 under the control of the control module 304 of the knowledge graph system.
For example: the logical rule base in the basic knowledge layer 301 defines an inference rule statement about the age of a person:
Figure BDA0002560522150000101
rule2 expresses the meaning that "the age of the jasmine is generated according to the birthday and the set time of the jasmine", and the final conclusion is that: the age of the jasmine at the set time thisYear is what, wherein the set time thisYear can be the current time or any other time. Suppose that the inference module 304 can obtain a new triple [ Moli, age, 18] according to Rule1 and related basic data [ Moli, birthday, 20020520] in the basic knowledge layer 301 at 5/6/2020, and the new triple stores the inference knowledge layer 302 and stores the inference Rule2 used by the new triple in the index knowledge layer 303, and the generated time is 5/6/2020. In addition, the inference knowledge layer can also store information such as the predicted expiration time of the inference knowledge. For example: in Rule1, a variable (.
The consistency check module 306 combines the knowledge of the basic knowledge layer 301 and the inference knowledge layer 301 under the control of the control module 304, and checks the inclusiveness of the knowledge as a whole by using the Tableau algorithm to determine that the knowledge does not contain conflicting statements. For example, a periodic meeting schedule is declared in the knowledge base, which may result in a time conflict if a newly added rule declares an overlap in time with an existing meeting time.
Under the control of the control module 304, the utility analysis module 307 determines the validity of the inference data, the utility analysis module 307 checks the time stamp and the inference rule corresponding to each piece of inference data in the index knowledge layer 303, and when the change of the support inference rule changes, the corresponding inference data is invalid. The specific implementation flow is described with reference to fig. 4.
Fig. 4 shows a flow chart of an implementation of determining validity of inference data in an embodiment of the invention. The description will be given by taking a certain device update as an example, and the device is named as molty. The device update rule montlyupdate is described as follows:
Figure BDA0002560522150000111
the rules are described in detail as follows: "update the operating system version of the handset between 7 and 10 days per month". Set of variables when left {? phone,? os,? If any variable in currentDay changes, the inference data is regenerated, and the inference knowledge map is updated. Furthermore, the left set of variables {? phone,? os,? currentDay } a change in either variable may also cause a previously derived updatingOS failure. And during analysis, generating an updated priority index of the inference data according to dimensions such as the aging time of the inference data, the number of variable changes and the like. Sorted by utility index and returned to the control module 304.
Referring to fig. 4, determining the validity of the inference data includes at least the following operational flows:
in operation 401, the utility analysis module 307 is periodically started.
At operation 402, the index knowledge-graph of index knowledge layer 303 is scanned.
At operation 403, inference rules and basic data are obtained.
For example, scanning any index data in the index knowledge layer 307 may determine its corresponding inference rules and underlying data. From the base knowledge layer 301, corresponding inference rules and base data can be obtained.
At operation 404, the timeliness of the inferential data is determined.
Operation 405, determining whether the data is invalid, if not, executing operation 401 to wait for the timing start determination program, and determining again; if so, operation 406 is performed.
In operation 406, the control module collects and updates.
For example, each time the current inference data is found to be invalid in operation 405, a warning message is sent to the control module, and corresponding inference data information is sent to the control module 304, so that the control module 304 controls the inference module 305 to update the corresponding inference data.
Operation 407 ends.
The knowledge graph construction method, the knowledge graph construction device, the knowledge graph system and the processor of the embodiment of the invention generate the inference knowledge graph with timeliness according to the inference rule based on the original basic knowledge graph, respectively store the basic knowledge graph and the inference knowledge graph, and update the knowledge graph at set time intervals so as to keep the timeliness of the knowledge graph. Therefore, when the knowledge graph constructed according to the method is used, invalid data can be directly obtained from the knowledge graph without carrying out a large amount of operations according to the basic knowledge graph, and the efficiency of data query in the knowledge graph is ensured. Meanwhile, only a reasonable updating time interval needs to be set, the inference knowledge graph is updated, timeliness of the knowledge graph can be guaranteed, and a large amount of data processing in the knowledge graph updating process is avoided.
Further, based on the above method for constructing a knowledge graph, an embodiment of the present invention further provides a device for constructing a knowledge graph, and fig. 5 is a schematic diagram illustrating a composition structure of the device for constructing a knowledge graph according to the embodiment of the present invention. Referring to fig. 5, the apparatus 50 includes: the receiving module 501 is configured to receive a basic knowledge graph, and store the basic knowledge graph in a first storage area, where the basic knowledge graph is used to generate a time-efficient inference knowledge graph; a rule obtaining module 502, configured to obtain an inference rule set, where the inference rule set is used to show rules that need to be used to generate an inference knowledge graph from a basic knowledge graph; the inference module 503 is configured to generate an inference knowledge graph according to the basic knowledge graph and the inference rule set, and store the inference knowledge graph in the second storage area; a merging module 504, configured to merge the basic knowledge graph and the inference knowledge graph to obtain a first knowledge graph; and an updating module 505, configured to update the inference knowledge graph according to the basic knowledge graph and the inference rule set at each interval of the first set time, so as to update the first knowledge graph.
Still further, based on the above knowledge graph building method, an embodiment of the present invention further provides a processor for executing a program, wherein the instructions, when executed, cause the processor to perform at least the following operation steps: an operation 101, receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness; operation 102, obtaining an inference rule set, where the inference rule set is used for showing rules that need to be used for generating an inference knowledge graph from a basic knowledge graph; operation 103, generating an inference knowledge graph according to the basic knowledge graph and the inference rule set, and storing the inference knowledge graph in a second storage area; an operation 104 of merging the base knowledge graph and the inference knowledge graph to obtain a first knowledge graph; at an interval of a first set time, the inference knowledge graph is updated according to the basic knowledge graph and the inference rule set to update the first knowledge graph in operation 105.
In addition, an apparatus is further provided in the embodiment of the present invention, and fig. 6 shows a schematic structural diagram of an apparatus in the embodiment of the present invention. Referring to fig. 6, the device 60 includes at least one processor 601, and at least one memory 602 connected to the processor 601, a bus 603; the processor 601 and the memory 602 complete communication with each other through the bus 603; the processor 601 is configured to call the program instructions in the memory 602, and perform at least the following operation steps: an operation 101, receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness; operation 102, obtaining an inference rule set, where the inference rule set is used for showing rules that need to be used for generating an inference knowledge graph from a basic knowledge graph; operation 103, generating an inference knowledge graph according to the basic knowledge graph and the inference rule set, and storing the inference knowledge graph in a second storage area; an operation 104 of merging the base knowledge graph and the inference knowledge graph to obtain a first knowledge graph; at an interval of a first set time, the inference knowledge graph is updated according to the basic knowledge graph and the inference rule set to update the first knowledge graph in operation 105.
Here, it should be noted that: the above description of the embodiments of the apparatus, processor, device and the like for constructing the knowledge graph is similar to the description of the embodiment of the knowledge graph constructing method and the embodiment of the knowledge graph system shown in fig. 1 to 4, and has similar beneficial effects to the embodiment of the knowledge graph constructing method and the embodiment of the knowledge graph system shown in fig. 1 to 4, and therefore, the description is omitted. For technical details that are not disclosed in the embodiments of the knowledge graph constructing apparatus, the processor, and the like of the present invention, please refer to the description of the embodiment of the knowledge graph constructing method and the knowledge graph system shown in fig. 1 to 4 of the present invention for understanding, and therefore, for brevity, will not be described again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of constructing a knowledge graph, the method comprising:
receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness;
acquiring an inference rule set used for showing rules required to be used for generating the inference knowledge graph according to the basic knowledge graph;
generating the inference knowledge graph according to the basic knowledge graph and the inference rule set, and storing the inference knowledge graph into a second storage area;
merging the basic knowledge graph and the reasoning knowledge graph to obtain a first knowledge graph;
and updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at every interval of first set time so as to update the first knowledge graph.
2. The method of claim 1, further comprising:
recording and generating an updating time stamp of each inference data in the inference knowledge graph and an inference rule in the inference rule set;
generating an index knowledge graph according to the inference data, the corresponding update time stamp and the utilized inference rule, and storing the index knowledge graph into a third storage area;
merging the index knowledge graph to a first knowledge graph to obtain a complete knowledge graph;
and judging the validity of the corresponding inference data according to the update timestamp and the inference rule at every second set time interval.
3. The method of claim 2, said determining validity of the corresponding inference data according to the update timestamp and the inference rule, comprising:
determining basic data in the basic knowledge graph on which the inference data depends according to the inference rule;
judging a predicted effective period of corresponding inference data according to the update timestamp and the dependent basic data, wherein the effective period comprises effective time and/or ineffective time;
determining a current time;
and judging the validity of the corresponding inference data according to the current time and the valid period.
4. The method of claim 2, the inference rule being described using description logic.
5. The method of claim 2, after merging the base knowledge-graph and the inference knowledge-graph, the method further comprising:
judging whether the inference knowledge graph in the complete knowledge graph conflicts with the basic knowledge graph or not according to a Tableau algorithm;
and sending out reminding information when the conflict exists.
6. The method of any of claims 1-5, all data in the knowledge-graph is stored using a Resource Description Framework (RDF).
7. A knowledge graph system constructed according to the knowledge graph construction method of any one of claims 1-6, the knowledge graph system comprising:
the basic knowledge layer comprises basic data of a basic knowledge graph and an inference rule set, the basic knowledge graph is used for generating the inference knowledge graph with timeliness, and the inference rule set is used for showing an inference rule set of rules required to be used for generating the inference knowledge graph with timeliness according to the basic knowledge graph;
the reasoning knowledge layer comprises reasoning data of the reasoning knowledge graph generated according to the basic knowledge graph and the reasoning rule set;
and updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at every interval of first set time so as to update the first knowledge graph comprising the basic knowledge graph and the inference knowledge graph.
8. The knowledge graph system of claim 7, further comprising:
and the index knowledge layer comprises an index knowledge graph, and the index knowledge graph is generated according to each inference data in the inference knowledge graph, the corresponding update time stamp and the inference rule in the utilized inference rule set.
9. An apparatus for constructing a knowledge graph, the apparatus comprising:
the receiving module is used for receiving a basic knowledge graph and storing the basic knowledge graph into a first storage area, wherein the basic knowledge graph is used for generating a reasoning knowledge graph with timeliness;
the rule acquisition module is used for acquiring an inference rule set which is used for showing rules needed to be used for generating the inference knowledge graph according to the basic knowledge graph;
the inference module is used for generating the inference knowledge map according to the basic knowledge map and the inference rule set and storing the inference knowledge map into a second storage area;
the merging module is used for merging the basic knowledge graph and the reasoning knowledge graph to obtain a first knowledge graph;
and the updating module is used for updating the inference knowledge graph according to the basic knowledge graph and the inference rule set at intervals of first set time so as to update the first knowledge graph.
10. A device comprising at least one processor, and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to invoke program instructions in the memory to perform the knowledge-graph construction method of any of claims 1-6.
CN202010609624.9A 2020-06-29 2020-06-29 Knowledge graph construction method and device, knowledge graph system and equipment Pending CN111984643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010609624.9A CN111984643A (en) 2020-06-29 2020-06-29 Knowledge graph construction method and device, knowledge graph system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010609624.9A CN111984643A (en) 2020-06-29 2020-06-29 Knowledge graph construction method and device, knowledge graph system and equipment

Publications (1)

Publication Number Publication Date
CN111984643A true CN111984643A (en) 2020-11-24

Family

ID=73437645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010609624.9A Pending CN111984643A (en) 2020-06-29 2020-06-29 Knowledge graph construction method and device, knowledge graph system and equipment

Country Status (1)

Country Link
CN (1) CN111984643A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732938A (en) * 2021-01-13 2021-04-30 李晋琳 Knowledge graph construction and improvement system and method based on natural language
CN113053178A (en) * 2021-03-29 2021-06-29 南昌工程学院 Interesting roll call device for classroom
CN113313433A (en) * 2021-07-13 2021-08-27 平安科技(深圳)有限公司 Conference resource allocation method based on knowledge graph and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120330875A1 (en) * 2011-06-24 2012-12-27 Angele Juergen Structure index
CN108182245A (en) * 2017-12-28 2018-06-19 北京锐安科技有限公司 The construction method and device of people's object properties classificating knowledge collection of illustrative plates
CN109299283A (en) * 2018-08-29 2019-02-01 阿里巴巴集团控股有限公司 A kind of data reasoning method, apparatus, server and the medium of knowledge based map
CN110019844A (en) * 2019-02-20 2019-07-16 众安信息技术服务有限公司 A kind of insurance industry knowledge mapping question answering system construction method and device
CN110597992A (en) * 2019-09-10 2019-12-20 腾讯科技(深圳)有限公司 Semantic reasoning method and device based on knowledge graph and electronic equipment
CN110781246A (en) * 2019-09-18 2020-02-11 上海生腾数据科技有限公司 Enterprise association relationship construction method and system
CN111026874A (en) * 2019-11-22 2020-04-17 海信集团有限公司 Data processing method and server of knowledge graph

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120330875A1 (en) * 2011-06-24 2012-12-27 Angele Juergen Structure index
CN108182245A (en) * 2017-12-28 2018-06-19 北京锐安科技有限公司 The construction method and device of people's object properties classificating knowledge collection of illustrative plates
CN109299283A (en) * 2018-08-29 2019-02-01 阿里巴巴集团控股有限公司 A kind of data reasoning method, apparatus, server and the medium of knowledge based map
CN110019844A (en) * 2019-02-20 2019-07-16 众安信息技术服务有限公司 A kind of insurance industry knowledge mapping question answering system construction method and device
CN110597992A (en) * 2019-09-10 2019-12-20 腾讯科技(深圳)有限公司 Semantic reasoning method and device based on knowledge graph and electronic equipment
CN110781246A (en) * 2019-09-18 2020-02-11 上海生腾数据科技有限公司 Enterprise association relationship construction method and system
CN111026874A (en) * 2019-11-22 2020-04-17 海信集团有限公司 Data processing method and server of knowledge graph

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732938A (en) * 2021-01-13 2021-04-30 李晋琳 Knowledge graph construction and improvement system and method based on natural language
CN113053178A (en) * 2021-03-29 2021-06-29 南昌工程学院 Interesting roll call device for classroom
CN113053178B (en) * 2021-03-29 2022-08-16 南昌工程学院 Interesting roll call device for classroom
CN113313433A (en) * 2021-07-13 2021-08-27 平安科技(深圳)有限公司 Conference resource allocation method based on knowledge graph and related equipment

Similar Documents

Publication Publication Date Title
CN111984643A (en) Knowledge graph construction method and device, knowledge graph system and equipment
US7437703B2 (en) Enterprise multi-agent software system with services able to call multiple engines and scheduling capability
Zave A distributed alternative to finite-state-machine specifications
CN109948710A (en) Micro services recognition methods based on API similarity
CN112148788A (en) Data synchronization method and system for heterogeneous data source
CN111752959A (en) Real-time database cross-database SQL interaction method and system
CN103946794A (en) Cross-reference and priority claim to related applications
CN108345658A (en) Algorithm calculates decomposing process, server and the storage medium of track
Li et al. Applying Petri nets in active database systems
Agrawal et al. An enhanced extract-transform-load system for migrating data in telecom billing
CN102486731B (en) Strengthen the visualization method of the call stack of software of software, equipment and system
CN116301760A (en) Application design system for software development
CN116578723A (en) Information query method and device, processor and electronic equipment
CN115510214A (en) A stock index knowledge graph construction processing system, method, device, processor and storage medium for intelligent question answering in financial field
CN110222032A (en) A kind of generalised event model based on software data analysis
CN110046141B (en) Data storage method and system based on data playback
CN113326401A (en) Method and system for generating field blood margin
CN112732938A (en) Knowledge graph construction and improvement system and method based on natural language
CN100421394C (en) Automatic testing device and method for user interface
CN111930778B (en) Knowledge query method and device
CN112732833B (en) Universal data bridge architecture for acquiring blockchain information and design method
Chin Knowledge structures in UC, the UNIX Consultant
CN106980695B (en) Component retrieval method in power field and storage method thereof
Dankel II et al. An architecture for defining features and exploring interactions.
Padmanabhan DECIMAL: A requirements engineering tool for product families

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination