Intelligent customer service question answering method and device, computer equipment and storage medium

By obtaining user session information and matching session processing logic, combined with preset prompt templates and intelligent customer service Q&A models, target text is automatically generated, solving the problem of low accuracy of intelligent customer service Q&A and achieving more accurate responses.

CN119338009APending Publication Date: 2025-01-21CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411677623.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, the accuracy of the reply text during the intelligent customer service question and answer process is low, resulting in the occurrence of incorrect answers.

Method used

By obtaining user session information, determine the user session scenario and match the session processing logic. Determine the processing steps and corresponding function information and parameter list based on the session processing logic. Obtain the preset prompt template and intelligent customer service question and answer model, use the model to generate information from the input information, and automatically generate target text.

Benefits of technology

Improved the accuracy of the answer content of intelligent customer service questions and answers to ensure the accuracy and effectiveness of the reply text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338009A_ABST
    Figure CN119338009A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides an intelligent customer service question and answer method, which comprises the following steps: acquiring user session information, determining a user session scene according to the user session information, and matching to session processing logic according to the user session scene; determining at least one processing step according to the session processing logic, and determining function information and a parameter list corresponding to each processing step according to the processing step set; obtaining a preset prompt template, and determining input information according to the user session information, the preset prompt template, all the function information and all the parameter lists; and obtaining an intelligent customer service question and answer model, and performing information generation on the input information through the intelligent customer service question and answer model to obtain a target text. The method and the device are applied to intelligent question-answering or session scenes. Through the session processing logic, the preset prompt template and the intelligent customer service question and answer model, automatic generation of the target text is realized, and the accuracy of the answer content is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent customer service question and answer method, device, computer equipment and storage medium. Background Art

[0002] With the popularization of the Internet and the rapid development of e-commerce, customer service systems have become an indispensable part of business operations. Traditional customer service systems usually adopt a rule-based or template-based response method, but this method often cannot adapt to complex customer needs and problems. When the conventional large model is used as a knowledge base, according to the user's question, the similarity between the "question" and the "original text" is calculated, and the answer to the original text is used as the answer to the question. This will cause many problems. For example, if the similarity between the "question" and the "original text" is not high, the wrong original text will be found, and then the wrong answer content will be obtained. Therefore, the accuracy of intelligent question and answer based on the existing conventional large model is low. Summary of the invention

[0003] The embodiments of the present invention provide an intelligent customer service question and answer method, apparatus, computer equipment and storage medium to solve the problem of low accuracy of reply text in the intelligent customer service question and answer process in the prior art.

[0004] An intelligent customer service question and answer method, comprising: Acquire user session information, determine the user session scenario according to the user session information, and match the session processing logic according to the user session scenario; Determine at least one processing step according to the session processing logic, and determine function information and parameter list corresponding to each processing step according to all the processing steps; Obtaining a preset prompt template corresponding to the user session scenario, and determining input information according to the user session information, the preset prompt template, all the function function information and all the parameter lists; An intelligent customer service question-and-answer model is obtained, and information is generated from the input information through the intelligent customer service question-and-answer model to obtain a target text.

[0005] An intelligent customer service question-and-answer device, comprising: A processing logic module, used to obtain user session information, determine the user session scenario according to the user session information, and match the session processing logic according to the user session scenario; An information parameter module, used to determine at least one processing step according to the session processing logic, and determine function information and parameter list corresponding to each processing step according to all the processing steps; An input information module, used to obtain a preset prompt template corresponding to the user session scenario, and determine input information according to the user session information, the preset prompt template, all the function function information and all the parameter lists; The information generation module is used to obtain an intelligent customer service question and answer model, and generate information from the input information through the intelligent customer service question and answer model to obtain a target text.

[0006] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the intelligent customer service question-and-answer method when executing the computer program.

[0007] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the intelligent customer service question and answer method is implemented.

