Question and answer processing method and device, electronic equipment and storage medium

Through pre-trained keyword refining model and knowledge graph matching technology, the problem of inaccurate and inefficient search in the existing technology of user Q&A request intention is solved, and efficient and accurate Q&A processing is achieved.

CN119513244APending Publication Date: 2025-02-25CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411494285.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the prior art, when processing user Q&A requests, it is difficult to accurately capture the user's true intentions, resulting in inaccurate keyword refinement and inefficient searches in a large number of databases.

Method used

The pre-trained keyword refinement model is used for semantic analysis, keywords that reflect the core intention of the user's problem text are extracted, and the target database is found through knowledge graph matching to conduct efficient search.

Benefits of technology

The core intention of accurately predicting user question text is achieved, the accuracy of keyword refinement is improved, the number of search databases is reduced, and the efficiency of question-and-answer processing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513244A_ABST
    Figure CN119513244A_ABST
Patent Text Reader

Abstract

The invention provides a question and answer processing method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a user question text in response to a question and answer request instruction initiated by a user; based on a keyword extraction model, performing semantic analysis on the user question text to extract keywords; analyzing the keyword, and determining at least one associated target business scene; based on the target business scene, performing matching search in the knowledge graph, and determining a target database in the target business scene; and searching in the target database based on the keyword, and returning the data of which the relevancy with the keyword exceeds a preset relevancy threshold value as a target answer to the user, thereby accurately predicting the keyword through the keyword extraction model, determining the target database from the knowledge graph according to the target business scene associated with the keyword, and obtaining the target answer. According to the method, searching is performed in the database to determine the target answer, searching in a large number of databases is not needed, and question and answer efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a question-and-answer processing method, device, electronic device, and storage medium. Background Art

[0002] In the related art, after receiving a user's question and answer request, a simple text segmentation and word frequency statistics method is usually used to extract keywords from the question text asked by the user. However, this method is often difficult to accurately capture the user's true intention when dealing with complex problems. The extracted keywords cannot accurately reflect the user's real needs. In addition, based on the keywords, a large number of databases are searched to determine the answer to the user. However, this method is difficult to cope with large amounts of data and is inefficient. Summary of the invention

[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0004] To this end, the first purpose of this application is to propose a question-and-answer processing method to accurately predict the core intent of the user's question text, and then determine the keywords used to reflect the core intent of the user's question text, and search from a preset knowledge graph according to the business scenarios associated with the keywords to determine the business scenarios that match the business scenarios associated with the keywords, and determine the database under the matched business scenarios, and search in the database under the matched business scenarios through keywords to determine the answer to the user based on the knowledge graph, without the need to search in a large number of databases.

[0005] The second objective of this application is to provide a question and answer processing device.

[0006] The third objective of the present application is to provide an electronic device.

[0007] A fourth objective of the present application is to provide a computer-readable storage medium.

[0008] A fifth object of the present application is to provide a computer program product.

[0009] To achieve the above-mentioned purpose, the first aspect embodiment of the present application proposes a question and answer processing method, including: in response to a question and answer request instruction initiated by a user, obtaining a user question text carried by the question and answer request instruction; based on a pre-trained keyword extraction model, performing semantic analysis on the user question text to extract keywords used to reflect the core intention of the user question text; parsing the keywords to determine at least one target business scenario associated with the keywords; based on the target business scenario, performing a matching search in a pre-configured knowledge graph to determine a target database pre-created under the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases under each business scenario; based on the keywords, searching in the target database to determine data whose correlation with the keywords exceeds a preset correlation threshold, and returning the data exceeding the correlation threshold as the target answer to the user.

[0010] To achieve the above-mentioned purpose, the second aspect embodiment of the present application proposes a question and answer processing device, including: a first acquisition module, used to respond to a question and answer request instruction initiated by a user, and obtain the user question text carried by the question and answer request instruction; a semantic analysis module, used to perform semantic analysis on the user question text based on a pre-trained keyword extraction model to extract keywords that reflect the core intention of the user question text; a parsing module, used to parse the keywords to determine at least one target business scenario associated with the keywords; a first determination module, used to match and search in a pre-configured knowledge graph based on the target business scenario to determine a target database pre-created under the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases under each business scenario; a second determination module, used to search in the target database based on the keywords to determine data whose correlation with the keywords exceeds a preset correlation threshold, and return the data exceeding the correlation threshold as the target answer to the user.

[0011] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the question and answer processing method as described in the above-mentioned embodiment of the present disclosure.

[0012] To achieve the above-mentioned objectives, the fourth aspect embodiment of the present application proposes a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device can execute the question and answer processing method described in the above-mentioned embodiment of the present disclosure.

[0013] To achieve the above objectives, the fifth aspect of the present application proposes a computer program product, a computer program, which, when executed by a processor, implements the question and answer processing method as described in the above embodiments of the present disclosure.

