Systems and methods for generating knowledge graphs and for using same - Patents.com

The method enhances knowledge graph generation by forming triples with subjects, objects, and adverb-verb relationships, addressing knowledge collision and improving semantic depth, resulting in accurate and efficient knowledge representation.

JP7564562B2Active Publication Date: 2024-10-09NAT CHENG KUNG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022186823
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-10-26
Filing Date
2022-11-22
Publication Date
2024-10-09
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

Existing knowledge graph techniques fail to address knowledge collision and do not represent deep semantic implications, leading to superficial and inaccurate knowledge representation.

Method used

A method and system for generating knowledge graphs through word segmentation, part-of-speech tagging, and forming triples using subjects, objects, and adverb-verb relationships to create deeper semantic connections.

Benefits of technology

The method generates organized knowledge graphs with improved accuracy and efficiency, resolving knowledge conflicts and enabling more comprehensive knowledge representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007564562000002
    Figure 0007564562000002
  • Figure 0007564562000003
    Figure 0007564562000003
  • Figure 0007564562000004
    Figure 0007564562000004
Patent Text Reader

Abstract

To provide a method and a system for generating or using a knowledge graph.SOLUTION: A method for generating a knowledge graph, executed by a processing unit, includes the steps of: obtaining a knowledge document; executing word segmentation and part-of-speech tagging on the knowledge document; generating a plurality of tagged words; and obtaining a plurality of sentences from the tagged words according to a default sentence pattern. Each sentence includes a subject, an adverb corresponding to an adverb type, a verb and an object. For each sentence, the method for generating the knowledge graph includes the steps of: using the subject as a first entity of a triple; using the object as a second entity of the triple; using adverb types and verbs as relations in the triple; and using the triple corresponding to each sentence to form the knowledge graph.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to systems and methods for generating knowledge graphs, as well as systems and methods for using same. [Background technology]

[0002] In recent years, knowledge graphs have been widely used in chatbots and question answering systems, such as medical knowledge graphs, financial knowledge graphs, and e-commerce graphs, to assist in understanding human language and knowledge reasoning and improve user experience with chatbots. Knowledge graphs, formed by nodes (entities) and edges (relationships), can help users find answers more quickly or provide information about search results that users did not expect.

[0003] However, existing knowledge graph technologies cannot correctly represent some knowledge because they do not address the problem of knowledge collision. Moreover, existing semantic analyses for building knowledge graphs are superficial and direct, and do not address deep semantic implications. Summary of the Invention [Problem to be solved by the invention]

[0004] Thus, the present disclosure provides systems and methods for generating knowledge graphs, as well as systems and methods for using them. [Means for solving the problem]

[0005] According to one or more embodiments of the present disclosure, a method for generating a knowledge graph performed by a processing device includes obtaining a knowledge document, performing word segmentation and part-of-speech tagging on the knowledge document to generate a plurality of tagged words, and obtaining a plurality of sentences from the tagged words according to a default sentence pattern, where each sentence includes a subject, an adverb corresponding to an adverb type, a verb, and an object. For each sentence, the method for generating the knowledge graph uses the subject as a first entity of a triple, the object as a second entity of the triple, and the adverb type and the verb as relationships of the triple, and forms a knowledge graph using the triples corresponding to each sentence.

[0006] According to one or more embodiments of the present disclosure, a system for generating a knowledge graph includes a memory and a processing device. The memory stores a knowledge document. The processing device is coupled to the memory and is configured to: retrieve the knowledge document, perform word segmentation and part-of-speech tagging on the knowledge document, generate a plurality of tagged words, and retrieve a plurality of sentences from the tagged words according to a default sentence pattern. Each sentence includes a subject, an adverb corresponding to an adverb type, a verb, and an object, and for each sentence, the processing device is configured to use the subject as a first entity of a triple, the object as a second entity of the triple, and the adverb type and the verb as relationships of the triple, and form a knowledge graph using the triples corresponding to each sentence.

[0007] From the above description, the system and method for generating a knowledge graph according to one or more embodiments of the present disclosure may be applied to generate an organized knowledge graph, and the connection between information and knowledge inference can be more efficient and accurate. Also, the present disclosure uses the adverbial adverb type as the relationship between two entities, which helps to solve the problem of knowledge collision, can process deeper semantic implications to accurately represent knowledge, and improves the expansion of the knowledge graph.

