Customer service message generation method and customer service system based on AI

By building a customer service emotional transformation network, combining business knowledge and emotional guidance text, the misunderstanding problem of AI customer service system in complex logic and emotional understanding is solved, efficient emotional adaptation and professional interaction are achieved, and user experience is improved.

CN118733739BActive Publication Date: 2024-12-13ZHEJIANG JUMIWEIGU INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410929372.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-12-13
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The existing AI customer service system has misunderstandings and unexpected reactions in dealing with complex business logic and user emotional understanding, making it difficult to provide a professional and humane interactive experience.

Method used

Adopt AI-based customer service message generation method, by building a customer service emotional transformation network, combining business knowledge text and emotional guidance text, using enhanced generation components and identification components for confrontation training, generate emotional business knowledge text, and ensure information accuracy and emotional adaptation. sex.

Benefits of technology

The response quality of the customer service system is improved, so that it can provide natural emotional expression and guidance while maintaining the accuracy of business information, improving user experience and interactive satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733739B_ABST
    Figure CN118733739B_ABST
Patent Text Reader

Abstract

The present application provides an AI-based customer service message generation method and a customer service system, which performs attack defensive debugging on a first basic neural network based on a first learning sample library, strengthens the overall representation information and detailed representation information of a text to be processed and a processing control text based on a first sound reinforcement generation component, and integrates the text to be processed and the processing control text after the representation information is strengthened to obtain a transformed text. When the text to be processed is a business knowledge text sample, the transformed text is an emotional business knowledge text after emotion transfer. Because the present application strengthens the overall representation information and detailed representation information of the business knowledge text sample and the customer service emotion text sample, the debugged first basic neural network can consider the overall emotion type transfer and maintain the specific knowledge details of the business knowledge text after being loaded into the business knowledge text to be processed and the emotion guidance text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of artificial intelligence data processing technology, and in particular to an AI-based customer service message generation method and customer service system. Background Art

[0002] In the current digital age, the customer service field is undergoing unprecedented changes, and the introduction of artificial intelligence (AI) technology has greatly promoted the intelligentization of customer service systems. Traditional customer service systems often rely on preset scripts and manual operations, and it is difficult to efficiently respond to complex and changing user needs and emotional changes. Especially for those interactive scenarios that require high personalization and emotional resonance, standard answer-style replies often appear stiff and unsatisfactory. Therefore, how to improve the response quality of the customer service system so that it can accurately convey business knowledge and reflect a humanized communication style has become a key issue that needs to be solved urgently.

[0003] Although existing AI customer service solutions have tried to combine natural language processing (NLP) technology to understand and generate responses, they still face challenges in processing complex business logic and understanding user emotions. On the one hand, the accurate transmission of business knowledge text requires the system to have the ability to deeply understand and retain professional knowledge details; on the other hand, emotional communication in customer service conversations requires the system to be able to recognize and adapt to emotional colors in different situations, and achieve natural emotional expression and guidance. However, most existing customer service AI systems are prone to misunderstandings or unexpected reactions when dealing with carefully constructed adversarial inputs or highly emotional conversations, affecting user experience and service efficiency. In view of this, it is particularly important to develop a customer service message generation technology that can effectively integrate business knowledge transmission and emotional intelligence. While ensuring the accuracy of business information, this technology must enhance sensitivity and adaptability to the emotional dimension to ensure that customer service interactions are both professional and full of humanistic care. Summary of the invention

[0004] In view of this, the embodiment of the present application at least provides an AI-based customer service message generation method and customer service system. The technical solution of the present application is implemented as follows:

[0005] On the one hand, an embodiment of the present application provides an AI-based customer service message generation method, which is applied to a customer service system, and the method includes:

[0006] Determine business knowledge texts and emotional guidance texts;

[0007] Determine the business knowledge text as the text to be processed, determine the emotion guidance text as the processing control text and load it into the pre-debugged customer service emotion transformation network, and obtain the emotion type business knowledge text corresponding to the business knowledge text and the emotion guidance text generated by the customer service emotion transformation network;

[0008] The debugging process of the customer service emotion transformation network includes:

[0009] Determine a first learning sample library, wherein the first learning sample library includes a plurality of business knowledge text samples and a plurality of customer service emotion text samples;

[0010] Performing attack defense debugging on the first basic neural network based on the first learning sample library to obtain a debugged first basic neural network, wherein the first basic neural network includes a first reinforcement generation component, and the first reinforcement generation component is used to strengthen the overall representation information and the detailed representation information of the loaded text to be processed and the processed control text, and integrate the text to be processed and the processed control text after the representation information is strengthened to obtain a transformed text;

[0011] Based on the debugged first basic neural network, a customer service emotion transformation network is obtained, wherein the customer service emotion transformation network includes a first reinforcement generation component in the debugged first basic neural network;

[0012] Among them, if the text to be processed is a business knowledge text sample, the processing control text is a customer service emotion text sample, and the transformed text is an emotional business knowledge text. The emotional business knowledge text represents the business knowledge text after the emotion type of the business knowledge text sample is converted into the emotion type of the customer service emotion text sample.

[0013] In some embodiments, based on the debugged first basic neural network, a customer service emotion transformation network is obtained, including:

[0014] Determine a second learning sample library, wherein the second learning sample library includes a plurality of business knowledge text samples and a sample vocabulary transformation text in which each business knowledge text sample is vocabulary transformed;

[0015] According to the first reinforcement generation component in the debugged first basic neural network, an emotion rendering operation is performed on each business knowledge text sample in the second learning sample library to obtain an emotional business knowledge text corresponding to each business knowledge text sample;

[0016] According to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library, the second basic neural network is debugged to obtain the debugged second basic neural network, the second basic neural network is used to obtain text representation information of the sample vocabulary transformation text and the emotional business knowledge text, and perform vocabulary transformation on the emotional business knowledge text based on the text representation information to obtain the business knowledge text after vocabulary transformation;

[0017] Based on the first reinforcement generation component in the debugged first basic neural network and the debugged second basic neural network, the customer service emotion transformation network is obtained.

[0018] In some embodiments, the first reinforcement generation component is specifically configured to:

[0019] For any text in the loaded to-be-processed text and the processed control text, text embedding mapping is performed on the text according to a preset text embedding mapping component, and outputs of multiple feature filtering units are obtained to obtain multiple groups of filtering representation information of the text; the filtering representation information output by different feature filtering units corresponds to different numbers of feature maps;

[0020] Determine a group of filter representation information with the largest number of feature graphs in each group of filter representation information as reference filter representation information, and make the number of feature graphs of each group of filter representation information consistent with the number of feature graphs of the reference filter representation information;

[0021] Performing dense representation on all the filter representation information after the uniformization process to obtain first dense representation information, and performing dense representation on the comparison filter representation information to obtain second dense representation information;

[0022] Representation information enhancement is performed on the first dense representation information and the second dense representation information respectively, and first inner product representation information is obtained based on the enhanced representation information after the representation information enhancement is performed on the first dense representation information and the second dense representation information; second inner product representation information is obtained based on the enhanced representation information after the representation information enhancement is performed on the second dense representation information and the first dense representation information;

[0023] A representation information integration operation is performed on the first dense representation information, the second dense representation information, the first inner product representation information and the second inner product representation information corresponding to the loaded to-be-processed text and the processed control text respectively, and the transformed text is obtained based on the representation information integration operation result.

[0024] In some embodiments, the step of respectively strengthening the first dense representation information and the second dense representation information, obtaining first inner product representation information based on the strengthened representation information after the first dense representation information and the second dense representation information are strengthened, and obtaining second inner product representation information based on the strengthened representation information after the second dense representation information and the first dense representation information are strengthened, includes:

[0025] Performing a representation information activation operation on the first dense representation information and the second dense representation information respectively according to a preset nonlinear mapping function to obtain nonlinear mapping values ​​corresponding to the first dense representation information and the second dense representation information respectively;

[0026] For the nonlinear mapping values ​​corresponding to the first dense representation information and the second dense representation information, respectively, the overall representation information and the detail representation information are enhanced by using the influence coefficients of the overall representation information focusing strategy and the detail representation information focusing strategy to obtain the enhanced representation information corresponding to the first dense representation information and the second dense representation information, respectively;

[0027] Performing an inner product calculation on the nonlinear mapping value of the first dense representation information and the enhanced representation information of the second dense representation information to obtain first inner product representation information;

[0028] An inner product is calculated by performing an inner product calculation on the nonlinear mapping value of the second dense representation information and the enhanced representation information of the first dense representation information to obtain second inner product representation information.

[0029] In some embodiments, the performing attack defense debugging on the first basic neural network based on the first learning sample library to obtain the debugged first basic neural network includes:

[0030] Determine a first basic neural network, the first basic neural network includes the first reinforcement generation component and the first identification component, and perform multiple cycles of initial debugging on the first basic neural network based on a first learning sample library until a first debugging end requirement is met;

[0031] Replacing the first identification component that meets the first debugging end requirement with a second identification component with higher identification performance to obtain an iterated first basic neural network;

[0032] The iterated first basic neural network is debugged multiple times in an advanced debugging phase based on the first learning sample library until the second debugging end requirement is met, thereby obtaining the debugged first basic neural network.

[0033] In some embodiments, each debugging cycle of any one of the initial debugging phase and the advanced debugging phase includes:

[0034] Loading the to-be-processed text and the processed control text in the first learning sample library into the first enhanced generation component to obtain the transformed text output by the first enhanced generation component;

