Online customer service reply generation method and device

By using bank knowledge library and risk level identification technology in the online intelligent customer service system, more emotional and comprehension reply text is generated, which solves the problem of limited understanding ability in the existing technology and improves user experience and service efficiency.

CN119691129APending Publication Date: 2025-03-25WUHAN ZBANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411838506.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing online intelligent customer service system regenerates replies through voice to text, resulting in limited comprehension ability, difficulty in identifying user emotions, and affecting user experience.

Method used

By collecting user voice signals, converting them into text and pre-processing, searching based on a pre-constructed bank knowledge library, identifying the risk level of user text, and generating reply text in combination with risk level and question answer pairs.

Benefits of technology

It improves the service efficiency of online customer service responses, enhances the understanding and response to user emotions, improves user experience, reduces the risk of complaints, and reduces the need for manual customer service intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691129A_ABST
    Figure CN119691129A_ABST
Patent Text Reader

Abstract

The invention provides an online customer service reply generation method and device, and the method comprises the steps: collecting a user voice signal, converting the user voice signal into a text, and carrying out the preprocessing, and obtaining a user text; retrieving in a pre-constructed bank knowledge graph library based on the user text to obtain question answer pairs and work order information corresponding to the user text; the risk level of the user text is identified based on the work order information, a prompt template is determined according to the risk level, the question answer pair and the prompt template are combined into input of a large language model, and a reply text output by the large language model is obtained. According to the method, the reply text for the user is generated based on the risk level of the user text and the question answer pair, so that the reply verbal skill is improved in the aspects of expressing the understanding and the same situation, keeping the endurance and polite and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and device for generating online customer service responses. Background Art

[0002] With the rapid development of artificial intelligence technology, intelligent voice technology has become an important means to improve service quality and efficiency. Existing online customer service systems mostly rely on text chat or manual answering of calls, which have problems such as slow response speed, low processing efficiency, and high cost. Intelligent voice technology can automatically understand customer needs and make corresponding responses through technologies such as voice recognition and natural language processing. It has broad application prospects in reducing dependence on manual customer service and discovering potential consumer protection and external litigation risks.

[0003] At present, the reply text generation of online intelligent customer service is usually based on simple keyword matching technology. By identifying the keywords in the user's voice content, searching for matches in the pre-built knowledge base, and generating reply text based on the matched knowledge.

[0004] However, the text generated in this way is rather blunt, especially for voice customer service systems, which usually convert the user's voice into text and then generate replies based on the text, making it difficult to recognize the user's emotions, affecting the user experience. Summary of the invention

[0005] The present invention provides an online customer service reply generation method and device, which are used to solve the defect of limited understanding ability of intelligent online customer service based on speech-to-text conversion in the prior art, and realize an online customer service reply generation method with higher service efficiency.

[0006] The present invention provides an online customer service reply generation method, comprising: Collecting user voice signals, converting the user voice signals into text and then preprocessing them to obtain user text; Based on the user text, a search is performed in a pre-built bank knowledge graph to obtain question-answer pairs and work order information corresponding to the user text; Identify the risk level of the user text based on the work order information, determine a prompt template according to the risk level, combine the question-answer pair and the prompt template as input to a large language model, and obtain a reply text output by the large language model According to an online customer service reply generation method provided by the present invention, before the step of searching in a pre-built bank knowledge graph based on the user text, the method further includes: Collect the service tickets and question-answer pairs corresponding to each type of banking business, and build a business sub-library for each type of banking business; Extract keywords from each service ticket and question-answer pair respectively. In each business sub-database, use service tickets, question-answer pairs, and keywords as nodes, and the associations between service tickets and keywords, and the associations between question answers and keywords as edges between nodes. Organize the business sub-database into a graph database. All business sub-databases are integrated to obtain the bank knowledge graph library.

[0007] According to an online customer service reply generation method provided by the present invention, the step of searching in a pre-built bank knowledge graph based on the user text to obtain a question-answer pair corresponding to the user text specifically includes: Extract keywords of the user text and search in the bank knowledge graph, and obtain multiple groups of question-answer pairs associated with the user text based on the matching degree between each question-answer pair and the user text; Calculating the similarity between the user text and each obtained question-answer pair, and determining the business category to which the user text belongs according to the similarity; The similarity between each obtained question-answer pair and the business category to which the user text belongs is calculated as a matching weight, the matching degree of each obtained question-answer pair is weighted, and several question-answer pairs corresponding to the user text are determined according to the weighted result.

