E-commerce customer service response method and device, equipment and medium
By judging the clarity of the user's question text and matching the answer text in the intent response knowledge base, or using a large language model to rewrite the question text, the problem of inaccurate rewriting in traditional methods is solved, and the accuracy of e-commerce customer service response and users are improved. Experience.
Patent Information
- Application Number
- CN202411448582.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-18
AI Technical Summary
In traditional e-commerce customer service response methods, when rewriting user question text using a large language model, the rewrite questions may lead to inaccurate and semantic deviations, resulting in the answer being unable to accurately answer user questions, and the user experience is poor.
By obtaining the user's current question text, determine whether it belongs to the preset business question text or consultation intention is clear. If it is clear, the response text is directly matched from the intent response knowledge base; if it is not clear, the question text is rewritten using a large language model to complete the semantics and correct the wrong expression.
It improves the quality and efficiency of customer service responses, ensures the accuracy and relevance of the response, reduces the risk of distortion of rewriting content, and improves the user's consultation experience.
Smart Images

Figure CN119474301A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of e-commerce technology, and in particular to an e-commerce customer service response method and its corresponding device, computer equipment, and computer-readable storage medium. Background Art
[0002] In the field of e-commerce technology, providing customer service is crucial. It can not only respond to the inquiries and needs of buyers of goods instantly, but also usually provide personalized shopping suggestions and / or solutions, thereby significantly improving consumers' shopping experience and satisfaction. Moreover, for merchants, high-quality customer service is a key factor in building customer trust, enhancing brand loyalty and promoting sales. At the same time, equipped with automated customer service can greatly reduce the pressure on manual customer service and improve overall operational efficiency.
[0003] In traditional technology, a large language model is directly used to rewrite the question text provided by the user when consulting customer service, and then the corresponding answer text of the rewritten question text is matched in the preset knowledge base. However, the large language model rewrites only based on its own learned text comprehension ability, which may cause uncontrollable risks. For example, the rewritten question may not be accurate, the corresponding semantics before and after the rewriting may have a large deviation, the semantic interpretation may be excessive or one-sided, etc., which makes the answer text unable to accurately answer the user's consultation questions, and the user consultation experience is poor.
[0004] In view of the shortcomings of traditional practices, the applicant has been engaged in research in related fields for a long time and has taken a different approach to solve industry problems in the field of e-commerce technology. Summary of the invention
[0005] The primary purpose of the present application is to solve at least one of the above problems and to provide an e-commerce customer service response method and its corresponding device, computer equipment, and computer program product.
[0006] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0007] An e-commerce customer service response method provided to meet one of the purposes of this application includes the following steps:
[0008] Obtain the current question text provided by the user in the conversation with the e-commerce customer service, and determine whether the current question text belongs to the business question text corresponding to the preset consulting business, or whether the consulting intention of the current question text is clear;
[0009] When the current question text belongs to the business question text or the consultation intention is clear, determine the answer text corresponding to the intention text set matching the current question text in the intention answer knowledge base;
[0010] When the current question text does not belong to the business question text and the consultation intention is unclear, rewriting the current question text to obtain at least one rewritten question text according to the current question text and its previous historical conversation record;
[0011] Respectively confirm the intent text set and its confidence level corresponding to each question text in the rewritten current question text and each rewritten question text, determine the intent text set with the confidence level meeting the standard, and obtain the response text corresponding to the intent text set in the intent response knowledge base;
[0012] The answer text is sent to the user, and the current question text and the answer text are appended to the historical conversation record.
[0013] On the other hand, an e-commerce customer service answering device provided to meet one of the purposes of the present application includes a rewriting judgment module, a first answer matching module, a question rewriting module, a second answer matching module and a conversation recording module, wherein the rewriting judgment module is used to obtain the current question text provided by the user in the conversation with the e-commerce customer service, and judge whether the current question text belongs to a business question text corresponding to a preset consulting business, or whether the consulting intention of the current question text is clear; the first answer matching module is used to determine the answer text corresponding to the intent text set matching the current question text in the intent answer knowledge base when the current question text belongs to the business question text or the consulting intention is clear; the question rewriting module is used to obtain the current question text provided by the user in the conversation with the e-commerce customer service, and judge whether the current question text belongs to the business question text or the consulting intention is clear. A module is used to rewrite the current question text to obtain at least one rewritten question text according to the current question text and its previous historical conversation record when the current question text does not belong to the business question text and the consultation intention is unclear; a second answer matching module is used to respectively confirm the intention text set and its confidence level corresponding to each question text in the rewritten current question text and each rewritten question text, determine the intention text set with a qualified confidence level, and obtain the answer text corresponding to the intention text set in the intention answer knowledge base; a conversation record module is used to send the answer text to the user, and append the current question text and the answer text to the historical conversation record.
[0014] A computer device provided to meet one of the purposes of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the e-commerce customer service response method described in the present application.
[0015] On the other hand, a computer program product provided to meet another purpose of the present application includes a computer program / instruction, which, when executed by a processor, implements the steps of the method described in any embodiment of the present application.
[0016] The technical solution of this application has many advantages, including but not limited to the following aspects:
[0017] This application obtains the user's current question text and determines whether it belongs to the preset business question text or whether the consultation intention is clear. If the user's question is clear, the corresponding answer text is directly matched from the intention answer knowledge base; if the user's question is unclear, the current question text is rewritten using a large language model to complete the semantics and correct erroneous expressions.
[0018] In this process, through precise semantic understanding and answer matching, the quality and efficiency of customer service answers are improved, and the rewriting ability of the large language model is used appropriately to improve the accuracy of question understanding and ambiguity correction, which can avoid interference with specific business processes and ensure accurate and efficient execution of business. Multiple rewriting is achieved and the rewriting results are subsequently matched with the original text, reducing the risk of distortion of the rewritten content and ensuring the robustness and accuracy of the matching effect. Finally, by enhancing the relevance and timeliness of the answer based on the question-answering characteristics of the knowledge base, the user's consulting questions can be effectively answered, thereby ensuring the user's consulting experience and achieving high-quality e-commerce customer service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0020] Figure 1 A schematic diagram of a typical network deployment architecture related to implementing the technical solution of this application;
[0021] Figure 2 A flowchart of a typical embodiment of the e-commerce customer service response method of the present application;
[0022] Figure 3 This is a functional block diagram of the e-commerce customer service response device of this application;
[0023] Figure 4 A schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0024] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0025] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0026] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0027] like Figure 1 In the network architecture shown, the e-commerce platform 82 is deployed on the Internet to provide corresponding services to its users. Similarly, the devices 80 of the merchant users of the e-commerce platform 82 and the devices 81 of the consumer users are also connected to the Internet to use the services provided by the e-commerce platform.
[0028] The exemplary e-commerce platform 82 provides supply and demand matching of products and / or services to the general public with the help of Internet infrastructure. In the e-commerce platform 82, products and / or services are provided as commodity information. To simplify the description, the concepts of commodity, product, etc. are used in this application to refer to the products and / or services in the e-commerce platform 82, which may specifically be physical products, digital products, tickets, service subscriptions, other offline services, etc.
[0029] In reality, all entities can access the e-commerce platform 82 as users, use various online services provided by the e-commerce platform 82, and achieve the purpose of participating in the business activities achieved by the e-commerce platform 82. These entities can be natural persons, legal persons or social organizations, etc. Corresponding to the two types of entities, merchants and consumers in business activities, the e-commerce platform 82 has two types of users, merchant users and consumer users. All entities in the product distribution chain in business activities, including manufacturers, sellers, retailers, logistics providers, etc., can use online services in the e-commerce platform 82 as merchant users, while consumers in business activities, including real or potential consumers, can use online services in the e-commerce platform 82 as their corresponding consumer users. In actual business activities, the same entity can act as both a merchant user and a consumer user, and this should be understood flexibly.
[0030] The infrastructure used to deploy the e-commerce platform 82 mainly includes the backend architecture and frontend equipment. The backend architecture runs various online services through the service cluster, including middleware or frontend services for the platform, services for consumers, services for merchants, etc., to enrich and improve its service functions; the frontend equipment mainly covers the terminal devices used by users to access the e-commerce platform 82 as clients, including but not limited to various mobile terminals, personal computers, point-of-sale devices, etc. For example, merchant users can enter product information for their online stores through their terminal devices 80, or generate their product information using the interfaces opened by the e-commerce platform; consumer users can access the webpage of the online store implemented by the e-commerce platform 82 through their terminal devices 81, trigger the shopping process through the shopping buttons provided on the webpage, and call various online services provided by the e-commerce platform 82 during the shopping process, so as to achieve the purpose of shopping orders.
[0031] In some embodiments, the e-commerce platform 82 may be implemented by a processing facility including a processor and a memory, the processing facility storing a set of instructions that, when executed, cause the e-commerce platform 82 to perform the e-commerce and support functions involved in the present application. The processing facility may be part of a server, client, network infrastructure, mobile computing platform, cloud computing platform, fixed computing platform, or other computing platform, and provides electronic components, merchant equipment, payment gateways, application developers, marketing channels, transportation providers, customer equipment, point-of-sale equipment, etc. of the e-commerce platform 82.
[0032] The e-commerce platform 82 can be implemented as an online service such as cloud computing service, software as a service (SaaS), infrastructure as a service (IaaS), platform as a service (PaaS), desktop as a service (DaaS), hosted software as a service, mobile backend as a service (MBaaS), information technology management as a service (ITMaaS), etc. In some embodiments, the various functional components of the e-commerce platform 82 can be implemented to be suitable for operation on various platforms and operating systems. For example, for an online store, its administrator users enjoy the same or similar functions regardless of various embodiments such as iOS, Android, HomonyOS, or web pages.
[0033] The e-commerce platform 82 can realize the corresponding independent station for each merchant to run its corresponding online store, and provide the merchant with the corresponding business management engine instance for the merchant to establish, maintain and run one or more online stores in one or more independent stations. The business management engine instance can be used for content management, task automation and data management of one or more online stores, and various specific business processes of the online store can be configured through interfaces or built-in components to support the implementation of business activities. The independent station is the infrastructure of the e-commerce platform 82 with cross-border service functions. Merchants can maintain their online stores more centrally and autonomously based on the independent station. The independent station usually has a domain name and storage space dedicated to the merchant, and different independent stations are relatively independent. The e-commerce platform 82 can provide standardized or personalized technical support for a large number of independent stations, so that merchant users can customize their own business management engine instance and use this business management engine instance to maintain one or more online stores they own.
[0034] The online store can implement backend configuration and maintenance by having the merchant user log in to its business management engine instance as an administrator. With the support of various online services provided by the infrastructure of the e-commerce platform 82, the merchant user can configure various functions in its online store as an administrator, view various data, etc. For example, the merchant user can manage various aspects of its online store, such as viewing the online store's recent activities, updating the online store's product catalog, managing orders, recent visit activities, total order activities, etc.; the merchant user can also view more detailed information about the business and visitors to the merchant's online store by obtaining reports or metrics, such as showing a sales summary of the merchant's overall business, specific sales and participation data of active sales marketing channels, etc.
[0035] The e-commerce platform 82 may provide communication facilities and associated merchant interfaces for providing electronic communications and marketing, such as utilizing electronic message aggregation facilities to collect and analyze communication interactions between merchants, consumers, merchant devices, customer devices, point-of-sale devices, etc., aggregating and analyzing communications, such as for increasing the potential for providing product sales, etc. For example, a consumer may have a question related to a product, which may generate a dialogue between the consumer and the merchant (or an automated processor-based agent on behalf of the merchant), where the communication facility is responsible for interacting and providing the merchant with analysis on how to increase the probability of a sale.
[0036] In some embodiments, an application suitable for installation in a terminal device can be provided to serve the access needs of different users, so that various users can access the e-commerce platform 82 by running the application in the terminal device, such as the merchant backend module of the online store in the e-commerce platform 82, etc. In the process of implementing business activities through these functions, the e-commerce platform 82 can implement various functions related to supporting the implementation of business activities as middleware or online services and open corresponding interfaces, and then implant the toolkit corresponding to the interface access function into the application to implement function expansion and task implementation. The business management engine can include a series of basic functions, and expose these functions to online services and / or application calls through APIs. Online services and applications use corresponding functions by remotely calling corresponding APIs.
[0037] With the support of various components of the business management engine instance, the e-commerce platform 82 can provide online shopping functions, enabling merchants to establish connections with customers in a flexible and transparent manner. Consumer users can select items online, create product orders, provide the delivery address of the goods in the product order, and complete the payment confirmation of the product order. Then, the merchant can review and complete or cancel the order. The review component carried by the business management engine instance can realize the compliance use of business processes to ensure that the order is suitable for fulfillment before actual fulfillment. Orders may sometimes be fraudulent and need to be verified (such as ID card checks). There is a payment method that requires merchants to wait to ensure that funds are received, which can play a role in preventing such risks, etc. Order risks may be generated by fraud detection tools submitted by third parties through order risk APIs, etc. Before fulfillment, merchants may need to obtain payment information or wait to receive payment information in order to mark the order as paid, so that the merchant can prepare to deliver the product. Such situations can be reviewed accordingly. The review process can be implemented by the fulfillment component. Merchants can use the fulfillment component to review, adjust work, and trigger related fulfillment services, such as: manual fulfillment services, which are used when merchants pick and pack products in boxes, purchase shipping labels and enter their tracking numbers, or simply mark items as fulfilled; custom fulfillment services, which can define email notifications; API fulfillment services, which can trigger third-party applications to create fulfillment records in third parties; legacy fulfillment services, which can trigger custom API calls from the business management engine to third parties; gift card fulfillment services. You can provide the generation of numbers and activate gift cards. Merchants can use the order printer application to print shipping orders. The fulfillment process can be executed when the items are packed in boxes and ready for shipping, tracking, delivery, consumer receipt verification, etc.
[0038] An e-commerce customer service response method of the present application can be programmed as a computer program product and deployed in a client or server for execution. For example, in the exemplary application scenario of the present application, it can be deployed and implemented in a server of an e-commerce customer service platform, thereby accessing an interface opened after the computer program product is running and performing human-computer interaction with the process of the computer program product through a graphical user interface to execute the method.
[0039] See also Figure 2 , an e-commerce customer service response method of the present application, in its typical embodiment, includes the following steps:
[0040] Step S1100: obtaining the current question text provided by the user in the dialogue with the e-commerce customer service, and determining whether the current question text belongs to the business question text corresponding to the preset consulting business, or whether the consulting intention of the current question text is clear;
[0041] In one embodiment, in a conversation between a user and an e-commerce customer service, the user can enter and send a question text in the e-commerce page of the conversation, thereby obtaining the question text as the current question text. Since the current question text is a text provided by the user without a preset consulting service, it does not belong to the business question text corresponding to the preset consulting service. In a further embodiment, a large language model is used to determine whether the consulting intention of the current question text is clear. Specifically, a preset prompt template includes a task description and a question text to be embedded. Those skilled in the art can refer to the following disclosure to flexibly set the prompt template. The prompt template is exemplified as follows: The task description in the prompt template: "Please determine whether the semantics of the question text is complete and the expression is correct based on the question text sent in the conversation between the user and the customer service given below. If the semantics is incomplete or the expression is incorrect, the consulting intention of outputting the question text is unclear; if the semantics is complete and the expression is correct, the consulting intention of outputting the question text is clear." Call the large language model and the prompt template, embed the current question text into the question text to be embedded in the prompt template, obtain the corresponding prompt text, input the prompt text into the large language model, and obtain the output result of the large language model. The large language model is suitable for text processing in the field of NLP. It is pre-trained with an extremely large corpus until convergence, acquires the ability to generate human language, and has a certain degree of accurate text semantic understanding and logical reasoning ability. The large language model includes OpenAI, Falcon, Chinchilla, PaLM, LLaMA 2, text-embedding-ada-002, etc. Those skilled in the art can choose one to implement as needed.
[0042] In another embodiment, the user can trigger the creation of a dialogue with the e-commerce customer service through a preset consultation portal, and provide the preset question text corresponding to the preset consultation portal as the current question text in the dialogue, or the user can trigger the provision of a preset question text as the current question text through the preset consultation portal in the dialogue with the e-commerce customer service. The preset consultation portal can be a page control, a page confirmation pop-up window, a page question recommendation list, etc. corresponding to sending the corresponding preset question text, and those skilled in the art can set it as needed. Accordingly, the user can use the preset consultation portal by touching the page control, selecting the question text in the page question recommendation list, confirming the question text in the page confirmation pop-up window, etc., any one or more of which can realize the use of the preset consultation portal.
[0043] In another embodiment, the user can provide a corresponding question text as the current question text by being guided by a preset consultation task flow during a conversation with an e-commerce customer service. The preset consultation task flow is usually that the e-commerce customer service guides the user to make a corresponding response to its consultation intention in the form of a counter-question to the user, so that at the end of the preset consultation task flow, the consultation intention is clarified through multiple rounds of dialogue to obtain a corresponding question text.
[0044] The dialogue interaction behaviors corresponding to the preset consultation entrance and the preset consultation task flow all belong to the preset consultation business, and the corresponding current question text is confirmed to belong to the business question text corresponding to the preset consultation business. In addition, each business question text is usually a standard question text in the corresponding single intent text set in the intent response knowledge base.
[0045] Step S1200: When the current question text belongs to the business question text or the consultation intention is clear, determine the answer text corresponding to the intention text set matching the current question text in the intention answer knowledge base;
[0046] The intention response knowledge base includes multiple intention text sets and their corresponding response texts. The intention text set includes a single standard question text, and may also include at least one similar question text corresponding to the standard question text. Each question text in the intention text set expresses the same consulting intention, but the difference is that the different expressions lead to different corresponding expressions. The corresponding standard question text usually expresses the consulting intention directly and concisely, while the similar question text usually expresses the consulting intention with more emotional colors and / or personal wishes. For example, a standard question text in an intention text set: how to become a member, the first similar question text: I want to become a member, the second similar question text: how to apply for membership, and the third similar question text: how to register as a member. The response text is used to answer questions corresponding to the consulting intention pointed to by the corresponding intention text set. Specifically, the various intention text sets and their corresponding response texts are usually formulated by customer service operators in e-commerce platforms, or by operators of online stores that provide e-commerce customer service.
[0047] It is not difficult to understand that when the current question text belongs to the business question text, since the business question text is set in advance, the corresponding consulting intention is clear, and the query intention answers the answer text corresponding to the intent text set where the current question text is located in the knowledge base.
[0048] When the output result of the large language model indicates that the consulting intention of the current question text is clear, for each intention text set in the intention answering knowledge base, each question text in the intention text set is respectively formed into corresponding input text pairs with the current question text, and each input text pair contains a question text in the intention text set and the current question text. Each input text pair is respectively used as the input of the text similarity model, and a processing branch in the text similarity model extracts the deep semantic features of one question text in the input text pair to obtain the corresponding vectorized feature representation, while another processing branch extracts the deep semantic features of another question text in the input text pair to obtain the corresponding vectorized feature representation, and then the linear layer in the text similarity model calculates the vector distance between the feature representations corresponding to the two question texts as the semantic similarity between the two question texts. Furthermore, for the current question text, the sum of the semantic similarities between it and each question text in the intention text set and the total number of all question texts in the intention text set are calculated to obtain the corresponding mean value as the matching score between the current question text and the intention text set.
[0049] According to the matching score between each intention text set in the intention answer knowledge base and the current question text, the maximum matching score is screened out, and it is determined whether the matching score exceeds the preset threshold. If it exceeds, it means that the matching score is high enough and is reliable, and it is confirmed that the intention text set corresponding to the matching score matches the current question text, and the corresponding answer text of the intention text set in the intention knowledge base is obtained and sent to the user to answer the user's consultation question. The preset threshold can be set as needed by those skilled in the art according to the disclosure herein.
[0050] The text similarity model is pre-trained to a convergent state and acquires the ability to determine the semantic similarity between two texts. The specific training process can be flexibly implemented by those skilled in the art according to the reasoning process disclosed later.
[0051] The text similarity model is a dual-tower model, which includes two processing branches, each of which includes a completely identical network structure, and each of which includes a text feature representation layer. Then, the outputs of the two processing branches are respectively connected to the linear layer for calculating the semantic similarity. The text feature representation layer can be Text Transfomer, RoBERTa, XLM-RoBERTa, MPNet, BERT, etc., and those skilled in the art can choose one to implement as needed. The linear layer can be MLP (multi-layer perceptron), FC (fully connected layer), etc., and those skilled in the art can choose one to implement as needed.
[0052] Step S1300: when the current question text does not belong to the business question text and the consultation intention is unclear, rewrite the current question text to obtain at least one rewritten question text according to the current question text and its previous historical conversation record;
[0053] At this time, the current question text needs to be rewritten. In order to ensure the accuracy and reliability of the consulting intention of the corresponding rewritten question text, the historical conversation records before the current question text are used for rewriting, so that the semantics of the current question text can be completed accordingly, and the incorrect description text in the current question text can be corrected accordingly. The historical conversation records before the current question text are obtained by obtaining the question text and answer text corresponding to the time sequence before the current question text from all historical conversation records corresponding to all conversations between the user and the e-commerce customer service. The total number of characters corresponding to the historical conversation records before the current question text is usually less than or equal to the upper limit of the total number of characters of the large language model input in a single time minus the total number of characters of the preset prompt template.
[0054] A preset prompt template includes a task description, a question text to be embedded, and its previous historical conversation record. Those skilled in the art can refer to the following disclosure to flexibly set the prompt template. An exemplary prompt template is given as follows: The task description in the prompt template: "You are a question rewriter in the field of e-commerce customer service (CSR for short). Given the question text and its previous historical conversation record, your task is:
[0055] 1. If the final text is a question that requires help, you should rewrite at least one question based on the original text and its prior conversation record.
[0056] 2. You should ignore links, emoticons, etc. In the text, focus only on the important points in the text.
[0057] 3. The rewritten output should be a concise declarative sentence containing key information.
[0058] 4. If the text has some spelling mistakes, including phonetic mistakes, you should rewrite it with the correct information.
[0059] ##Example
[0060] -Dialog box:
[0061] User: Order Status
[0062] E-commerce customer service: Hello, the manual customer service is currently busy. You can describe your problem first and I will try my best to help you answer it.
[0063] User: How to
[0064] -output:
[0065] {"need to be rewritten": indeed, "rewrite result 1": "I want to know the status of my order", "rewrite result 2": "Please tell me the status of my order", "rewrite result 3": "What is the status of my order"}"
[0066] Call the large language model and the prompt template, embed the current question text and its previous historical conversation records into the question text to be embedded in the prompt template and its previous historical conversation records, obtain the corresponding prompt text, input the prompt text into the large language model, obtain the corresponding rewriting result output by the large language model, and use each rewritten question text as a single rewritten question text corresponding to the current question text.
[0067] Step S1400: respectively confirm the intention text set and confidence level of each question text in the rewritten current question text and each rewritten question text, determine the intention text set with the qualified confidence level, and obtain the corresponding response text of the intention text set in the intention response knowledge base;
[0068] For each intended text set in the intended answering knowledge base, the intended text set is respectively combined with the rewritten current question text and each rewritten question text to form corresponding input text pairs, and each input text pair contains a question text in the corresponding intended text set and a rewritten question text or the current question text. Each input text pair is respectively used as the input of the text similarity model, and a processing branch in the text similarity model extracts the deep semantic features of one question text in the input text pair to obtain a corresponding vectorized feature representation, while another processing branch extracts the deep semantic features of another question text in the input text pair to obtain a corresponding vectorized feature representation, and then the linear layer in the text similarity model calculates the vector distance between the feature representations corresponding to the two question texts as the semantic similarity between the two question texts. Further, for the rewritten current question text and each rewritten question text, the sum of the semantic similarities between the question text and each question text in the intended text set is divided by the total number of all question texts in the intended text set to obtain the corresponding mean value as the matching score between the question text and the intended text set. Furthermore, each question text is multiplied by its own weight and then added together to calculate the confidence of the intention text set, which represents the reliability of the matching between the user's consulting intention and the consulting intention of the intention text set.
[0069] According to the confidence of each intention text set, the maximum confidence value is screened out, and it is determined whether the maximum value exceeds a preset threshold. If it exceeds, it means that the consultation intention of the corresponding intention text set matches the consultation intention of the user. Based on this, the answer text corresponding to the intention text set is obtained from the intention answer knowledge base. The preset threshold can be set as needed by those skilled in the art according to the disclosure herein.
[0070] Step S1500: Send the response text to the user, and append the current question text and the response text to the historical conversation record.
[0071] The response text is sent to the user to answer the user's consultation question, and the question text and the response text are appended to the historical conversation record to provide the previous conversation context semantics for subsequent rewriting of the corresponding question text as needed.
[0072] It can be known from the typical embodiments of the present application that the technical solution of the present application has many advantages, including but not limited to the following aspects:
[0073] This application obtains the user's current question text and determines whether it belongs to the preset business question text or whether the consultation intention is clear. If the user's question is clear, the corresponding answer text is directly matched from the intention answer knowledge base; if the user's question is unclear, the current question text is rewritten using a large language model to complete the semantics and correct erroneous expressions.
[0074] In this process, through precise semantic understanding and answer matching, the quality and efficiency of customer service answers are improved, and the rewriting ability of the large language model is used appropriately to improve the accuracy of question understanding and ambiguity correction, which can avoid interference with specific business processes and ensure accurate and efficient execution of business. Multiple rewriting is achieved and the rewriting results are subsequently matched with the original text, reducing the risk of distortion of the rewritten content and ensuring the robustness and accuracy of the matching effect. Finally, by enhancing the relevance and timeliness of the answer based on the question-answering characteristics of the knowledge base, the user's consulting questions can be effectively answered, thereby ensuring the user's consulting experience and achieving high-quality e-commerce customer service quality.
[0075] In a further embodiment, step S1100, obtaining the current question text provided by the user in the dialogue with the e-commerce customer service, includes the following steps:
[0076] Step S1110: Obtain the consulting e-commerce page provided by the user in the conversation with the e-commerce customer service, and determine the page type to which the consulting e-commerce page belongs;
[0077] In one embodiment, when a user uses an e-commerce platform on his terminal, he can take a screenshot of the e-commerce page in the e-commerce platform. When the screenshot is completed, the monitoring screenshot code pre-deployed on the execution terminal is triggered to solicit the user's consent to use the e-commerce page for consulting the e-commerce customer service. When the user agrees, the terminal uses the e-commerce page as a consulting e-commerce page and obtains the e-commerce customer service specified by the user. If the user is in a conversation with the e-commerce customer service, the consulting e-commerce page is directly sent in the conversation; if the user is not in a conversation with the e-commerce customer service, after the conversation is created, the consulting e-commerce page is sent in the conversation.
[0078] In another embodiment, the user actively operates the terminal to send the e-commerce page required for consultation as the consultation e-commerce page during the ongoing conversation with the e-commerce customer service.
[0079] The page type is used to uniquely refer to the corresponding e-commerce page to distinguish it from other e-commerce pages. Specifically, it can be a unique descriptive text such as a page name or page ID. Those skilled in the art can flexibly set it according to the disclosure herein.
[0080] Further, it can be understood that if the consulting e-commerce page is sent by a user screenshot, the screenshot monitoring code can also obtain the page type of the page; if the consulting e-commerce page is sent by the user actively operating the terminal, the page type of the page can be identified by adopting an image recognition algorithm. Technical personnel in this field can implement it flexibly, or it can be implemented according to the further disclosure of some subsequent embodiments.
[0081] Step S1120: Obtain, from the intention response knowledge base, the association score and the intention hit score corresponding to each intention text set associated with the page type, and determine the recommendation ranking score corresponding to each intention text set, wherein the association score represents the text relevance between the corresponding intention text set and the text content in the consulting e-commerce page, and the intention hit score represents the number of times the corresponding intention text set matches the consulting intention of the user in the e-commerce platform;
[0082] An OCR (Optical Character Recognition) algorithm is used to detect text as a target object, determine all words in the text content of the consulting e-commerce page, and construct a page content word set.
[0083] Taking the single intention text set as an example, each keyword in the keyword set of the intention text set is respectively combined with each word in the page content word set to form corresponding input text pairs, and each input text pair contains a corresponding keyword and a word. Each input text pair is respectively used as the input of a preset text similarity model, and a processing branch in the text similarity model extracts the deep semantic features of the keywords in the input text pair to obtain the corresponding vectorized feature representation. At the same time, another processing branch extracts the deep semantic features of the words in the input text pair to obtain the corresponding vectorized feature representation. Then, the linear layer in the text similarity model calculates the vector distance between the feature representations corresponding to the keywords and the words as the semantic similarity between the keywords and the words, and determines whether the semantic similarity exceeds the preset threshold. When it exceeds, it indicates that the two are semantically related, that is, the two are semantically matched. Based on this, these semantically matched words in the page content word set are summarized to determine the corresponding total number as the association score of the intention text set. The total number of times the response text corresponding to the intent text set in the intent response knowledge base is used as a response is obtained as the intent hit score. The association score and the intent hit score are multiplied by their respective weights and then added together to calculate the recommended ranking score of the intent text set.
[0084] For each intent text set in the intent response knowledge base, a keyword set corresponding to the intent text set can be pre-constructed. Specifically, a word segmentation algorithm is used to segment each question text in the intent text set to obtain the corresponding words, and a part-of-speech recognition algorithm is used to identify the part-of-speech corresponding to each word. Words with a part-of-speech of noun or verb are used as keywords, and all keywords are collected to form a keyword set. The part-of-speech recognition algorithm can be an open source algorithm such as HanLP, Jiagu, LAC (Lexical Analysis of Chinese), THULAC (THU Lexical Analyzer for Chinese), etc., which can be flexibly implemented by those skilled in the art.
[0085] It can be understood that in one embodiment, the operator of the e-commerce platform can pre-establish an association between each e-commerce page in the e-commerce platform and the corresponding intent text set in the intent response knowledge base based on their prior knowledge. In another embodiment, the page content word set corresponding to each e-commerce page in the e-commerce platform can be determined in advance, and then the page content word set can be semantically matched with each intent text set in the intent response knowledge base, and the vocabulary corresponding to any keyword in the keyword set corresponding to the intent text set that semantically matches the page content word set is determined, and the total number of the vocabulary is used as the association score of the intent text set. Based on this, the intent text set with an association score greater than zero is associated with the page type of the e-commerce page.
[0086] Step S1130: construct a recommended question set based on the corresponding recommendation ranking scores of the standard question texts in each of the intention text sets, and send the set to the user;
[0087] The various intent text sets are sorted in descending order according to the recommended ranking score, and the top N intent text sets are screened out. The standard question texts in these intent text sets are used to form a recommended question set according to the current order and sent to the user for the user to select as needed.
[0088] Step S1140: obtaining the target standard question text confirmed by the user according to the recommended question set as the current question text provided by the dialogue, and confirming the business question text corresponding to the preset consulting business.
[0089] When the user selects a standard question text from the recommended question set, it is sent to the conversation as the target standard question text and as the current question text provided by the conversation. At the same time, since the current question text is a question text pre-set in the intended answer knowledge base, it is confirmed that the current question belongs to the business question text corresponding to the preset consulting business.
[0090] In this embodiment, based on the consultation e-commerce page provided by the user in the conversation with the e-commerce customer service, relevant standard question texts are recommended to the user, and after the user confirms the target standard question text, a quick answer can be given afterwards. There is no need for the user to edit the question text, and the user can avoid describing the question by himself which may lead to unclear consultation intentions, thereby greatly improving consultation efficiency and providing a better user experience.
[0091] In a further embodiment, step S1110, determining the page type to which the consulting e-commerce page belongs, includes the following steps:
[0092] Step S1111: extracting image feature information of the consulting e-commerce page using an e-commerce page recognition model;
[0093] The e-commerce page recognition model is pre-trained to a convergence state and acquires the ability to determine the page type of an e-commerce page. The specific training process can be flexibly implemented by technicians in this field according to the reasoning process disclosed later.
[0094] The structure of the e-commerce page recognition model is an image feature extraction network followed by a classifier. The image feature extraction network is suitable for extracting image features of an input image. The specific model can be any readily available model such as the Resnet series, VGG, Mobilenet series, U-Net series, etc. In the recommended embodiment, the image feature extraction network is a MobilenetV2 model, which has the advantages of being lightweight and highly accurate, so it is easy to deploy quickly and can quickly and accurately extract image features of an image, and the corresponding required computing resources are relatively small. Of course, those skilled in the art can also build an image feature extraction network by themselves, as long as it can extract image features of an input image. The classifier can be implemented using a fully connected layer or MLP, etc. The fully connected layer can be a global convolution with convolution kernels h and w, where h and w are the height and width of the convolution result of the previous layer, respectively.
[0095] In one embodiment, the image feature extraction network adopts the MobilenetV2 model, and the image feature extraction network in the e-commerce page recognition model is used to take the consulting e-commerce page as input. Through the inverted residual structure of the linear bottleneck, the low-dimensional compressed representation of the image is first expanded to a high-dimensional representation, and the image features are extracted using lightweight deep convolution (DW). Finally, the image features are projected back to the low-dimensional representation using linear convolution to obtain the corresponding image feature information.
[0096] Step S1112: classify the page type of the consulting e-commerce page according to the image feature information.
[0097] Furthermore, the classifier in the e-commerce page recognition model performs multi-classification mapping on the image feature information, linearly maps the image feature information to multiple different preset categories, and the multiple preset categories correspond to a type of page in the e-commerce platform, and then obtains the classification probability corresponding to each category, determines the category corresponding to the maximum classification probability, and judges whether the classification probability exceeds the preset threshold. When it exceeds, the e-commerce page recognition model has a high enough reasoning grasp of the classification probability, that is, it ensures that the confidence of the classification probability meets the standard, and accordingly, the page type represented by the category is used as the page type of the consulting e-commerce page. The preset threshold can be set as needed by those skilled in the art according to the disclosure herein.
[0098] In this embodiment, by adopting the e-commerce page recognition model to determine the page type of the consulting e-commerce page provided by the user, the accuracy and reliability of the page type can be ensured, and the execution is efficient.
[0099] In a further embodiment, step S1120, obtaining the association score and the intention hit score corresponding to each intention text set associated with the page type from the intention response knowledge base, and determining the recommendation ranking score corresponding to each intention text set, includes the following steps:
[0100] Step S1121, determining all words in the text content of the consulting e-commerce page, and constructing a page content word set;
[0101] The OCR (Optical Character Recognition) algorithm is used, with text as the target detection object. By sliding the corresponding anchor box in the consulting e-commerce page, the entire image is traversed, and each area in the image containing text content is framed and selected. For each of the text areas, a one-dimensional word-picking window is slid in the text area to determine the spacing between characters, and each character in the text area is divided, and then each divided character is classified, and finally each character is identified, and then all the characters in the text area constitute a single text. Furthermore, a grammar detector can be used to correct the identified text, usually to correct corresponding spelling errors, typos, etc. In this way, all texts in the text content of the consulting e-commerce page are obtained, and a word segmentation algorithm is used to segment all texts to obtain corresponding words, and all words are combined to form a page content word set.
[0102] The word segmentation algorithm can be Byte-Pair Encoding word segmentation, n-gram word segmentation, WordPiece word segmentation, CRF word segmentation, named entity recognition, e-commerce dictionary matching word segmentation, etc. Those skilled in the art can flexibly choose one to implement.
[0103] Step S1122: for each intent text set associated with the page type in the intent response knowledge base, determine the vocabulary corresponding to any keyword in the keyword set corresponding to the intent text set in the page content word set, and use the total number of the vocabulary as the association score;
[0104] Taking the single intention text set as an example, each keyword in the keyword set of the intention text set is respectively combined with each word in the page content word set to form corresponding input text pairs, and each input text pair contains a corresponding keyword and a word. Each input text pair is respectively used as the input of a preset text similarity model, and a processing branch in the text similarity model extracts the deep semantic features of the keywords in the input text pair to obtain the corresponding vectorized feature representation. At the same time, another processing branch extracts the deep semantic features of the words in the input text pair to obtain the corresponding vectorized feature representation. Then, the linear layer in the text similarity model calculates the vector distance between the feature representations corresponding to the keywords and the words as the semantic similarity between the keywords and the words, and determines whether the semantic similarity exceeds the preset threshold. When it exceeds, it indicates that the two are semantically related, that is, the two are semantically matched. Based on this, these semantically matched words in the page content word set are summarized to determine the corresponding total number as the association score of the intention text set.
[0105] The text similarity model is pre-trained to a convergent state and acquires the ability to determine the semantic similarity between two texts. The specific training process can be flexibly implemented by those skilled in the art according to the reasoning process disclosed later.
[0106] The text similarity model is a dual-tower model, which includes two processing branches, each of which includes a completely identical network structure, and each of which includes a text feature representation layer. Then, the outputs of the two processing branches are respectively connected to the linear layer for calculating the semantic similarity. The text feature representation layer can be Text Transfomer, RoBERTa, XLM-RoBERTa, MPNet, BERT, etc., and those skilled in the art can choose one to implement as needed. The linear layer can be MLP (multi-layer perceptron), FC (fully connected layer), etc., and those skilled in the art can choose one to implement as needed.
[0107] The vector distance calculation may be implemented using any available vector distance algorithm, including but not limited to any of the following: cosine similarity algorithm, vector dot product algorithm, Manhattan distance, Euclidean distance algorithm, Pearson correlation coefficient, etc.
[0108] Step S1123: Obtain the total number of times the response text corresponding to the intention text set in the intention response knowledge base is used as a response, as the intention hit score;
[0109] It is not difficult to understand that when the consultation intent corresponding to the intent text set matches the consultation intent of any user in the e-commerce platform, it means that the intent text set is hit. In this regard, the corresponding answer text of the intent text set in the answer knowledge base is sent to the user to answer the corresponding consultation of the user. Therefore, the total number of times the answer text is used as an answer is obtained as the intent hit score.
[0110] Step S1124: match the association score and the intention hit score with their respective weights to calculate a recommendation ranking score for the intention text set.
[0111] In order to comprehensively consider the relevance of the intent text set to the e-commerce page content and the actual consulting intention of the user, so as to more accurately evaluate the recommendation value of each intent text set, so that the intent text set with higher recommendation value is given priority to the user and matches the user's consulting intention, therefore, respective weights are set for the scores of these two aspects.
[0112] The association score and the intention hit score are multiplied by their respective weights and then added together to calculate the recommendation ranking score of the intention text set.
[0113] In this embodiment, the corresponding recommendation ranking score is calculated by determining the association score and intention hit score corresponding to each intention text set related to the page type of the consulting e-commerce page, and then matching the two with their respective weights. Since the association score can characterize the degree of relevance between the corresponding intention text set and the page content, and the intention hit score can characterize the consulting intent of the corresponding intention text set, the prior value corresponding to the consulting intent of the user is actually matched in the past, and then the weights of the two aspects of the score are used to further appropriately adjust the contribution value to the final recommendation ranking score, so as to ensure that the final recommendation ranking score can be more accurate, so as to give priority to those contents that are more likely to match the user's consulting intent.
[0114] In a further embodiment, step S1500, sending the answer text to the user, and appending the current question text and the answer text to the historical conversation record, includes the following steps:
[0115] Step S1600, in response to a conversation completion event, obtaining a target conversation record corresponding to the conversation process;
[0116] For passively ending the conversation, specifically, start a timed task, accumulate the total number of all answer texts and question texts in the conversation after every preset time, and then determine whether the current accumulated total number is greater than the previous accumulated total number. If it is not greater, terminate the timed task, confirm that the conversation is now complete, and trigger the conversation completion event; if it is greater, the timed task ends this time, and waits for the next preset time to arrive before triggering the next execution. For actively ending the conversation, specifically, the user can actively end the conversation to complete it, thereby triggering the conversation completion event.
[0117] The preset duration may range from several minutes to several tens of minutes, depending on the activity of the user, and can be set as needed by those skilled in the art.
[0118] The server responds to the conversation completion event, and according to the response to the previous conversation completion event, appends the corresponding last text to the historical conversation record, confirms that the next text following the last text is the first text in the conversation process, and then confirms the response to the current conversation completion event, appends the corresponding last text to the historical conversation record, and uses all the texts before the last text and after the first text as the target conversation record corresponding to the conversation process.
[0119] Step S1601: determine whether the target conversation record is redundant. If it is redundant, reduce the corresponding redundant text content in the target conversation record.
[0120] A preset prompt template includes a task description and a conversation record to be embedded. Those skilled in the art may refer to the following disclosure to flexibly set the prompt template. An exemplary prompt template is given as follows: Task description in the prompt template: "Please determine whether the conversation record is redundant based on the conversation record between the user and the customer service given below. The redundancy refers to the text content in the conversation record that is not helpful for asking questions and / or answering the consultation intention. When redundancy is confirmed, the corresponding redundant text content in the conversation record is reduced, and the reduced conversation record is output. Note that the original semantics of the corresponding content cannot be changed after reduction; when it is not redundant, the conversation record that does not need to be reduced is directly output."
[0121] The large language model and the prompt template are called, the target conversation record is embedded into the conversation record to be embedded in the prompt template, the corresponding prompt text is obtained, the prompt text is input into the large language model, and the large language model outputs the corresponding conversation record. Further, all historical conversation records corresponding to all conversations between the user and the e-commerce customer service are obtained, and the target conversation record corresponding to all historical conversation records is replaced with the output conversation record to complete the on-demand redundant filtering of the historical conversation records.
[0122] In this embodiment, by determining whether the target conversation record corresponding to the conversation process is redundant, the redundant conversation content is filtered out accordingly to reduce unnecessary text, so that more accurate and rich conversation context can be provided when the historical conversation record with a limited number of words is used later.
[0123] In a further embodiment, step S1400, respectively confirming the intention text set and the confidence level of each question text corresponding to the intention response knowledge base in the rewritten current question text and each rewritten question text, comprises the following steps:
[0124] Step S1410: for each intention text set in the intention response knowledge base, the intention text set is matched with the rewritten current question text and each rewritten question text, and a matching score corresponding to each question text is determined;
[0125] The intended text set is respectively combined with the rewritten current question text and each rewritten question text to form corresponding input text pairs, each input text pair contains a question text in the corresponding intended text set and a rewritten question text or the current question text. Each input text pair is respectively used as the input of the text similarity model, and a processing branch in the text similarity model extracts the deep semantic features of one question text in the input text pair to obtain a corresponding vectorized feature representation, while another processing branch extracts the deep semantic features of another question text in the input text pair to obtain a corresponding vectorized feature representation, and then the linear layer in the text similarity model calculates the vector distance between the feature representations corresponding to the two question texts as the semantic similarity between the two question texts. Further, for the rewritten current question text and each rewritten question text, the sum of the semantic similarities between the question text and each question text in the intended text set is divided by the total number of all question texts in the intended text set to obtain the corresponding mean value as the matching score between the question text and the intended text set.
[0126] Step S1420: Match the matching score corresponding to each question text with its respective weight, and calculate the confidence corresponding to the intended text set.
[0127] In order to comprehensively consider the contribution of the rewritten current question text and each rewritten question text to the relevance to the intention text set, so as to accurately represent the reliability of the matching between the user's consulting intention and the consulting intention of the intention text set, the weight of each question text is set separately.
[0128] Each question text is multiplied by its own weight and then added together to calculate the confidence of the intention text set, which represents the reliability of the matching between the user's consulting intention and the consulting intention of the intention text set.
[0129] In this embodiment, by determining the matching scores of the intention text set corresponding to the rewritten current question text and each rewritten question text, and then matching their respective weights, the confidence corresponding to the intention text set is obtained, which can accurately indicate the reliability of the matching between the user's consulting intention and the consulting intention of the intention text set, so that the subsequent response text corresponding to the intention text set that meets the confidence standard can answer the user's questions.
[0130] In a further embodiment, step S1500, sending the answer text to the user, and appending the current question text and the answer text to the historical conversation record, includes the following steps:
[0131] Step S1600, obtaining the latest question text sent by the user to continue the conversation, and determining whether the latest question text expresses a negative emotion;
[0132] In one embodiment, the text recognition module in the text recognition model is implemented using Bert. The latest question text is segmented using a word segmentation algorithm to obtain a word segmentation sequence, a [CLS] identifier is added to the start position of the word segmentation sequence and a [SEP] identifier is added to the end position, and then the word segmentation sequence is input into the text recognition model, and the input embedding vectors of each identifier and word unit in the word segmentation sequence are determined through the WordPiece embedding layer, and the input embedding vectors are input into a multi-layer stacked Transformer encoder to obtain the text feature vectors of each identifier and word unit in the word segmentation sequence output by the last layer of Transformer encoder, and the text feature vector of the [CLS] identifier is linearly transformed through the feedforward neural network layer, and then the text binary probability distribution is obtained through the Softmax layer, and the text binary probability distribution includes a positive class that represents that the question text does not express negative emotions, and a negative class that represents that the question text expresses negative emotions, and the classification probability belonging to the positive class is obtained.
[0133] The text recognition model is pre-trained to a convergence state and acquires the ability to recognize whether the question text expresses negative emotions. The specific training process can be flexibly implemented by those skilled in the art according to the reasoning process disclosed above. The structure of the text recognition model is a text feature extraction network followed by a classifier. The text feature extraction network is suitable for extracting text features of the input text. The recommended model is the BERT model, and any other model such as TransfomerEncoder, RoBERTa, XLM-RoBERTa, MPNet, BiLSTM, GPT, etc. can also be used. Of course, those skilled in the art can also build a text feature extraction network by themselves, as long as it can extract the text features of the input text. The classifier can be implemented using a fully connected layer or MLP.
[0134] Step S1610: when no negative emotion is expressed, obtaining the matching scores between the intended text set corresponding to the answer text and each question text, and determining whether the matching score differences between the corresponding current question text and each rewritten question text respectively exceed a preset threshold;
[0135] If the classification probability of the positive class exceeds the emotion threshold, it is confirmed that no negative emotion is revealed, which means that the response text can answer the user's question, and the user does not express negative emotions in the latest question text provided by the response text due to the inability to answer the user's question. Secondly, it also means that the intention text set corresponding to the response text matches the user's consultation intention. At this time, the obtained rewritten current question text is subtracted from each rewritten question text to obtain the corresponding differences, and it is determined whether these differences exceed the preset threshold. If so, it means that each rewritten question text obtained by rewriting the rewritten current question text cannot match the user's consultation intention, that is, each rewritten question text is not rewritten to correctly match the user's consultation intention.
[0136] Those skilled in the art may set the emotion threshold and preset threshold as needed based on the disclosure herein.
[0137] Step S1620: when the threshold value is exceeded, the intended text set, the current question text, and each rewritten question text constitute a rewritten positive and negative example sample, and add the rewritten positive and negative example set;
[0138] At this time, since the rewritten current question text and the intention text set can match the user's consultation intention, each rewritten question text cannot match the consultation intention. Therefore, for the goal of matching the consultation intention, each question text in the intention text set is used as a positive example to rewrite the current question text, and each rewritten question text is used as a negative example to rewrite the current question text, and the current question text is used as the rewriting object of the positive and negative examples. In this way, the rewritten object and its positive and negative examples constitute a single rewritten positive and negative example sample and add it to the rewritten positive and negative example set. The rewritten positive and negative example set is a pre-constructed set for placing each rewritten positive and negative example sample.
[0139] Step S1630, iterate the above process until the number of rewritten positive and negative example samples in the rewritten positive and negative example set reaches the standard, and summarize rewriting guidance rules based on the rewritten positive and negative example set to be used for rewriting the question text.
[0140] By iterating the above process, corresponding positive and negative example samples are continuously obtained and added to the rewritten positive and negative example set until the number of rewritten positive and negative example samples in the set reaches the standard, which means that there are sufficient real positive and negative examples at this time. According to the rewritten positive and negative example set, analysis can be performed to summarize how to correctly rewrite the question text provided by the user so that it can correctly match the user's consulting intention and derive corresponding rewriting guidance details. Therefore, the rewriting guidance details can be used to correctly rewrite the question text.
[0141] Regarding the induction of rewriting guidance details based on the rewriting positive and negative example sets, the corresponding implementation is specifically to preset a prompt template, which includes a task description and a rewriting positive and negative example set to be embedded. Those skilled in the art can refer to the following disclosure to flexibly set the prompt template, and exemplify the prompt template as follows: the task description in the prompt template: "Please analyze the reasons for the successful and failed rewriting of the corresponding positive and negative examples according to each rewriting positive and negative example sample in the rewriting positive and negative example set given below, and then summarize the conclusion on how to correctly rewrite the question text, summarize these conclusions to form rewriting guidance details, which are used to guide the correct rewriting of the question text."
[0142] The large language model and the prompt template are called, the rewriting positive and negative example set is embedded into the rewriting positive and negative example set to be embedded in the prompt template, the corresponding prompt text is obtained, the prompt text is input into the large language model, and the large language model outputs the corresponding rewriting guidance rules.
[0143] In this embodiment, by confirming that the latest question text sent by the user to continue the conversation does not express negative emotions, and when the matching score difference between the current question text and each rewritten question text exceeds a preset threshold, corresponding rewritten positive and negative example samples are constructed and added to the rewritten positive and negative example set. After the rewritten positive and negative example set contains a sufficient number of real positive and negative examples, rewriting guidance details are summarized based on these real positive and negative examples, which can ensure the accuracy, reliability, and interpretability of the rewriting guidance details, and is conducive to improving the accuracy of rewriting.
[0144] See also Figure 3 , an e-commerce customer service answering device provided to meet one of the purposes of the present application is a functional embodiment of the e-commerce customer service answering method of the present application. On the other hand, the device includes a rewriting judgment module 1100, a first answer matching module 1200, a question rewriting module 1300, a second answer matching module 1400 and a conversation recording module 1500, wherein the rewriting judgment module 1100 is used to obtain the current question text provided by the user in the conversation with the e-commerce customer service, and determine whether the current question text belongs to a business question text corresponding to the preset consulting business, or whether the consulting intention of the current question text is clear; the first answer matching module 1200 is used to determine the question text in the intention answer knowledge base that is related to the current question text when the current question text belongs to the business question text or the consulting intention is clear. The answer text corresponding to the matched intention text set; the question rewriting module 1300 is used to rewrite the current question text to obtain at least one rewritten question text according to the current question text and its previous historical conversation record when the current question text does not belong to the business question text and the consultation intention is unclear; the second answer matching module 1400 is used to respectively confirm the intention text set and confidence level of each question text in the rewritten current question text and each rewritten question text, determine the intention text set with qualified confidence level, and obtain the answer text corresponding to the intention text set in the intention answer knowledge base; the conversation record module 1500 is used to send the answer text to the user, and append the current question text and the answer text to the historical conversation record.
[0145] In a further embodiment, the rewrite judgment module 1100 includes: a type confirmation submodule, which is used to obtain the consulting e-commerce page provided by the user in the dialogue with the e-commerce customer service, and determine the page type to which the consulting e-commerce page belongs; a recommendation score submodule, which is used to obtain the association score and intention hit score corresponding to each intention text set associated with the page type from the intention response knowledge base, and determine the recommendation ranking score corresponding to each intention text set, wherein the association score represents the text relevance between the corresponding intention text set and the text content in the consulting e-commerce page, and the intention hit score represents the number of times the corresponding intention text set matches the consulting intention of the user in the e-commerce platform; a user recommendation submodule, which is used to construct a recommended question set based on the corresponding recommendation ranking score of the standard question text in each intention text set, and send it to the user; a text confirmation submodule, which is used to obtain the target standard question text confirmed by the user based on the recommended question set as the current question text provided by the dialogue, and confirm the business question text corresponding to the preset consulting business.
[0146] In a further embodiment, determining the page type to which the consulting e-commerce page belongs includes: an image representation submodule, used to extract image feature information of the consulting e-commerce page using an e-commerce page recognition model; and an image classification submodule, used to classify the page type to which the consulting e-commerce page belongs according to the image feature information.
[0147] In a further embodiment, the recommendation scoring submodule includes: a word set construction submodule, which is used to determine all the words in the text content of the consulting e-commerce page and construct a page content word set; an association scoring submodule, which is used to determine, for each intention text set associated with the page type in the intention response knowledge base, the words corresponding to any keyword in the keyword set corresponding to the intention text set in the page content word set that semantically matches the intention text set, and use the total number of the words as the association score; an intention hit scoring submodule, which is used to obtain the total number of times the response text corresponding to the intention text set in the intention response knowledge base is used as a response, as the intention hit score; and a recommendation ranking scoring submodule, which is used to match the association score and the intention hit score with their respective weights to calculate the recommendation ranking score of the intention text set.
[0148] In a further embodiment, after the conversation record module 1500, it includes: an event response submodule, which is used to respond to the conversation completion event and obtain the target conversation record corresponding to the conversation process; a redundancy reduction submodule, which is used to determine whether the target conversation record is redundant, and when it is redundant, reduce the corresponding redundant text content in the target conversation record.
[0149] In a further embodiment, the second answer matching module 1400 includes: a matching scoring submodule, which is used to match each intention text set in the intention answer knowledge base with the rewritten current question text and each rewritten question text, and determine the matching score corresponding to each question text; a confidence calculation submodule, which is used to match the matching score corresponding to each question text with its respective weight, and calculate the confidence corresponding to the intention text set.
[0150] In a further embodiment, after the conversation record module 1500, it includes: an emotion judgment submodule, which is used to obtain the latest question text sent by the user to continue the conversation, and determine whether the latest question text expresses negative emotions; a score judgment submodule, which is used to obtain the matching score between the intention text set corresponding to the response text and the each question text when no negative emotions are expressed, and determine whether the matching score difference between the corresponding current question text and each rewritten question text exceeds a preset threshold; a sample construction and storage submodule, which is used to form rewritten positive and negative example samples with the intention text set, the current question text, and each rewritten question text, and add them to the rewritten positive and negative example set when the preset threshold is exceeded; a detail induction submodule, which is used to iterate the above process until the number of rewritten positive and negative example samples in the rewritten positive and negative example set reaches the standard, and summarize the rewriting guidance details according to the rewritten positive and negative example set for rewriting the question text.
[0151] In order to solve the above technical problems, the present application also provides a computer device. Figure 4 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement an e-commerce customer service response method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute the e-commerce customer service response method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0152] In this embodiment, the processor is used to execute Figure 3The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the e-commerce customer service response device of this application, and the server can call the program code and data of the server to execute the functions of all submodules.
[0153] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the e-commerce customer service response method of any embodiment of the present application.
[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0155] To sum up, this application can answer user questions efficiently and accurately.
[0156] It will be understood by those skilled in the art that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, changed, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted. Furthermore, the steps, measures, and schemes in the various operations, methods, and processes in the prior art that are open source and in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted.
[0157] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An e-commerce customer service response method, characterized in that: The steps include: Obtain the current question text provided by the user in the conversation with the e-commerce customer service, and determine whether the current question text belongs to the business question text corresponding to the preset consulting business, or whether the consulting intention of the current question text is clear; When the current question text belongs to the business question text or the consultation intention is clear, determine the answer text corresponding to the intention text set matching the current question text in the intention answer knowledge base; When the current question text does not belong to the business question text and the consultation intention is unclear, rewriting the current question text to obtain at least one rewritten question text according to the current question text and its previous historical conversation record; Respectively confirm the intent text set and its confidence level corresponding to each question text in the rewritten current question text and each rewritten question text, determine the intent text set with the confidence level meeting the standard, and obtain the response text corresponding to the intent text set in the intent response knowledge base; The answer text is sent to the user, and the current question text and the answer text are appended to the historical conversation record.
2. The e-commerce customer service response method according to claim 1, characterized in that: Obtaining the current question text provided by the user in the conversation with the e-commerce customer service includes the following steps: Obtain the consulting e-commerce page provided by the user in the conversation with the e-commerce customer service, and determine the page type to which the consulting e-commerce page belongs; From the intention response knowledge base, obtain the association score and intention hit score corresponding to each intention text set associated with the page type, and determine the recommendation ranking score corresponding to each intention text set, wherein the association score represents the text relevance between the corresponding intention text set and the text content in the consulting e-commerce page, and the intention hit score represents the number of times the corresponding intention text set matches the consulting intention of the user in the e-commerce platform; The standard question texts in each of the intention text sets are used to construct a recommended question set according to the corresponding recommendation ranking scores, and the recommended question set is sent to the user; The target standard question text confirmed by the user according to the recommended question set is obtained as the current question text provided by the dialogue, and the business question text corresponding to the preset consulting business is confirmed.
3. The e-commerce customer service response method according to claim 2, characterized in that: Determine the page type of the consulting e-commerce page, including the following steps: An e-commerce page recognition model is used to extract image feature information of the consulting e-commerce page; The page type of the consulting e-commerce page is classified according to the image feature information.
4. The e-commerce customer service response method according to claim 2, characterized in that: Obtaining, from the intent response knowledge base, the association score and the intent hit score corresponding to each intent text set associated with the page type, and determining the recommendation ranking score corresponding to each intent text set, including the following steps: Determine all words in the text content of the consulting e-commerce page and construct a page content word set; For each intent text set associated with the page type in the intent response knowledge base, determine the vocabulary corresponding to any keyword in the keyword set corresponding to the intent text set in the page content word set, and use the total number of the vocabulary as the association score; Obtain the total number of times the response text corresponding to the intent text set in the intent response knowledge base is used as a response as the intent hit score; The association score and the intention hit score are matched with their respective weights to calculate the recommendation ranking score of the intention text set.
5. The e-commerce customer service response method according to claim 1, characterized in that: Sending the answer text to the user and appending the current question text and the answer text to the historical conversation record comprises the following steps: In response to a conversation completion event, obtaining a target conversation record corresponding to the conversation process; Determine whether the target conversation record is redundant, and if so, reduce the corresponding redundant text content in the target conversation record.
6. The e-commerce customer service response method according to claim 1, characterized in that: Confirming the rewritten current question text and each rewritten question text, the corresponding intent text set and its confidence in the intent response knowledge base for each question text, including the following steps: For each intention text set in the intention response knowledge base, the intention text set is matched with the rewritten current question text and each rewritten question text, and a matching score corresponding to each question text is determined; The matching scores corresponding to each question text are matched with their respective weights, and the confidence corresponding to the intended text set is calculated.
7. The e-commerce customer service response method according to claim 6, characterized in that: Sending the answer text to the user and appending the current question text and the answer text to the historical conversation record comprises the following steps: Obtaining the latest question text sent by the user to continue the conversation, and determining whether the latest question text expresses a negative emotion; When no negative emotion is expressed, the matching scores between the intended text set corresponding to the answer text and each question text are obtained, and it is determined whether the matching score differences between the corresponding current question text and each rewritten question text respectively exceed a preset threshold; When the preset threshold is exceeded, the intended text set, the current question text, and each rewritten question text are used to form rewritten positive and negative example samples, and added to the rewritten positive and negative example set; The above process is iterated until the number of rewritten positive and negative example samples in the rewritten positive and negative example set reaches the standard, and rewriting guidance rules are summarized based on the rewritten positive and negative example set to be used for rewriting the question text.
8. An e-commerce customer service response device, characterized in that: include: The rewriting judgment module is used to obtain the current question text provided by the user in the dialogue with the e-commerce customer service, and judge whether the current question text belongs to the business question text corresponding to the preset consulting business, or whether the consulting intention of the current question text is clear; A first answer matching module is used to determine the answer text corresponding to the intention text set matching the current question text in the intention answer knowledge base when the current question text belongs to the business question text or the consultation intention is clear; A question rewriting module, used for rewriting the current question text to obtain at least one rewritten question text according to the current question text and its previous historical conversation record when the current question text does not belong to the business question text and the consultation intention is unclear; The second answer matching module is used to respectively confirm the intention text set and its confidence level corresponding to each question text in the rewritten current question text and each rewritten question text, determine the intention text set with the qualified confidence level, and obtain the answer text corresponding to the intention text set in the intention answer knowledge base; The conversation record module is used to send the answer text to the user and append the current question text and the answer text to the historical conversation record.
9. A computer device comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.