[0035] Loading the transformed text into a second enhanced generation component to obtain a restored text to be processed output by the second enhanced generation component, and determining a first error between the restored text to be processed and the text to be processed;

[0036] Identifying the transformed text and the processed control text according to the identification components corresponding to the stages, and obtaining a first confidence level for identifying the transformed text as a non-to-be-processed text, and a second confidence level for identifying the processed control text as a to-be-processed text;

[0037] A first network evaluation index value is determined based on the first confidence level, the second confidence level, and the first error, and a network learnable variable of the first basic neural network is optimized based on the first network evaluation index value.

[0038] In some embodiments, in the advanced debugging phase, the text to be processed also includes customer service emotional text samples;

[0039] If the text to be processed is a customer service emotion text sample, the processing control text is a business knowledge text sample, and the transformed text is a business knowledge-based emotion text, wherein the business knowledge-based emotion text represents the text after the business knowledge of the business knowledge text sample is transferred to the customer service emotion text sample.

[0040] In some embodiments, the second authentication component includes a first authentication branch component and a second authentication branch component;

[0041] The first identification branch component is used to identify emotional business knowledge text and customer service emotional text samples;

[0042] The second identification branch component is used to identify business knowledge sentiment text and business knowledge text samples.

[0043] In some embodiments, the second basic neural network is debugged according to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library to obtain the debugged second basic neural network, including:

[0044] According to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library, the second basic neural network is debugged multiple times in a loop until the third debugging end requirement is met, wherein each loop debugging includes:

[0045] Loading the emotional business knowledge text and the sample vocabulary transformation text corresponding to the business knowledge text sample into the representation information mining component of the second basic neural network to perform representation information mining, thereby obtaining first text representation information of the emotional business knowledge text and second text representation information of the vocabulary transformation text;

[0046] Loading the first text representation information and the second text representation information into the vocabulary transformation component of the second basic neural network, performing vocabulary transformation on the emotional business knowledge text, and obtaining a vocabulary-transformed emotional business knowledge text;

[0047] Determining a second error between the vocabulary-transformed text and the vocabulary-transformed emotional business knowledge text;

[0048] A second network evaluation index value is determined based on the second error, and network learnable variables of the representation information mining component and the vocabulary transformation component are optimized based on the second network evaluation index value.

[0049] In a second aspect, the present application provides a customer service system, comprising a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and the processor implements the steps in the above-described method when executing the program.

[0050] The beneficial effects of the present application include at least: the AI-based customer service message generation method and customer service system provided by the present application, attack defensive debugging of the first basic neural network based on the first learning sample library, strengthening the overall representation information and detailed representation information of the text to be processed and the processing control text based on the first sound reinforcement generation component, and integrating the text to be processed and the processing control text after the representation information is strengthened to obtain a transformed text. When the text to be processed is a business knowledge text sample, the transformed text is an emotional business knowledge text after emotion transfer. Because the present application strengthens the overall representation information and detailed representation information of the business knowledge text sample and the customer service emotion text sample, the debugged first basic neural network can consider the overall emotion type transfer and maintain the specific knowledge details of the business knowledge text after loading it into the business knowledge text to be processed and the emotion guidance text.

[0051] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0053] Figure 1 A schematic diagram of the implementation flow of an AI-based customer service message generation method provided in an embodiment of the present application.

[0054] Figure 2 A schematic diagram of the hardware entity of a customer service system provided in an embodiment of the present application.

[0055] Figure 3 A schematic diagram of the debugging process of a customer service emotion transformation network provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0057] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. The terms "first / second / third" involved are merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first / second / third" may be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs. The terms used herein are for the purpose of describing this application only and are not intended to limit this application.

[0058] The embodiment of the present application provides a method for generating customer service messages based on AI, which can be executed by a processor of a customer service system. The customer service system can refer to a server, a laptop, a tablet computer, a desktop computer, a smart TV, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, a portable gaming device), and other devices with data processing capabilities.

[0059] Figure 1 A schematic diagram of an implementation flow of an AI-based customer service message generation method provided in an embodiment of the present application, such as Figure 1 As shown, the method includes the following steps S10 to S30:

[0060] Step S10: Determine the business knowledge text and the emotion guidance text.

[0061] Step S20: Determine the business knowledge text as the text to be processed, determine the emotion guidance text as the processing control text and load it into the pre-debugged customer service emotion transformation network to obtain the emotion type business knowledge text generated by the customer service emotion transformation network that corresponds to the business knowledge text and the emotion guidance text.

[0062] Please refer to Figure 2 The debugging process of the customer service emotion transformation network includes the following steps S100 to S300:

[0063] Step S100: determining a first learning sample library, wherein the first learning sample library includes a plurality of business knowledge text samples and a plurality of customer service emotion text samples;

[0064] Step S200: performing attack defense debugging on the first basic neural network based on the first learning sample library to obtain a debugged first basic neural network, wherein the first basic neural network includes a first reinforcement generation component, and the first reinforcement generation component is used to strengthen the overall representation information and detailed representation information of the loaded to-be-processed text and the processed control text, and integrate the to-be-processed text and the processed control text after the representation information is strengthened to obtain a transformed text;

[0065] Step S300: Based on the debugged first basic neural network, a customer service emotion transformation network is obtained, and the customer service emotion transformation network includes the first enhanced generation component in the debugged first basic neural network; wherein, if the text to be processed is a business knowledge text sample, the processing control text is the customer service emotion text sample, and the transformed text is the emotional business knowledge text, and the emotional business knowledge text represents the business knowledge text after the emotion type of the business knowledge text sample is converted into the emotion type of the customer service emotion text sample.

[0066] The AI-based customer service message generation method provided in the embodiment of the present application uses artificial intelligence technology to improve the quality of customer service system message replies, and aims to automatically generate customer service replies that are both accurate and in line with a preset emotional style by combining business knowledge with specific emotional guidance.

[0067] First, the customer service system receives two key inputs: business knowledge text and emotional guidance text. Business knowledge text is the actual information about products, services, policies, etc. in the customer service's daily replies, such as answering how to reset a password or explaining the terms of service. Emotional guidance text is the specific style template that you want to give to the customer service reply, such as humor, formality, friendliness, and other language expression patterns with different emotional colors.

[0068] In order to generate professional and humane responses, the customer service system uses a pre-debugged customer service sentiment transformation network. The core task of this network is to fuse business knowledge text (text to be processed) with selected sentiment guidance text (processing control text), thereby generating responses that contain accurate information and match a specific sentiment style, which is called sentiment-type business knowledge text.

[0069] The customer service emotion transformation network debugging process includes the following steps:

[0070] 1. Construction of learning sample library: First, we build a first learning sample library, which contains rich business knowledge text samples (such as FAQs) and corresponding customer service response samples with various emotional styles (such as humorous, serious, etc.). This step ensures that the model has enough examples to learn how to incorporate different emotions into standard answers.

[0071] 2. Neural network debugging and optimization: Use the first learning sample library to conduct adversarial training on a basic neural network. This is a process to improve the robustness and adaptability of the model, ensuring that the model can still output stably when facing various inputs. In this process, a key component is the first reinforcement generation component, which is similar to the generator in the generative adversarial network (GAN). It not only captures the global features of the text (such as themes and structures), but also focuses on detailed features (such as vocabulary selection and sentence patterns), and performs feature enhancement on this basis. Through this enhancement, the business knowledge text and emotional guidance text to be processed are integrated into a richer, more delicate and stylized transformed text.

[0072] 3. Formation of the customer service emotion transformation network: The first enhanced generation component debugged above is integrated into the final customer service emotion transformation network, so that the network can automatically match and integrate the specified emotion style according to the input business knowledge, and output personalized emotional business knowledge text.

[0073] For example, suppose the customer service system receives a query: "How do I change my account password?" as a business knowledge text. At the same time, the sentiment guidance text is set to a "humorous" style. The customer service sentiment transformation network will identify the "change password" operation steps as the core information based on the previously learned examples, and through its internal sentiment reinforcement mechanism, it will re-express these steps in a humorous language style, such as: "Change password? Easy! It's like changing a new lock for your little secret room. Just tap here, enter the new password, and the old one will be gone with the wind~". In this way, users not only get the information they need, but also feel a relaxed and pleasant communication experience.

[0074] In summary, the embodiments of the present application intelligently integrate business knowledge and emotional expression, making the responses of the customer service system both accurate and efficient as well as humane, thereby improving user experience and interaction satisfaction.

[0075] In step S10, the business knowledge text is the business text that the customer service (e.g., intelligent customer service chat bot) needs to reply, such as answering questions, solving problems, etc. The business knowledge text can be the answer text corresponding to the user's question obtained from the knowledge base after the intelligent customer service robot obtains the question text input by the user and analyzes it. These answer texts (i.e., business knowledge texts) are usually plain and straightforward texts without emotional color. In the customer service chat scene, directly outputting the answer text may not bring a good experience to the user. For example, the user may feel that it is relatively cold and boring.

[0076] Emotional guidance texts are examples with text styles, such as texts with emotional types such as playful, serious, humorous, and cold. Emotional guidance texts can include multiple categories, each of which corresponds to an emotional type, such as playful, rigorous, humorous, etc. In step S10, the determination of the emotional guidance text can be selected by the user himself, for example, the customer service chat interface displays: "Please select the customer service chat style you want... including: A-playful; B-humorous; C-scientific and rigorous..." After the customer selects the corresponding emotional type, the customer service system retrieves the emotional guidance text corresponding to the emotional type selected by the customer from the previously stored emotional guidance text library to complete the determination of the emotional guidance text. Alternatively, in another embodiment, the determination of the emotional guidance text can be that the customer service system analyzes the user's emotional polarity based on the user's chat message, and then selects the corresponding emotional type and the corresponding emotional guidance text based on the corresponding emotional polarity. For example, the customer service system recognizes that the user's current emotional polarity is "angry". In order to appease the user's emotions, a mild emotional type such as "cute" or "playful" can be selected, and the corresponding emotional guidance text can be retrieved. The way in which the customer service system identifies the emotional polarity corresponding to the user's chat messages can be implemented using existing technologies, and the embodiments of the present application do not limit this.