[0008] The present disclosure will become more fully understood from the detailed description given below and the accompanying drawings, which are given for purposes of illustration only and are therefore not intended to limit the disclosure. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a block diagram illustrating a system for generating a knowledge graph according to one embodiment of the present disclosure. [Diagram 2] 1 is a flowchart illustrating a method for generating a knowledge graph according to an embodiment of the present disclosure. [Diagram 3] FIG. 1 is a schematic diagram illustrating a knowledge graph according to an embodiment of the present disclosure. [Figure 4] 10 is a flowchart illustrating a method for generating a knowledge graph according to another embodiment of the present disclosure. [Diagram 5] FIG. 1 is a block diagram illustrating a system using an embodiment of the present disclosure. [Figure 6] 1 is a flowchart illustrating a method for using a knowledge graph according to one embodiment of the present disclosure. [Figure 7] 10 is a flowchart illustrating a method of using a knowledge graph according to another embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] In the following detailed description, for the purpose of explanation, numerous specific details are set forth in order to provide a thorough understanding of the disclosed embodiments. According to the description, claims, and drawings disclosed in the specification, those skilled in the art can easily understand the concept and features of the present invention. The following embodiments further describe various aspects of the present invention, but are not intended to limit the scope of the present invention.

[0011] Please refer to FIG. 1. FIG. 1 is a block diagram showing a system for generating a knowledge graph according to an embodiment of the present disclosure. The system for generating a knowledge graph according to an embodiment of the present disclosure includes a memory 11 and a first processing device 12. The memory 11 may be communicatively connected to the first processing device 12 or electrically connected to the first processing device 12. The memory 11 may be a non-volatile memory such as a read-only memory (ROM), a flash memory or a non-volatile random access memory (NVRAM), and the present disclosure is not limited thereto. The first processing device 12 may be a central processing unit, a programmable logic device or an application specific integrated circuit, and the like, and the present disclosure is not limited thereto.

[0012] The memory 11 is configured to store knowledge documents corresponding to various knowledge fields, and the first processing device 12 is configured to generate knowledge graphs corresponding to various knowledge fields according to the knowledge documents and store the knowledge graphs in the memory 11 or other memories. The first processing device 12 can perform a web crawler on various websites periodically or non-periodically to store the knowledge documents in the memory 11. The knowledge documents may include internal knowledge documents and external knowledge documents. For example, assuming that the knowledge field is medicine, the internal knowledge documents may include health education articles published by hospitals, and the external knowledge documents may include medical articles on Wikipedia, medical journals, and websites of food and drug administrations of various countries, and the present disclosure does not limit the source of the knowledge documents.

[0013] To explain the method of generating a knowledge graph in more detail, refer to FIG. 2. FIG. 2 is a flowchart showing the method of generating a knowledge graph according to an embodiment of the present disclosure. As shown in FIG. 2, the method of generating a knowledge graph according to an embodiment of the present disclosure is executed by the first processing device 12, and includes obtaining a knowledge document (step S201), performing word segmentation and part-of-speech tagging on the knowledge document to generate a plurality of tagged words (step S203), and obtaining a plurality of sentences from the tagged words according to a default sentence pattern (step S205). Here, each sentence includes a subject, an adverb corresponding to an adverb type, a verb, and an object. In addition, the method of generating a knowledge graph according to an embodiment of the present disclosure uses the subject as the first entity of a triple (step S207), uses the object as the second entity of a triple (step S209), uses the adverb type and the verb as the relationship of the triple (step S211), and forms a knowledge graph using the triples corresponding to each sentence (step S213). In the following description, a knowledge document related to medicine is used as an example.

[0014] In step S201, the first processing device 12 retrieves a knowledge document from the memory 11. In step S203, the first processing device 12 performs word segmentation and part-of-speech tagging (POS tagging) on ​​the knowledge document to generate tagged words. Here, the first processing device 12 can perform POS tagging using a part-of-speech tagger. For example, assume that one of the sentences in the knowledge document is "Patients suffered from bone fracture can consume calcium, cheese and bone broth". At this time, the first processing device 12 performs word segmentation on the sentence to generate words "bone fracture", "can", "consume", "cheese", "calcium" and "bone broth". The first processing unit 12 performs POS tagging on these words to obtain the tagged words "patients suffered from bone fracture_subject", "can_adverb", "consume_verb", "cheese_object", "calcium_object", and "bone broth_object".

