CN112199473A - Multi-turn dialogue method and device in knowledge question-answering system - Google Patents

Multi-turn dialogue method and device in knowledge question-answering system Download PDF

Info

Publication number
CN112199473A
CN112199473A CN202011110314.9A CN202011110314A CN112199473A CN 112199473 A CN112199473 A CN 112199473A CN 202011110314 A CN202011110314 A CN 202011110314A CN 112199473 A CN112199473 A CN 112199473A
Authority
CN
China
Prior art keywords
candidate
entity
entities
question
historical
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
CN202011110314.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.)
Shanghai Minglue Artificial Intelligence Group Co Ltd
Original Assignee
Shanghai Minglue Artificial Intelligence Group Co 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 Shanghai Minglue Artificial Intelligence Group Co Ltd filed Critical Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority to CN202011110314.9A priority Critical patent/CN112199473A/en
Publication of CN112199473A publication Critical patent/CN112199473A/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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a multi-turn dialogue method and a device in a knowledge question-answering system, wherein the multi-turn dialogue method comprises the steps of obtaining historical entities and historical relations of current question sentences; screening out candidate entities according to the current question; weighting the characteristics of the candidate entities to obtain a main entity; forming a candidate path according to the adjacent relation of the main entity and the historical entity in the knowledge base and the adjacent entities; weighting the characteristics of the candidate paths to obtain a final path; obtaining an answer according to the final path and returning the answer to the user; and acquiring all entities and all relations of the final path as historical entities and historical relations of the next round of question answering. By the method, the historical information of the last question is completely added into the current question and answer, so that the accuracy of historical information acquisition is ensured, and a large amount of labor cost is avoided.

Description

