Multi-style polishing intelligent customer service reply method and system and storage medium thereof

By constructing an intentional classification system and dynamic information filling module in the e -commerce customer service system, combined with the style of the style talk generation model, the problem of single -speaking style in the existing system and insufficient information dynamic acquisition of the existing system, realized multi -style talk generation and the generation and the generation of technique and Real -time information integration has improved user experience and transaction rate.

CN119357337AActive Publication Date: 2025-01-24HANGZHOU RAYCLOUD TECH CO LTD

Patent Information

Application Number
CN202411918747.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-01-24
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing e-commerce customer service system has shortcomings in terms of speech style and dynamic information acquisition, resulting in a single user experience and outdated or inaccurate reply content.

Method used

By building a rich user intention classification system and dynamic information filling module, multi-style speech generation and real-time information integration are achieved. Specific steps include: building an intent classification system based on historical customer service data, using placeholders to mark dynamic information, accurately filling in information through multiple data sources, and introducing a style generation model to improve transaction rates and style consistency.

Benefits of technology

It realizes the generation of multi-style speech, improves user experience and transaction rate, and ensures the accuracy and timeliness of reply content through dynamic information integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357337A_ABST
    Figure CN119357337A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-style retouching intelligent customer service reply method and system and a storage medium thereof, and relates to the field of artificial intelligence. Based on historical customer service data, a knowledge base configuration module which enriches intention classification of users and configures a corresponding intention answer template is built; multiple data sources are obtained through a dynamic information filling module to carry out accurate information filling on placeholder positions, a preliminary reply text is automatically output according to text content input by a user, and the preliminary reply text is input into a style verbal skill generation model in which a transaction tendency index combined with a style label is introduced as a reward. According to the customer service reply generation method and the customer service reply generation device, by presetting various verbal skill style models, multi-style reply verbal skill can be automatically generated according to the situation demand and intention of the user, so that personalized and situational reply experience is provided, customer service replies with suitable styles are matched, and the user experience is improved. Therefore, the transaction rate can be improved to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a multi-style polished intelligent customer service reply method, system and storage medium thereof. Background Art

[0002] In modern e-commerce platforms, customer service robots use knowledge base configuration to efficiently answer user questions. The construction of the knowledge base is usually completed in an offline environment. Customer service operators will preset possible user intent categories and configure corresponding answer templates under each intent category. In real user interactions, when the system recognizes the user's intent, it will retrieve the corresponding answer template from the knowledge base, and then fill in the placeholders in the answer based on specific information (such as product selling points, event information, etc.) to form the final reply content; However, in order to improve user experience, fixed scripts cannot meet diverse communication needs. E-commerce customer service staff need to adjust their responses in different situations to reflect personalized expressions and maintain professionalism. For example, for the same product introduction, users may want to hear different styles of customer service staff, such as gentle guidance in the style of "caring customer service" or recommendations in the style of "grass-planting expert"; In addition, the products and activities of e-commerce platforms are updated frequently, and customer service scripts need to dynamically obtain the latest product and activity information based on the context to ensure that the reply content is accurate and timely. However, the current e-commerce customer service has the following defects in script optimization in the existing e-commerce knowledge base configuration mode: The style of speech is single and lacks diversified expression: In the existing technology, the answers in the knowledge base are mostly fixed standard words, and the manually configured answer templates lack the ability to automatically generate multiple styles. In actual use, different users and situations require different language styles to improve the naturalness of communication and user favorability. However, the traditional configuration method cannot flexibly adjust the speech style at the output stage, resulting in a single user experience and difficulty in adapting to diverse service needs; Insufficient dynamic acquisition of product information and activity information: In customer service scripts, when it comes to product attributes, core selling points, event information, and other content, traditional systems usually use static information configuration. Since e-commerce product information is frequently updated, statically configured content often cannot reflect the real-time status and latest activities of the product, resulting in outdated or inaccurate responses. Even if placeholders are used in the knowledge base, the system lacks intelligent information capture and filling methods, and cannot automatically integrate real-time data extracted from the context into the script, affecting users' trust in the accuracy of platform information. Summary of the invention

