Shop customer service session method and device, equipment and medium

By retrieving matching conversation flows from the store dialogue library and the general dialogue library in the e-commerce platform and generating customer service replies, the problem of e-commerce customer service handling a large number of consultations is solved, and the accuracy of reply and user satisfaction are improved.

CN120045651APending Publication Date: 2025-05-27广州商研网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410464209.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the e-commerce customer service scenario, merchants need to deal with a large number of customer consultations, especially high-frequency and low-frequency problems, which leads to high human resources consumption and difficult to ensure the accuracy of questions and answers.

Method used

By retrieving from the store dialogue library and the general dialogue library of the target online store, the sample dialogue flow matching the current dialogue flow is determined, and the corresponding customer service message is recalled as a reply. If no match is found, turn to the Universal Dialogue Library or Store Library to generate relevant replies.

Benefits of technology

It improves the accuracy and answer rate of customer service responses, improves user satisfaction and store service quality, and ensures timely and appropriate resolution of customer problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045651A_ABST
    Figure CN120045651A_ABST
Patent Text Reader

Abstract

The invention relates to a shop customer service session method and device, equipment and medium in the technical field of e-commerce, and the method comprises the steps: responding to a message event triggered by a user in a man-machine session in a target online shop, and obtaining a current session flow of the man-machine session, determining whether a sample dialogue stream forming a first matching relationship with the current dialogue stream exists in a shop dialogue library and a general dialogue library of the target online shop, and if yes, recalling a sample customer service message responding to the sample dialogue stream as a target customer service reply; if not, determining whether a sample dialogue stream forming a second matching relationship with the current dialogue stream exists in the general dialogue library, and if yes, recalling a sample customer service message responding to the sample dialogue stream, and determining a target customer service reply according to the sample customer service message and the current dialogue stream; and if not, recalling the material content which forms a third matching relationship with the current dialogue flow in the shop database of the target online shop, and determining a target customer service reply according to the material content and the current dialogue flow. And pushing the target customer service reply to the user. According to the invention, timely and accurate reply can be provided for the user, and a relatively high answering rate is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of e-commerce technologies, and in particular, to a method for a store customer service conversation, a corresponding device, a computer device, and a computer-readable storage medium. Background Art

[0002] In the e-commerce customer service scenario, merchants of online stores face the challenge of handling a large number of customer inquiries, including common high-frequency questions and some low-frequency questions caused by customers not carefully reading relevant store materials. Handling these questions often requires a large amount of human resources and affects the business efficiency of merchants.

[0003] In traditional technologies, usually, merchants themselves set a large number of high-frequency questions and their answers for the intelligent matching system to provide answers to customers. However, collecting high-frequency questions itself is a cumbersome task. On the one hand, it consumes a large amount of human resources. On the other hand, it is difficult to ensure the accuracy of high-frequency questions and their answers, so that the corresponding answers cannot be matched to customers. On the third hand, it is also very difficult for merchants to have the self-driving force to complete such work. The same is true for the work of merchants themselves extracting a large number of low-frequency questions and their answers from their store materials.

[0004] In view of the deficiencies of traditional practices, the applicant has been engaged in research in related fields for a long time. To solve the problems in the e-commerce technology field, a new approach is taken. Summary of the Invention

[0005] The primary objective of the present application is to solve at least one of the above problems and provide a method for a store customer service conversation, a corresponding device, a computer device, and a computer program product.

[0006] To meet the various objectives of the present application, the following technical solutions are adopted:

[0007] A method for a store customer service conversation provided to meet one of the objectives of the present application includes the following steps:

[0008] Respond to a message event triggered by a user in a human-machine conversation in a target online store, obtain the current conversation flow of the human-machine conversation, and determine whether there is a sample conversation flow in the preset store conversation library of the target online store and the preset general conversation library that forms a first matching relationship with the current conversation flow. When there is, recall the sample customer service message that answers the sample conversation flow as the target customer service reply;

[0009] When there is no sample conversation flow that forms a first matching relationship with the current conversation flow, determine whether there is a sample conversation flow in the general conversation library that forms a second matching relationship with the current conversation flow. When there is, recall the sample customer service message that answers the sample conversation flow, and determine the target customer service reply according to the sample customer service message and the current conversation flow;

[0010] When there is no sample conversation flow that forms a second matching relationship with the current conversation flow, recall the material content that forms a third matching relationship with the current conversation flow in the preset store database of the target online store, and determine the target customer service reply according to the material content and the current conversation flow;

[0011] Push the target customer service reply to the user.

[0012] On the other hand, a logistics transportation management device provided to meet one of the purposes of the present application includes a first matching module, a second matching module, a third matching module, and a reply pushing module. Among them, the first matching module is used to respond to the message event triggered by the user in the human-machine conversation in the target online store, obtain the current conversation flow of the human-machine conversation, and determine whether there is a sample conversation flow that forms a first matching relationship with the current conversation flow from the preset store conversation database of the target online store and the preset general conversation database. When there is, recall the sample customer service message that replies to the sample conversation flow as the target customer service reply; the second matching module is used to determine whether there is a sample conversation flow that forms a second matching relationship with the current conversation flow from the general conversation database when there is no sample conversation flow that forms a first matching relationship with the current conversation flow. When there is, recall the sample customer service message that replies to the sample conversation flow, and determine the target customer service reply according to the sample customer service message and the current conversation flow; the third matching module is used to recall the material content that forms a third matching relationship with the current conversation flow in the preset store database of the target online store when there is no sample conversation flow that forms a second matching relationship with the current conversation flow, and determine the target customer service reply according to the material content and the current conversation flow; the reply pushing module is used to push the target customer service reply to the user.

[0013] On the other hand, a computer device provided to meet one of the purposes of the present application includes a central processing unit and a memory. The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the store customer service conversation method described in the present application.

[0014] On the other hand, a computer program product provided to meet another purpose of the present application includes computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the method described in any embodiment of the present application are implemented.

[0015] The technical solution of the present application has many advantages, including but not limited to the following aspects:

[0016] First, in this application, by retrieving from the store conversation library and the general conversation library of the target online store, we preferentially search for sample conversation flows that highly match the current conversation flow, so as to provide customer service responses that are most suitable for the specific store scenario. If an ideal match cannot be found, we turn to the broader general conversation library to search for the next-level matching sample conversation flows, ensuring that even in the absence of a direct answer, relevant customer service responses can be generated.

[0017] Furthermore, if the general conversation library also fails to provide a sufficient match, we will utilize the material content in the store database of the target online store that matches the current conversation flow to generate a customer service response related to the current conversation flow.

[0018] Finally, through this multi-level matching and response determination mechanism, on the one hand, it not only improves the accuracy of the answers but also ensures a high answer rate, thus significantly enhancing the user satisfaction and the service quality of the store. On the other hand, it can ensure that users' questions are answered promptly and appropriately. Whether it is a consultation on common high-frequency questions or relatively rare long-tail questions, satisfactory solutions can be provided to customers, enhancing the user experience and also providing strong support for the operation of the online store, taking into account both the efficiency and effectiveness of customer service. Description of the Drawings

[0019] The above and / or additional aspects and advantages of this application will become apparent and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0020] Figure 1 is the network architecture of the exemplary e-commerce platform of this application;

[0021] Figure 2 is the flowchart of the typical embodiment of the store customer service conversation method of this application;

[0022] Figure 3 is the flowchart of the process of constructing the general conversation library in the embodiment of this application;

[0023] Figure 4 is the flowchart of the process of recalling the material content that forms the third matching relationship with the current conversation flow in the embodiment of this application;

[0024] Figure 5 is the flowchart of the process of constructing the store conversation library in the embodiment of this application;

[0025] Figure 6 is the flowchart of the process of correcting the sample conversation flow in the sample pair in the embodiment of this application;

[0026] Figure 7 is the flowchart of the process of confirming whether the historical customer service message is valid in the embodiment of this application;

[0027] Figure 8 It is a schematic flowchart for determining whether there is an error in the historical user message in the embodiments of the present application;

[0028] Figure 9 It is a principle block diagram of the store customer service conversation device of the present application;

[0029] Figure 10 It is a schematic structural diagram of a computer device adopted by the present application. Detailed implementation manners

[0030] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be construed as a limitation to the present application.

[0031] Those skilled in the art of the present technology can understand that unless specifically stated, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application means the presence of the described 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 their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.

[0032] Those skilled in the art of the present technology can understand that unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.

[0033] As Figure 1 shown in the network architecture, the e-commerce platform 82 is deployed in the Internet to provide corresponding services to its users. Similarly, the devices 80 of the merchant users and the devices 81 of the consumer users of the e-commerce platform 82 are also connected to the Internet to use the services provided by the e-commerce platform.

[0034] Exemplary e-commerce platform 82 provides a supply-demand matching of products and / or services to the general public by leveraging the Internet infrastructure. In e-commerce platform 82, products and / or services are provided as commodity information. For the sake of simplicity in description, in this application, concepts such as commodities and products are used to refer to the products and / or services in e-commerce platform 82, which can specifically be physical products, digital products, tickets, service subscriptions, other offline-performed services, etc.

[0035] Entities in the real world can access e-commerce platform 82 in the identity of users and use various online services provided by e-commerce platform 82 to achieve the purpose of participating in the business activities realized by e-commerce platform 82. These entities can be natural persons, legal persons, social organizations, etc. Corresponding to the two types of entities, merchants and consumers, in business activities, there are two major categories of users in e-commerce platform 82, namely merchant users and consumer users. All entities in the product circulation chain in business activities, including manufacturers, sellers, retailers, logistics providers, etc., can use online services in e-commerce platform 82 in the identity of merchant users, while consumers in business activities, including actual or potential consumers, can use online services in e-commerce platform 82 in their corresponding identity of consumer users. In actual business activities, the same entity can act both in the identity of a merchant user and in the identity of a consumer user, and this should be understood flexibly.

[0036] The infrastructure for deploying e-commerce platform 82 mainly includes a back-end architecture and front-end devices. The back-end architecture runs various online services through a service cluster, including middleware or front-end services for the platform side, services for consumers, services for merchants, etc., to enrich and improve its service functions; the front-end devices mainly cover the terminal devices used by users to access e-commerce platform 82 as clients, including but not limited to various mobile terminals, personal computers, point-of-sale devices, etc. By way of example, a merchant user can use their terminal device 80 to enter commodity information for their online store or generate their commodity information using the interfaces opened by the e-commerce platform; a consumer user can access the web page of the online store realized by e-commerce platform 82 through their terminal device 81, trigger the shopping process by the shopping buttons provided on the web page, and call various online services provided by e-commerce platform 82 during the shopping process, thereby achieving the purpose of placing a shopping order.

[0037] In some embodiments, the e-commerce platform 82 may be implemented by a processing facility including a processor and a memory. The processing facility stores a set of instructions that, when executed, cause the e-commerce platform 82 to perform the e-commerce and support functions involved in this application. The processing facility may be part of a server, a client, a network infrastructure, a mobile computing platform, a cloud computing platform, a fixed computing platform, or other computing platforms, and provides the electronic components of the e-commerce platform 82, merchant devices, payment gateways, application developers, marketing channels, shipping providers, customer devices, point-of-sale devices, etc.