[0008] According to an online customer service reply generation method provided by the present invention, the step of searching in a pre-built bank knowledge graph based on the user text to obtain the work order information corresponding to the user text specifically includes: Extract keywords of the user text and search in the bank knowledge graph to obtain multiple work order information associated with the user text; The similarity between each work order information and the user text is calculated, and a number of work order information corresponding to the user text is determined from the plurality of work order information according to the similarity calculation result.

[0009] According to an online customer service reply generation method provided by the present invention, the step of identifying the risk level of the user text based on the work order information specifically includes: Calculating the semantic similarity between the question answer pair corresponding to the user text and the work order information corresponding to the user text; The risk level of the user text is determined according to preset risk levels of work order information corresponding to a plurality of user texts whose semantic similarity exceeds a preset work order screening threshold.

[0010] The present invention also provides an online customer service reply generating device, comprising: The acquisition module is used to acquire user voice signals, convert the user voice signals into text, and then perform preprocessing to obtain user text; A retrieval module, used to search in a pre-built banking knowledge graph based on the user text to obtain question-answer pairs and work order information corresponding to the user text; A generation module is used to identify the risk level of the user text based on the work order information, determine a prompt template according to the risk level, combine the question-answer pair and the prompt template as input to a large language model, and obtain a reply text output by the large language model.

[0011] An online customer service reply generating device provided by the present invention also includes: A determination module is used to determine a user's return work order based on the risk level of the user text.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the online customer service reply generating method as described in any one of the above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the online customer service response generation method as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for generating online customer service replies.

[0015] The online customer service reply generation method and device provided by the present invention identify the risk level of the user text by determining the work order information corresponding to the user text, and generate a reply text to the user based on the risk level of the user text and the question-answer pair corresponding to the user text retrieved from the bank knowledge base, so that the reply words are improved in expressing understanding and sympathy, maintaining patience and politeness, etc., thereby improving the user's customer service experience, reducing the risk of complaints, and reducing the workload of manual customer service by reducing the probability of requiring manual customer service intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1It is a flow chart of the online customer service reply generation method provided by the present invention; Figure 2 It is a schematic diagram mainly used to display the bank knowledge library in the online customer service response generation method provided by the present invention; Figure 3 It is a structural schematic diagram of the online customer service reply generating device provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] Combine the following Figure 1 and Figure 2 The online customer service reply generation method of the present invention is introduced, such as Figure 1 As shown, including: Step 101, collecting user voice signals, converting the user voice signals into text and performing preprocessing to obtain user text; The user's voice signal is collected through microphones and other devices, and pre-processing operations such as denoising and enhancement are performed on the collected voice signals to improve the clarity and comprehensibility of the voice signals, thereby improving the accuracy of subsequent recognition.

[0020] Optionally, a speech recognition engine (such as a deep learning model) is used to recognize the preprocessed user speech signal and convert it into information in text format to obtain user text.

[0021] Optionally, after converting the user voice signal into text format using a speech recognition engine, the obtained text is preprocessed, including removing punctuation marks, stop words, and word form restoration to obtain user text, so as to reduce noise interference and improve the accuracy of subsequent processing.

[0022] User text represents user demand information.

[0023] Step 102: searching in a pre-built bank knowledge graph based on the user text to obtain question-answer pairs and work order information corresponding to the user text; The bank knowledge graph is a pre-built knowledge base that stores bank customer service knowledge in the form of a graph. In the bank knowledge base, question-answer pairs and work order information are pre-associated through their common keywords.

[0024] Among them, the question-answer pairs are customer service-related questions and corresponding answers summarized by the bank's manual customer service, which are organized and stored in the form of "question-answer".

[0025] Work order information refers to the information of work orders related to customer service generated and recorded in the banking system, including customer service work orders, consumer protection work orders and external complaint work orders.

[0026] The user text is used to search in the pre-built banking knowledge graph to obtain several question-answer pairs and several work order information corresponding to the user text.

[0027] It can be understood that, based on the user text, the bank knowledge graph is searched to obtain the matching degree of each question-answer pair with the user text, and based on the matching degree, several question-answer pairs are determined as the question-answer pairs corresponding to the user text.