[0003] The purpose of the present invention is to provide a multi-style polished intelligent customer service reply method, system and storage medium thereof, to achieve the diversification of speech styles, dynamic integration of product information, and generation of intelligent polished speech to improve customer service quality, so as to solve the problems raised in the above background technology.

[0004] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a multi-style polished intelligent customer service reply method, comprising a knowledge base configuration module for building rich user intent classification and configuring corresponding intent answer templates based on historical customer service data, wherein the answer template contains fixed information and dynamic information marked with 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 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 the polished customer service reply that improves the transaction rate and conforms to a specific style is generated.

[0005] Preferably, the specific method for building the knowledge base configuration module comprises 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 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.

[0006] 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: 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.

[0007] 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.

[0008] 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: 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.

[0009] Preferably, the specific method for polishing and generating customer service replies that improve the transaction rate and conform to a specific style in the style speech generation model includes the following steps: S201: 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; S202: Label and auxiliary information encoding, the style label S target Encoded as the corresponding embedding vector E S Transaction label L in historical data purchase As a property of the sample; S203: Initial model learning, so that the model learns to respond to the given initial reply 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 ; S204: Model reinforcement learning, introducing transaction propensity indicators as rewards, polishing and generating customer service replies that increase transaction rates and conform to a specific style, and further optimizing the generation quality of the model.

[0010] As a preferred method, 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.

[0011] As a preferred method, the specific steps of model reinforcement learning are as follows: Initialization: Use the model parameters θ obtained in the initial model learning as the initial strategy; 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 ; Reward calculation: 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: .

[0012] 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: .

[0013] 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 strategic probability distribution of the model’s generated responses, and R is the total reward; 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.

[0014] Preferably, the style definition dimensions include: tone and emotion, word preference, and sentence structure, wherein: Passionate sales person Tone and emotion: enthusiastic, proactive, and motivating users to buy; Word preference: Use motivational words such as "super value", "limited time", "act now", etc. Sentence structure: Use more exclamatory sentences and appeal sentences, and make good use of exclamation marks and emoticons; Professional Consultant Tone and emotion: formal and professional, rational and objective, emphasizing product performance; Word preference: Use professional terms and technical indicators, such as "processor", "pixel", "battery life", etc. Sentence structure: Use more declarative sentences, with rigorous sentence structure and clear logic; Friendly service Tone and emotion: warm and friendly, caring, and focused on user experience; Word preference: Use endearing terms such as "dear" and "you", as well as caring words such as "rest assured" and "reassured", etc. Sentence structure: Use short sentences, a soft tone, and appropriate greetings.

[0015] In order to solve the above technical problems, the present invention also provides an intelligent customer service reply system with multi-style polishing, including: 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 the above items are implemented.

[0016] In order to solve the above technical problem, the present invention further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of a multi-style polished intelligent customer service reply method as described in any one of the above items are implemented.

[0017] In summary, the beneficial effects of the present invention are: Enables multi-style speech generation to improve user experience: The present invention presets a variety of speech style models, such as "attentive customer service" and "grass-planting expert", etc., and can automatically generate multi-style reply speech according to the user's situational needs and intentions, so as to provide a personalized and situational reply experience, match customer service replies of suitable styles, and thus improve the transaction rate to a certain extent. At the same time, the present invention allows customer service operators to preset different styles of intent classification in the configuration stage, so that the system can flexibly adjust the speech style in the output stage, thereby enhancing the user's communication experience and favorability; Implement dynamic information integration based on context to improve the accuracy of responses: The present invention can automatically identify and capture real-time product information, activity information and other content, and accurately fill dynamic product attributes, core selling points and other content into the script according to the placeholder position in the customer service intention. By using placeholders when the knowledge base is configured offline, the system automatically obtains the latest product information in actual operation, thereby ensuring that the reply content is consistent with the product information of the e-commerce platform, thereby improving the accuracy and timeliness of the reply.