[0008] The present invention provides an intelligent customer service question and answer method, device, equipment and medium. The method includes obtaining user session information, determining a user session scenario according to the user session information, and matching the user session scenario to a session processing logic; determining at least one processing step according to the session processing logic, and determining function function information and a parameter list corresponding to each processing step according to all the processing steps; obtaining a preset prompt template corresponding to the user session scenario, and determining input information according to the user session information, the preset prompt template, all the function function information and all the parameter lists; obtaining an intelligent customer service question and answer model, and generating information for the input information through the intelligent customer service question and answer model to obtain a target text. The present invention realizes the determination of the session scenario through the user session information, and then realizes the matching of the session processing logic. Through the session processing logic, the determination of the processing steps is realized, and then the acquisition of the function function information and the parameter list is realized. Through the preset prompt template, the acquisition of the input information is realized. Through the intelligent customer service question and answer model, the automatic generation of the reply text and the acquisition of the target text are realized, thereby improving the accuracy of the answer content. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0010] Figure 1 Schematic diagram of the application environment of the intelligent customer service question-answering method in one embodiment of the present invention; Figure 2 is a flow chart of an intelligent customer service question and answer method in one embodiment of the present invention; Figure 3 is a flowchart of step S10 of the intelligent customer service question and answer method in one embodiment of the present invention; Figure 4 is a flowchart of step S40 of the intelligent customer service question and answer method in one embodiment of the present invention; Figure 5 This is a functional block diagram of an intelligent customer service question-and-answer device in one embodiment of the present invention; Figure 6 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0011] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments 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.

[0012] The intelligent customer service question and answer method provided by the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the intelligent customer service question and answer method is applied in an intelligent customer service question and answer device, which includes Figure 1 The client and server shown in the figure communicate with each other through the network to solve the problem in the prior art that local stylization of images cannot achieve the expected effect. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The client, also known as the user end, refers to a program that corresponds to the server and provides classification services to customers. The client can be installed on, but not limited to, various computers, laptops, smart phones, tablets, and portable wearable devices.

[0013] In one embodiment, if Figure 2 As shown, an intelligent customer service question and answer method is provided, and the method is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps: S10: Acquire user session information, determine the user session scenario according to the user session information, and match the session processing logic according to the user session scenario.

[0014] Understandably, user session information refers to questions asked by users. User session scenarios refer to business scenarios involved in the questions, such as insurance scenarios. Session processing logic refers to processing logic corresponding to processing the scenarios.

[0015] Specifically, the chat records before the user and the agent leave are obtained, and then all chat records are segmented to remove stop words, thereby obtaining historical texts, and each group of question and answer content in the historical text is encoded by a model with encoding capabilities to obtain encoding vectors corresponding to each group of question and answer content. Then, all encoding vectors are classified by an algorithm with classification capabilities, that is, the similarity between each encoding vector is calculated, so as to classify the questions asked by the user, determine the scenario of each question type, and determine the processing logic corresponding to each scenario. Further, the latest user session information of the user is obtained, and then the correlation between the user session information and all classified questions is calculated to determine the question type to which the user session information belongs, and then determine the user session scenario corresponding to the user session information. Then, the user session scenario is matched with processing logic, that is, the similarity between the user session scenario and the session scenario corresponding to each processing logic is calculated, and all similarity values ​​are compared, and the similarity value is selected to compare the processing logic, so as to obtain the session processing logic corresponding to the user session information.

[0016] S20: Determine at least one processing step according to the session processing logic, and determine function information and parameter list corresponding to each processing step according to all the processing steps.

[0017] It can be understood that the processing steps refer to the steps for processing the user session information. Function information refers to the function used to process the user session information and the function description and other information. The parameter list refers to the parameter information used to process the user session information. Different scenario information corresponds to different processing logics, and the number of steps included in each processing logic is not exactly the same.