[0015] In step S205, the first processing device 12 obtains sentences from these tagged words according to a default sentence. The default sentence is, for example, "subject-adverb-verb-object". For example, the first processing device 12 can obtain three sentences according to the default sentence, which are "Patients suffered from bone fracture can consume cheese", "Patients suffered from bone fracture can consume calcium", and "Patients suffered from bone fracture can consume bone broth", respectively.

[0016] Adverbs also have corresponding adverb types. The adverb types may include positive, negative, high frequency, and low frequency types. The positive type is used to indicate a positive relationship between the subject and the object. The negative type is used to indicate a negative relationship between the subject and the object. The high frequency type is used to indicate a positive relationship between the subject and the object, and the occurrence of a situation corresponding to the subject may increase the frequency of using / performing the content of the object. The low frequency type is used to indicate a negative relationship between the subject and the object, and the occurrence of a situation corresponding to the subject may decrease the frequency of using / performing the content of the object.

[0017] For example, the adverb type of the adverb "can" in the above example is positive, which means that if a situation of a bone fracture occurs, a person may take cheese, calcium, and bone broth. In another example with the subject "bone fracture", if the object is "weight training" and the adverb type between "bone fracture" (subject) and "weight training" (object) is negative, it means that a person with a bone fracture should not do weight training. If the object is "rehabilitation" and the adverb type between "bone fracture" (subject) and "rehabilitation" (object) is high-frequency, it means that a person with a bone fracture should do more rehabilitation. If the object is "lying down" and the adverbial type between "bone fracture" (subject) and "lying down" (object) is a low-frequency type, it means that a person with a bone fracture should not spend a lot of time lying down.

[0018] Furthermore, the memory 11 can store an adverb type table as shown below so that the first processor 12 can determine the adverb type of an adverb.

[0019] [Table 1]

[0020] The first processing device 12 executes steps S203 and S205 multiple times on the knowledge document to obtain sentences. Then, the first processing device 12 executes steps S207, S209, and S211 on each sentence. To explain steps S207, S209, and S211 in detail, please refer to FIG. 3. FIG. 3 is a schematic diagram showing a knowledge graph according to an embodiment of the present disclosure.

[0021] In step S207, the first processing device 12 uses the subject "bone fracture" as the first entity A1 of the triple. In step S209, the first processing device 12 uses the object "bone broth" as the second entity B1 of the triple. In step S211, the first processing device 12 uses the positive adverb "can" and the verb "consume" as the relationship R1 between the first entity A1 and the second entity B1. Similarly, the first processing device 12 uses the object "cheese" as the second entity B2 of the triple, and the positive adverb "can" and the verb "consume" as the relationship R2 between the first entity A1 and the second entity B2. The first processing device 12 uses the object "calcium" as the second entity B3 of the triple and the positive adverb "can" and the verb "consume" as the relationship R3 between the first entity A1 and the second entity B3.

[0022] For ease of understanding, the relationship between the first entity A1 and the second entities B1 to B3 shown in FIG. 3 is expressed in the form of an adverb and a verb (CAN_EAT), but the relationships between the first entity A1 and the second entities B1 to B3 may also be expressed in the form of affirmative, negative, high frequency and low frequency, along with the corresponding verbs.

[0023] Next, in step S213, the first processing device 12 constructs a knowledge graph KG by triples generated by executing steps S207, S209, and S211 for each sentence. For example, the first processing device 12 may use the first entity A1, the second entities B1-B3, and the relations R1-R3 as one knowledge graph. Also, the first processing device 12 may tag the knowledge graph KG according to the knowledge fields of the knowledge graph KG, so that the knowledge graph KG has a corresponding field header. Taking FIG. 3 as an example, the field headers of the knowledge graph KG may be "medicine", "orthopedics", or "bone fracture", etc. Therefore, the knowledge graph KG can be quickly searched based on the field headers.