[0018] The present invention also provides an intelligent customer service response system and a storage medium, which have the above-mentioned beneficial effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 A schematic diagram of the process framework structure of a multi-style polished intelligent customer service reply method of the present invention; Figure 2 This is a display diagram of the answer configuration interface of the system in the intelligent customer service reply method with multi-style polishing of the present invention; Figure 3 This is a diagram showing the interactive interface of the system in the intelligent customer service reply method with multi-style polishing according to the present invention;

[0021] Figure 4 A schematic diagram of a reply of enthusiastic sales in a multi-style polished intelligent customer service reply method of the present invention; Figure 5 A schematic diagram of a professional consultant's reply in a multi-style polished intelligent customer service reply method of the present invention; Figure 6A schematic diagram of a friendly service reply in a multi-style polished intelligent customer service reply method of the present invention; Figure 7 A schematic diagram of a bottom-line reply in a multi-style polished intelligent customer service reply method of the present invention. DETAILED DESCRIPTION

[0022] The present invention will now be further described in detail in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. These drawings are all simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic way, and therefore they only show the structures related to the present invention.

[0023] To facilitate 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 shown 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.

[0024] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.

[0025] Any feature disclosed in this specification (including any additional claims, abstract and drawings), unless otherwise stated, may be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

[0026] In the present invention, unless otherwise clearly defined and specified, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of 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 circumstances.

[0027] Combine the following Figure 1-7 The present invention is described in detail and an embodiment provided by the present invention is described.

[0028] 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: 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; 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; 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.

[0029] In the specific implementation, for the first step, a knowledge base configuration module is built based on historical customer service data.

[0030] 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: Intent classification system construction: 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.

[0031] 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; Classification level: Establish a multi-level intent classification system to facilitate management and expansion; First-level classification: such as "product consultation", "order inquiry", "after-sales service", etc.; Secondary classification: further subdivided under the primary classification, such as "price inquiry", "inventory inquiry", "function inquiry" under "product inquiry", etc. Intent Description: Write a detailed description for each intent category, clarifying its scope and characteristics.

[0032] Intent Examples: Collect or write typical user query examples for each intent category to facilitate subsequent model training and testing.

[0033] It should be noted that this embodiment also provides a possible example of intention demonstration as follows: Intent category: product price inquiry.

[0034] Description: The user asks about the price of a product, whether there are any discounts, etc.

[0035] Example: “How much is this phone?” “Are there any special offers on this notebook?” After establishing the intent classification system, a standardized answer template is written for each type of intent using natural language. Different intents are configured with different answer templates, and the product-related information in the answer template is marked as dynamic information; Template format: Write a standardized answer template, use natural language, and ensure that the language is standardized and polite; Placeholder usage: Use placeholders in the answer template to mark dynamic information, such as {product name}, {price}, {discount information}, etc.

[0036] Example template: Product price inquiry template: "Hello, the current price of {product name} is {price} yuan, welcome to buy!" "Dear, {product name} is on sale now, {discount information}." Template library establishment: All answer templates are stored in the template library, classified and managed by intention and style, and recorded as,Database_knowledge; Version control: Perform version control on template modifications and updates, record modification history, and facilitate backtracking and auditing; Audit mechanism: Establish a template audit process to ensure that all template contents comply with company regulations and laws and regulations.

[0037] After the answer template library is established, the user's query text is extracted from each conversation record and annotated according to the established intent classification system. One possible exemplary annotation data format is as follows: [ { "text": "Is there any discount for this phone?", "intent_label": "Product price inquiry" }, { "text": "I would like to know the functions of this TV.", "intent_label": "Product function consultation" } ] Based on the above data, the classic pre-trained model Bert is used for classification training, and the trained model is saved and recorded as Model_cls.

[0038] For the second step, the dynamic information filling module is used to analyze the placeholders, and multiple data sources are obtained to accurately fill the placeholder positions with information, and the preliminary reply text is output;

[0039] The dynamic information filling mechanism is the core module of the customer service response generation system. It aims to accurately and efficiently fill the real-time dynamic information such as products and activities into the placeholder position in the answer template to generate a complete and personalized preliminary response text. The specific steps of this module are as follows: Classification and identification of placeholders: Different types of placeholders require different parsing methods.