[0014] The question-and-answer processing method, device, electronic device, and storage medium provided by the present application respond to a question-and-answer request instruction initiated by a user, obtain a user question text carried by the question-and-answer request instruction; perform semantic analysis on the user question text based on a pre-trained keyword extraction model to extract keywords used to reflect the core intent of the user question text; parse the keywords to determine at least one target business scenario associated with the keywords; perform a matching search in a pre-configured knowledge graph based on the target business scenario to determine a target database pre-created in the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases in each business scenario; based on the keywords, search in the target database to determine the keywords related to the keywords; Data whose correlation between words exceeds a preset correlation threshold, and data exceeding the correlation threshold is returned to the user as the target answer. As a result, the core intent of the user's question text can be accurately predicted through the pre-trained keyword extraction model, and then the keywords used to reflect the core intent of the user's question text are determined, and according to the business scenarios associated with the keywords, the preset knowledge graph is searched to determine the business scenarios that match the business scenarios associated with the keywords, and the database under the matched business scenarios is determined. Through the keywords, the database under the matched business scenarios is searched to determine the answer to the user. Through the pre-configured knowledge graph, there is no need to search in a large number of databases, which will cause low efficiency in question and answer.

[0015] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0017] Figure 1 A flowchart of a question-and-answer processing method provided in an embodiment of the present application Figure 1 ;

[0018] Figure 2 A flowchart of a question-and-answer processing method provided in an embodiment of the present application Figure 2 ;

[0019] Figure 3 A flowchart of a question-and-answer processing method provided in an embodiment of the present application Figure 3 ;

[0020] Figure 4 A schematic diagram of a framework corresponding to the question-answer processing flow provided in an embodiment of the present application;

[0021] Figure 5 is a structural diagram of a question-and-answer processing device provided in an embodiment of the present application;

[0022] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0024] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0025] Among them, it should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of relevant laws and regulations. In the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0026] The following describes the question and answer processing method, device, electronic device and storage medium of the embodiments of the present application with reference to the accompanying drawings.

[0027] Figure 1 A flowchart of a question-and-answer processing method provided in an embodiment of the present application Figure 1 .

[0028] To address this problem, the present application provides a question-answering processing method, such as Figure 1 As shown, the question-answering processing method includes the following steps:

[0029] Step 101, in response to a question and answer request instruction initiated by a user, obtain a user question text carried in the question and answer request instruction.

[0030] It should be noted that the question-answer processing method provided in the embodiment of the present application can be executed by a question-answer processing device (also referred to as a question-answer processor), wherein the question-answer processing device can be implemented by software and / or hardware. The question-answer processing device can be an electronic device, or can be configured in an electronic device to implement the question-answer processing function. The embodiment of the present application is described by taking the question-answer processing method configured in an electronic device as an example.

[0031] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.

[0032] It can be understood that the user question text may include one, or two or more questions initiated by the user, which is not specifically limited in this embodiment.

[0033] For example, the user question text carried by the question-and-answer request instruction may be "how to change the bank password, and how to change the user name".

[0034] Step 102 , based on the pre-trained keyword extraction model, semantic analysis is performed on the user question text to extract keywords that reflect the core intent of the user question text.

[0035] In order to quickly extract keywords, as a possible implementation method, the user question text is preprocessed to determine the preprocessed user question text.

[0036] As an example, the user question text is segmented to determine multiple words contained in the user question text, the multiple words contained in the user question text are analyzed, and stop words contained in the user question text are removed to determine the preprocessed user question text.

[0037] Step 103: parse the keyword to determine at least one target business scenario associated with the keyword.

[0038] For example, the user's question text is "How to change the bank password?", and the keyword extracted by the pre-trained keyword extraction model is "change bank password". The keyword (change bank password) is then parsed to determine that the target business scenario associated with the keyword (change bank password) is the savings business scenario.

[0039] Step 104, based on the target business scenario, a matching search is performed in the preconfigured knowledge graph to determine a target database pre-created under the target business scenario.

[0040] It should be noted that the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases in each business scenario.

[0041] In order to accurately determine the target database pre-created under the target business scenario from the knowledge graph, as a possible implementation method, a business scenario consistent with the target business scenario is determined from the pre-configured knowledge graph, and the target database is determined based on the database under the business scenario consistent with the target business scenario.

[0042] As an example, based on the target business scenario, determine the business scenario in the knowledge graph that is consistent with the target business scenario from the preconfigured knowledge graph, determine the database created in the business scenario that is consistent with the target business scenario based on the semantic relationship between the business scenario in the knowledge graph and the database under the business scenario, and use the database created in the business scenario that is consistent with the target business scenario as the target database.

[0043] Step 105 , based on the keyword, search in the target database to determine data whose relevance to the keyword exceeds a preset relevance threshold, and return the data exceeding the relevance threshold as a target answer to the user.