[0028] Optionally, the question-answer pair with the highest matching degree is selected as the question-answer pair corresponding to the user text.

[0029] Optionally, a matching degree threshold is set, and several question-answer pairs with matching degrees greater than the matching degree threshold are selected as question-answer pairs corresponding to the user text.

[0030] Optionally, the position where the matching degree breaks down is determined, and all question-answer pairs before the break down are used as question-answer pairs corresponding to the user text.

[0031] The retrieval and matching method for work order information is the same as the retrieval and matching method for question-answer pairs, so it will not be repeated here.

[0032] Step 103, identifying the risk level of the user text based on the work order information, determining a prompt template according to the risk level, combining the question-answer pair and the prompt template as input of a large language model, and obtaining a reply text output by the large language model.

[0033] In the scenario of voice intelligent customer service, since users input through voice, their expressions will be more colloquial compared to the scenario of text intelligent customer service. At the same time, user emotions will be expressed more through tone rather than specific words.

[0034] However, the reply text generation process of voice intelligent customer service is still similar to that of text intelligent customer service, that is, the user's voice is recognized as text, and then the user's intention is identified based on the text information, and a reply is generated according to the user's intention. During this processing, in order to identify the user's intention, the voice-converted text is usually pre-processed by stop word removal and word segmentation. Although it can improve the accuracy of intent recognition, this step also ignores the user's emotions expressed by the user's voice information. This makes the answer text generated by voice intelligent customer service usually more blunt and unable to soothe the user's emotions, thereby increasing the risk of user complaints.

[0035] To this end, the work order information is introduced in this embodiment so as to identify the risk level of the current user text based on the work order information.

[0036] Specifically, the work order information reflects the historical processing results of the bank's internal needs that may be involved in the current user text. If most of the work orders corresponding to the current user text are work orders that have not generated complaints, then it can be considered that the risk level of the current user text is low, and the user has no intention to complain; if some of the work orders corresponding to the current user text have generated internal complaints from the bank, or there are follow-up work orders in the work orders corresponding to the current user text, then it can be considered that the risk level of the current user text is medium, and the user may have the intention to complain; if some of the work orders corresponding to the current user text have generated external complaints, then it can be considered that the risk level of the current user text is high, and the user is very likely to complain.

[0037] In a specific implementation, the risk level corresponding to each work order information is pre-determined based on the work order content. For the work order information corresponding to the several retrieved user texts, a medium risk threshold and a high risk threshold are set, and the high risk threshold is judged. If the number of work order information with a high risk level is greater than the high risk threshold, the risk level of the user text is confirmed as high; otherwise, the medium risk threshold is continued to be judged. If the number of work order information with a medium risk level is greater than the medium risk threshold, the risk level of the user text is confirmed as medium; otherwise, the risk level of the user text is confirmed as low.

[0038] On this basis, prompt template technology is introduced into answer generation to generate more polite and emotional answers for user texts with medium and high risk levels, so that the response language can be improved in expressing understanding and sympathy, maintaining patience and politeness, etc.

[0039] In a specific implementation, a corresponding prompt template is configured for user text of each risk level. The prompt template corresponding to the medium risk level emphasizes that user rights will be ensured, and the prompt template corresponding to the high risk level emphasizes that efforts are being made to address user needs.

[0040] For example, the original generated reply is: After shipment, you can check the logistics information through the APP / Mini Program, Rights-My Orders-All Physical Orders.

[0041] In the case of medium risk level, the generated reply based on prompt optimization is: I understand your anxious mood at the moment, and I am deeply sorry for the inconvenience caused by the failure to query the logistics information in time. In order to help you solve this problem as soon as possible, after you ship, please try to query the logistics information through the APP / Mini Program, Rights-My Orders-All Physical Orders. Please rest assured that we are always committed to providing you with the best service experience. If the logistics information still fails to display or you have any questions after following the above steps, please let me know immediately, and I will immediately make further inquiries and coordinate solutions for you to ensure that your rights are fully protected.

[0042] In the case of a high risk level, the generated reply based on prompt optimization is: Regarding the gift delivery issue you mentioned, we have conducted a detailed internal review. Due to the recent surge in order volume and some force majeure delays in the logistics process, your order was not shipped on time, for which we are deeply sorry. In order to resolve your issue as soon as possible, I have expedited your order and will continue to pay attention to logistics dynamics. At the same time, you can check your logistics information in the following ways. Find your order in "All physical orders" and click to view logistics details.