[0024] Also, as shown in FIG. 3, the knowledge graph KG may further include third entities C1-C3 connected to the first entity A1. Here, the relationships R4-R6 between the first entity A1 and the third entities C1-C3 are verbs. The method of generating the third entities C1-C3 may be the same as the method of generating the second entities B1-B3. When the sentence does not include an adverb, the first processing device 12 may use the subject as the first entity A1 of the triple, the object as the third entities C1-C3 of the triple, and the verb between the subject and the object as the relationships R4-R6 between the first entity A1 and the third entities of the triple.

[0025] 3, the third entities C1 to C3 generated based on the object may be further connected to a fourth entity generated based on another object. For example, if the knowledge document further includes the description "A person with edema can consume vitamin B6", the tagged "edema_subject", "can_adverb", "consume_verb" and "vitamin B6_object" may be obtained based on steps S203 and S205.

[0026] Thus, in step S207, the first processing device 12 uses the entity C1 "edema (subject)" as the first entity of the triple. In step S209, the first processing device 12 uses the object "vitamin B6" as the second entity of the triple (here, the fourth entity D1). In step S211, the first processing device 12 uses the positive adverb "can" and the verb "consume" as the relationship R7 between the third entity C1 and the fourth entity D1. That is, the entity generated based on the object may be regarded as the first entity mentioned above, and the knowledge graph KG can be extended accordingly.

[0027] While the above description has used, for example, medical knowledge documents, the systems and methods for generating knowledge graphs according to one or more embodiments of the present disclosure may also be applied to other domains, such as manufacturing, news, politics or world affairs.

[0028] Taking the manufacturing industry as an example, if the knowledge document contains the statement "The performance of the overall manufacturing industry in the first half of the year is not inferior to that of the same period in 2021, and even the performances of semiconductor industry, textile industry, electrical machinery and machinery industry are better than the same period in 2021," the tagged words acquired by the first processing device 12 performing step S203 may include "performance of the overall manufacturing industry in the first half_subject," "not_adverb," ​​"inferior to_verb," ​​and "same period in 2021_object." The first processing device 12 executes step S205 and obtains the sentence "performance of the overall manufacturing industry in the first half (subject) not (adverb) inferior to (verb) same period in 2021 (object)" according to the default sentence.Then, the first processing device 12 executes steps S207, S209 and S211 to obtain a triple of the first entity (performance of the overall manufacturing industry in the first half), the second entity (same period in 2021) and the relationship (not inferior to).

[0029] In addition, in the case of "even the performances of semiconductor industry, textile industry, electrical machinery and machinery industry are better than the same period in 2021," the tagged words obtained by the first processing device 12 performing step S203 may include "performances of semiconductor industry, textile industry, electrical machinery and machinery industry_subject," "even_adverb," ​​"are better than_verb," ​​and "same period in 2021_object." The first processing device 12 executes step S205 and obtains the sentence "performances of semiconductor industry, textile industry, electrical machinery and machinery industry (subject) even (adverb) are better than (verb) same period in 2021 (object)" according to the default sentence. Then, the first processing device 12 executes steps S207, S209 and S211 and obtains a triple of the first entity (performances of semiconductor industry, textile industry, electrical machinery and machinery industry), the second entity (same period in 2021) and the relationship (even better than).In this example, the adverbs and verbs may be used directly as relations between the first and second entities.

[0030] Thus, in this example, the entity "performance of the overall manufacturing industry in the first half" and the entity "performances of semiconductor industry, textile industry, electrical machinery and machinery industry" may both be connected to the entity "same period in 2021".

[0031] Also, taking the manufacturing industry as an example, if the knowledge document contains the statement "Except for the non-metallic mineral products industry, which is a newly entered industry, the other four industries all belong to the top five industries in gross profit margin," the tagged words acquired by the first processing device 12 performing step S203 may include "the other four industries_subject," "except for the non-metallic mineral products industry, which is a newly entered industry_adverb," ​​"all_adverb," ​​"belong to_verb," ​​and "the top five industries in gross profit margin_object." The first processing device 12 executes step S205 and obtains the sentence "the other four industries (subject) except for the non-metallic mineral products industry, which is a newly entered industry (adverb) belong to (verb) the top five industries in gross profit margin (object)" in accordance with the default sentence.Then, the first processing device 12 executes steps S207, S209 and S211 to obtain triples of the first entity (the other four industries), the second entity (the top five industries in gross profit margin) and the relationship (all belong to), and forms a knowledge graph accordingly. In this example, adverbs and verbs may be directly used as the relationship between the first entity and the second entity.