[0044] It should be noted that the relevance threshold is pre-configured in the question and answer processing device, and the specific value of the relevance threshold can be determined according to actual needs, and this embodiment does not make any specific limitation.

[0045] It should be understood that since the data whose correlation with the keywords exceeds the correlation threshold may contain multiple data relationships, it is not easy for users to understand intuitively. Therefore, in order to make the target answer easy for users to understand intuitively, the data exceeding the correlation threshold is further optimized, and the optimized data exceeding the correlation threshold is returned to the user as the target answer.

[0046] The question-and-answer processing method provided in the present application obtains the user question text carried by the question-and-answer request instruction in response to the question-and-answer request instruction initiated by the user; performs semantic analysis on the user question text based on a pre-trained keyword extraction model to extract keywords used to reflect the core intent of the user question text; parses the keywords to determine at least one target business scenario associated with the keywords; performs matching searches in a pre-configured knowledge graph based on the target business scenario to determine a target database pre-created under the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases under each business scenario; searches in the target database based on the keywords to determine the relevance to the keywords Data that exceeds a preset relevance threshold, and data that exceeds the relevance threshold is returned to the user as the target answer. As a result, the core intent of the user's question text can be accurately predicted through a pre-trained keyword extraction model, and then the keywords used to reflect the core intent of the user's question text can be determined, and according to the business scenarios associated with the keywords, a search is performed from a preset knowledge graph to determine a business scenario that matches the business scenario associated with the keywords, and a database under the matched business scenario is determined. Through the keywords, a search is performed in the database under the matched business scenario to determine the answer to the user. Through the pre-configured knowledge graph, there is no need to search in a large number of databases, which causes low question and answer efficiency.

[0047] In the embodiment of the present application, in order to clearly understand the keyword extraction model based on pre-training, the user question text is semantically analyzed to extract keywords that reflect the core intent of the user question text. Figure 2 An exemplary description is given of a possible implementation method of performing semantic analysis on user question text based on a pre-trained keyword extraction model to extract keywords that reflect the core intent of the user question text. Figure 2 A process for providing a question-answering processing method for the embodiment of the present application Figure 2 This embodiment further refines the question-answering processing method.

[0048] like Figure 2 As shown, the question-answering processing method may include the following steps:

[0049] Step 201, in response to a question and answer request instruction initiated by a user, obtain a user question text carried in the question and answer request instruction.

[0050] Step 202, based on the hot words preconfigured in the keyword extraction model, it is judged whether there are words identical to the hot words in the user question text to obtain a first judgment result.

[0051] In order to enable the keyword refinement model to accurately extract keywords that reflect the core intent of the user's question text, as a possible implementation method, the initial keyword refinement model is trained through historical user question texts and actual keywords corresponding to the historical question texts to determine a pre-trained keyword refinement model.

[0052] As an example, obtain a first historical user question text and hot words contained in the first historical question text; input the first historical question text into an initial keyword refinement model to determine predicted keywords corresponding to the first historical question text; train the initial keyword refinement model based on the hot words contained in the first historical question text and the predicted keywords corresponding to the first historical question text to determine a pre-trained keyword refinement model.

[0053] It should be noted that the hot words contained in the first historical question text are the actual keywords corresponding to the first historical question text.

[0054] Hot words are used to indicate words that are closely related to the business scenarios that the target user group focuses on.

[0055] It is understandable that the target user group may be determined according to actual conditions. For example, the target user group may be a user group that needs to handle banking services, which will not be described in detail in this embodiment.

[0056] Among them, it should be noted that according to the business scenarios that the target user group focuses on, words closely related to the business scenarios are used as hot words. Based on the existing professional field knowledge and relevant business knowledge in the business scenarios, the hot words can be determined by relevant business personnel, which will not be repeated in this embodiment.

[0057] Step 203: When the first judgment result indicates that there is a word identical to the hot word in the user question text, the word identical to the hot word is used as a keyword.

[0058] For example, the user question text is "How to change the bank password, and how to change the account name", the hot words (change bank password, regular account transfer) are pre-set in the pre-trained keyword extraction model, and the word with the same hot word in the user question text (how to change the bank password, and how to change the account name) is "change bank password", and "change bank password" is used as the keyword.

[0059] Step 204, when the first judgment result indicates that there is no vocabulary identical to the hot word in the user question text, based on the keyword refinement model, it is judged whether there is vocabulary identical to the high-frequency word in the user question text to obtain a second judgment result.

[0060] As another example, obtain a second historical user question text and high-frequency words contained in the second historical question text; input the second historical question text into the initial keyword refinement model to determine the predicted keywords corresponding to the second historical question text; train the initial keyword refinement model based on the high-frequency words contained in the second historical question text and the predicted keywords corresponding to the second historical question text to determine a pre-trained keyword refinement model.