[0040] Efficient retrieval of dynamic information: Obtain the latest and accurate information from multiple data sources based on placeholder requirements.

[0041] Correct replacement of placeholders: Ensure that the text after placeholder replacement is logically smooth and semantically complete.

[0042] Exception handling and fallback strategies: Ensure system stability and user experience in the event of missing information or abnormal situations.

[0043] To this end, we elaborate on the technical implementation steps of the dynamic information filling mechanism as follows: Classification and identification of placeholders: First, according to the complexity of the information required by the placeholder and the way to obtain it, placeholders are divided into two categories: Simple Placeholders: Definition: Directly corresponds to a single field in the database, data acquisition is simple and no complex processing is required.

[0044] Example: {product name}, {price}, {stock status}.

[0045] Complex Conditional Placeholders: Definition: Data that requires complex queries with multiple conditions and fields, or even logical reasoning, to be obtained.

[0046] Examples: {The best promotion information}, {Recommended product list}, {Best-selling rankings}.

[0047] A specific placeholder identification step: Template parsing: Using regular expressions or a template engine, scan the answer template and extract all placeholders.

[0048] Placeholder classification: The extracted placeholders are classified as simple placeholders or complex conditional placeholders according to the pre-defined placeholder categories.

[0049] A possible demonstration example is as follows, Simple placeholders: {product name}, {price}; Complex condition placeholder: {product recommendation list}.

[0050] Steps to implement dynamic information acquisition and placeholder replacement: In order to efficiently and accurately obtain dynamic information and replace placeholders, we designed detailed implementation steps for the two types of placeholders and integrated them together so that the process is clear and the operation is easy in practical applications.

[0051] Data source integration and management Data source type: Product information database: stores basic attributes of products, such as name, price, inventory, specifications, etc.

[0052] Activity information database: store promotional activities, discount information, discount details, etc.;

[0053] Knowledge graph: Build entities such as products, activities, users and their relationships to support complex semantic queries and reasoning.

[0054] Data source integration: Data synchronization mechanism: Through the ETL (Extract, Transform, Load) process, various data sources are integrated to ensure data consistency and real-time performance;

[0055] Cache mechanism: Use cache systems such as Redis to cache frequently accessed data, improve data reading speed, set reasonable expiration policies, and ensure real-time data.

[0056] Parsing and replacing simple placeholders: Get a single field value directly from the database without complex calculations or reasoning. A specific demonstration implementation steps are as follows: Placeholder extraction: Extract simple placeholders from templates;

[0057] Field mapping: establish the mapping relationship between placeholders and database fields; Example mapping table: Placeholder Database fields {Product Name} products.name {price} products.price {Stock Status} products.stock Data Acquisition Determine product identity: Get the product ID or name from user input or context.

[0058] Database query: Use the product ID to query the value of the corresponding field from the product information database.

[0059] A sample SQL query is as follows; SELECT name, price, stock FROM products WHERE product_id = 12345; Data verification and formatting: Data verification: check whether the query result is empty and whether the data type is correct;

[0060] Data formatting: Format numeric data (such as price) and retain two decimal places.

[0061] Placeholder replacement Replace operation: Replace the placeholder with the acquired data.

[0062] An example of demonstration is as follows: The initial template for knowledge base configuration is: "Hello, {product name} is currently priced at {price} yuan, welcome to purchase!" {Product Name}: XYZ Mobile Phone {Price}: 4999.00 The reply text after the placeholder is replaced: "Hello, the current price of XYZ mobile phone is 4999.00 yuan, welcome to buy!" 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.

[0063] Initial template and placeholder extraction Assume that the initial answer template is: "Based on your needs, we recommend the following products: {recommended product list}." Use regular expressions to extract the complex conditional placeholder {recommended product list} in the template.

[0064] User Needs Analysis Suppose the user input is: "Are there any laptops suitable for students that are priced below 5,000 yuan and are thin and portable?" The corresponding placeholder {recommended product list}, the parsed fields to be queried include: Product category / applicable groups / price range / product characteristics; 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.