[0032] Taking the manufacturing industry as another example, if the knowledge document has a description of "The rubber and plastic industry topped the list for the first time", the tagged words acquired by the first processing device 12 performing step S203 may include "rubber and plastic industry_subject", "for the first time_adverb", "topped_verb" and "the list_object". The first processing device 12 performs step S205 and acquires the sentence "rubber and plastic industry (subject) for the first time (adverb) topped (verb) the list (object)" according to the default sentence. Then, the first processing device 12 executes steps S207, S209 and S211 to obtain the first entity (rubber and plastic industry), the second entity (the list) and the relationship (topped for the first time), and forms a knowledge graph accordingly. In this example, the adverb and the verb may be directly used as the relationship between the first entity and the second entity.

[0033] Taking news as an example, if a news article (knowledge document) contains the statement "The designer of Hsinchu baseball stadium did not respect professional opinion," the tagged words acquired by the first processing device 12 executing step S203 may include "designer of Hsinchu baseball stadium_subject," "not_adverb," ​​"respect_verb," ​​and "professional opinion_object." The first processing device 12 executes step S205 and acquires the sentence "designer of Hsinchu baseball stadium (subject) not (adverb) respect (verb) professional opinion (object)" according to the default sentence. Then, the first processing device 12 executes steps S207, S209 and S211 to obtain the triples of the first entity (designer of Hsinchu baseball stadium), the second entity (professional opinion) and the relationship (not respect), and forms a knowledge graph accordingly. In this example, the adverb and the verb may be directly used as the relationship between the first entity and the second entity.

[0034] Taking the international situation as an example, if a news article (knowledge document) contains the statement "EU member states cut gas consumption across the board," the tagged words acquired by the first processing device 12 executing step S203 may include "EU member states_subject," "across the board_adverb," ​​"cut_verb," ​​and "gas consumption_object." The first processing device 12 executes step S205 and acquires the sentence "EU member states (subject) across the board (adverb) cut (verb) gas consumption (object)" according to the default sentence. Then, the first processing device 12 executes steps S207, S209 and S211 to obtain the first entity (EU member states), the second entity (gas consumption) and the relationship (cut across the board), and forms a knowledge graph accordingly. In this example, the adverb and the verb may be directly used as the relationship between the first entity and the second entity.

[0035] Please refer to FIG. 1 to FIG. 4. FIG. 4 is a flowchart showing a method for generating a knowledge graph according to another embodiment of the present disclosure. Steps S401, S403, and S405 shown in FIG. 4 may be executed after the first processing device 12 acquires the subject and before the first entity is generated. That is, steps S401, S403, and S405 shown in FIG. 4 may be executed between steps S205 and S207 shown in FIG. 2. As shown in FIG. 4, after acquiring the subject, the first processing device 12 determines whether the lexicon has a subject (step S401), and if the determination result of step S401 is "no", adds the subject to the lexicon (step S403), and performs POS tagging on the knowledge document again (step S405). Also, if the determination result of step S401 is "yes", the first processing device 12 may execute step S207 shown in FIG. 2.

[0036] The first processing device 12 may be connected to (have access to) a lexicon. Here, the lexicon may be stored in the memory 11. Therefore, after acquiring a subject through step S205 shown in Fig. 2, in step S401, the first processing device 12 may determine whether or not the subject exists in the lexicon.

[0037] If the first processing device 12 determines that the lexicon has a subject, the first processing device 12 may execute step S207 shown in Fig. 2. If the first processing device 12 determines that the lexicon does not have a subject, in step S403, the first processing device 12 may add a subject to the lexicon and perform POS tagging on the knowledge document again to generate a plurality of tagged words.

[0038] In other words, after finding a new word, the first processing device 12 may first add the new word to the current lexicon, and then perform entity relationship extraction on the knowledge documents, thus extending the existing knowledge graph and making it more complete.