[0043] Through the above method, the question-answer pairs corresponding to the prompt of each risk level and the user text are optimized as the input of the large language model, thereby instructing the large language model to output more vivid reply text, and synthesized speech based on the reply text is used as the answer of the intelligent voice customer service, which effectively improves the user's interactive experience.

[0044] The present invention identifies the risk level of a user text by determining the work order information corresponding to the user text, and generates a reply text to the user based on the risk level of the user text and the question-answer pair corresponding to the user text retrieved from a bank knowledge base, so that the reply speech is improved in terms of expressing understanding and sympathy, maintaining patience and politeness, etc., thereby improving the user's customer service experience, reducing the risk of complaints, and reducing the workload of manual customer service by reducing the probability of requiring manual customer service intervention.

[0045] In the online customer service reply generation method of the present invention, before the step of searching in the pre-built bank knowledge graph based on the user text, the method further includes: Collect the service tickets and question-answer pairs corresponding to each type of banking business, and build a business sub-library for each type of banking business; During the construction of the bank knowledge graph, the corresponding sub-databases are subdivided and constructed according to the business categories to build an efficient and orderly management model. Each business category has its own unique domain knowledge and common problems. By organizing them into different sub-databases, relevant information can be managed and retrieved more accurately. The knowledge base is updated and maintained regularly, including adding new questions, deleting outdated information, optimizing keyword combinations, etc. The performance and effect of the knowledge base are evaluated through user feedback and data analysis, and adjustments and optimizations are made as needed.

[0046] Optionally, business categories include "loan business", "investment products", "customer service", etc.

[0047] Specifically, in each sub-database, questions and answers related to the business category are collected and organized into question-answer pairs. These questions come from customer consultations, internal documents, FAQs (Frequently Asked Questions), etc.

[0048] At the same time, in order to improve the ability of online voice customer service in handling customer complaints and identifying consumer protection and external litigation risks, the work order description information of customer service work orders, consumer protection work orders and external litigation work orders was also collected and organized into work order information.

[0049] Specifically, the work order information of each work order includes the work order description, the products, channels and services involved in the work order, and the work order type, such as: customer consultation, consumer protection complaint, and external complaint.

[0050] Extract keywords from each service ticket and question-answer pair respectively. In each business sub-database, use service tickets, question-answer pairs, and keywords as nodes, and the associations between service tickets and keywords, and the associations between question answers and keywords as edges between nodes. Organize the business sub-database into a graph database. All business sub-databases are integrated to obtain the bank knowledge graph library.

[0051] Information related to bank customer service is selected from question-answer pairs and work order information in each sub-database as keywords, such as "bank", "customer service", "account", "balance", "complaint", etc. Optionally, keywords are obtained using the TF-IDF algorithm and the LDA topic model.

[0052] like Figure 2 As shown, a graph database is used to store the extracted keywords, question-answer pairs, and work order information in the form of a graph, wherein the keywords, question-answer pairs, and work order information are used as nodes, and the associations between service work orders and keywords, and the associations between question answers and keywords are used as edges between nodes.

[0053] In this way, during the construction and maintenance of the bank's knowledge graph, question-answer pairs and work order information are linked through keywords to form a ternary combination of "question-answer pair-keyword-work order information". On this basis, when the work order information is associated with keywords but the keywords have no question-answer pairs associated with them, the question-answer pairs are completed by relevant business personnel based on the work order information. During the construction of the knowledge base, the question-answer pairs that serve as the basis for generating responses are expanded.

[0054] After each business sub-library is constructed, all business sub-libraries are integrated to obtain a complete banking knowledge graph.

[0055] In the online customer service response generation method of the present invention, the step of searching in a pre-built bank knowledge graph based on the user text to obtain a question-answer pair corresponding to the user text specifically includes: Extract keywords of the user text and search in the bank knowledge graph, and obtain multiple groups of question-answer pairs associated with the user text based on the matching degree between each question-answer pair and the user text; Extract several keywords from the user text and use them to search in the bank knowledge graph. When there are less than or equal to two keywords, directly use the keywords to search in the bank knowledge graph. When there are more than two keywords, combine the keywords in different ways and search in the bank knowledge graph, and merge the search results of all keyword combinations as the search results of the user text.