[0065] A feasible prompt word template is as follows: Please convert the following user's inquiry into structured query conditions, including product categories, attributes, price ranges, etc.: 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?" Output format: { "Product Category": "", "Applicable people": "", "Price Range": "", "Product Features": [] } One possible output of the model is as follows: { "Product Category": "Laptop Computers", "Applicable people": "Students", "Price Range": "0-5000", "Product Features": ["Lightweight and portable"] } Query condition construction Convert the parsed requirements into structured query conditions. The conversion results of the above example are as follows: User needs Database fields Conditional values Product categories category "Laptop" Target Group target_user "student" Price Range price 0<= price<= 5000 Product Features features Includes "lightweight and portable" At the same time, the SPARQL statement of the query is generated, and the results are as follows: SELECT ?productName WHERE { ?product rdf:type ex: laptop. (Select resources of type "laptop") ?product ex: Applicable to "students". (Select a laptop computer that is suitable for "students") ?product ex: price?Price. (get the price of the laptop) FILTER (?price>= 0&&?price<= 5000). (Filter laptops with prices between 0 and 5000) ?product ex: has features ex: thin and light and portable. (Select a laptop with the features of "thin and light and portable") ?product ex:productName ?productName. (Get the name of the laptop) } LIMIT 5 One possible result is: "DEF laptop, GHI laptop, JKL laptop" And replace the placeholder in the original answer template with the result.

[0066] An example of demonstration is as follows: The initial template for knowledge base configuration is: "Based on your needs, we recommend the following products: {Recommended product list}." {Recommended product list}: "DEF laptops, GHI laptops, JKL laptops" Reply text after placeholder replacement: "Based on your needs, we recommend the following products: DEF laptop, GHI laptop, JKL laptop."

[0067] Exception handling and fallback strategy During the placeholder replacement process, abnormal situations such as missing data and query failure may occur. In order to ensure the stability of the system, a complete exception handling mechanism needs to be designed.

[0068] Data missing exception: Unable to obtain the data corresponding to the placeholder.

[0069] Data format exception: The acquired data type or format does not meet the requirements.

[0070] Query failure exception: Database or knowledge graph query failed.

[0071] Anomaly detection methods: Data verification: Check the validity of data immediately after it is acquired.

[0072] Error Capture: During the query and replace process, use an exception capture mechanism (such as try-except) to detect errors.

[0073] refer to Figure 7 , there are the following exception handling strategies Strategy 1: Default Value Replacement Applicable when data are missing but do not affect the overall significance of the response.

[0074] Action: Replace the placeholder with the preset default value.

[0075] Example: {Stock Status} The default value is "Stock Out" Strategy 2: Back-up response Applicable situations: Key data is missing and a valid response cannot be generated.

[0076] Action: Use the generic fallback response template.

[0077] Example: "Sorry, we are unable to retrieve the information you requested. Please try again later or contact our customer service staff." For the third step, the preliminary reply text is input into the style speech generation model that introduces the transaction tendency index combined with style labels as a reward, and polishes and generates customer service replies that improve the transaction rate and conform to a specific style. The main task is to build a multi-style speech model generation module. The task is to generate customer service replies that conform to a specific style based on user needs and situations to improve user experience. The input is the preliminary reply text filled with dynamic information and the specified style label, and the output is the final reply text after style polishing. This module contains two key parts: the data collection and preprocessing module and the style generation model training module.

[0078] Data collection and preprocessing module: Based on historical conversation record data, we establish the association between customer service response style and transaction results, build a high-quality, multi-style customer service conversation dataset containing contextual information, provide a solid data foundation for the subsequent multi-style speech generation model, and perform preliminary style annotation on customer service response content. Due to the high cost of manually annotating large amounts of data, we introduce large-scale pre-trained language models (such as Tongyi Qianwen-2.5) for automatic pre-annotation, combined with a small amount of manual verification to improve efficiency and accuracy.

[0079] First, define and describe the style, establish the style definition dimension, and clarify the definition of different customer service styles. Each style corresponds to specific language characteristics. One specific style definition dimension is: Tone and emotion: such as enthusiasm, professionalism, humor, warmth, etc.

[0080] Vocabulary preferences: common words, catchphrases, professional terms, etc.