[0018] Specifically, the session processing logic is parsed, that is, the session processing logic is parsed by a sentence analysis method, so as to determine at least one processing step included in the session processing logic corresponding to the user session information. Then, information matching is performed on each processing step to obtain function information and parameter list corresponding to each processing step, wherein the function information includes information such as the processing function and the function description of the function. The parameter list includes information such as parameter description and parameter type.

[0019] S30, obtaining a preset prompt template corresponding to the user session scenario, and determining input information according to the user session information, the preset prompt template, all the function function information and all the parameter lists.

[0020] Understandably, the preset prompt template refers to an information template used for prompting. Input information refers to the text input into the model after splicing.

[0021] Specifically, the prompt template is matched by the user session scenario, that is, by the question type corresponding to the user session scenario, so as to determine the preset prompt template corresponding to the user session scenario, and then the processing function and function description of the function corresponding to each processing step, as well as the parameter description and parameter type, are arranged in the order of the processing steps. The preset prompt template and the user session information, as well as the sorting result of each processing step, are spliced ​​to obtain the input information.

[0022] S40, obtaining an intelligent customer service question and answer model, and generating information for the input information through the intelligent customer service question and answer model to obtain a target text.

[0023] Understandably, the model used by the intelligent customer service question-and-answer model to answer user questions is trained based on the large language model. The target text refers to the response generated by the intelligent customer service question-and-answer model for user session information.

[0024] Specifically, an intelligent customer service question and answer model is obtained, and the spliced ​​input information is input into the intelligent customer service question and answer model, and information is generated for the input information through the intelligent customer service question and answer model. That is, the intelligent customer service question and answer model analyzes and identifies the user's question through the prompt information in the input information, thereby obtaining the function information to be used for the question asked by the user, and then calls all functions through the identified function information to obtain the calling function corresponding to each processing step, and generates text for the user session information in turn through all the calling functions, thereby generating the target text.

[0025] In an embodiment of the present invention, an intelligent customer service question-and-answer method is provided. The method determines the session scenario through user session information, thereby matching the session processing logic. The session processing logic determines the processing steps, thereby obtaining function information and parameter lists. The input information is obtained through a preset prompt template. The intelligent customer service question-and-answer model automatically generates the reply text and obtains the target text, thereby improving the accuracy of the answer content.

[0026] In one embodiment, if Figure 3 As shown, in step S10, that is, according to the user session information, determining the user session scenario, and matching the session processing logic according to the user session scenario, includes: S101, clustering the user session information to obtain a target question type, and determining a preset session scenario of the target question type as a user session scenario corresponding to the user session information, wherein the question type refers to a question classification result obtained by classifying historical session information.

[0027] S102: Perform processing logic matching on the user conversation scenario to obtain conversation processing logic corresponding to the user reply information.

[0028] Understandably, the question type refers to the question classification result obtained by classifying the historical session information. The target question type refers to the question type corresponding to the user session information.

[0029] Specifically, after obtaining the user voice corresponding to the user session information, clustering processing is performed on the user session information, that is, the user session information is respectively associated with the classification results of all historical session information. That is, the user session information and all classification results are vectorized, and the degree of association between the vector of the user session information and the vector of each classification result is calculated, so as to obtain the association value corresponding to each classification result, and then all the association values ​​are compared to classify the user session information into the corresponding classification results, so as to obtain the target question type. Next, the preset conversation scene of the target question type is obtained, and the preset conversation scene of the target question type is determined as the user conversation scene corresponding to the user session information. Further, the user conversation scene is logically matched, that is, the user conversation scene is matched with the conversation scene corresponding to each processing logic. When the user conversation scene fails to match the conversation scene, the next conversation scene is matched with the user conversation scene until the user conversation scene matches the conversation scene successfully, and the processing logic corresponding to the conversation scene is determined as the conversation processing logic corresponding to the user conversation information.