[0056] Use keywords to search in the bank knowledge graph to obtain all question-answer pairs including the keywords.

[0057] Optionally, a matching degree threshold is set, and among all the retrieved question-answer pairs, multiple question-answer pairs with matching degrees higher than the matching degree threshold are determined as multiple groups of question-answer pairs associated with the user text, which may also be referred to as candidate question-answer pairs.

[0058] Calculating the similarity between the user text and each obtained question-answer pair, and determining the business category to which the user text belongs according to the similarity; In this implementation, since keyword extraction is performed on both the user text and the question-answer pairs, the corresponding keyword nodes are queried for all candidate question-answer pairs, and the vector feature similarity between the keywords in the user text and the keywords of each candidate question-answer pair is calculated through similarity algorithms, such as cosine similarity, Jaccard similarity, etc., as the similarity between the user text and each question-answer pair.

[0059] In other feasible implementations, the text similarity between the complete user text and each retrieved question-answer pair may also be directly calculated as the similarity between the user text and each retrieved question-answer pair.

[0060] Optionally, the business category to which the keyword node with the highest similarity belongs is used as the business category to which the user text belongs.

[0061] Optionally, a screening threshold is set to determine multiple keyword nodes with similarity greater than the threshold, and the business category corresponding to each keyword node is determined, and the business category to which the most keyword nodes belong is used as the business category to which the user text belongs.

[0062] The similarity between each obtained question-answer pair and the business category to which the user text belongs is calculated as a matching weight, the matching degree of each obtained question-answer pair is weighted, and several question-answer pairs corresponding to the user text are determined according to the weighted result.

[0063] After determining the business category to which the user text belongs, the similarity between the business domain of each candidate question-answer pair and the business category to which the user text belongs is calculated as the matching weight.

[0064] Optionally, the similarities between each business category are pre-defined by relevant staff.

[0065] After determining the matching weight of each candidate question-answer pair, the matching pair is weighted using the matching weight, and further screened to obtain question-answer pairs corresponding to several user texts based on the weighted result.

[0066] Optionally, the candidate question-answer pairs are sorted according to the weighted matching scores, and the candidate question-answer pair in the first rank is used as the question-answer pair corresponding to the user text.

[0067] Through the above method, the final answer to the question combines the two factors of keyword similarity and business field relevance, so as to obtain more accurate search results.

[0068] In the online customer service reply generation method of the present invention, the step of searching in a pre-built bank knowledge graph based on the user text to obtain the work order information corresponding to the user text specifically includes: Extract keywords of the user text and search in the bank knowledge graph to obtain multiple work order information associated with the user text; Extract several keywords from the user text and use them to search in the bank knowledge graph. When there are less than or equal to two keywords, directly use the keywords to search in the bank knowledge graph. When there are more than two keywords, combine the keywords in different ways and search in the bank knowledge graph, and merge the search results of all keyword combinations as the search results of the user text.

[0069] The keywords are used to search in the bank knowledge graph to obtain all the work order information including the keywords as multiple work order information associated with the user text.

[0070] The similarity between each work order information and the user text is calculated, and a number of work order information corresponding to the user text is determined from the plurality of work order information according to the similarity calculation result.

[0071] The semantic vector feature similarity between each work order information and the user text is calculated, and multiple work order information associated with the user text are sorted in order of similarity scores, and several work order information corresponding to the user text are determined based on the similarity.

[0072] In a feasible implementation, the similarity of the work order information is screened by a similarity threshold, the work order information with a similarity less than the similarity threshold is screened out, and the retained work order information is used as the work order information corresponding to the user text.

[0073] In the online customer service reply generation method of the present invention, the step of identifying the risk level of the user text based on the work order information specifically includes: Calculating the semantic similarity between the question answer pair corresponding to the user text and the work order information corresponding to the user text; The risk level of the user text is determined according to preset risk levels of work order information corresponding to a plurality of user texts whose semantic similarity exceeds a preset work order screening threshold.

[0074] Since the user text itself contains less semantic information, in this embodiment, the risk level corresponding to the user text is determined by matching the question-answer pairs obtained.

[0075] It is understandable that although one or more question-answer pairs can be obtained by searching the bank's knowledge base, when multiple question-answer pairs are obtained, a response is usually generated for the question-answer pair with the highest weighted match, and other question-answer pairs are used as auxiliary to generate a response such as "If you still need to know information related to question A, you can perform the following operations."