[0061] It should be noted that the second historical question text does not contain hot words, and the high-frequency words contained in the second historical question text are the actual keywords corresponding to the second historical question text.

[0062] It should be noted that the historical question text carried by the historical question and answer request instructions initiated by the target user group is obtained, and the historical question text is analyzed to determine the words that appear multiple times in the historical question text, and the words that appear multiple times in the historical question text are regarded as high-frequency words.

[0063] Step 205: When the second judgment result indicates that there is a word identical to the high-frequency word in the user's question text, the word identical to the high-frequency word is used as a keyword.

[0064] For example, the user's question text is "How to change the bank password, and how to change the account name", the hot words (regular account transfer) pre-set in the pre-trained keyword extraction model, and the words (modify account name) that appear multiple times in historical question texts, "modify account name" is used as a high-frequency word. Based on the high-frequency words (modify account name) set by the keyword extraction model, it is determined that there are words in the user's question text that are the same as the high-frequency words (modify account name), and "modify account name" is used as the keyword.

[0065] Step 206, when the first judgment result indicates that there is no vocabulary identical to the hot word in the user question text and the second judgment result indicates that there is no vocabulary identical to the high-frequency word in the user question text, based on the keyword refinement model, sentiment scoring is performed on each vocabulary in the user question text to determine the sentiment score corresponding to the emotional vocabulary contained in the user question text.

[0066] It is important to understand that, since there are cases where the user's question text contains neither hot words nor high-frequency words, in actual question-and-answer scenarios, the user's emotional words can also reflect the user's actual needs. Therefore, when the user's question text contains neither hot words nor high-frequency words, it is possible to determine whether the user's question text contains emotional words, and thus accurately predict the user's core intent.

[0067] Correspondingly, as an example, obtain the third historical user question text and the emotional words contained in the third historical question text; input the third historical question text into the initial keyword refinement model to determine the predicted keywords corresponding to the third historical question text; train the initial keyword refinement model based on the emotional words contained in the third historical question text and the predicted keywords corresponding to the third historical question text to determine the pre-trained keyword refinement model.

[0068] It should be noted that the third historical question text contains neither hot words nor high-frequency words, and the emotional words contained in the third historical question text are the actual keywords corresponding to the third historical question text.

[0069] In order to accurately obtain the emotional scores corresponding to the emotional words contained in the user's question text, as a possible implementation method, the emotional words in the user's question text are scored based on the keyword extraction model to determine the emotional scores corresponding to the emotional words.

[0070] As an example, based on the keyword extraction model, each word in the user question text is analyzed to determine whether the user question text contains emotional words; if the user question text contains emotional words, the emotional words are scored to obtain the emotional scores corresponding to the emotional words.

[0071] Step 207 , judging whether the emotion score corresponding to the emotional vocabulary exceeds the emotion score threshold, if the emotion score exceeds the emotion score threshold, using the corresponding emotional vocabulary as a keyword.

[0072] It should be noted that the emotion score threshold is a preset emotion score threshold in the question and answer processing device. In practical applications, the value of the emotion score threshold can be set according to actual needs, and this embodiment does not make any specific limitation on this.

[0073] It is important to understand that there are situations where at least two keywords are extracted. Therefore, in order to further locate the real needs of users, the extracted keywords are further screened and optimized to make the keywords more concise, so as to adapt to the subsequent faster determination of the target database in the target business scenario associated with the keywords from the knowledge graph, thereby improving the efficiency of question and answering.

[0074] As an example, semantic analysis is performed on at least two extracted keywords to obtain the similarity between the keyword semantics; at least two keywords whose similarity exceeds a preset similarity threshold are merged to obtain a merged keyword; and the merged keyword is used as a keyword for reflecting the core intent of the user's question text.

[0075] As another example, when at least two keywords are extracted, business scenarios that the target user group focuses on are obtained; the at least two keywords extracted are analyzed to determine the business scenarios associated with each keyword; for the business scenarios associated with each keyword, it is determined whether the business scenarios associated with the keywords match the business scenarios that the target user group focuses on; if there are business scenarios that do not match the business scenarios that the target user group focuses on, the keywords associated with the unmatched business scenarios are eliminated.

[0076] It should be understood that, since there are cases where the user question text contains neither hot words, nor high-frequency words, nor emotional words, the user question text raised by the user is too broad, and the keyword extraction model cannot accurately extract keywords. Therefore, in order to solve this situation and to be able to respond to user question and answer request instructions more quickly to accurately predict the core intent of the user question text, further, through the inverted triangle tree-like rhetorical question model, multiple rounds of rhetorical question interactions are carried out with the user to further locate the user's real needs, so that the keywords used to reflect the core intent of the user question text can be determined.