[0077] In the daily operation of the customer service system, step S10 involves two core elements: the determination of business knowledge text and emotional guidance text, which aims to ensure that the customer service response is both accurate and emotional to meet the communication preferences and needs of different users. As mentioned above, the business knowledge text is the specific information content that the customer service system needs to grasp and convey, which is directly related to the actual problems such as products, services, policies, etc. consulted by users. For example, when a user asks "How do I reset my account password?", the customer service system needs to accurately extract the relevant business knowledge text, that is, the steps to reset the password, including visiting a specific web page, clicking on the forgotten password link, verifying identity through email or mobile phone, setting a new password, and other specific guidance information. This information constitutes the core essence of the customer service system's response to ensure that users receive direct help.

[0078] At the same time, emotional guidance text is the key to adding a human touch to customer service replies. It defines the style and tone of the reply, aiming to establish a deeper emotional connection with the user. For example, for young user groups, the customer service system may choose "playful" or "humorous" emotional guidance to make the reply more intimate and interesting. For formal occasions or business customers, "serious" or "professional" emotional guidance may be adopted to ensure the seriousness and authority of the information transmission. Assuming the "humorous" style is selected, the customer service system may add light-hearted language elements when replying to the user's request to reset the password, such as "Don't worry, forgetting your password is like forgetting to put sugar in your breakfast. Let's add some 'sweetness' (referring to easy steps) to help you get back that familiar taste!"

[0079] As an example of a specific scenario, when the customer service system receives the above inquiry about resetting the password, it first accurately captures the business knowledge text from the database to form a clear, step-by-step guide. Then, based on the previously set "humorous" emotional guidance, the customer service system uses the pre-trained emotional transformation network to transform the rigid operation guide into an interesting reply, such as: "Oh, I'm confused about the password! Follow me to turn left to verify the email, turn right to enter the new key, and your password hut will be brand new!" Such a reply not only provides necessary help, but also enhances the user's positive experience through a personalized language style.

[0080] In step S20, the focus is on using natural language processing technology, especially the customer service sentiment transformation network, to integrate business knowledge with preset emotional styles to create customer service responses that are both professional and humane. The following is a detailed description of how to carry out this step in actual application scenarios: When the customer service system receives a query from a user, such as "How to apply for a refund?", first, the system identifies and extracts relevant business knowledge texts, which include detailed operation guides for each step of the refund process, such as logging in to an account, finding an order, selecting a refund reason, submitting an application, etc. These contents constitute the core of the text to be processed and are the substantive information for responding to user questions. Next, the customer service system selects appropriate emotional guidance texts based on user portraits or user interaction history. For example, if data analysis shows that the user prefers a friendly and encouraging communication method, then the emotional guidance text will be a positive, warm and supportive tone. This set of texts is used as a processing control text to inject a specific emotional color into the final reply. Afterwards, the customer service system loads these two types of texts into a customer service sentiment transformation network that has been finely debugged. This network may be based on a deep learning model, such as a variant of the recurrent neural network (RNN) - the long short-term memory network (LSTM), or the more advanced Transformer architecture, which are good at understanding and generating sequential data with contextual dependencies and are particularly suitable for processing language tasks.

[0081] Inside this network, business knowledge text is used as input and converted into dense vector representations by the encoder. These vectors capture the semantic features of the text. For example, the various steps of the refund process can be mapped into a series of ordered feature vectors, each of which represents the semantic information of a step. At the same time, the emotional guidance text is encoded into an emotional feature vector through another path. For example, the sentiment of warm support may be composed of a set of feature values ​​that emphasize affirmation and comfort. Then, the customer service sentiment transformation network combines the business knowledge vector with the emotional feature vector through a fusion mechanism, such as an attention mechanism or a gating unit, to generate new vector sequences. These sequences not only contain the precise information of the original business knowledge, but also incorporate the target emotional color. Finally, the decoder converts these fused vectors back to natural language text to form a reply that contains both detailed refund guidance and warm and encouraging emotions, such as: "Don't worry, the refund journey is simple! Just log in, find the small order of that memory, select the reason for the refund with a click, and submit it. We will process it for you quickly. Looking forward to your visit again!"

[0082] Through such a technical process, the customer service system not only ensures the accuracy of information, but also improves the user experience through personalized emotional communication, achieving a perfect combination of technology and humanistic care.

[0083] The debugging process of the customer service emotion transformation network, that is, each step of steps S100 to S300 is introduced below.

[0084] In step S100, the customer service system collects and organizes two types of key samples: business knowledge text samples and customer service emotional text samples, to ensure that the model can accurately understand the business logic and flexibly use a variety of emotional styles to respond. Business knowledge text samples cover various business consulting scenarios that customer service may encounter in daily work, such as product instructions, return and exchange procedures, and service terms explanations. For example, a specific business knowledge text sample may be: "How to reset your account password? Please visit the official website, click the 'Forgot Password' link on the login page, and follow the prompts." Such samples ensure that the model can accurately grasp and output the steps and information to solve specific problems. Customer service emotional text samples focus on showing appropriate emotional expressions in different situations so that the customer service system can imitate and generate responses in corresponding styles. Emotional examples can be divided into playful ones such as "Haha, you are a little confused about your password. Don't worry, follow this cheat to retrieve your memory key!"; serious ones such as "For the security of your account, please strictly follow the steps below to reset your password."; humorous ones such as "Oops, another friend who is locked out by his password. Don't be afraid, I will teach you a 'door-opening spell'!"; and concise and cool ones such as "Password reset guide: official website - login - forgot password. End." Through these diverse texts, the model can learn how to adjust its language style according to different user preferences.

[0085] The process of building these sample libraries requires careful planning and execution. First, the customer service system selects representative cases based on historical conversation records, user feedback, and business needs analysis to ensure the comprehensiveness and balance of the samples. Then, natural language processing technology is used to pre-process the text, such as word segmentation, removal of stop words, and sentiment annotation, so as to better extract features. For emotional text samples, it is also necessary to additionally annotate their emotional categories and intensities to form structured data, such as marking "Haha, password is a little confused..." as "playful, positive sentiment, medium intensity". Subsequently, these prepared text samples are converted into a format that can be understood by the machine learning model, such as converting the text into a feature vector of the bag-of-words model, a TF-IDF weight matrix, or a word embedding vector (such as Word2Vec, GloVe). In this way, each text sample becomes a set of digital vectors, each number representing the importance or semantic relationship of a word in a specific context.

[0086] Finally, these high-quality learning examples will be used to train the customer service emotion transformation network. The models that may be used include but are not limited to long short-term memory networks (LSTM), Transformer or BERT and other deep learning architectures. The model parameters are continuously adjusted through the back-propagation algorithm until the model can flexibly use various emotional styles to respond while retaining business accuracy. Step S100 lays a solid data foundation for the customer service emotion transformation network by creating and optimizing the first learning example library, ensuring that it can efficiently learn and simulate the comprehensive capabilities of human customer service in handling business and emotional communication.

[0087] In step S200, the focus is on improving the robustness and generalization ability of the customer service sentiment transformation network through attack defensive debugging, that is, adversarial training, to ensure that the customer service system's responses are not only varied in style but also stable and accurate when facing potential malicious attacks or abnormal inputs. The core task of this stage is to deeply optimize the first basic neural network (i.e., the neural network that needs to be trained initially) for the first learning sample library established in the first step to make it more robust.

[0088] Specifically, the customer service system adopts a comprehensive strategy, in which the generator in the generative adversarial network (GAN) framework can be used as the first enhanced generation component, which plays a vital role in adversarial training. The first enhanced generation component aims to capture not only the global features of the text, such as the theme and semantic framework of the text, but also the detailed representation information, such as vocabulary selection and grammatical structure, so as to comprehensively enhance the representation information of the text to be processed and the processing control text.

[0089] Taking an actual application scenario as an example, suppose the customer service system receives a query about the product return policy: "I want to know the specific process of returning a product?" The basic neural network first loads this text to be processed and a processing control text at the same time: "Please refer to our Help Center Guide for the return process." Next, the first reinforcement generation component will perform feature enhancement on these two texts respectively: Overall representation information enhancement involves identifying and strengthening the topic relevance of the text, ensuring that even after the style changes, the response is still closely centered around the central topic of "return process." Detail representation information enhancement focuses on improving the fluency and naturalness of the language, such as by imitating the sentence structure and vocabulary selection of a specific emotional style (such as formal, friendly), so that the final response meets both business requirements and the expected emotional experience of the user.

[0090] After the above two steps of enhancement, the first enhancement generation component integrates these enhanced representation information to generate a "transformed text". For example, for the above query, the transformed text may be adjusted to: "Dear, returns are so easy! Just jump to our warm help center, and the return guide is clear at a glance!" This not only retains the core information of the original query, but also incorporates a more cordial and friendly communication style.