[0030] In this embodiment, by clustering the user session information, the question type is matched, and then the target question type is determined. By performing logical matching on the user session scenario, the processing logic is obtained, and thus the session processing logic is determined, thereby improving the accuracy of subsequent text replies.

[0031] In one embodiment, before step S10, that is, before obtaining the user session information, the process further includes: S103, obtaining original speech, and performing frame processing on the original speech to obtain at least one frame data.

[0032] S104, performing endpoint detection on all the framed data to obtain a starting point and an ending point corresponding to each framed data.

[0033] S105, performing denoising processing on the original speech according to the starting point and the ending point of all the frame data to obtain the user speech corresponding to the user conversation information.

[0034] Understandably, the original voice refers to the voice of the user asking questions. The frame data refers to the voice of a fixed segment. The starting point and the ending point refer to the position where each frame data starts and ends.

[0035] Specifically, the original speech is obtained, and all the original speech is cut and processed, that is, the original speech can be divided into segments of speech data by a fixed frequency band (such as 10 seconds, etc.), for example, a segment of 3 minutes of original speech is divided into 18 segments of speech data. Each segmentation unit in the speech data contains the same number of signal sampling points, and the segmentation units are determined as frame data. Then, the energy value of the signal in each frame data is calculated. If the energy value of several consecutive frame data in the front end of each segment of speech data is lower than the preset energy value threshold (the preset energy value threshold can be set according to demand), and the energy value of the next several consecutive frame data is greater than or equal to the preset energy value threshold, then the place where the signal energy value increases is the starting point of the segment of speech data. Similarly, if the energy value of the speech in several consecutive frame data is large, and then the energy value of the speech in several frame data becomes smaller, and it lasts for a certain period of time, it can be considered that the place where the energy value decreases is the end point of the segment of speech data. Thus, the starting point and end point in each segment of frame data are determined. The voice data between the starting point and the ending point in each segment of the frame data is retained, the voice data between each segment of the frame data (between the ending point of the first segment of the frame data and the starting point of the second segment of the frame data) is deleted, and all non-voice data are deleted in sequence. All the retained segmented data are spliced ​​in the order of segmentation to obtain the user voice corresponding to the user session information. For example, among the 18 segments of voice data, the 5th, 9th, and 14th segments of voice are noise or blank voices. They are deleted in order, and the remaining voice data are spliced ​​to obtain the user voice. More specifically, in the intelligent customer service scenario, after the intelligent customer service obtains the original voice of the user, it frames the voice data, determines the starting point and the ending point in each frame of data, deletes the noise or blank voice in the original voice of the user, and obtains the user voice.

[0036] In the embodiment of the present invention, by calculating the energy value of the signal in each segment of framed data and comparing the energy value of the framed data with a preset energy value threshold, the starting point and / or the ending point in each segment of framed data is determined. The voice data is deleted according to the starting point and / or the ending point in each segment of framed data, and the user's reply information is extracted, thereby reducing the redundancy of the voice data and improving the accuracy of the subsequent text reply.

[0037] In one embodiment, if Figure 4 As shown, in step S40, the input information is generated by the intelligent customer service question-answering model to obtain a target text, including: S401, performing semantic analysis on the input information through the intelligent customer service question and answer model to obtain calling function information corresponding to each of the processing steps.

[0038] S402: Determine the target calling function corresponding to each of the processing steps according to all the calling function information.

[0039] S403: Generate text from the user session information through all the target calling functions to obtain a target text.

[0040] Understandably, the calling function information refers to information such as the calling function name, parameter list, etc. The target calling function refers to the called function corresponding to the function information.