[0038] The e-commerce platform 82 may 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), managed 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 may be implemented to be suitable for operating on various platforms and operating systems. For example, for an online store, its administrator user enjoys the same or similar functions in various embodiments such as iOS, Android, HomonyOS, or the web.

[0039] The e-commerce platform 82 may implement corresponding independent sites for each merchant to run their corresponding online stores, and provide corresponding business management engine instances for the merchants to establish, maintain, and run one or more online stores in one or more independent sites. The business management engine instance can be used for content management, task automation, and data management of one or more online stores, and can configure various specific business processes of the online store through interfaces or built-in components, etc., to support the realization of business activities. The independent site is the infrastructure of the e-commerce platform 82 with cross-border service functions. Merchants can relatively centrally and independently maintain their online stores based on the independent site. The independent site usually has a domain name and storage space dedicated to the merchant, and different independent sites are relatively independent. The e-commerce platform 82 can provide standardized or personalized technical support for a large number of independent sites, enabling merchant users to customize their own suitable business management engine instances and use this business management engine instance to maintain one or more online stores they own.

[0040] An online store can implement back-end configuration and maintenance by allowing merchant users to log in to their business management engine instances as administrators. With the support of various online services provided by the infrastructure of the e-commerce platform 82, merchant users can, in their administrator capacity, configure various functions in their online stores, view various data, etc. For example, merchant users can manage all aspects of their online stores, such as viewing recent activities in the online store, updating the online store product catalog, managing orders, recent access activities, total order activities, etc.; merchant users 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 for active sales and marketing channels, etc.

[0041] The e-commerce platform 82 can provide communication facilities and associated merchant interfaces for providing electronic communication and marketing. For example, it can use an electronic message aggregation facility to collect and analyze communication interactions among merchants, consumers, merchant devices, customer devices, point-of-sale devices, etc., aggregate and analyze the communication, such as for increasing the potential for product sales. For example, a consumer may have a question related to a product, which may generate a conversation between the consumer and the merchant (or an automated processor-based agent representing the merchant), where the communication facility is responsible for the interaction and provides the merchant with an analysis on how to increase the probability of a sale.

[0042] In some embodiments, application programs suitable for installation on terminal devices can be provided to serve the access needs of different users, so that various users can access the e-commerce platform 82 in the terminal device by running the application programs, such as the merchant back-end module of the online store in the e-commerce platform 82. In the process of realizing business activities through these functions, the e-commerce platform 82 can implement various functions related to the realization of business activities as middleware or online services and open corresponding interfaces, and then implant a toolkit corresponding to the interface access function into the application program to achieve 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 programs for calling through an API. The online services and application programs use the corresponding functions by remotely calling the corresponding API.

[0043] With the support of the 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 implement the compliant use of business processes to ensure that the order is suitable for fulfillment before actual fulfillment. Sometimes the order may be fraudulent and needs to be verified (such as ID checks). There is a payment method that requires the merchant to wait to ensure receipt of funds, which can help prevent such risks, and so on. Order risks may be generated by fraud detection tools submitted by third parties through order risk APIs, etc. Before fulfillment, the merchant may need to obtain payment information or wait to receive payment information in order to mark the order as paid, and only then can the merchant prepare to deliver the product. All such situations can be subject to corresponding reviews. The review process can be implemented by the fulfillment component. The merchant can use the fulfillment component to review, adjust work, and trigger relevant fulfillment services, such as: manual fulfillment service, used when the merchant selects and packages the product in a box, purchases a shipping label, and enters its tracking number, or simply marks the item as fulfilled; custom fulfillment service, which can be defined to send email notifications; API fulfillment service, which can trigger a third-party application to create a fulfillment record in the third party; legacy fulfillment service, which can trigger a custom API call from the business management engine to the third party; gift card fulfillment service, which can provide a generated number and activate the gift card. The merchant can use the order printer application to print the shipping order. The fulfillment process can be executed when the item is packaged in a box and ready for shipping, tracking, delivery, and the consumer receives verification, etc.

[0044] It can be seen that the services provided by the e-commerce platform are exactly centered around the product. The corresponding product data is the basic data of the e-commerce platform. By providing product information through the product data, the mining and utilization of the product data are the basis for realizing various technical services, including providing basic services for the operation of the data processing system using the user transaction data and product data in the product data of the e-commerce platform. Therefore, the data processing system can run on any one or more servers in the cluster of the e-commerce platform to utilize various product data provided by the e-commerce platform to achieve various functions.

[0045] A store customer service session method of the present application can be programmed as a computer program product and deployed to run in a client or a server. For example, in the exemplary application scenario of the present application, it can be deployed and implemented in the server of the e-commerce customer service platform. Thereby, through accessing the interface opened after the computer program product runs, human-computer interaction can be performed with the process of the computer program product through a graphical user interface to execute this method.

[0046] Please refer to Figure 2 , in a typical embodiment of the store customer service conversation method of this application, it includes the following steps:

[0047] Step S1100: Respond to the message event triggered by the user in the human-machine conversation in the target online store, obtain the current conversation flow of the human-machine conversation, and determine whether there is a sample conversation flow in the store conversation library of the preset target online store and the preset general conversation library that forms a first matching relationship with the current conversation flow. When there is one, recall the sample customer service message that answers the sample conversation flow as the target customer service reply;

[0048] The target online store can be any single online store. The customer service system of the target online store can be created and maintained by its merchant. The user is usually a buyer who communicates with the customer service of the target online store. The human-machine conversation refers to the conversation between the user and the customer service system of the target online store.

[0049] It can be understood that after the customer service system of the target online store is created by its merchant, it can provide a corresponding entrance for the user to access, and then conduct a human-machine conversation with the user through the customer service system to achieve communication between the customer service system and the user. The entrance can be flexibly set by those skilled in the art. For example, it can be set at a prominent position on the store display page, product details page, order details page, shopping cart, settlement page, help center, etc.

[0050] The user can conduct a human-machine conversation with the customer service system of the target online store through the entrance, thereby triggering the message event. During the human-machine conversation, the user sends a user message.

[0051] The server responds to the message event and retrieves the current conversation flow composed of all the messages generated in chronological order corresponding to the current human-machine conversation. The current conversation flow includes at least one user message, and the message at the end of the chronological order in the current conversation flow is a user message, indicating that the user is waiting for a reply from the customer service system. The chronological order refers to the order of the timestamps of the sent messages from the earliest to the latest.

[0052] The store dialogue library of the target online store includes multiple sample pairs. Each sample pair includes a sample dialogue flow and a sample customer service message that responds to the sample dialogue flow. For each sample pair, the sample dialogue flow and the sample customer service message in the sample pair both originate from a corresponding single original dialogue flow. The original dialogue flow is composed of all the messages arranged in chronological order generated by a complete single session between a human customer service of the past target online store and a user. Among all the messages in the original dialogue flow, multiple messages that are sent continuously in time sequence by the same human customer service or by the same user need to be spliced into a single message. For pre-constructing the store dialogue library corresponding to each online store, taking the target online store as an example, in one embodiment, all the original dialogue flows of the target online store are obtained. For each original dialogue flow, the last message in time sequence among all the messages of the original dialogue flow is a message sent by the user and includes at least one historical user message. For each historical user message, if there are other messages, including messages sent by the user and messages replied by the human customer service, whose time stamps are before the time stamp of sending this historical user message, then this historical user message and all other messages before it are constructed into a historical dialogue flow; if there are no other messages whose time stamps are before the time stamp of sending this historical user message, then this historical user message is separately constructed into a historical dialogue flow. For each historical dialogue flow, there is a historical customer service message that responds according to this historical dialogue flow. Further, a preset Q&A evaluation model is adopted for each historical dialogue flow and its historical customer service message. Taking a single historical dialogue flow and its historical customer service message as an example, using the preset Q&A evaluation model, by the dialogue representation branch in the Q&A evaluation model, first, the embedding vector of this historical dialogue flow is determined, and then this embedding vector is encoded to extract the corresponding deep semantic information, and this deep semantic information is mapped to the first semantic space to obtain the corresponding vectorized representation as the historical dialogue semantic vector of this historical dialogue flow. At the same time, by the response representation branch in the Q&A evaluation model, first, the embedding vector of this historical customer service message is determined, and then this embedding vector is encoded to extract the corresponding deep semantic information, and this deep semantic information is mapped to the first semantic space to obtain the corresponding vectorized representation as the customer service semantic vector of this historical customer service message. Then, the vector similarity between this historical dialogue semantic vector and this customer service semantic vector is determined by the positive matching layer in the Q&A evaluation model as the positive score obtained by this historical customer service message in responding to this historical dialogue flow. Thus, the positive scores between each historical dialogue flow and its historical customer service message can be obtained. Furthermore, all the historical dialogue flows and their historical customer service messages whose positive scores exceed the preset threshold are selected. These historical dialogue flows are respectively used as single said sample dialogue flows, the historical customer service messages corresponding to these sample dialogue flows are used as the sample customer service messages of this sample dialogue flow, each sample dialogue flow and its sample customer service message form a single sample pair, and all the sample pairs are added to the store dialogue library of the target online store.Those skilled in the art can flexibly set the preset threshold according to the disclosure herein, such as 0.9.

[0053] The Q&A evaluation model is pre-trained to a convergent state, and learns the ability to determine the positive score obtained by the customer service message answering the dialogue flow according to the semantic representation of the dialogue flow and the semantic representation of the customer service message answering the dialogue flow. The Q&A evaluation model includes a dialogue representation branch, a response representation branch, and a positive matching layer. The dialogue representation branch and the response representation branch are the same in model selection, and can be any one or any combination of MLP, CNN, RNN, Self-attention, Transformer encoder, and BERT. Those skilled in the art can set them as needed. Moreover, the dialogue representation branch and the response representation branch share parameters, and their representation results are mapped to the same semantic space. The positive matching layer can be implemented by any one of dot product, cosine, Gaussian distance, MLP, and similarity matrix. Those skilled in the art can set them as needed.

[0054] Specifically for pre-training the Q&A evaluation model, a plurality of original dialogue flows from different online stores are collected in advance. For each original dialogue flow, at least one corresponding historical dialogue flow and the historical customer service message answering the historical dialogue flow are constructed. Thus, a plurality of historical dialogue flows and their historical customer service messages are obtained. Each historical dialogue flow and its historical customer service message form a single training sample. Manually label the supervision label of the training sample according to whether the historical customer service message in each training sample effectively answers the historical dialogue flow. By way of example, if the historical customer service message in the training sample effectively answers the historical dialogue flow, label the supervision label of the training sample as 1; if the historical customer service message in the training sample ineffectively answers the historical dialogue flow, label the supervision label of the training sample as 0. For the historical customer service message to effectively answer the historical dialogue flow, it means that the user can accurately answer the questions raised by the user in the historical dialogue flow by reading the historical customer service message; for the historical customer service message to ineffectively answer the historical dialogue flow, it means that the user cannot accurately answer the questions raised by the user in the historical dialogue flow by reading the historical customer service message. Aggregate all the training samples and their supervision labels and add them to the training set.