[0077] As an example, if the pre-trained keyword extraction model fails to extract keywords based on the user question text, at least one round of rhetorical question interaction is conducted on the user based on the user question text through a pre-set inverted triangle tree-like rhetorical question model to determine a user question text that narrows the scope of the question, and based on the pre-trained keyword extraction model, a semantic analysis is performed on the user question text that narrows the scope of the question to extract keywords.

[0078] Step 208: parse the keyword to determine at least one target business scenario associated with the keyword.

[0079] Step 209, based on the target business scenario, a matching search is performed in the pre-configured knowledge graph to determine a target database pre-created under the target business scenario.

[0080] Step 210, based on the keyword, search in the target database to determine the data whose relevance to the keyword exceeds a preset relevance threshold, and return the data exceeding the relevance threshold as the target answer to the user.

[0081] It should be noted that the execution process of step 201 and steps 208 to 210 can be implemented in any way in the embodiments of the present application, and the embodiments of the present application do not limit this and will not be repeated.

[0082] In this embodiment, based on the hot words preconfigured in the keyword extraction model, it is judged whether there are words identical to the hot words in the user question text to obtain a first judgment result; when the first judgment result indicates that there are words identical to the hot words in the user question text, the words identical to the hot words are used as keywords; when the first judgment result indicates that there are no words identical to the hot words in the user question text, based on the keyword extraction model, it is judged whether there are words identical to the high-frequency words in the user question text to obtain a second judgment result; when the second judgment result indicates that there are words identical to the high-frequency words in the user question text, the words identical to the high-frequency words are used as keywords, and when the first judgment result indicates that there are no words identical to the hot words in the user question text and the second judgment result indicates that If the result indicates that there are no words identical to high-frequency words in the user's question text, based on the keyword extraction model, sentiment scores are given to each word in the user's question text to determine the sentiment scores corresponding to the emotional words contained in the user's question text, and whether the sentiment scores corresponding to the emotional words exceed the sentiment score threshold is judged; if the sentiment score exceeds the sentiment score threshold, the corresponding emotional words are used as keywords. Thus, based on the keyword extraction model, the user's question text is analyzed to see whether there are pre-configured hot words, high-frequency words and emotional words, and the problem scope of the user's question text is gradually narrowed. The user's question text is analyzed in a refined manner, and then keywords are gradually extracted to effectively locate the user's core intent, thereby improving the accuracy of keyword extraction by the keyword extraction model.

[0083] In the embodiment of the present application, in order to clearly understand the pre-configured knowledge graph, the following is combined with Figure 3 A possible implementation method for obtaining a preconfigured knowledge graph is described exemplarily. Figure 3 A process for providing a question-answering processing method for the embodiment of the present application Figure 3 This embodiment further refines the question-answering processing method.

[0084] like Figure 3 As shown, the question-answering processing method may include the following steps:

[0085] Step 301 : obtaining multiple business scenarios related to the business that the target user group is interested in, and obtaining data included in the business that the target user group is interested in.

[0086] For example, the target user group is interested in banking services. If banking services are further divided, banking services related to banking services include but are not limited to transfer business scenarios, deposit business scenarios, and balance inquiry business scenarios.

[0087] Step 302: divide the data included in the business according to the data division rules predefined for each business scenario to determine the data in each business scenario.

[0088] It should be noted that the data partitioning rules can be determined based on existing professional domain knowledge and relevant business knowledge, which will not be elaborated in this embodiment.

[0089] Step 303: construct a database for storing data based on the data in each business scenario to obtain a database in each business scenario.

[0090] In order to completely obtain the database in each business scenario, as a possible implementation method, the database in each business scenario is constructed based on the data structure and data relationship corresponding to the data in each business scenario.

[0091] As an example, for data in various business scenarios, the data is analyzed to determine the data structure and data relationship corresponding to the data; based on the data structure and data relationship corresponding to the data, a database for storing the data is constructed.

[0092] Step 304, determine the knowledge graph based on each business scenario and the semantic relationship between the database under each business scenario.

[0093] In this embodiment, multiple business scenarios related to the business that the target user group is concerned about are obtained, and the data included in the business that the target user group is concerned about is obtained. According to the data division rules predefined for each business scenario, the data included in the business is divided to determine the data in each business scenario. Based on the data in each business scenario, a database for storing data is constructed to obtain the database in each business scenario. According to the semantic relationship between each business scenario and the database in each business scenario, a knowledge graph is determined. Thus, based on multiple business scenarios related to the business, the data is pre-stored in corresponding databases, and the original large amount of data is classified and stored. Through keywords, it is searched in the target database under the matched business scenario, without searching in a large amount of data, so as to achieve efficient convergence of sub-databases and greatly improve the efficiency of question and answer.

