Association question answering method and device, equipment and medium
Through the Lenovo question and answer method, which combines semantic and literal matching to filter and rewrite responses, it solves the problem of traditional e-commerce customer service technology being difficult to understand user intentions, achieves more accurate and humanized responses, and reduces operating costs.
Patent Information
- Application Number
- CN202410834588.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-10
AI Technical Summary
Traditional e-commerce customer service technology relies on keyword matching or simple rule engines, which makes it difficult to deeply understand user intentions. It requires a lot of manual intervention when processing complex or fuzzy queries, resulting in high operating costs, inconsistent services, and untimely responses.
The association question and answer method is used to fuse semantic and literal matching scores to filter similar question texts to build an association question set. Standard responses are recalled based on the question text selected by the user, and are rewritten according to the response style to match the user's expression style.
It improves the in-depth understanding of user questions, provides more accurate responses, reduces manual intervention, improves user satisfaction and service consistency, and enhances the user-machine interaction experience.
Smart Images

Figure CN118626618A
Abstract
Description
Technical Field
[0001] The present application relates to the field of e-commerce technology, and in particular to an associative question-answering method and its corresponding device, computer equipment, and computer-readable storage medium. Background Art
[0002] In the field of e-commerce technology, providing customer service is crucial. It can not only respond to the inquiries and needs of buyers of goods instantly, but also usually provide personalized shopping suggestions and / or solutions, thereby significantly improving consumers' shopping experience and satisfaction. Moreover, for merchants, high-quality customer service is a key factor in building customer trust, enhancing brand loyalty and promoting sales. At the same time, equipped with automated customer service can greatly reduce the pressure on manual customer service and improve overall operational efficiency.
[0003] Traditional technologies usually rely on keyword matching or simple rule engines to respond to user questions. These technical solutions use rule matching, precise search, and fuzzy search to find answers that match user questions. However, this method often lacks flexibility and accuracy because it cannot deeply understand the true intention of the user's question and has difficulty processing complex or ambiguous queries. In addition, when processing a large number of inquiries, a lot of manual intervention is often required, which not only increases operating costs, but also makes it difficult to ensure the consistency and timeliness of customer service.
[0004] In view of the shortcomings of traditional practices, the applicant has been engaged in research in related fields for a long time and has taken a different approach to solve industry problems in the field of e-commerce technology. Summary of the invention
[0005] The primary purpose of the present application is to solve at least one of the above problems and to provide an associative question-answering method and its corresponding device, computer equipment, and computer program product.
[0006] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0007] A method for associative question and answer provided to meet one of the purposes of the present application comprises the following steps:
[0008] In response to a customer service activation event triggered by a user, a user question text corresponding to the event is obtained, and a semantic matching score and a literal matching score between the user question text and each similar question text in a knowledge base are determined and merged into a target matching score, wherein the knowledge base includes a plurality of preset standard question texts, and each standard question text corresponds to a preset standard answer text and at least one similar question text;
[0009] Filter out similar question texts whose target matching scores meet preset conditions to construct an associative question set, and send the associative question set to the user;
[0010] In response to the associative question answering event triggered by the user, a similar question text selected by the user in the associative question set corresponding to the event is obtained, and a standard answer text corresponding to the similar question text in the knowledge base is recalled;
[0011] The answer expression style corresponding to the user's question text is determined, and the standard answer text is rewritten into a target answer text matching the answer expression style and pushed to the user.
[0012] On the other hand, an associative question-answering device provided to meet one of the purposes of the present application includes a first event response module, a user question association module, a second event response module and a standard answer rewriting module, wherein the first event response module is used to respond to a customer service activation event triggered by a user, obtain a user question text corresponding to the event, determine the semantic matching score and the literal matching score between the user question text and each similar question text in the knowledge base, and merge them into a target matching score, wherein the knowledge base includes a plurality of preset standard question texts, each of which corresponds to a preset standard answer text and at least one similar question text; the user question association module is used to screen out similar question texts whose target matching scores meet preset conditions to construct an associative question set, and send the associative question set to the user; the second event response module is used to respond to the associative question-answering event triggered by the user, obtain a similar question text selected by the user in the associative question set corresponding to the event, and recall the standard answer text corresponding to the similar question text in the knowledge base; the standard answer rewriting module is used to determine the answer expression style corresponding to the user question text, rewrite the standard answer text into a target answer text matching the answer expression style and push it 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, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the associative question and answer 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 a computer program / instruction, which, when executed by a processor, implements the steps of the method described in any embodiment of the present application.
[0015] The technical solution of this application has many advantages, including but not limited to the following aspects:
[0016] This application obtains the user's question text when the user enables customer service, and performs semantic and literal matching with the standard question text in the knowledge base, and combines the scores obtained from the two matches to form a target matching score, so as to screen out similar question texts that meet the preset conditions to construct an associative question set and send it to the user for selection. When the user selects a similar question text from the associative question set, the corresponding standard answer text is recalled from the knowledge base, and according to the answer expression style of the user's question text, the standard answer text is rewritten into a target answer text that matches the style, and finally pushed to the user. On the one hand, by combining semantics and literal aspects, a deep understanding of the user's questions is ensured, so that the subtle differences and deep intentions of the user's questions can be captured, thereby providing more accurate responses. On the other hand, an associative question set is provided to the user to display other question texts that are highly related to the user's question text, so that the user can examine the problem more comprehensively, so that the original problem can be quickly corrected or completed. On the other hand, it can identify and match the user's response expression style and generate humanized response text, which not only improves user satisfaction, but also makes the response more in line with the user's communication habits, reduces the user's resistance to machine replies, and enhances the interactive communication experience between the user and customer service. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0018] Figure 1 A schematic diagram of a typical network deployment architecture related to implementing the technical solution of this application;
[0019] Figure 2 A flowchart of a typical embodiment of the associative question-answering method of the present application;
[0020] Figure 3 A schematic diagram of a process of answering a user's question and using the user's question text as a similar question text in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of a process for determining a target matching score between a user's question text and each similar question text in a knowledge base in an embodiment of the present application;
[0022] Figure 5 A schematic diagram of a process for rewriting a user's question text in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of a process for constructing a standard vocabulary in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of a process for determining a response expression style corresponding to a user's question text in an embodiment of the present application;
[0025] Figure 8 A schematic diagram of a process for rewriting a standard response text into a target response text that matches the response expression style in an embodiment of the present application;
[0026] Fig. 9 This is a principle block diagram of the associative question-and-answer device of the present application;
[0027] Fig.10 A schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0028] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0029] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0030] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0031] like Figure 1 In the network architecture shown, the e-commerce platform 82 is deployed on the Internet to provide corresponding services to its users. Similarly, the devices 80 of the merchant users of the e-commerce platform 82 and the devices 81 of the consumer users are also connected to the Internet to use the services provided by the e-commerce platform.
[0032] The exemplary e-commerce platform 82 provides supply and demand matching of products and / or services to the general public with the help of Internet infrastructure. In the e-commerce platform 82, products and / or services are provided as commodity information. To simplify the description, the concepts of commodity, product, etc. are used in this application to refer to the products and / or services in the e-commerce platform 82, which may specifically be physical products, digital products, tickets, service subscriptions, other offline services, etc.
[0033] In reality, all entities can access the e-commerce platform 82 as users, use various online services provided by the e-commerce platform 82, and achieve the purpose of participating in the business activities achieved by the e-commerce platform 82. These entities can be natural persons, legal persons or social organizations, etc. Corresponding to the two types of entities, merchants and consumers in business activities, the e-commerce platform 82 has two types of users, merchant users and consumer users. All entities in the product distribution chain in business activities, including manufacturers, sellers, retailers, logistics providers, etc., can use online services in the e-commerce platform 82 as merchant users, while consumers in business activities, including real or potential consumers, can use online services in the e-commerce platform 82 as their corresponding consumer users. In actual business activities, the same entity can act as both a merchant user and a consumer user, and this should be understood flexibly.
[0034] The infrastructure used to deploy the e-commerce platform 82 mainly includes the backend architecture and frontend equipment. The backend architecture runs various online services through the service cluster, including middleware or frontend services for the platform, services for consumers, services for merchants, etc., to enrich and improve its service functions; the frontend equipment mainly covers the terminal devices used by users to access the e-commerce platform 82 as clients, including but not limited to various mobile terminals, personal computers, point-of-sale devices, etc. For example, merchant users can enter product information for their online stores through their terminal devices 80, or generate their product information using the interfaces opened by the e-commerce platform; consumer users can access the webpage of the online store implemented by the e-commerce platform 82 through their terminal devices 81, trigger the shopping process through the shopping buttons provided on the webpage, and call various online services provided by the e-commerce platform 82 during the shopping process, so as to achieve the purpose of shopping orders.
[0035] In some embodiments, the e-commerce platform 82 may be implemented by a processing facility including a processor and a memory, the processing facility storing a set of instructions that, when executed, cause the e-commerce platform 82 to perform the e-commerce and support functions involved in the present application. The processing facility may be part of a server, client, network infrastructure, mobile computing platform, cloud computing platform, fixed computing platform, or other computing platform, and provides electronic components, merchant equipment, payment gateways, application developers, marketing channels, transportation providers, customer equipment, point-of-sale equipment, etc. of the e-commerce platform 82.
[0036] The e-commerce platform 82 can be implemented as online services such as cloud computing services, software as a service (SaaS), infrastructure as a service (IaaS), platform as a service (PaaS), desktop as a service (DaaS), hosted software as a service, mobile backend as a service (MBaaS), information technology management as a service (ITMaaS), etc. In some embodiments, the various functional components of the e-commerce platform 82 can be implemented to be suitable for operation on various platforms and operating systems. For example, for an online store, its administrator users enjoy the same or similar functions regardless of various embodiments such as iOS, Android, HomonyOS, or web pages.
[0037] The e-commerce platform 82 can realize the corresponding independent station for each merchant to run its corresponding online store, and provide the merchant with the corresponding business management engine instance for the merchant to establish, maintain and run one or more online stores in one or more independent stations. The business management engine instance can be used for content management, task automation and data management of one or more online stores, and various specific business processes of the online store can be configured through interfaces or built-in components to support the implementation of business activities. The independent station is the infrastructure of the e-commerce platform 82 with cross-border service functions. Merchants can maintain their online stores more centrally and autonomously based on the independent station. The independent station usually has a domain name and storage space dedicated to the merchant, and different independent stations are relatively independent. The e-commerce platform 82 can provide standardized or personalized technical support for a large number of independent stations, so that merchant users can customize their own business management engine instance and use this business management engine instance to maintain one or more online stores they own.
[0038] The online store can implement backend configuration and maintenance by having the merchant user log in to its business management engine instance as an administrator. With the support of various online services provided by the infrastructure of the e-commerce platform 82, the merchant user can configure various functions in its online store as an administrator, view various data, etc. For example, the merchant user can manage various aspects of its online store, such as viewing the online store's recent activities, updating the online store's product catalog, managing orders, recent visit activities, total order activities, etc.; the merchant user can also view more detailed information about the business and visitors to the merchant's online store by obtaining reports or metrics, such as showing a sales summary of the merchant's overall business, specific sales and participation data of active sales marketing channels, etc.
[0039] The e-commerce platform 82 may provide communication facilities and associated merchant interfaces for providing electronic communications and marketing, such as utilizing electronic message aggregation facilities to collect and analyze communication interactions between merchants, consumers, merchant devices, customer devices, point-of-sale devices, etc., aggregating and analyzing communications, such as for increasing the potential for providing product sales, etc. For example, a consumer may have a question related to a product, which may generate a dialogue between the consumer and the merchant (or an automated processor-based agent on behalf of the merchant), where the communication facility is responsible for interacting and providing the merchant with analysis on how to increase the probability of a sale.
[0040] In some embodiments, an application suitable for installation in a terminal device can be provided to serve the access needs of different users, so that various users can access the e-commerce platform 82 by running the application in the terminal device, such as the merchant backend module of the online store in the e-commerce platform 82, etc. In the process of implementing business activities through these functions, the e-commerce platform 82 can implement various functions related to supporting the implementation of business activities as middleware or online services and open corresponding interfaces, and then implant the toolkit corresponding to the interface access function into the application to implement function expansion and task implementation. The business management engine can include a series of basic functions, and expose these functions to online services and / or application calls through APIs. Online services and applications use corresponding functions by remotely calling corresponding APIs.
[0041] With the support of various components of the business management engine instance, the e-commerce platform 82 can provide online shopping functions, allowing merchants to establish connections with customers in a flexible and transparent manner. Consumer users can select items online, create product orders, provide the delivery address of the goods in the product order, and complete the payment confirmation of the product order. Then, the merchant can review and complete or cancel the order. The review component carried by the business management engine instance can realize the compliance use of business processes to ensure that the order is suitable for fulfillment before actual fulfillment. Orders may sometimes be fraudulent and need to be verified (such as ID card checks). There is a payment method that requires merchants to wait to ensure that funds are received, which can play a role in preventing such risks, etc. Order risks may be generated by fraud detection tools submitted by third parties through order risk APIs, etc. Before fulfillment, merchants may need to obtain payment information or wait to receive payment information in order to mark the order as paid, so that the merchant can prepare to deliver the product. Such situations can be reviewed accordingly. The review process can be implemented by the fulfillment component. Merchants can use the fulfillment component to review, adjust work, and trigger related fulfillment services, such as: manual fulfillment services, which are used when merchants pick and pack products in boxes, purchase shipping labels and enter their tracking numbers, or simply mark items as fulfilled; custom fulfillment services, which can define email notifications; API fulfillment services, which can trigger third-party applications to create fulfillment records in third parties; legacy fulfillment services, which can trigger custom API calls from the business management engine to third parties; gift card fulfillment services. You can provide the generation of numbers and activate gift cards. Merchants can use the order printer application to print shipping orders. The fulfillment process can be executed when the items are packed in boxes and ready for shipping, tracking, delivery, consumer receipt verification, etc.
[0042] The e-commerce platform 82 can provide plug-in services to all independent station stores therein. The plug-in service is a service provided by the e-commerce platform 82 to the merchants of the independent station stores through the plug-in system developed and maintained by the e-commerce platform 82. The plug-in system provides multiple plug-ins with different functions, such as but not limited to, intelligent customer service plug-in: it can be used to act as the customer service role of the independent station store, and automatically reply to some preset consulting questions and / or scripts based on the preset question and answer data of the independent station store; product image design plug-in: it can be used to use the layer template data or default layer template data set by the merchants of the independent station store to further design the product header image, product detail image and other product images to enhance the marketing effect of the product image; logistics transfer order search plug-in: it can be used to use the product title data of the independent station store to retrieve the corresponding logistics transfer order; data analysis plug-in: it can be used to help the independent station store collect, analyze and display the operation data of the store. Data, including traffic sources, customer behavior, sales trends, etc., so that merchants can make more informed business decisions; Inventory management plug-in: can be used to monitor and manage the inventory data of independent station stores in real time, and issue alarms when inventory is insufficient to avoid overselling and out-of-stock situations; Marketing campaign management plug-in: can be used to create and track various promotional activities, such as coupons, limited-time discounts, member points, etc., to attract consumers and increase sales; Marketing promotion plug-in: can be used to use artificial intelligence technology to construct marketing promotion tweets based on the product data and / or marketing campaign data of the independent station store, and send them to social media, search engines, product audiences and other promotion channels associated with the independent station store; Store decoration plug-in: can be used to match the corresponding front-end decoration interface template based on the product data and / or marketing campaign data of the independent station store, so as to optimize the visual effect of the store decoration and improve the efficiency of the store decoration.
[0043] An associative question-and-answer method of the present application can be programmed as a computer program product and deployed in a client or server for execution. For example, in the exemplary application scenario of the present application, it can be deployed and implemented in a server of an e-commerce customer service platform, thereby accessing an interface opened after the computer program product is running and performing human-computer interaction with the process of the computer program product through a graphical user interface to execute the method.
[0044] See also Figure 2 In a typical embodiment of the present application, an associative question-answering method comprises the following steps:
[0045] Step S1100: respond to a customer service activation event triggered by a user, obtain a user question text corresponding to the event, determine a semantic matching score and a literal matching score between the user question text and each similar question text in a knowledge base, and fuse them into a target matching score, wherein the knowledge base includes a plurality of preset standard question texts, and each standard question text corresponds to a preset standard answer text and at least one similar question text;
[0046] In order to help its users solve problems encountered during shopping, provide timely help and support, and thus improve the user's shopping experience, the e-commerce platform provides customer service to users. Furthermore, in order to provide users with convenient and timely customer service, the e-commerce platform usually sets up various customer service entrances. For example, a customer service entrance may be set up on the shopping cart or checkout page to facilitate users to quickly seek help when they encounter problems during the purchase process; a customer service entrance will be set up on the product recommendation page or product details page so that users can get timely help when browsing products, etc. Users can use these customer service entrances to enable the customer service of the e-commerce platform and have real-time online chat exchanges with the customer service. In this process, the user edits and enters the corresponding user question text according to his question, and provides the user question text to the customer service, thereby triggering the generation of a customer service activation request and submitting it to the server of the e-commerce platform. The user usually refers to the buyer of the product. The customer service can be operated and maintained by the e-commerce platform itself or by an online store operated within the e-commerce platform. The customer service activation request carries the user question text.
[0047] The server of the e-commerce platform receives the customer service activation request, responds to the customer service activation event, and obtains the user question text carried by the customer service activation request. Further, in one embodiment, a language model pre-trained to convergence can be used to encode the vectorized embedding representation corresponding to the semantics of the user question text as a user question semantic vector according to the semantics of the user question text. Then, on the one hand, the similarity between the user question semantic vector and the similar question semantic vector of each similar question text in the knowledge base is calculated, which corresponds to the semantic matching score between the user question text and each similar question text, wherein the similar question semantic vector of each similar question text in the knowledge base is determined in advance by the language model. The calculation of the similarity between the corresponding two vectors can be implemented by using any one of the algorithms of dot product, cosine, Gaussian distance, MLP, and similarity matrix, and those skilled in the art can select as needed. The language model can be any one of the models such as Word2Vec, FastText, ELMo, and those skilled in the art can select and apply as needed. On the other hand, the BM25 algorithm is used to calculate the literal matching score between the user question text and each similar question text in the knowledge base. Then, the semantic matching score and literal matching score corresponding to each similar question text are normalized so that the scores of different dimensions are uniformly mapped to the same value range (usually [0,1]) to better compare their importance and / or conduct further analysis. Then, for each similar question text, the normalized semantic matching score and literal matching score of the similar question text are added and then divided by two to obtain the target matching score, thereby obtaining the target matching score corresponding to each similar question text. The normalization can be implemented by any algorithm such as truncation, binning, logarithmic transformation, min-max normalization, center normalization, etc. as needed by technical personnel in the field.
[0048] For customer service operated and maintained by the e-commerce platform itself, the knowledge base on which it relies to provide services is usually constructed by collecting and organizing a large amount of user consultation data. These data may come from common questions users ask during the shopping process, historical conversation records of customer service, and user feedback. The e-commerce platform will standardize these questions and corresponding replies to form a preset standard question text and a corresponding standard answer text. At the same time, in order to improve the response efficiency and accuracy of customer service, at least one similar question text will be created for each standard question text. These similar question texts are semantically similar to the standard question text, but may differ in expression. In this way, the knowledge base of the e-commerce platform can cover a wide range of user question texts, and the customer service can quickly and accurately respond to user questions through semantic matching and literal matching.
[0049] For the customer service of online stores operated by the e-commerce platform, the knowledge base construction method relied on to provide services is similar to that of the customer service operated by the e-commerce platform itself, but it is more focused on the goods and services operated by the store. The store's operation and maintenance personnel will provide detailed information related to the store's goods, such as product features, FAQs, promotional activities, etc. In addition, they may also customize and standardize the standard question texts and corresponding standard answer texts in the knowledge base based on the needs and feedback of their specific user groups. Similarly, at least one similar question text will be created for each standard question text. The customer service will also use semantic matching and literal matching technology to provide personalized and accurate customer service. Such a knowledge base not only helps to improve user satisfaction, but also enhances the store's professional image and service quality.
[0050] Step S1200, filtering out similar question texts whose target matching scores meet preset conditions to construct an associative question set, and sending the associative question set to the user;
[0051] According to the target matching score corresponding to each similar question text, all similar question texts are sorted in descending order of the target matching score, and N similar question texts with target matching scores exceeding the preset threshold and ranked at the top are screened out. In one embodiment, all the screened out similar question texts are respectively regarded as associative question texts related to the user question text, so these similar question texts are collected to form the associative question set. Those skilled in the art can set the preset threshold and N as needed; in another recommended embodiment, according to the standard question text associated with each screened out similar question text in the knowledge base, it is confirmed whether each different standard question text is associated with more than one similar question text. When the standard question text is associated with more than one similar question text, the similar question text with the highest target matching score among these similar question texts is determined to be regarded as the associative question text related to the user question text; when the standard question text is associated with one similar question text, it is confirmed that the similar question text is regarded as the associative question text related to the user question text. The similar question texts associated with each different standard question text and regarded as associative question texts are collected to form the associative question set, so as to ensure the associative quality and associative scope of the associative question set, while avoiding information overload.
[0052] The associative question set is sent to the user, so that the user can select similar question texts corresponding to the user's question text from the associative question set according to his own needs, thereby enabling the user to quickly complete the relatively incomplete input content of the user's question text and / or correct the relatively inaccurate input content of the user's question text, or, the user can refer to the similar question texts in the associative question set to further clarify his own questions, thereby optionally changing the user's question text.
[0053] Step S1300, responding to the associative question answering event triggered by the user, obtaining a similar question text selected by the user in the associative question set corresponding to the event, and recalling a standard answer text corresponding to the similar question text in the knowledge base;
[0054] The user can select similar question texts from the associative question set according to his / her own needs, and provide the similar question texts to the customer service, triggering the generation of an associative question answering request and submitting it to the server, wherein the associative question answering request carries the similar question texts.
[0055] The server receives the associative question answering request, responds to the associative question answering event, obtains the similar question text carried in the associative question answering request, determines the standard answer text associated with the similar question text from the knowledge base, and recalls it.
[0056] Step S1400: determine the response expression style corresponding to the user's question text, rewrite the standard response text into a target response text matching the response expression style and push it to the user.
[0057] In one embodiment, the user's historical customer service communication records and behavior information sequence are obtained. The historical customer service communication records include all user question texts provided by the user to the customer service during the recent chat communication between the user and the customer service. The behavior information sequence includes the description text of the product corresponding to each operation behavior of the user on the e-commerce platform in the recent period. The recent period can be set as needed by technicians in this field, such as one week from the current time, one month from the current time, three months from the current time, etc. The operation behavior includes any one or any combination of click behavior, search behavior, like behavior, share behavior, collection behavior, purchase behavior, etc. for the corresponding product. The description text refers to all texts related to the description of the corresponding product, including any one or any combination of product title, product details text, product price, product parameters, category description text, etc. After the historical customer service communication record is finally spliced with the user question text corresponding to the customer service activation event, it is input into the style classification model pre-trained to a convergent state together with the behavior information sequence, and the embedding layer in the style classification model encodes the embedding vector corresponding to the historical customer service communication record and the embedding vector corresponding to the behavior information sequence, and each embedding vector is input into the corresponding feature representation layer, and the feature vectors output by the two feature representation layers are obtained. After the two feature vectors are spliced together, they are classified and mapped by the fully connected layer, and the classification probability corresponding to each style description label in the preset answer expression style library is determined, and the style description label with a classification probability exceeding the preset threshold is determined as the answer expression style corresponding to the user question text. The embedding layer can be any text representation model such as Word2Vec, FastText, ELMo, etc., and the feature representation layer can be LSTM or GRU, etc., which is used to analyze the temporal features in the user behavior sequence and historical communication records, which usually include the expression logic, word usage habits, emotional changes and other feature information related to the user's preferred expression style of the user's question. The classification probability represents that the corresponding style description label is the confidence corresponding to the style description text applicable to the answer to the user question text. The preset threshold can be set by those skilled in the art as needed. The style description tags in the response expression style library can be set by those skilled in the art as needed according to the disclosure herein, and can also refer to the further disclosure of the subsequent embodiments. The specific training process of the style classification model can be flexibly implemented by those skilled in the art according to the reasoning process and model architecture of the model herein.
[0058] A large language model can be used to rewrite the standard response text according to the response expression style, generate the corresponding target response text, and push it to the user to respond to the user's question. The large language model is suitable for text processing in the field of NLP. It is pre-trained to convergence using an extremely large corpus, and acquires the ability to generate human language, and has a certain degree of accurate text semantic understanding and logical reasoning ability. The selection of the large language model includes OPT, Chinchilla, PaLM, LLaMA, Alpaca, Vicuna, GPT3, GPT3.5, GPT4, etc., and technicians in this field can choose to implement it as needed.
[0059] It can be known from the typical embodiments of the present application that the technical solution of the present application has many advantages, including but not limited to the following aspects:
[0060] This application obtains the user's question text when the user enables customer service, and performs semantic and literal matching with the standard question text in the knowledge base, and combines the scores obtained from the two matches to form a target matching score, so as to screen out similar question texts that meet the preset conditions to construct an associative question set and send it to the user for selection. When the user selects a similar question text from the associative question set, the corresponding standard answer text is recalled from the knowledge base, and according to the answer expression style of the user's question text, the standard answer text is rewritten into a target answer text that matches the style, and finally pushed to the user. On the one hand, by combining semantics and literal aspects, a deep understanding of the user's questions is ensured, so that the subtle differences and deep intentions of the user's questions can be captured, thereby providing more accurate responses. On the other hand, an associative question set is provided to the user to display other question texts that are highly related to the user's question text, so that the user can examine the problem more comprehensively, so that the original problem can be quickly corrected or completed. On the other hand, it can identify and match the user's response expression style and generate humanized response text, which not only improves user satisfaction, but also makes the response more in line with the user's communication habits, reduces the user's resistance to machine replies, and enhances the interactive communication experience between the user and customer service.
[0061] See also Figure 3 In a further embodiment, after step S1100, determining that the semantic matching score and the literal matching score between the user's question text and each similar question text in the knowledge base are merged into a target matching score, the following steps are included:
[0062] Step S1101: when all target matching scores do not meet the preset conditions, a preset simulated real answer model is used to generate a simulated real answer text corresponding to the user question text;
[0063] The maximum value among the target matching scores corresponding to each similar question text is screened out. When the maximum value is less than the preset threshold, it is confirmed that all target matching scores do not meet the preset conditions at this time, which means that there is no similar question text in the knowledge base that is highly matched with the user question text. In this regard, a simulated real answer text corresponding to the user question text is generated through a simulated real answer model that has been pre-trained to a convergence state.
[0064] The simulated real response model is pre-trained to a convergence state and acquires the ability to generate a simulated real response text corresponding to the question text. The simulated real response model is a model suitable for text generation tasks in the field of NLP. The selection includes RoBERTa, T5, GPT3, GPT3.5, GPT4, etc., and those skilled in the art can select and implement it as needed.
[0065] Specifically, for the training process of the simulated real response model, at least one user question text provided by a user to the manual customer service during the chat process between multiple different users and the manual customer service can be collected in advance, as well as the response text used by the manual customer service to respond to each user question text. Each user question text is used as a single training sample, and the response text corresponding to each training sample is used as the supervision label of the training sample. All training samples and their supervision labels are collected to form a training set. A single training sample and its supervisory label in the training set are used, and the simulated real answer model is used to generate the simulated real answer text corresponding to the training sample. The preset cross entropy loss function is called, and the loss value corresponding to the simulated real answer text is calculated based on the supervisory label. When the loss value reaches the preset threshold, it indicates that the simulated real answer model has been trained to a convergence state, so that the training of the simulated real answer model can be terminated; when the loss value does not reach the preset threshold, it indicates that the simulated real answer model has not converged, so the model is gradient updated according to the loss value, usually by back propagation to correct the weight parameters of each link of the model to make the model closer to convergence, and then continue to call other training samples to iteratively train the simulated real answer model until the simulated real answer model is trained to a convergence state. The preset threshold can be flexibly set by those skilled in the art.
[0066] Step S1102: determining a response correlation score between the simulated response text and each standard response text in the knowledge base, and screening out target standard response texts whose response correlation scores meet preset conditions;
[0067] The response correlation score between the simulated response text and each standard response text in the knowledge base is determined, and the target standard response text whose response correlation score meets the preset conditions is screened out.
[0068] In one embodiment, a language model pre-trained to convergence can be used to encode the semantics of the simulated response text according to the semantics of the simulated response text, and the vectorized embedded representation corresponding to the semantics can be encoded as a simulated response semantic vector. According to the semantics of each standard response text in the knowledge base, the vectorized embedded representation corresponding to each semantics can be encoded, which can be used as a standard response semantic vector. The similarity between the simulated response semantic vector and each standard response semantic vector is calculated, which corresponds to the response correlation score between the simulated response text and each standard response text, and then the maximum value of all response correlation scores is determined. When the maximum value exceeds the preset threshold, it is confirmed that the maximum value meets the preset conditions at this time, and the standard response text of the maximum value is used as the target standard response text.
[0069] Step S1103: determine the response expression style corresponding to the user's question text, rewrite the target standard response text into a target response text matching the response expression style and push it to the user, and store the user's question text as a similar question text associated with the target standard response text in the knowledge base.
[0070] Reference may be made to step S1400 or related disclosures of some subsequent embodiments to determine the response expression style corresponding to the user's question text, and this step will not be described in detail.
[0071] The large language model can be used to rewrite the target standard answer text according to the answer expression style, generate the corresponding target answer text, push it to the user, and answer the user's question. And the user's question text is stored in the knowledge base as a similar question text corresponding to the target standard answer text.
[0072] In this embodiment, when all target matching scores do not meet the preset conditions, a simulated real answer text corresponding to the user's question text is generated by simulating the real answer model, and a target standard answer text that highly matches it is determined, and then the target standard answer text is rewritten into a target answer text that matches the answer expression style corresponding to the user's question text and is pushed to the user. It can be seen that a high customer service answer rate and user satisfaction can be guaranteed, and by reasonably incorporating user question texts into the knowledge base, the richness of similar expressions in the knowledge base can be expanded, continuous optimization can be promoted, customer service adaptability can be enhanced, and the overall intelligence level and service quality can be improved.
[0073] See also Figure 4 In a further embodiment, step S1100, determining that the semantic matching score and the literal matching score between the user's question text and each similar question text in the knowledge base are fused into a target matching score, comprises the following steps:
[0074] Step S1110: using a preset semantic matching model to determine a user question semantic vector of the user question text, and according to the similarity between the question semantic vector and the similar question semantic vector of each similar question text in the knowledge base, correspondingly determining a semantic matching score between the user question text and each similar question text, wherein the semantic matching model is used in advance to determine the similar question semantic vectors corresponding to all similar question texts in the knowledge base;
[0075] In one embodiment, the semantic matching model is selected as Sentence-Bert, which includes two semantic representation branches implemented by the Bert model, and a matching layer implemented by any one of the algorithms of dot product, cosine, Gaussian distance, MLP, and similarity matrix. The semantic matching model is pre-trained to learn the ability to determine the similarity between the semantic representation of the user's question text and the semantic representation of similar question texts. The specific training process of the model is known to those skilled in the art, so it is not described in detail. The deep semantic information of the user's question text is extracted through a semantic representation branch in the semantic matching model, and the user semantic vector corresponding to the deep semantic information is obtained by vectorizing the deep semantic information. Then, the deep semantic information of each similar question text extracted in advance through another semantic representation branch in the semantic matching model is obtained, and the similar question semantic vector corresponding to each deep semantic information is obtained by vectorizing the deep semantic information. Further, the similarity between the user semantic vector and each similar question semantic vector is determined through the matching layer in the semantic matching model, which corresponds to the semantic matching score between the user question text and each similar question text.
[0076] Step S1120: using a preset information retrieval algorithm to determine a literal matching score between the user's question text and each similar question text in the knowledge base;
[0077] The information retrieval algorithm implemented by the BM25 algorithm determines the score between the user question text and each similar question text in the knowledge base. It can be understood that the higher the score means that the keywords in the user question text appear more frequently in the corresponding similar question texts, and at the same time, these keywords are not too common in the entire knowledge base, maintaining a certain degree of important distinction. This combination of frequency and important distinction can reflect the literal similarity between the two texts, so the higher the score, the closer the two texts are in terms of literal meaning. Therefore, the score corresponding to each similar question text is used as the literal matching score.
[0078] Step S1130: For each similar question text, the semantic matching score and the literal matching score corresponding to the similar question text are weighted by their respective preset weights and then summed to obtain a target matching score.
[0079] Then, the semantic matching score and literal matching score corresponding to each similar question text are normalized so that the scores of different dimensions are uniformly mapped to the same value range (usually [0, 1]) to better compare their importance and / or conduct further analysis. In one embodiment, the literal matching score is taken as an example to specifically describe its normalization (the semantic matching score can be normalized in the same way as needed), and the exemplary formula is as follows:
[0080]
[0081] Where: typeface normalization_score is the normalized literal matching score of similar question texts, typeface score is the literal matching score of the similar question text before normalization, typeface min_score The minimum value of the literal matching scores corresponding to all similar question texts, typeface max_score The maximum value of the literal matching scores corresponding to all similar question texts.
[0082] Then, for determining the target matching score corresponding to each similar question text, an exemplary formula is as follows:
[0083] final score =α*semantics normalization_score +(1-α)*typeface Normalization_score
[0084] Among them: final score is the target matching score of similar question texts, and α is semantics normalization_score The preset weights can be set by technicians in this field as needed. normalization_score is the normalized semantic matching score of the similar question text, typeface normalization_score It is the normalized literal matching score of the similar question text.
[0085] In this embodiment, a process of determining a target matching score between a user's question text and each similar question text in a knowledge base is disclosed. In this process, both semantic and literal matching dimensions are comprehensively considered to ensure the reliability and accuracy of the target matching score.
[0086] See also Figure 5 In a further embodiment, before step S1100, determining that the semantic matching score and the literal matching score between the user's question text and each similar question text in the knowledge base are merged into a target matching score, the following steps are included:
[0087] Step S2110: In response to the user question rewriting event, segment the user question text to obtain a segmentation sequence consisting of all corresponding word units;
[0088] In order to standardize the user question text and improve the accuracy of subsequent matching, the user question text can be processed. After the server receives the user question text corresponding to the customer service activation event, it further responds to the user question rewriting event and uses a word segmentation algorithm to segment the user question text. All word units obtained from the corresponding word segmentation form a word segmentation sequence. The word segmentation algorithm can be Jieba word segmentation, n-gram word segmentation, WordPi ece word segmentation, CRF word segmentation, semantic word segmentation, etc., and those skilled in the art can flexibly choose one to implement.
[0089] Step S2120: the confidence level of semantic equivalence between each word in the word segmentation sequence and each standard professional word in a preset standard word library, wherein the standard word library includes standard professional words in any one or more of all standard question texts, similar question texts, and standard answer texts in the knowledge base;
[0090] The language model pre-trained to a convergent state is used to encode each word in the word segmentation sequence to obtain the word encoding vector corresponding to the semantics of each word, and then the professional word encoding vector corresponding to the semantics of each standard professional word obtained by pre-encoding each standard professional word in the standard vocabulary using the language model is obtained. Further, for each word encoding representation, the similarity between the word encoding representation and each professional word encoding vector is calculated as the confidence of semantic equivalence between the corresponding word and each standard professional word, thereby obtaining the confidence of semantic equivalence between each word and each standard professional word. The standard vocabulary can be set as needed by those skilled in the art according to the disclosure herein, and can also refer to the further disclosure of some subsequent embodiments.
[0091] Step S2130: determine the words to be replaced in the word segmentation sequence whose confidence level of semantic equivalence meets preset conditions and their corresponding standard professional words, and replace all the words to be replaced in the user question text with their corresponding standard professional words.
[0092] The word-grams in the word segmentation sequence whose semantic equivalence confidence exceeds a preset threshold are determined as the word-grams to be replaced, and for each of the semantic equivalence confidences, the word-grams to be replaced corresponding to the semantic equivalence confidence and the standard professional words in the standard vocabulary are determined, and the standard professional words are used as the replacement words corresponding to the word-grams to be replaced, and then for each word-gram to be replaced in the user's question text, the word-gram to be replaced is replaced with its corresponding replacement word, thereby achieving rewriting of the user's question text.
[0093] In this embodiment, it is disclosed that based on the semantic equivalence confidence between the word-unit in the user question text and the standard professional word in the standard vocabulary, the word-unit to be replaced that meets the semantic equivalence confidence condition in the user question text and its corresponding standard professional word for replacing the word-unit to be replaced are determined, and then the rewriting of the user question text is completed after the corresponding replacement, thereby ensuring the accuracy and reliability of the rewritten user question text.
[0094] See also Figure 6 In a further embodiment, before step S2110, responding to a user's question and rewriting an event, the following steps are included:
[0095] Step S2101: Segment all standard question texts, similar question texts, and standard answer texts in the knowledge base to obtain a segmentation set consisting of all corresponding word units;
[0096] A word segmentation algorithm is used to segment all standard question texts, similar question texts, and standard answer texts in the knowledge base, and all word units obtained from the corresponding segmentation constitute a word segmentation set. The word segmentation algorithm can be Jieba segmentation, n-gram segmentation, WordPiece segmentation, CRF segmentation, semantic segmentation, etc. Technical personnel in this field can flexibly choose one to implement.
[0097] Step S2102: using a vocabulary classification model to identify word-units in the word segmentation set that belong to standard professional vocabulary as standard professional words, and word-units that belong to common spoken vocabulary as common spoken words;
[0098] The vocabulary classification model is pre-trained to a convergent state, and acquires the ability to determine whether the input word belongs to a standard professional vocabulary or a common spoken vocabulary. The specific training process of the model is known to those skilled in the art, so it is not described in detail. The vocabulary classification model can be a model suitable for named entity recognition in the NLP field, such as RoBERTa+CRF, Bi LSTM+CRF, IDCNN+CRF, Bert+Bi LSTM+CRF, FLAT, etc. It can also be a model used for text classification in the NLP field, such as a deep semantic representation model followed by a classification layer. The deep semantic representation model is such as RoBERTa, Transfomer Encoder, MPNet, Bi LSTM, GPT, etc. The classification layer can be a fully connected layer, MLP, etc., and those skilled in the art can choose to implement it as needed.
[0099] Step S2103: store all standard professional words in the word segmentation set in a standard word library.
[0100] Build a standard vocabulary with all standard professional words in the word set.
[0101] In this embodiment, the construction process of the standard vocabulary is disclosed, which can quickly and accurately identify all standard professional words in the knowledge base, ensuring the accuracy and reliability of the standard vocabulary constructed thereby.
[0102] See also Figure 7 In a further embodiment, step S1400, determining the answer expression style corresponding to the user question text, comprises the following steps:
[0103] Step S1410: using a preset style recognition model to classify and map the deep semantic representation of the user's question text, and determining the classification probability corresponding to each style description label in a preset answer expression style library;
[0104] The style recognition model is pre-trained to a convergence state and learns the ability to recognize the style description label corresponding to the text of the answer question. The style recognition model is selected to be a model used for text classification in the NLP field, such as a deep semantic representation model followed by a classification layer. The deep semantic representation model is, for example, RoBERTa, Transfomer Encoder, MPNet, BiLSTM, GPT, etc. The classification layer can be a fully connected layer, MLP, etc., and those skilled in the art can select and implement it as needed.
[0105] The user question text is input into the style recognition model, and the deep semantic representation model in the style recognition model extracts the deep semantic information of the user question text, and obtains the vectorized representation corresponding to the deep semantic information as the deep semantic representation. Then, the classification layer in the style recognition model maps the deep semantic representation to a plurality of preset binary categories, and the mapping result corresponding to each binary category includes the probability of mapping to the style description label represented by the category and the probability of mapping to the style description label not represented by the category, and the sum of these two probabilities is 1. In addition, different binary categories correspond to different style description labels, and the number of binary categories is the total number of all style description labels in the answer expression style library. The probability of mapping to the style description label represented by the category in the mapping result corresponding to each binary category is used as the classification probability of the style description label, thereby obtaining the classification probability corresponding to each style description label in the answer expression style library. The specific training process of the style recognition model can be flexibly implemented by those skilled in the art according to the reasoning process and model architecture of the model here.
[0106] The style description tags in the response expression style library may include friendly, cordial, professional, formal, concise, humorous, witty, detailed, encouraging, guiding, empathetic, positive, respectful, polite, individual, trendy, direct, patient, meticulous, relaxed, etc., and can also be set as needed by technical personnel in this field.
[0107] Step S1420: determine a style description tag whose classification probability meets a preset condition as the answer expression style corresponding to the user question text.
[0108] According to the classification probability corresponding to each style description tag, the style description tags whose classification probability exceeds a preset threshold are determined, and these style description tags are taken as the answer expression styles corresponding to the user question text.
[0109] In this embodiment, a process of determining the response expression style corresponding to the user's question text is disclosed, which can ensure the accuracy and reliability of the response expression style and the overall execution is efficient.
[0110] See also Figure 8 In a further embodiment, step S1400, rewriting the standard response text into a target response text matching the response expression style and pushing it to the user, comprises the following steps:
[0111] Step S1401: embed the standard response text and the response expression style into a preset prompt template to obtain a prompt text, which is used to guide the large language model to rewrite the standard response text accordingly according to the response expression style to generate a corresponding target response text;
[0112] The prompt template is called, and the prompt template includes a task description, a response expression style to be embedded, and a standard response text to be embedded. Those skilled in the art may refer to the following disclosure to flexibly set the prompt template. An exemplary prompt template is given as follows: the task description in the prompt template: "According to the response expression style and standard response text provided below, rewrite the standard response text into a text that matches the response expression style.", the conversation context to be embedded in the prompt template: "Response expression style: ${response style}$", and the standard response text to be embedded: "Standard response text: ${standard text}$". The standard response text and the response expression style may be correspondingly embedded in the prompt template to obtain the corresponding prompt text.
[0113] Step S1402: using the large language model to generate the target response text according to the prompt text.
[0114] The large language model is suitable for text processing in the field of NLP. It is pre-trained with an extremely large corpus until convergence, acquires the ability to generate human language, and has a certain degree of accurate text semantic understanding and logical reasoning ability. The selection of the large language model includes OPT, Chinchilla, PaLM, LLaMA, Alpaca, Vicuna, GPT3, GPT3.5, GPT4, etc., and technicians in this field can select and implement it as needed.
[0115] The large language model conducts in-depth semantic analysis and contextual understanding of the prompt text to clarify the requirements for the corresponding generated text. Then, the model's decoder gradually constructs and generates the required text based on the understanding obtained in the encoding phase, ensuring that the text not only conforms to the response expression style, but also can accurately convey the core information of the standard response text, and finally outputs a text that meets the style and content requirements set by the demand as the target response text.
[0116] In this embodiment, it is disclosed that the standard response text is rewritten into a target response text that matches the response expression style, which is efficient in execution and ensures the accuracy and reliability of the obtained target response text.
[0117] See also Fig. 9 , an associative question-answering device provided to meet one of the purposes of the present application is a functional embodiment of the associative question-answering method of the present application. On the other hand, the device is an associative question-answering device provided to meet one of the purposes of the present application, including a first event response module, a user question association module, a second event response module and a standard answer rewriting module, wherein the first event response module is used to respond to a customer service activation event triggered by a user, obtain the user question text corresponding to the event, determine the semantic matching score and the literal matching score between the user question text and each similar question text in the knowledge base, and merge them into a target matching score, wherein the knowledge base includes a plurality of preset standard question texts, each standard question text A standard answer text and at least one similar question text are preset corresponding to the question text; a user question association module is used to screen out similar question texts whose target matching scores meet preset conditions to construct an associative question set, and send the associative question set to the user; a second event response module is used to respond to the associative question-answer event triggered by the user, obtain the similar question text selected by the user in the associative question set corresponding to the event, and recall the standard answer text corresponding to the similar question text in the knowledge base; a standard answer rewriting module is used to determine the answer expression style corresponding to the user question text, rewrite the standard answer text into a target answer text that matches the answer expression style, and push it to the user.
[0118] In a further embodiment, the first event response module includes: a first text generation submodule, which is used to generate a simulated response text corresponding to the user question text by using a preset simulated real response model when all target matching scores do not meet the preset conditions; a standard response screening submodule, which is used to determine the response correlation score between the simulated response text and each standard response text in the knowledge base, and screen out the target standard response text whose response correlation score meets the preset conditions; a similar question expansion submodule, which is used to determine the response expression style corresponding to the user question text, rewrite the target standard response text into a target response text that matches the response expression style and push it to the user, and store the user question text as a similar question text associated with the target standard response text in the knowledge base.
[0119] In a further embodiment, the first event response module includes: a semantic matching submodule, which is used to determine the user question semantic vector of the user question text by adopting a preset semantic matching model, and determine the semantic matching score between the user question text and each similar question text according to the similarity between the question semantic vector and the similar question semantic vector of each similar question text in the knowledge base, wherein the similar question semantic vectors corresponding to all similar question texts in the knowledge base are determined in advance by the semantic matching model; a literal matching submodule, which is used to determine the literal matching score between the user question text and each similar question text in the knowledge base by adopting a preset information retrieval algorithm; a target matching submodule, which is used to, for each similar question text, weightedly sum the semantic matching score and the literal matching score corresponding to the similar question text with their respective preset weights to obtain a target matching score.
[0120] In a further embodiment, the first event response module includes: an event response submodule, which is used to respond to the user question rewriting event, segment the user question text, and obtain a segmentation sequence composed of all corresponding word units; a confidence determination submodule, which is used to determine the semantic equivalence confidence between each word unit in the segmentation sequence and each standard professional word in a preset standard vocabulary, and the standard vocabulary includes standard professional words in any one or any multiple of all standard question texts, similar question texts, and standard answer texts in the knowledge base; a word unit replacement submodule, which is used to determine the word units to be replaced in the segmentation sequence whose semantic equivalence confidence meets the preset conditions and their corresponding standard professional words, and replace all the word units to be replaced in the user question text with their corresponding standard professional words.
[0121] In a further embodiment, the event response submodule includes: a text segmentation submodule, which is used to segment all standard question texts, similar question texts, and standard answer texts in the knowledge base to obtain a segmentation set consisting of all corresponding word units; a vocabulary classification submodule, which is used to use a vocabulary classification model to identify word units in the segmentation set that belong to standard professional vocabulary as standard professional words, and word units that belong to ordinary spoken vocabulary as ordinary spoken words; and a vocabulary storage submodule, which is used to store all standard professional words in the segmentation set in a standard vocabulary.
[0122] In a further embodiment, the standard answer rewriting module includes: a label classification submodule, which is used to use a preset style recognition model to classify and map the deep semantic representation of the user question text, and determine the classification probability corresponding to each style description label in a preset answer expression style library; a style determination submodule, which is used to determine the style description label whose classification probability meets preset conditions as the answer expression style corresponding to the user question text.
[0123] In a further embodiment, the standard response rewriting module includes: an input construction submodule, used to embed the standard response text and the response expression style into a preset prompt template to obtain a prompt text, thereby guiding the large language model to rewrite the standard response text accordingly according to the response expression style to generate a corresponding target response text; a second text generation submodule, used to use the large language model to generate the target response text according to the prompt text.
[0124] In order to solve the above technical problems, the present application also provides a computer device. Fig.10 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement an associative question-answering method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the associative question-answering method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] In this embodiment, the processor is used to execute Fig. 9 The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the associative question-and-answer device of this application, and the server can call the program code and data of the server to execute the functions of all submodules.
[0126] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the associative question-answering method of any embodiment of the present application.
[0127] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0128] To sum up, this application realizes efficient, accurate and humanized customer service.
[0129] It will be understood by those skilled in the art that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, changed, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted. Furthermore, the steps, measures, and schemes in the various operations, methods, and processes in the prior art that are open source and in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted.
[0130] The above is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for associative question and answer, It is characterized in that The steps include: In response to a customer service activation event triggered by a user, a user question text corresponding to the event is obtained, and a semantic matching score and a literal matching score between the user question text and each similar question text in a knowledge base are determined and merged into a target matching score, wherein the knowledge base includes a plurality of preset standard question texts, and each standard question text corresponds to a preset standard answer text and at least one similar question text; Filter out similar question texts whose target matching scores meet preset conditions to construct an associative question set, and send the associative question set to the user; In response to the associative question answering event triggered by the user, a similar question text selected by the user in the associative question set corresponding to the event is obtained, and a standard answer text corresponding to the similar question text in the knowledge base is recalled; The answer expression style corresponding to the user's question text is determined, and the standard answer text is rewritten into a target answer text matching the answer expression style and pushed to the user.
2. The associative question-answering method according to claim 1, It is characterized in that After determining that the semantic matching score and the literal matching score between the user's question text and each similar question text in the knowledge base are fused into a target matching score, the following steps are included: When all target matching scores do not meet the preset conditions, a preset simulated real answer model is used to generate a simulated real answer text corresponding to the user question text; Determine the response correlation score between the simulated response text and each standard response text in the knowledge base, and select the target standard response text whose response correlation score meets the preset conditions; Determine the answer expression style corresponding to the user's question text, rewrite the target standard answer text into a target answer text matching the answer expression style and push it to the user, and store the user's question text as a similar question text associated with the target standard answer text in a knowledge base.
3. The associative question-answering method according to claim 1, It is characterized in that Determine the semantic matching score and literal matching score between the user's question text and each similar question text in the knowledge base and fuse them into a target matching score, including the following steps: A user question semantic vector of the user question text is determined by using a preset semantic matching model, and a semantic matching score between the user question text and each similar question text is determined according to the similarity between the question semantic vector and the similar question semantic vector of each similar question text in the knowledge base, wherein the similar question semantic vectors corresponding to all similar question texts in the knowledge base are determined in advance by using the semantic matching model; Using a preset information retrieval algorithm to determine the literal matching score between the user's question text and each similar question text in the knowledge base; For each similar question text, the semantic matching score and the literal matching score corresponding to the similar question text are weighted by their respective preset weights and then summed to obtain a target matching score.
4. The associative question-answering method according to claim 1, It is characterized in that Before determining that the semantic matching score and the literal matching score between the user's question text and each similar question text in the knowledge base are fused into a target matching score, the following steps are included: In response to a user question rewriting event, segment the user question text to obtain a segmentation sequence consisting of all corresponding word units; The confidence level of semantic equivalence between each word in the word segmentation sequence and each standard professional word in a preset standard word library, wherein the standard word library includes standard professional words in any one or more of all standard question texts, similar question texts, and standard answer texts in the knowledge base; Determine the word elements to be replaced in the word segmentation sequence whose confidence of semantic equivalence meets the preset conditions and their corresponding standard professional words, and replace all the word elements to be replaced in the user question text with their corresponding standard professional words.
5. The associative question-answering method according to claim 4, It is characterized in that Before responding to user questions and rewriting events, the following steps are included: Segment all standard question texts, similar question texts, and standard answer texts in the knowledge base to obtain a segmentation set consisting of all corresponding word units; Using a vocabulary classification model to identify the word-units in the word segmentation set that belong to standard professional vocabulary as standard professional words, and the word-units that belong to common spoken vocabulary as common spoken words; All standard professional words in the word segmentation set are stored in a standard word library.
6. The associative question-answering method according to claim 1, It is characterized in that Determining the answer expression style corresponding to the user question text includes the following steps: Using a preset style recognition model to classify and map the deep semantic representation of the user's question text, and determine the classification probability corresponding to each style description label in a preset answer expression style library; A style description label whose classification probability meets a preset condition is determined as the answer expression style corresponding to the user question text.
7. The associative question-answering method according to claim 1, It is characterized in that Rewriting the standard response text into a target response text matching the response expression style and pushing it to the user comprises the following steps: The standard response text and the response expression style are embedded in a preset prompt template to obtain a prompt text, which is used to guide the large language model to rewrite the standard response text accordingly according to the response expression style to generate a corresponding target response text; The large language model is used to generate the target response text according to the prompt text.
8. An associative question-and-answer device, It is characterized in that include: A first event response module is used to respond to a customer service activation event triggered by a user, obtain a user question text corresponding to the event, determine a semantic matching score and a literal matching score between the user question text and each similar question text in a knowledge base, and fuse them into a target matching score, wherein the knowledge base includes a plurality of preset standard question texts, and each standard question text corresponds to a preset standard answer text and at least one similar question text; A user question association module is used to filter out similar question texts whose target matching scores meet preset conditions to construct an associative question set, and send the associative question set to the user; A second event response module is used to respond to the associative question answering event triggered by the user, obtain the similar question text selected by the user in the associative question set corresponding to the event, and recall the standard answer text corresponding to the similar question text in the knowledge base; The standard answer rewriting module is used to determine the answer expression style corresponding to the user's question text, rewrite the standard answer text into a target answer text matching the answer expression style and push it to the user.
9. A computer device comprising a central processing unit and a memory, It is 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, It is 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.
Citation Information
Patent Citations
Intelligent question and answer method and system
CN114637760A
Personalized dialogue method and system combined with sentiment analysis
CN116595181A
FAQ intelligent question-answering method and system in financial field
CN116628146A
Intelligent customer service response method and device, storage medium and computer equipment
CN117235212A
Cited By
Text-based SQL (Structured Query Language) statement acquisition method and equipment and medium
CN121070962A
Associative word generation method, associative word generation device, electronic equipment and storage medium
CN121457612A