[0055] Obtain a single training sample in the training set and its supervision label. By the dialogue representation branch in the Q&A evaluation model, first determine the embedding vector of the historical dialogue flow in the training sample, then encode the embedding vector to extract the corresponding deep semantic information, map the deep semantic information to the first semantic space, and obtain the corresponding vectorized representation as the historical dialogue semantic vector of the historical dialogue flow. At the same time, by the response representation branch in the Q&A evaluation model, first determine the embedding vector of the historical customer service message in the training sample, then encode the embedding vector to extract the corresponding deep semantic information, map the deep semantic information to the first semantic space, and obtain the corresponding vectorized representation as the customer service semantic vector of the historical customer service message. Then, the positive matching layer in the Q&A evaluation model determines the vector similarity between the historical dialogue semantic vector and the customer service semantic vector as the predicted positive score for the historical customer service message to respond to the historical dialogue flow. Use the cross-entropy loss function to calculate the loss value corresponding to the cross-entropy loss of the predicted positive score based on the supervision label of the training sample. When the loss value reaches the preset threshold, it indicates that the Q&A evaluation model has been trained to the convergence state, and thus the training of the Q&A evaluation model can be terminated; when the loss value does not reach the preset threshold, it indicates that the Q&A evaluation model has not converged, so perform gradient update on the Q&A evaluation model according to the loss value, usually backpropagate to correct the weight parameters of each corresponding link in the Q&A evaluation model to make the Q&A evaluation model further approach convergence. Then, continue to call other training samples in the training set and their supervision labels to perform iterative training on the Q&A evaluation model until the Q&A evaluation model is trained to the convergence state. The preset threshold can be set by those skilled in the art according to the disclosure here as needed.

[0056] The general dialogue library includes multiple typical sample pairs. Each typical sample pair includes a sample dialogue flow and a sample customer service message that responds to the sample dialogue flow. For pre-building the general dialogue library, specifically, retrieve the store dialogue libraries of multiple online stores in advance. For each store dialogue library, use a preset clustering algorithm to cluster the sample pairs in all store dialogue libraries, determine the cluster to which each sample pair belongs, and obtain the corresponding multiple clusters. In one embodiment, randomly select a sample pair belonging to the cluster from each cluster as the typical sample pair, and then form the general dialogue library with all the typical sample pairs. The clustering algorithm can be any one of the DBSCAN algorithm, OPTICS algorithm, MeanShift algorithm, Affinity Propagation algorithm, K-means algorithm, GMM (Gaussian mixture model) algorithm, SOM (self-organizing map) algorithm, etc., and those skilled in the art can choose one to implement as needed.

[0057] Obtain the sample dialogue semantic vectors of the store dialogue library of the target online store and each sample dialogue flow in the general dialogue library respectively. For pre-constructing the sample semantic vectors of each sample dialogue flow respectively, taking a single sample dialogue flow as an example, by pre-using the dialogue representation branch in the Q&A evaluation model, first determine the embedding vector of this sample dialogue flow, and then encode this embedding vector to extract the corresponding deep semantic information, and map this deep semantic information to the first semantic space to obtain the corresponding vectorized representation as the sample dialogue semantic vector of this sample dialogue flow.

[0058] Use the dialogue representation branch in the Q&A evaluation model. First, determine the embedding vector of the current dialogue flow, and then encode this embedding vector to extract the corresponding deep semantic information, and map this deep semantic information to the first semantic space to obtain the corresponding vectorized representation as the current dialogue semantic vector of this current dialogue flow.

[0059] Furthermore, use a preset vector similarity algorithm to determine the vector similarity between each sample dialogue semantic vector and the current dialogue semantic vector respectively, and correspondingly use it as the relevant score between the corresponding sample dialogue flow and the current dialogue flow. Thus, obtain the relevant scores between each sample dialogue flow and the current dialogue flow. Screen out the highest relevant score from all relevant scores. When this relevant score exceeds the first relevant threshold, confirm that the corresponding sample dialogue flow and the current dialogue flow form a first matching relationship, that is, it means that the semantics of this sample dialogue flow and the current dialogue flow are highly similar, and recall the sample customer service message in the sample pair containing this sample dialogue flow from the corresponding dialogue library as the target customer service reply; when this relevant score is less than or equal to the first relevant threshold, confirm that there is no sample dialogue flow that forms a first matching relationship with the current dialogue flow. Those skilled in the art can set the first relevant threshold accordingly according to the disclosure here, for example, 0.85.

[0060] Step S1200: When there is no sample dialogue flow that forms a first matching relationship with the current dialogue flow, determine from the general dialogue library whether there is a sample dialogue flow that forms a second matching relationship with the current dialogue flow. When there is, recall the sample customer service message that answers this sample dialogue flow, and determine the target customer service reply according to this sample customer service message and the current dialogue flow;

[0061] According to the correlation scores between each sample dialogue flow in the general dialogue library and the current dialogue flow, when there are correlation scores exceeding the second correlation threshold, confirm that each sample dialogue flow corresponding to such correlation scores respectively forms a second matching relationship with the current dialogue flow. Then, for each of these sample dialogue flows, recall the sample customer service messages in the sample pairs containing the sample dialogue flow from the general dialogue library. Thus, the sample customer service messages corresponding to each of these sample dialogue flows can be recalled. Further, use the first prompt template, which includes a task description, the dialogue context to be embedded, and the known information to be embedded. Those skilled in the art can flexibly set the first prompt template with reference to the following disclosure. As an exemplary example of the first prompt template: The task description in the first prompt template: "Based on the following known information, answer the following dialogue context concisely and professionally, and do not add fabricated content in the answer." The dialogue context to be embedded in the first prompt template: "Dialogue context: ${d i a l ogue above}$", and the known information to be embedded: "Known information: ${knownmessage}$". Embed the current dialogue flow into the dialogue context to be embedded in the first prompt template, and embed all the recalled sample customer service messages into the known information to be embedded in the first prompt template, thereby obtaining the first prompt text. Input the first prompt text into a preset large language model to obtain the target customer service reply generated by the large language model;

[0062] When there are no correlation scores exceeding the second correlation threshold, confirm that there are no sample dialogue flows that form a second matching relationship with the current dialogue flow. The second correlation threshold is lower than the first correlation threshold, and those skilled in the art can set it accordingly according to the disclosure here, for example, 0.7.

[0063] The large language model is applicable to text processing in the NLP field. It is pre-trained with an extremely large corpus until convergence to acquire the ability to generate human language, and has a certain degree of accurate text semantic understanding ability and logical reasoning ability. The selection of the large language model includes OPT, Ch i nch i l l a, PaLM, LLaMA, A l paca, Vicuna, GPT3, GPT3.5, GPT4, etc.

[0064] Step S1300, when there are no sample dialogue flows that form a second matching relationship with the current dialogue flow, recall the material content that forms a third matching relationship with the current dialogue flow in the store database of the preset target online store, and determine the target customer service reply based on the material content and the current dialogue flow;

[0065] The store database of the target online store includes multiple material contents. For pre-constructing the store database corresponding to each online store, taking the target online store as an example, at least one data document of the target online store is obtained. The data document is usually pre-edited by the merchant of the target online store, and the content is usually any one or more of product introductions, logistics rules, after-sales rules, etc. in the target online store. For each data document, each paragraph in it is split. Specifically, when the data document is a structured document containing at least one title, each title in the data document is split. For each title, the title is concatenated with all the text content in the data document belonging to that title to form a single paragraph, so as to obtain each paragraph in the data document; when the data document is an unstructured document, for each sentence in the data document, the sentence and the sentence immediately following it are combined to form a single sentence pair, so as to obtain all the sentence pairs. An open-source BERT model pre-trained to the convergence state is obtained. It has been pre-trained through the NSP (Next Sentence Prediction) task. After being pre-trained to the convergence state, it has learned the ability to determine the probability of semantic connection between the two sentences in the sentence pair according to the input sentence pair. Each sentence pair is respectively input into the BERT model, and correspondingly, the BERT model forward infers the probability of semantic connection between the two sentences in each sentence pair. The middle of the two sentences in each sentence pair with the probability lower than the preset threshold is determined as the splitting position in the data document, and the document is split from each splitting position, so as to correspondingly obtain each paragraph in the data document. Thus, each paragraph in each data document can be obtained. All paragraphs are used as single material contents respectively, and all the material contents are aggregated and added to the store database of the target online store.

[0066] Obtain the material semantic vector of each material content in the store database of the target online store respectively. For pre-constructing the material semantic vector of each material content respectively, taking a single material content as an example, by first using the material representation branch in the preset dialogue data matching model, the embedding vector of the material content is first determined, and then the embedding vector is encoded to extract the corresponding deep semantic information, and the deep semantic information is mapped to the second semantic space to obtain the corresponding vectorized representation as the material semantic vector of the material content.

[0067] Use the dialogue representation branch in the dialogue data matching model. First, determine the embedding vector of the current dialogue flow, then encode the embedding vector to extract the corresponding deep semantic information, and map the deep semantic information to the second semantic space to obtain the corresponding vectorized representation as the current dialogue semantic vector of the current dialogue flow.

[0068] The vector similarity between the current dialogue semantic vector and each material semantic vector is determined by the relevant matching layer in the dialogue material matching model, and correspondingly used as the relevant score between the current dialogue flow and each material content. When there is a relevant score exceeding the third relevant threshold among all relevant scores, it is confirmed that each material content corresponding to such a relevant score forms a third matching relationship with the current dialogue flow. Then, for each of these material contents, the material content is recalled from the store database. Thus, these material contents can be recalled. Further, the second prompt template is used. The second prompt template includes a task description, the dialogue above to be embedded, and the known information to be embedded. Those skilled in the art can flexibly set the second prompt template with reference to the following disclosure. An exemplary second prompt template is as follows: The task description in the second prompt template: "According to the following known information, answer the following dialogue above concisely and professionally, and do not allow fabricated content in the answer." The dialogue above to be embedded in the second prompt template: "Dialogue above: ${dialogue above}$", and the known information to be embedded: "Known information: ${known message}$". The current dialogue flow is embedded into the dialogue above to be embedded in the second prompt template, and all the recalled material contents are embedded into the known information to be embedded in the second prompt template, so as to obtain the second prompt text. The second prompt text is input into the large language model to obtain the target customer service reply generated by the large language model;

[0069] When there is no relevant score exceeding the third relevant threshold among all relevant scores, it is determined that there is no material content that forms a third matching relationship with the current dialogue flow. The artificial customer service of the target online store is enabled, and the current dialogue flow is sent to the artificial customer service to obtain the message determined by the artificial customer service to answer it as the target customer service reply. The artificial customer service is usually served by the merchant of the target online store and provides services by communicating with the customers of the target online store. Those skilled in the art can preset the third relevant threshold accordingly according to the disclosure here, for example, 0.85.

[0070] The above-mentioned dialogue data matching model is pre-trained to a convergent state, and learns the ability to determine the correlation score between the dialogue flow and the material content based on the semantic representations of the dialogue flow and the material content. The dialogue data matching model includes a dialogue representation branch, a material representation branch, and a correlation matching layer. The dialogue representation branch and the material representation branch are the same in model selection and can be any one or any combination of MLP, CNN, RNN, Self-attention, Transformer encoder, and BERT. Those skilled in the art can set them as needed. Moreover, the dialogue representation branch and the material representation branch share parameters, and their representation results are mapped to the same semantic space. The correlation matching layer can be implemented by any one of dot product, cosine, Gaussian distance, MLP, and similarity matrix. Those skilled in the art can set them as needed.