[0091] By continuously iterating this process, the customer service system can learn how to adapt and create a variety of response styles while keeping the information accurate, and show greater robustness when facing possible noise input or malicious attacks. Adversarial training ensures that the first basic neural network can become more mature and reliable after this series of challenging debugging, providing users with a safer, more efficient and personalized service experience.

[0092] As an implementation manner, the step S200, performing attack defense debugging on the first basic neural network based on the first learning sample library to obtain the debugged first basic neural network, may specifically include:

[0093] Step S210: determining a first basic neural network, wherein the first basic neural network includes the first reinforcement generation component and the first identification component (i.e., the discriminator), and performing multiple cycles of initial debugging on the first basic neural network based on the first learning sample library until the first debugging end requirement is met;

[0094] Step S220: replacing the first identification component that meets the first debugging end requirement with a second identification component with higher identification performance, to obtain an iterated first basic neural network;

[0095] Step S230: Based on the first learning sample library, the iterated first basic neural network is debugged multiple times in an advanced debugging phase until the second debugging end requirement is met, thereby obtaining the debugged first basic neural network.

[0096] The first basic neural network consists of two main components: a first enhanced generation component and a first identification component, which can be understood as the generator and the discriminator in the GAN network. At this stage, the customer service system will use the data in the first learning sample library to perform initial debugging on the first basic neural network. This process is repeated many times, that is, the network will repeatedly learn and adjust until the preset first debugging end requirement is reached. For example, this requirement can be that the accuracy of the network on the verification set reaches a certain standard, or the network evaluation index, that is, the loss function is reduced to below a certain threshold. Once the initial debugging link is completed and the performance of the first basic neural network meets the first debugging end requirement, the customer service system replaces the first identification component with a second identification component with higher identification performance. The purpose of this step is to enhance the identification ability of the network so that it can better learn and optimize in subsequent advanced debugging. The first basic neural network of the first basic neural network of the embodiment of the present application includes a first enhanced generation component and a first identification component. The function of the first enhanced generation component is as described above, and the first identification component is used to identify whether the transformed text is a non-processed text, and identify whether the processed control text is a processed text. According to the attack defensive debugging between the first enhanced generation component and the first identification component, the first enhanced generation component can generate a better transformed text. If the first debugging end requirements are met, the first identification component is replaced with a second identification component with higher identification performance, and the transformation effect of the first enhanced generation component is further increased based on the second identification component. If the text to be processed is a business knowledge text sample, the transformation effect of the first enhanced generation component represents the effect of transforming the style of the business knowledge text into the same emotion type as the emotion guidance text. Based on the iterative first basic neural network, the advanced debugging link is debugged multiple times in a cycle, and the debugged first basic neural network has a better effect on emotion type conversion.

[0097] In step S230, the customer service system uses the updated first basic neural network for advanced debugging. This process is also based on the first learning sample library for multiple cycles of debugging until the network's performance meets the second debugging end requirement. This requirement is usually more stringent than the first debugging end requirement to ensure that the network can achieve a higher performance level after advanced debugging. Finally, after this series of debugging processes, the customer service system will obtain a first basic neural network with optimized performance and stable performance.

[0098] During the entire debugging process, the customer service system continuously monitors the performance of the network and adjusts hyperparameters such as learning rate and batch size as needed to ensure that the network can maintain the best learning state at different debugging stages. At the same time, through adversarial training, the network can not only learn how to better generate and identify data, but also improve its defense capabilities against potential attacks (such as adversarial samples), thereby showing higher robustness and stability in practical applications.

[0099] As an implementation mode, each debugging cycle of any debugging link in the initial debugging link and the advanced debugging link includes: loading the to-be-processed text and the processed control text in the first learning sample library into the first reinforcement generation component to obtain the transformed text output by the first reinforcement generation component; loading the transformed text into the second reinforcement generation component to obtain the restored to-be-processed text output by the second reinforcement generation component, and determining the first error between the restored to-be-processed text and the to-be-processed text; identifying the transformed text and the processed control text according to the identification component corresponding to the stage, and obtaining a first confidence level for identifying the transformed text as non-to-be-processed text, and a second confidence level for identifying the processed control text as to-be-processed text; determining a first network evaluation index value based on the first confidence level, the second confidence level and the first error, and optimizing the network learnable variables of the first basic neural network based on the first network evaluation index value.

[0100] The first basic neural network includes two enhanced generation components and one identification component, wherein the first enhanced generation component is used to enhance the overall representation information and detailed representation information of the loaded text to be processed and the processed control text, and integrate the text to be processed and the processed control text after the representation information is enhanced to obtain the transformed text, and the second enhanced generation component is used to restore the transformed text to obtain the restored text to be processed, and the ability of the first enhanced generation component is optimized according to the quality of the restoration.

[0101] In each debugging cycle, the customer service system first loads the text to be processed and the processing control text from the first learning sample library. These texts are prepared in advance for training and optimizing the neural network.

[0102] After loading the text, the customer service system inputs the text into the first reinforcement generation component, which outputs the transformed text. This transformed text is a new text generated by the first reinforcement generation component based on the text to be processed, which is intended to simulate the style or emotion of the processed control text. Next, the customer service system loads the transformed text into the second reinforcement generation component. The purpose of this component is to try to restore the original text to be processed, so as to verify the transformation effect of the first reinforcement generation component. The restored text output by the second reinforcement generation component will be compared with the original text to be processed to determine the first error between the two. This error reflects the degree of information loss or distortion in the transformation process. At the same time, the customer service system uses the identification component (discriminator) corresponding to the current debugging stage to identify the transformed text and the processed control text. The discriminator outputs two confidence levels: one is the first confidence level that identifies the transformed text as non-text to be processed, and the other is the second confidence level that identifies the processed control text as text to be processed. These two confidence levels reflect the accuracy of the discriminator in classifying the text. The customer service system can use an algorithm based on cosine similarity to calculate the first error. Cosine similarity is a commonly used method to measure the angular difference between vectors, especially suitable for text similarity comparison in high-dimensional space. For example, the restored text and the original text to be processed are encoded into vectors respectively, and by calculating the cosine similarity of the two vectors, the customer service system obtains the first error value between them.

[0103] Based on the first confidence level, the second confidence level, and the first error, the customer service system calculates a first network evaluation index value (i.e., loss function value). This index combines the performance of the generator and the discriminator, and is used to evaluate the overall performance of the current neural network. For example, the first network evaluation index value can be obtained by using an adversarial loss function to calculate the first confidence level and the second confidence level to obtain the adversarial loss, and then adding the adversarial loss to the first error. The loss function used is not limited.

[0104] Finally, the customer service system optimizes the network learnable variables of the first basic neural network, such as weights and biases, based on the network evaluation index value. By continuously adjusting these variables, the neural network can gradually learn how to better transform and identify text emotions, thereby improving its overall performance.

[0105] For example, suppose the text to be processed is a customer feedback expressing dissatisfaction: "The quality of this product is too poor!" The control text is a positive feedback after sentiment transformation: "The quality of this product still has a lot of room for improvement." During the debugging process, the first reinforcement generation component attempts to transform the text to be processed into positive feedback similar to the control text, while the discriminator needs to accurately identify whether the transformed text has achieved the expected emotional style. Through multiple cycles of debugging and optimization, the neural network of the customer service system will gradually learn how to effectively transform and identify emotions.

[0106] As an implementation method, in the advanced debugging phase, the text to be processed also includes a customer service emotion text sample; if the text to be processed is a customer service emotion text sample, the processing control text is a business knowledge text sample, and the transformed text is a business knowledge-based emotion text, and the business knowledge-based emotion text represents the text after the business knowledge of the business knowledge text sample is transferred to the customer service emotion text sample.

[0107] As an embodiment, the second identification component includes a first identification branch component and a second identification branch component; the first identification branch component is used to identify emotional business knowledge text and customer service emotional text samples; the second identification branch component is used to identify business knowledge emotional text and business knowledge text samples.

[0108] When debugging the first basic neural network, the embodiment of the present application also determines the customer service emotion text sample as the text to be processed, and determines the business knowledge text sample as the processing control text. At this time, the transformed text is converted into business knowledge emotion text. The business knowledge emotion text means that the business knowledge of the business knowledge text sample is transferred to the text after the customer service emotion text sample is transferred. This enables the first reinforcement generation component to learn the ability to transfer business knowledge, which can help the first reinforcement generation component understand the business knowledge in the business knowledge text more accurately, reduce the emotional error of the business knowledge of the business knowledge text when the first reinforcement generation component performs emotion type transfer, and retain the detailed information of the emotional business knowledge text as much as possible.

[0109] In the debugging process of the customer service emotion transformation network, step S300 marks the stage of transitioning from the fully debugged first basic neural network to building a complete customer service emotion transformation network.

[0110] Specifically, the customer service system uses the debugged first basic neural network, especially the enhanced first enhanced generation component, to perform an innovative conversion process. The first enhanced generation component is, for example, a variational autoencoder (VAE) or conditional GAN ​​optimized by deep learning, which has learned how to flexibly adjust the emotional color of the text while maintaining the integrity of the information. Its working mechanism is to establish a mapping relationship between a large number of business knowledge text samples and corresponding customer service emotional text samples by learning.

[0111] For example, when a customer service system receives a standard business knowledge query, such as "What are the specific terms of the return and exchange policy?" At this time, the comparison text may be an example of a customer service response full of empathy and understanding: "We understand your concern very well. Regarding each step of the return and exchange process, we have carefully prepared a guide and hope to help you solve the problem quickly." Through the customer service emotion transformation network, the customer service system must not only understand and extract the core business information in the query, but also analyze the emotional characteristics in the comparison text, such as understanding, care and willingness to help.

