Response method and apparatus, electronic device, and storage medium
By filtering and combining candidate answers from the question-and-answer knowledge base in banking operations, the target answer is determined, which solves the problem of inaccurate responses from intelligent customer service in various banking operations and achieves higher quality response services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN BANK CO LTD
- Filing Date
- 2022-10-11
- Publication Date
- 2026-06-23
AI Technical Summary
Existing intelligent customer service question-and-answer knowledge bases struggle to accurately respond to user inquiries when faced with various banking services.
By receiving questions to be processed, multiple candidate answers are selected from the question-and-answer knowledge base, combined into a set to be processed, and the similarity is calculated within the target business domain to determine the target answer for response.
It improves the accuracy and effectiveness of responses, enabling accurate answers to user questions in various banking scenarios.
Smart Images

Figure CN115630147B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of banking technology, specifically to a response method, apparatus, electronic device, and storage medium. Background Technology
[0002] Generally, applications will launch various services. For example, Ping An Bank has launched wealth management services, e-commerce services, and bank loan services.
[0003] Users inevitably encounter various problems while using applications and need to seek customer assistance. In response to these scenarios, intelligent customer service has emerged to alleviate the pressure of high volumes of inquiries from human customers.
[0004] In this system, the intelligent customer service responds to user questions based on a pre-maintained question-and-answer knowledge base. However, this knowledge base struggles to accurately answer user questions when faced with a wide variety of business scenarios. Summary of the Invention
[0005] This application provides a response method, apparatus, electronic device, and storage medium that can provide good response services for various banking services.
[0006] In a first aspect, embodiments of this application provide a response method, the method comprising:
[0007] The system receives input questions about banking services and identifies multiple candidate answers from a question-and-answer knowledge base. The similarity between the processed questions and the questions to be processed corresponding to each candidate answer is greater than a first preset threshold.
[0008] The questions to be processed are combined with each candidate answer and its corresponding processed question to form a first set to be processed, resulting in multiple sets of first sets to be processed.
[0009] Determine the target business domain to which multiple sets of first sets to be processed belong, and determine the intra-group similarity of each set of first sets to be processed within the target business domain;
[0010] Based on the intra-group similarity of the first set of questions to be processed in each group, the target answer is determined from multiple candidate answers, and the question to be processed is answered according to the target answer.
[0011] Secondly, embodiments of this application also provide a response device, comprising:
[0012] The input response module receives input questions for banking services and identifies multiple candidate answers from the question-and-answer knowledge base. The similarity between the processed questions and the question to be processed corresponding to each candidate answer is greater than a first preset threshold.
[0013] The answer processing module is used to combine the questions to be processed with each candidate answer and its corresponding processed questions to form a first set to be processed, resulting in multiple sets of first sets to be processed.
[0014] The answer sorting module is used to determine the target business domain to which multiple sets of first sets to be processed belong, and to determine the intra-group similarity of each set of first sets to be processed within the target business domain;
[0015] The response module is used to determine the target answer from multiple candidate answers based on the intra-group similarity of each first set of questions to be processed, and to respond to the questions to be processed based on the target answer.
[0016] Thirdly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when run on a computer, causes the computer to execute a response method as provided in any embodiment of this application.
[0017] Fourthly, embodiments of this application also provide an electronic device, including a processor and a memory, the memory having a computer program, and the processor executing a response method as provided in any embodiment of this application by calling the computer program.
[0018] The technical solution provided in this application, targeting pending questions in banking services, firstly filters out multiple candidate answers from a question-and-answer knowledge base, where these candidate answers are relevant to the pending questions. Then, the pending questions are combined with each candidate answer and its corresponding processed question to form a first pending set, thereby determining the target business domain to which multiple first pending sets belong, strengthening the association between each first pending set and its corresponding target business domain. Finally, within the target business domain, the intra-group similarity of each first pending set is determined, enabling the intra-group similarity to more accurately indicate the association between each candidate answer and the target business domain. This allows for further filtering of more accurate target answers from multiple candidate answers based on intra-group similarity, thus effectively responding to the pending questions and providing users with higher-quality response services. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram illustrating an application scenario of the response method provided in the embodiments of this application.
[0021] Figure 2 This is a flowchart illustrating the response method provided in an embodiment of this application.
[0022] Figure 3 This is a schematic diagram of the first neural network model in the response method provided in the embodiments of this application.
[0023] Figure 4 This is a schematic diagram of a question-and-answer community in the response method provided in the embodiments of this application.
[0024] Figure 5 This is a schematic diagram of the second neural network model in the response method provided in the embodiments of this application.
[0025] Figure 6 This is a schematic diagram of the structure of the response device provided in the embodiments of this application.
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.
[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] This application provides a response method, the execution subject of which can be the response device provided in this application, or an electronic device integrating the response device. The response device can be implemented in hardware or software, and the electronic device can be a smartphone, tablet computer, PDA, desktop computer, or similar device.
[0030] To better understand the solutions provided in the embodiments of this application, an application scenario is provided here, which is a banking business scenario. Please refer to... Figure 1 , Figure 1This is a schematic diagram illustrating an application scenario of the response method provided in this application. For example, a user uses a bank's app, which offers e-commerce, storage, stock, and bond services. When a user has a question, they can open a customer service window and enter their question. The bank's app receives the entered question and provides corresponding answer prompts in the customer service window to respond to the user's question, thereby providing a response service.
[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating the response method provided in an embodiment of this application. The specific flow of the response method provided in this embodiment of the application can be as follows:
[0032] 101. Receive input questions for banking services and identify multiple candidate answers from the question-and-answer knowledge base. The similarity between the processed questions and the questions to be processed corresponding to each candidate answer is greater than a first preset threshold.
[0033] The input method for the question to be processed can be any of the following: text input, handwriting input, voice input, etc. When the electronic device receives the input question to be processed, it matches the processed question with the corresponding question from the question-and-answer knowledge base, and then uses the answer of the processed question as a candidate answer.
[0034] For example, the question to be processed can be identified first to determine whether it is a question related to banking business. If it is, it can be processed. If not, it can be regarded as an invalid question and ignored, thereby avoiding accidental triggering.
[0035] The question-answering knowledge base contains a massive number of question-answer pairs, each consisting of a processed question and an answer. Specifically, when identifying multiple candidate answers from the knowledge base, this involves matching multiple question-answer pairs corresponding to processed questions and then using the answers from these pairs as candidate answers. This method achieves initial screening of question-answer pairs, selecting a subset of candidate answers from the knowledge base that can address the questions yet to be processed.
[0036] 102. Combine the questions to be processed with each candidate answer and its corresponding processed question to form a first set to be processed, resulting in multiple sets of first sets to be processed.
[0037] For each candidate answer, there is a corresponding processed question that makes up the question-answer pair. The unprocessed questions are copied multiple times, with one unprocessed question added to each candidate answer's question-answer pair, forming a first unprocessed set. The number of unprocessed sets is the same as the number of candidate answers.
[0038] 103. Determine the target business domain to which multiple sets of first sets to be processed belong, and determine the intra-group similarity of each set of first sets to be processed within the target business domain.
[0039] This system pre-defines multiple business domains, including but not limited to: wealth management, storage, e-commerce, and insurance. By assigning multiple sets of initial pending data to a target business domain within these domains, the system achieves domain determination for each set, thus improving domain relevance.
[0040] For example, given the diverse range of business domains and the emergence of new domains as technology advances, a shared domain is pre-defined to improve the accuracy of domain identification. This shared domain can be applied to any business domain. When multiple sets of first-to-be-processed data cannot be assigned to a single accurate business domain, they can be classified into the shared domain. In this case, the shared domain is set as the target business domain corresponding to the multiple sets of first-to-be-processed data.
[0041] Specifically, within the target business domain, the intra-group similarity of each group of the first set to be processed is calculated; that is, the intra-group similarity of each group is determined by the similarity calculation function based on the target business domain. The intra-group similarity indicates the similarity between the question to be processed, the candidate answer, and the processed question.
[0042] 104. Based on the intra-group similarity of the first set of questions to be processed in each group, determine the target answer from multiple candidate answers, and respond to the questions to be processed based on the target answer.
[0043] Once the intra-group similarity is obtained, the groups can be sorted, and the top-ranked first set of candidates to be processed can be selected. The target answer can then be determined from this first set of candidates. The target answer can be one or more candidate answers from the first set of candidates to be processed, depending on the specific requirements.
[0044] Once the target answer is obtained, the system can respond to the question to be processed, thus providing the target answer to the user.
[0045] In practice, this application is not limited by the execution order of the described steps. Without causing conflicts, some steps may be performed in other orders or simultaneously.
[0046] The response method in this application embodiment can initially screen the question-and-answer knowledge base to select multiple candidate answers. Then, by combining the question to be processed with the multiple candidate answers, multiple first sets to be processed are obtained. By calculating the intra-group similarity of these multiple first sets to be processed, the target answer can be filtered from the multiple candidate answers into a smaller range, which can greatly improve the screening efficiency. Furthermore, the intra-group similarity is calculated based on the target business domain, which can more accurately determine the target answer through domain segmentation. This method is applicable to various banking businesses, enabling accurate responses to user questions in scenarios with multiple banking services, improving response effectiveness, and providing users with a good response service.
[0047] In some embodiments, an input query for banking services is received, and multiple candidate answers are determined from a question-and-answer knowledge base, including:
[0048] Receive input queries related to banking services and identify keywords in the queries.
[0049] The BM25 algorithm is used to calculate the similarity between processed questions and unprocessed questions in the question-answering knowledge base, and the answers corresponding to processed questions with similarity greater than a first preset threshold are determined as candidate answers.
[0050] Among them, the BM25 algorithm (Okapi BM25) is an algorithm used in the field of information retrieval to calculate the similarity between keywords and text.
[0051] For example, the question to be processed may contain one or more keywords. After identifying the keywords, if there are no processed questions with similarity scores greater than a first preset threshold, the keywords can be expanded by performing semantic understanding on them and converting them into another similar keyword, which is a commonly used question term. Then, the similarity score between this other keyword and processed questions in the question-and-answer knowledge base is calculated using the BM25 algorithm to obtain multiple candidate answers.
[0052] In some embodiments, determining the target business domain to which multiple sets of first sets to be processed belong, and determining the intra-group similarity of each set of first sets to be processed within the target business domain, includes:
[0053] The business domain identification module in the pre-trained first neural network model performs domain identification processing on multiple sets of first sets to be processed to obtain the target business domain to which multiple sets of first sets to be processed belong. The first neural network model also includes multiple similarity calculation modules.
[0054] Identify the target similarity calculation module that matches the target business domain from multiple similarity calculation modules;
[0055] The similarity calculation module performs similarity calculation on each group of first sets to be processed to obtain the intra-group similarity of each group of first sets to be processed.
[0056] Please see Figure 3 , Figure 3 This is a schematic diagram of the first neural network model in the response method provided in this application embodiment. The first neural network model includes a business domain identification module and multiple similarity calculation modules.
[0057] By inputting multiple sets of first-to-be-processed data into a first neural network model, the business domain identification module can extract features from these sets and then match them with multiple preset business domains based on the extracted features to obtain a matching degree. The preset business domain with the highest matching degree is then selected as the target business domain. This preset business domain includes the aforementioned multiple business domains and a shared domain. Alternatively, when all matching degrees are no greater than a preset matching degree, the shared domain can be identified as the target business domain.
[0058] The system pre-sets the relationship between preset business domains and similarity calculation modules. Once the preset business domain is determined, a target similarity calculation module can be selected from multiple similarity calculation modules.
[0059] Each similarity calculation module has model parameters corresponding to its business domain, enabling it to better calculate the intra-group similarity of the first set of objects to be processed belonging to that business domain. By inputting multiple sets of first sets of objects to be processed into the target similarity calculation module for similarity calculation, the intra-group similarity of each set of first sets of objects to be processed can be obtained.
[0060] The first neural network model may include at least one of the following: RoBERTa model, BERT model, XLNet model, etc.
[0061] In some embodiments, this application also provides a model training method to obtain a trained first neural network model. The training method is as follows:
[0062] Obtain training sets for multiple preset domains. Each preset domain training set includes multiple training data related to that preset domain. Each training data includes a preset question to be processed, a preset processed question, and a preset answer.
[0063] By inputting training sets from multiple predefined domains into the first neural network model, the mapping relationship between each training data point is learned, thereby obtaining the trained first neural network model.
[0064] In some embodiments, a target answer is determined from multiple candidate answers based on the intra-group similarity of each first set of questions to be processed, and a response is given to the question to be processed based on the target answer.
[0065] After obtaining the intra-group similarity of each first set to be processed, the first sets to be processed can be sorted in descending order according to the intra-group similarity, and then the top N first sets to be processed can be selected to extract the target answer from these top N first sets to be processed. Here, N is a positive integer greater than 1.
[0066] For example, when responding to a question based on the target answer, the target answer can be returned to the user according to the path through which the question was entered. For instance, if the user enters the question in text, the target answer is provided in text. If the user enters the question in voice, the target answer is provided in voice. There are various implementation methods, and the user can also choose their own response method; no limitation is set here.
[0067] In some embodiments, before receiving input of a pending question related to banking services and determining multiple candidate answers from a question-and-answer knowledge base, the method further includes:
[0068] Retrieve the set of community questions and their corresponding community answers from the Q&A community;
[0069] Select the target answer from the community answer set, and pair the target answer with its corresponding community question to form a question-answer pair, which is then added to the question-answer knowledge base.
[0070] In banking apps, there are windows for users to ask questions. These questions and answers are called community Q&A. The way different applications set up community Q&A windows is not limited here. On one hand, the Q&A community in the embodiments can be a Q&A community provided by an app within an electronic device, a Q&A community loaded from a server, or a Q&A community on a webpage; the specific form is not limited here. Specifically, when the method of this embodiment is applied to the intelligent robot customer service of a banking app, the Q&A community can refer to the Q&A community in the bank's SPP (Service Provider Interface).
[0071] Please see Figure 4 , Figure 4 This diagram illustrates a question-and-answer community within the response method provided in this application embodiment. In this community, users can ask questions, which become publicly visible after being posted. Other users can then enter their responses in the answer box. A single question can include multiple related answers. Figure 4As shown, the question is: Can minors open debit card accounts? This question includes two supplementary answers. The first answer is: It can be handled by a guardian. The second answer is: The guardian can go to a bank branch with their own and the minor's identification documents; for details, please consult the bank branch. The first answer and the question can be combined into one question-and-answer pair, and the second answer and the question can be combined into another question-and-answer pair, and then these two question-and-answer pairs can be added to the question-and-answer knowledge base.
[0072] Specifically, when selecting target answers from the community response set, the selected answers are those relevant to the community questions and effectively address them. Invalid answers are filtered out to avoid providing users with invalid answers as target responses.
[0073] Understandably, Q&A communities contain a large number of community questions and their corresponding sets of answers. The answer set for each community question can be filtered one by one to obtain the target answer for each question. Compared to existing technologies, this avoids the need for a manually oriented Q&A knowledge base and allows for the batch selection of question-answer pairs from the Q&A community based on business domains to be added to the Q&A knowledge base, enriching its storage capacity and facilitating responses to various types of questions.
[0074] For example, the question-and-answer knowledge base also includes question-and-answer pairs that are manually maintained in advance. Regardless of whether the question-and-answer pairs in the question-and-answer knowledge base are manually maintained or come from the question-and-answer community, when they are applied to answer questions to be processed, the question or community question in each question-and-answer pair is referred to as the processed question as mentioned in the above embodiment, and the community reply or answer in each question-and-answer pair is referred to as the answer as mentioned in the above embodiment.
[0075] In some embodiments, selecting target responses from a set of community responses includes:
[0076] Invalid answers are filtered out from the community answer set according to the preset keyword filtering list to obtain a candidate answer set. Among them, the similarity between the keywords in the invalid answers and any preset keywords in the preset keyword filtering list is greater than the second preset threshold.
[0077] Based on the community question, the target answer is selected from the candidate answer set, where the relevance between the target answer and the community question is greater than a preset relevance threshold.
[0078] The preset keyword filter list includes multiple preset keywords, which can be sensitive words, advertising terms, impolite words, and invalid words. Invalid words refer to words that cannot be used to answer community questions, such as "don't know," "not clear," "don't understand," or "find customer service."
[0079] By performing keyword identification on each community response in the community response set, it is determined whether any keyword from the preset keyword filtering list exists. If so, it is considered an invalid response and is filtered out from the community response set.
[0080] For example, when identifying keywords in each community response, the keywords in the community response can be matched with preset keywords in a preset keyword filter list, and the community response corresponding to the successfully matched keyword can be determined as an invalid response. Here, a successful match between a keyword in the community response and any preset keyword in the preset keyword filter list means that the similarity between the two is greater than a second preset threshold.
[0081] A single community response can contain multiple keywords that match multiple preset keywords in a preset keyword filter list. As an example, the invalidity of a community response can be determined based on the number of successfully matched keywords. For instance, if the percentage of successfully matched keywords exceeds a preset percentage, the response is considered invalid; otherwise, it is not invalid and can be considered a candidate response.
[0082] For example, the preset keyword filtering list can be dynamically updated based on data from the Q&A community and the target answer used in the responses. Specifically, if new sensitive words, advertising terms, impolite words, or invalid words appear in the Q&A community, these words can be added to the preset keyword filtering list. If there are question-answer pairs in the Q&A knowledge base that are not selected for a long time, they can be removed from the Q&A knowledge base, thereby improving the efficiency of matching target answers from the Q&A knowledge base.
[0083] A target answer is the accurate and valid response to a community question. A community question can have one or more target answers, depending on the specific circumstances. When there are multiple target answers, they may indicate different paths to achieve the problem in the community question, or the multiple target answers may essentially convey the same meaning.
[0084] In some embodiments, selecting a target answer from a set of candidate answers based on a community question includes:
[0085] Each pair of candidate responses in the candidate response set is combined with a community question to form a second set to be processed, resulting in multiple sets of second sets to be processed.
[0086] The relevance of multiple sets of second-to-be-processed datasets is identified using a pre-trained second neural network model, and the relevance identification results are obtained.
[0087] The target response is determined from the candidate response set based on the relevance identification results.
[0088] Specifically, for every two candidate answers in the candidate answer set, a community question is copied multiple times, and a community question is added to every two candidate answers, forming a second set to be processed. The number of items in the second set to be processed is less than the number of candidate answers in the candidate answer set.
[0089] Please see Figure 5 , Figure 5 This diagram illustrates the second neural network model in the response method provided in this application. Multiple sets of second question-to-process sets are input into the second neural network model for relevance identification to obtain the intra-group relevance of each set. The second neural network model is a symmetric model; after inputting the second question-to-process sets, each set is split into two question-answer pairs, which are then processed by the symmetric second neural network model. For example, the second question-to-process set might be represented as (community question, candidate answer 1, candidate answer 2), and the two question-answer pairs might be represented as (community question, candidate answer 1) and (community question, candidate answer 2), respectively.
[0090] In this embodiment, by obtaining the intra-group relevance of each second set of questions to be processed, wherein the intra-group relevance can describe the relevance between each candidate response and the community question, a high-quality candidate response is selected from every two candidate responses, and then a high-quality candidate response is determined from all the second sets of questions to be processed, so as to determine the high-quality candidate response as the target response, or to determine the target response from the high-quality candidate responses.
[0091] Understandably, by setting two candidate responses in the second set of responses to be processed in each group, it is easier to distinguish the quality of these two candidate responses, which is reflected in whether they accurately resolve the community question. For example, the community question is: "Is there an annual fee for the first year of the Platinum card?" One candidate response is: "There is an annual fee." Another candidate response is: "There is no annual fee." In this case, it is necessary to judge the candidate responses to select the correct one as the higher-quality response. Therefore, the method provided in this embodiment not only filters the target response to ensure it is a valid response, but also ensures that the valid response is not an incorrect response, thus achieving the judgment of the correctness of the target response and enabling the target response to resolve the community question.
[0092] In some embodiments, determining the target response from the candidate response set based on the relevance identification result includes:
[0093] Based on the relevance of each pair of candidate responses in each second set to be processed to the community question, as indicated by the relevance identification results, the candidate responses in the candidate response set are sorted to obtain the sorting results;
[0094] A predetermined number of target responses are determined from the sorting results.
[0095] The relevance identification result represents the intra-group relevance of multiple sets of second-to-be-processed responses. The intra-group relevance of a set of second-to-be-processed responses represents the relevance between each pair of candidate responses and the community question. Based on the relevance, the response that is closer to the community question can be determined from each pair of candidate responses. The candidate response with the highest relevance is then compared with the other candidate response with the highest relevance in the second-to-be-processed responses of other sets. The one with the highest relevance is selected, and so on. This allows all candidate responses to be sorted according to relevance, and the target response can be selected based on the sorting.
[0096] For example, in this embodiment, a preset number of target responses can be set in advance, and then a preset number of target responses ranked first can be selected according to the preset number. The preset number can be one or more, specifically set according to actual needs. Of course, the number of target responses can also be determined based on the number of candidate responses; for example, if there are many candidate responses, a larger number of target responses can be selected, and if there are few candidate responses, a smaller number of target responses can be selected.
[0097] In some embodiments, before obtaining the relevance identification results by performing relevance identification on multiple second sets to be processed using a pre-trained second neural network model, the method further includes:
[0098] Obtain the training set, which includes multiple training data sets, including the first question-answer pair and the second question-answer pair. Both the first and second question-answer pairs contain preset questions, and the accuracy of the first answer in the first question-answer pair is higher than the accuracy of the second answer in the second question-answer pair.
[0099] The second neural network model is trained using the training set, and the similarity between the first question and answer pairs and the similarity between the second question and answer pairs are obtained.
[0100] The model parameters are adjusted based on the similarity between the first and second question-answers until the model converges, resulting in a well-trained second neural network model.
[0101] Continue reading Figure 5 When training the second neural network model using the training set, the training set is input into the second neural network model. Each piece of data in the training set is split into a first question-answer pair and a second question-answer pair by a triplet. A triplet includes a preset question and its corresponding first answer and second answer. The first question-answer pair includes the preset question and the first answer, and the second question-answer pair includes the preset question and the second answer.
[0102] The second neural network model is trained by inputting each piece of training data into it to learn the mapping relationship between the preset question and its corresponding first and second answers for each piece of training data. Finally, the second neural network model outputs a first question-answer similarity score and a second question-answer similarity score, where the first question-answer similarity score represents the similarity between the first question-answer pairs, and the second question-answer similarity score represents the similarity between the second question-answer pairs. A loss value is determined based on the first and second question-answer similarities, and the model parameters are adjusted using this loss value until the model converges, resulting in the trained second neural network model.
[0103] As described above, the response method proposed in this embodiment of the invention automatically maintains the question-and-answer knowledge base to crawl question-and-answer data from community Q&A, then filters the question-and-answer data to select effective candidate answers, and uses a second neural network model to measure the accuracy of candidate answers in the candidate answer set, thereby selecting the target answer that can accurately solve the community question, and adding the community question and its corresponding target answer as a question-and-answer pair to the question-and-answer knowledge base. Subsequently, candidate answers to the question to be processed can be matched from the application question-and-answer knowledge base, and then the first neural network model is used to sort the candidate answers to select the target answer. The first neural network model can perform domain segmentation of multiple candidate answers to calculate the similarity between each candidate answer and the question to be processed within its corresponding target business domain, thereby accurately determining the target answer. This method is applicable to various banking businesses, enabling accurate responses to user questions in scenarios with multiple banking services, improving response effectiveness, and providing users with excellent response services.
[0104] In one embodiment, a response device is also provided. See also... Figure 6 , Figure 6 This is a schematic diagram of the structure of a response device 200 provided in an embodiment of this application. The response device 200 is applied to an electronic device and includes:
[0105] The input response module 201 receives the input question to be processed regarding banking business and determines multiple candidate answers from the question-and-answer knowledge base. The similarity between the processed question and the question to be processed corresponding to each candidate answer is greater than a first preset threshold.
[0106] Answer processing module 202 is used to combine the question to be processed with each candidate answer and its corresponding processed question to form a first set to be processed, thereby obtaining multiple sets of first sets to be processed;
[0107] The answer sorting module 203 is used to determine the target business domain to which multiple sets of first sets to be processed belong, and to determine the intra-group similarity of each set of first sets to be processed within the target business domain;
[0108] The response module 204 is used to determine the target answer from multiple candidate answers based on the intra-group similarity of each first set to be processed, and to respond to the question to be processed based on the target answer.
[0109] In some embodiments, the answer sorting module 203 is further configured to:
[0110] The business domain identification module in the pre-trained first neural network model performs domain identification processing on multiple sets of first sets to be processed to obtain the target business domain to which multiple sets of first sets to be processed belong. The first neural network model also includes multiple similarity calculation modules.
[0111] Identify the target similarity calculation module that matches the target business domain from multiple similarity calculation modules;
[0112] The similarity calculation module performs similarity calculation on each group of first sets to be processed to obtain the intra-group similarity of each group of first sets to be processed.
[0113] In some embodiments, the response device 200 further includes a question-and-answer knowledge base maintenance module, used for:
[0114] Retrieve the set of community questions and their corresponding community answers from the Q&A community;
[0115] Select the target answer from the community answer set, and pair the target answer with its corresponding community question to form a question-answer pair, which is then added to the question-answer knowledge base.
[0116] In some embodiments, the question-and-answer knowledge base maintenance module is also used for:
[0117] Select target answers from the community response collection, including:
[0118] Invalid answers are filtered out from the community answer set according to the preset keyword filtering list to obtain a candidate answer set. Among them, the similarity between the keywords in the invalid answers and any preset keywords in the preset keyword filtering list is greater than the second preset threshold.
[0119] Based on the community question, the target answer is selected from the candidate answer set, where the relevance between the target answer and the community question is greater than a preset relevance threshold.
[0120] In some embodiments, the question-and-answer knowledge base maintenance module is also used for:
[0121] Each pair of candidate responses in the candidate response set is combined with a community question to form a second set to be processed, resulting in multiple sets of second sets to be processed.
[0122] The relevance of multiple sets of second-to-be-processed datasets is identified using a pre-trained second neural network model, and the relevance identification results are obtained.
[0123] The target response is determined from the candidate response set based on the relevance identification results.
[0124] In some embodiments, the question-and-answer knowledge base maintenance module is also used for:
[0125] Based on the relevance of each pair of candidate responses in each second set to be processed to the community question, as indicated by the relevance identification results, the candidate responses in the candidate response set are sorted to obtain the sorting results;
[0126] A predetermined number of target responses are determined from the sorting results.
[0127] In some embodiments, the question-and-answer knowledge base maintenance module is also used for:
[0128] Obtain the training set, which includes multiple training data points, including the first question-answer pair and the second question-answer pair. In the first question-answer pair, the accuracy of the first answer is higher than the accuracy of the second answer in the second question-answer pair.
[0129] The second neural network model is trained using the training set to obtain the first question-answer similarity corresponding to the first question-answer pair and the second question-answer similarity corresponding to the second question-answer pair.
[0130] The model parameters are adjusted based on the similarity between the first and second question-answers until the model converges, resulting in a well-trained second neural network model.
[0131] It should be noted that the response device 200 provided in this application embodiment belongs to the same concept as the response method in the above embodiment. The response device 200 can implement any of the methods provided in the response method embodiment. For details of its implementation process, please refer to the response method embodiment, which will not be repeated here.
[0132] As described above, the response device 200 proposed in this application automatically maintains the question-and-answer knowledge base to crawl question-and-answer data from community question-and-answer platforms. It then filters the question-and-answer data to select valid candidate answers and uses a second neural network model to measure the accuracy of candidate answers in the candidate answer set. This allows for the selection of target answers that accurately resolve community questions, and the community question and its corresponding target answer are then added to the question-and-answer knowledge base as a question-and-answer pair. Subsequently, candidate answers to the question to be processed can be matched from the application question-and-answer knowledge base, and the first neural network model is used to sort the candidate answers to select the target answer. The first neural network model can perform domain segmentation on multiple candidate answers to calculate the similarity between each candidate answer and the question to be processed within its corresponding target business domain. This allows for accurate determination of the target answer, and this method is applicable to various banking businesses. It enables accurate responses to user questions in scenarios with multiple banking services, improving response effectiveness and providing users with excellent response services.
[0133] This application also provides an electronic device, which may be a smartphone, tablet computer, PDA, desktop computer, or similar device. Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0134] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the electronic device 300 and processes data, thereby monitoring the electronic device 300 as a whole.
[0135] In this embodiment, the processor 301 in the electronic device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to realize various functions:
[0136] The system receives input questions about banking services and identifies multiple candidate answers from a question-and-answer knowledge base. The similarity between the processed questions and the questions to be processed corresponding to each candidate answer is greater than a first preset threshold.
[0137] The questions to be processed are combined with each candidate answer and its corresponding processed question to form a first set to be processed, resulting in multiple sets of first sets to be processed.
[0138] Determine the target business domain to which multiple sets of first sets to be processed belong, and determine the intra-group similarity of each set of first sets to be processed within the target business domain;
[0139] Based on the intra-group similarity of the first set of questions to be processed in each group, the target answer is determined from multiple candidate answers, and the question to be processed is answered according to the target answer.
[0140] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0141] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0142] As described above, the electronic device provided in this embodiment automatically maintains the question-and-answer knowledge base to crawl question-and-answer data from community Q&A, then filters the question-and-answer data to select effective candidate answers, and uses a second neural network model to measure the accuracy of candidate answers in the candidate answer set, thereby selecting the target answer that can accurately solve the community question, and adding the community question and its corresponding target answer as a question-and-answer pair to the question-and-answer knowledge base. Afterwards, it can also match candidate answers to the question to be processed from the application question-and-answer knowledge base, and then use a first neural network model to sort the candidate answers to filter out the target answer. The first neural network model can perform domain segmentation of multiple candidate answers to calculate the similarity between each candidate answer and the question to be processed within its corresponding target business domain, thereby accurately determining the target answer. This method is applicable to various banking businesses, enabling accurate responses to user questions in scenarios with multiple banking services, improving response effectiveness, and providing users with excellent response services.
[0143] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0144] Therefore, this application provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes the following steps:
[0145] The system receives input questions about banking services and identifies multiple candidate answers from a question-and-answer knowledge base. The similarity between the processed questions and the questions to be processed corresponding to each candidate answer is greater than a first preset threshold.
[0146] The questions to be processed are combined with each candidate answer and its corresponding processed question to form a first set to be processed, resulting in multiple sets of first sets to be processed.
[0147] Determine the target business domain to which multiple sets of first sets to be processed belong, and determine the intra-group similarity of each set of first sets to be processed within the target business domain;
[0148] Based on the intra-group similarity of the first set of questions to be processed in each group, the target answer is determined from multiple candidate answers, and the question to be processed is answered according to the target answer.
[0149] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0150] The aforementioned storage medium can be ROM / RAM, magnetic disk, optical disk, etc. Since the computer program stored in the storage medium can execute the steps of any of the response methods provided in the embodiments of this application, it can achieve the beneficial effects that any of the response methods provided in the embodiments of this application can achieve, as detailed in the preceding embodiments, and will not be repeated here.
[0151] The foregoing has provided a detailed description of a response method, apparatus, medium, and electronic device provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A response method, characterized in that, include: The system receives input questions about banking services and identifies multiple candidate answers from a question-and-answer knowledge base. The similarity between the processed questions and the question to be processed corresponding to each candidate answer is greater than a first preset threshold. The question to be processed is combined with each candidate answer and its corresponding processed question to form a first set to be processed, resulting in multiple sets of the first set to be processed. Determine the target business domain to which multiple sets of the first set to be processed belong, and determine the intra-group similarity of each set of the first set to be processed within the target business domain; Based on the intra-group similarity of each group of the first set to be processed, a target answer is determined from multiple candidate answers, and the question to be processed is answered based on the target answer; The step of determining the target business domain to which multiple sets of the first sets to be processed belong, and determining the intra-group similarity of each set of the first sets to be processed within the target business domain, includes: The business domain identification module in the pre-trained first neural network model performs domain identification processing on multiple sets of the first to be processed to obtain the target business domain to which multiple sets of the first to be processed belong. The first neural network model also includes multiple similarity calculation modules. From the plurality of similarity calculation modules, determine the target similarity calculation module that matches the target business domain; The target similarity calculation module performs similarity calculation on each group of the first set to be processed to obtain the intra-group similarity of each group of the first set to be processed.
2. The method according to claim 1, characterized in that, Before receiving the input query for banking services and identifying multiple candidate answers from a question-and-answer knowledge base, the method further includes: Retrieve the set of community questions and their corresponding community answers from the Q&A community; Select the target answer from the community answer set, and combine the target answer with its corresponding community question to form a question-answer pair, which is then added to the question-answer knowledge base.
3. The method according to claim 2, characterized in that, The step of selecting target answers from the community answer set includes: Invalid responses are filtered out from the community response set according to a preset keyword filtering list to obtain a candidate response set, wherein the similarity between the keywords in the invalid responses and any preset keywords in the preset keyword filtering list is greater than a second preset threshold. Based on the community question, the target answer is selected from the candidate answer set, wherein the relevance between the target answer and the community question is greater than a preset relevance threshold.
4. The method according to claim 3, characterized in that, The step of selecting the target answer from the candidate answer set based on the community question includes: Each pair of candidate responses in the candidate response set is combined with the community question to form a second set to be processed, resulting in multiple sets of second sets to be processed. The relevance of multiple sets of the second set to be processed is identified by a pre-trained second neural network model, and the relevance identification results are obtained. The target response is determined from the candidate response set based on the relevance identification results.
5. The method according to claim 4, characterized in that, The step of determining the target response from the candidate response set based on the relevance identification result includes: Based on the relevance of each pair of candidate responses in each group of the second set to be processed to the community question, as indicated by the relevance identification result, the candidate responses in the candidate response set are sorted to obtain a sorting result; A preset number of target responses are determined from the sorting results.
6. The method according to claim 4 or 5, characterized in that, Before obtaining the relevance identification results by performing relevance identification on multiple second sets to be processed using a pre-trained second neural network model, the method further includes: Obtain a training set, wherein the training set includes multiple training data points, including a first question-answer pair and a second question-answer pair, wherein the accuracy of the first answer in the first question-answer pair is higher than the accuracy of the second answer in the second question-answer pair; The second neural network model is trained using the training set to obtain the first question-answer similarity corresponding to the first question-answer pair and the second question-answer similarity corresponding to the second question-answer pair; The model parameters are adjusted based on the similarity between the first and second questions and answers until the model converges, resulting in a trained second neural network model.
7. A response device, characterized in that, include: The input response module receives an input question for banking business and determines multiple candidate answers from the question-and-answer knowledge base. The similarity between the processed question and the question to be processed corresponding to each candidate answer is greater than a first preset threshold. The answer processing module is used to combine the question to be processed with each candidate answer and its corresponding processed question to form a first set to be processed, thereby obtaining multiple sets of the first set to be processed; The answer sorting module is used to determine the target business domain to which multiple sets of the first set to be processed belong, and to determine the intra-group similarity of each set of the first set to be processed within the target business domain; The response module is used to determine the target answer from multiple candidate answers based on the intra-group similarity of each group of the first set to be processed, and to respond to the question to be processed based on the target answer; The answer sorting module is also used for: The business domain identification module in the pre-trained first neural network model performs domain identification processing on multiple sets of the first to be processed to obtain the target business domain to which multiple sets of the first to be processed belong. The first neural network model also includes multiple similarity calculation modules. From the plurality of similarity calculation modules, determine the target similarity calculation module that matches the target business domain; The target similarity calculation module performs similarity calculation on each group of the first set to be processed to obtain the intra-group similarity of each group of the first set to be processed.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run on a computer, it causes the computer to perform the response method as described in any one of claims 1 to 6.
9. An electronic device comprising a processor and a memory, the memory storing a computer program, characterized in that, The processor executes the response method as described in any one of claims 1 to 6 by invoking the computer program.