[0039] Please refer to FIG. 5. FIG. 5 is a block diagram showing a system using a knowledge graph according to an embodiment of the present disclosure. As shown in FIG. 5, the system using a knowledge graph 2 includes a memory 21, a second processing device 22, and a user interface 23. The second processing device 22 is electrically connected or communicatively connected to the memory 21 and the user interface 23. The memory 21 may be a non-volatile memory such as a read-only memory (ROM), a flash memory, or a non-volatile random access memory (NVRAM), and the present disclosure is not limited thereto. The memory 21 may store a plurality of knowledge graphs generated according to the system and method for generating a knowledge graph according to the embodiment of the present disclosure, and these knowledge graphs are hereinafter referred to as candidate knowledge graphs. The memory 21 may further store the above-mentioned knowledge documents. The second processing device 22 may be a central processing device, a programmable logic device, or an application specific integrated circuit, and the present disclosure is not limited thereto. The user interface 23 may be a screen, a touch display interface, an audio device, and the like, and the user interface 23 may be any element that can be used to receive user commands and present information.

[0040] The memory 21 shown in Fig. 5 and the memory 11 shown in Fig. 1 may be the same memory, or the memory 21 shown in Fig. 5 may be a different memory from the memory in Fig. 1. The second processing device 22 shown in Fig. 5 and the first processing device 12 shown in Fig. 1 may be the same processing device, or the second processing device 22 shown in Fig. 5 may be a different processing device from the processing device in Fig. 1.

[0041] To explain in more detail how to use the candidate knowledge graph generated according to the above embodiment, reference is made to Figures 5 and 6. Figure 6 is a flow chart illustrating a method of using the knowledge graph according to one embodiment of the present disclosure.

[0042] As shown in FIG. 6, which is a flowchart showing a method of using a knowledge graph according to an embodiment of the present disclosure, the method performed by the second processing device 22 includes: obtaining an input question (step S601); performing a natural language understanding procedure on the input question to obtain a question set (step S603), where the question set includes a question subject, a question object, and a question relation of the input question. The method includes: searching a target knowledge graph that matches the question subject from a plurality of candidate knowledge graphs (step S605); determining a first target entity in the target knowledge graph that matches the question subject and a second target entity in the target knowledge graph that matches the question object (step S607); determining a target relation connecting the first target entity and the second target entity (step S609); and outputting a question answer according to the first target entity, the second target entity, and the target relation (step S611).

[0043] In step S601, the user interface 23 obtains an input question input by a user and sends the input question to the second processing device 22. In step S603, the second processing device 22 performs a natural language understanding (NLU) procedure on the input question to analyze the syntax or semantics of the input question, thereby obtaining a question set. Here, the question set includes a question subject, a question object, and a question relation of the input question. For example, if the input question is "Can patients suffered from bone fracture consume cheese?", the second processing device 22 can obtain the question subject "bone fracture", the question object "cheese", and the question relation "can consume" through the natural language understanding procedure. That is, the second processing device 22 can understand through the natural language understanding procedure that the user is asking whether the relation between the entity "bone fracture" and the entity "cheese" is "can eat". In addition, if the question relation of the input question is “can eat”, the second processing device 22 may determine through natural language understanding that “consume” and “eat” are synonyms.

[0044] In step S603, the second processing device 22 searches for a knowledge graph that matches the question subject as a target knowledge graph from among the candidate knowledge graphs stored in the memory 21. As described above, each candidate knowledge graph may have a corresponding domain header, and the second processing device 22 may search for a target knowledge graph according to the question subject and the domain header. For example, in an example in which the question subject is "bone fracture", the second processing device 22 may use a candidate knowledge graph with the domain header "bone fracture" as the target knowledge graph.

[0045] In steps S607 and S609, the second processing device 22 determines a first target entity in the target knowledge graph that matches the question subject, a second target entity in the target knowledge graph that matches the question object, and determines a target relationship connecting the first target entity and the second target entity. For example, taking the above input question and FIG. 3 as an example, the second processing device 22 determines that the entity in the knowledge graph KG that matches the question subject "bone fracture" is the first target entity A1, the entity in the knowledge graph KG that matches the question object "cheese" is the second target entity B2, and determines that the relationship connecting the first target entity A1 and the second target entity B2 is the target relationship R2.