[0112] Subsequently, the first enhanced generation component accurately transforms the emotional type of the original business knowledge text "What are the specific terms of the return and exchange policy?" into the sympathy and helping tendencies shown in the customer service emotional text sample, and generates the following emotional business knowledge text: "Please rest assured, in order to ensure your rights and interests, our return and exchange policy is detailed and considerate. Let me introduce you to each simple step in detail!" Such a reply not only conveys the necessary business information, but also wraps a layer of warm humanistic care, effectively improving user satisfaction and trust.

[0113] Step S300 integrates and applies the debugged first basic neural network, especially its core reinforcement generation component, so that the customer service system can intelligently transform the cold and hard business knowledge text into an emotional response, making the entire interaction process more in line with the user's emotional needs and optimizing the customer service experience.

[0114] The AI-based customer service message generation method provided in the present application performs attack defensive debugging on the first basic neural network according to the first learning sample library, strengthens the overall representation information and detailed representation information of the text to be processed and the processing control text according to the first sound reinforcement generation component, and integrates the text to be processed and the processing control text after the representation information is strengthened to obtain a transformed text. When the text to be processed is a business knowledge text sample, the transformed text is an emotional business knowledge text after emotion transfer. Because the present application strengthens the overall representation information and detailed representation information of the business knowledge text sample and the customer service emotion text sample, the debugged first basic neural network can consider the overall emotion type transfer and maintain the specific knowledge details of the business knowledge text after being loaded into the business knowledge text to be processed and the emotion guidance text.

[0115] As an implementation mode, step S300, based on the debugged first basic neural network, obtains a customer service emotion transformation network, including:

[0116] Step S310: determining a second learning sample library, wherein the second learning sample library includes a plurality of business knowledge text samples and a sample vocabulary transformation text in which each business knowledge text sample adopts vocabulary transformation.

[0117] In the embodiment of the present application, the second learning sample library is different from the first learning sample library in that: first, the second learning sample library has a smaller number of samples. The reason is that in the network training process of the embodiment of the present application, a small range of debugging samples are used to optimize the details of the emotional color transformation, and debugging is not required for large-scale learning samples. Then, the text learning samples in the second learning sample library have a mapping relationship. In other words, one business knowledge text sample corresponds to no less than one sample vocabulary transformation text. The sample vocabulary transformation text represents the text that performs vocabulary transformation on the corresponding business knowledge text sample. The vocabulary transformation represents the optimization of the local or overall vocabulary in the business knowledge text sample according to the target style, for example, optimizing it to a playful character. Because the business knowledge text sample and the sample vocabulary transformation text are semantically matched, the difference only exists in the vocabulary selection of the expression. Then, according to the debugging, the debugged second basic neural network can learn the details of the vocabulary dimension.

[0118] Step S320: Based on the first reinforcement generation component in the debugged first basic neural network, an emotion rendering operation is performed on each business knowledge text sample in the second learning sample library to obtain an emotional business knowledge text corresponding to each business knowledge text sample.

[0119] The embodiment of the present application is based on the first reinforcement generation component in the first basic neural network debugged in the above embodiment, and performs emotion rendering on each business knowledge text sample in the second learning sample library to obtain emotional business knowledge text.

[0120] At this stage, the customer service system uses the first reinforcement generation component in the first basic neural network that has been debugged and optimized (as mentioned above, it can be the generator in GAN) to apply emotional rendering to the business knowledge text samples in the second learning sample library, creating responses full of emotional resonance to better connect with users. In specific operations, it is assumed that the first basic neural network uses a deep learning model, such as a long short-term memory network (LSTM) combined with an attention mechanism, or a Transformer architecture, which are good at understanding and generating text with contextual dependencies and emotional colors. Through previous training, the first reinforcement generation component has learned how to recognize and generate expressions that are both consistent with business logic and rich in emotion.

[0121] Take bank customer service as an example. When faced with a user asking "How do I apply for a credit card?", the customer service system uses the emotional rendering operation in step S320. Instead of simply listing the steps mechanically, it generates an emotional response like this: "Hello! I'm glad to help you start a new chapter in your credit life. Applying for a credit card is very easy. You can choose to fill out the application online or visit our branch to enjoy one-on-one exclusive service. Let's embark on this wonderful financial journey together!" This answer not only provides necessary information, but also incorporates positive and friendly emotional elements, enhancing the user interaction experience.

[0122] In this process, the algorithm inside the customer service system will analyze the text features in the second learning sample library, such as keywords "credit card" and "processing", and adjust the vocabulary selection, sentence structure and tone according to the user's possible emotional needs to generate emotional business knowledge text that matches them. Each step reflects a deep understanding of the user's psychological expectations and the personalized service upgrade achieved through technical means.

[0123] Step S330: Debug the second basic neural network according to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library to obtain a debugged second basic neural network, wherein the second basic neural network is used to obtain text representation information of the sample vocabulary transformation text and the emotional business knowledge text, and perform vocabulary transformation on the emotional business knowledge text based on the text representation information to obtain the business knowledge text after vocabulary transformation.

[0124] The embodiment of the present application performs representation information mining and representation information integration operations on the emotional business knowledge text and sample vocabulary transformation text of each business knowledge text sample based on the second basic neural network, so that the second basic neural network can adaptively optimize the vocabulary based on the emotional guidance text to obtain the adjusted emotional business knowledge text. In step S330, the customer service system focuses on enhancing its understanding and application capabilities of emotional communication. The core task of this link is to further tune the second basic neural network based on the generated emotional business knowledge text and the corresponding sample vocabulary transformation text, aiming to enable the network to accurately capture the emotional color and vocabulary changes of the text, thereby generating responses that can both express emotions and flexibly adapt to different situations.

[0125] On this basis, the second basic neural network adopted by the customer service system is, for example, a hybrid architecture that combines the bidirectional encoder representation from the Transformer (BERT) model and the recurrent neural network (RNN). This design helps the model capture long-range contextual dependencies and complex emotional information. During the debugging process, the customer service system inputs the above emotional text and its transformed version, allowing the neural network to learn how to extract unique text representation information from these texts, that is, the characteristics of the text. These characteristics may include emotional intensity (such as positive, negative), vocabulary usage preferences, syntactic structure, etc. For example, the feature vector of emotional text may emphasize the positive emotional tendency and comforting tone of words such as "understanding" and "regret".

[0126] Through a large number of iterations and fine-tuning, the second basic neural network was optimized. It can not only accurately identify and extract the sentiment and features of the text, but also retain the core information of the original text while performing vocabulary transformation as needed, generating dynamic replies such as "If you are dissatisfied with the goods you received, we provide a fast return and refund service to ensure your shopping is worry-free." Such dynamic replies not only express sympathy and understanding, but also flexibly adapt to the user's specific expression, thereby improving the authenticity and satisfaction of the interaction.

[0127] Step S340: Based on the first reinforcement generation component in the debugged first basic neural network and the debugged second basic neural network, the customer service emotion transformation network is obtained.

[0128] After debugging the second basic neural network, step S340 constructs a text customer service emotion transformation network. For example, the customer service emotion transformation network includes the first reinforcement generation component in the first basic neural network and the debugged second basic neural network. When the network is applied, the business knowledge text and emotion guidance text to be processed are loaded into the first reinforcement generation component to obtain the emotional business knowledge text output by the first reinforcement generation component, and then the emotional business knowledge text and the emotional guidance text are loaded into the second basic neural network. The sample vocabulary transformation text and the text representation information of the emotional business knowledge text are based on the second basic neural network, and the emotional business knowledge text is vocabulary transformed based on the text representation information. Finally, the emotional business knowledge text after vocabulary transformation is output.

[0129] As an implementation manner, the step S330, according to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library, debugs the second basic neural network to obtain the debugged second basic neural network, which may specifically include:

[0130] According to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library, the second basic neural network is debugged multiple times in a loop until the third debugging end requirement is met, wherein each loop debugging includes:

[0131] Step S331: Load the emotional business knowledge text and sample vocabulary transformation text corresponding to the business knowledge text sample into the representation information mining component of the second basic neural network for representation information mining to obtain the first text representation information of the emotional business knowledge text and the second text representation information of the vocabulary transformation text.

[0132] Step S332: Load the first text representation information and the second text representation information into the vocabulary transformation component of the second basic neural network, perform vocabulary transformation on the emotional business knowledge text, and obtain a vocabulary-transformed emotional business knowledge text.

[0133] Step S333: Determine a second error between the vocabulary-converted text and the vocabulary-converted emotional business knowledge text.

[0134] Step S334: determining a second network evaluation index value based on the second error, and optimizing the network learnable variables of the representation information mining component and the vocabulary transformation component based on the second network evaluation index value.

[0135] Step S331 aims to extract key feature representations from the text through deep learning technology, thereby laying the foundation for subsequent vocabulary transformation and emotional processing. In specific implementation, the customer service system uses the representation information mining component in the second basic neural network to process two types of special text data: one is the emotional version of business knowledge text samples, and the other is the version of these texts after vocabulary transformation.

[0136] Taking online banking customer service as an example, consider a basic business knowledge text sample: "How to check your account balance?" Through emotional processing, this sentence may become: "Want to know your wealth status? Check your account balance, it's that simple!" Next, perform a vocabulary transformation on the emotional text to obtain: "Check your balance details in a few easy steps." Now, the customer service system sends these two types of text - "Want to know your wealth status? Check your account balance, it's that simple!" and "Check your balance details in a few easy steps" - to the representation information mining component of the second basic neural network.