[0094] For example, the framework diagram corresponding to the question-answering process can be as follows: Figure 4As shown, in response to the question-and-answer request instruction initiated by the user, the question-and-answer session starts, and the user question text asked by the user is obtained. Based on the pre-trained keyword extraction model, the user question text is semantically analyzed, the keywords are accurately extracted, and it is judged whether the user question text contains hot words. If the user question text contains hot words, the hot words contained in the user question text are marked as keywords. Correspondingly, if the user question text does not contain hot words, it is judged whether the user question text contains high-frequency words. If the user question text contains high-frequency words, the high-frequency words contained in the user question text are marked as keywords. Correspondingly, if the user question text does not contain high-frequency words, it is judged whether the user question text contains emotional words. If the user question text contains emotional words, the emotional words contained in the user question text are marked as keywords. Correspondingly, if the user question text does not contain emotional words, keyword screening and optimization are performed, and the business scenarios A and business scenarios related to the business that the target user group focuses on are selected. Business scenario A, business scenario B, business scenario C and other business scenarios, the data in the business scenarios are stored in separate databases to determine the database under business scenario A, the database under business scenario B, the database under business scenario C and the database under other business scenarios, based on keywords, the database under business scenario A, the database under business scenario B, the database under business scenario C and the database under other business scenarios are searched in separate databases, and the data with a correlation with the keyword is judged whether it exceeds a preset correlation threshold, and the data exceeding the correlation threshold is returned to the user as the target answer to realize the sorting and screening of the answers, if the keywords are not extracted by the pre-trained keyword extraction model according to the user's question text, based on the user's question text, through the pre-set inverted triangle tree-like rhetorical question model, rhetorical question options are generated for the user, so as to gradually focus on the core intention of the user's question text, and collect user feedback, if the user is not satisfied, adjust the rhetorical question strategy until the target answer is returned to the user, and the user feedback is satisfactory.

[0095] It can be understood that the higher the correlation between the data in a business scenario and the keyword, the higher the data in the business scenario is ranked.

[0096] In order to implement the above embodiment, the present application also proposes a question and answer processing device.

[0097] Figure 5 A structural diagram of a question and answer processing device provided in an embodiment of the present application.

[0098] like Figure 5 As shown, the question and answer processing device 500 includes: a first acquisition module 501, a semantic analysis module 502, a parsing module 503, a first determination module 504 and a second determination module 505.

[0099] The first acquisition module 501 is used to respond to the question and answer request instruction initiated by the user and acquire the user question text carried in the question and answer request instruction;

[0100] The semantic analysis module 502 is used to perform semantic analysis on the user question text based on the pre-trained keyword extraction model to extract keywords that reflect the core intent of the user question text;

[0101] A parsing module 503, configured to parse the keyword to determine at least one target business scenario associated with the keyword;

[0102] The first determination module 504 is used to perform a matching search in a pre-configured knowledge graph based on the target business scenario to determine a target database pre-created under the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases under each business scenario;

[0103] The second determination module 505 is used to search in the target database based on the keyword to determine data whose relevance to the keyword exceeds a preset relevance threshold, and return the data exceeding the relevance threshold as a target answer to the user.

[0104] In one embodiment of the present application, the semantic analysis module 502 is specifically used to:

[0105] Based on the hot words pre-configured in the keyword extraction model, whether there are words identical to the hot words in the user question text is judged to obtain a first judgment result; wherein the hot words are used to indicate words closely related to the business scenarios that the target user group focuses on;

[0106] When the first judgment result indicates that there is a word identical to the hot word in the user question text, the word identical to the hot word is used as the keyword;

[0107] In the case where the first judgment result indicates that there is no vocabulary identical to the hot word in the user question text, based on the keyword extraction model, whether there is a vocabulary identical to the high-frequency word in the user question text is judged to obtain a second judgment result;

[0108] In the case where the second judgment result indicates that there is a word identical to the high-frequency word in the user question text, using the word identical to the high-frequency word as a keyword;

[0109] When the first judgment result indicates that there is no word identical to the hot word in the user question text and the second judgment result indicates that there is no word identical to the high-frequency word in the user question text, based on the keyword extraction model, sentiment scoring is performed on each word in the user question text to determine the sentiment score corresponding to the emotional word contained in the user question text;

[0110] It is judged whether the emotion score corresponding to the emotional vocabulary exceeds the emotion score threshold. If the emotion score exceeds the emotion score threshold, the corresponding emotional vocabulary is used as a keyword.

[0111] In one embodiment of the present application, the semantic analysis module 502 is further specifically used for:

[0112] Based on the keyword extraction model, each word in the user's question text is analyzed to determine whether the user's question text contains emotional words;

[0113] If the user question text contains emotional words, the emotional words are scored to obtain the emotional scores corresponding to the emotional words.

[0114] In one embodiment of the present application, the semantic analysis module 502 is further specifically used for:

[0115] Performing semantic analysis on the at least two extracted keywords to obtain the similarity between the semantics of the keywords;