[0046] Next, in step S611, the second processing device 22 generates a question response according to the first target entity A1, the second target entity B2 and the target relationship R2, and outputs the question response to the user interface 23. Specifically, the target relationship R2 indicates the verb and corresponding adverb type between the first target entity A1 and the second target entity B2, so that the second processing device 22 can generate the question response based on the relationship between the first target entity A1 and the second target entity B2.

[0047] Taking the above question subject "bone fracture" and question object "cheese" as an example, according to the knowledge graph, the second processing device 22 can determine that the target relationship R2 between the corresponding subject and object entities is the positive adverb and verb "consume". Therefore, the second processing device 22 can generate a positive question response, such as the question response "Yes, a patient suffered from bone fracture can consume cheese".

[0048] Please refer to Figure 5 and Figure 7. Figure 7 is a flowchart showing a method of using a knowledge graph according to another embodiment of the present disclosure. Step S611 shown in Figure 6 may include step S701 and step S703 shown in Figure 7. As shown in Figure 7, step S611 shown in Figure 6 may include: matching a question intent with a first target entity, a second target entity and a target relationship to form an initial response (step S701); and performing a natural language generation procedure on the initial response to generate a question response (step S703).

[0049] In step S701, the second processing device 22 matches the first target entity A1, the second target entity B2 and the target relation R2 from the initial response "bone fracture_positive_consume_cheese". In step S703, the second processing device 22 performs a natural language generation (NLG) procedure on the initial response to generate a question response such as the above-mentioned question response "Yes, a patient suffered from bone fracture can consume cheese".

[0050] Considering the above description, the system and method for generating a knowledge graph according to one or more embodiments of the present disclosure may be applied to generate an organized knowledge graph, and the connection between information and knowledge inference may be more efficient and accurate. The present disclosure also uses the adverbial type of the adverb as the relationship between two entities, which helps to solve the problem of knowledge collision, and can process deeper semantic implications to more accurately represent knowledge, improving the expansion of the knowledge graph. The system and method for generating a knowledge graph according to one or more embodiments of the present disclosure also discloses adding new words to the lexicon and re-running entity relationship extraction on the knowledge document. Thus, the existing knowledge graph can be expanded and made more complete. Furthermore, the system and method for using a knowledge graph according to one or more embodiments of the present disclosure can provide accurate responses or suggestions to the user.

[0051] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority under 35 USC 119(a) to patent application Ser. No. 111140554, filed in the Republic of China (ROC) on October 26, 2022, the contents of which are incorporated by reference in their entirety into this application.

Claims

1. 1. A method for generating a knowledge graph executed by a processing device, comprising: The method for generating a knowledge graph comprises: Get knowledge documents, performing word segmentation and part-of-speech tagging on the knowledge document to generate a plurality of tagged words; obtaining a plurality of sentences from the tagged words according to a default sentence pattern; each of said sentences includes a subject, an adverb corresponding to one of a plurality of adverb types, a verb, and an object; the plurality of adverb types includes an affirmative type, a negative type, a high frequency type, and a low frequency type; For each of the sentences, the method of generating the knowledge graph comprises: using said subject as the first entity of a triple, using said object as the second entity of said triple, using one of said plurality of adverb types and said verb as a relation in said triple; forming a knowledge graph using the triples corresponding to each of the sentences; A method for generating knowledge graphs.

2. the processing unit is coupled to a memory for storing a lexicon; After obtaining the subject, the method for generating the knowledge graph further comprises: determining whether the lexicon has the subject; adding the subject to the lexicon if the lexicon does not contain the subject; re-performing the part-of-speech tagging on the knowledge documents. The method for generating a knowledge graph according to claim 1 .

3. 1. A method of using a knowledge graph executed by a first processing device, comprising: The method of using the knowledge graph comprises: Get the input question, performing a natural language understanding procedure on the input question to obtain a question set including a question subject, a question object, and a question relation of the input question; A target knowledge graph that matches the question subject is searched for from among a plurality of candidate knowledge graphs generated by the method for generating a knowledge graph according to claim 1; determining a first target entity in the target knowledge graph that matches the query subject and a second target entity in the target knowledge graph that matches the query object; determining a target relationship connecting the first target entity and the second target entity; outputting a question answer according to the first target entity, the second target entity and the target relationship. How to use the knowledge graph.