[0137] The representation information mining component can adopt a model such as a bidirectional long short-term memory network (BiLSTM) combined with a self-attention mechanism, or a Transformer architecture. Such a design can effectively capture the sequential characteristics and contextual dependencies of the text while focusing on the important parts of the text. During the processing, each word or phrase is mapped into a high-dimensional vector that combines the semantics, contextual relationships, and potential emotional colors of the vocabulary. For example, "check account balance" may be mapped to a vector that contains semantic features related to financial queries and positive emotional tendencies.

[0138] Therefore, through step S331, the customer service system obtains the first text representation information of the emotional business knowledge text, which reflects the deep characteristics of the original information after adding emotional color; at the same time, it also obtains the second text representation information of the vocabulary transformation text, which reflects the expression diversity achieved through vocabulary adjustment without changing the core information. These representation information will serve as the basis for the next step of vocabulary transformation and model optimization, ensuring that the customer service system can communicate with users more flexibly and appropriately in an emotional way while maintaining accurate communication of business information.

[0139] Step S332 aims to enrich the expression of the customer service system through vocabulary changes, while maintaining the accuracy of information and the consistency of emotions. Taking the customer service scenario of an online shopping platform as an example, assume that the emotionalized business knowledge text is "Dear, check the logistics information, just one click, and the package dynamics are under your control", and the vocabulary transformation text is "Track the package progress, one-click operation, dynamic real-time update".

[0140] The customer service system feeds the first text representation information (i.e., the emotional feature vector of "Dear, check the logistics information...") and the second text representation information (the feature vector of "track the progress of the package...") into the vocabulary transformation component of the second basic neural network. This component can be designed as a Transformer-based architecture, which is good at processing the dependencies of sequence data and can flexibly adjust the vocabulary selection in the output sequence to achieve different expression effects. In this process, the Transformer model first analyzes the semantic and emotional clues in the two representation information, identifies the core concepts (such as "check the logistics information" and "track the progress of the package") and emotional colors (friendliness and efficiency). Then, based on these analyses, the model rearranges and modifies the vocabulary through the attention mechanism to generate new expressions while maintaining the intention and emotional tone of the original information. For example, the new text that may be generated is: "Dear customer, understand the whereabouts of the courier, move your fingers, and everything will be in sight."

[0141] Through this step, the customer service system not only realizes the diversified expression of existing texts, but also ensures that each communication can establish emotional resonance with users while conveying necessary business information, thereby enhancing the personalization of user experience and the natural fluency of interaction.

[0142] Step S333 involves the evaluation and optimization stage, the purpose of which is to ensure that the emotional business knowledge text after vocabulary transformation not only retains the original meaning, but also successfully integrates the expected emotional color, and this conversion is completed on the basis of minimizing errors. Specifically, this step quantifies the degree of proximity between the vocabulary transformation text and the vocabulary transformation emotional business knowledge text, that is, the second error, by calculating the difference between the vocabulary transformation text and the vocabulary transformation emotional business knowledge text, thereby guiding the fine-tuning of the model. Specifically, the customer service system can use an algorithm based on cosine similarity to calculate the second error. Cosine similarity is a commonly used method to measure the angular difference between vectors, and is particularly suitable for text similarity comparison in high-dimensional space. For example, the vocabulary transformation text and the vocabulary transformation emotional business knowledge text are encoded into vectors respectively, and by calculating the cosine similarity of the two vectors, the customer service system obtains the second error value between them.

[0143] After the customer service system calculates the second error through step S333, in step S334, the error is converted into a network evaluation index value, which can be understood as a loss function value, a cost function value, an evaluation function value or an objective function value. That is, the network evaluation index value is a quantitative method for measuring the difference between the predicted result and the actual result of the network. A lower network evaluation index value means a better network performance.

[0144] The customer service system uses the second error as a feedback signal and automatically adjusts the network parameters in the representation information mining component and the vocabulary transformation component, such as the weight matrix, bias term, and learning rate, through gradient descent or other optimization algorithms. Taking a simple linear regression model as an example, if there is a gap between the model prediction value and the actual value (i.e., the second error), the customer service system adjusts the weight and bias according to the gradient of the gap, gradually reducing the gap and making the model prediction closer to the expected output.

[0145] In the deep learning framework, if the Transformer model is used, the optimization process may involve adjusting the weights in the self-attention mechanism and fine-tuning the parameters in the FFN (fully connected feedforward network) layer to enhance the model's ability to capture text features and generate emotional expressions. The system iterates this process continuously, gradually reducing the loss function value until the preset convergence condition or optimization goal is reached, which means that while maintaining the accuracy of the information, the model is better at generating responses that meet business requirements and are rich in emotional color.

[0146] Step S334 promotes the continuous self-optimization of the neural network in the customer service system through the feedback mechanism of the loss function value, ensuring that the emotional transformation is not only in line with the business scenario, but also more delicate and humane in expression, thereby creating a more satisfactory interactive experience in customer service.

[0147] In one embodiment, the first reinforcement generation component is specifically used to complete the following steps:

[0148] Step S321: For any text in the loaded text to be processed and the processed control text, text embedding mapping is performed on the text according to a preset text embedding mapping component, and the outputs of multiple feature filtering units are obtained to obtain multiple groups of filtering representation information of the text; the filtering representation information output by different feature filtering units corresponds to different numbers of feature maps.

[0149] The core task of step S321 is to convert the original text data into a form that can be understood by the deep learning model and extract representative features. First, the customer service system uses a preset text embedding mapping component, which is based on a deep learning model such as BERT (Bidirectional Encoder Representations from Transformers) as a text encoding layer. BERT can map each word or word block to a high-dimensional vector space, and each vector represents the meaning of the word in the context. For example, the vector of "purchase" will be close to the vocabulary vectors related to purchasing behavior such as "order" and "shopping".

[0150] These text embedding vectors are then fed into multiple feature filter units, which can be understood as a series of convolutional layers. The role of the convolutional layer is to capture local patterns from these continuous word vector sequences, such as specific word combinations or phrase structures, which may contain specific semantic or emotional information. For example, a feature filter unit may be sensitive to keyword combinations that customers care about, such as "buy goods" and "delivery progress", and output a feature map to indicate the importance or frequency of these keywords.

[0151] Since different feature filter units are designed to capture different feature types, the number of feature maps (i.e., channel width) they output is different. One filter unit may only focus on emotional expression and output a feature map of one channel; while another filter unit may focus on identifying the urgency of the request and output a feature map of another channel. In this way, each set of filter representation information essentially decomposes the text from different dimensions, allowing the model to understand the input text from multiple perspectives. Step S321 is the basis of the customer service system's sentiment transformation network. It converts the original natural language text into a set of multi-dimensional, multi-level feature representations through text embedding mapping and feature filtering, laying the foundation for subsequent sentiment analysis and response generation.

[0152] Step S322: Determine a group of filter representation information with the largest number of feature graphs in each group of filter representation information as the reference filter representation information, and make the number of feature graphs of each group of filter representation information consistent with the number of feature graphs of the reference filter representation information.

[0153] The core goal of step S322 is to unify and optimize the multiple groups of filter representation information extracted previously to ensure their structural consistency for subsequent processing. In the specific operation, the customer service system will identify the group of filter representation information with the largest number of feature graphs and regard it as the "control filter representation information". Taking the actual application scenario as an example, assume that the customer service system receives a customer message: "I am very dissatisfied with your service!" At the same time, the system has a set of pre-set standards or positive response information as the control text processing result. After processing in step S321, the system obtains multiple groups of feature representations about customer messages and control texts, each group of feature representations contains a different number of feature graphs, reflecting information on different dimensions, such as emotional intensity, vocabulary relevance, etc. In step S322, the customer service system first identifies which group of feature representations has the largest number of feature graphs among these feature representations. It is assumed that it is the feature representation of the control text, which contains 5 feature graphs, corresponding to emotional tendency, urgency, service relevance, politeness and feedback needs. Then, the system adjusts the feature representations of other groups to ensure that they also have the same number of feature graphs, that is, 5. If the feature representation of the original customer message has only three feature graphs, the system will increase it to five feature graphs through copying or padding, so that the structures of the two are aligned. This ensures that no matter what the original input is, subsequent in-depth analysis and processing can be performed in a unified dimension.

[0154] This consistent processing not only simplifies the complexity of subsequent model processing, but also ensures that the model can fairly and comprehensively compare and integrate all feature information from customer messages and standard responses, so as to more accurately identify emotions and intentions, and generate appropriate customer service responses accordingly. In this way, the customer service system can more effectively understand and adapt to the emotional needs of customers, and improve service quality and efficiency.

[0155] Step S323: densely represent all the filter representation information after the uniformization process to obtain first dense representation information, and densely represent the reference filter representation information to obtain second dense representation information.

[0156] Step S323 aims to enhance the richness and depth of feature expression in order to more accurately capture and analyze the emotional details in customer service interactions. This step is mainly achieved by implementing dense representation technology, which is a process aimed at increasing the dimensionality and information content of data expression.