[0076] Therefore, in this embodiment, the semantic similarity between the question-answer pair with the highest weighted matching degree and the work order information corresponding to each user text is calculated.

[0077] Furthermore, a work order screening threshold is preset to screen out work order information corresponding to user texts whose semantic similarity exceeds the work order screening threshold.

[0078] Optionally, when the work order information obtained through screening is one item, the risk level corresponding to the work order information is directly used as the risk level of the user text.

[0079] Optionally, when the work order information obtained by screening is multiple, the risk level corresponding to the majority is used as the risk level of the user text.

[0080] The online customer service reply generating device provided by the present invention is described below. The online customer service reply generating device described below and the online customer service reply generating method described above can refer to each other.

[0081] like Figure 3 As shown, the online customer service reply generating device includes a collection module 301, a retrieval module 302 and a generation module 303: The acquisition module 301 is used to acquire user voice signals, convert the user voice signals into text, and then perform preprocessing to obtain user text; The user's voice signal is collected through microphones and other devices, and pre-processing operations such as denoising and enhancement are performed on the collected voice signals to improve the clarity and comprehensibility of the voice signals, thereby improving the accuracy of subsequent recognition.

[0082] Optionally, a speech recognition engine (such as a deep learning model) is used to recognize the preprocessed user speech signal and convert it into information in text format to obtain user text.

[0083] Optionally, after converting the user voice signal into text format using a speech recognition engine, the obtained text is preprocessed, including removing punctuation marks, stop words, and word form restoration to obtain user text, so as to reduce noise interference and improve the accuracy of subsequent processing.

[0084] User text represents user demand information.

[0085] A search module 302 is used to search the pre-built banking knowledge graph based on the user text to obtain the question-answer pair and work order information corresponding to the user text; The bank knowledge graph is a pre-built knowledge base that stores bank customer service knowledge in the form of a graph. In the bank knowledge base, question-answer pairs and work order information are pre-associated through their common keywords.

[0086] Among them, the question-answer pairs are customer service-related questions and corresponding answers summarized by the bank's manual customer service, which are organized and stored in the form of "question-answer".

[0087] Work order information refers to the information of work orders related to customer service generated and recorded in the banking system, including customer service work orders, consumer protection work orders and external complaint work orders.

[0088] The user text is used to search in the pre-built banking knowledge graph to obtain several question-answer pairs and several work order information corresponding to the user text.

[0089] It can be understood that, based on the user text, the bank knowledge graph is searched to obtain the matching degree of each question-answer pair with the user text, and based on the matching degree, several question-answer pairs are determined as the question-answer pairs corresponding to the user text.

[0090] Optionally, the question-answer pair with the highest matching degree is selected as the question-answer pair corresponding to the user text.

[0091] Optionally, a matching degree threshold is set, and several question-answer pairs with matching degrees greater than the matching degree threshold are selected as question-answer pairs corresponding to the user text.

[0092] Optionally, the position where the matching degree breaks down is determined, and all question-answer pairs before the break down are used as question-answer pairs corresponding to the user text.

[0093] The retrieval and matching method for work order information is the same as the retrieval and matching method for question-answer pairs, so it will not be repeated here.

[0094] The generation module 303 is used to identify the risk level of the user text based on the work order information, determine the prompt template according to the risk level, combine the question-answer pair and the prompt template as input of the large language model, and obtain the reply text output by the large language model.

[0095] In the scenario of voice intelligent customer service, since users input through voice, their expressions will be more colloquial compared to the scenario of text intelligent customer service. At the same time, user emotions will be expressed more through tone rather than specific words.

[0096] However, the reply text generation process of voice intelligent customer service is still similar to that of text intelligent customer service, that is, the user's voice is recognized as text, and then the user's intention is identified based on the text information, and a reply is generated according to the user's intention. During this processing, in order to identify the user's intention, the voice-converted text is usually pre-processed by stop word removal and word segmentation. Although it can improve the accuracy of intent recognition, this step also ignores the user's emotions expressed by the user's voice information. This makes the answer text generated by voice intelligent customer service usually more blunt and unable to soothe the user's emotions, thereby increasing the risk of user complaints.

[0097] To this end, the work order information is introduced in this embodiment so as to identify the risk level of the current user text based on the work order information.