[0041] Specifically, after obtaining the intelligent customer service question-and-answer model, the input information is semantically analyzed by the intelligent customer service question-and-answer model, that is, semantic recognition is performed on the content of the input information, and the function-related content is extracted from the input information according to the semantic recognition result, that is, the function name, function function description, and parameter list and other information are extracted, so as to obtain the calling function information corresponding to each processing step. Then, the preset function is called through all the calling function information, that is, the preset function is called through the function name, function function description, and parameter list in the calling function information corresponding to each processing step, so as to obtain the target calling function corresponding to each calling function information. Furthermore, the user session information is text-generated through all the target calling functions, that is, the target calling function corresponding to each processing step is sequentially generated according to the processing step sequence, so as to obtain the target text.

[0042] In this embodiment, semantic analysis is performed through the intelligent customer service question-and-answer model to realize the recognition and analysis of input information, thereby realizing the acquisition of function call information, and then realizing the call of the target call function. Text generation is performed through all target call functions, and user session information is processed in sequence through multiple steps, thereby improving the accuracy of the target text.

[0043] In one embodiment, in step S403, text generation is performed on the user session information through all the target calling functions to obtain the target text, including: S4031, generating text for the user session information by using the target calling function corresponding to the first processing step to obtain a first generated text.

[0044] S4032: Concatenate the preset prompt template, the user session information, and the first generated text to obtain a first concatenated text.

[0045] S4033: looping through all the target calling functions to process the first concatenated text to obtain a target text corresponding to the user session information.

[0046] Understandably, the first generated text refers to the result of the first processing step on the user session information. The first spliced ​​text refers to the text obtained by re-splicing the user session information.

[0047] Specifically, after obtaining the target call function, the target function corresponding to the first processing step is used to generate text for the input information, that is, the target call function is executed to generate a reply text, thereby obtaining a first generated text. Then, the preset prompt template, the user session information and the first generated text are spliced, that is, the preset prompt template, the user session information and the first generated text are fused and spliced ​​to obtain a first spliced ​​text. Next, the first spliced ​​text is used as the input information of the second processing step, and the target call function corresponding to the second processing step is used to generate text for the first spliced ​​text, thereby obtaining a second generated text, and in this way, the splicing and generation are repeated, and the user session information is processed in a loop until the target call function corresponding to the last processing step is executed, and the output result is determined as the target text corresponding to the user session information.

[0048] In this embodiment, the target calling functions corresponding to all processing steps are used to generate text for the user session information and the preset prompt template in turn, thereby obtaining the generated text, thereby realizing the splicing of the generated text, and realizing the loop processing of the user session information, thereby realizing the generation of the target text and improving the accuracy of the target text.

[0049] In one embodiment, in step S4033, that is, looping through all the target calling functions to process the first concatenated text to obtain the target text corresponding to the user session information, includes: S40331, looping through all the target calling functions to process the first concatenated text to obtain a final generated text.

[0050] S40332, obtain a preset answer template, fill the final generated text into the preset answer template, and obtain the target text.

[0051] It can be understood that the final generated text is used to represent the result of the last processing step on the user session information.

[0052] Specifically, after obtaining the first concatenated text, the first concatenated text is used as input information of the second processing step, and the first concatenated text is generated by the target calling function corresponding to the second processing step, thereby obtaining the second generated text, and in this way, the concatenation and generation are repeated, and the user session information is processed in a loop until the target calling function corresponding to the last processing step is executed, and the output result is determined as the final generated text corresponding to the user session information. Then, the preset answer template is obtained, and the final generated text is filled into the preset answer template to obtain the target text.

[0053] In this embodiment, by adding a preset answer template, the answer format is made more standardized, thereby achieving standardization of the answer text.

[0054] In one embodiment, before step S40, that is, before obtaining the intelligent customer service question-answering model, the process further includes: S404, obtaining a sample data set, where the sample data set includes at least one sample training data and a sample label corresponding to each sample training data.

[0055] Understandably, the sample training data is the historical conversation information of each user and agent, the prompt template corresponding to each historical reply information, and the preset processing logic. One sample training data is associated with a sample label, and the sample label is used to characterize the reply content to the user's inquiry. The reply content can be obtained by identifying and analyzing the sample training data manually or in other ways. The sample training data and sample labels can be collected from different databases, or they can be pre-prepared data sent from the client to the database. Then, a sample training data set is constructed based on all the acquired sample training data and the sample labels corresponding to each sample training data.