[0071] The pre-training of the dialogue data matching model will be further revealed in subsequent embodiments of this part, and this step will be put aside for the time being.

[0072] Step S1400: Push the target customer service reply to the user.

[0073] During the current human-computer conversation process, after the current dialogue flow, continue to communicate with the user in a dialogue manner, and push the target customer service reply that answers the current dialogue flow to the user.

[0074] According to the typical embodiments of the present application, it can be known that the technical solution of the present application has many advantages, including but not limited to the following aspects:

[0075] First of all, in the present application, by retrieving from the store dialogue library and the general dialogue library of the target online store, samples of dialogue flows that highly match the current dialogue flow are preferentially searched for, so as to provide the most suitable customer service reply for a specific store scenario. If an ideal match cannot be found, the search will turn to the more extensive general dialogue library to find the next-level matching sample dialogue flow, ensuring that even in the absence of a direct answer, relevant customer service replies can be generated.

[0076] Furthermore, if the general dialogue library also fails to provide a sufficient match, the material content in the store database of the target online store that matches the current dialogue flow will be used to generate a customer service reply related to the current dialogue flow.

[0077] Finally, through this multi-level matching and response determination mechanism, on the one hand, it not only improves the accuracy of answers but also ensures a high answer rate, thus significantly enhancing user satisfaction and the service quality of the store. On the other hand, it can ensure that users' questions are answered promptly and appropriately. Whether it is a consultation on common high-frequency questions or relatively rare long-tail questions, it can provide solutions that satisfy customers, improve the user experience, and also provide strong support for the operation of the online store, taking into account both the efficiency and effectiveness of customer service.

[0078] Please refer to Figure 3 , in a further embodiment, before step S1100, which is to respond to a message event triggered by a user in a human-machine conversation in the target online store and obtain the current conversation flow of the human-machine conversation, the following steps are included:

[0079] Step S1110: Obtain the preset store conversation libraries of multiple online stores. The store conversation library includes multiple sample pairs, and each sample pair includes a sample conversation flow and a sample customer service message for answering the sample conversation flow;

[0080] For pre-constructing the store conversation library of each online store, the specific implementation can refer to step S1100 or the corresponding disclosure of subsequent partial embodiments.

[0081] Step S1120: Cluster the sample pairs in all store conversation libraries to determine multiple clusters;

[0082] Use a preset clustering algorithm to cluster the sample pairs in all store conversation libraries to determine the cluster to which each sample pair belongs and obtain the corresponding multiple clusters. The clustering algorithm can be any one of the DBSCAN algorithm, OPTICS algorithm, MeanShift algorithm, Affinity Propagation algorithm, K-means algorithm, GMM (Gaussian mixture model) algorithm, SOM (self-organizing map) algorithm, etc. Those skilled in the art can choose one to implement according to their needs.

[0083] In one embodiment, the K-Means algorithm is used to implement the clustering algorithm. All sample pairs form the input data set of K-Means. The center points of K clusters are randomly determined (not necessarily sample pairs in the data set), and each sample pair in the data set is assigned to a cluster. Specifically, taking a single sample pair as an example, the corresponding distance between the sample pair and each center point is calculated, and the sample pair is assigned to the cluster corresponding to the center point with the closest distance. Accordingly, after all sample pairs are assigned to their corresponding clusters, the center point of each cluster is updated to the average value of all sample pairs in the cluster. The above process is repeated until all sample pairs in the data set are closest to their corresponding center points, and the clustering is completed. Further, the elbow method can be used to determine the value of K, making the number of clusters in the clustering more reliable, thereby ensuring the accuracy of the clustering.

[0084] Step S1130: Determine typical sample pairs from each cluster and add all typical sample pairs to the general dialogue library.

[0085] Further, for each cluster, from all sample pairs belonging to the cluster, a single sample pair that is closest to the center point of the cluster is selected. It is not difficult to understand that this sample pair is relatively the most representative, so this sample pair is used as the typical sample pair of the cluster. Thus, the typical sample pairs in each cluster can be obtained, and then all typical sample pairs are collected and added to the general dialogue library.

[0086] In this embodiment, by clustering all sample pairs in the store dialogue libraries from multiple online stores, the cluster to which each sample pair belongs is determined, and then the typical sample pairs in each cluster are determined. All typical sample pairs are collected and added to the general dialogue library. It can be seen that the most representative typical sample pairs can be quickly and accurately determined.

[0087] Please refer to Figure 4 , in a further embodiment, step S1300: Recall the material content that forms a third matching relationship with the current dialogue flow in the store database of a preset target online store, including the following steps:

[0088] Step S1310: Use a preset dialogue data matching model to determine the material semantic representation corresponding to each material content in the store database of the preset target online store, and the dialogue semantic representation of the current dialogue flow;

[0089] Obtain the material semantic vectors of each material content in the store database of the target online store respectively. For pre-constructing the material semantic vectors of each material content, taking a single material content as an example, by pre-using the material representation branch in the dialogue data matching model, first determine the embedding vector of this material content, and then encode this embedding vector to extract the corresponding deep semantic information, map this deep semantic information to the second semantic space, and obtain the corresponding vectorized representation as the material semantic vector of this material content, that is, the material semantic representation.

[0090] Adopt the dialogue representation branch in the dialogue data matching model. First, determine the embedding vector of the current dialogue flow, and then encode this embedding vector to extract the corresponding deep semantic information, map this deep semantic information to the first semantic space, and obtain the corresponding vectorized representation as the current dialogue semantic vector of the current dialogue flow, that is, the dialogue semantic representation.

[0091] The dialogue data matching model is pre-trained to a convergent state, and learns the ability to determine the correlation score between the dialogue flow and the material content according to the semantic representation of the dialogue flow and the semantic representation of the material content. The dialogue data matching model includes a dialogue representation branch, a material representation branch, and a correlation matching layer. The dialogue representation branch and the material representation branch are the same in model selection, and can be any one or any combination of MLP, CNN, RNN, Self-attention, Transformer encoder, BERT, etc., which can be set by those skilled in the art as needed. Moreover, the dialogue representation branch and the material representation branch share parameters, and the representation results of both are mapped to the same semantic space. The correlation matching layer can be implemented by any one of dot product, cosine, Gaussian distance, MLP, similarity matrix, etc., which can be set by those skilled in the art as needed.

[0092] For pre-training the dialogue data matching model, specifically, a part of the material content is selected from the store databases of each online store. The specific number of the selected material content can be flexibly set by those skilled in the art. All the selected material content is aggregated and added to the material content set. In addition, a part of the sample dialogue flows is selected from the store dialogue databases of each online store. The specific number of the selected sample dialogue flows can be flexibly set by those skilled in the art. All the selected sample dialogue flows are aggregated and added to the sample dialogue flow set. Each sample dialogue flow in the sample dialogue flow set is respectively combined with each material content in the material content set to form a single training sample. It is not difficult to understand that the number of training samples can be obtained by multiplying the total number of sample dialogue flows in the sample dialogue flow set by the total number of material content in the material content set. Manually label the supervision label of each training sample according to whether the material content in each training sample can be used to accurately answer the questions raised by the user in the sample dialogue flow. By way of example, if the material content in the training sample can be used to accurately answer the questions raised by the user in the sample dialogue flow, label the supervision label of this training sample as 1; if the material content in the training sample cannot be used to accurately answer the questions raised by the user in the sample dialogue flow, label the supervision label of this training sample as 0. Aggregate all the training samples and their supervision labels to form a training set.

[0093] Obtain a single training sample in the training set and its supervision label. For the dialogue representation branch in the dialogue data matching model, first determine the embedding vector of the sample dialogue flow in the training sample, then encode the embedding vector to extract the corresponding deep semantic information, map the deep semantic information to the second semantic space, and obtain the corresponding vectorized representation as the sample dialogue semantic vector of the sample dialogue flow. At the same time, for the material representation branch in the dialogue data matching model, first determine the embedding vector of the material content in the training sample, then encode the embedding vector to extract the corresponding deep semantic information, map the deep semantic information to the second semantic space, and obtain the corresponding vectorized representation as the material semantic vector of the material content. Then, the relevant matching layer in the dialogue data matching model determines the vector similarity between the sample dialogue semantic vector and the material semantic vector as the prediction correlation score between the sample dialogue flow and the material content. Use the cross-entropy loss function to calculate the loss value corresponding to the cross-entropy loss of the prediction correlation score based on the supervision label of the training sample. When the loss value reaches the preset threshold, it indicates that the dialogue data matching model has been trained to the convergence state, and thus the training of the dialogue data matching model can be terminated; when the loss value does not reach the preset threshold, it indicates that the dialogue data matching model has not converged. Then, perform gradient update on the dialogue data matching model according to the loss value, usually backpropagate to correct the weight parameters of each corresponding link in the dialogue data matching model to make the dialogue data matching model closer to convergence. Then, continue to call other training samples in the training set and their supervision labels to perform iterative training on the dialogue data matching model until the dialogue data matching model is trained to the convergence state. The preset threshold can be set by those skilled in the art according to the disclosure here as needed.

[0094] Step S1320: Respectively use the similarities between the dialogue semantic representations and each material semantic representation as the correlation scores between the current dialogue flow and each material content.

[0095] Furthermore, the relevant matching layer in the dialogue data matching model determines the vector similarities between the current dialogue semantic vector and each material semantic vector, corresponding to the correlation scores between the corresponding material content and the current dialogue flow. Thus, the correlation scores between each material content and the current dialogue flow are obtained.

[0096] Step S1330: Confirm that the material content whose correlation score meets the preset condition forms a third matching relationship with the current dialogue flow, and recall the material content from the store database.

[0097] When there are relevant scores exceeding the third relevant threshold among all relevant scores, it is confirmed that each material content corresponding to such relevant scores respectively forms a third matching relationship with the current conversation flow. Then, for each of these material contents, the material content is recalled from the store database. Thus, these material contents can be recalled.

[0098] In this embodiment, by using the dialogue data matching model to determine the relevant scores between each material content in the store database of the target online store and the current conversation flow, the material contents whose relevant scores meet the preset conditions can be accurately recalled, and the execution is efficient.

[0099] Please refer to Figure 5 , in a further embodiment, before step S1110, obtaining the preset store conversation libraries of multiple online stores, the following steps are included:

[0100] Step S1111: For each online store, obtain all historical conversation flows of the online store and the historical customer service messages for answering each historical conversation flow;

[0101] Taking a single online store as an example, obtain all the original conversation flows of the online store. For each original conversation flow, the last message in terms of time sequence among all the messages of the original conversation flow is the message sent by the user and includes at least one historical user message. For each historical user message, if there are other messages, including the messages sent by the user and the messages replied by the artificial customer service, before the time stamp of sending the historical user message, then the historical user message and all other messages before it are constructed into a historical conversation flow; if there are no other messages before the time stamp of sending the historical user message, then the historical user message alone is constructed into a historical conversation flow. For each historical conversation flow, there is a historical customer service message for answering according to the historical conversation flow.