[0081] Sentence structure: short sentences, long sentences, questions, exclamatory sentences, etc.

[0082] Based on the description of the above style definition, the specific types of speech styles can be summarized as follows: 1. Passionate salesperson, reference Figure 4 Tone and emotion: Enthusiastic, proactive, and motivating users to buy.

[0083] Word preference: Use motivational words such as "great value", "limited time", "act now", etc.

[0084] Sentence structure: Use more exclamatory sentences and appeal sentences, and make good use of exclamation marks and emoticons.

[0085] 2. Professional consultant type, reference Figure 5 Tone and emotion: Formal and professional, rational and objective, emphasizing product performance.

[0086] Word preference: Use professional terms and technical indicators, such as "processor", "pixel", "battery life", etc.

[0087] Sentence structure: Use more declarative sentences with rigorous sentence structure and clear logic.

[0088] 3. Friendly service, reference Figure 6 Tone and emotion: Warm and friendly, caring, and focused on user experience.

[0089] Word preference: Use endearing terms such as "dear" and "you", as well as caring words such as "rest assured" and "peace of mind".

[0090] Sentence structure: Use short sentences, a soft tone, and appropriate greetings.

[0091] Data Collection Extract historical customer service and user conversation records from the e-commerce platform database, including complete conversations with and without transactions. Each conversation record contains the following fields: conversation_id: The unique identifier of the conversation.

[0092] timestamp: message timestamp.

[0093] sender: The sender of the message ("user" or "customer service").

[0094] message: message content.

[0095] Transaction result association Acquisition method: Match the conversation records with the data in the order system, and mark whether each conversation ultimately leads to a purchase.

[0096] Data content: Add transaction tags based on conversation records.

[0097] Data structure: New fields: purchase_label: transaction label ("sold" or "unsold").

[0098] Due to the huge amount of data, it is impossible to manually annotate all the style labels. We introduced large pre-trained language models (such as Tongyi Qianwen-2.5) for automatic pre-labeling, and used the Chain-of-Thought prompts and Few-Shot Learning methods to improve the accuracy of pre-labeling.

[0099] One possible template for the prompt word is as follows: You are a professional language analyst. Please determine the style category of the following customer service reply and give reasons for your analysis. The style categories include: 1. Enthusiastic Sales Style Tone and Emotion: Full of enthusiasm, proactive, stimulating the user's desire to purchase.

[0100] Word Preference: Using motivating words such as "super value", "limited time", "act now", etc.

[0101] Sentence Structure: Using more exclamatory sentences and appealing sentences, and making good use of exclamation marks and emojis.

[0102] 2. Professional Consultant Style Tone and Emotion: Formal and professional, rational and objective, emphasizing product performance.

[0103] Word Preference: Using professional terms and technical indicators such as "processor", "pixel", "battery life", etc.

[0104] Sentence Structure: Using more declarative sentences, with rigorous sentence patterns and clear logic.

[0105] 3. Friendly Service Style Tone and Emotion: Warm and friendly, caring, focusing on the user experience.

[0106] Word Preference: Using affectionate addresses such as "dear", "you", and caring words such as "rest assured", "feel at ease", etc.

[0107] Sentence Structure: Using more short sentences, with a soft tone, and appropriately using greetings.

[0108] Please output in the following format: Reply Content: <Customer service reply text> Style Judgment: <Style category> Analysis Reason: <Detailed analysis process> The following is an example: Reply Content: Dear, you can enjoy a limited-time discount if you buy this mobile phone now. The opportunity is rare! Style Judgment: Enthusiastic Sales Style Analysis Reason: - Using the affectionate address "dear" reflects a sense of intimacy.

[0109] - The tone is enthusiastic, using an exclamation mark and words like "the opportunity is rare".

[0110] - Emphasizing "limited-time discount" stimulates the user's desire to purchase.

[0111] Now, please analyze the following reply: Reply Content: <Customer service reply text to be analyzed> Based on the above prompt words, the data generated in the previous step are input into qwen-2.5 one by one, the model output results are parsed, and the data is stored. At the same time, the Model_cls obtained in step one is called to classify the intent of the current question, obtain the initial reply template, and perform the process of step two to obtain the initial reply text to be polished.