[0056] S405: performing identification and prediction on all the sample training data through a preset training model to obtain a prediction result corresponding to each of the sample training data.

[0057] Understandably, the prediction results are used to characterize the text generated by the preset training model in response to the sample training data.

[0058] Specifically, all sample training data and sample labels are input into the preset training model, and all sample training data are identified and predicted by the preset training model. The sample training data is first identified and analyzed by the identification and analysis module of the preset training model, so as to obtain the function information corresponding to the question asked by the user. Then, the preset function is called by the function information corresponding to the question asked by the user, so as to obtain the conversation processing function corresponding to each processing step, and the sample training data is replied and processed by the conversation processing function corresponding to the first processing step to obtain the first prediction text. Then, the first prediction text, the prompt text and the historical conversation information are spliced ​​and used as the input of the next processing step. In this way, through the above processing method, the preset training model recognizes and analyzes all sample training data respectively, so as to obtain the function information corresponding to the question corresponding to each sample training data, and the conversation processing element corresponding to the function information is used to reply all questions, so as to obtain the prediction results corresponding to each sample training data.

[0059] S406: Determine a prediction loss value of a preset training model according to sample labels and prediction results corresponding to the same sample training data.

[0060] Understandably, the prediction loss value is generated during the prediction process of the sample training data.

[0061] Specifically, after obtaining the prediction result, all prediction results corresponding to the sample training data are arranged according to the order of the sample training data in the sample training data set, and then the prediction results associated with the sample training data are compared with the sample labels of the sample training data with the same sequence; that is, according to the sorting of the sample training data, the sample label corresponding to the first sample training data is compared with the prediction result corresponding to the first sample training data, and the loss value between the sample label and the prediction result is determined by the loss function, and then the sample label corresponding to the second sample training data is compared with the prediction result corresponding to the second sample training data, until all sample labels and prediction results are compared, the prediction loss value of the preset training model can be obtained.

[0062] S407: When the predicted loss value reaches a preset convergence condition, the preset training model after convergence is determined as the intelligent customer service question and answer model.

[0063] Understandably, the convergence condition may be that the predicted loss value is less than a set threshold, or that the predicted loss value is very small and will not decrease after 50,000 calculations, and the training is stopped.

[0064] Specifically, after obtaining the predicted loss value, when the predicted loss value does not reach the preset convergence condition, the initial parameters of the preset training model are adjusted according to the predicted loss value, and all sample training data are re-input into the preset training model with the adjusted initial parameters, and the preset training model with the adjusted initial parameters is iteratively trained to obtain the predicted loss value corresponding to the preset training model with the adjusted initial parameters. Furthermore, when the predicted loss value does not reach the preset convergence condition, the initial parameters of the preset training model are adjusted again according to the predicted loss value, so that the predicted loss value of the preset training model with the adjusted initial parameters reaches the preset convergence condition. In this way, the accuracy of the preset training model becomes higher and higher, and the quality inspection results obtained are constantly approaching the correct results, until the predicted loss value of the preset training model reaches the preset convergence condition, and the preset training model after convergence is determined as the intelligent customer service question and answer model.

[0065] In this embodiment, the preset training model is iteratively trained through a large amount of sample training data, and the overall loss value of the preset training model is calculated by comparing the loss function, thereby realizing the determination of the predicted loss value of the preset training model. The initial parameters of the preset training model are adjusted according to the predicted loss value until the model converges, thereby realizing the training of the intelligent customer service question and answer model, thereby ensuring that the intelligent customer service question and answer model has a high accuracy rate.