[0102] Step S1112: For each historical conversation flow, confirm whether the historical customer service message for answering the historical conversation flow is valid. When the historical customer service message is valid, use the historical conversation flow as a sample conversation flow and the historical customer service message as a sample customer service message, and form a sample pair with the sample conversation flow and the sample customer service message, and add it to the store conversation library of the online store;

[0103] Further, for each historical dialogue flow and its historical customer service messages, the Q&A evaluation model is adopted. Taking a single historical dialogue flow and its historical customer service messages as an example, the Q&A evaluation model is used. In the dialogue representation branch of the Q&A evaluation model, first, the embedding vector of the historical dialogue flow is determined, and then the embedding vector is encoded to extract the corresponding deep semantic information. The deep semantic information is mapped to the first semantic space to obtain the corresponding vector representation as the historical dialogue semantic vector of the historical dialogue flow. At the same time, in the response representation branch of the Q&A evaluation model, first, the embedding vector of the historical customer service message is determined, and then the embedding vector is encoded to extract the corresponding deep semantic information. The deep semantic information is mapped to the first semantic space to obtain the corresponding vector representation as the customer service semantic vector of the historical customer service message. Then, the vector similarity between the historical dialogue semantic vector and the customer service semantic vector is determined by the positive matching layer in the Q&A evaluation model as the positive score obtained when the historical customer service message responds to the historical dialogue flow. Thus, the positive scores between each historical dialogue flow and its historical customer service messages can be obtained. Furthermore, all historical dialogue flows and their historical customer service messages with positive scores exceeding the preset threshold are screened out. Each of these historical dialogue flows is used as a single sample dialogue flow, and the historical customer service messages corresponding to each of these sample dialogue flows are used as the sample customer service messages of the sample dialogue flow. Each sample dialogue flow and its sample customer service message form a single sample pair, and all sample pairs are added to the store dialogue library of the online store. Those skilled in the art can flexibly set the preset threshold according to the disclosure herein, for example, 0.9.

[0104] Step S1113: For each sample pair in the store dialogue library, based on the sample dialogue flow in the sample pair, each historical customer service message therein is determined as the response customer service message. Based on each response customer service message, the dialogue flow that is chronologically prior in the sample dialogue flow is obtained as the dialogue flow to be verified corresponding to the response customer service message. Moreover, the sample customer service message in the sample pair is used as the response customer service message, and the sample dialogue flow is used as the dialogue flow to be verified for the response customer service message.

[0105] Taking a single sample pair as an example, the sample dialogue flow in the sample pair is split. Specifically, each historical customer service message in the sample dialogue flow is split as a single response customer service message. Then, for each response customer service message, all the messages in the sample dialogue flow before the timestamp when the response customer service message is sent are split out, and these messages are constructed as a dialogue flow as the dialogue flow to be verified for the response customer service message. Moreover, the sample customer service message in the sample pair is used as the response customer service message, and the sample dialogue flow is used as the dialogue flow to be verified for the response customer service message.

[0106] Step S1114: For each dialogue flow to be verified, confirm whether the historical user message at the end of the time sequence in the dialogue flow to be verified is incorrect. When the historical user message is incorrect, determine the target dialogue flow from all the dialogue flows to be verified that contain the historical user message, and correct the sample dialogue flow in the sample pair with the target dialogue flow and its corresponding customer service message. The corresponding customer service message of the target dialogue flow effectively responds to the target dialogue flow, and the dialogue content of the target dialogue flow is relatively the least.

[0107] Taking a single dialogue flow to be verified as an example, in one embodiment, verify whether the historical user message at the end of the time sequence in the dialogue flow to be verified is incorrect. Specifically, use a preset language expression model with the dialogue flow to be verified as the input to determine the expression integrity, semantic clarity, literal correctness, and grammar accuracy of the historical user message. Then, add the expression integrity, semantic clarity, literal correctness, and grammar accuracy and divide by four to obtain the target correct score representing the historical user message at the end of the dialogue flow to be verified. When the target correct score exceeds the preset threshold, confirm that the historical user message is incorrect, and determine the target dialogue flow from all the dialogue flows to be verified that contain the historical user message. It can be understood that on the premise that the user sends an incorrect message in the target dialogue flow, in one case, the artificial customer service can still accurately understand the user's needs based on experience and / or strong understanding ability, and then send a message that effectively responds to the dialogue flow; in another case, the artificial customer service first sends a message to the user indicating that it cannot accurately understand the user's needs due to the incorrect message, and then correctly understands the user's needs by receiving the user's corrected message, and then sends a message that effectively responds to the dialogue flow.

[0108] Further, a third prompt template is adopted. The third prompt template includes a task description, a conversation to be embedded, and an incorrect message sent by the user in the conversation to be embedded. Those skilled in the art can flexibly set the third prompt template with reference to the following disclosure. A demonstrative example of the third prompt template is as follows: The task description in the third prompt template: "In the following conversation between a user and an e-commerce artificial customer service, there is an incorrect message sent by the user. Please analyze all the errors in the incorrect message based on all the messages in the conversation, and then, imitate the user knowing that they have said something wrong and restate the incorrect message to make a correction, so as to obtain the restated and corrected message. Note: All errors include but are not limited to grammar errors, misspelled words, missing words, semantic confusion, unclear expression, and incomplete expression." The conversation to be embedded in the third prompt template: "Conversation: ${session}$", and the incorrect message sent by the user in the conversation to be embedded: "Incorrect message sent by the user in the conversation: ${errormessage}$". Mark the sender corresponding to each message in the target dialogue flow, as well as the sender corresponding to the response customer service message of the target dialogue flow, and embed all the messages and their senders into the conversation to be embedded in the third prompt template, and embed the incorrect historical user messages in the target dialogue flow into the incorrect message sent by the user in the conversation to be embedded in the third prompt template, so as to obtain the third prompt text. Input the third prompt text into the large language model to obtain the restated and corrected message generated by the large language model as the rewritten historical user message. The conversation content refers to the number of messages in the corresponding dialogue flow.

[0109] For ease of understanding, a demonstrative example is as follows:

[0110] In the following conversation between a user and an e-commerce artificial customer service, there is an incorrect message sent by the user. Please analyze all the errors in the incorrect message based on all the messages in the conversation, and then, imitate the user knowing that they have said something wrong and restate the incorrect message to make a correction, so as to obtain the restated and corrected message. Note: All errors include but are not limited to grammar errors, misspelled words, missing words, semantic confusion, unclear expression, and incomplete expression.