Multi-turn dialogue method and device in knowledge question-answering system
Technical Field
The invention relates to the field of information processing, in particular to a multi-turn dialogue method and a multi-turn dialogue device in a knowledge question-answering system.
Background
The knowledge question-answering system is a question-answering system based on a knowledge graph library and is mainly applied to the industries of medical treatment, banking, insurance, retail and the like. The knowledge atlas database consists of a large number of triples, including entities and relationships, which can be written in (entity 1, relationship, entity 2) form. The knowledge question-answering system receives natural language question input by a user, semantically analyzes and understands the question, utilizes a knowledge map library to query and reason to obtain an answer path and an answer which are most matched with the question, and finally returns the answer to the user.
The multi-turn dialogue in the knowledge question-answering system means that the question-answering system can use historical question information to assist in obtaining answers of current question, so that the system can use the information of previous question when a user asks questions to the system. For example, currently, in many scenarios, a system needs to perform a dialog with a user, such as in the customer service field, the user dialog usually presents a question, the system needs to solve the user question, since the user sentence is usually simple and spoken, one-round dialog between the system and the user cannot solve the user question, multiple rounds of dialogs between the system and the user are needed to clarify the user question, and the system gives an answer meeting the user question. Generally, in the established question-answering system, because the technology of multiple rounds of dialogs is not mature, the question-answering system only supports a single round of dialogs, the burden of a user for proposing a question is obviously increased, the question-answering system becomes more complicated and foolproof, and the use experience of the user is influenced.
Currently, the main research methods for dealing with multi-turn dialogue problems are coreference resolution or deep learning model-based methods.
The coreference resolution aims at identifying different expressions pointing to the same entity, and the coreference resolution is applied to multiple rounds of conversations in a knowledge question-answering system, so that the situation that the current input question contains pronouns can be well solved. Through the replacement of the pronouns, the current question sentence contains historical entity information, and therefore a multi-turn conversation process is achieved. However, the multiple rounds of dialogue based on coreference resolution can only solve the situation where the current question contains pronouns. Due to the diversity of natural languages, the current question sentence can omit information such as entities or relations and the like, and people can communicate with each other normally, but a multi-turn question-answering system based on coreference resolution cannot deal with the problem.
The method based on the deep learning model inputs historical question sentences and current user input question sentences into a deep learning model (such as LSTM, attention mechanism and the like) together for vector coding and feature extraction to obtain current question sentences containing historical question sentence information, and then inputs the current question sentences into a question-answering system. However, the multi-round dialogue processing method based on the depth model relies heavily on annotating the dataset, which is very costly to acquire. Moreover, the effect of the current deep learning model technology in the dialogue field is not up to a high level, and there are many problems in the natural language understanding ability, so that the answer with larger deviation from the actual can be returned by using the method, and the method is difficult to be really applied to the actual product.
Disclosure of Invention
The invention provides a multi-turn dialogue method and a multi-turn dialogue device in a knowledge question-answering system, aiming at the technical problems of complexity and low accuracy of the question-answering system.
In a first aspect, an embodiment of the present application provides a multi-turn dialog method in a knowledge question and answer system, including:
s1: acquiring a historical entity and a historical relation of a current question;
s2: screening out candidate entities according to the current question sentence;
s3: weighting the characteristics of the candidate entities to obtain a main entity;
s4: forming a candidate path according to the adjacent relation of the main entity and the historical entity in a knowledge base and the adjacent entities;
s5: weighting the characteristics of the candidate path to obtain a final path;
s6: and obtaining an answer according to the final path and returning the answer to the user.
In the multi-turn dialogue method in the knowledge question-answering system, all entities and all relations of the final path are acquired as historical entities and historical relations of the next turn of question-answering.
In the multi-turn dialogue method in the knowledge question-answering system, the historical entities and the historical relations are all entities and all relations of an answer path corresponding to a last question in the question-answering system.
The multi-turn dialogue method in the knowledge question-answering system, wherein the step S2 specifically includes the following steps:
s21: acquiring all continuous substrings of the current question string;
s22: and screening substrings which are identical in name with the knowledge base entity from all the continuous substrings to serve as candidate entities.
The multi-turn dialogue method in the knowledge question-answering system, wherein the step S3 specifically includes the following steps:
s31: calculating features of each of the candidate entities;
s32: weighting and calculating the characteristics of each candidate entity according to the importance degree of the candidate entity to obtain the score of each candidate entity;
s33: and acquiring the candidate entity with the highest score as the main entity.
In the multi-turn dialogue method in the knowledge question-answering system, if the substrings with the same name as the knowledge base entity are not screened from all the continuous substrings in step S22 as candidate entities, a candidate path is directly formed according to the adjacent relationship of the historical entities in the knowledge base and the adjacent entities.
The multi-turn dialogue method in the knowledge question-answering system, wherein the step S5 specifically includes the following steps:
s51: calculating the characteristics of each candidate path;
s52: weighting and calculating the characteristics of each candidate path according to the importance degree of the characteristics to obtain the score of each candidate path;
s53: and acquiring the candidate path with the highest score as a final path.
In a second aspect, an embodiment of the present application provides a multi-turn dialog apparatus in a knowledge question answering system, including:
the acquisition module acquires a historical entity and a historical relation of a current question;
the entity linking module screens out candidate entities according to the current question;
the entity screening module is used for weighting the characteristics of the candidate entities to obtain a main entity;
the candidate path generation module is used for forming a candidate path according to the adjacent relation of the main entity and the historical entity in the knowledge base and the adjacent entities;
the path screening module is used for weighting the characteristics of the candidate paths to obtain a final path;
and the answer generating module is used for acquiring an answer according to the final path and returning the answer to the user.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor, when executing the computer program, implements the multi-turn dialog method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the multi-turn dialog method as described in the first aspect above.
Compared with the prior art, the invention has the advantages and positive effects that:
1. the invention completes the process of multi-turn dialogue in the question-answering flows of acquiring all entities and relations of the last question in the knowledge question-answering system, adding entity links, entity screening, candidate path generation, candidate path screening and the like of the current question. By the method, the historical information of the last question is completely added into the current question and answer, so that the accuracy of obtaining the historical information is ensured, the historical information is not easy to lose, and a large amount of labor cost is reduced.
2. The invention provides a method for adding historical entities and historical relations into a question-answering flow of a current question and completing a multi-turn conversation process through modes of rule filtering, similarity matching and the like. By the method, the history information obtained by the current question sentence can be ensured to be completely accurate and not lost, and meanwhile, the method does not depend on any marking data, has extremely low cost and can be applied to various fields.
3. The historical entity and the historical relationship of the answer path corresponding to the previous question are obtained in each question and answer, so that the whole knowledge question and answer system forms a loop, and multiple rounds of conversation can be carried out in infinite rounds.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a first embodiment of a multi-turn dialog method in a knowledge question answering system of the present invention;
FIG. 2 is a flowchart of entity linking based on step S2 in FIG. 1;
FIG. 3 is a flowchart of entity screening based on step S3 in FIG. 1;
fig. 4 is a flow chart of path filtering based on step S5 in fig. 1;
FIG. 5 is a flowchart of a second embodiment of a multi-turn dialog method in a knowledge question-answering system of the present invention;
FIG. 6 is a block diagram of a multi-turn dialog device in a knowledge question answering system according to an embodiment of the present application;
fig. 7 is a block diagram of a computer device according to an embodiment of the present application.
Wherein the reference numerals are:
81. a processor; 82. a memory; 83. a communication interface; 80. a bus.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The present invention is described in detail with reference to the embodiments shown in the drawings, but it should be understood that these embodiments are not intended to limit the present invention, and those skilled in the art should understand that functional, methodological, or structural equivalents or substitutions made by these embodiments are within the scope of the present invention.
Before describing in detail the various embodiments of the present invention, the core inventive concepts of the present invention are summarized and described in detail by the following several embodiments.
The technical scheme is used for a multi-turn dialogue method and device in a knowledge question-answering system, and comprises the steps of obtaining historical entities and historical relations, carrying out entity recognition on question sentences to obtain candidate entities, carrying out entity linking and screening on all the candidate entities through a knowledge graph library to obtain main entities of the question sentences, inquiring the joint main entities and the historical entities in the knowledge graph library to obtain candidate paths, and carrying out candidate path screening and answer generation by combining historical relation information. By the scheme, the history information obtained by the current question sentence can be ensured to be completely accurate and not lost, and meanwhile, the method does not depend on any marking data, is extremely low in cost and can be suitable for various fields.
The first embodiment is as follows:
referring to fig. 1 to 4, this example discloses a specific implementation of a multi-turn dialogue method (hereinafter referred to as "method") in a knowledge question and answer system.
Specifically, the method disclosed in this embodiment mainly includes the following steps:
step S1: and acquiring a historical entity and a historical relation of the current question.
In particular, a knowledge graph is essentially a semantic network whose nodes represent entities (entitys) or concepts (concepts) and edges represent various semantic relationships between entities/concepts. A knowledge graph (or knowledge base) can be viewed as a carrier of knowledge units subject to ontology control. The knowledge graph is a data structure based on a graph, and the storage mode of the knowledge graph mainly has two forms: RDF stores the format and Graph Database (Graph Database).
The knowledge question-answering system is a question-answering system based on a knowledge graph library, wherein the knowledge graph library is composed of a large number of triples, and the triples comprise entities and relations and can be written into a (entity 1, relation, entity 2) form. The knowledge question-answering system receives natural language question input by a user, semantically analyzes and understands the question, utilizes a knowledge map library to query and reason to obtain an answer path and an answer which are most matched with the question, and finally returns the answer to the user. The answer paths refer to triples which are required for obtaining answer information of the question and are in the knowledge graph, and the historical entities and the historical relations are all entities and all relations of the answer paths corresponding to the last question in the knowledge question-answering system.
Then, referring to fig. 2, step S2 is performed: and screening out candidate entities according to the current question sentence.
Wherein, step S2 specifically includes the following contents:
step S21: acquiring all continuous substrings of the current question string;
step S22: and screening substrings which are identical in name with the knowledge base entity from all the continuous substrings to serve as candidate entities.
Then, referring to fig. 3, step S3 is performed: and carrying out weighting processing on the characteristics of the candidate entities to obtain a main entity.
Wherein, step S3 specifically includes the following contents:
step S31: calculating features of each of the candidate entities.
Specifically, the characteristics of the candidate entities include the length of the entity, the position of the entity in the question, the total number of adjacent relations of the entity in the knowledge base, the number of word overlaps of all adjacent relations of the entity in the knowledge base and the question, the number of word overlaps, the word set distance, and the like, wherein the calculation of the word overlap number and the word set distance can adopt the existing word segmentation tool to segment words.
Step S32: and weighting and calculating the characteristics of each candidate entity according to the importance degree of the candidate entity to obtain the score of each candidate entity.
Specifically, the weight setting of each feature can be specified manually or can be trained by the labeling data set.
Step S33: and acquiring the candidate entity with the highest score as the main entity.
Then, step S4 is executed: and forming a candidate path according to the adjacent relation of the main entity and the historical entity in a knowledge base and the adjacent entities.
Then, referring to fig. 4, step S5 is performed: weighting the characteristics of the candidate path to obtain a final path;
wherein, step S5 specifically includes the following contents:
step S51: and calculating the characteristics of each candidate path.
Specifically, the candidate path features include the number of word overlaps, the word set distance, the semantic similarity, the number of word overlaps and the semantic similarity of the path and the history relation, and the like.
Step S52: and weighting and calculating the characteristics of each candidate path according to the importance degree of the characteristics to obtain the score of each candidate path.
Specifically, the weight setting of each feature can be specified manually or can be trained by the labeling data set.
S53: and acquiring the candidate path with the highest score as a final path.
Then, step S6 is executed: and obtaining an answer according to the final path and returning the answer to the user.
And finally, all entities and all relations of the final path are obtained as historical entities and historical relations of the next round of question answering, so that the whole knowledge question answering system forms a loop, and infinite rounds of conversations can be performed.
Example two:
referring to fig. 5, this example discloses a specific implementation of a multi-turn dialogue method (hereinafter referred to as "method") in a knowledge question answering system.
Specifically, the method disclosed in this embodiment mainly includes the following steps:
s10: and acquiring a historical entity and a historical relation of the current question.
S20: and forming a candidate path according to the adjacent relation of the historical entity in the knowledge base and the adjacent entity.
S30: and weighting the characteristics of the candidate paths to obtain a final path.
S40: and obtaining an answer according to the final path and returning the answer to the user.
The method disclosed in this embodiment and the technical solution of the same parts in the multi-turn dialog method in the knowledge question-answering system disclosed in the first embodiment are please refer to the description of the first embodiment, and are not repeated herein.
Example three:
in combination with the multi-turn dialogue method in the knowledge question answering system disclosed in the first embodiment, this embodiment discloses a specific implementation example of a multi-turn dialogue device (hereinafter referred to as "device") in the knowledge question answering system.
Referring to fig. 6, the apparatus includes:
an acquisition module: acquiring a historical entity and a historical relation of a current question;
an entity linking module: screening out candidate entities according to the current question sentence;
an entity screening module: weighting the characteristics of the candidate entities to obtain a main entity;
a candidate path generation module: forming a candidate path according to the adjacent relation of the main entity and the historical entity in a knowledge base and the adjacent entities;
a path screening module: weighting the characteristics of the candidate path to obtain a final path;
an answer generation module: and obtaining an answer according to the final path and returning the answer to the user.
Specifically, all entities and all relationships of the answer path corresponding to the last question in the knowledge question-answering system are input into the acquisition unit.
Specifically, all continuous substrings of the current question string are obtained at the entity linking module, and then substrings with the same name as the knowledge base entity are screened from all the continuous substrings to serve as candidate entities.
Specifically, the characteristics of each candidate entity are calculated in an entity screening module, the characteristics of each candidate entity are weighted and calculated according to the importance degree of the characteristics, the score of each candidate entity is obtained, and finally the candidate entity with the highest score is obtained as a main entity.
Specifically, the feature of each candidate path is calculated in the path screening module, the feature of each candidate path is weighted and calculated according to the importance degree of the feature, the score of each candidate path is obtained, and finally the candidate path with the highest score is obtained to serve as the final path.
Please refer to the description of the first embodiment, which will not be repeated herein, for the technical solutions of the same parts in the multi-turn dialog apparatus in the knowledge question-answering system disclosed in the present embodiment and the multi-turn dialog method in the knowledge question-answering system disclosed in the first embodiment.
Example four:
referring to FIG. 7, the embodiment discloses an embodiment of a computer device. The computer device may comprise a processor 81 and a memory 82 in which computer program instructions are stored.
Specifically, the processor 81 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 82 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 82 may include a Hard Disk Drive (Hard Disk Drive, abbreviated to HDD), a floppy Disk Drive, a Solid State Drive (SSD), flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 82 may include removable or non-removable (or fixed) media, where appropriate. The memory 82 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 82 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, Memory 82 includes Read-Only Memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), Electrically rewritable ROM (EAROM), or FLASH Memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a Static Random-Access Memory (SRAM) or a Dynamic Random-Access Memory (DRAM), where the DRAM may be a Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), an Extended data output Dynamic Random-Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), and the like.
The memory 82 may be used to store or cache various data files for processing and/or communication use, as well as possible computer program instructions executed by the processor 81.
The processor 81 implements any of the multi-turn dialog methods in the above embodiments by reading and executing computer program instructions stored in the memory 82.
In some of these embodiments, the computer device may also include a communication interface 83 and a bus 80. As shown in fig. 7, the processor 81, the memory 82, and the communication interface 83 are connected via the bus 80 to complete communication therebetween.
The communication interface 83 is used for implementing communication between modules, devices, units and/or equipment in the embodiment of the present application. The communication port 83 may also be implemented with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
Bus 80 includes hardware, software, or both to couple the components of the computer device to each other. Bus 80 includes, but is not limited to, at least one of the following: data Bus (Data Bus), Address Bus (Address Bus), Control Bus (Control Bus), Expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example, and not limitation, Bus 80 may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (FSB), a Hyper Transport (HT) Interconnect, an ISA (ISA) Bus, an InfiniBand (InfiniBand) Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a microchannel Architecture (MCA) Bus, a PCI (Peripheral Component Interconnect) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a Video Electronics Bus (audio Electronics Association), abbreviated VLB) bus or other suitable bus or a combination of two or more of these. Bus 80 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
In addition, in combination with the multi-turn dialog method in the above embodiments, the embodiments of the present application may provide a computer-readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the multi-turn dialog methods in the embodiments described above.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
In summary, the beneficial effects of the invention are that the invention provides a method for adding the historical entity and the historical relationship into the question-answering process of the current question, and completing multiple rounds of dialogue processes through the modes of rule filtering, similarity matching and the like. By the method, the history information obtained by the current question sentence can be ensured to be completely accurate and not lost, and meanwhile, the method does not depend on any marking data, has extremely low cost and can be applied to various fields. By acquiring all entities and relations of the last question in the knowledge question-answering system and adding all the entities and relations into the question-answering processes of the current question, generating candidate paths, screening the candidate paths and the like, the multi-turn conversation process is completed, the historical information of the last question is completely added into the current question-answering, the accuracy of historical information acquisition is guaranteed, and a large amount of labor cost is avoided. Meanwhile, the historical entity and the historical relationship of the answer path corresponding to the previous question are obtained in each question and answer, so that the whole knowledge question and answer system forms a loop, and multiple rounds of conversations can be carried out in infinite rounds.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for multiple rounds of dialogue in a knowledge question answering system, comprising:
s1: acquiring a historical entity and a historical relation of a current question;
s2: screening out candidate entities according to the current question sentence;
s3: weighting the characteristics of the candidate entities to obtain a main entity;
s4: forming a candidate path according to the adjacent relation of the main entity and the historical entity in a knowledge base and the adjacent entities;
s5: weighting the characteristics of the candidate path to obtain a final path;
s6: and obtaining an answer according to the final path and returning the answer to the user.
2. A multi-turn dialog method according to claim 1, characterized in that all entities and all relations of the final path are obtained as historical entities and historical relations of the next turn of question answering.
3. The multi-turn dialog method of claim 1, wherein the historical entities and historical relationships are all entities and all relationships of an answer path corresponding to a previous question in a question-and-answer system.
4. A multi-turn dialog method according to claim 1, characterised in that said step S2 comprises in particular the steps of:
s21: acquiring all continuous substrings of the current question string;
s22: and screening substrings which are identical in name with the knowledge base entity from all the continuous substrings to serve as candidate entities.
5. A multi-turn dialog method according to claim 1, characterised in that said step S3 comprises in particular the steps of:
s31: calculating features of each of the candidate entities;
s32: weighting and calculating the characteristics of each candidate entity according to the importance degree of the candidate entity to obtain the score of each candidate entity;
s33: and acquiring the candidate entity with the highest score as the main entity.
6. The multi-turn dialog method of claim 4, wherein in step S22, if none of the continuous substrings is selected as a candidate entity, a candidate path is formed directly according to the neighboring relationship of the historical entities in the knowledge base and the neighboring entities.
7. A multi-turn dialog method according to claim 1, characterised in that said step S5 comprises in particular the steps of:
s51: calculating the characteristics of each candidate path;
s52: weighting and calculating the characteristics of each candidate path according to the importance degree of the characteristics to obtain the score of each candidate path;
s53: and acquiring the candidate path with the highest score as a final path.
8. A multi-turn dialog device in a knowledge question answering system, comprising:
an acquisition module: acquiring a historical entity and a historical relation of a current question;
an entity linking module: screening out candidate entities according to the current question sentence;
an entity screening module: weighting the characteristics of the candidate entities to obtain a main entity;
a candidate path generation module: forming a candidate path according to the adjacent relation of the main entity and the historical entity in a knowledge base and the adjacent entities;
a path screening module: weighting the characteristics of the candidate path to obtain a final path;
an answer generation module: and obtaining an answer according to the final path and returning the answer to the user.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the multi-turn dialog method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of multi-turn dialogues according to one of claims 1 to 7.
CN202011110314.9A 2020-10-16 2020-10-16 Multi-turn dialogue method and device in knowledge question-answering system Pending CN112199473A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011110314.9A CN112199473A (en) 2020-10-16 2020-10-16 Multi-turn dialogue method and device in knowledge question-answering system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011110314.9A CN112199473A (en) 2020-10-16 2020-10-16 Multi-turn dialogue method and device in knowledge question-answering system