[0116] Merging at least two keywords whose similarity exceeds a preset similarity threshold to obtain a merged keyword;

[0117] The combined keywords are used as keywords for reflecting the core intent of the user's question text.

[0118] In one embodiment of the present application, the semantic analysis module 502 is further specifically used for:

[0119] Obtain the business scenarios that the target user group focuses on;

[0120] Analyze the at least two extracted keywords to determine the business scenarios associated with each keyword;

[0121] For the business scenarios associated with each keyword, determine whether the business scenarios associated with the keywords match the business scenarios that the target user group focuses on;

[0122] If there are business scenarios that do not match the business scenarios that the target user group focuses on, the keywords associated with the unmatched business scenarios will be removed.

[0123] In one embodiment of the present application, the device further includes a knowledge graph module, which is specifically used to:

[0124] Obtain multiple business scenarios related to the business that the target user group is interested in, and obtain data included in the business that the target user group is interested in;

[0125] According to the data division rules predefined for each business scenario, the data included in the business is divided to determine the data in each business scenario;

[0126] Based on the data in each business scenario, a database for storing data is constructed to obtain a database in each business scenario;

[0127] Determine the knowledge graph based on each business scenario and the semantic relationship between the database under each business scenario.

[0128] It should be noted that the above explanation of the question and answer processing method embodiment is also applicable to the question and answer processing device of this embodiment, and will not be repeated here.

[0129] The question-and-answer processing device provided by the present application obtains the user question text carried by the question-and-answer request instruction in response to the question-and-answer request instruction initiated by the user; performs semantic analysis on the user question text based on a pre-trained keyword extraction model to extract keywords used to reflect the core intent of the user question text; parses the keywords to determine at least one target business scenario associated with the keywords; performs matching searches in a pre-configured knowledge graph based on the target business scenario to determine a target database pre-created under the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases under each business scenario; searches in the target database based on the keywords to determine the correlation with the keywords Data that exceeds a preset relevance threshold, and data that exceeds the relevance threshold is returned to the user as the target answer. As a result, the core intent of the user's question text can be accurately predicted through a pre-trained keyword extraction model, and then the keywords used to reflect the core intent of the user's question text can be determined, and according to the business scenarios associated with the keywords, a search is performed from a preset knowledge graph to determine a business scenario that matches the business scenario associated with the keywords, and a database under the matched business scenario is determined. Through the keywords, a search is performed in the database under the matched business scenario to determine the answer to the user. Through the pre-configured knowledge graph, there is no need to search in a large number of databases, which causes low question and answer efficiency.

[0130] In an exemplary embodiment, an electronic device is also provided.

[0131] Among them, electronic equipment includes:

[0132] processor;

[0133] a memory for storing processor-executable instructions;

[0134] The processor is configured to execute instructions to implement the question and answer processing method proposed in any of the aforementioned embodiments.

[0135] As an example, Figure 6 is a schematic diagram of the structure of an electronic device 600 shown in an exemplary embodiment of the present disclosure, such as Figure 6 As shown, the electronic device 600 may further include:

[0136] The memory 610 and the processor 620, a bus 630 connecting different components (including the memory 610 and the processor 620), the memory 610 stores a computer program, and when the processor 620 executes the program, the question and answer processing method described in the embodiment of the present disclosure is implemented.

[0137] Bus 630 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0138] The electronic device 600 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 600, including volatile and non-volatile media, removable and non-removable media.

[0139] The memory 610 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 640 and / or cache memory 650. The server 600 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 660 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, often referred to as a "hard drive packager"). Although Figure 6 Not shown in the figure, a disk driver package for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk driver package for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each driver package can be connected to the bus 630 via one or more data medium interfaces. The memory 610 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0140] A program / utility 680 having a set (at least one) of program modules 670 may be stored, for example, in the memory 610, such program modules 670 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 670 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0141] The electronic device 600 may also communicate with one or more external devices 660 (e.g., keyboard, pointing device, display 691, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 692. In addition, the electronic device 600 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via a network adapter 693. As shown, the network adapter 693 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device driver package, redundant processing unit, external disk driver package array, RAID system, tape driver package, and data backup storage system, etc.

[0142] The processor 620 executes various functional applications and data processing by running the programs stored in the memory 610 .

[0143] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the question and answer processing method of the embodiment of the present disclosure, and will not be repeated here.

[0144] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to complete the question-answering processing method proposed in any of the above embodiments. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0145] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the question and answer processing method proposed in any of the above embodiments is implemented.

[0146] The collection, storage, access, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0147] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and not shared or sold outside of these legitimate accesses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice before the user accesses the function, and signing the agreement / authorization including authorization of relevant user information. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.

[0148] The present application is expected to provide an implementation scheme for users to selectively block access to or access to personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.