[0157] Specifically, after completing the alignment of the number of feature maps, the customer service system inputs all the uniformly processed filter representation information into a preset machine learning model, such as using a variant of a convolutional neural network (CNN) or a long short-term memory network (LSTM) combined with a fully connected layer to further refine and encode the features. This process is called "dense representation", which generates a higher-dimensional and more abstract feature representation, namely the first dense representation information, by performing multi-level nonlinear transformations on the original feature map. For example, each feature map may originally contain only simple sentence structure information, but after dense representation, it may be converted into high-level features representing specific emotional categories (such as satisfaction, dissatisfaction, inquiry, etc.) and semantic themes (such as product functions, price consultation, and after-sales service). At the same time, the customer service system will perform the same dense representation processing on the previously determined control filter representation information separately to generate the second dense representation information. This step ensures that the control information and customer information are compared and analyzed in the same feature space, which facilitates the system to understand the relationship and difference between the two. For example, a dense representation of control information might focus on expressing the emotional tone and word usage of an ideal customer service response, while a dense representation of customer information focuses on revealing the customer's immediate emotional state and underlying needs.

[0158] Through such processing, the customer service system can not only better understand the emotional state of individual customers, but also make efficient comparisons in a broader context, such as historical conversation patterns or typical customer behavior, thereby providing a solid foundation for generating personalized and highly adaptive responses in the next step.

[0159] Step S324: Strengthen the representation information of the first dense representation information and the second dense representation information respectively, and obtain the first inner product representation information based on the enhanced representation information after the representation information is strengthened for the first dense representation information and the second dense representation information; and obtain the second inner product representation information based on the enhanced representation information after the representation information is strengthened for the second dense representation information and the first dense representation information.

[0160] Step S324 improves the understanding of customer service interaction data through deep learning technology. This step focuses on feature enhancement of the first and second dense representation information previously obtained, and uses these enhanced representation information to perform inner product operations to generate deeper inner product representation information. This operation is performed autonomously by the customer service system without direct human intervention.

[0161] In terms of specific implementation, the customer service system uses feature enhancement methods, such as deep belief networks (DBN), residual networks (ResNet) or attention mechanisms, to further refine and emphasize key emotional features extracted from the raw data. Taking the attention mechanism as an example, it can dynamically assign different weights to different features, allowing the model to focus on the most important part of emotional understanding. This means that for certain feature vectors in the first dense representation information, such as high activation values ​​indicating strong dissatisfaction expressed by customers, the system will automatically give higher weights, thereby enhancing the expressiveness of these features.

[0162] The customer service system then performs an inner product operation on the enhanced first dense representation information and the second dense representation information (such as a standardized customer service response template or a representation of past successful cases). The inner product process is essentially an efficient feature fusion method. It generates a scalar value or a new vector by calculating the sum of the products of the corresponding elements of the two representation vectors to quantify the similarity or correlation between the two representations. For example, the first inner product representation information may reflect the degree of match between the customer's emotions and the standard emotional response pattern. If the value is high, it means that the customer service system can accurately identify and respond to the customer's emotional needs.

[0163] Similarly, by exchanging the positions of the first and second dense representation information and repeating the above inner product process, the customer service system generates the second inner product representation information. This step provides another perspective to help the system evaluate the effectiveness of emotion processing from the perspective of customer service response strategy, ensuring that not only customer emotions are captured, but also feedback strategies are optimized, such as adjusting language style, recommending solutions, or providing comfort measures. Ultimately, these inner product representation information provides a strong decision-making basis for the customer service system, enabling it to quickly and accurately formulate the most appropriate response strategy in complex and changing customer service scenarios, thereby improving customer satisfaction and problem-solving efficiency.

[0164] Step S325: performing a representation information integration operation on the first dense representation information, the second dense representation information, the first inner product representation information and the second inner product representation information corresponding to the loaded to-be-processed text and the processed control text respectively, and obtaining the transformed text based on the representation information integration operation result.

[0165] In step S325, the customer service system uses the idea of ​​ensemble learning to fuse various representation information obtained in the previous processing to generate a transformed text that is more adapted to the needs of the scene, aiming to improve the communication effect and satisfaction with customers. Specifically, it can be achieved in a variety of ways, such as weighted fusion, gating mechanism or attention mechanism to integrate all the representation information obtained above. A specific example is based on a fusion layer, which receives all the representation information as input and comprehensively considers this information through a series of nonlinear transformations (such as fully connected layers, activation functions, etc.), aiming to guide the model to learn how to adjust the text to be close to the style or emotion of the reference text. For example, the weights of the first and second dense representations can be adjusted based on the difference in the inner product representation information, so that the final fused representation is more inclined to the characteristics of the reference text. Based on the integrated representation information, this comprehensive representation is mapped back to the text space through a decoder or a generation module, such as a variational autoencoder (VAE) or a generation part of a generative adversarial network (GAN), to generate a transformed text with desired characteristics. This step may include an optimization process to ensure that the generated text is not only faithful to the original meaning in content, but also close to the reference text in style or emotion.

[0166] As an implementation manner, the step S324, respectively strengthening the first dense representation information and the second dense representation information, obtaining the first inner product representation information based on the strengthened representation information after the representation information is strengthened for the first dense representation information and the second dense representation information; obtaining the second inner product representation information based on the strengthened representation information after the representation information is strengthened for the second dense representation information and the first dense representation information, may specifically include:

[0167] Step S3241: performing a representation information activation operation on the first dense representation information and the second dense representation information respectively according to a preset nonlinear mapping function to obtain nonlinear mapping values ​​corresponding to the first dense representation information and the second dense representation information respectively.

[0168] Step S3241 is responsible for enhancing the intensity and complexity of the emotional expression of the original input through a nonlinear mapping function, that is, an activation function, so that the customer service system can better understand and simulate the delicate levels of human emotions, thereby providing a more intimate and personalized service experience during interaction.

[0169] The customer service system can apply preset nonlinear mapping functions, such as ReLU (Rectified Linear Unit), tanh, or more complex adaptive functions such as PReLU, to activate the first dense representation information and the second dense representation information respectively. Taking ReLU as an example, it converts all negative features to 0, retains positive values ​​and outputs them as is. This operation effectively highlights the positive features that are critical to emotional expression while suppressing irrelevant or negative noise. After such processing, the original feature vector is converted into a nonlinear mapping value with stronger discrimination. For example, the feature value related to "disappointment" may be significantly amplified, while the lexical feature value irrelevant to the context is weakened or eliminated.

[0170] For example, if the original feature value of the word "disappointment" in the first dense representation information is [0.6, -0.2, 0.1, ...], after ReLU activation, it may become [0.6, 0, 0.1, ...], which significantly highlights the emotional intensity of "disappointment". Similarly, the context-related features in the second dense representation information will also undergo a similar transformation, making the entire representation more inclined to reflect core emotions and needs. Through this step, the customer service system not only captures the core of customer emotions more accurately, but also lays a solid foundation for subsequent personalized feedback and service strategy adjustments, ensuring that more considerate and appropriate responses can be provided in subsequent exchanges.

[0171] Step S3242: For the nonlinear mapping values ​​corresponding to the first dense representation information and the second dense representation information, respectively, the overall representation information and the detail representation information are enhanced by using the influence coefficients of the overall representation information focusing strategy and the detail representation information focusing strategy to obtain the enhanced representation information corresponding to the first dense representation information and the second dense representation information, respectively.

[0172] Step S3242 introduces an attention mechanism to fine-tune the nonlinear mapping values ​​generated in the previous step, aiming to enhance the accuracy and depth of understanding of customer emotions and ensure that customer service responses are closer to the user's actual needs and emotional state. In specific operations, the customer service system uses the attention mechanism to assign an influence coefficient, that is, a weight, to each feature in the first dense representation information and the second dense representation information. This weight reflects the importance of the feature for understanding the sentiment and content of the entire text. The calculation of the influence coefficient is based on a weighted summation process, in which the contribution (weight) of each feature is determined by its relevance to the current context. For example, when a customer mentions "very disappointed", features that are closely related to negative emotions are given higher weights, while background or neutral words are given lower weights.

[0173] Assume that the first dense representation information vector after nonlinear mapping is V1 = v 11, v 12 , ..., v 1n , where each v 1i Represents the mapping value of a feature. Through the attention mechanism, the customer service system 1i Calculate an attention weight a 1i , these weights reflect the overall importance of each feature for understanding customer sentiment. Similarly, the second dense representation information V2=v 21 , v 22 , ..., v 2n There is a corresponding weight a 2i Using these weights, the customer service system performs feature enhancement, that is, multiplying the mapping value of each feature by its corresponding attention weight to obtain enhanced representation information. For example, the enhancement of the first dense representation information can be expressed as V 1enhanced = v 11 ·a 11 , v 12 ·a 12 , ..., v 1n ·a 1n ,Similarly, the second dense representation information is processed similarly.

[0174] Through this step, the customer service system not only captures the global emotional tendency (overall representation information), but also pays attention to the detailed features in the text (detailed representation information), ensuring a comprehensive and delicate capture of emotions. For example, for a sentence "Although the packaging is damaged, the product quality is very good", the system will not only notice the negative emotions brought by "damage", but also recognize the positive evaluation brought by "good quality" through detailed reinforcement, so as to balance the expression of understanding and affirmation in the response and provide more personalized and effective services.

[0175] Step S3243: performing inner product calculation on the nonlinear mapping value of the first dense representation information and the enhanced representation information of the second dense representation information to obtain first inner product representation information.

[0176] Step S3244: performing inner product calculation on the nonlinear mapping value of the second dense representation information and the enhanced representation information of the first dense representation information to obtain second inner product representation information.

[0177] Through these two steps of inner product calculation, the customer service system can not only accurately capture and analyze the subtle differences in customer emotions, but also intelligently match the most appropriate response strategy, thereby demonstrating a high degree of personalization and empathy in customer service interactions, effectively improving customer satisfaction and problem-solving efficiency.

[0178] It should be noted that in the embodiment of the present application, if the above-mentioned AI-based customer service message generation method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.