[0111] Conversation: {User: Hello, I saw this washing machine in your store, but I still have some questions about its performance and usage method.

[0112] Customer service: Hello, I'm glad to serve you! What specific questions do you have about this washing machine?

[0113] User: I want to know its washing capacity and whether it is suitable for washing large items such as sheets and quilts?

[0114] Customer Service: This washing machine has very powerful washing ability. It is equipped with efficient cleaning technology and can thoroughly clean large items of clothing, including sheets and quilts. Moreover, it has a variety of washing modes to choose from, which can meet your different needs.

[0115] User: That's great! I also want to ask about the energy-saving aspect. How about the energy consumption of this washing machine? Will it waste a lot of electricity?

[0116] Customer Service: Our washing machine adopts advanced energy-saving technology, which can effectively reduce energy consumption and save electricity. Compared with traditional washing machines, it has a higher energy efficiency level and can save you a lot of electricity bills.

[0117] Incorrect message sent by the user during the conversation: {That's great! I also want to ask about the energy-saving aspect. How about the energy consumption of this laundry chicken? Will it waste a lot of electricity?}

[0118] The message rewritten and corrected by the large language model according to the third prompt template is {That's great! I also want to know about the energy-saving aspect. How about the energy consumption of this washing machine? Will it waste a lot of electricity?}.

[0119] Therefore, for each dialogue flow to be verified containing incorrect historical user messages, the corresponding target dialogue flow can be determined. Then, based on the target dialogue flow and its corresponding customer service reply message, the corresponding rewritten historical user message can be obtained. Accordingly, the incorrect historical user message in each target dialogue flow and all subsequent messages are identified as the text part to be replaced. The text part to be replaced is associated with the rewritten historical user message obtained from the target dialogue flow and its corresponding customer service reply message. Then, each text part to be replaced in the sample dialogue flow of the sample pair is replaced with its associated rewritten historical user message, thus completing the correction of the sample dialogue flow.

[0120] In this embodiment, the construction process of the store dialogue library of the online store is disclosed, which can ensure the accuracy and reliability of the store dialogue library and guarantee the accurate answering of questions raised by users in the current dialogue flow subsequently.

[0121] Please refer to Figure 6 , in a further embodiment, step S1114, correcting the sample dialogue flow in the sample pair with the target dialogue flow and its corresponding customer service reply message, includes the following steps:

[0122] Step S2000, determining the target topic label from the preset topic label library according to the target dialogue flow and its corresponding customer service reply message;

[0123] For constructing the said topic tag library, specifically, the communication between the human customer service of the online store and the user usually revolves around some core topics. The human can pre-edit each core topic in the form of text according to prior knowledge and / or experimental data, obtain the corresponding topic tags, and add all the topic tags to the topic tag library.

[0124] Adopt a preset fourth prompt template. The fourth prompt template includes a task description, a session to be embedded, and a topic tag library to be embedded. Those skilled in the art can refer to the following disclosure and flexibly set the fourth prompt template. A demonstrative example of the fourth prompt template: The task description in the fourth prompt template: "Determine the topic around which the session discussion revolves from the following topic tag library according to the following session." The session to be embedded in the fourth prompt template: "Session: ${session}$", and the topic tag library to be embedded: "Topic tag library: ${topic l ibrary}$". Mark the sender corresponding to each message in the target dialogue flow, as well as the sender corresponding to the response customer service message of the target dialogue flow, and embed all the messages and their senders into the session to be embedded in the third prompt template, and embed the topic tag library into the topic tag library to be embedded in the fourth prompt template, so as to obtain a fourth prompt text. Input the fourth prompt text into the large language model to obtain the topic generated by the large language model as the target topic tag.

[0125] Step S2010: Use a preset large language model to determine the rewritten historical user messages according to the target dialogue flow, its response customer service message, and the target topic tag.

[0126] Further, the fifth hint template is adopted. The fifth hint template includes a task description, a session to be embedded, a topic around which the discussion in the session to be embedded revolves, and an incorrect message sent by the user in the session to be embedded. Those skilled in the art can flexibly set the fifth hint template with reference to the following disclosure. A demonstrative example of the fifth hint template is as follows: The task description in the fifth hint template: "In the following session between a user and an e-commerce artificial customer service, there is an incorrect message sent by the user. Please analyze all the errors in the incorrect message based on all the messages in the session and the topic around which the session discussion revolves, and then, imitate the user knowing that they have said something wrong and restate the incorrect message to make a correction, so as to obtain the restated and corrected message. Note: All errors include but are not limited to grammar errors, misspelled words, missing words, semantic confusion, unclear meaning, and incomplete expression." The session to be embedded in the fifth hint template: "Session: ${sess ion}$", the topic around which the discussion in the session to be embedded revolves: "Topic around which the session discussion revolves: ${topic}$", and the incorrect message sent by the user in the session to be embedded: "Incorrect message sent by the user in the session: ${error message}$". Mark the sender corresponding to each message in the target dialogue flow, as well as the sender corresponding to the reply customer service message of the target dialogue flow. Combine all the messages and their senders and embed them into the session to be embedded in the fifth hint template. Embed the target topic label into the topic around which the discussion in the session to be embedded revolves in the fifth hint template, and embed the incorrect historical user message in the target dialogue flow into the incorrect message sent by the user in the session to be embedded in the fifth hint template, so as to obtain the fifth hint text. Input the fifth hint text into the large language model to obtain the restated and corrected message generated by the large language model as the rewritten historical user message.

[0127] Step S2020: Correct the sample dialogue flow in the sample pair according to the rewritten historical user message.

[0128] Identify the incorrect historical user message in the target dialogue flow and all the messages after it as the text part to be replaced. Associate the text part to be replaced with the rewritten historical user message obtained according to the target dialogue flow and its reply customer service message. Then, replace the text part to be replaced in the sample dialogue flow in the sample pair with its associated rewritten historical user message, thus completing the correction of this part of the sample dialogue flow.

[0129] In this embodiment, the process of correcting the sample dialogue flow in the sample pair based on the target dialogue flow and its reply customer service message is disclosed, which can ensure the accuracy and reliability of the rewritten historical user message, thereby ensuring the accurate correction of the corresponding part of the sample dialogue flow.

[0130] Please refer to Figure 7, in a further embodiment, step S1112, confirming whether the historical customer service message responding to the historical conversation flow is valid, includes the following steps:

[0131] Step S3000, forming a question-and-answer pair with the historical conversation flow and its historical customer service message, and using a preset question-and-answer evaluation model to determine the positive score of the historical customer service message according to the question-and-answer pair;

[0132] By the conversation representation branch in the question-and-answer evaluation model, first determine the embedding vector of the historical conversation flow in the question-and-answer pair, then encode the embedding vector, extract the corresponding deep semantic information, map the deep semantic information to the first semantic space, and obtain the corresponding vectorized representation as the historical conversation semantic vector of the historical conversation flow. At the same time, by the response representation branch in the question-and-answer evaluation model, first determine the embedding vector of the historical customer service message in the question-and-answer pair, then encode the embedding vector, extract the corresponding deep semantic information, map the deep semantic information to the first semantic space, and obtain the corresponding vectorized representation as the customer service semantic vector of the historical customer service message. Then, the positive matching layer in the question-and-answer evaluation model determines the vector similarity between the historical conversation semantic vector and the customer service semantic vector as the positive score obtained by the historical customer service message responding to the historical conversation flow.

[0133] Step S3010, determine whether there is a first conversation flow in all historical conversation flows containing the historical customer service message, and the conversation content of the first conversation flow is relatively the least;

[0134] The conversation content refers to the number of messages in the corresponding conversation flow.

[0135] Step S3020, when there is the first conversation flow, obtain the historical customer service message and the historical user message after its time sequence from the first conversation flow to form a question-and-answer pair, use a preset feedback evaluation model to determine the feedback score of the historical customer service message according to the question-and-answer pair, and determine the effective score of the historical customer service message according to the positive score and the feedback score;

[0136] In the user representation branch of the feedback evaluation model, first, the embedding vector of the historical user message in the question-answer pair is determined. Then, the embedding vector is encoded to extract the corresponding deep semantic information. The deep semantic information is mapped to the third semantic space to obtain the corresponding vector representation as the user semantic vector of the historical user message. At the same time, in the customer service representation branch of the feedback evaluation model, first, the embedding vector of the historical customer service message in the question-answer pair is determined. Then, the embedding vector is encoded to extract the corresponding deep semantic information. The deep semantic information is mapped to the third semantic space to obtain the corresponding vector representation as the customer service semantic vector of the historical customer service message. Then, the vector similarity between the user semantic vector and the customer service semantic vector is determined by the feedback matching layer in the feedback evaluation model as the feedback score corresponding to the response performance of the user message to the customer service message.

[0137] The feedback evaluation model is pre-trained to a converged state to learn the ability to determine the feedback score corresponding to the response performance of the user message to the customer service message based on the semantic representations of the customer service message and the user message. The feedback evaluation model includes a customer service representation branch, a user representation branch, and a feedback matching layer. The customer service representation branch and the user representation branch are the same in model selection and can be any one or any combination of MLP, CNN, RNN, Self-attention, Transformer encoder, and BERT, which can be set by those skilled in the art as needed. Moreover, the customer service representation branch and the user representation branch share parameters, and the representation results of both are mapped to the same semantic space. The feedback matching layer can be implemented by any one of dot product, cosine, Gaussian distance, MLP, and similarity matrix, which can be set by those skilled in the art as needed.

[0138] For the pre-trained feedback evaluation model, specifically, a plurality of original conversation flows from different online stores are collected in advance. For each original conversation flow, at least one corresponding historical conversation flow is constructed, as well as the historical customer service messages that respond to the historical conversation flow. Thus, a plurality of historical conversation flows and their historical customer service messages are obtained. For each historical customer service message, it is determined whether there is a target first conversation flow in all the historical conversation flows that contain this historical customer service message. When there is, this historical customer service message and this target first conversation flow are constituted into a training sample. Manually, according to whether the response performance of the historical customer service message is effective in the historical user message of each training sample, the supervision label of this training sample is correspondingly marked. By way of example, if the response performance of the historical customer service message is effective in the historical user message of the training sample, the supervision label of this training sample is marked as 1; if the response performance of the historical customer service message is ineffective in the historical user message of the training sample, the supervision label of this training sample is marked as 0. For the response performance of the historical customer service message being effective in the historical user message, it means that the historical user message feedback reflects that the user expresses gratitude, clearly indicates that the problem has been solved, continues to ask questions different from those answered by the historical customer service message, etc. Any one or more of these meanings are considered, and then it is considered that the source of the meaning from the historical customer service message is an effective response; for the historical customer service message having an ineffective response to the historical conversation flow, it means that the historical user message feedback reflects that the user expresses dissatisfaction, clearly indicates that the problem has not been solved, asks in-depth questions or repeats the same questions as those answered by the historical customer service message, etc. Any one or more of these meanings are considered, and then it is considered that the source of the meaning from the historical customer service message is an ineffective response. All the training samples and their supervision labels are aggregated and added to the training set.

[0139] Obtain a single training sample in the training set and its supervision label. In the user representation branch of the feedback evaluation model, first determine the embedding vector of the historical user message in the training sample, then encode the embedding vector to extract the corresponding deep semantic information, map the deep semantic information to the third semantic space, and obtain the corresponding vectorized representation as the user semantic vector of the historical user message. At the same time, in the customer service representation branch of the feedback evaluation model, first determine the embedding vector of the historical customer service message in the training sample, then encode the embedding vector to extract the corresponding deep semantic information, map the deep semantic information to the third semantic space, and obtain the corresponding vectorized representation as the customer service semantic vector of the historical customer service message. Then, the feedback matching layer in the feedback evaluation model determines the vector similarity between the user semantic vector and the customer service semantic vector as the predicted feedback score corresponding to the response performance of the user message to the customer service message. Use the cross-entropy loss function to calculate the loss value corresponding to the cross-entropy loss of the predicted feedback score based on the supervision label of the training sample. When the loss value reaches the preset threshold, it indicates that the feedback evaluation model has been trained to the convergence state, and thus the training of the feedback evaluation model can be terminated; when the loss value does not reach the preset threshold, it indicates that the feedback evaluation model has not converged. Therefore, perform gradient update on the feedback evaluation model according to the loss value, usually backpropagate to correct the weight parameters of each corresponding link in the feedback evaluation model to make the feedback evaluation model closer to convergence. Then, continue to call other training samples in the training set and their supervision labels to perform iterative training on the feedback evaluation model until the feedback evaluation model is trained to the convergence state. The preset threshold can be set as needed by those skilled in the art according to the disclosure here.

[0140] Furthermore, multiply the positive score and the feedback score by their respective preset weights and then sum them up, and divide the obtained sum value by two to obtain the effective score of the historical customer service message. The sum of the positive score and the feedback score multiplied by their respective preset weights is 1, and those skilled in the art can preset each preset weight as needed.

[0141] Step S3030: When there is no such first dialogue flow, use the positive score of the historical customer service message as the effective score;

[0142] When there is no such first dialogue flow, it means that the corresponding feedback score of the historical customer service message cannot be obtained from the feedback perspective. Therefore, directly use the positive score of the historical customer service message as the effective score.

[0143] Step S3040: Determine whether the historical customer service message is effective according to whether the effective score of the historical customer service message meets the preset conditions.

[0144] When the effective score of the historical customer service message exceeds a preset threshold, confirm that the historical customer service message is effective; when the effective score of the historical customer service message is less than or equal to the preset threshold, confirm that the historical customer service message is ineffective. The preset threshold can be set by those skilled in the art as needed, and an exemplary example is 0.8.

[0145] In this embodiment, the process of confirming whether the historical customer service message in response to the historical dialogue flow is effective is disclosed, which can ensure the reliability and accuracy of the effective score of the historical customer service message, so that it can be accurately determined whether the historical customer service message is effective based on the effective score.

[0146] Please refer to Figure 8 , in a further embodiment, step S1114, confirming whether the last historical user message in the chronological order in the dialogue flow to be verified is incorrect, includes the following steps:

[0147] Step S4000, using a preset language expression model to determine the expression integrity, semantic clarity, literal correctness, and grammar accuracy according to the dialogue flow to be verified;

[0148] From the semantic representation layer in the language expression model, first determine the embedding vector of the dialogue flow to be verified, then encode the embedding vector, extract the corresponding deep semantic information, map the deep semantic information to the fourth semantic space, and obtain the corresponding vectorized representation as the dialogue semantic vector to be verified of the dialogue flow to be verified. The first classifier in the language expression model maps the dialogue semantic vector to be verified to the first classification space, and obtains the classification probability of the first positive class space representing complete expression in the first classification space as the expression integrity. At the same time, the second classifier in the language expression model maps the dialogue semantic vector to be verified to the second classification space, and obtains the classification probability of the second positive class space representing clear meaning in the second classification space as the semantic clarity. At the same time, the third classifier in the language expression model maps the dialogue semantic vector to be verified to the third classification space, and obtains the classification probability of the third positive class space representing completely correct literal in the third classification space as the literal correctness. At the same time, the fourth classifier in the language expression model maps the dialogue semantic vector to be verified to the fourth classification space, and obtains the classification probability of the fourth positive class space representing completely accurate grammar in the fourth classification space as the grammar accuracy. The first classification space further includes a first parent class space representing incomplete expression. The second classification space further includes a second parent class space representing unclear expression. The third classification space further includes a third parent class space representing not completely correct literal. The fourth classification space further includes a fourth parent class space representing not completely correct grammar.

[0149] The language expression model is pre-trained to a convergent state and learns the ability to determine the expression integrity, semantic clarity, literal correctness, and grammar accuracy of the user message at the end of the time sequence in the conversation flow according to the semantic representation of the conversation flow. The language expression model includes a semantic representation layer, a first classifier, a second classifier, a third classifier, and a fourth classifier. The semantic representation layer can be any one or any combination of MLP, CNN, RNN, Self-attention, Transformer encoder, and BERT in terms of selection, which can be set by those skilled in the art as needed. The first classifier, the second classifier, the third classifier, and the fourth classifier are the same in model selection and can be a fully connected layer or an MLP, and those skilled in the art can choose one to implement as needed.

[0150] For the pre-training of the language expression model, specifically, a plurality of historical conversation flows are collected in advance. Each historical conversation flow is derived from different original conversation flows. A part of the original conversation flows all belong to the same online store, and another part of the original conversation flows belong to different online stores respectively. Each historical user message is used as a single training sample. For each training sample, the supervision label of the training sample is manually marked according to whether the expression of the historical user message at the end of the time sequence in the training sample is complete, whether the meaning is clear, whether the literal is completely correct, and whether the grammar is completely accurate. By way of example, if the expression of the historical user message at the end of the time sequence in the training sample is complete, the meaning is clear, the literal is completely correct, and the grammar is completely accurate, the supervision label of the training sample is marked as 1, 1, 1, 1; if the expression of the historical user message at the end of the time sequence in the training sample is incomplete, the meaning is unclear, the literal is not completely correct, and the grammar is not completely accurate, the supervision label of the training sample is marked as 0, 0, 0, 0. All the training samples and their supervision labels are collected and added to the training set.

[0151] Obtain a single training sample in the training set and its supervision label. By the semantic representation layer in the language expression model, first determine the embedding vector of the training sample, and then encode the embedding vector to extract the corresponding deep semantic information. Map the deep semantic information to the fourth semantic space to obtain the corresponding vectorized representation as the training dialogue semantic vector of the training sample. The first classifier in the language expression model maps the training dialogue semantic vector to the first classification space to obtain the classification probability of the first positive class space representing complete expression in the first classification space as the predicted expression completeness. At the same time, the second classifier in the language expression model maps the training dialogue semantic vector to the second classification space to obtain the classification probability of the second positive class space representing clear expression in the second classification space as the predicted expression clarity. At the same time, the third classifier in the language expression model maps the training dialogue semantic vector to the third classification space to obtain the classification probability of the third positive class space representing completely correct literal in the third classification space as the predicted literal correctness. At the same time, the fourth classifier in the language expression model maps the training dialogue semantic vector to the fourth classification space to obtain the classification probability of the fourth positive class space representing completely accurate grammar in the fourth classification space as the predicted grammar accuracy. Use the cross-entropy loss function to calculate the sum of the cross-entropy losses corresponding to the predicted expression completeness, predicted expression clarity, predicted literal correctness, and predicted grammar accuracy respectively based on the supervision label of the training sample. When the loss value reaches the preset threshold, it indicates that the language expression model has been trained to the convergence state, and thus the training of the language expression model can be terminated; when the loss value does not reach the preset threshold, it indicates that the language expression model has not converged. Then, perform gradient update on the language expression model according to the loss value, usually backpropagate to correct the weight parameters of each corresponding link in the language expression model to make the language expression model further approach convergence. Then, continue to call other training samples in the training set and their supervision labels to perform iterative training on the language expression model until the language expression model is trained to the convergence state. The preset threshold can be set by those skilled in the art according to the disclosure here as needed.

[0152] Step S4010: Determine the correct score to be verified for the historical user message at the end of the time series in the dialogue flow to be verified according to the expression completeness, expression clarity, literal correctness, and grammar accuracy.

[0153] Multiply the obtained expression completeness, expression clarity, literal correctness, and grammar accuracy by their respective preset weights and then add them up. Divide the obtained sum value by four to obtain the correct score to be verified.

[0154] The sum of the respective preset weights of the expression completeness, expression clarity, literal correctness, and grammar accuracy is 1, and those skilled in the art can preset each preset weight as needed.

[0155] Step S4020: Confirm whether the response customer service message for the dialogue flow to be verified is valid. When the response customer service message is invalid and the correct score to be verified exceeds the first preset threshold, calibrate the correct score to be verified with the first preset confidence level to obtain the target correct score of the historical user message.

[0156] It can be understood that usually the response customer service message for the dialogue flow to be verified is correct. It is very likely that the historical user message is incorrect, and in a small number of cases, it may also be that the artificial customer service sending the response customer service message lacks experience and / or has limited comprehension ability. Therefore, when the response customer service message is invalid and the correct score to be verified exceeds the first preset threshold, it is considered that the correct score to be verified is too high. In this case, the correct score to be verified is appropriately reduced by using the first preset confidence level. In one embodiment, the target correct score of the historical user message can be obtained by subtracting the first preset confidence level from the correct score to be verified. The first preset confidence level can be set as needed by those skilled in the art according to the disclosure herein. In another embodiment, the target correct score of the historical user message can be obtained by multiplying the first preset confidence level by the correct score to be verified. The first preset confidence level can be a percentage less than 100% and greater than 0, or a number less than 1 and greater than 0. The specific value can be set as needed by those skilled in the art according to the disclosure herein. The first preset threshold can be set as needed by those skilled in the art according to the disclosure herein.

[0157] Step S4030: When the response customer service message is valid and the correct score to be verified is less than or equal to the second preset threshold, calibrate the correct score to be verified with the second preset confidence level to obtain the target correct score of the historical user message.

[0158] It can be understood that usually the response customer service message for the dialogue flow to be verified is valid. It is very likely that the historical user message is correct, and in a small number of cases, it may also be that the artificial customer service sending the response customer service message has rich experience and / or strong comprehension ability. Therefore, when the response customer service message is valid and the correct score to be verified is less than or equal to the second preset threshold, it is considered that the correct score to be verified is too low. In this case, the correct score to be verified is appropriately increased by using the second preset confidence level. In one embodiment, the target correct score of the historical user message can be obtained by adding the second preset confidence level to the correct score to be verified. The second preset confidence level can be set as needed by those skilled in the art according to the disclosure herein. In another embodiment, the target correct score of the historical user message can be obtained by multiplying the second preset confidence level by the correct score to be verified. The second preset confidence level can be a percentage greater than 100%, or a number greater than 1. The specific value can be set as needed by those skilled in the art according to the disclosure herein. The second preset threshold can be set as needed by those skilled in the art according to the disclosure herein.

[0159] Step S4040: When the response customer service message is invalid and the correct score to be verified is less than or equal to the first preset threshold, or when the response customer service message is valid and the correct score to be verified exceeds the second preset threshold, use the correct score to be verified as the target correct score of the historical user message;

[0160] In both of the above cases, the corresponding correct score to be verified is regarded as normal and no corrective adjustment is required.

[0161] Step S4050: Determine whether the historical user message is incorrect according to whether the target correct score of the historical user message meets the preset conditions.

[0162] When the target correct score of the historical user message exceeds the preset threshold, confirm that the historical user message is correct; when the target correct score of the historical user message is less than or equal to the preset threshold, confirm that the historical user message is incorrect. The preset threshold can be set by those skilled in the art as needed, and an exemplary example is 0.8.

[0163] In this embodiment, the process of confirming whether the historical user message at the end of the time sequence in the dialogue flow to be verified is incorrect is disclosed, which can ensure the reliability and accuracy of the target correct score of the historical user message, so that it can be accurately determined whether the historical user message is incorrect based on the target correct score.

[0164] Please refer to Figure 9, A store customer service conversation device provided to meet one of the purposes of the present application is a functional embodiment of the store customer service conversation method of the present application. On the other hand, a store customer service conversation device provided to meet one of the purposes of the present application includes a first matching module 1100, a second matching module 1200, a third matching module 1300, and a reply pushing module 1400. Among them, the first matching module 1100 is used to respond to the message event triggered by the user in the human-machine conversation in the target online store, obtain the current conversation flow of the human-machine conversation, and determine whether there is a sample conversation flow in the preset store conversation library of the target online store and the preset general conversation library that forms a first matching relationship with the current conversation flow. When there is, recall the sample customer service message that answers the sample conversation flow as the target customer service reply; the second matching module 1200 is used to, when there is no sample conversation flow that forms a first matching relationship with the current conversation flow, determine whether there is a sample conversation flow in the general conversation library that forms a second matching relationship with the current conversation flow. When there is, recall the sample customer service message that answers the sample conversation flow, and determine the target customer service reply according to the sample customer service message and the current conversation flow; the third matching module 1300 is used to, when there is no sample conversation flow that forms a second matching relationship with the current conversation flow, recall the material content in the preset store material library of the target online store that forms a third matching relationship with the current conversation flow, and determine the target customer service reply according to the material content and the current conversation flow; the reply pushing module 1400 is used to push the target customer service reply to the user.

[0165] In a further embodiment, before the first matching module 1100, it includes: a store conversation library acquisition sub-module, which is used to acquire the preset store conversation libraries of multiple online stores, and the store conversation library includes multiple sample pairs, and each sample pair includes a sample conversation flow and a sample customer service message that answers the sample conversation flow; a sample pair clustering sub-module, which is used to cluster the sample pairs in all store conversation libraries to determine multiple clusters; a general conversation library construction sub-module, which is used to determine typical sample pairs from each cluster and add all typical sample pairs to the general conversation library.

[0166] In a further embodiment, the third matching module 1300 includes: a semantic representation determination sub-module, which is used to use a preset conversation material matching model to determine the material semantic representation corresponding to each material content in the preset store material library of the target online store and the conversation semantic representation of the current conversation flow; a relevant score determination sub-module, which is used to use the similarity between the conversation semantic representation and each material semantic representation as the relevant score between the current conversation flow and each material content respectively; a material content recall sub-module, which is used to confirm that the material content whose relevant score meets the preset conditions forms a third matching relationship with the current conversation flow, and recall the material content from the store material library.

[0167] In a further embodiment, before the store dialogue library acquisition sub-module, it includes: a historical conversation invocation sub-module, which is used to obtain all historical conversation flows of each online store and the historical customer service messages that answer each historical conversation flow; a store dialogue library construction sub-module, which is used to confirm whether the historical customer service message that answers each historical conversation flow is valid for each historical conversation flow. When the historical customer service message is valid, use this historical conversation flow as a sample conversation flow and this historical customer service message as a sample customer service message, and form a sample pair with this sample conversation flow and this sample customer service message, and add it to the store dialogue library of this online store; a to-be-verified conversation flow and its corresponding answering customer service message determination sub-module, which is used to, for each sample pair in the store dialogue library, based on the sample conversation flow in the sample pair, determine each historical customer service message therein as an answering customer service message respectively, and based on each answering customer service message, obtain the conversation flow with earlier timing in the sample conversation flow as the to-be-verified conversation flow corresponding to this answering customer service message. Moreover, use the sample customer service message in the sample pair as the answering customer service message, and use this sample conversation flow as the to-be-verified conversation flow of this answering customer service message; a sample conversation flow correction sub-module, which is used to confirm whether the historical user message at the latest timing in each to-be-verified conversation flow is incorrect for each to-be-verified conversation flow. When the historical user message is incorrect, determine a target conversation flow from all to-be-verified conversation flows containing this historical user message, and use this target conversation flow and its answering customer service message to correct the sample conversation flow in the sample pair. The answering customer service message of the target conversation flow effectively answers the target conversation flow, and the conversation content of the target conversation flow is relatively the least.

[0168] In a further embodiment, the sample conversation flow correction sub-module includes: a target theme label determination unit, which is used to determine a target theme label from a preset theme label library according to the target conversation flow and its answering customer service message; a rewritten historical user message determination unit, which is used to use a preset large language model to determine a rewritten historical user message according to the target conversation flow, its answering customer service message, and the target theme label; a sample conversation flow modification unit, which is used to correct the sample conversation flow in the sample pair according to the rewritten historical user message.

[0169] In a further embodiment, the store dialogue library construction sub-module includes: a positive score determination unit, configured to form a question-and-answer pair by using the historical dialogue flow and its historical customer service message, and determine the positive score of the historical customer service message according to the question-and-answer pair by using a preset question-and-answer evaluation model; a first dialogue flow determination unit, configured to determine whether there is a first dialogue flow in all historical dialogue flows including the historical customer service message, where the dialogue content of the first dialogue flow is relatively the least; a first effective score determination unit, configured to, when there is the first dialogue flow, obtain a question-and-answer pair by using the historical customer service message and the historical user message after its time sequence from the first dialogue flow, determine the feedback score of the historical customer service message according to the question-and-answer pair by using a preset feedback evaluation model, and determine the effective score of the historical customer service message according to the positive score and the feedback score; a second effective score determination unit, configured to, when there is no first dialogue flow, use the positive score of the historical customer service message as the effective score; an effectiveness determination unit, configured to determine whether the historical customer service message is effective according to whether the effective score of the historical customer service message meets a preset condition.

[0170] In a further embodiment, the sample dialogue flow correction sub-module includes: a multiplicity determination unit, configured to determine the expression integrity, the clarity of meaning, the literal correctness, and the grammar accuracy of the to-be-verified dialogue flow by using a preset language expression model; a to-be-verified correct score determination unit, configured to determine the to-be-verified correct score of the historical user message at the last time sequence in the to-be-verified dialogue flow according to the expression integrity, the clarity of meaning, the literal correctness, and the grammar accuracy; a first calibration unit, configured to confirm whether the response customer service message for answering the to-be-verified dialogue flow is effective. When the response customer service message is invalid and the to-be-verified correct score exceeds a first preset threshold, calibrate the to-be-verified correct score by using a first preset confidence level to obtain the target correct score of the historical user message; a second calibration unit, configured to, when the response customer service message is effective and the to-be-verified correct score is less than or equal to a second preset threshold, calibrate the to-be-verified correct score by using a second preset confidence level to obtain the target correct score of the historical user message; a verification unit, configured to, when the response customer service message is invalid and the to-be-verified correct score is less than or equal to the first preset threshold, or when the response customer service message is effective and the to-be-verified correct score exceeds the second preset threshold, use the to-be-verified correct score as the target correct score of the historical user message; a message discrimination unit, configured to determine whether the historical user message is incorrect according to whether the target correct score of the historical user message meets a preset condition.

[0171] To solve the above technical problems, an embodiment of the present application further provides a computer device. As Figure 10As shown, it is 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 through 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 can store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a store customer service session 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 can store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the store customer service session method of this application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 10 the structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0172] In this embodiment, the processor is used to execute Figure 9 the specific functions of each module and its sub-modules in. The memory stores the program code and various types of data required to execute the above modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. The memory in this embodiment stores the program code and data required to execute all modules / sub-modules in the store customer service session device of this application. The server can call the program code and data of the server to execute the functions of all sub-modules.

[0173] This application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more processors are caused to execute the steps of the store customer service session method of any embodiment of this application.

[0174] Those of ordinary skill in the art can understand that to implement all or part of the processes in the above embodiments of the method of this application, it can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disc, a Read-Only Memory (ROM), or a Random Access Memory (RAM), etc.

[0175] In summary, this application can provide users with timely and accurate answers and ensure a high solution rate.

[0176] Those skilled in the art can understand that the various operations, methods, steps, measures, and solutions in the processes discussed in this application can be alternated, changed, combined, or deleted. Further, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and solutions in the prior art that are the same as those in the various open-source operations, methods, and processes in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted.

[0177] The above are only some embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. A store customer service conversation method, characterized in that: The steps include: In response to a message event triggered by a user in a human-computer conversation in a target online store, the current conversation flow of the human-computer conversation is obtained, and from a preset store conversation library of the target online store and a preset general conversation library, it is determined whether there is a sample conversation flow that forms a first matching relationship with the current conversation flow, and if so, a sample customer service message that responds to the sample conversation flow is recalled as a target customer service reply; When there is no sample conversation flow that forms a first matching relationship with the current conversation flow, determine from the general conversation library whether there is a sample conversation flow that forms a second matching relationship with the current conversation flow. If so, recall the sample customer service message that responds to the sample conversation flow, and determine the target customer service reply based on the sample customer service message and the current conversation flow; When there is no sample conversation flow that forms a second matching relationship with the current conversation flow, recall the material content that forms a third matching relationship with the current conversation flow in the store database of the preset target online store, and determine the target customer service reply according to the material content and the current conversation flow; The target customer service reply is pushed to the user.

2. The store customer service conversation method according to claim 1, characterized in that: In response to a message event triggered by a user in a human-computer conversation in a target online store, before obtaining the current dialog flow of the human-computer conversation, the following steps are included: Acquire a store dialogue library preset by each of a plurality of online stores, wherein the store dialogue library includes a plurality of sample pairs, each sample pair includes a sample dialogue flow, and a sample customer service message in response to the sample dialogue flow; Cluster the sample pairs in all store dialogue libraries and identify multiple clusters; Typical sample pairs are determined from each cluster, and all typical sample pairs are added to the general dialogue library.

3. The store customer service conversation method according to claim 1, characterized in that: Recalling the material content that forms a third matching relationship with the current conversation flow in the store database of the preset target online store includes the following steps: Using a preset conversation data matching model to determine the material semantic representation corresponding to each material content in the store database of the preset target online store, and the conversation semantic representation of the current conversation flow; According to the similarity between the semantic representation of the dialogue and the semantic representation of each material, a correlation score between the current dialogue flow and each material content is used; It is confirmed that the material content whose relevant score meets the preset condition forms a third matching relationship with the current dialog flow, and the material content is recalled from the store database.

4. The store customer service conversation method according to claim 1, characterized in that: Before obtaining the preset store dialogue libraries of multiple online stores, the following steps are included: For each online store, obtain all historical conversation flows of the online store and historical customer service messages in response to each historical conversation flow; For each historical conversation flow, confirm whether the historical customer service message in response to the historical conversation flow is valid. If the historical customer service message is valid, use the historical conversation flow as a sample conversation flow and the historical customer service message as a sample customer service message. Use the sample conversation flow and the sample customer service message to form a sample pair and add them to the store conversation library of the online store. For each sample pair in the store dialogue library, based on the sample dialogue flow in the sample pair, each historical customer service message is determined as a response customer service message, and based on each response customer service message, a dialogue flow that is earlier in time sequence in the sample dialogue flow is obtained as a dialogue flow to be verified corresponding to the response customer service message, and the sample customer service message in the sample pair is used as the response customer service message, and the sample dialogue flow is used as the dialogue flow to be verified of the response customer service message; For each dialogue flow to be verified, confirm whether the last historical user message in the dialogue flow to be verified is incorrect. When the historical user message is incorrect, determine the target dialogue flow from all dialogue flows to be verified that contain the historical user message, and use the target dialogue flow and its response customer service message to correct the sample dialogue flow in the sample pair. The response customer service message of the target dialogue flow effectively responds to the target dialogue flow, and the dialogue content of the target dialogue flow is relatively minimal.

5. The store customer service conversation method according to claim 4, characterized in that: Modifying the sample dialogue flow in the sample pair with the target dialogue flow and its response customer service message includes the following steps: Determine a target topic tag from a preset topic tag library according to the target conversation flow and its response customer service message; A preset large language model is used to determine the rewritten historical user message based on the target dialogue flow, its answering customer service message and the target topic tag; The sample conversation flow in the sample pair is modified according to the rewritten historical user message.

6. The store customer service conversation method according to claim 4, characterized in that: Confirming whether the historical customer service message in response to the historical conversation flow is valid includes the following steps: The historical conversation flow and its historical customer service message form a question-answer pair, and a preset question-answer evaluation model is used to determine the positive score of the historical customer service message based on the question-answer pair; Determining whether there is a first dialogue flow from all historical dialogue flows containing the historical customer service message, wherein the dialogue content of the first dialogue flow is relatively minimal; When the first dialog flow exists, the historical customer service message and the historical user messages after it are obtained from the first dialog flow to form a question-answer pair, a feedback score of the historical customer service message is determined according to the question-answer pair using a preset feedback evaluation model, and an effective score of the historical customer service message is determined according to the positive score and the feedback score; When the first dialogue flow does not exist, the positive score of the historical customer service message is used as a valid score; Whether the historical customer service message is valid is determined accordingly based on whether the validity score of the historical customer service message meets a preset condition.

7. The store customer service conversation method according to claim 4, characterized in that: Confirming whether the last historical user message in the sequence of the dialogue flow to be verified is correct includes the following steps: Using a preset language expression model to determine the completeness of expression, clarity of meaning, literal correctness and grammatical accuracy according to the dialogue flow to be verified; Determine the correct score of the last historical user message in the dialogue flow to be verified according to the expression completeness, meaning clarity, literal correctness, and grammatical accuracy; Confirm whether the answering customer service message in response to the dialogue flow to be verified is valid; when the answering customer service message is invalid and the correct score to be verified exceeds a first preset threshold, calibrate the correct score to be verified using a first preset reliability to obtain a target correct score for the historical user message; When the answer customer service message is valid and the correct score to be verified is lower than or equal to the second preset threshold, the correct score to be verified is calibrated using the second preset reliability to obtain the target correct score of the historical user message; When the answer customer service message is invalid and the correct score to be verified is lower than or equal to a first preset threshold, or when the answer customer service message is valid and the correct score to be verified exceeds a second preset threshold, the correct score to be verified is used as the target correct score of the historical user message; Whether the target correctness score of the historical user message meets a preset condition is correspondingly determined to determine whether the historical user message is incorrect.

8. A store customer service conversation device, characterized in that: include: A first matching module is used to respond to a message event triggered by a user in a human-computer conversation in a target online store, obtain a current conversation flow of the human-computer conversation, and determine whether there is a sample conversation flow that forms a first matching relationship with the current conversation flow from a preset store conversation library of the target online store and a preset general conversation library, and if so, recall a sample customer service message that responds to the sample conversation flow as a target customer service reply; A second matching module is used to determine whether there is a sample dialogue flow that forms a second matching relationship with the current dialogue flow from the general dialogue library when there is no sample dialogue flow that forms a first matching relationship with the current dialogue flow, and if so, recall a sample customer service message that responds to the sample dialogue flow, and determine a target customer service reply based on the sample customer service message and the current dialogue flow; A third matching module is used to recall the material content that forms a third matching relationship with the current conversation flow in the store database of the preset target online store when there is no sample conversation flow that forms a second matching relationship with the current conversation flow, and determine the target customer service reply according to the material content and the current conversation flow; The reply push module is used to push the target customer service reply to the user.

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.