[0112] One possible data storage format is, Data structure design: conversation_id: conversation ID.

[0113] message_id: message ID.

[0114] sender: The sender of the message.

[0115] message: message content.

[0116] origin_answer: The initial reply text.

[0117] style_label: style label (model judgment).

[0118] analysis_reasoning: The analysis reason given by the model.

[0119] purchase_label: transaction label.

[0120] previous_messages: previous information (such as the previous 2-3 rounds of conversation).

[0121] A sample data example is as follows: { "conversation_id": "conv123", "message_id": "msg456", "sender": "Customer Service", "message": "Dear, if you place an order for this new mobile phone now, you can enjoy a 500 yuan discount. It's better to act than to be tempted!", "origin_answer": "Order now and save 500 yuan", "style_label": "Passionate Salesperson", "analysis_reasoning": "- The affectionate address 'dear' is used to increase a sense of intimacy.\n- The tone is enthusiastic, using an exclamation mark and the colloquial expression '心动不如行动' (Action speaks louder than words).\n- The preferential information 'a discount of 500 yuan' is emphasized to stimulate the desire to purchase.", "purchase_label": "成交", "previous_messages": { "sender": "用户", "message": "这款新品手机有什么优惠吗?" }, { "sender": "客服", "message": "您好,这款手机近期有促销活动。" } } Manually verify the results labeled by the large model, store the final result label, and save it in the database as Data_style.

[0122] Style Generation Model Training Module The style generation model training module aims to build a model that can generate customer service responses in a specific style based on the initial response text, specified style labels, and conversation context. The model needs to balance style consistency, purchase 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 implementation steps are as follows: Model Architecture Design 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: The initial response text is recorded as T initial; The style label is recorded as S target; 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 message; The outputs of the model include: the final response text is recorded as T final; The corresponding basic structure of the model includes: Input Encoding Layer: The initial response text T initial 、风格标签S target ​and context information C and converted into an input representation that the model can process.

[0123] Conditional text generation model: Based on the pre-trained language model, a conditional text generation model is built, which can generate responses in a specified style under given conditions.

[0124] Decoding layer: Generate the final reply text T through the decoder final .

[0125] Data preprocessing and feature construction Will initially reply to text T initial , style tag S target And 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: [CLS] Style:<S_{\text{target}}> [SEP] Context: <c>[SEP] Initial response:<T_{\text{initial}}> [SEP] An example of a possible demonstration is: [CLS] Style: Enthusiastic sales [SEP] Context: User: Is there any discount for this new phone? Customer service: Hello, this phone has a promotion recently. [SEP] Initial reply: If you place an order for this phone now, you can enjoy a discount of 500 yuan. Welcome to buy it. [SEP] Vocabulary building: Use the vocabulary of the pre-trained model to ensure compatibility with the base model.

[0126] Text Tokenization: The input sequence is segmented and tokenized to convert it into the Token sequence required by the model input.

[0127] Style tag encoding: The style tag S target Encoded as the corresponding embedding vector E S; Transaction label: Transaction label L in historical data purchase As the attribute of the sample, it is used in the subsequent evaluation and reinforcement learning stages.

[0128] After the preparatory work is completed, the model training is carried out. The training is divided into two steps, namely supervision and reinforcement learning. The training goal of supervised learning is to enable the model to generate a reply text that conforms to the target style given a preliminary reply, style label and contextual information; while reinforcement learning introduces indicators such as transaction tendency as rewards to further optimize the generation quality of the model.

[0129] It is worth mentioning that, in this embodiment, the steps of supervised learning training are as follows: 1) Prepare training data, including input sequence and target style response text T final ; 2) Convert the input sequence into a token sequence for model input; 3) Forward propagation, calculating the probability distribution of words generated by the model; 4) Calculate the language model loss function. A specific loss function is as follows: , 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; 5) Back propagation, update model parameters, and train repeatedly until the loss function converges or reaches the preset number of training rounds.

[0130] 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: Initialization: Use the model parameters θ0 trained in the previous step as the initial strategy; 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 ; Reward calculation: 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: .