[0066] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0067] In one embodiment, an intelligent customer service question and answer device is provided, which corresponds one-to-one to the intelligent customer service question and answer method in the above embodiment. Figure 5 As shown, the intelligent customer service question-answering device includes a processing logic module 11, an information parameter module 12, an input information module 13 and an information generation module 14. The functional modules are described in detail as follows: The processing logic module 11 is used to obtain user session information, determine the user session scenario according to the user session information, and match the session processing logic according to the user session scenario; An information parameter module 12, used to determine at least one processing step according to the session processing logic, and determine function information and a parameter list corresponding to each processing step according to all the processing steps; An input information module 13 is used to obtain a preset prompt template corresponding to the user session scenario, and determine input information according to the user session information, the preset prompt template, all the function function information and all the parameter lists; The information generation module 14 is used to obtain an intelligent customer service question and answer model, and generate information from the input information through the intelligent customer service question and answer model to obtain a target text.

[0068] In one embodiment, the information generating module 14 includes: A calling function information submodule is used to perform semantic analysis on the input information through the intelligent customer service question-answering model to obtain calling function information corresponding to each of the processing steps; A target calling function submodule, used for determining a target calling function corresponding to each of the processing steps according to all the calling function information; The target text submodule is used to generate text for the user session information through all the target calling functions to obtain the target text.

[0069] In one embodiment, the target text submodule includes: A text generating unit, configured to generate text for the user session information by calling the target function corresponding to the first processing step, to obtain a first generated text; An information splicing unit, configured to splice the preset prompt template, the user session information and the first generated text to obtain a first spliced ​​text; A loop processing unit is used to loop process the first concatenated text through all the target calling functions to obtain a target text corresponding to the user session information.

[0070] In one embodiment, the loop processing unit includes: A final generated text subunit is used to loop through all the target calling functions to process the first concatenated text to obtain a final generated text; The text template subunit is used to obtain a preset answer template, fill the final generated text into the preset answer template, and obtain the target text.

[0071] In one embodiment, the processing logic module 11 includes: a clustering processing submodule, configured to perform clustering processing on the user session information to obtain a target question type, and determine a preset session scenario of the target question type as a user session scenario corresponding to the user session information, wherein the question type refers to a question classification result obtained by classifying historical session information; The logic matching submodule is used to perform processing logic matching on the user session scenario to obtain session processing logic corresponding to the user reply information.

[0072] In one embodiment, the processing logic module 11 further includes: A frame processing submodule, used for acquiring original speech, and performing frame processing on the original speech to obtain at least one frame data; An endpoint detection submodule, used to perform endpoint detection on all the framed data to obtain a starting point and an ending point corresponding to each of the framed data; The denoising processing submodule is used to perform denoising processing on the original voice according to the starting point and the ending point of all the frame data to obtain the user voice corresponding to the user conversation information.

[0073] In one embodiment, the processing logic module 14 further includes: A sample acquisition submodule, used to acquire a sample training data set, wherein the sample training data set includes at least one sample training data and a sample label corresponding to the sample training data; A style conversion submodule is used to perform style conversion on the sample training data through a preset training model to obtain a prediction result; A loss prediction submodule, used to determine the predicted loss value of the preset training model according to the prediction result and the sample label corresponding to the same sample training data; The model convergence unit is used to record the preset training model after convergence as an intelligent customer service question and answer model when the predicted loss value reaches a preset convergence condition.

[0074] For the specific definition of the intelligent customer service question and answer device, please refer to the definition of the intelligent customer service question and answer method above, which will not be repeated here. Each module in the above-mentioned intelligent customer service question and answer device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0075] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data used by the intelligent customer service question and answer method in the above embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an intelligent customer service question and answer method is implemented.

[0076] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned intelligent customer service question and answer method when executing the computer program.

[0077] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned intelligent customer service question and answer method is implemented.

[0078] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0079] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0080] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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, and should all be included in the protection scope of the present invention.

Claims

