Knowledge-based problem-solving method, device, equipment, medium and product
By using the knowledge base-based problem processing method in the intelligent customer service question and answer system, the corresponding processing method is executed according to the problem type, and matching answers are obtained from the knowledge base, which solves the inefficiency and accuracy caused by relying on product category search in the existing technology. The problem of insufficient improvements in customer experience and corporate reputation.
Patent Information
- Application Number
- CN202110329818.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-26
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-03-26
AI Technical Summary
Existing intelligent customer service question and answer systems usually rely on product categories, which makes it time-consuming and laborious to identify customer problems and inaccurate search results, which affects customer experience and corporate reputation.
Through the problem-solving method based on the knowledge base, the problem classification model is used to determine the problem type, and the corresponding problem-solving method is executed, and the answer statements matching the input problem statements are obtained from the knowledge base, so as to avoid relying on product category searches.
It improves the accuracy of answers to questions, reduces the workload of customer service personnel, improves customer experience, and helps maintain corporate reputation and external image.
Smart Images

Figure CN112966089B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer application technology, and in particular to a problem processing method, device, equipment, medium and product based on a knowledge base. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] For enterprises, expanding the scope of services, fully meeting customer needs, and bringing greater profits to the company are important directions for current development. Creating a good corporate image of thoughtful service and efficient work in the minds of customers is the core goal pursued by enterprises. Customer service, as an effective means to enhance corporate reputation and maintain external image, exists in all walks of life. Since enterprises usually provide services to customers in the form of manual seats, the degree of customer service personnel's mastery of corporate knowledge directly determines the level of service, and then directly determines the customer's satisfaction with the service. Under the increasingly heavy customer service tasks, more and more companies realize the importance of forming a group of professional customer service teams. With the increasingly frequent iteration and update of business functions and the continuous expansion of business scope in the vertical and horizontal directions, it is difficult to provide timely and satisfactory customer service relying solely on manual power. Through the intelligent customer service question and answer system, combined with the establishment of a huge question and answer knowledge base to respond to consultations for various businesses, it came into being.
[0004] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the prior art: the current intelligent customer service question and answer system is usually divided according to product categories, that is, when identifying customer questions, customer service personnel need to guide customers to clarify the product name of the question, and then search for the answer corresponding to the question in the question and answer knowledge base based on the product name. This solution is not only time-consuming and labor-intensive, but also the search results are not accurate enough, which affects customer experience and damages the company's reputation and external image. Summary of the invention
[0005] In view of this, the present disclosure provides a knowledge base-based question processing method, apparatus, device, medium and program product. The question processing method executes corresponding question processing methods based on different question types to obtain answer statements matching the input question statements from the knowledge base, thereby avoiding the above-mentioned technical problems caused by searching for answer statements according to product categories.
[0006] In order to achieve the above objectives, one aspect of the present disclosure provides a knowledge base-based question processing method, which may include: in response to receiving an input question statement, obtaining a question classification model, wherein the question classification model is trained based on the knowledge data in the knowledge base; based on the question classification model, determining the question type of the input question statement, wherein different question types correspond to different question processing methods; based on the question processing method corresponding to the question type, obtaining an answer statement matching the input question statement from the knowledge base; and outputting the answer statement.
[0007] According to an embodiment of the present disclosure, the above-mentioned question processing method based on the corresponding question type may include obtaining an answer statement matching the input question statement from the knowledge base: in the case of determining that the question type is a comprehensive type, generating a first feature vector of the input question statement; extracting first entity information and first attribute information of the input question statement; based on the first entity information, obtaining a candidate entity set matching the first entity information from the knowledge base, wherein the candidate entity set includes multiple second entities; based on the second attribute information of the multiple second entities, determining a second feature vector of each second entity; based on the first feature vector and the second feature vector of each second entity, determining a similarity value between the input question statement and each second entity; and obtaining a second entity corresponding to the maximum similarity value from the knowledge base as an answer statement matching the input question statement.
[0008] According to an embodiment of the present disclosure, the above-mentioned obtaining a candidate entity set matching the above-mentioned first entity information from the above-mentioned knowledge base based on the above-mentioned first entity information may include: obtaining a path length threshold, wherein the above-mentioned path length threshold is used to characterize the maximum value of the path length between the above-mentioned first entity; based on the above-mentioned path length threshold, obtaining a candidate path whose path length between the above-mentioned first entity and the above-mentioned first entity does not exceed the above-mentioned path length threshold from the above-mentioned knowledge base; and taking multiple second entities covered by the above-mentioned candidate path as a candidate entity set matching the above-mentioned first entity.
[0009] According to an embodiment of the present disclosure, the above-mentioned question processing method based on the corresponding question type may include obtaining an answer statement matching the above-mentioned input question statement from the above-mentioned knowledge base: when determining that the above-mentioned question type is a common type, determining the graph database type of the above-mentioned knowledge base; converting the above-mentioned input question statement into a query statement matching the above-mentioned graph database type according to a preset conversion rule; and obtaining an answer statement matching the above-mentioned input question statement from the above-mentioned knowledge base based on the above-mentioned query statement.
[0010] According to an embodiment of the present disclosure, the above-mentioned conversion of the input question statement into a query statement matching the above-mentioned graph database type according to a preset conversion rule may include: when the above-mentioned general type is a question-and-answer type or a process type, extracting the third entity information of the above-mentioned input question statement; extracting the third attribute information associated with the above-mentioned third entity information; based on the above-mentioned third entity information, determining the fourth entity information in the above-mentioned knowledge base that is the same or similar to the above-mentioned third entity information; based on the above-mentioned third attribute information, determining the fourth attribute information in the above-mentioned knowledge base that is the same or similar to the above-mentioned third attribute information; and generating a query statement matching the above-mentioned graph database type based on the above-mentioned fourth entity information and the above-mentioned fourth attribute information.
[0011] According to an embodiment of the present disclosure, the third entity information corresponding to the above-mentioned question and answer type and the above-mentioned third attribute information may have at least the following corresponding relationship: one piece of third entity information; one piece of third entity information corresponds to one piece of third attribute information; one piece of third entity information corresponds to multiple pieces of third attribute information; multiple pieces of third entity information correspond to one piece of third attribute information.
[0012] According to an embodiment of the present disclosure, the above-mentioned obtaining an answer statement matching the above-mentioned input question statement from the above-mentioned knowledge base based on the above-mentioned query statement may include: in the case that the above-mentioned common type is a process type, obtaining an attribute list associated with the above-mentioned third entity information from the above-mentioned knowledge base, wherein the above-mentioned attribute list contains a plurality of attribute information executed in an orderly manner; based on the above-mentioned attribute list, determining the execution logic relationship among the attribute information corresponding to the above-mentioned query statement in the plurality of attribute information executed in the orderly manner; and based on the above-mentioned execution logic relationship, obtaining an answer statement matching the above-mentioned input question statement from the above-mentioned knowledge base.
[0013] According to an embodiment of the present disclosure, converting the input question statement into a query statement matching the graph database type according to a preset conversion rule may include: in the case where the common type is a comparison type, determining a subtype corresponding to the input question statement; extracting the fifth entity information, fifth attribute information and comparison condition information of the input question statement, wherein the comparison condition information is used to characterize the subtype; based on the fifth entity information, determining the sixth entity information in the knowledge base that is identical or similar to the fifth entity information; based on the fifth attribute information, determining the sixth attribute information in the knowledge base that is identical or similar to the fifth attribute information; and generating a query statement matching the graph database type based on the sixth entity information, the sixth attribute information and the comparison condition information.
[0014] According to an embodiment of the present disclosure, in the case where the above-mentioned subtypes include comparison subtypes, the above-mentioned comparison condition information may include comparison condition information corresponding to the above-mentioned comparison subtype, wherein the above-mentioned comparison subtype is used to indicate comparison of attributes of two types of entities; in the case where the above-mentioned subtypes include retrieval subtypes, the above-mentioned comparison condition information may include retrieval condition information corresponding to the above-mentioned retrieval subtype, wherein the above-mentioned retrieval subtype is used to indicate retrieval of entities satisfying the above-mentioned retrieval condition information; in the case where the above-mentioned subtypes include induction subtypes, the above-mentioned comparison condition information may include induction condition information corresponding to the above-mentioned induction subtype, wherein the above-mentioned induction subtype is used to indicate the maximum value of the query attribute.
[0015] According to an embodiment of the present disclosure, the above method may also include: selecting training sample data from the above knowledge base according to preset rules, wherein the above training sample data includes labeled data of question types; obtaining an initial question classification model; and based on the above training sample data, performing deep neural network training on the above initial question classification model to generate the above question classification model.
[0016] In order to achieve the above-mentioned objectives, another aspect of the present disclosure provides a knowledge base-based question processing device, which is applied to an intelligent question and answer system, wherein the intelligent question and answer system can respond to input information and provide feedback information, and may include: a classification model acquisition module, which is used to obtain a question classification model in response to receiving an input question statement, wherein the question classification model is trained based on the knowledge data in the knowledge base; a question type determination module, which is used to determine the question type of the input question statement based on the question classification model, wherein different question types correspond to different question processing methods; an answer statement acquisition module, which is used to obtain an answer statement matching the input question statement from the knowledge base based on the question processing method corresponding to the question type; and an answer statement output module, which is used to output the answer statement.
[0017] According to an embodiment of the present disclosure, the above-mentioned answer sentence acquisition module may include: a generation submodule, which is used to generate a first feature vector of the above-mentioned input question sentence when it is determined that the above-mentioned question type is a comprehensive type; a first extraction submodule, which is used to extract the first entity information and the first attribute information of the above-mentioned input question sentence; a first acquisition submodule, which is used to obtain a candidate entity set matching the above-mentioned first entity information from the above-mentioned knowledge base based on the above-mentioned first entity information, wherein the above-mentioned candidate entity set includes multiple second entities; a first determination submodule, which is used to determine the second feature vector of each second entity based on the second attribute information of the above-mentioned multiple second entities; a second determination submodule, which is used to determine the similarity value between the above-mentioned input question sentence and each of the above-mentioned second entities based on the above-mentioned first feature vector and the second feature vector of each of the above-mentioned second entities; and a second acquisition submodule, which is used to obtain the second entity corresponding to the maximum similarity value from the above-mentioned knowledge base as the answer sentence matching the above-mentioned input question sentence.
[0018] According to an embodiment of the present disclosure, the above-mentioned first obtaining submodule may include: a first obtaining unit, used to obtain a path length threshold, wherein the above-mentioned path length threshold is used to characterize the maximum value of the path length between the above-mentioned first entity; a second obtaining unit, used to obtain, from the above-mentioned knowledge base, a candidate path whose path length between the above-mentioned first entity does not exceed the above-mentioned path length threshold based on the above-mentioned path length threshold; and a first processing unit, used to take the multiple second entities covered by the above-mentioned candidate path as a candidate entity set matching the above-mentioned first entity.
[0019] According to an embodiment of the present disclosure, the above-mentioned answer statement acquisition module may include: a third determination sub-module, used to determine the graph database type of the above-mentioned knowledge base when it is determined that the above-mentioned question type is a common type; a first conversion sub-module, used to convert the above-mentioned input question statement into a query statement matching the above-mentioned graph database type according to a preset conversion rule; and a third acquisition sub-module, used to obtain an answer statement matching the above-mentioned input question statement from the above-mentioned knowledge base based on the above-mentioned query statement.
[0020] According to an embodiment of the present disclosure, the above-mentioned first conversion submodule may include: a first extraction unit, used to extract the third entity information of the above-mentioned input question statement when the above-mentioned general type is a question-and-answer type or a process type; a second extraction unit, used to extract the third attribute information associated with the above-mentioned third entity information; a first determination unit, used to determine the fourth entity information in the above-mentioned knowledge base that is the same or similar to the above-mentioned third entity information based on the above-mentioned third entity information; a second determination unit, used to determine the fourth attribute information in the above-mentioned knowledge base that is the same or similar to the above-mentioned third attribute information based on the above-mentioned third attribute information; and a first generation unit, used to generate a query statement matching the above-mentioned graph database type based on the above-mentioned fourth entity information and the above-mentioned fourth attribute information.
[0021] According to an embodiment of the present disclosure, the third entity information corresponding to the above-mentioned question and answer type and the above-mentioned third attribute information may have at least the following corresponding relationship: one piece of third entity information; one piece of third entity information corresponds to one piece of third attribute information; one piece of third entity information corresponds to multiple pieces of third attribute information; multiple pieces of third entity information correspond to one piece of third attribute information.
[0022] According to an embodiment of the present disclosure, the above-mentioned answer statement acquisition module may include: a fourth acquisition sub-module, used to obtain a list of attributes associated with the above-mentioned third entity information from the above-mentioned knowledge base when the above-mentioned general type is a process type, wherein the above-mentioned attribute list contains multiple attribute information executed in order; a fourth determination sub-module, used to determine the execution logic relationship of the attribute information corresponding to the above-mentioned query statement among the multiple attribute information executed in order based on the above-mentioned attribute list; and a fifth acquisition sub-module, used to obtain an answer statement matching the above-mentioned input question statement from the above-mentioned knowledge base based on the above-mentioned execution logic relationship.
[0023] According to an embodiment of the present disclosure, the above-mentioned first conversion submodule may include: a third determination unit, used to determine the subtype corresponding to the above-mentioned input question statement when the above-mentioned common type is a comparison type; a third extraction unit, used to extract the fifth entity information, fifth attribute information and comparison condition information of the above-mentioned input question statement, wherein the above-mentioned comparison condition information is used to characterize the above-mentioned subtype; a fourth determination unit, used to determine the sixth entity information in the above-mentioned knowledge base that is the same or similar to the above-mentioned fifth entity information based on the above-mentioned fifth entity information; a fifth determination unit, used to determine the sixth attribute information in the above-mentioned knowledge base that is the same or similar to the above-mentioned fifth attribute information based on the above-mentioned fifth attribute information; and a second generation unit, used to generate a query statement matching the above-mentioned graph database type based on the above-mentioned sixth entity information, the above-mentioned sixth attribute information and the above-mentioned comparison condition information.
[0024] According to an embodiment of the present disclosure, in the case where the above-mentioned subtypes include comparison subtypes, the above-mentioned comparison condition information may include comparison condition information corresponding to the above-mentioned comparison subtype, wherein the above-mentioned comparison subtype is used to indicate comparison of attributes of two types of entities; in the case where the above-mentioned subtypes include retrieval subtypes, the above-mentioned comparison condition information may include retrieval condition information corresponding to the above-mentioned retrieval subtype, wherein the above-mentioned retrieval subtype is used to indicate retrieval of entities satisfying the above-mentioned retrieval condition information; in the case where the above-mentioned subtypes may include induction subtypes, the above-mentioned comparison condition information includes induction condition information corresponding to the above-mentioned induction subtype, wherein the above-mentioned induction subtype is used to indicate the maximum value of the query attribute.
[0025] According to an embodiment of the present disclosure, the above-mentioned device may also include: a training sample selection module, used to select training sample data from the above-mentioned knowledge base according to preset rules, wherein the above-mentioned training sample data includes labeled data of the question type; an initial model acquisition module, used to obtain an initial question classification model; and a classification model generation module, used to perform deep neural network training on the above-mentioned initial question classification model based on the above-mentioned training sample data to generate the above-mentioned question classification model.
[0026] In order to achieve the above objectives, another aspect of the present disclosure provides an electronic device, including: one or more processors, and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the knowledge base-based problem processing method as described above.
[0027] In order to achieve the above objectives, another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the problem processing method based on the knowledge base as described above when executed.
[0028] In order to achieve the above objective, another aspect of the present disclosure provides a computer program, wherein the computer program includes computer executable instructions, and when the instructions are executed, they are used to implement the problem processing method based on the knowledge base as described above.
[0029] According to an embodiment of the present disclosure, a question classification model obtained by training based on knowledge data in a knowledge base is used to determine the question type corresponding to an input question statement. Different question types correspond to different question processing methods, and a question processing method corresponding to the question type is determined to obtain an answer statement matching the input question statement from the knowledge base as feedback information output for the input question statement. This can at least partially avoid the above-mentioned technical problem caused by searching for answer statements according to product categories, and therefore can achieve the technical effect of executing corresponding question processing methods based on different question types to obtain an answer statement matching the input question statement from the knowledge base, saving time and effort, and improving the accuracy of searching for answers, thereby enhancing customer experience and helping to maintain corporate reputation and external image. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0031] Figure 1 The system architecture of the problem processing method and device based on the knowledge base applicable to the embodiment of the present disclosure is schematically shown;
[0032] Figure 2 The knowledge graph of the problem processing method and device based on the knowledge base applicable to the embodiment of the present disclosure is schematically shown;
[0033] Figure 3 A flowchart of a problem processing method based on a knowledge base according to an embodiment of the present disclosure is schematically shown;
[0034] Figure 4 A flowchart of a problem processing method based on a knowledge base according to another embodiment of the present disclosure is schematically shown;
[0035] Figure 5 A flowchart of a problem processing method based on a knowledge base according to another embodiment of the present disclosure is schematically shown;
[0036] Figure 6 A flowchart of a problem processing method based on a knowledge base according to another embodiment of the present disclosure is schematically shown;
[0037] Figure 7 A flowchart of a problem processing method based on a knowledge base according to another embodiment of the present disclosure is schematically shown;
[0038] Figure 8 A block diagram of a knowledge base-based problem processing device according to an embodiment of the present disclosure is schematically shown;
[0039] Fig. 9 Schematically shows a block diagram of a knowledge base-based problem processing device according to another embodiment of the present disclosure;
[0040] Fig.10 A schematic diagram schematically shows a computer-readable storage medium product suitable for implementing the knowledge base-based problem processing method described above according to an embodiment of the present disclosure; and
[0041] Fig.11 A block diagram of an electronic device suitable for implementing the above-described knowledge base-based problem processing method according to an embodiment of the present disclosure is schematically shown.
[0042] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0043] It should be noted that the drawings are not drawn to scale and that for illustrative purposes, elements of similar structure or function are generally represented by like reference numerals throughout the drawings. DETAILED DESCRIPTION
[0044] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0045] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of the above-mentioned features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components. All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0046] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0047] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some boxes or combinations thereof in the block diagrams and / or flow charts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable knowledge-based problem processing device, so that these instructions can create a device for implementing the functions / operations described in these block diagrams and / or flow charts when executed by the processor. The technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer program product on a computer-readable storage medium storing instructions, which can be used by an instruction execution system or in combination with an instruction execution system.
[0048] In the related technology, the current customer service assistance system is usually divided according to product categories. When identifying customer problems, customer service personnel need to guide customers to clarify the product name and then search based on the product name. This is not only time-consuming and labor-intensive, but the search results are not accurate enough.
[0049] To this end, the present disclosure provides a method for question processing based on a knowledge base, which is applied to an intelligent question-answering system, and the intelligent question-answering system can respond to input information and provide feedback information. The method includes a question type determination stage and an answer statement matching stage. In the question type determination stage, first, in response to receiving an input question statement, a question classification model is obtained, and the question classification model is obtained based on pre-training of knowledge data in the knowledge base. Then, based on the question classification model, the question type of the input question statement is determined, and different question types correspond to different question processing methods. In the answer statement matching stage, first, based on the question processing method corresponding to the question type, an answer statement matching the input question statement is obtained from the knowledge base, and then the answer statement is output.
[0050] According to an embodiment of the present disclosure, a question classification model obtained by training based on knowledge data in a knowledge base is used to determine the question type corresponding to an input question statement. Different question types correspond to different question processing methods, and a question processing method corresponding to the question type is determined to obtain an answer statement matching the input question statement from the knowledge base as feedback information output for the input question statement. This can at least partially avoid the above-mentioned technical problem caused by searching for answer statements according to product categories, and therefore can achieve the technical effect of executing corresponding question processing methods based on different question types to obtain an answer statement matching the input question statement from the knowledge base, saving time and effort, and improving the accuracy of searching for answers, thereby enhancing customer experience and helping to maintain corporate reputation and external image.
[0051] It should be noted that the problem handling method and problem handling device based on the knowledge base provided by the present disclosure can be used in the customer service system in the financial field, and can also be used in the customer service system in any field other than the financial field. Therefore, the application field of the problem handling method and problem handling device based on the knowledge base provided by the present disclosure is not specifically limited.
[0052] Figure 1 The system architecture of the knowledge base-based problem processing method and device applicable to the embodiment of the present disclosure is schematically shown. It should be noted that Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0053] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0054] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as telephone banking applications, mobile banking applications, online banking applications, SMS banking applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0055] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0056] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as entity information or data in the knowledge base obtained or generated according to the user request) to the terminal device.
[0057] It should be noted that the problem handling method based on the knowledge base provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the problem handling device based on the knowledge base provided in the embodiment of the present disclosure can generally be set in the server 105. The problem handling method based on the knowledge base provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the problem handling device based on the knowledge base provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0058] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0059] Figure 2 The knowledge graph of the problem-solving method and device based on the knowledge base applicable to the embodiment of the present disclosure is schematically shown. The knowledge graph describes the entities in the objective world and the relationships between the entities in a structured form composed of nodes and edges, thereby expressing the information on the Internet in a form closer to the human cognitive world, providing a better ability to organize, manage and understand the massive information on the Internet.
[0060] like Figure 2 As shown, the knowledge graph 200 describes bank products and the relationships between them. The entity is a demand deposit 210, and entities associated with the demand deposit 210 may include bank branches 220, ATMs 230, self-service terminals 240, online banking 250, personal telephone banking 260, and iPhone mobile banking 270.
[0061] It should be noted that the entity of demand deposit 210 may also include several attributes, such as deposit interest rate, service channel, business introduction and operation guide. These several attributes can also be understood as special entities, and the relationship between entities and attributes can also be understood as a special type of relationship. The problem handling method based on the knowledge base provided in the present disclosure is used to store entity information and attribute information related to the knowledge graph. The customer accesses through the customer service channel, which may include but is not limited to telephone banking, mobile banking, online banking and SMS banking. The customer service channel can first access the intelligent seat, and then connect to the intelligent question and answer system (also known as the intelligent customer service question and answer system), intelligently identify the user's questions, search for answer statements that match the input question statements from the knowledge base, and return the searched answer statement results, which can quickly give accurate answers, greatly improve the quality of service, reduce the pressure on customer service personnel, and reduce the cost of enterprise operation. The management technology of the knowledge graph may include but is not limited to Neo4j, TigerGraph, and Amazon Neptune, which is not limited in the present disclosure.
[0062] It should be understood that Figure 2 The number of entities and the relationship between entities in the knowledge graph are only illustrative. According to the implementation requirements of the customer service system, a corresponding number of entities and the relationship between entities can be constructed, and this disclosure does not limit this.
[0063] Figure 3 The flowchart of the problem processing method based on the knowledge base according to the embodiment of the present disclosure is schematically shown. Figure 3 As shown, the question processing method 300 can be applied to an intelligent question answering system, which can respond to input information and provide feedback information. The question processing method 300 can include operations S310 to S340.
[0064] In operation S310, in response to receiving an input question sentence, a question classification model is obtained.
[0065] According to the embodiment of the present disclosure, after receiving the query request from the user, the customer service channel first connects to the intelligent agent and connects to the intelligent question-answering system. The input question statement can be the text of the query question entered by the user through the customer service channel, or can be the question statement entered directly. For non-text input, it needs to be uniformly converted by the intelligent agent. The focus of the present disclosure is on the processing of the question statement, and the processing of the customer service channel is not described in detail.
[0066] As an optional embodiment, the received input question sentence may also be cleaned, which may include but is not limited to noise cleaning and knowledge fusion.
[0067] In operation S320 , a question type of the input question sentence is determined based on the question classification model.
[0068] According to an embodiment of the present disclosure, the question classification model is obtained by pre-training based on knowledge data in a knowledge base, and different question types correspond to different problem processing methods.
[0069] In operation S330, based on a question processing method corresponding to the question type, an answer sentence matching the input question sentence is obtained from a knowledge base.
[0070] In operation S340, an answer sentence is output.
[0071] According to the embodiment of the present disclosure, the answer statement obtained that matches the input question statement is also returned and output through conversion. Corresponding to the input question statement, the answer statement can be the text of the searched answer output by the intelligent question-answering system. For non-text answers, it is necessary to perform unified conversion by the intelligent agent.
[0072] Through the embodiments of the present disclosure, a question classification model obtained by training based on the knowledge data in the knowledge base is used to determine the question type corresponding to the input question statement. Different question types correspond to different question processing methods, and the question processing method corresponding to the question type is determined to obtain an answer statement matching the input question statement from the knowledge base as feedback information output for the input question statement. This can at least partially avoid the above-mentioned technical problems caused by searching for answer statements according to product categories, and therefore can achieve the technical effect of executing corresponding question processing methods based on different question types to obtain answer statements matching the input question statement from the knowledge base, saving time and effort and improving the accuracy of searching for answers to questions, thereby improving the user's customer service experience and helping to maintain the company's reputation and external image.
[0073] The following will take the question types, subtypes and corresponding specific examples shown in Table 1 as examples to explain in detail the question processing method provided by the present disclosure. Specifically, several embodiments of the present disclosure based on the question processing method corresponding to the question type to obtain answer statements matching the input question statement from the knowledge base will be described in detail.
[0074] Table 1
[0075]
[0076] It is understandable that question-and-answer, comparison, and process-based questions are relatively common customer service question types, accounting for more than 85% of the question-and-answer knowledge base. The subtypes in Table 1 are used to help understand the problem and have no substantial impact on the subsequent problem handling methods.
[0077] As shown in Table 1, the example corresponding to the comprehensive subtype in the comprehensive question type is "When logging in or operating ICBC corporate online banking, a password box often pops up and requires password input. How to solve it?" The question types contained in it are relatively complex and do not target a specific type of problem.
[0078] As an optional embodiment, based on a question processing method corresponding to the question type, obtaining an answer statement matching an input question statement from a knowledge base may include: generating a first feature vector of the input question statement when determining that the question type is a comprehensive type; extracting first entity information and first attribute information of the input question statement; based on the first entity information, obtaining a candidate entity set matching the first entity information from the knowledge base, wherein the candidate entity set includes multiple second entities; based on the second attribute information of the multiple second entities, determining a second feature vector for each second entity; based on the first feature vector and the second feature vector of each second entity, determining a similarity value between the input question statement and each second entity; and obtaining a second entity corresponding to the maximum similarity value from the knowledge base as an answer statement matching the input question statement.
[0079] In view of the problem-solving method for comprehensive problems, the present disclosure provides a TF-IDF similarity judgment model for calculating the similarity between texts based on a knowledge graph to perform similarity calculation. The model establishes a TF-IDF vector representing its characteristics for each entity. TF refers to term frequency, which is used to indicate the frequency of a term appearing in a document. The more frequently a term appears in a document, the more important it is to the article. IDF refers to inverse document frequency, which is the inverse of the number of times a term appears in the entire corpus. IDF indicates that the more documents a term appears in, the lower its degree of distinguishing the corpus. In the present disclosure, by calculating the vector similarity between the first feature vector of the input question sentence and the second feature vector of each entity in the candidate entity set, the entity with the highest similarity value is returned as an answer that is similar to the input question sentence. The relationship between entities and entities contained in the knowledge graph composed of multiple second entities in the candidate entity set is called a subgraph.
[0080] As an optional embodiment, based on the first entity information, obtaining a candidate entity set that matches the first entity information from a knowledge base may include: obtaining a path length threshold, wherein the path length threshold is used to characterize the maximum value of the path length between the first entity and the first entity; based on the path length threshold, obtaining a candidate path from the knowledge base whose path length between the first entity and the first entity does not exceed the path length threshold; and taking multiple second entities covered by the candidate path as a candidate entity set that matches the first entity.
[0081] According to the embodiment of the present disclosure, when calculating the second feature vector of an entity in a knowledge base, not only the attributes of the entity are calculated, but also the attributes of the N-hop (N≥1) entities associated with the entity are included in the feature representation range. Figure 2 For example, if N=2 is set, the second eigenvector of "current deposit 210" is calculated by the attributes of this node and the attributes of the six nodes associated with it, namely, bank branch 220, ATM 230, self-service terminal 240, online banking 250, personal telephone banking 260 and iPhone mobile banking 270.
[0082] In specific implementation, the TF-IDF similarity judgment model obtains the subgraph of the target node corresponding to the second entity as: g i ={n j :p i,j ≤N}.
[0083] Where node n i The subgraph g i For node n i The shortest path of g is no more than N nodes, where N ≥ 1. If N = 1, then g i =n i . So the corresponding node n i Documentation i It can be represented as a set of attributes of nodes in the subgraph gi.
[0084] Therefore, the word t i The term frequency (tf) at node j can be expressed as:
[0085]
[0086] The idf of a particular word i It can be expressed as:
[0087]
[0088] The numerator represents the total number of nodes in the corpus, and the denominator represents the number of nodes containing the word t i The number of subgraphs.
[0089] This paper proposes a TF-IDF calculation method based on knowledge graph, which calculates the feature vector of each entity in the knowledge graph based on the N-hop relationship and attributes of the entity association. In the calculation result, the entity node corresponding to the input question sentence is used as the index, which can quickly filter out the candidate entity set and greatly improve the efficiency of retrieval.
[0090] It should be noted that the above-mentioned TF-IDF calculation method is a general similarity evaluation method based on the knowledge graph, and the TF-IDF optimization algorithm is also applicable, such as adding factors such as word frequency, part of speech, and order, etc., which is not limited in this disclosure.
[0091] Figure 4 The flowchart of the problem handling method based on the knowledge base according to another embodiment of the present disclosure is schematically shown. Figure 4 As shown, the question processing method 400 can be applied to an intelligent question answering system, and the intelligent question answering system can respond to input information and provide feedback information. The question processing method 400 can include operations S410 to S480.
[0092] In the specific implementation, first input the question statement (operation S410); then generate a word vector (operation S420), which can be the first feature vector of the input question statement when the question type is a comprehensive type; then extract the entity (operation S430); then the candidate entity set (operation S440), which can be a candidate entity set matching the first entity information obtained from the knowledge base based on the first entity information, including multiple second entities; then calculate the cosine similarity between the word vector and the second feature vector of the candidate entity (operation S450). For each entity in the candidate entity, generate a segmentation (operation S460), then perform segmentation preprocessing (operation S470), and train the TF-IDF model (operation S480) to obtain the TF-IDF model.
[0093] Through the embodiments of the present disclosure, the TF / IDF model is obtained through pre-training. For the input query, in addition to generating the query word vector, a candidate entity list of the graph is obtained through the entity query in the query. In the candidate list, the similarity between the query word vector and the entity feature vector is further calculated, and the entity with the highest query result score is returned as the candidate answer.
[0094] As an optional embodiment, based on a question processing method corresponding to the question type, obtaining an answer statement that matches the input question statement from a knowledge base may include: when determining that the question type is a common type, determining the graph database type of the knowledge base; converting the input question statement into a query statement that matches the graph database type according to preset conversion rules; and obtaining an answer statement that matches the input question statement from the knowledge base based on the query statement.
[0095] According to the embodiments of the present disclosure, it is converted into a knowledge graph query through preset conversion rules. Based on the preset conversion rules, the input question statement can be converted into a query statement corresponding to any graph database. For the sake of convenience, the present disclosure will take the query statement Cypher matching the graph database type Neo4j as an example for detailed explanation.
[0096] Through the embodiments of the present disclosure, problems are classified through machine learning methods, the essential characteristics of various types of problems are summarized, and the natural language of the input problem statement is converted into the query language corresponding to the graph database, so that the problem processing method has strong universality and can be applied to various graph databases that are currently widely used.
[0097] Figure 5 The flowchart of the problem handling method based on the knowledge base according to another embodiment of the present disclosure is schematically shown. Figure 5 As shown, the question processing method 500 can be applied to an intelligent question answering system, which can respond to input information and provide feedback information, and can include operations S510 to S540.
[0098] In specific implementation, a question statement is first input (operation S510), followed by element extraction (operation S520), then category extraction (operation S530), and finally graph retrieval (operation S540) is performed to obtain an answer statement matching the input question statement from the knowledge base.
[0099] As an optional embodiment, the element extraction (operation S520 ) may include entity extraction and relationship (attribute) extraction.
[0100] As an optional embodiment, after the category extraction (operation S530), according to the quantitative relationship between entities and relationships (or attributes), the third entity information and the third attribute information corresponding to the question-answer type may have at least the following corresponding relationship: a piece of third entity information (i.e., a single entity query, corresponding Figure 5 Entity 1:0 relationship shown in ); a third entity information corresponds to a third attribute information (i.e., entity relationship query, corresponding Figure 5 ); one third entity information corresponds to multiple third attribute information (i.e. single entity multiple relationship query, corresponding Figure 5 ”Entity 1: N relationship” shown in ); multiple third entity information corresponds to one third attribute information (i.e., multi-entity single relationship query, corresponding Figure 5 It is understandable that the "entity 0:1 relationship" and "entity N:M relationship" do not conform to the actual scenario, and this disclosure will not discuss this.
[0101] The following will take the question type shown in Table 1 as question-answer type, and the subtypes of single entity query, entity relationship query, single entity multi-relationship query, and multi-entity single relationship query as an example to illustrate several implementation methods of converting input question statements into query statements that match the graph database type according to preset conversion rules.
[0102] As an optional embodiment, according to preset conversion rules, converting the input question statement into a query statement matching the graph database type may include: when the common type is a question-and-answer type or a process type, extracting the third entity information of the input question statement; extracting the third attribute information associated with the third entity information; based on the third entity information, determining the fourth entity information in the knowledge base that is the same or similar to the third entity information; based on the third attribute information, determining the fourth attribute information in the knowledge base that is the same or similar to the third attribute information; and generating a query statement matching the graph database type based on the fourth entity information and the fourth attribute information.
[0103] According to the embodiments of the present disclosure, in addition to noise cleaning and knowledge fusion of the input question statement, the key is to extract information from the input question statement, judge the subcategory of the question by the number of entities and relationships (attributes) in the question, and convert it into a graph query language based on a general preset conversion rule. The extracted information may include but is not limited to entity extraction, attribute extraction, and relationship extraction. The general preset conversion rules may be to extract entity objects from the query conditions corresponding to the input question statement, and to extract query attributes or relationships from the return results of the entity object extraction. There are also many entity extraction technologies in the related art. The present disclosure adopts the Python Chinese word segmentation component "jieba". Based on the industry financial vocabulary, parts of speech and classification can be accurately identified. Through the judgment of parts of speech and classification, the categories in entities, attributes and relationships can be further determined.
[0104] As shown in Table 1, the example corresponding to the subtype of a single entity query in the question-answering question type is "What is a demand deposit?" In specific implementation, the entity "demand deposit" can be extracted through word segmentation. The query statement generated by converting it to match the graph database type can be described as follows, where name corresponds to the entity name, and can also be represented by other symbols.
[0105] MATCH(n)
[0106] WHERE n.name = "Current Deposit"
[0107] RETURN
[0108] It should be noted that single-entity queries can also be optimized to return the descriptive attributes of the entity, which depends on the specific design structure of the knowledge graph.
[0109] As shown in Table 1, the example corresponding to the subtype of entity relationship query in the question-answering question type is "What is the issuing co-branded unit of Mudan Yatai Card?" In specific implementation, the entity "Mudan Yatai Card" and the attribute "issuing co-branded unit" can be extracted through word segmentation, and the query statement generated by converting it to match the graph database type can be described as follows:
[0110] MATCH(n)
[0111] WHERE n.name = "Mudan Yatai Card"
[0112] RETURN n."Issuing joint unit"
[0113] As shown in Table 1, the example corresponding to the subtype of multi-entity single-relation query in the question-answering question type is "What are the issuing joint units of CYTS Card and Mudan Yatai Card?" In specific implementation, the entities "CYTS Card" and "Mudan Yatai Card" can be extracted through word segmentation, and the attribute is "issuing joint unit". The query statement generated by converting it to match the graph database type can be described as follows:
[0114] MATCH(n)
[0115] WHERE n.name IN ["Mudan Yatai Card","CYTS Card"]
[0116] RETURN n. "Issuing joint unit"
[0117] As shown in Table 1, the example corresponding to the subtype of single-entity multi-relation query in the question-answering question type is "What are the limits and fees for money transfer?" In specific implementation, the entity "money transfer" can be extracted through word segmentation, and the attributes are "limit" and "fee". The query statement generated by converting it to match the graph database type can be described as follows:
[0118] MATCH(n)
[0119] WHERE n.name=”Remittance”
[0120] RETURN n."Limit",n."Handling fee"
[0121] It is understandable that question-and-answer question types mainly deal with relatively basic condition queries. In actual matching, methods such as synonym replacement and fuzzy matching are usually required to improve the robustness of the result matching.
[0122] Through the embodiments of the present disclosure, based on preset conversion rules, the input question statement is converted into a query statement that matches the graph database type, which can summarize the key characteristics of each question-and-answer type question, greatly improve the accuracy of the answer to the question, reduce the pressure on customer service personnel, and reduce the operating costs of corporate customer service.
[0123] The following will take the question type shown in Table 1 as process type, the subtype as ordinary process and sequential processing as an example to illustrate an embodiment of obtaining an answer statement matching an input question statement from a knowledge base.
[0124] Figure 6 The flowchart of the problem handling method based on the knowledge base according to another embodiment of the present disclosure is schematically shown. Figure 6 As shown, the question processing method 600 can be applied to an intelligent question-answering system, which can respond to input information and provide feedback information, and can include operations S610 to S640. In specific implementation, first input a question statement (operation S610), then use the classifier 610 to extract attribute relationships (operation S620), the extracted attribute relationships can include a sequence class 620 and a preceding and following class 630, then extract entities (operation S630), and finally perform a graph search (operation S640) to obtain an answer statement matching the input question statement from the knowledge base.
[0125] As an optional embodiment, based on the query statement, obtaining an answer statement that matches the input question statement from the knowledge base may include: when the common type is a process type, obtaining an attribute list associated with the third entity information from the knowledge base, wherein the attribute list contains multiple attribute information executed in an orderly manner; based on the attribute list, determining the execution logic relationship among the attribute information corresponding to the query statement in the multiple attribute information executed in an orderly manner; and based on the execution logic relationship, obtaining an answer statement that matches the input question statement from the knowledge base.
[0126] In specific implementation, the problem handling method of the general process subtype is similar to the question-answering type. The difference is that the problem handling method of the general process subtype needs to assemble the execution results of each process in chronological order. Whether this type is classified as a process type depends on the organization of the knowledge graph. For the problem handling method of the sequential subtype, it is mainly necessary to judge the logical relationship of the extracted predicates. Specifically, you can give priority to obtaining a list of entity correspondences or attributes, judge the current position by the similarity of the process content, and extract the target result based on the logical predicate.
[0127] Figure 7 The flowchart of the problem handling method based on the knowledge base according to another embodiment of the present disclosure is schematically shown. Figure 7As shown, the question processing method 700 can be applied to an intelligent question answering system, which can respond to input information and provide feedback information, and can include operations S710 to S760.
[0128] In a specific implementation, a question statement is first input (operation S710), then a first comparison entity is extracted (operation S720), a comparison relationship (attribute) is extracted (operation S730), which may include but is not limited to attribute information corresponding to a comparison subtype, attribute information corresponding to a retrieval subtype, and attribute information corresponding to an induction subtype, a comparison predicate is extracted (operation S740), and the comparison predicate may include but is not limited to comparison condition information, retrieval condition information, and induction condition information, a second comparison entity is extracted (operation S750), and finally a graph search is performed (operation S760) to obtain an answer statement matching the input question statement from the knowledge base.
[0129] The following will take the question type shown in Table 1 as a comparison type, and the subtypes of comparison type, retrieval type and induction type as an example to illustrate an implementation method of converting an input question statement into a query statement matching the graph database type according to a preset conversion rule.
[0130] As an optional embodiment, according to preset conversion rules, converting the input question statement into a query statement matching the graph database type includes: when the common type is a comparison type, determining the subtype corresponding to the input question statement; extracting the fifth entity information, fifth attribute information and comparison condition information of the input question statement, wherein the comparison condition information is used to characterize the subtype; based on the fifth entity information, determining the sixth entity information in the knowledge base that is the same or similar to the fifth entity information; based on the fifth attribute information, determining the sixth attribute information in the knowledge base that is the same or similar to the fifth attribute information; and generating a query statement matching the graph database type based on the sixth entity information, the sixth attribute information and the comparison condition information.
[0131] According to the embodiments of the present disclosure, the comparison type includes three types of sub-problem classifications, namely, comparison type, retrieval type and induction type. The comparison type indicates comparing two types of entity attributes (relationships), the retrieval type indicates querying a candidate set that satisfies the comparison conditions, and the induction type indicates a maximum value query, such as the highest value, the lowest value, the maximum value, and the minimum value. The key to processing comparison type problems lies in extracting entities, query conditions and comparison conditions.
[0132] As an optional embodiment, when the subtype includes a comparison subtype, the comparison condition information includes comparison condition information corresponding to the comparison subtype, wherein the comparison subtype is used to indicate comparison of attributes of two types of entities; when the subtype includes a retrieval subtype, the comparison condition information includes retrieval condition information corresponding to the retrieval subtype, wherein the retrieval subtype is used to indicate retrieval of entities that satisfy the retrieval condition information; when the subtype includes an induction subtype, the comparison condition information includes induction condition information corresponding to the induction subtype, wherein the induction subtype is used to indicate the maximum value of the query attribute.
[0133] As shown in Table 1, the example corresponding to the comparison subtype in the comparison question type is "How much higher is the interest rate of a 2-year deposit term lump sum deposit than that of a 1-year deposit term lump sum deposit?" In specific implementation, the comparison entity information can be analyzed and extracted as "lump sum deposit", the attribute information is "2-year term" and "1-year term", and the comparison condition information is the interest rate. The query statement generated by converting it and matching the graph database type can be described as follows:
[0134] MATCH(n{name:"Lump-sum deposit and withdrawal","Deposit term":2}),
[0135] (m{name:"Lump-sum deposit and withdrawal","Deposit term":1})
[0136] RETURN n."interest rate" - m."interest rate"
[0137] As shown in Table 1, the example corresponding to the search subtype in the comparison question type is "The interest rate of notice deposit products is lower than 1.25%?". In specific implementation, the search entity information can be analyzed and extracted as "notice deposit", the attribute information is "product interest rate", and the search condition information is 1.25%. The query statement generated by converting it and matching the graph database type can be described as follows:
[0138] MATCH(n)
[0139] WHERE n.name=”Notice Deposit” AND n.”Product Rate”<”1.25%”
[0140] RETURN
[0141] As shown in Table 1, the example corresponding to the inductive subtype in the comparison question type is "Which fixed deposit product has the highest interest rate?". In specific implementation, we can analyze and extract its inductive entity information as "fixed deposit", attribute information as "product interest rate", and inductive condition information as "highest". The query statement generated by converting it and matching the graph database type can be described as follows:
[0142] MATCH(n)
[0143] WHERE n.name=”Fixed Deposit”
[0144] RETURN
[0145] ORDER BY n."Product rate" DESC
[0146] LIMIT 1
[0147] or
[0148] MATCH(n)
[0149] WHERE n.name=”Fixed Deposit”
[0150] RETURN max (n. "Product interest rate")
[0151] Through the embodiments of the present disclosure, for comparative question types, entity information, attribute information and condition information corresponding to the subtype can be extracted based on the input question statement, and converted into query statements matching the graph database according to preset conversion rules, and the key characteristics of question statements of each comparative type are summarized, which greatly improves the accuracy of answering questions, reduces the pressure on customer service personnel, and reduces the cost of enterprise operation.
[0152] As an optional embodiment, the problem processing method may also include: selecting training sample data from a knowledge base according to preset rules, wherein the training sample data includes labeled data of the question type; obtaining an initial question classification model; and based on the training sample data, performing deep neural network training on the initial question classification model to generate a question classification model.
[0153] In specific implementation, there are M (e.g., 113752) knowledge data records in the question-answering knowledge base, and about a% (e.g., 30%) of the knowledge data can be randomly selected for annotation, and a question classification model can be trained through a deep neural network method. For user questions, the question category can be marked through the question classification model and transferred to the corresponding question type for processing. The present disclosure does not limit the method for selecting training sample data, and those skilled in the art can select an appropriate selection method to select any number of sample data from the knowledge base according to actual conditions.
[0154] Through the embodiments of the present disclosure, a deep neural network is used to train a question classification model, which can improve the intelligence of question classification and improve classification efficiency and classification accuracy.
[0155] It should be noted that the problem processing method suitable for comprehensive question types (searching for answer statements by calculating the similarity between the word vector of the input question sentence and the feature vector of each entity in the subgraph) is not specifically targeted at a certain question type in nature, and can actually be used to process other question types.
[0156] Figure 8 The block diagram of the problem processing device based on the knowledge base according to the embodiment of the present disclosure is schematically shown. Figure 8 As shown, the question processing device 800 can be applied to an intelligent question-answering system, which can respond to input information and provide feedback information, and can include a classification model acquisition module 810, a question type determination module 820, an answer statement acquisition module 830, and an answer statement output module 840.
[0157] The classification model acquisition module 810 is used to obtain a question classification model in response to receiving an input question statement, wherein the question classification model is trained based on knowledge data in the knowledge base. Optionally, the classification model acquisition module 810 can be used in the aforementioned operation S310, which will not be described in detail here.
[0158] The question type determination module 820 is used to determine the question type of the input question statement based on the question classification model, wherein different question types correspond to different question processing methods. Optionally, the question type determination module 820 can be used in the aforementioned operation S320, which will not be described in detail here.
[0159] The answer sentence obtaining module 830 is used to obtain an answer sentence matching the input question sentence from the knowledge base based on the question processing method corresponding to the question type. Optionally, the answer sentence obtaining module 830 can be used in the aforementioned operation S330, which will not be described in detail here.
[0160] The answer sentence output module 840 is used to output the answer sentence. Optionally, the answer sentence output module 840 can be used in the aforementioned operation S340, which will not be described in detail here.
[0161] Through the embodiments of the present disclosure, a question classification model obtained by training based on the knowledge data in the knowledge base is used to determine the question type corresponding to the input question statement. Different question types correspond to different question processing methods, and the question processing method corresponding to the question type is determined to obtain an answer statement matching the input question statement from the knowledge base as feedback information output of the input question statement. This can at least partially avoid the above-mentioned technical problems caused by searching for answer statements according to product categories, and therefore can achieve the technical effect of executing corresponding question processing methods based on different question types to obtain answer statements matching the input question statement from the knowledge base, saving time and effort, and improving the accuracy of search answers, thereby enhancing customer experience and helping to maintain corporate reputation and external image.
[0162] Fig. 9 A block diagram of a problem processing device based on a knowledge base according to another embodiment of the present disclosure is schematically shown. Fig. 9 As shown, the question processing device 900 can be applied to an intelligent question-answering system, which can respond to input information and provide feedback information, and can include a question classification module 910, a question-answering type question processing module 920, a comparison type question processing module 930, a process type question processing module 940 and a comprehensive question processing module 950.
[0163] According to the embodiment of the present disclosure, the question classification module 910 mainly completes two types of tasks. The first type of task is to clean the input question statement (including entity extraction, attribute extraction, relationship extraction, noise cleaning, and knowledge fusion). Through the judgment of part of speech and classification, the category in entity, attribute and relationship is further determined. The second type of task is to transfer the question to the corresponding submodule for processing through the question classification module 910. After the question category is clarified, it is transferred to the subsequent processing flow. Specifically, the question-answering input question statement is transferred to the question-answering question processing module 920 for question processing, the question-answering input question statement is transferred to the question-answering question processing module 920 for question processing, the comparison input question statement is transferred to the comparison question processing module 930 for question processing, the process input question statement is transferred to the process question processing module 940 for question processing, and the comprehensive input question statement is transferred to the comprehensive question processing module 950 for question processing. The specific processing methods of each processing module are described in detail in the aforementioned embodiments, which will not be repeated this time.
[0164] Through the intelligent customer service question-and-answer system based on financial knowledge graph provided by the present disclosure, customer questions are modeled based on the knowledge of the question-and-answer library, and user questions are classified into four categories through the deep neural network method. According to the analysis of the question types, customer questions are divided into four categories: question-and-answer type, comparison type, process type and comprehensive type. This method can greatly improve the accuracy of the system in handling problems, improve the quality of customer service through artificial intelligence methods, reduce the work pressure of customer service personnel, and reduce the operating costs of enterprises.
[0165] As an optional embodiment, the answer sentence obtaining module 830 may include: a generation submodule, which is used to generate a first feature vector of an input question sentence when it is determined that the question type is a comprehensive type; a first extraction submodule, which is used to extract first entity information and first attribute information of the input question sentence; a first obtaining submodule, which is used to obtain a candidate entity set matching the first entity information from a knowledge base based on the first entity information, wherein the candidate entity set includes multiple second entities; a first determination submodule, which is used to determine a second feature vector of each second entity based on the second attribute information of the multiple second entities; a second determination submodule, which is used to determine a similarity value between the input question sentence and each second entity based on the first feature vector and the second feature vector of each second entity; and a second obtaining submodule, which is used to obtain a second entity corresponding to the maximum similarity value from the knowledge base as an answer sentence matching the input question sentence.
[0166] As an optional embodiment, the first obtaining submodule may include: a first obtaining unit, used to obtain a path length threshold, wherein the path length threshold is used to characterize the maximum value of the path length between the first entity; a second obtaining unit, used to obtain, from a knowledge base, based on the path length threshold, a candidate path whose path length between the first entity does not exceed the path length threshold; and a first processing unit, used to take multiple second entities covered by the candidate path as a candidate entity set that matches the first entity.
[0167] As an optional embodiment, the answer statement acquisition module 830 may include: a third determination submodule, used to determine the graph database type of the knowledge base when the question type is determined to be a common type; a first conversion submodule, used to convert the input question statement into a query statement matching the graph database type according to a preset conversion rule; and a third acquisition submodule, used to obtain an answer statement matching the input question statement from the knowledge base based on the query statement.
[0168] As an optional embodiment, the first conversion submodule may include: a first extraction unit, used to extract the third entity information of the input question statement when the general type is a question-and-answer type or a process type; a second extraction unit, used to extract the third attribute information associated with the third entity information; a first determination unit, used to determine, based on the third entity information, fourth entity information in the knowledge base that is the same or similar to the third entity information; a second determination unit, used to determine, based on the third attribute information, fourth attribute information in the knowledge base that is the same or similar to the third attribute information; and a first generation unit, used to generate a query statement that matches the graph database type based on the fourth entity information and the fourth attribute information.
[0169] As an optional embodiment, the third entity information and third attribute information corresponding to the question and answer type may have at least the following corresponding relationship: one piece of third entity information; one piece of third entity information corresponds to one piece of third attribute information; one piece of third entity information corresponds to multiple pieces of third attribute information; multiple pieces of third entity information correspond to one piece of third attribute information.
[0170] As an optional embodiment, the answer statement acquisition module 830 may include: a fourth acquisition sub-module, used to obtain a list of attributes associated with the third entity information from the knowledge base when the common type is a process type, wherein the attribute list contains multiple attribute information executed in order; a fourth determination sub-module, used to determine, based on the attribute list, the execution logical relationship of the attribute information corresponding to the query statement among the multiple attribute information executed in order; and a fifth acquisition sub-module, used to obtain an answer statement matching the input question statement from the knowledge base based on the execution logical relationship.
[0171] As an optional embodiment, the first conversion submodule may include: a third determination unit, used to determine the subtype corresponding to the input question statement when the common type is a comparison type; a third extraction unit, used to extract the fifth entity information, fifth attribute information and comparison condition information of the input question statement, wherein the comparison condition information is used to characterize the subtype; a fourth determination unit, used to determine the sixth entity information in the knowledge base that is the same or similar to the fifth entity information based on the fifth entity information; a fifth determination unit, used to determine the sixth attribute information in the knowledge base that is the same or similar to the fifth attribute information based on the fifth attribute information; and a second generation unit, used to generate a query statement that matches the graph database type based on the sixth entity information, the sixth attribute information and the comparison condition information.
[0172] As an optional embodiment, when the subtype includes a comparison subtype, the comparison condition information may include comparison condition information corresponding to the comparison subtype, wherein the comparison subtype is used to indicate comparison of attributes of two types of entities; when the subtype includes a retrieval subtype, the comparison condition information may include retrieval condition information corresponding to the retrieval subtype, wherein the retrieval subtype is used to indicate retrieval of entities that satisfy the retrieval condition information; when the subtype includes an induction subtype, the comparison condition information may include induction condition information corresponding to the induction subtype, wherein the induction subtype is used to indicate the maximum value of the query attribute.
[0173] As an optional embodiment, the device may also include: a training sample selection module, used to select training sample data from a knowledge base according to preset rules, wherein the training sample data includes labeled data of the question type; an initial model acquisition module, used to obtain an initial question classification model; and a classification model generation module, used to perform deep neural network training on the initial question classification model based on the training sample data to generate a question classification model.
[0174] It should be noted that the implementation methods, technical problems solved, functions implemented, and technical effects achieved of each module in the embodiment of the problem processing device part based on the knowledge base are respectively the same or similar to the implementation methods, technical problems solved, functions implemented, and technical effects achieved of each corresponding step in the embodiment of the problem processing method part based on the knowledge base, and will not be repeated here.
[0175] According to the embodiments of the present invention, any one or more of the modules, sub-modules, units, and sub-units, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, sub-modules, units, and sub-units can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, sub-modules, units, and sub-units can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FNGA), a programmable logic array (NLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, sub-modules, units, and sub-units can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0176] For example, the classification model acquisition module, the question type determination module, the answer sentence acquisition module, the answer sentence output module, the generation submodule, the first extraction submodule, the first acquisition submodule, the first determination submodule, the second determination submodule, the second acquisition submodule, the first acquisition unit, the second acquisition unit, the first processing unit, the third determination submodule, the first conversion submodule, the third acquisition submodule, the first extraction unit, the second extraction unit, the first determination unit, the second determination unit, the first generation unit, the fourth acquisition submodule, the fourth determination submodule, the fifth acquisition submodule, the third determination unit, the third extraction unit, the fourth determination unit, the fifth determination unit, the second generation unit, the training sample selection module, the initial model acquisition module and the classification model generation module can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the classification model acquisition module, the question type determination module, the answer sentence acquisition module, the answer sentence output module, the generation submodule, the first extraction submodule, the first acquisition submodule, the first determination submodule, the second determination submodule, the second acquisition submodule, the first acquisition unit, the second acquisition unit, the first processing unit, the third determination submodule, the first conversion submodule, the third acquisition submodule, the first extraction unit, the second extraction unit, the first determination unit, the second determination unit, the first generation unit, the fourth acquisition submodule, the fourth determination submodule, the fifth acquisition submodule, the third determination unit, the third extraction unit, the fourth determination unit, the fifth determination unit, the second generation unit, the training sample selection module, the initial model acquisition module and the classification model generation module can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FNGA), a programmable logic array (NLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them.Alternatively, at least one of the classification model acquisition module, the question type determination module, the answer sentence acquisition module, the answer sentence output module, the generation submodule, the first extraction submodule, the first acquisition submodule, the first determination submodule, the second determination submodule, the second acquisition submodule, the first acquisition unit, the second acquisition unit, the first processing unit, the third determination submodule, the first conversion submodule, the third acquisition submodule, the first extraction unit, the second extraction unit, the first determination unit, the second determination unit, the first generation unit, the fourth acquisition submodule, the fourth determination submodule, the fifth acquisition submodule, the third determination unit, the third extraction unit, the fourth determination unit, the fifth determination unit, the second generation unit, the training sample selection module, the initial model acquisition module and the classification model generation module can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is executed.
[0177] Fig.10 A schematic diagram of a computer-readable storage medium product suitable for implementing the above-described knowledge base-based problem processing method according to an embodiment of the present disclosure is schematically shown.
[0178] In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a device, the program code is used to enable the device to perform the aforementioned operations (or steps) in the problem processing method based on the knowledge base according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the electronic device may perform the following steps: Figure 3 Operations S310 to S340 shown in FIG. Figure 4 Operations S410 to S480 shown in Figure 5 Operations S510 to S540 shown in FIG. Figure 6 Operations S610 to S640 shown in FIG. Figure 7 Operations S710 to S760 shown in FIG.
[0179] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (ENROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0180] like Fig.10 As shown, a program product 1000 of a problem processing method based on a knowledge base according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, system or device.
[0181] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which a readable program code is carried. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, system, or device. The program code contained on the readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0182] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C", language, or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAA) or a wide area network (WAA), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0183] Fig.11 A block diagram of an electronic device suitable for implementing the above-described knowledge base-based problem processing method according to an embodiment of the present disclosure is schematically shown. Fig.11 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0184] like Fig.11As shown, the electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 to a random access memory (RAM) 1103. The processor 1101 may include, for example, a general-purpose microprocessor (e.g., a CNU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1101 may also include an onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0185] In RAM 1103, various programs and data required for the operation of electronic device 1100 are stored. Processor 1101, ROM 1102, and RAM 1103 are connected to each other via bus 1104. Processor 1101 executes various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1102 and / or RAM 1103. It should be noted that the program can also be stored in one or more memories other than ROM 1102 and RAM 1103. Processor 1101 can also execute the program stored in the one or more memories according to the embodiment of the present disclosure. Figure 3 Operations S310 to S340 shown in FIG. Figure 4 Operations S410 to S480 shown in Figure 5 Operations S510 to S540 shown in FIG. Figure 6 Operations S610 to S640 shown in FIG. Figure 7 Operations S710 to S760 shown in FIG.
[0186] According to an embodiment of the present disclosure, the electronic device 1100 may further include an input / output (I / O) interface 1105, which is also connected to the bus 1104. The electronic device 1100 may further include one or more of the following components connected to the input / output (I / O) interface 1105: an input portion 1106 including a keyboard, a mouse, etc.; an output portion 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1108 including a hard disk, etc.; and a communication portion 1109 including a network interface card such as an LAA card, a modem, etc. The communication portion 1109 performs communication processing via a network such as the Internet. The drive 1110 is also connected to the input / output (I / O) interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that the computer program read therefrom is installed into the storage portion 1108 as needed.
[0187] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the processor 1101, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0188] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the problem processing method based on the knowledge base according to the embodiment of the present disclosure is implemented, including Figure 3 Operations S310 to S340 shown in FIG. Figure 4 Operations S410 to S480 shown in Figure 5 Operations S510 to S540 shown in FIG. Figure 6 Operations S610 to S640 shown in FIG. Figure 7 Operations S710 to S760 shown in FIG.
[0189] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (ENROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1102 and / or RAM 1103 described above and / or one or more memories other than ROM 1102 and RAM 1103.
[0190] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0191] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0192] The embodiments of the present disclosure are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A question processing method based on a knowledge base, applied to an intelligent question answering system, wherein the intelligent question answering system is capable of responding to input information and providing feedback information, comprising: In response to receiving an input question statement, obtaining a question classification model, wherein the question classification model is trained based on knowledge data in the knowledge base; Based on the question classification model, determining the question type of the input question statement, wherein different question types correspond to different question processing methods, and the question type of the input question statement includes a comprehensive type, and the question types included in the comprehensive type are relatively complex and are not targeted at a specific type of question; Based on the question processing method corresponding to the question type, obtaining an answer statement matching the input question statement from the knowledge base; Outputting the answer sentence; Wherein, obtaining an answer statement matching the input question statement from the knowledge base based on the question processing method corresponding to the question type includes: In the case where it is determined that the question type is a comprehensive type, generating a first feature vector of the input question sentence; Extracting first entity information and first attribute information of the input question sentence; Based on the first entity information, obtaining a candidate entity set matching the first entity information from the knowledge base, wherein the candidate entity set includes a plurality of second entities; Determine a second feature vector of each second entity based on the second attribute information of the plurality of second entities; Determine a similarity value between the input question statement and each second entity based on the first feature vector and the second feature vector of each second entity; Obtaining a second entity corresponding to the maximum similarity value from the knowledge base as an answer statement matching the input question statement; Wherein, based on the first entity information, obtaining a candidate entity set matching the first entity information from the knowledge base includes: Acquire a path length threshold, wherein the path length threshold is used to represent the maximum value of the path length between the first entity and the first entity; Based on the path length threshold, obtaining, from the knowledge base, a candidate path whose path length to the first entity does not exceed the path length threshold; The multiple second entities covered by the candidate path are used as a candidate entity set matching the first entity.
2. A method for processing questions based on a knowledge base, applied to an intelligent question-answering system, wherein the intelligent question-answering system is capable of responding to input information and providing feedback information, comprising: In response to receiving an input question statement, obtaining a question classification model, wherein the question classification model is trained based on knowledge data in the knowledge base; Determine the question type of the input question statement based on the question classification model, wherein different question types correspond to different question processing methods, and the question type of the input question statement includes a common type, and the common type includes a question-answer type, a process type, or a comparison type; Based on the question processing method corresponding to the question type, obtaining an answer statement matching the input question statement from the knowledge base; Outputting the answer sentence; Wherein, obtaining an answer statement matching the input question statement from the knowledge base based on the question processing method corresponding to the question type includes: When it is determined that the question type is a common type, determining the graph database type of the knowledge base; According to preset conversion rules, the input question statement is converted into a query statement matching the graph database type; Based on the query statement, obtaining an answer statement matching the input question statement from the knowledge base; The step of converting the input question statement into a query statement matching the graph database type according to a preset conversion rule includes: In the case where the common type is a question-and-answer type or a process type, extracting third entity information of the input question sentence; extracting third attribute information associated with the third entity information; Based on the third entity information, determining fourth entity information in the knowledge base that is identical or similar to the third entity information; Based on the third attribute information, determining fourth attribute information in the knowledge base that is the same as or similar to the third attribute information; Based on the fourth entity information and the fourth attribute information, generate a query statement matching the graph database type; The third entity information corresponding to the question and answer type and the third attribute information have at least the following corresponding relationship: a third entity information; One piece of third entity information corresponds to one piece of third attribute information; One piece of third entity information corresponds to multiple pieces of third attribute information; Multiple pieces of third entity information correspond to one piece of third attribute information; Wherein, based on the query statement, obtaining an answer statement matching the input question statement from the knowledge base includes: In the case where the common type is a process type, obtaining an attribute list associated with the third entity information from the knowledge base, wherein the attribute list includes a plurality of attribute information executed in order; Based on the attribute list, determining the execution logic relationship of the attribute information corresponding to the query statement among the plurality of attribute information executed in the ordered manner; Based on the execution logic relationship, obtaining an answer statement matching the input question statement from the knowledge base; The step of converting the input question statement into a query statement matching the graph database type according to a preset conversion rule includes: In the case where the general type is a comparison type, determining a subtype corresponding to the input question sentence; Extracting fifth entity information, fifth attribute information, and comparison condition information of the input question sentence, wherein the comparison condition information is used to characterize the subtype; Based on the fifth entity information, determining sixth entity information in the knowledge base that is identical or similar to the fifth entity information; Based on the fifth attribute information, determining sixth attribute information in the knowledge base that is the same as or similar to the fifth attribute information; Based on the sixth entity information, the sixth attribute information and the comparison condition information, a query statement matching the graph database type is generated.
3. The method according to claim 2, wherein: In the case where the subtype includes a comparison subtype, the comparison condition information includes comparison condition information corresponding to the comparison subtype, wherein the comparison subtype is used to indicate comparison of attributes of two types of entities; In the case where the subtype includes a search subtype, the comparison condition information includes search condition information corresponding to the search subtype, wherein the search subtype is used to indicate searching for entities that meet the search condition information; In the case where the subtype includes a summary subtype, the comparison condition information includes summary condition information corresponding to the summary subtype, wherein the summary subtype is used to indicate a maximum value of a query attribute.
4. The method according to claim 1 or 2, wherein: The method further comprises: According to preset rules, training sample data is selected from the knowledge base, wherein the training sample data includes labeled data of question types; Obtain an initial question classification model; Based on the training sample data, deep neural network training is performed on the initial question classification model to generate the question classification model.
5. A question processing device based on a knowledge base, applied to an intelligent question answering system, wherein the intelligent question answering system is capable of responding to input information and providing feedback information, comprising: A classification model acquisition module, configured to obtain a question classification model in response to receiving an input question statement, wherein the question classification model is trained based on knowledge data in the knowledge base; A question type determination module, used to determine the question type of the input question statement based on the question classification model, wherein different question types correspond to different question processing methods, and the question type of the input question statement includes a comprehensive type, and the question types included in the comprehensive type are relatively complex and are not targeted at a specific type of question; An answer sentence obtaining module, used for obtaining an answer sentence matching the input question sentence from the knowledge base based on a question processing method corresponding to the question type; An answer statement output module, used for outputting the answer statement; Wherein, obtaining an answer statement matching the input question statement from the knowledge base based on the question processing method corresponding to the question type includes: In the case where it is determined that the question type is a comprehensive type, generating a first feature vector of the input question sentence; Extracting first entity information and first attribute information of the input question sentence; Based on the first entity information, obtaining a candidate entity set matching the first entity information from the knowledge base, wherein the candidate entity set includes a plurality of second entities; Determine a second feature vector of each second entity based on the second attribute information of the plurality of second entities; Determine a similarity value between the input question statement and each second entity based on the first feature vector and the second feature vector of each second entity; Obtaining a second entity corresponding to the maximum similarity value from the knowledge base as an answer statement matching the input question statement; Wherein, based on the first entity information, obtaining a candidate entity set matching the first entity information from the knowledge base includes: Acquire a path length threshold, wherein the path length threshold is used to represent the maximum value of the path length between the first entity and the first entity; Based on the path length threshold, obtaining, from the knowledge base, a candidate path whose path length to the first entity does not exceed the path length threshold; The multiple second entities covered by the candidate path are used as a candidate entity set matching the first entity.
6. A question processing device based on a knowledge base, applied to an intelligent question-answering system, wherein the intelligent question-answering system is capable of responding to input information and providing feedback information, comprising: A classification model acquisition module, configured to obtain a question classification model in response to receiving an input question statement, wherein the question classification model is trained based on knowledge data in the knowledge base; Determine the question type of the input question statement based on the question classification model, wherein different question types correspond to different question processing methods, and the question type of the input question statement includes a common type, and the common type includes a question-answer type, a process type, or a comparison type; An answer sentence obtaining module, used for obtaining an answer sentence matching the input question sentence from the knowledge base based on a question processing method corresponding to the question type; An answer statement output module, used for outputting the answer statement; Wherein, obtaining an answer statement matching the input question statement from the knowledge base based on the question processing method corresponding to the question type includes: When it is determined that the question type is a common type, determining the graph database type of the knowledge base; According to preset conversion rules, the input question statement is converted into a query statement matching the graph database type; Based on the query statement, obtaining an answer statement matching the input question statement from the knowledge base; The step of converting the input question statement into a query statement matching the graph database type according to a preset conversion rule includes: In the case where the common type is a question-and-answer type or a process type, extracting third entity information of the input question sentence; extracting third attribute information associated with the third entity information; Based on the third entity information, determining fourth entity information in the knowledge base that is identical or similar to the third entity information; Based on the third attribute information, determining fourth attribute information in the knowledge base that is the same as or similar to the third attribute information; Based on the fourth entity information and the fourth attribute information, generate a query statement matching the graph database type; The third entity information corresponding to the question and answer type and the third attribute information have at least the following corresponding relationship: a third entity information; One piece of third entity information corresponds to one piece of third attribute information; One piece of third entity information corresponds to multiple pieces of third attribute information; Multiple pieces of third entity information correspond to one piece of third attribute information; Wherein, based on the query statement, obtaining an answer statement matching the input question statement from the knowledge base includes: In the case where the common type is a process type, obtaining an attribute list associated with the third entity information from the knowledge base, wherein the attribute list includes a plurality of attribute information executed in order; Based on the attribute list, determining the execution logic relationship of the attribute information corresponding to the query statement among the plurality of attribute information executed in the ordered manner; Based on the execution logic relationship, obtaining an answer statement matching the input question statement from the knowledge base; The step of converting the input question statement into a query statement matching the graph database type according to a preset conversion rule includes: In the case where the general type is a comparison type, determining a subtype corresponding to the input question sentence; Extracting fifth entity information, fifth attribute information, and comparison condition information of the input question sentence, wherein the comparison condition information is used to characterize the subtype; Based on the fifth entity information, determining sixth entity information in the knowledge base that is identical or similar to the fifth entity information; Based on the fifth attribute information, determining sixth attribute information in the knowledge base that is the same as or similar to the fifth attribute information; Based on the sixth entity information, the sixth attribute information and the comparison condition information, a query statement matching the graph database type is generated.
7. An electronic device comprising: one or more processors; as well as a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 4. 8 . A computer-readable storage medium storing computer-executable instructions, which, when executed, cause a processor to perform the method according to claim 1 .
9. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is performed.
Citation Information
Patent Citations
Multi-type question intelligent question answering method, system, device and readable storage medium
CN111858877A