[0131] 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: .

[0132] 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 strategic probability distribution of the model’s generated responses, and R is the total reward; 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.

[0133] 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.

[0134] 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; 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.

[0135] 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.

[0136] 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.

[0137] An intelligent customer service response system with multiple styles of polishing, including: Memory for storing computer programs; 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.

[0138] The processor may include one or more processing cores, such as a core processor, a core processor, etc. The processor may be implemented in at least one of the following hardware forms: a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake-up state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state.

[0139] In some embodiments, the processor may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0140] The memory may include one or more readable storage media, which 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, flash memory storage devices. In this embodiment, the memory is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor, it can implement the relevant steps in a multi-style polished intelligent customer service reply method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory may also include an operating system and data, etc., and the storage method may be short-term 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.

[0141] In addition, each functional module in each embodiment of the present invention may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may 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, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention.

[0142] To this end, 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, the steps of a multi-style polished intelligent customer service reply method are implemented.

[0143] The readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory ROM (Read-Only Memory), a random access memory RAM (Random Access Memory), a magnetic disk or an optical disk, and other media that can store program codes.

[0144] The computer program contained in the readable storage medium provided in this embodiment can implement the steps of the intelligent customer service response method with multi-style polishing as described above when executed by the processor, and the effect is the same as above.

[0145] The above is a detailed introduction to a multi-style polished intelligent customer service reply method, system and storage medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer 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 refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

[0146] The above is only a specific implementation of the invention, but the protection scope of the invention is not limited to it. Any changes or substitutions that are not conceived through creative work should be included in the protection scope of the invention. Therefore, the protection scope of the invention should be based on the protection scope defined in the claims.< / c>

Claims

1. An intelligent customer service reply method with multiple styles of polishing, characterized by: It includes a knowledge base configuration module that builds rich user intent classification and configures corresponding intent answer templates based on historical customer service data. The answer template contains fixed information and dynamic information marked with placeholders. The placeholders are analyzed by a dynamic information filling module, and multiple data sources are obtained to accurately fill in the placeholder positions. 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 propensity 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.

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 method for polishing and generating customer service replies that improve the transaction rate and conform to a specific style in the style speech generation model includes the following steps: S201: 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; S202: Label and auxiliary information encoding, the style label S target Encoded as the corresponding embedding vector E S Transaction label L in historical data purchase As a property of the sample; S203: Initial model learning, so that the model learns to respond to the given initial reply 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 ; S204: Model reinforcement learning, introducing transaction propensity indicators as rewards, polishing and generating customer service replies that increase transaction rates and conform to a specific style, and further optimizing the generation quality of the model.

6. The intelligent customer service reply method with multiple styles of polishing according to claim 5, characterized in that: 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.

7. The intelligent customer service reply method with multiple styles of polishing according to claim 6 is characterized by: The specific steps of model reinforcement learning are as follows: Initialization: Use the model parameters θ obtained in the initial model learning as the initial strategy; Sampling: extract samples from the training data and generate preliminary response text T initial , style tag S target and context information C, using initialization parameters to generate reply text T final ; Reward calculation: 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 strategic probability distribution of the model’s generated responses, and R is the total reward; 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.

8. The intelligent customer service reply method with multiple styles of polishing according to claim 2, characterized in that: 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.

9. 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 8 are implemented.

10. 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 8 are implemented.

Citation Information

Patent Citations

  • Interaction method and system for intelligent man-machine conversation and electronic equipment

    CN112948534A

  • Task type dialogue management method and system capable of automatically generating dialogue strategy

    CN113239167A

  • Intelligent customer service question and answer method based on large language model technology

    CN118364084A

  • Customer data management method and system

    CN119128391A

  • Large model agent interactive question and answer task decision-making method, device and equipment and medium

    CN119166778A

Cited By

  • Telephone sales verbal skill generation method and device, equipment and medium

    CN120708604A

  • Intelligent customer service reply generation method based on personality inheritance and decision guidance

    CN121120075A

  • Intelligent customer service reply generation method based on personality inheritance and decision guidance

    CN121120075B