4. The question set further includes a question intent, outputting the question answer according to the first target entity, the second target entity, and the target relationship, Matching the question intent with the first target entity, the second target entity, and the target relationship to form an initial response; performing a natural language generation procedure on the initial response to generate the question response; A method of using the knowledge graph of claim 3.

5. 1. A method of using a knowledge graph executed by a first processing device, comprising: The method of using the knowledge graph comprises: Get the input question, performing a natural language understanding procedure on the input question to obtain a question set including a question subject, a question object, and a question relation of the input question; A target knowledge graph that matches the question subject is searched for from among a plurality of candidate knowledge graphs generated by the method for generating a knowledge graph according to claim 2; determining a first target entity in the target knowledge graph that matches the query subject and a second target entity in the target knowledge graph that matches the query object; determining a target relationship connecting the first target entity and the second target entity; outputting a question answer according to the first target entity, the second target entity, and the target relationship. How to use the knowledge graph.

6. a memory for storing knowledge documents; a processing unit coupled to the memory; The processing device includes: Obtaining the knowledge document; performing word segmentation and part-of-speech tagging on the knowledge document to generate a plurality of tagged words; obtaining a plurality of sentences from the tagged words according to a default sentence pattern; each of said sentences includes a subject, an adverb corresponding to one of a plurality of adverb types, a verb, and an object; the plurality of adverb types includes an affirmative type, a negative type, a high frequency type, and a low frequency type; For each of the sentences, the processor: using said subject as the first entity of a triple, using said object as the second entity of said triple, using one of said plurality of adverb types and said verb as a relation in said triple; forming a knowledge graph using the triples corresponding to each of the sentences. A system for generating knowledge graphs.

7. the processing unit is coupled to a memory for storing a lexicon; After obtaining the subject, the processing device further determining whether the lexicon has the subject; adding the subject to the lexicon if the lexicon does not contain the subject; re-performing the part-of-speech tagging on the knowledge document. A system for generating a knowledge graph according to claim 6.

8. A memory for storing a plurality of candidate knowledge graphs generated according to the method for generating knowledge graphs according to claim 1; a user interface that receives an input question and presents a question and answer corresponding to the input question; a first processing unit coupled to the memory and to the user interface; The first processing device is performing a natural language understanding procedure on the input question to obtain a question set including a question subject, a question object, and a question relation of the input question; searching the plurality of candidate knowledge graphs for a target knowledge graph that matches the query subject; determining a first target entity in the target knowledge graph that matches the query subject and a second target entity in the target knowledge graph that matches the query object; determining a target relationship connecting the first target entity and the second target entity; outputting a question answer according to the first target entity, the second target entity and the target relationship. A system that uses knowledge graphs.

9. The question set further includes a question intent, The first processing device performing outputting the question answer according to the first target entity, the second target entity, and the target relationship includes: Matching the question intent with the first target entity, the second target entity, and the target relationship to form an initial response; performing a natural language generation procedure on the initial response to generate the question response; A system for using the knowledge graph of claim 8.

10. A memory for storing a plurality of candidate knowledge graphs generated according to the method for generating a knowledge graph according to claim 2; a user interface that receives an input question and presents a question and answer corresponding to the input question; a first processing unit coupled to the memory and to the user interface; The first processing device is performing a natural language understanding procedure on the input question to obtain a question set including a question subject, a question object, and a question relation of the input question; searching the plurality of candidate knowledge graphs for a target knowledge graph that matches the query subject; determining a first target entity in the target knowledge graph that matches the query subject and a second target entity in the target knowledge graph that matches the query object; determining a target relationship connecting the first target entity and the second target entity; and answering a question according to the first target entity, the second target entity, and a target relationship. A system that uses knowledge graphs.

Citation Information

Patent Citations

  • Knowledge graph complementing device and knowledge graph complementing method

    JP2020191009A

  • Entity linking method, device, electronic device, storage medium, and computer program

    JP2021168124A

  • Collecting, organizing, and searching knowledge about a dataset

    US20160132572A1