1. An intelligent customer service question and answer method, characterized in that: include: Acquire user session information, determine the user session scenario according to the user session information, and match the session processing logic according to the user session scenario; Determine at least one processing step according to the session processing logic, and determine function information and parameter list corresponding to each processing step according to all the processing steps; Obtaining a preset prompt template corresponding to the user session scenario, and determining input information according to the user session information, the preset prompt template, all the function function information and all the parameter lists; An intelligent customer service question and answer model is obtained, and information is generated from the input information through the intelligent customer service question and answer model to obtain a target text.

2. The intelligent customer service question-and-answer method according to claim 1, characterized in that: The step of generating information from the input information by using the intelligent customer service question-answering model to obtain a target text includes: Performing semantic analysis on the input information through the intelligent customer service question-answering model to obtain calling function information corresponding to each of the processing steps; Determine the target calling function corresponding to each of the processing steps according to all the calling function information; The user session information is subjected to text generation through all the target calling functions to obtain a target text.

3. The intelligent customer service question-and-answer method according to claim 2, characterized in that: The step of generating text from the user session information by calling all the target functions to obtain the target text includes: Generating text from the user session information by calling the target function corresponding to the first processing step to obtain a first generated text; Performing information splicing on the preset prompt template, the user session information and the first generated text to obtain a first spliced ​​text; The first concatenated text is processed in a loop through all the target calling functions to obtain a target text corresponding to the user session information.

4. The intelligent customer service question-and-answer method according to claim 3, characterized in that: The looping process of the first concatenated text through all the target calling functions to obtain the target text corresponding to the user session information includes: The first concatenated text is processed in a loop through all the target calling functions to obtain a final generated text; A preset answer template is obtained, and the final generated text is filled into the preset answer template to obtain a target text.

5. The intelligent customer service question-and-answer method according to claim 1, characterized in that: The determining the user session scenario according to the user session information, and matching the session processing logic according to the user session scenario, includes: Performing clustering processing on the user session information to obtain a target question type, and determining a preset session scenario of the target question type as a user session scenario corresponding to the user session information, wherein the question type refers to a question classification result obtained by classifying historical session information; Processing logic matching is performed on the user session scenario to obtain session processing logic corresponding to the user reply information.

6. The intelligent customer service question and answer method according to claim 1, characterized in that: Before obtaining the user session information, the method further includes: Acquire original speech, and perform frame processing on the original speech to obtain at least one frame data; Performing endpoint detection on all the framed data to obtain a starting point and an ending point corresponding to each of the framed data; The original speech is subjected to denoising processing according to the starting point and the ending point of all the frame data to obtain the user speech corresponding to the user conversation information.

7. The intelligent customer service question and answer method according to claim 1, characterized in that: Before obtaining the intelligent customer service question and answer model, the method further includes: Acquire a sample data set, wherein the sample data set includes at least one sample training data and a sample label corresponding to each sample training data; Identify and predict all the sample training data using a preset training model to obtain a prediction result corresponding to each of the sample training data; Determining a prediction loss value of a preset training model according to sample labels and prediction results corresponding to the same sample training data; When the predicted loss value reaches a preset convergence condition, the preset training model after convergence is determined as the intelligent customer service question and answer model.

8. An intelligent customer service question and answer device, characterized in that: include: A processing logic module, used to obtain user session information, determine the user session scenario according to the user session information, and match the session processing logic according to the user session scenario; An information parameter module, used to determine at least one processing step according to the session processing logic, and determine function information and parameter list corresponding to each processing step according to all the processing steps; An input information module, used to obtain a preset prompt template corresponding to the user session scenario, and determine input information according to the user session information, the preset prompt template, all the function function information and all the parameter lists; The information generation module is used to obtain an intelligent customer service question and answer model, and generate information from the input information through the intelligent customer service question and answer model to obtain a target text.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the intelligent customer service question and answer method as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the intelligent customer service question and answer method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Model prompt content generation method and device

    CN120611029A