A method and system for identifying e-commerce customer service response intention
Through the combination of multi-module collaborative architecture and BERT model, the problem that existing NLU systems need to be retrained when facing new intentions is solved, flexible and efficient identification of new intentions is achieved, the accuracy and real-timeness of intention recognition are improved, and the service quality and operational efficiency of e-commerce customer service are improved.
Patent Information
- Application Number
- CN202510221158.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-27
AI Technical Summary
The existing NLU system based on classification model needs to be retrained when facing emerging intentions, which is time-consuming and labor-intensive, affecting real-time and effectiveness, and cannot meet the actual needs of e-commerce customer service response in a timely manner.
The e-commerce customer service response intention recognition method adopts a multi-module collaborative architecture, including recall module, sorting module and filtering module, uses the BERT model to select candidate intent from the intent library, determine the correlation score through pooling operations and similarity calculation, and finally filter through the CrossEncoder model to improve the accuracy of the response.
It realizes flexible and efficient identification of new intentions, improves the accuracy and real-timeness of intention recognition, overcomes the problems of training time-consuming and adapting to new intentions in the existing technology, and improves the service quality and operational efficiency of e-commerce customer service.
Smart Images

Figure CN119719316B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular, relates to a method and system for identifying the response intention of e-commerce customer service. Background Art
[0002] In today's booming e-commerce field, efficient and accurate customer service responses are crucial to improving user experience and promoting business growth. With the continuous expansion of e-commerce business and the increasing number of customer inquiries, the traditional method of manually handling customer service inquiries one by one can no longer meet the requirements of real-time and accuracy. Therefore, the introduction of intelligent intent recognition systems has become a key development direction in the field of e-commerce customer service.
[0003] 1. Improving response efficiency
[0004] E-commerce customer service needs to face a large number of customer inquiries every day, which cover many aspects such as product information inquiries, order processing, after-sales rights protection, etc. The intention recognition system can quickly analyze the true intention behind the customer's inquiry statement, so that customer service personnel do not need to spend a lot of time to understand and judge the core demands of each inquiry one by one, so that they can quickly locate the problem and give targeted answers. This greatly shortens the customer's waiting time and improves the overall response efficiency.
[0005] 2. Improving the accuracy of responses
[0006] Different customers may express the same intention in different ways, and it is sometimes difficult to accurately grasp the exact meaning of each inquiry based on human experience alone. The intent recognition system can accurately identify the customer's intent category by learning and analyzing a large amount of corpus, such as asking about product functions or complaining about logistics speed. Customer service personnel can give accurate responses that are more in line with customer needs based on the intent accurately identified by the system, reduce incorrect responses caused by misunderstanding of intent, and effectively improve customer satisfaction.
[0007] 3. Optimizing resource allocation
[0008] With the help of the intent recognition system, e-commerce companies can reasonably allocate customer service resources according to the distribution of inquiries with different intentions. For inquiries with common intentions, relatively less experienced customer service personnel can be assigned to handle them, because the system has already identified the intentions and the processing flow is relatively clear; while for inquiries with complex or rare intentions, experienced customer service personnel can be assigned to focus on responding. This resource allocation method helps to improve the efficiency of the use of corporate human resources and reduce operating costs.
[0009] Prior art Chinese patent application CN202311017413.6 discloses an RNN-driven e-commerce intelligent customer service conversation intention recognition method, including: S1, collecting a public customer service corpus, building a recurrent neural network classification model, and training an e-commerce intelligent customer service intention recognition model; S2, generating test samples: using the test data set in the public customer service dialogue corpus as seed data, generating character-level, word-level, and sentence-level test samples respectively; S3, calculating the test screening index on each generated test sample, and sorting the generated samples according to the screening index; S4, inputting the screened samples of each intent category into the e-commerce intelligent customer service intention recognition model for testing, obtaining the average accuracy of the model, judging the quality of the screened samples, and analyzing the test results; S5, enhancing the classification model, and performing enhanced retraining on the original model; S6, inputting new customer consultation data to enable the customer service system to recognize user intent with high accuracy.
[0010] The characteristic of RNN (recurrent neural network) is that it can process sequence data and has a good grasp of the order of text. In the e-commerce customer service scenario, it can understand the semantics of the entire sentence based on the order of words in the sentence, and thus infer the customer's intention, such as understanding the intention implied by the different situations mentioned by the customer when describing the order problem.
[0011] Although RNN can complete the intent recognition task well to a certain extent, there is an obvious limitation, that is, when faced with new intents, it needs to be retrained. In the field of e-commerce, with the continuous expansion of business, the upgrading of products and the increasing diversification of customer needs, new consulting intentions will continue to emerge. For example, when an electronic product with a new function is launched, the customer's consulting intention about the new function is not included in the previous training data. At this time, the existing classification model cannot directly and accurately identify these new intents. It is necessary to collect a large amount of corpus data containing new intents and readjust the model parameters for training. This is not only time-consuming and labor-intensive, but also when new intents appear frequently, it will seriously affect the real-time and effectiveness of the intent recognition system, and cannot meet the actual needs of e-commerce customer service responses in a timely manner. Summary of the invention
[0012] In view of this, the present invention provides an e-commerce customer service response intention recognition method and system, which can respond to the emergence of new intentions more flexibly and efficiently, and has a high accuracy and real-time intent recognition system, so as to break through the limitations of the existing NLU system based on classification models and further improve the service quality and operational efficiency of e-commerce customer service.
[0013] In order to solve the above technical problems, the technical solution of the present invention is to adopt an e-commerce customer service response intention recognition method, comprising:
[0014] Select several sample intents with the highest correlation with the intent of the user sentence to be identified from the pre-built intent library as candidate intents;
[0015] sorting the candidate intentions according to relevance scores;
[0016] Based on the sorting results, candidate intents with the highest relevance score are screened one by one until the first positive result is obtained.
[0017] As an improvement, BERT model I is used to select sample intents from the intent library as candidate intents. The specific steps include:
[0018] Obtain the word embeddings of the user sentence to be recognized and all sample intents in the intent library;
[0019] Pooling operations are performed on the word embeddings of the user sentences to be identified and the word embeddings of the sample intents to obtain sentence embeddings of the user sentences to be identified and sentence embeddings of the sample intents;
[0020] Calculate the similarity between the word embedding of the user sentence to be identified and the embedding of all sample intent sentences;
[0021] Sample intents whose similarity ranking is higher than the ranking threshold are taken as candidate intents.
[0022] As a further improvement, the loss function of the BERT model I during training is:
[0023] ;
[0024] Among them, N + is the number of positive samples, that is, the number of samples marked as positive in the entire sample list; Z i is the prediction score of the i-th sample intention, N is the total number of samples, including positive samples and negative samples; Z k is the prediction score of the kth sample, including positive and negative samples; L ListNet is the loss value.
[0025] As another further improvement, using the formula
[0026]
[0027] Calculate similarity; Similarity is the similarity value, S 用户 is the sentence embedding of the user sentence to be recognized, S 样本 Sentence embedding for sample intent.
[0028] As an improvement, the candidate intents are sorted according to the relevance scores using the BERT model II. The specific steps include:
[0029] Obtain word embeddings for the user sentence to be recognized and all candidate intents;
[0030] Pooling operations are performed on the word embeddings of the user sentences to be identified and the word embeddings of the candidate intents to obtain sentence embeddings of the user sentences to be identified and the sentence embeddings of the candidate intents;
[0031] Calculate the similarity between the word embedding of the user sentence to be identified and the embedding of the candidate intent sentence;
[0032] Sort candidate intents and user sentences.
[0033] As an improvement, the loss function of the BERT model II during training is:
[0034] L = αL BCE +(1-α)L RankNet ;
[0035] Among them, L is the loss value, L BCE is the binary classification loss value, L RankNet is the sorting loss value, and α is the weight coefficient.
[0036] As an improvement, using the formula
[0037]
[0038] Calculate the binary classification loss value; where L BCE is the binary classification loss value, y i is the true label of the i-th sample, p i is the prediction score; N is the number of samples;
[0039] Using the formula
[0040]
[0041] Calculate the sorting loss value; where L RankNet is the ranking loss value, M is the total number of positive and negative sample pairs, Score 正 is the prediction score of the positive sample, Score 负 is the prediction score of the negative sample.
[0042] As an improvement, BERT model III is used to screen candidate intents. The specific steps include:
[0043] Obtain the classification vector after the user sentence to be identified is concatenated with the candidate intent;
[0044] The classification vector is classified into two categories to determine whether the candidate intent is a positive result.
[0045] As an improvement, the loss function of the BERT model III is
[0046] ;
[0047] Among them, L CE is the binary cross entropy loss value, y i is the true label of the i-th sample, p i is the prediction score; N is the number of samples.
[0048] The present invention also provides an e-commerce customer service response intention recognition system, comprising:
[0049] The recall module is used to select several sample intents with the highest correlation with the intent of the user sentence to be identified from the pre-built intent library as candidate intents;
[0050] A sorting module, used to sort the candidate intents according to relevance scores;
[0051] The screening module is used to screen the candidate intents one by one based on the sorting results, starting from the candidate intents with the highest relevance score, until the first positive result is obtained.
[0052] The present invention is beneficial in that:
[0053] The present invention first vectorizes the buyer's message, calculates the distance score with the user's intent, recalls the top-K intents, and implements rapid preliminary screening. Then, the recalled intents are reordered based on multiple factors to ensure that customer service can obtain key information more accurately. Finally, the CrossEncoder model is used to filter intents based on thresholds, exclude low-relevance intents, and improve response accuracy.
[0054] The present invention is a multi-module collaborative architecture. The three steps are the recall module, sorting module and screening module. Three independent modules work closely together to form a hierarchical intent recognition process. Preliminary screening, precise reordering, and strict filtering improve the accuracy and efficiency of intent recognition and the flexibility to respond to new intents, overcoming the limitations of existing technologies.
[0055] The multi-module collaborative architecture can handle unfamiliar scenes. With the general capabilities of each module fine-tuned based on the pre-trained model, it can automatically understand and handle new situations without relying on a large amount of training data for specific scenes, and has strong adaptability and generalization capabilities for unfamiliar scenes. Existing NLU classification models mostly rely on collecting a large amount of training data for specific unfamiliar scenes and retraining to adapt to new situations. When faced with completely new scenes, if there is no special training, new intent expressions may not be understood and handled well, and the comprehensive adaptability and generalization capabilities brought by the multi-module collaboration of the present invention are lacking.
[0056] The three modules have independent functions, and the problem module can be quickly located when an online bad-case occurs. Each module can be iterated separately, such as the recall module can optimize vectorization and other links, the sorting module can adjust sorting-related factors, and the screening module can modify the filtering logic, etc. There is no need to retrain the entire module, and the iteration can be completed quickly and put online to solve the problem efficiently. It is usually an overall classification model architecture, and it may be difficult to accurately locate the specific link when an online problem occurs. If optimization is required, it is often necessary to re-collect data and retrain the entire model. The process is time-consuming and labor-intensive, and the iterative optimization speed is far less than the modular rapid adjustment capability of the present invention.
[0057] All three modules can flexibly accept manual rules. The recall module can set keyword priority recall, etc., the sorting can set intent sorting priority, etc., the screening can adjust the threshold and add filtering conditions, etc., and the manual rules work together with the system automation to make full use of manual experience to improve the effect. It is relatively difficult to add manual rules because its overall architecture and training mechanism are relatively fixed. It is difficult to flexibly set manual rules that meet business needs within the model in a targeted manner. It is difficult to achieve good coordination between manual and automatic as conveniently as the present invention to improve the accuracy of intent recognition and customer service response effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0059] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods.
[0060] Example 1
[0061] like Figure 1 As shown, the present invention provides an e-commerce customer service response intention recognition method, comprising:
[0062] S1 selects several sample intents with the highest correlation with the intent of the user sentence to be identified from the pre-built intent library as candidate intents.
[0063] This step is the first step of the entire framework. Its task is to quickly recall the Top-k intents that are most relevant to the user input from all candidate intents, and provide a high-quality initial candidate set for subsequent modules. In fields such as natural language processing, Top-K is a common concept used to quickly filter out the top K objects that are most relevant to the user input or query from a large number of candidate objects.
[0064] In this embodiment, the BERT model I is used to select sample intents from the intent library as candidate intents. BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model that learns text representations through a bidirectional Transformer encoder, thereby achieving state-of-the-art performance on a variety of NLP tasks. Select a suitable BERT model according to the scenario (for example, BERT-Base-Chinese or RoBERTa is used for Chinese).
[0065] Before training the model, you need to build the intent library in advance to ensure that the set of candidate intents is defined, diverse, and covers common use cases. In addition, you need to prepare training data, including the matching relationship between user input and sample intents in the intent library (related / irrelevant labels). It is foreseeable that in order to expand the number of samples in the intent library, you can also use methods such as synonym generation and language conversion to enrich the training set. In addition, you can also pre-process the data, such as defining a standardized process, including denoising, word segmentation, stop word processing, etc.
[0066] The samples in the training set are positive and negative sample pairs in the format of <user input, sample intent, label>. For example, <I want to order a meal, order a meal, 1>, <I want to order a meal, make a restaurant reservation, 0>. 1 represents a positive sample and 0 represents a negative sample.
[0067] In order to optimize the quality of selection, ListNet is used as the loss function for training. Specifically, it is assumed that the correlation distribution between the query input by the user and the candidate intent is the true distribution, and the distribution predicted by the model is the predicted distribution. The loss function of ListNet is defined as the cross entropy of the two. Specifically, the loss function of the BERT model I during training is:
[0068] ;
[0069] Among them, N + is the number of positive samples, that is, the number of samples marked as positive in the entire sample list; Z i is the prediction score of the i-th sample intention, N is the total number of samples, including positive samples and negative samples; Z k is the prediction score of the kth sample, including positive and negative samples; L ListNet is the loss value.
[0070] The specific steps of selecting sample intents from the intent library using the trained BERT model I include:
[0071] S11 obtains the word embeddings of the user sentence to be recognized and all sample intents in the intent library.
[0072] The input of BERT model I includes the user sentence text to be recognized (such as "order food") and the sample intent text set in the intent library (such as ["order food", "order takeout", "book a restaurant"]). Convert the above text into a format acceptable to BERT (Token ID, Segment ID, Attention Mask).
[0073] BERT model I can generate word embeddings for user sentences and sample intents to be recognized:
[0074] ;
[0075] ;
[0076] Among them, ei is the word embedding of the user sentence to be recognized, i=1~n. is the word embedding of the sample intent, j=1~m.
[0077] S12 performs a pooling operation on the word embeddings of the user sentences to be identified and the word embeddings of the sample intents to obtain the sentence embeddings of the user sentences to be identified and the sentence embeddings of the sample intents.
[0078] Specifically, the first word vector output by BERT model I is used as the sentence embedding of the text, that is:
[0079] ;
[0080] .
[0081] Among them, S 用户 is the sentence embedding of the user sentence to be recognized, S 样本 Sentence embedding for sample intent.
[0082] In the BERT model, CLS is a special word vector that stands for "Classification". The CLS word vector is usually inserted at the beginning of the input sequence to represent the information of the entire sentence. The BERT model pays special attention to this word vector during training so that it can capture the semantic information of the entire sentence for subsequent tasks.
[0083] S13 calculates the similarity between the word embedding of the user sentence to be identified and the embedding of all sample intent sentences.
[0084] In this step, we use the formula
[0085]
[0086] Calculate similarity; Similarity is the similarity value, S 用户 is the sentence embedding of the user sentence to be recognized, S 样本 Sentence embedding for sample intent.
[0087] S14 takes sample intents whose similarity ranking is higher than the ranking threshold as candidate intents.
[0088] The output of BERT model I contains a set of top-k candidate intents. The rules are selected based on the similarity ranking above the ranking threshold "k".
[0089] S2 sorts the candidate intents according to their relevance scores.
[0090] The task of this step is to further sort the Top-k candidate intent set provided by BERT model I to generate a more accurate final candidate set. By modeling the matching relationship between user input and candidate intent, this step significantly improves the accuracy of sorting.
[0091] Due to performance and size issues, BERT model I can only perform a preliminary screening of sample intents to form a list of candidate intents, and its ranking is less reliable. Therefore, in this step, a separately trained BERT model II is used to sort the candidate intents according to the relevance score.
[0092] Before training BERT model II, you also need to prepare training data. The training data format is [user sentences to be identified, candidate intent positive samples, candidate intent negative samples], [ \text{user sentences to be identified}, \text{candidate intent}_\text{positive samples}, \text{candidate intent}_\text{negative samples} ][user sentences to be identified, candidate intent positive samples, candidate intent negative samples].
[0093] In addition, the above samples are labeled manually or based on business rules, where positive samples are the user's true intentions and negative samples are similar but unrelated intentions.
[0094] In addition, in order to improve the accuracy of sorting, the loss function of BERT model II is a joint loss function, including a binary classification loss function and a sorting loss function:
[0095] L = αL BCE +(1-α)L RankNet ;
[0096] Among them, L is the loss value, L BCE is the binary classification loss value, L RankNetis the ranking loss value, and α is the weight coefficient. The binary classification loss function is used for classification tasks to optimize the prediction of whether the candidate intent is relevant. The ranking loss function is used to optimize the relative ranking of positive and negative samples. The two are weighted and combined to form the final optimization goal.
[0097] More specifically, using the formula
[0098]
[0099] Calculate the binary classification loss value; where L BCE is the binary classification loss value, y i is the true label of the i-th sample, p i is the prediction score; N is the number of samples;
[0100] Using the formula
[0101]
[0102] Calculate the sorting loss value; where L RankNet is the ranking loss value, M is the total number of positive and negative sample pairs, Score 正 is the prediction score of the positive sample, Score 负 is the prediction score of the negative sample.
[0103] The specific steps of BERT model II sorting the candidate intents according to the relevance scores include:
[0104] S21 obtains the word embeddings of the user sentence to be recognized and all candidate intents.
[0105] The input of BERT model II includes the user sentence text to be recognized (such as "order a meal"), candidate intents (including positive and negative samples such as "order a meal" and "book a restaurant"). Convert the above text into a format acceptable to BERT (TokenID, Segment ID, Attention Mask).
[0106] BERT model II can generate word embeddings for user sentences to be recognized and candidate intents. Candidate intents include positive candidate intents and negative candidate intents:
[0107] ;
[0108] ;
[0109] ;
[0110] Among them, ei is the word embedding of the user sentence to be recognized, i=1~n. is the word embedding of the positive candidate intent, j=1~m, is the word embedding of negative candidate intent, k=1~s.
[0111] S22 performs a pooling operation on the word embeddings of the user sentence to be identified and the word embeddings of the candidate intents to obtain the sentence embeddings of the user sentence to be identified and the sentence embeddings of the candidate intents.
[0112] Specifically, the first word vector output by BERT model II is used as the sentence embedding of the text, that is:
[0113] ;
[0114] ;
[0115] ;
[0116] Among them, S 用户 is the sentence embedding of the user sentence to be recognized, S 正样本 is the sentence embedding of the positive candidate intent, S 负样本 Sentence embeddings for negative candidate intents.
[0117] S23 calculates the similarity between the word embedding of the user sentence to be identified and the embedding of the candidate intent sentence.
[0118] In this step, the formula is also used:
[0119] ;
[0120]
[0121] Calculate similarity; Similarity 正 Similarity is the similarity between the word embedding of the user sentence to be identified and the embedding of the candidate intent positive sample sentence. 负 is the similarity value between the word embedding of the user sentence to be identified and the embedding of the candidate intent negative sample sentence, S 用户 is the sentence embedding of the user sentence to be recognized, S 正样本 is the sentence embedding of the positive candidate intent, S 负样本 Sentence embeddings for negative candidate intents.
[0122] S24 sorts the candidate intents and user sentences.
[0123] BERT model II has greatly improved the accuracy of sorting compared to BERT model I. BERT model II outputs a sorted set of candidate intents, each with a relevance score, and sorts them from high to low in order of relevance for use in subsequent steps.
[0124] Based on the sorting results, S3 screens candidate intents one by one starting from the one with the highest relevance score until the first positive result is obtained.
[0125] This step aims to further filter the ranked candidate intents output by BERT model II and finally determine the set of intents (or a single intent) that best matches the user sentence to be identified. This module uses a binary classification model to independently determine the relevance of each candidate intent.
[0126] In this embodiment, the BERT model III is used to screen candidate intents.
[0127] Before training the BERT model III model, you also need to prepare training data. The training data format is [[CLS] user sentence to be identified [SEP] candidate intent, label], where label is the annotated relevance label, 1 means relevant, and 0 means irrelevant. [SEP] is the abbreviation of "Separator". It is used to separate different parts of the input sequence (such as two sentences in a sentence pair, or different paragraphs of text). Its main function is to tell the model the boundaries of the input sequence and help the model distinguish different sentences or paragraphs.
[0128] The loss function of the BERTIII model during training is
[0129] ;
[0130] Among them, L CE is the binary cross entropy loss value, y i is the true label of the i-th sample, p i is the prediction score; N is the number of samples.
[0131] The specific steps of BERT model III to screen candidate intents include:
[0132] S31 obtains the classification vector obtained by concatenating the user sentence to be identified and the candidate intent.
[0133] According to the above data format, the user sentence to be identified is concatenated with the candidate intent, and the formula is used
[0134] h CLS =bert([CLS] user sentence to be identified [SEP] candidate intent)
[0135] Extract the concatenated classification vector.
[0136] S32 performs binary classification on the classification vector to determine whether the candidate intent is a positive result.
[0137] In this embodiment, the formula
[0138] p=sigmoid(W*h CLS +b)
[0139] Perform binary classification, where p is the output value of the model, indicating the probability that the sample is a positive class, and W is the weight matrix used for linear transformation h CLS The dimension of the weight matrix depends on the size of the input features and the dimension of the output, h CLS is the hidden state vector corresponding to the [CLS] tag from BERT or similar pre-trained models, which is the overall semantic representation of the sentence or input sequence. b is the bias term, which is used to adjust the linear transformation result, usually a vector, and W*h CLS The output dimensions are consistent.
[0140] In this step, the alternative intentions obtained in step 2 are input into BERT model III according to the sorting results from high to low. When BERT model III obtains the first positive result, it can stop outputting.
[0141] For example, after the first-ranked candidate intent is input into BERT model III, its predicted correlation is 0, which means it is a negative result, so the first-ranked candidate intent is not adopted. The model continues to predict the second-ranked candidate intent. If its predicted correlation is 1, which means it is a positive result, the candidate intent is output, and subsequent candidate intents are no longer predicted. The purpose is that BERT model III has a high latency and high system overhead, and after obtaining the positive result with the highest similarity, it will no longer continue to predict.
[0142] Of course, multiple candidate intentions with positive results can also be set to be output according to needs, which is not limited in this embodiment. In addition, a correlation probability can also be given to the output candidate intentions for further processing in downstream steps.
[0143] It is worth noting that the three steps in this embodiment are all based on the BERT model as an example. In fact, in addition to BERT, there are many other excellent pre-trained language models in the field of natural language processing, which can be used as alternatives to the three modules in the above technical solution, such as Roberta, AlBERT, XLNet, etc. Therefore, the present invention does not limit the use of other models to implement the three steps.
[0144] Example 2
[0145] The present invention also provides an e-commerce customer service response intention recognition system, comprising:
[0146] The recall module is used to select several sample intents with the highest correlation with the intent of the user sentence to be identified from the pre-built intent library as candidate intents;
[0147] A sorting module, used to sort the candidate intents according to relevance scores;
[0148] The screening module is used to screen the candidate intents one by one based on the sorting results, starting from the candidate intents with the highest relevance score, until the first positive result is obtained.
[0149] The above are only preferred embodiments of the present invention. It should be noted that the above preferred embodiments should not be regarded as limiting the present invention, and the protection scope of the present invention should be based on the scope defined by the claims. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the spirit and scope of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. A method for identifying the response intention of e-commerce customer service, characterized in that include: Selecting several sample intents with the highest correlation with the intent of the user sentence to be identified from the pre-built intent library as candidate intents; sorting the candidate intentions according to relevance scores; Specifically, the candidate intents are sorted according to the relevance scores using the BERT model II, including: Obtain word embeddings for the user sentence to be recognized and all candidate intents; Pooling operations are performed on the word embeddings of the user sentences to be identified and the word embeddings of the candidate intents to obtain sentence embeddings of the user sentences to be identified and the sentence embeddings of the candidate intents; Calculate the similarity between the word embedding of the user sentence to be identified and the embedding of the candidate intent sentence; Sort by candidate intents and user sentences; The loss function of the BERT model II during training is: L=αL BCE +(1-a)L RankNet ; Among them, L is the loss value, L BCE is the binary classification loss value, L RankNet is the sorting loss value, α is the weight coefficient; Using the formula Calculate the binary classification loss value; where L BCE is the binary classification loss value, y i is the true label of the i-th sample, p i is the prediction score; N is the number of samples; Using the formula Calculate the sorting loss value; where L RankNet is the ranking loss value, M is the total number of positive and negative sample pairs, Score 正 is the prediction score of the positive sample, Score 负 is the prediction score of negative samples; Based on the ranking results, the candidate intents with the highest relevance score are screened one by one until the first positive result is obtained; specifically, the candidate intents are screened using the BERT model III, including: Obtain the classification vector after the user sentence to be identified is concatenated with the candidate intent; Perform binary classification on the classification vector to determine whether the candidate intent is a positive result; The loss function of the BERT model III is ; Among them, L CE is the binary cross entropy loss value, y i is the true label of the i-th sample, p i is the prediction score; N is the number of samples.
2. According to claim 1, a method for identifying the response intention of e-commerce customer service is characterized in that Use BERT model I to select sample intents from the intent library as candidate intents. The specific steps include: Obtain the word embeddings of the user sentence to be recognized and all sample intents in the intent library; Pooling operations are performed on the word embeddings of the user sentences to be identified and the word embeddings of the sample intents to obtain sentence embeddings of the user sentences to be identified and sentence embeddings of the sample intents; Calculate the similarity between the word embedding of the user sentence to be identified and the embedding of all sample intent sentences; Sample intents whose similarity ranking is higher than the ranking threshold are taken as candidate intents.
3. The method for identifying the response intention of an e-commerce customer service according to claim 2 is characterized in that The loss function of the BERT model I during training is: ; Among them, N + is the number of positive samples, that is, the number of samples marked as positive in the entire sample list; Z i is the prediction score of the i-th sample intent, N is the total number of samples, including positive and negative samples; Z k is the prediction score of the kth sample, including positive and negative samples; L ListNet is the loss value.
4. The method for identifying the response intention of an e-commerce customer service according to claim 2, characterized in that: Using the formula Calculate similarity; Similarity is the similarity value, S 用户 is the sentence embedding of the user sentence to be recognized, S 样本 Sentence embedding for sample intent.
5. An e-commerce customer service response intention recognition system, used to deploy the e-commerce customer service response intention recognition method described in any one of claims 1 to 4, characterized in that include: The recall module is used to select several sample intents with the highest correlation with the intent of the user sentence to be identified from the pre-built intent library as candidate intents; A sorting module, used to sort the candidate intents according to relevance scores; The screening module is used to screen the candidate intents one by one based on the sorting results, starting from the candidate intents with the highest relevance score, until the first positive result is obtained.
Citation Information
Patent Citations
RNN (Recurrent Neural Network)-driven e-commerce intelligent customer service dialogue intention recognition method and system
CN117112749A
Domain intention recognition method based on positive and negative correlation sample fine-tuning large model
CN119378560A
System and method for analysis of an opinion expressed in documents with regard to a particular topic
US20100023311A1