Publications (1)

Publication Number Publication Date
CN112199473A true CN112199473A (en) 2021-01-08

Family

ID=74010453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011110314.9A Pending CN112199473A (en) 2020-10-16 2020-10-16 Multi-turn dialogue method and device in knowledge question-answering system

Country Status (1)

Country Link
CN (1) CN112199473A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988994A (en) * 2021-03-04 2021-06-18 网易(杭州)网络有限公司 Conversation processing method and device and electronic equipment
CN113204628A (en) * 2021-05-17 2021-08-03 上海明略人工智能(集团)有限公司 Method and device for obtaining answers to question sentences, electronic equipment and readable storage medium
CN113342808A (en) * 2021-05-26 2021-09-03 电子科技大学 Knowledge graph inference engine architecture system based on electromechanical equipment
CN113468294A (en) * 2021-07-20 2021-10-01 上海明略人工智能(集团)有限公司 Method and device for question answering of ancient poems, electronic equipment and storage medium
CN113742470A (en) * 2021-09-07 2021-12-03 上海明略人工智能(集团)有限公司 Data retrieval method, system, electronic device and medium
CN113836314A (en) * 2021-09-18 2021-12-24 北京百度网讯科技有限公司 Knowledge graph construction method, device, equipment and storage medium
CN114757208A (en) * 2022-06-10 2022-07-15 荣耀终端有限公司 Question and answer matching method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549662A (en) * 2018-03-16 2018-09-18 北京云知声信息技术有限公司 The supplement digestion procedure and device of semantic analysis result in more wheel sessions
CN110837550A (en) * 2019-11-11 2020-02-25 中山大学 Knowledge graph-based question and answer method and device, electronic equipment and storage medium
CN111339781A (en) * 2020-02-10 2020-06-26 科大讯飞华南人工智能研究院(广州)有限公司 Intention recognition method and device, electronic equipment and storage medium
CN111414465A (en) * 2020-03-16 2020-07-14 北京明略软件系统有限公司 Processing method and device in question-answering system based on knowledge graph
CN111428483A (en) * 2020-03-31 2020-07-17 华为技术有限公司 Voice interaction method and device and terminal equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549662A (en) * 2018-03-16 2018-09-18 北京云知声信息技术有限公司 The supplement digestion procedure and device of semantic analysis result in more wheel sessions
CN110837550A (en) * 2019-11-11 2020-02-25 中山大学 Knowledge graph-based question and answer method and device, electronic equipment and storage medium
CN111339781A (en) * 2020-02-10 2020-06-26 科大讯飞华南人工智能研究院(广州)有限公司 Intention recognition method and device, electronic equipment and storage medium
CN111414465A (en) * 2020-03-16 2020-07-14 北京明略软件系统有限公司 Processing method and device in question-answering system based on knowledge graph
CN111428483A (en) * 2020-03-31 2020-07-17 华为技术有限公司 Voice interaction method and device and terminal equipment

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988994A (en) * 2021-03-04 2021-06-18 网易(杭州)网络有限公司 Conversation processing method and device and electronic equipment
CN113204628A (en) * 2021-05-17 2021-08-03 上海明略人工智能(集团)有限公司 Method and device for obtaining answers to question sentences, electronic equipment and readable storage medium
CN113342808A (en) * 2021-05-26 2021-09-03 电子科技大学 Knowledge graph inference engine architecture system based on electromechanical equipment
CN113342808B (en) * 2021-05-26 2022-11-08 电子科技大学 Knowledge graph inference engine architecture system based on electromechanical equipment
CN113468294A (en) * 2021-07-20 2021-10-01 上海明略人工智能(集团)有限公司 Method and device for question answering of ancient poems, electronic equipment and storage medium
CN113742470A (en) * 2021-09-07 2021-12-03 上海明略人工智能(集团)有限公司 Data retrieval method, system, electronic device and medium
CN113836314A (en) * 2021-09-18 2021-12-24 北京百度网讯科技有限公司 Knowledge graph construction method, device, equipment and storage medium
CN113836314B (en) * 2021-09-18 2024-04-19 北京百度网讯科技有限公司 Knowledge graph construction method, device, equipment and storage medium
CN114757208A (en) * 2022-06-10 2022-07-15 荣耀终端有限公司 Question and answer matching method and device
CN114757208B (en) * 2022-06-10 2022-10-21 荣耀终端有限公司 Question and answer matching method and device