[0179] An embodiment of the present application provides a customer service system, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0180] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0181] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0182] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0183] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0184] Figure 3 A hardware entity diagram of a customer service system provided in an embodiment of the present application, such as Figure 3 As shown, the hardware entity of the customer service system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.

[0185] The memory 1002 stores computer programs that can be run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001. It can also cache data to be processed or processed by the processor 1001 and various modules in the customer service system 1000 (for example, image data, audio data, voice communication data, and video communication data). This can be achieved through flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0186] When the processor 1001 executes the program, the steps of any of the above-mentioned methods for generating customer service messages based on AI are implemented. The processor 1001 generally controls the overall operation of the customer service system 1000.

[0187] An embodiment of the present application provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the AI-based customer service message generation method in any of the above embodiments.

[0188] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For the technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding. The above processor can be at least one of a target application integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, and a microprocessor. It can be understood that the electronic device that realizes the above processor function can also be other, and the embodiments of the present application are not specifically limited.

[0189] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0190] It should be understood that the "one embodiment" or "one embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" appearing in various places throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / 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 application. The above-mentioned sequence number of the embodiment of the present application is only for description and does not represent the advantages and disadvantages of the embodiment. It should be noted that, in this article, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0191] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0192] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0193] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0194] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0195] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0196] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A customer service message generation method based on AI, characterized in that: Applied to a customer service system, the method includes: Determine business knowledge texts and emotional guidance texts; Determine the business knowledge text as the text to be processed, determine the emotion guidance text as the processing control text and load it into the pre-debugged customer service emotion transformation network, and obtain the emotion type business knowledge text corresponding to the business knowledge text and the emotion guidance text generated by the customer service emotion transformation network; The debugging process of the customer service emotion transformation network includes: Determine a first learning sample library, wherein the first learning sample library includes a plurality of business knowledge text samples and a plurality of customer service emotion text samples; Performing attack defense debugging on the first basic neural network based on the first learning sample library to obtain a debugged first basic neural network, wherein the first basic neural network includes a first reinforcement generation component, and the first reinforcement generation component is used to strengthen the overall representation information and the detailed representation information of the loaded text to be processed and the processed control text, and integrate the text to be processed and the processed control text after the representation information is strengthened to obtain a transformed text; Based on the debugged first basic neural network, a customer service emotion transformation network is obtained, wherein the customer service emotion transformation network includes a first reinforcement generation component in the debugged first basic neural network; If the text to be processed is a business knowledge text sample, the processed reference text is a customer service emotion text sample, and the transformed text is an emotional business knowledge text, wherein the emotional business knowledge text represents a business knowledge text after the emotion type of the business knowledge text sample is transformed into the emotion type of the customer service emotion text sample; Wherein, based on the first basic neural network after debugging, a customer service emotion transformation network is obtained, including: Determine a second learning sample library, wherein the second learning sample library includes a plurality of business knowledge text samples and a sample vocabulary transformation text in which each business knowledge text sample is vocabulary transformed; According to the first reinforcement generation component in the debugged first basic neural network, an emotion rendering operation is performed on each business knowledge text sample in the second learning sample library to obtain an emotional business knowledge text corresponding to each business knowledge text sample; According to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library, the second basic neural network is debugged to obtain the debugged second basic neural network, the second basic neural network is used to obtain text representation information of the sample vocabulary transformation text and the emotional business knowledge text, and perform vocabulary transformation on the emotional business knowledge text based on the text representation information to obtain the business knowledge text after vocabulary transformation; Based on the first reinforcement generation component in the debugged first basic neural network and the debugged second basic neural network, the customer service emotion transformation network is obtained.

2. The method according to claim 1, characterized in that The first reinforcement generation component is specifically used for: For any text in the loaded to-be-processed text and the processed control text, text embedding mapping is performed on the text according to a preset text embedding mapping component, outputs of multiple feature filtering units are obtained, and multiple groups of filtering representation information of the text are obtained; The filter representation information output by different feature filter units corresponds to different numbers of feature maps; Determine a group of filter representation information with the largest number of feature graphs in each group of filter representation information as reference filter representation information, and make the number of feature graphs of each group of filter representation information consistent with the number of feature graphs of the reference filter representation information; Performing dense representation on all the filter representation information after the uniformization process to obtain first dense representation information, and performing dense representation on the comparison filter representation information to obtain second dense representation information; Performing representation information enhancement on the first dense representation information and the second dense representation information respectively, and obtaining first inner product representation information based on the enhanced representation information after the representation information enhancement is performed on the first dense representation information and the second dense representation information; Based on the second dense representation information and the first dense representation information, the enhanced representation information after the representation information is enhanced obtains the second inner product representation information; A representation information integration operation is performed on the first dense representation information, the second dense representation information, the first inner product representation information and the second inner product representation information corresponding to the loaded to-be-processed text and the processed control text respectively, and the transformed text is obtained based on the representation information integration operation result.

3. The method according to claim 2, characterized in that The first dense representation information and the second dense representation information are respectively enhanced, and the first inner product representation information is obtained based on the enhanced representation information after the first dense representation information and the second dense representation information are enhanced; The enhanced representation information after the representation information is enhanced based on the second dense representation information and the first dense representation information is used to obtain the second inner product representation information, including: Performing a representation information activation operation on the first dense representation information and the second dense representation information respectively according to a preset nonlinear mapping function to obtain nonlinear mapping values ​​corresponding to the first dense representation information and the second dense representation information respectively; For the nonlinear mapping values ​​corresponding to the first dense representation information and the second dense representation information, respectively, the overall representation information and the detail representation information are enhanced by using the influence coefficients of the overall representation information focusing strategy and the detail representation information focusing strategy to obtain the enhanced representation information corresponding to the first dense representation information and the second dense representation information, respectively; Performing an inner product calculation on the nonlinear mapping value of the first dense representation information and the enhanced representation information of the second dense representation information to obtain first inner product representation information; An inner product is calculated by performing an inner product calculation on the nonlinear mapping value of the second dense representation information and the enhanced representation information of the first dense representation information to obtain second inner product representation information.

4. The method according to any one of claims 1 to 3, characterized in that: The method of performing attack defense debugging on the first basic neural network based on the first learning sample library to obtain the debugged first basic neural network includes: Determine a first basic neural network, the first basic neural network includes the first reinforcement generation component and the first identification component, and perform multiple cycles of initial debugging on the first basic neural network based on a first learning sample library until a first debugging end requirement is met; Replacing the first identification component that meets the first debugging end requirement with a second identification component with higher identification performance to obtain an iterated first basic neural network; The iterated first basic neural network is debugged multiple times in an advanced debugging phase based on the first learning sample library until the second debugging end requirement is met, thereby obtaining the debugged first basic neural network.

5. The method according to claim 4, characterized in that Each debugging cycle of any debugging phase in the initial debugging phase and the advanced debugging phase includes: Loading the to-be-processed text and the processed control text in the first learning sample library into the first enhanced generation component to obtain the transformed text output by the first enhanced generation component; Loading the transformed text into a second enhanced generation component to obtain a restored text to be processed output by the second enhanced generation component, and determining a first error between the restored text to be processed and the text to be processed; Identifying the transformed text and the processed control text according to the identification components corresponding to the stages, and obtaining a first confidence level for identifying the transformed text as a non-to-be-processed text, and a second confidence level for identifying the processed control text as a to-be-processed text; A first network evaluation index value is determined based on the first confidence level, the second confidence level, and the first error, and a network learnable variable of the first basic neural network is optimized based on the first network evaluation index value.

6. The method according to claim 5, characterized in that In the advanced debugging phase, the text to be processed also includes customer service emotional text samples; If the text to be processed is a customer service emotion text sample, the processing control text is a business knowledge text sample, and the transformed text is a business knowledge-based emotion text, wherein the business knowledge-based emotion text represents the text after the business knowledge of the business knowledge text sample is transferred to the customer service emotion text sample.

7. The method according to claim 6, characterized in that The second authentication component includes a first authentication branch component and a second authentication branch component; The first identification branch component is used to identify emotional business knowledge text and customer service emotional text samples; The second identification branch component is used to identify business knowledge sentiment text and business knowledge text samples.

8. The method according to claim 1, characterized in that The second basic neural network is debugged according to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library to obtain the debugged second basic neural network, including: According to the emotional business knowledge text and the sample vocabulary transformation text corresponding to each business knowledge text sample in the second learning sample library, the second basic neural network is debugged multiple times in a loop until the third debugging end requirement is met, wherein each loop debugging includes: Loading the emotional business knowledge text and the sample vocabulary transformation text corresponding to the business knowledge text sample into the representation information mining component of the second basic neural network to perform representation information mining, thereby obtaining first text representation information of the emotional business knowledge text and second text representation information of the vocabulary transformation text; Loading the first text representation information and the second text representation information into the vocabulary transformation component of the second basic neural network, performing vocabulary transformation on the emotional business knowledge text, and obtaining a vocabulary-transformed emotional business knowledge text; Determining a second error between the vocabulary-transformed text and the vocabulary-transformed emotional business knowledge text; A second network evaluation index value is determined based on the second error, and network learnable variables of the representation information mining component and the vocabulary transformation component are optimized based on the second network evaluation index value.

9. A customer service system, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps in the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Customer service voice emotion recognition method, device and equipment and storage medium

    CN112487824A

  • Cognition and emotion combined recognition method and system and electronic equipment

    CN116521872A

  • A method and system for sentiment classification and emotion classification

    US20170308523A1