[0149] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0150] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0151] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0152] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0153] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or accessed as an independent product, it may also be stored in a computer-readable storage medium.

[0154] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A question-answering processing method, characterized in that: The following steps are involved: In response to a question-and-answer request instruction initiated by a user, obtaining a user question text carried in the question-and-answer request instruction; Based on a pre-trained keyword extraction model, semantic analysis is performed on the user question text to extract keywords that reflect the core intent of the user question text; Parsing the keyword to determine at least one target business scenario associated with the keyword; Based on the target business scenario, a matching search is performed in a preconfigured knowledge graph to determine a target database pre-created under the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases under each business scenario; Based on the keyword, a search is performed in the target database to determine data whose relevance to the keyword exceeds a preset relevance threshold, and the data exceeding the relevance threshold is returned to the user as a target answer.

2. The method according to claim 1, characterized in that: The pre-trained keyword extraction model performs semantic analysis on the user question text to extract keywords that reflect the core intent of the user question text, including: Based on the hot words preconfigured in the keyword extraction model, whether there are words identical to the hot words in the user question text is judged to obtain a first judgment result; wherein the hot words are used to indicate words closely related to the business scenarios that the target user group focuses on; When the first judgment result indicates that there is a word identical to the hot word in the user question text, using the word identical to the hot word as the keyword; In the case where the first judgment result indicates that there is no vocabulary identical to the hot word in the user question text, judging whether there is a vocabulary identical to the high-frequency word in the user question text based on the keyword extraction model to obtain a second judgment result; When the second judgment result indicates that there is a word identical to the high-frequency word in the user question text, using the word identical to the high-frequency word as the keyword; When the first judgment result indicates that there is no word identical to the hot word in the user question text and the second judgment result indicates that there is no word identical to the high-frequency word in the user question text, based on the keyword extraction model, sentiment scoring is performed on each word in the user question text to determine the sentiment score corresponding to the emotional words contained in the user question text; It is judged whether the emotion score corresponding to the emotional vocabulary exceeds the emotion score threshold. If the emotion score exceeds the emotion score threshold, the corresponding emotional vocabulary is used as the keyword.

3. The method according to claim 2, characterized in that When the first judgment result indicates that there is no word identical to the hot word in the user question text and the second judgment result indicates that there is no word identical to the high-frequency word in the user question text, based on the keyword extraction model, sentiment analysis is performed on each word in the user question text to determine the sentiment score corresponding to the emotional words contained in the user question text, including: Based on the keyword extraction model, each word in the user question text is analyzed to determine whether the user question text contains emotional words; If the user question text contains emotional words, the emotional words are scored to obtain emotional scores corresponding to the emotional words.

4. The method according to any one of claims 1 to 3, characterized in that: In the case of at least two keywords extracted, the method includes: Performing semantic analysis on the at least two extracted keywords to obtain the similarity between the semantics of the keywords; Merging at least two of the keywords whose similarity exceeds a preset similarity threshold to obtain a merged keyword; The merged keywords are used as the keywords for reflecting the core intention of the user's question text.

5. The method according to any one of claims 1 to 3, characterized in that: In the case of at least two keywords extracted, the method includes: Obtain the business scenarios that the target user group focuses on; Parsing the at least two extracted keywords to determine business scenarios associated with the keywords; For each business scenario associated with the keyword, judging whether the business scenario associated with the keyword matches the business scenario that the target user group focuses on; If there is a business scenario that does not match the business scenario that the target user group focuses on, the keywords associated with the unmatched business scenario will be removed.

6. The method according to claim 1, characterized in that The preconfigured knowledge graph is obtained in the following way: Acquire multiple business scenarios related to the business that the target user group is interested in, and acquire data included in the business that the target user group is interested in; According to the data division rules predefined for each of the business scenarios, the data included in the business is divided to determine the data in each of the business scenarios; Based on the data in each of the business scenarios, a database for storing the data is constructed to obtain the database in each of the business scenarios; The knowledge graph is determined based on each of the business scenarios and the semantic relationship between the database under each of the business scenarios.

7. A question-answer processing device, characterized in that: include: A first acquisition module, configured to respond to a question and answer request instruction initiated by a user and acquire a user question text carried in the question and answer request instruction; A semantic analysis module, used to perform semantic analysis on the user question text based on a pre-trained keyword extraction model to extract keywords that reflect the core intent of the user question text; A parsing module, used to parse the keyword to determine at least one target business scenario associated with the keyword; A first determination module is used to perform a matching search in a preconfigured knowledge graph based on the target business scenario to determine a target database pre-created under the target business scenario; wherein the knowledge graph is used to reflect multiple business scenarios and the semantic relationship between the databases under each business scenario; The second determination module is used to search the target database based on the keyword to determine data whose relevance to the keyword exceeds a preset relevance threshold, and return the data exceeding the relevance threshold as a target answer to the user.

8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.