[0098] Specifically, the work order information reflects the historical processing results of the bank's internal needs that may be involved in the current user text. If most of the work orders corresponding to the current user text are work orders that have not generated complaints, then it can be considered that the risk level of the current user text is low, and the user has no intention to complain; if some of the work orders corresponding to the current user text have generated internal complaints from the bank, or there are follow-up work orders in the work orders corresponding to the current user text, then it can be considered that the risk level of the current user text is medium, and the user may have the intention to complain; if some of the work orders corresponding to the current user text have generated external complaints, then it can be considered that the risk level of the current user text is high, and the user is very likely to complain.

[0099] In a specific implementation, the risk level corresponding to each work order information is pre-determined based on the work order content. For the work order information corresponding to the several retrieved user texts, a medium risk threshold and a high risk threshold are set, and the high risk threshold is judged. If the number of work order information with a high risk level is greater than the high risk threshold, the risk level of the user text is confirmed as high; otherwise, the medium risk threshold is continued to be judged. If the number of work order information with a medium risk level is greater than the medium risk threshold, the risk level of the user text is confirmed as medium; otherwise, the risk level of the user text is confirmed as low.

[0100] On this basis, prompt template technology is introduced into answer generation to generate more polite and emotional answers for user texts with medium and high risk levels, so that the response language can be improved in expressing understanding and sympathy, maintaining patience and politeness, etc.

[0101] In a specific implementation, a corresponding prompt template is configured for user text of each risk level. The prompt template corresponding to the medium risk level emphasizes that user rights will be ensured, and the prompt template corresponding to the high risk level emphasizes that efforts are being made to address user needs.

[0102] For example, the original generated reply is: After shipment, you can check the logistics information through the APP / Mini Program, Rights-My Orders-All Physical Orders.

[0103] In the case of medium risk level, the generated reply based on prompt optimization is: I understand your anxious mood at the moment, and I am deeply sorry for the inconvenience caused by the failure to query the logistics information in time. In order to help you solve this problem as soon as possible, after you ship, please try to query the logistics information through the APP / Mini Program, Rights-My Orders-All Physical Orders. Please rest assured that we are always committed to providing you with the best service experience. If the logistics information still fails to display or you have any questions after following the above steps, please let me know immediately, and I will immediately make further inquiries and coordinate solutions for you to ensure that your rights are fully protected.

[0104] In the case of a high risk level, the generated reply based on prompt optimization is: Regarding the gift delivery issue you mentioned, we have conducted a detailed internal review. Due to the recent surge in order volume and some force majeure delays in the logistics process, your order was not shipped on time, for which we are deeply sorry. In order to resolve your issue as soon as possible, I have expedited your order and will continue to pay attention to logistics dynamics. At the same time, you can check your logistics information in the following ways. Find your order in "All physical orders" and click to view logistics details.

[0105] Through the above method, the question-answer pairs corresponding to the prompt of each risk level and the user text are optimized as the input of the large language model, thereby instructing the large language model to output more vivid reply text, and synthesized speech based on the reply text is used as the answer of the intelligent voice customer service, which effectively improves the user's interactive experience.

[0106] The present invention identifies the risk level of a user text by determining the work order information corresponding to the user text, and generates a reply text to the user based on the risk level of the user text and the question-answer pair corresponding to the user text retrieved from a bank knowledge base, so that the reply speech is improved in terms of expressing understanding and sympathy, maintaining patience and politeness, etc., thereby improving the user's customer service experience, reducing the risk of complaints, and reducing the workload of manual customer service by reducing the probability of requiring manual customer service intervention.

[0107] The online customer service reply generating device of the present invention also includes: The determination module 304 is used to determine the user's return work order based on the risk level of the user text.

[0108] The risk level of user text is divided into low, medium and high When it is identified that the risk level of the user text is high, the determination module automatically generates a return visit work order for the user, and enters the information of the return visit work order into the bank's knowledge graph library after the return visit.

[0109] Figure 4An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the online customer service reply generation method, which includes: collecting user voice signals, converting the user voice signals into text and performing preprocessing to obtain user text; searching in a pre-built bank knowledge graph based on the user text to obtain question-answer pairs and work order information corresponding to the user text; identifying the risk level of the user text based on the work order information, determining a prompt template according to the risk level, combining the question-answer pairs and the prompt template as inputs of a large language model, and obtaining a reply text output by the large language model.