Similar Documents

Publication Publication Date Title
CN112199473A (en) Multi-turn dialogue method and device in knowledge question-answering system
US11106714B2 (en) Summary generating apparatus, summary generating method and computer program
US11152007B2 (en) Method, and device for matching speech with text, and computer-readable storage medium
US11544474B2 (en) Generation of text from structured data
US20170351663A1 (en) Iterative alternating neural attention for machine reading
US11699275B2 (en) Method and system for visio-linguistic understanding using contextual language model reasoners
CN112287670A (en) Text error correction method, system, computer device and readable storage medium
US20200380286A1 (en) Automatic optical character recognition (ocr) correction
CN110222330B (en) Semantic recognition method and device, storage medium and computer equipment
CN112084789A (en) Text processing method, device, equipment and storage medium
CN111488742B (en) Method and device for translation
CN110929532B (en) Data processing method, device, equipment and storage medium
CN112632956A (en) Text matching method, device, terminal and storage medium
CN112579733A (en) Rule matching method, rule matching device, storage medium and electronic equipment
CN113742447B (en) Knowledge graph question-answering method, medium and equipment based on query path generation
US11880664B2 (en) Identifying and transforming text difficult to understand by user
KR20220073644A (en) Question answering system by using constraints and information provision method thereof
CN111428005A (en) Standard question and answer pair determining method and device and electronic equipment
CN111159339A (en) Text matching processing method and device
CN117289905B (en) Application software development method and device, storage medium and electronic equipment
US20240037337A1 (en) Method of training pos tagging model, computer-readable recording medium and pos tagging method
CN115879446B (en) Text processing method, deep learning model training method, device and equipment
EP4369245A1 (en) Enhanced named entity recognition (ner) using custom-built regular expression (regex) matcher and heuristic entity ruler
US20240126791A1 (en) Method and system for long-form answer extraction based on combination of sentence index generation techniques
US20230267286A1 (en) Translation model training method, translation method, apparatus, device, and storage medium

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