An intelligent customer service reply method, system and storage medium with multi-style polishing
By building a multi-style vocabulary generation model and dynamic information filling module in the e-commerce customer service system, the problem of single vocabulary style and insufficient information acquisition in the existing system is solved, diversified reply and real-time information integration are achieved, and user experience and service quality are improved.
Patent Information
- Application Number
- CN202411918747.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing e-commerce customer service system is single in language style and cannot dynamically obtain real-time product and activity information, resulting in outdated or inaccurate reply content, affecting user experience.
By building a multi-style vocabulary generation model based on historical customer service data, combined with dynamic information filling modules, multi-style reply and real-time information integration are achieved. The system includes a knowledge base configuration module, a dynamic information filling module and a style vocabulary generation model, which can generate diverse and accurate replies based on user intentions and context.
It has achieved multi-style vocabulary generation, improved the accuracy of user experience and reply, and enhanced the service quality of e-commerce platforms and user trust.
Smart Images

Figure CN119357337B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and specifically to an intelligent customer service reply method, system and storage medium with multi-style polishing. Background Art
[0002] In modern e-commerce platforms, customer service robots achieve efficient user question answering through knowledge base configuration. The construction of the knowledge base is usually completed in an offline environment. Customer service operators will preset possible intention classifications of users and configure corresponding answer templates under each intention classification. In real user interactions, when the system identifies the user's intention, it will retrieve the corresponding answer template in the knowledge base, and then fill in the placeholders in the answer according to specific information (such as product selling points, event information, etc.) to form the final reply content;
[0003] However, in order to improve the user experience, relying solely on directly filled fixed phrases cannot meet the diverse communication needs. The replies of e-commerce customer service need to adjust the style in different situations, reflect personalized expressions, and maintain the professionalism of the phrases. For example, for the same product introduction, users may hope to hear different styles of phrases from the customer service, such as gentle guidance in the style of "caring customer service" or recommendation words in the style of "planting grass expert";
[0004] In addition, the products and activities on e-commerce platforms are updated frequently. The customer service phrases also need to dynamically obtain the latest product information and event information according to the context to ensure that the reply content is accurate and timely. However, the existing e-commerce customer service has the following defects in the aspect of phrase optimization in the existing e-commerce knowledge base configuration mode:
[0005] Single phrase style and lack of diverse expressions:
[0006] In the prior art, the answers in the knowledge base are mostly fixed standard phrases, and the manually configured answer templates lack the ability to generate multiple styles automatically. In actual use, different users and situations require different language styles to improve the naturalness of communication and the user's favorability. However, the traditional configuration method cannot flexibly adjust the phrase style in the output stage, resulting in a single user experience and difficulty in adapting to diverse service needs;
[0007] Insufficient dynamic acquisition of product information and event information:
[0008] In customer service scripts, when it comes to product attributes, core selling points, event information, etc., traditional systems usually use static information configuration methods. Due to the frequent updates of e-commerce product information, the statically configured content often fails to reflect the real-time status and latest events of the products, resulting in outdated or inaccurate reply content. Even when using placeholders in the knowledge base, the system lacks intelligent information extraction and filling means and cannot automatically integrate the real-time data extracted from the context into the script, affecting users' trust in the accuracy of the platform information. Summary of the Invention
[0009] The purpose of the present invention is to provide a multi-style polishing intelligent customer service reply method, system and its storage medium, to achieve the diversification of script styles, the dynamic integration of product information, and generate intelligent polished scripts to improve the quality of customer service, so as to solve the problems raised in the above background technology.
[0010] To achieve the above purpose, the present invention provides the following technical solution: A multi-style polishing intelligent customer service reply method, including a knowledge base configuration module that builds a rich user intention classification and configures corresponding intention answer templates based on historical customer service data. The answer templates contain fixed information and dynamic information marked with placeholders. The dynamic information filling module analyzes the placeholders and obtains multiple data sources to accurately fill the placeholder positions with information, outputs a preliminary reply text according to the user input text content, and inputs the preliminary reply text into a style script generation model that introduces a conversion tendency index combined with style tags as a reward to polish and generate a customer service reply that improves the conversion rate and conforms to a specific style.
[0011] Preferably, the specific method for building the knowledge base configuration module includes the following steps:
[0012] S101: Data collection and processing, extract the historical conversation records between customers and users from the platform database, collect various questions that users may ask, sort, de-duplicate and classify the collected user questions to form a preliminary set of user intentions;
[0013] S102: Establish an intention classification system, define intention categories including descriptions and scopes according to business requirements and the characteristics of user questions, construct a multi-classification level intention classification, and compile intention descriptions for each intention category;
[0014] S103: Configure corresponding intention answer templates, write standardized answer templates in natural language for each type of intention according to the established intention classification system, and mark the product-related information in the answer templates as dynamic information;
[0015] S104: Intent classification model training: label the user's query text with the corresponding intent according to the established intent classification system, then use the classic pre-trained model to perform classification training, and save the trained model.
[0016] Preferably, the method in which the dynamic information filling module analyzes the placeholder and obtains multiple data sources to accurately fill the placeholder position with information specifically includes:
[0017] Establish a database of product information and related activity information, extract placeholders from the answer template, and analyze and identify the extracted placeholders:
[0018] If it is a simple placeholder, a mapping relationship between the database field and the placeholder is established, and the value of the corresponding field is queried from the database according to the product identifier obtained from the user input or context information, and the queried data value is verified and replaced with the corresponding placeholder;
[0019] If it is a complex placeholder, based on the context of the user input and with the help of the understanding and analysis capabilities of the large language model, the information field is extracted, the user needs are analyzed, the analyzed needs are converted into structured query conditions, and the query SPARQL statement is generated at the same time, and the corresponding placeholder is replaced with the query result.
[0020] Preferably, the dynamic information filling module is provided with an exception handling mechanism for user maintenance when an exception occurs in placeholder replacement. When the replacement data is missing but does not affect the overall meaning of the reply, the placeholder is replaced with a preset default value. When key data is missing and a valid reply cannot be generated, a general fallback reply template is used.
[0021] Preferably, the style speech generation model includes establishing a correlation between the customer service response style and the transaction result based on the historical conversation record data, and the specific method is as follows:
[0022] Extract historical conversation records between customer service and users from the e-commerce platform database, including complete conversations with and without transactions. Each conversation record contains the following fields: conversation unique identifier, message timestamp, message sender, and message content;
[0023] Match the conversation records with the data in the order system, mark whether each conversation ultimately leads to a purchase, and add a transaction tag as a new field to the conversation record data structure based on the conversation record;
[0024] A large pre-trained language model is introduced to automatically pre-label according to the established style definition dimensions.
[0025] Preferably, the specific method for polishing and generating a customer service reply that improves the conversion rate and conforms to a specific style in the style conversation generation model includes the following steps:
[0026] S201: Process user text data. Concatenate the preliminary reply text T initial , style label S target and context information C = (M1, M2, M3... Mn) in a set format to form the input sequence of the model, and perform word segmentation and tokenization on the input sequence to convert it into the Token sequence required for model input;
[0027] S202: Encode labels and auxiliary information. Encode the style label S target into the corresponding embedding vector E S and use the conversion label L in historical data purchase as the attribute of the sample;
[0028] S203: Preliminary model learning. Enable the model to learn to generate a reply text T initial , style label S target and context information C that conforms to the target style; final ;
[0029] S204: Model reinforcement learning. Introduce the conversion tendency index as a reward to polish and generate a customer service reply that improves the conversion rate and conforms to a specific style, and further optimize the generation quality of the model.
[0030] Preferably, the specific steps of preliminary model learning are as follows:
[0031] Obtain the Token sequence of the model input converted from the input sequence;
[0032] Forward propagation. Calculate the word probability distribution generated by the model;
[0033] Calculate the language model loss function. The loss function is:
[0034] ,
[0035] where T is the length of the reply text, W t is the t-th word, θ is the model parameter, and W <t represents all the words generated before the t-th word;
[0036] Backward propagation. Update the model parameters and train repeatedly until the loss function converges or reaches the preset number of training epochs.
[0037] Preferably, the specific steps of model reinforcement learning are as follows:
[0038] Initialization: Use the model parameters θ obtained in the initial model learning as the initial strategy;
[0039] Sampling: Extract samples from the training data to generate preliminary response text T initial , style tag S target and context information C, using initialization parameters to generate reply text T final ;
[0040] Reward calculation: For each generated response, calculate the corresponding reward R, which includes:
[0041] Style Matching Reward R style , using the large model style classifier f style Evaluate the style consistency of the generated response, the formula is as follows:
[0042] .
[0043] Transaction tendency reward R purchase , using the transaction prediction model f purchase Estimate the probability of generating a response that leads to a deal using the following formula:
[0044] .
[0045] Verbal Fluency Award R fluency , by calculating the perplexity of the generated text, the fluency of the language is evaluated. The formula is as follows:
[0046] ,
[0047] Then the total reward function R is: αR style +βR purchase +γR fluency , where α, β, and γ are weight parameters, satisfying α+β+γ=1;
[0048] Policy gradient calculation: Calculate the policy gradient:
[0049] ,
[0050] in, is the strategic probability distribution of the model’s generated responses, and R is the total reward;
[0051] Parameter update: back propagation, update model parameters, and train repeatedly until the loss function converges or reaches the preset number of training rounds. At this point, the training of all models is completed, and the trained model is stored to generate the final response.
[0052] Preferably, the style definition dimensions include: tone and emotion, word preference, and sentence structure, where:
[0053] Enthusiastic sales type
[0054] Tone and emotion: full of enthusiasm, proactive, stimulating users' desire to purchase;
[0055] Word preference: using motivating words such as "super value", "time-limited", "act now", etc.;
[0056] Sentence structure: using more exclamatory sentences and appealing sentences, and making good use of exclamation marks and emojis;
[0057] Professional consultant type
[0058] Tone and emotion: formal and professional, rational and objective, emphasizing product performance;
[0059] Word preference: using professional terms and technical indicators such as "processor", "pixel", "battery life", etc.;
[0060] Sentence structure: using more declarative sentences, with rigorous sentence patterns and clear logic;
[0061] Friendly service type
[0062] Tone and emotion: warm and friendly, caring, and focusing on user experience;
[0063] Word preference: using affectionate addresses such as "dear" and "you", as well as caring words such as "rest assured" and "feel at ease", etc.;
[0064] Sentence structure: using more short sentences, with a soft tone, and appropriately using greetings.
[0065] To solve the above technical problems, the present invention also provides an intelligent customer service reply system with multi-style polishing, including:
[0066] A memory for storing computer programs;
[0067] A processor for executing the computer program, and when the computer program is executed by the processor, the steps of a multi-style polishing intelligent customer service reply method as described in any one of the above are implemented.
[0068] To solve the above technical problems, the present invention also provides a readable storage medium, on which a computer program is stored,
[0069] When the computer program is executed by a processor, the steps of a multi-style polishing intelligent customer service reply method as described in any one of the above are implemented.
[0070] In summary, the beneficial effects of the present invention are:
[0071] Implement multi-style conversation generation to enhance user experience:
[0072] Through presetting multiple conversation style models, such as "caring customer service" and "product promotion expert", etc., the present invention can automatically generate multi-style reply conversations according to the situational needs and intentions of users, so as to provide personalized and situational reply experiences, match the appropriate style of customer service replies, thereby improving the conversion rate to a certain extent. At the same time, the present invention allows customer service operators to preset different style intention classifications during the configuration stage, enabling the system to flexibly adjust the conversation style during the output stage, enhancing the user's communication experience and likability;
[0073] Implement dynamic information integration based on context to improve the accuracy of replies:
[0074] The present invention can automatically identify and capture real-time product information, event information, etc. According to the placeholder positions in the customer service intention, it accurately fills dynamic product attributes, core selling points, etc. into the conversation. By using placeholders during the offline configuration of the knowledge base, the system automatically obtains the latest product information during actual operation, thus ensuring that the reply content is consistent with the product information on the e-commerce platform and improving the accuracy and timeliness of the reply.
[0075] The present invention also provides an intelligent customer service answering system and a storage medium, which have the above beneficial effects and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0077] Figure 1 It is a schematic diagram of the process framework structure of a multi-style refined intelligent customer service reply method of the present invention;
[0078] Figure 2 It is a display diagram of the answer configuration interface of the system in a multi-style refined intelligent customer service reply method of the present invention;
[0079] Figure 3 It is a display diagram of the interaction interface of the system in a multi-style refined intelligent customer service reply method of the present invention;
[0080] Figure 4 It is a reply schematic diagram of enthusiastic sales in a multi-style refined intelligent customer service reply method of the present invention;
[0081] Figure 5Schematic diagram of the reply of a professional consultant in an intelligent customer service reply method with multi-style polishing according to the present invention;
[0082] Figure 6 Schematic diagram of the reply of cordial service in an intelligent customer service reply method with multi-style polishing according to the present invention;
[0083] Figure 7 Schematic diagram of the fallback reply in an intelligent customer service reply method with multi-style polishing according to the present invention. Detailed implementation manners
[0084] Now, the present invention will be further described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.
[0085] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0086] All the features disclosed in this specification, or all the steps in the disclosed methods or processes, except for the mutually exclusive features and / or steps, can be combined in any way.
[0087] Any feature disclosed in this specification (including any additional claims, abstract, and drawings), unless specifically stated, can be replaced by other equivalent or features with similar purposes. That is, unless specifically stated, each feature is only an example of a series of equivalent or similar features.
[0088] In the present invention, unless otherwise clearly defined and limited, terms such as "installation", "connection", "connection", "fixation", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium. It can be the communication inside at least two elements or the interaction relationship between at least two elements, unless otherwise clearly defined. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0089] The following will be combined with Figure 1-7The present invention is described in detail and an embodiment provided by the present invention is described.
[0090] like Figure 1 As shown in the process framework structure diagram, an intelligent customer service reply method with multi-style polishing provided by an embodiment of the present invention includes the following steps:
[0091] Step 1: Build a knowledge base configuration module that enriches the user's intent classification system and configures the corresponding intent answer template based on historical customer service data. The answer template contains fixed information and dynamic information marked by placeholders;
[0092] Step 2: Analyze the placeholders through the dynamic information filling module, obtain multiple data sources to accurately fill in the placeholder positions, and output the preliminary reply text;
[0093] Step 3: Automatically output a preliminary reply text based on the text content input by the user. The preliminary reply text is input into a style speech generation model that introduces a transaction tendency indicator combined with style labels as a reward, and polished to generate a customer service reply that increases the transaction rate and conforms to a specific style.
[0094] In the specific implementation, for the first step, a knowledge base configuration module is built based on historical customer service data.
[0095] The goal of the knowledge base configuration module is to build a knowledge base that contains rich user intent classifications and corresponding answer templates, and provide preliminary reply texts for the customer service system. When configuring the answer template, placeholders are used to mark the information locations that need to be dynamically filled in order to integrate the latest product and activity information in actual applications. This module mainly includes the following key parts:
[0096] Intent classification system construction:
[0097] Collect various questions and demands that users may raise from historical customer service conversation records, user feedback, FAQs, and other channels on the e-commerce platform, organize, deduplicate, and classify the collected user questions to form a preliminary set of user intent.
[0098] Intent definition: Define clear intent categories based on business needs and the characteristics of user problems. Each intent should have a clear description and scope;
[0099] Classification level: Establish a multi-level intent classification system to facilitate management and expansion;
[0100] First-level classification: such as "product consultation", "order inquiry", "after-sales service", etc.;
[0101] Secondary classification: further subdivided under the primary classification, such as "price inquiry", "inventory inquiry", "function inquiry" under "product inquiry", etc.
[0102] Intention description: Write a detailed description for each intention category, clearly defining its scope and characteristics.
[0103] Intention examples: Collect or write examples of typical user inquiries for each intention category to facilitate subsequent model training and testing.
[0104] It should be noted that in this embodiment, a possible example of intention demonstration is provided as follows:
[0105] Intention category: Inquiry about commodity price.
[0106] Description: Users inquire about the price of a certain commodity, whether there are any promotions, discounts, etc.
[0107] Examples:
[0108] "How much is this mobile phone?"
[0109] "Are there any promotional activities for this laptop?"
[0110] After establishing the intention classification system, use natural language to write a standardized answer template for each type of intention. Different intentions are configured with different answer templates, and the product-related information in the answer template is marked as dynamic information;
[0111] Template format: Write a standardized answer template using natural language to ensure language norms and courtesy;
[0112] Placeholder usage: Use placeholders in the answer template to mark dynamic information, such as {commodity name}, {price}, {promotion information}, etc.
[0113] Example template:
[0114] Template for inquiry about commodity price:
[0115] "Hello, the current selling price of {commodity name} is {price} yuan. Welcome to purchase!"
[0116] "Dear, there is a promotion for {commodity name} now, {promotion information}."
[0117] Template library establishment: Store all answer templates in the template library, classify and manage them by intention and style, and record them as Database_knowledge;
[0118] Version control: Conduct version control on the modification and update of templates, record the modification history for easy backtracking and auditing;
[0119] Audit mechanism: Establish a template audit process to ensure that all template contents comply with company regulations and laws and regulations.
[0120] After establishing the answer template library, extract the user's query text from each conversation record and label it according to the established intent classification system. One possible exemplary format of the labeled data is as follows,
[0122] {
[0123] "text": "Is there any discount on this mobile phone?",
[0124] "intent_label": "Inquiry about commodity price"
[0125] },
[0126] {
[0127] "text": "I want to know about the functions of this TV.",
[0128] "intent_label": "Consultation on commodity functions"
[0129] }
[0131] Based on the above data, use the classical pre-trained model Bert for classification training, and save and record the trained model as Model_cls.
[0132] For the second step, analyze the placeholders through the dynamic information filling module, and obtain multi-data sources to accurately fill the information at the placeholder positions, and output the preliminary reply text;
[0133] The dynamic information filling mechanism is the core module of the customer service reply generation system, aiming to accurately and efficiently fill the real-time commodity, activity and other dynamic information into the placeholder positions in the answer template to generate a complete and personalized preliminary reply text. The specific steps included in this module are as follows:
[0134] Classification and recognition of placeholders: Different types of placeholders require different parsing methods.
[0135] Efficient retrieval of dynamic information: Obtain the latest and accurate information from multi-data sources according to the placeholder requirements.
[0136] Correct replacement of placeholders: Ensure that the text after placeholder replacement is logically smooth and semantically complete.
[0137] Exception handling and fallback strategy: Ensure the stability of the system and the user experience in case of information loss or anomalies.
[0138] Therefore, we will elaborate on the technical implementation steps of the dynamic information filling mechanism in detail as follows:
[0139] Classification and recognition of placeholders:
[0140] First, according to the complexity and acquisition method of the information required by the placeholder, the placeholders are divided into two categories: Simple Placeholders:
[0141] Definition: It directly corresponds to a single field in the database, and the data acquisition is simple without complex processing.
[0142] Examples: {Product Name}, {Price}, {Inventory Status}.
[0143] Complex Conditional Placeholders:
[0144] Definition: Data that requires complex queries with multiple conditions and multiple fields, and even logical reasoning to obtain.
[0145] Examples: {Most Favorable Promotion Information}, {Recommended Product List}, {Best-Selling Rankings}.
[0146] A specific placeholder recognition step:
[0147] Template Parsing: Use regular expressions or a template engine to scan the answer template and extract all placeholders.
[0148] Placeholder Classification: According to the pre-defined placeholder categories, classify the extracted placeholders as simple placeholders or complex conditional placeholders.
[0149] An example of a possible demonstration is as follows.
[0150] Simple Placeholders: {Product Name}, {Price};
[0151] Complex Conditional Placeholder: {Product Recommendation List}.
[0152] Implementation steps for dynamic information acquisition and placeholder replacement:
[0153] To efficiently and accurately obtain dynamic information and replace placeholders, we have designed detailed implementation steps for the two types of placeholders and integrated them together to make the process clear and the operation simple in actual applications.
[0154] Data Source Integration and Management
[0155] Data Source Types:
[0156] Product Information Database: Stores the basic attributes of products, such as name, price, inventory, specifications, etc.;
[0157] Activity Information Database: Stores promotional activities, preferential information, discount details, etc.;
[0158] Knowledge Graph: Construct entities such as products, activities, users, etc. and their relationships to support complex semantic queries and inferences.
[0159] Data source integration:
[0160] Data synchronization mechanism: Through the ETL (Extract, Transform, Load) process, unify and integrate various data sources to ensure data consistency and real-time performance;
[0161] Caching mechanism: Use a caching system such as Redis to cache frequently accessed data, improve data reading speed, and set a reasonable expiration policy to ensure data real-time performance.
[0162] Parsing and replacement of simple placeholders: Directly obtain a single field value from the database without complex calculations or inferences. The specific implementation steps of a demonstration are as follows:
[0163] Placeholder extraction: Extract simple placeholders from the template;
[0164] Field mapping: Establish a mapping relationship between placeholders and database fields;
[0165] Example mapping table:
[0166] Placeholder Database field {Product name} products.name {Price} products.price {Inventory status} products.stock
[0167] Data acquisition
[0168] Determine the product identifier: Obtain the product ID or name from the user input or context.
[0169] Database query: Use the product identifier to query the value of the corresponding field from the product information database.
[0170] A demonstration SQL query is as follows;
[0171] SELECT name, price, stock FROM products WHERE product_id = 12345;
[0172] Data verification and formatting:
[0173] Data verification: Check whether the query result is empty and whether the data type is correct;
[0174] Data formatting: Format numerical data (such as price) to retain two decimal places.
[0175] Placeholder replacement
[0176] Replacement operation: Replace the placeholders with the obtained data.
[0177] An example of demonstration is as follows:
[0178] The initial template for knowledge base configuration is: "Hello, {product name} is currently priced at {price} yuan, welcome to purchase!"
[0179] {Product Name}: XYZ Mobile Phone
[0180] {Price}: 4999.00
[0181] The reply text after the placeholder is replaced: "Hello, the current price of XYZ mobile phone is 4999.00 yuan, welcome to buy!"
[0182] Parsing and replacement of complex placeholders: It requires a deep understanding of the user's natural language input, extracting key requirements, and converting them into structured query conditions to obtain dynamic information that meets user needs.
[0183] Initial template and placeholder extraction
[0184] Assume that the initial answer template is: "Based on your needs, we recommend the following products: {recommended product list}."
[0185] Use regular expressions to extract the complex conditional placeholder {recommended product list} in the template.
[0186] User Needs Analysis
[0187] Suppose the user input is: "Are there any laptops suitable for students that are priced below 5,000 yuan and are thin and portable?"
[0188] The corresponding placeholder {recommended product list}, the parsed fields to be queried include:
[0189] Product category / applicable groups / price range / product characteristics;
[0190] It is necessary to extract the corresponding fields from the user's input. One feasible method is to extract the fields of information with the help of the understanding and analysis capabilities of a large language model.
[0191] A feasible prompt word template is as follows:
[0192] Please convert the following user's inquiry into structured query conditions, including product categories, attributes, price ranges, etc.:
[0193] The user asked: "Are there any laptops suitable for students that are priced under 5,000 yuan and are thin and portable that you would recommend?"
[0194] Output format:
[0195] {
[0196] "Product category": "",
[0197] "Target population": "",
[0198] "Price range": "",
[0199] "Product features": []
[0200] }
[0201] The output of a possible model is as follows:
[0202] {
[0203] "Product category": "Laptop",
[0204] "Target population": "Students",
[0205] "Price range": "0 - 5000",
[0206] "Product features": ["Lightweight and portable"]
[0207] }
[0208] Query condition construction
[0209] Convert the parsed requirements into structured query conditions. The conversion result for the above example is as follows.
[0210] User requirements Database field Condition value Product category category "Laptop" Target user target_user "Student" Price range price 0 <= price <= 5000 Product features features Contains "Light and portable"
[0211] At the same time, generate the SPARQL statement for the query. The result is as follows.
[0212] SELECT?productName WHERE {
[0213] ?product rdf:type ex:Laptop. (Select resources of type "Laptop")
[0214] ?product ex:Target population "Students". (Select laptops for students)
[0215] ?product ex:Price?Price. (Get the price of the laptop)
[0216] FILTER (?price >= 0 &&?price <= 5000). (Filter laptops with prices between 0 and 5000)
[0217] ?product ex: with the feature ex: lightweight and portable. (Select a laptop with the "lightweight and portable" feature)
[0218] ?product ex: productName?productName. (Get the name of the laptop)
[0219] }
[0220] LIMIT 5
[0221] One possible result is: "DEF Laptop, GHI Laptop, JKL Laptop"
[0222] And replace the placeholder in the original answer template with the result.
[0223] A demonstration example is as follows:
[0224] The initial template for the knowledge base configuration is: "According to your needs, we recommend the following products: {Recommended product list}."
[0225] {Recommended product list}: "DEF Laptop, GHI Laptop, JKL Laptop"
[0226] The reply text after placeholder replacement: "According to your needs, we recommend the following products: DEF Laptop, GHI Laptop, JKL Laptop."
[0227] Exception handling and fallback strategies
[0228] During the placeholder replacement process, exceptions such as data loss and query failure may occur. To ensure system stability, a perfect exception handling mechanism needs to be designed.
[0229] Data loss exception: Unable to obtain the data corresponding to the placeholder.
[0230] Data format exception: The data type or format obtained does not meet the requirements.
[0231] Query failure exception: The database or knowledge graph query fails.
[0232] Exception detection methods:
[0233] Data verification: Immediately check the validity of the data after it is obtained.
[0234] Error capture: Use an exception capture mechanism (such as try-except) to detect errors during the query and replacement process.
[0235] Reference Figure 7 , and there are the following ways regarding exception handling strategies
[0236] Strategy 1: Default Value Replacement
[0237] Applicable Situation: Data is missing, but it does not affect the overall meaning of the reply.
[0238] Operation: Use the preset default value to replace the placeholder.
[0239] Example: The default value of {Inventory Status} is "Stock Tight".
[0240] Strategy 2: Fallback Reply
[0241] Applicable Situation: Key data is missing and an effective reply cannot be generated.
[0242] Operation: Use a general fallback reply template.
[0243] Example: "Sorry, we are temporarily unable to obtain the information you need. Please try again later or contact our customer service staff."
[0244] For the third step, the preliminary reply text is input into a style-based conversation generation model that incorporates a conversion tendency indicator with combined style tags as a reward to polish and generate a customer service reply that improves the conversion rate and conforms to a specific style. Specifically, a multi-style conversation generation module is built. The task is to generate a customer service reply that conforms to a specific style according to the user's needs and context to enhance the user experience. The input is the preliminary reply text filled with dynamic information and the specified style tags, and the output is the finally polished reply text. This module consists of two key parts: the data collection and preprocessing module and the style generation model training module.
[0245] Data Collection and Preprocessing Module:
[0246] Based on the historical conversation record data, establish the correlation between the customer service reply style and the conversion result, construct a high-quality, multi-style, context-inclusive customer service conversation dataset, provide a solid data foundation for the subsequent multi-style conversation generation model, and conduct preliminary style annotation on the customer service reply content. Since manually annotating a large amount of data is costly, we introduce a large pre-trained language model (such as Tongyi Qianwen - 2.5) for automatic pre-annotation, combined with a small amount of manual verification to improve efficiency and accuracy.
[0247] First, define and describe the style, establish a style definition dimension, clarify the definitions of different customer service styles, and each style corresponds to specific language features. One specific style definition dimension is:
[0248] Tone and Emotion: Such as enthusiastic, professional, humorous, warm, etc.
[0249] Word Preference: Common words, catchphrases, technical terms, etc.
[0250] Sentence structures: short sentences, long sentences, interrogative sentences, exclamatory sentences, etc.
[0251] Based on the above description of style definitions, the types of several specific conversation styles can be summarized as follows:
[0252] 1. Enthusiastic sales type, refer to Figure 4
[0253] Tone and emotion: full of enthusiasm, proactive, stimulating the user's desire to purchase.
[0254] Word preference: using motivating words such as "super value", "time-limited", "act now", etc.
[0255] Sentence structures: mostly using exclamatory sentences and appealing sentences, and making good use of exclamation marks and emojis.
[0256] 2. Professional consultant type, refer to Figure 5
[0257] Tone and emotion: formal and professional, rational and objective, emphasizing product performance.
[0258] Word preference: using professional terms and technical indicators such as "processor", "pixel", "battery life", etc.
[0259] Sentence structures: mostly using declarative sentences, with rigorous sentence patterns and clear logic.
[0260] 3. Friendly service type, refer to Figure 6
[0261] Tone and emotion: warm and friendly, caring, focusing on user experience.
[0262] Word preference: using affectionate addresses such as "dear", "you", and caring words such as "rest assured", "feel at ease", etc.
[0263] Sentence structures: mostly using short sentences, with a soft tone, and appropriately using greetings.
[0264] Data collection
[0265] Extract the historical conversation records between customer service and users from the e-commerce platform database, including complete conversations of both completed and uncompleted transactions. Each conversation record contains the following fields:
[0266] conversation_id: The unique identifier of the conversation.
[0267] timestamp: The message timestamp.
[0268] sender: The message sender ("user" or "customer service").
[0269] message: Message content.
[0270] Associated with transaction results
[0271] Obtaining method: Match the conversation records with the data in the order system and mark whether each conversation ultimately leads to a purchase.
[0272] Data content: Add a transaction label based on the conversation records.
[0273] Data structure: New fields:
[0274] purchase_label: Transaction label ("Transaction" or "No transaction").
[0275] Due to the huge amount of data, it is impossible to manually label all style tags. We introduce a large pre-trained language model (such as Tongyi Qianwen - 2.5) for automatic pre-labeling, and use the prompts of Chain-of-Thought and the method of Few-Shot Learning to improve the accuracy of pre-labeling.
[0276] One possible template for the prompt words is as follows:
[0277] You are a professional language analyst. Please judge the style category of the following customer service reply and give the reasons for the analysis. The style categories include:
[0278] 1. Enthusiastic sales type
[0279] Tone and emotion: Full of enthusiasm, proactive, stimulating the user's desire to purchase.
[0280] Word preference: Use motivating words such as "super value", "time limit", "act now", etc.
[0281] Sentence structure: Use more exclamatory sentences and appealing sentences, and be good at using exclamation marks and emojis.
[0282] 2. Professional consultant type
[0283] Tone and emotion: Formal and professional, rational and objective, emphasizing product performance.
[0284] Word preference: Use professional terms and technical indicators such as "processor", "pixel", "battery life", etc.
[0285] Sentence structure: Use more declarative sentences, with rigorous sentence patterns and clear logic.
[0286] 3. Amiable service type
[0287] Tone and emotion: Warm and kind, caring, focusing on user experience.
[0288] Word preference: Use affectionate terms such as "darling" and "you", as well as caring words such as "rest assured" and "feel at ease".
[0289] Sentence structure: Use more short sentences, with a gentle tone, and appropriately use greetings.
[0290] Please output in the following format:
[0291] Reply content: <Customer service reply text>
[0292] Style judgment: <Style category>
[0293] Analysis reason: <Detailed analysis process>
[0294] The following is an example:
[0295] Reply content: Darling, there is a time-limited discount for purchasing this mobile phone now. The opportunity is rare!
[0296] Style judgment: Enthusiastic sales type
[0297] Analysis reason:
[0298] - The affectionate term "darling" is used, showing a sense of intimacy.
[0299] - The tone is enthusiastic, using an exclamation mark and words such as "the opportunity is rare".
[0300] - Emphasize "time-limited discount" to stimulate the user's purchase desire.
[0301] Now, please analyze the following reply:
[0302] Reply content: <Customer service reply text to be analyzed>
[0303] Based on the above prompts, input the data generated in the previous step into Qwen-2.5 one by one, parse the results output by the parsing model, and store the data. At the same time, call Model_cls obtained in step one to classify the intention of the current question sentence, obtain the initial reply template, and perform the process of step two to obtain the initial reply text to be polished.
[0304] One possible data storage format is,
[0305] Data structure design:
[0306] conversation_id: Conversation ID.
[0307] message_id: Message ID.
[0308] sender: Message sender.
[0309] message: Message content.
[0310] origin_answer: Initial reply text.
[0311] style_label: Style label (judged by the model).
[0312] analysis_reasoning: Analysis reasons given by the model.
[0313] purchase_label: Transaction label.
[0314] previous_messages: Previous messages (such as the previous 2 - 3 rounds of conversations).
[0315] A demonstration data case is as follows:
[0316] {
[0317] "conversation_id": "conv123",
[0318] "message_id": "msg456",
[0319] "sender": "Customer service",
[0320] "message": "Dear, you can enjoy a discount of 500 yuan if you place an order for this new mobile phone now. Don't miss this great opportunity!",
[0321] "origin_answer": "Place an order now and get a discount of 500 yuan",
[0322] "style_label": "Enthusiastic sales type",
[0323] "analysis_reasoning": "- Used the affectionate address 'Dear' to increase intimacy.\n- The tone is enthusiastic, using an exclamation mark and the colloquial expression 'Don't miss this great opportunity'.\n- Emphasized the discount information 'a discount of 500 yuan' to stimulate the desire to purchase.",
[0324] "purchase_label": "Transaction",
[0325] "previous_messages":
[0326] {
[0327] "sender": "User",
[0328] "message": "Does this new mobile phone have any discounts?"
[0329] },
[0330] {
[0331] "sender": "Customer service",
[0332] "message": "Hello, there is a promotion for this mobile phone recently."
[0333] }
[0335] }
[0336] Manually verify the results labeled by the large model and store the final result label in the database, recorded as Data_style.
[0337] Style generation model training module
[0338] The style generation model training module aims to build a model that can generate customer service responses in a specific style based on the preliminary response text, specified style labels, and conversation context. The model needs to take into account style consistency, deal-making tendency, and language fluency in the generated responses. To achieve this goal, we designed a training method that combines supervised learning and reinforcement learning. The specific steps of one implementation are as follows:
[0339] Model architecture design
[0340] Select a pre-trained language model with strong text generation capabilities as the base model, such as GPT-2 or other open-source large pre-trained models. The inputs to the model include:
[0341] The initial response text is recorded as T initial;
[0342] The style label is recorded as S target;
[0343] The context information C: includes the content of the previous rounds of conversations, in the form of C = (M1, M2, M3... Mn), where Mn represents the i-th piece of information;
[0344] The outputs of the model include: the final response text is recorded as T final;
[0345] The basic structure corresponding to the model includes:
[0346] Input encoding layer: Encode the preliminary response text T initial , the style label S target and the context information C into an input representation that can be processed by the model.
[0347] Conditional Text Generation Model: Based on a pre-trained language model, a conditional text generation model is constructed to enable it to generate responses that conform to a specified style under given conditions.
[0348] Decoding Layer: The final response text T is generated through the decoder. final 。
[0349] Data Preprocessing and Feature Construction
[0350] The preliminary response text T initial , the style label S target and the context information C = (M1, M2, M3... Mn) are concatenated in a certain format to form the input sequence of the model. An example of a feasible input sequence format is:
[0351] [CLS] Style: <S_{\text{target}}>[SEP] Context: <c>[SEP] Initial Reply: <T_{\text{initial}}>[SEP]
[0352] An example of a feasible demonstration is as follows:
[0353] [CLS] Style: Enthusiastic sales type [SEP] Context: User: Is there any discount for this new mobile phone? Customer service: Hello, there is a promotion for this mobile phone recently. [SEP] Initial Reply: You can enjoy a discount of 500 yuan if you place an order now. Welcome to purchase. [SEP]
[0354] Vocabulary building:
[0355] Use the vocabulary of the pre-trained model to ensure compatibility with the base model.
[0356] Text tokenization:
[0357] Tokenize and mark the input sequence and convert it into the Token sequence required for model input.
[0358] Style label encoding: Encode the style label S target into the corresponding embedding vector E S;
[0359] Closing label: The closing label L in the historical data purchase is used as an attribute of the sample for subsequent evaluation and reinforcement learning stages.
[0360] After the preparation work is done, model training is carried out. During training, it is divided into two steps, namely supervised learning and reinforcement learning. The training objective of supervised learning is to enable the model to learn to generate reply texts that conform to the target style under the conditions of the given initial reply, style label, and context information; while reinforcement learning introduces indicators such as the closing tendency as rewards to further optimize the generation quality of the model.
[0361] It is worth mentioning that in this embodiment, the steps of supervised learning training are as follows:
[0362] 1) Prepare training data, including the input sequence and the target style reply text T final ;
[0363] 2) Convert the input sequence into the Token sequence for model input;
[0364] 3) Forward propagation to calculate the word probability distribution generated by the model;
[0365] 4) Calculate the loss function of the language model. A specific loss function is as follows,
[0366] ,
[0367] Where T is the length of the reply text, W t is the tth word, θ is the model parameter, W <t Represents all the words generated before the tth word;
[0368] 5) Back propagation, update model parameters, and train repeatedly until the loss function converges or reaches the preset number of training rounds.
[0369] It should be noted that the supervised learning stage can only allow the model to learn the distribution of existing data, and cannot optimize the performance of the model on specific indicators (such as transaction rate). Therefore, through reinforcement learning, indicators such as transaction tendency are introduced as rewards to further optimize the generation quality of the model. A specific training implementation step is as follows:
[0370] Initialization: Use the model parameters θ0 trained in the previous step as the initial strategy;
[0371] Sampling: Extract samples from the training data to generate preliminary response text T initial , style tag S target and context information C, using the initialization parameters to generate a reply T final ;
[0372] Reward calculation: For each generated response, calculate the corresponding reward R, which includes:
[0373] Style Matching Reward R style , using the large model style classifier f style Evaluate the style consistency of the generated response, the formula is as follows:
[0374] .
[0375] Transaction tendency reward R purchase , using the transaction prediction model f purchase Estimate the probability of generating a response that leads to a deal using the following formula:
[0376] .
[0377] Verbal Fluency Award R fluency , by calculating the perplexity of the generated text, the fluency of the language is evaluated. The formula is as follows:
[0378] ,
[0379] Then the total reward function R is: αR style +βR purchase +γR fluency , where α, β, and γ are weight parameters, satisfying α+β+γ=1;
[0380] Policy gradient calculation: Calculate the policy gradient:
[0381] ,
[0382] in, is the strategic probability distribution of the model’s generated responses, and R is the total reward;
[0383] Parameter update: back propagation, update model parameters, and train repeatedly until the loss function converges or reaches the preset number of training rounds. At this point, the training of all models is completed and the trained model is stored as M style , and deployed online to generate the final response.
[0384] Use the reward mechanism to give the model feedback signals, positive rewards: When the content generated by the model meets expectations (such as accurate answers, correct grammar, rich information, etc.), give positive rewards to encourage the model to continue generating similar content.
[0385] Negative rewards: When the content generated by the model does not meet expectations (such as wrong answers, grammatical errors, incomplete information, etc.), negative rewards are given to encourage the model to avoid generating similar content;
[0386] Through the reward mechanism, we can ensure that the generation goals of the model are aligned with the user's expectations. For example, if the user wants the model to generate concise and clear answers, this goal can be reinforced through the reward mechanism, which not only focuses on the quality of a single generation, but also considers long-term effects. For example, through cumulative rewards, the model can learn to maintain consistency and coherence in multiple rounds of dialogue.
[0387] Through the trained model M style , which can effectively polish the text content entered by the user through the initial response statements generated in the first and second steps to generate customer service responses that increase the transaction rate and conform to a specific style.
[0388] The above describes in detail an embodiment corresponding to a multi-style polished intelligent customer service reply method. On this basis, the present invention also discloses a multi-style polished intelligent customer service reply system and storage medium corresponding to the above method.
[0389] An intelligent customer service response system with multiple styles of polishing, including:
[0390] Memory for storing computer programs;
[0391] A processor is used to execute the computer program, and when the computer program is executed by the processor, it can implement the relevant steps of the multi-style polished intelligent customer service reply method disclosed in any of the aforementioned embodiments.
[0392] Among them, the processor may include one or more processing cores, such as a core processor, a core processor, etc. The processor can be implemented in at least one hardware form of digital signal processing DSP (Digital Signal Processing), field programmable gate array FPGA (Field-Programmable Gate Array), and programmable logic array PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the central processing unit CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.
[0393] In some embodiments, the processor may be integrated with a graphics processing unit GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may further include an artificial intelligence AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
[0394] The memory may include one or more readable storage media, and the readable storage media may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory is at least used to store the following computer programs. After the computer programs are loaded and executed by the processor, the relevant steps in an intelligent customer service reply method with multi-style polishing disclosed in any of the foregoing embodiments can be implemented. In addition, the resources stored in the memory may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may be Windows. The data may include, but is not limited to, the data involved in the above method.
[0395] In addition, in each embodiment of the present invention, each functional module can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in each embodiment of the present invention.
[0396] For this reason, an embodiment of the present invention further provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of a method for intelligent customer service reply with multi-style polishing.
[0397] The readable storage medium may include: various media such as USB flash drives, mobile hard disks, read-only memory ROM (Read-Only Memory), random access memory RAM (Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0398] The computer program included in the readable storage medium provided in this embodiment can implement the steps of a method for intelligent customer service reply with multi-style polishing as described above when executed by a processor, and the effect is the same as above.
[0399] The above has introduced in detail a method for intelligent customer service reply with multi-style polishing, a system, and its storage medium provided by the present invention. Each embodiment in the specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the devices, equipment, and readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
[0400] As described above, it is only the specific implementation manner of the invention, but the protection scope of the invention is not limited thereto. Any change or replacement that can be thought of without creative labor should be covered by the protection scope of the invention. Therefore, the protection scope of the invention should be subject to the protection scope defined by the claims.< / c>
Claims
1. A multi-style polished intelligent customer service reply method, characterized by: It includes a knowledge base configuration module for enriching user intent classification and configuring corresponding intent answer templates based on historical customer service data. The answer template contains fixed information and dynamic information marked by placeholders. The placeholders are analyzed by a dynamic information filling module, and multiple data sources are obtained to accurately fill the placeholder positions with information. A preliminary reply text is automatically output according to the text content input by the user. The preliminary reply text is input into a style speech generation model that introduces a transaction tendency indicator combined with a style label as a reward, and polishes and generates a customer service reply that improves the transaction rate and conforms to a specific style. The specific method for polishing and generating a customer service reply that improves the transaction rate and conforms to a specific style in the style speech generation model includes the following steps: User text data processing, initial reply text T initial , style tag S target The context information C = (M1, M2, M3…Mn) is concatenated according to the set format to form the input sequence of the model, and the input sequence is segmented and tokenized to be converted into the Token sequence required for the model input; Label and auxiliary information encoding, the style label S target Encoded as the corresponding embedding vector E S , the transaction label L in the historical data purchase The attributes of the samples are used for subsequent evaluation and reinforcement learning; The model is initially learned to enable the model to learn given the initial response text T initial , style tag S target Under the condition of and context information C, generate a reply text T that conforms to the target style final ; Model reinforcement learning uses the model parameters θ obtained in the initial model learning as the initial strategy, extracts samples from the training data, and generates the initial reply text T initial , style tag S target and context information C, using initialization parameters to generate reply text T final ; For each generated response, calculate the corresponding reward R, which includes: Style Matching Reward R style , using the large model style classifier f style Evaluate the style consistency of the generated response, the formula is as follows: ; Transaction tendency reward R purchase , using the transaction prediction model f purchase Estimate the probability of generating a response that leads to a deal using the following formula: ; Verbal Fluency Award R fluency , by calculating the perplexity of the generated text, the fluency of the language is evaluated. The formula is as follows: , Then the total reward function R is: αR style +βR purchase +γR fluency , where α, β, and γ are weight parameters, satisfying α+β+γ=1; Policy gradient calculation: Calculate the policy gradient: , in, is the policy probability distribution of the model's generated responses, and R is the total reward.
2. According to claim 1, a multi-style polished intelligent customer service reply method is characterized by: The specific method of building the knowledge base configuration module includes the following steps: S101: Data collection and processing: extracting historical customer service and user conversation records from the platform database, collecting various questions that users may ask, sorting, deduplicating and classifying the collected user questions, and forming a preliminary user intent set; S102: Establish an intent classification system. Define intent categories with descriptions and scopes based on business needs and user problem characteristics, build a multi-classification intent classification system, and compile intent descriptions for each intent category. S103: configuring a corresponding intent answer template, and using natural language to write a standardized answer template for each type of intent according to the established intent classification system, wherein product-related information in the answer template is marked as dynamic information; S104: Intent classification model training: label the user's query text with corresponding intent according to the established intent classification system, then use the pre-trained model to perform classification training, and save the trained model.
3. The intelligent customer service reply method with multiple styles of polishing according to claim 2 is characterized by: The method in which the dynamic information filling module analyzes the placeholder and obtains multiple data sources to accurately fill the placeholder position with information specifically includes: Establish a database of product information and related activity information, extract placeholders from the answer template, and analyze and identify the extracted placeholders: If it is a simple placeholder, a mapping relationship between the database field and the placeholder is established, and the value of the corresponding field is queried from the database according to the product identifier obtained from the user input or context information, and the queried data value is verified and replaced with the corresponding placeholder; If it is a complex placeholder, based on the context of the user input and with the help of the understanding and analysis capabilities of the large language model, the information field is extracted, the user needs are analyzed, the analyzed needs are converted into structured query conditions, and the query SPARQL statement is generated at the same time, and the corresponding placeholder is replaced with the query result.
4. The intelligent customer service reply method with multiple styles of polishing according to claim 1 is characterized by: The style speech generation model includes establishing the association between the customer service response style and the transaction results based on the historical conversation record data, and the specific method is as follows: Extract historical conversation records between customer service and users from the e-commerce platform database, including complete conversations with and without transactions. Each conversation record contains the following fields: conversation unique identifier, message timestamp, message sender, and message content; Match the conversation records with the data in the order system, mark whether each conversation ultimately leads to a purchase, and add a transaction tag as a new field to the conversation record data structure based on the conversation record; A large pre-trained language model is introduced to automatically pre-label according to the established style definition dimensions.
5. The intelligent customer service reply method with multiple styles of polishing according to claim 4 is characterized by: The specific steps for initial model learning are as follows: The token sequence of the model input obtained by converting the input sequence; Forward propagation, calculating the probability distribution of words generated by the model; Calculate the language model loss function, the loss function is: , Where T is the length of the reply text, W t is the tth word, θ is the model parameter, W <t Represents all the words generated before the tth word; Back propagation, update model parameters, and train repeatedly until the loss function converges or reaches the preset number of training rounds.
6. The intelligent customer service reply method with multiple styles of polishing according to claim 1, characterized in that: The model reinforcement learning also includes updating model parameters and back-propagating to repeatedly train the model until the loss function converges or reaches a preset number of training rounds, and storing the trained model to generate a final response.
7. The intelligent customer service reply method with multiple styles of polishing according to claim 2 is characterized by: The dynamic information filling module is provided with an exception handling mechanism for user maintenance when an exception occurs in placeholder replacement. When the replacement data is missing but does not affect the overall meaning of the reply, the placeholder is replaced with a preset default value. When key data is missing and a valid reply cannot be generated, a general fallback reply template is used.
8. An intelligent customer service response system with multiple styles of polishing, characterized by: include Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the multi-style polished intelligent customer service reply method as described in any one of claims 1 to 7 are implemented.
9. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the multi-style polished intelligent customer service response method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Interaction method and system for intelligent man-machine conversation and electronic equipment
CN112948534A
Customer data management method and system
CN119128391A
Cited By
Song poem generation method and system based on fuzzy emotion and interactive retouching
CN122334189A