[0110] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0111] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the online customer service response generation method provided by the above methods, and the method includes: collecting user voice signals, converting the user voice signals into text and then preprocessing them to obtain user text; based on the user text, searching in a pre-built bank knowledge graph library to obtain question-answer pairs and work order information corresponding to the user text; based on the work order information, identifying the risk level of the user text, determining a prompt template according to the risk level, combining the question-answer pair and the prompt template as input to a large language model, and obtaining a reply text output by the large language model.

[0112] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the online customer service response generation method provided by the above-mentioned methods, the method comprising: collecting a user voice signal, converting the user voice signal into text and then preprocessing it to obtain a user text; searching a pre-built bank knowledge graph library based on the user text to obtain a question-answer pair and work order information corresponding to the user text; identifying a risk level of the user text based on the work order information, determining a prompt template according to the risk level, combining the question-answer pair and the prompt template as input to a large language model, and obtaining a response text output by the large language model.

[0113] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating an online customer service reply, characterized in that: include: Collecting user voice signals, converting the user voice signals into text and then preprocessing them to obtain user text; Based on the user text, a search is performed in a pre-built bank knowledge graph to obtain question-answer pairs and work order information corresponding to the user text; The risk level of the user text is identified based on the work order information, a prompt template is determined according to the risk level, the question-answer pair and the prompt template are combined as input of a large language model, and a reply text output by the large language model is obtained.

2. The method for generating online customer service responses according to claim 1, characterized in that: Before the step of searching in the pre-built bank knowledge graph based on the user text, the method further includes: Collect the service tickets and question-answer pairs corresponding to each type of banking business, and build a business sub-library for each type of banking business; Extract keywords from each service ticket and question-answer pair respectively. In each business sub-database, use service tickets, question-answer pairs, and keywords as nodes, and the associations between service tickets and keywords, and the associations between question answers and keywords as edges between nodes. Organize the business sub-database into a graph database. All business sub-databases are integrated to obtain the bank knowledge graph library.

3. The online customer service reply generation method according to claim 1, characterized in that: The step of searching the pre-built bank knowledge graph based on the user text to obtain the question-answer pair corresponding to the user text specifically includes: Extract keywords of the user text and search in the bank knowledge graph, and obtain multiple groups of question-answer pairs associated with the user text based on the matching degree between each question-answer pair and the user text; Calculating the similarity between the user text and each obtained question-answer pair, and determining the business category to which the user text belongs according to the similarity; The similarity between each obtained question-answer pair and the business category to which the user text belongs is calculated as a matching weight, the matching degree of each obtained question-answer pair is weighted, and several question-answer pairs corresponding to the user text are determined according to the weighted result.

4. The online customer service reply generation method according to claim 1, characterized in that: The step of searching the pre-built bank knowledge graph based on the user text to obtain the work order information corresponding to the user text specifically includes: Extract keywords of the user text and search in the bank knowledge graph to obtain multiple work order information associated with the user text; The similarity between each work order information and the user text is calculated, and a number of work order information corresponding to the user text is determined from the plurality of work order information according to the similarity calculation result.

5. The method for generating an online customer service reply according to any one of claims 1 to 4, characterized in that: The step of identifying the risk level of the user text based on the work order information specifically includes: Calculating the semantic similarity between the question answer pair corresponding to the user text and the work order information corresponding to the user text; The risk level of the user text is determined according to preset risk levels of work order information corresponding to a plurality of user texts whose semantic similarity exceeds a preset work order screening threshold.

6. An online customer service reply generating device, characterized in that: include: The acquisition module is used to acquire user voice signals, convert the user voice signals into text, and then perform preprocessing to obtain user text; A retrieval module, used to search in a pre-built banking knowledge graph based on the user text to obtain question-answer pairs and work order information corresponding to the user text; A generation module is used to identify the risk level of the user text based on the work order information, determine a prompt template according to the risk level, combine the question-answer pair and the prompt template as input to a large language model, and obtain a reply text output by the large language model.

7. The online customer service reply generating device according to claim 6, characterized in that: Also includes: A determination module is used to determine a user's return work order based on the risk level of the user text.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the online customer service response generation method as described in any one of claims 1 to 5 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the online customer service response generation method as described in any one of claims 1 to 5 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the online customer service response generation method as described in any one of claims 1 to 5 is implemented.