Cross-border e-commerce intelligent reply method and customer service robot thereof
By detecting and processing the text similarity of user problems, converting it into dimension vectors to calculate the target dimension, the intelligent reply problem after the user reasses, and improving the effectiveness and user experience of cross-border e-commerce users and customer service robots communication with customer service robots .
Patent Information
- Application Number
- CN202411711081.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology lacks a technical solution to intelligently reply to users after reasking questions, which leads to the inability of customer service robots to effectively respond to different ways of expressing users, resulting in the need to be converted to manual customer service in most cases.
By obtaining the user's first and second questions, detecting their text similarity, and converting the questions and replies into dimension vectors, calculating the target dimension, searching for the third replies to send to the user, avoiding repeated replies, and improving communication efficiency.
It realizes intelligent responses to users after reasking questions, improves the effectiveness of cross-border e-commerce users and customer service robots, and improves the user experience.
Smart Images

Figure CN119202207A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a cross-border e-commerce intelligent reply method and a customer service robot thereof. Background Art
[0002] In cross-border e-commerce, due to differences in language environments, different users express their questions in different ways. When a user asks a question, the customer service robot fails to give a good answer to the user's question. After the user asks the question again, if the wording does not change much, the previous reply will often be resent to the user, and in most cases it will be transferred to manual customer service. Therefore, the existing technology lacks a technical solution for intelligently replying to users' questions after they have asked them again. Summary of the invention
[0003] The main purpose of the present invention is to provide a cross-border e-commerce intelligent reply method and a customer service robot thereof, aiming to solve the problem that the prior art lacks intelligent reply to users after re-asking questions.
[0004] The present invention provides a cross-border e-commerce intelligent reply method, comprising: Get the first question asked by the user; Searching a preset database for a first answer based on the first question and sending the first answer to the user; Obtaining a second question sent by the user, and searching the database for a second answer based on the second question; Detecting text similarity between the first reply and the second reply; When the text similarity is greater than a preset similarity, the first question and the second question are respectively converted into a first dimensional vector and a second dimensional vector, and the first reply is converted into a third dimensional vector; Subtract the third-dimensional vector from the first-dimensional vector and the second-dimensional vector respectively to obtain a first target vector and a second target vector; Detecting whether the values of a certain dimension in the first target vector and the second target vector are both greater than a preset value of the dimension; If the values of a certain dimension are all greater than the preset value of the dimension, then the dimension is recorded as the target dimension; Based on the values of the target dimension of the first dimensional vector and the second dimensional vector, a third reply is searched and sent to the user.
[0005] Furthermore, the step of searching for a third reply to send to the user based on the value of the target dimension of the first dimensional vector and the second dimensional vector includes: Substitute the values of each target dimension of the first dimensional vector and the second dimensional vector into the formula , and obtain the target error corresponding to the target dimension, where represents the value of the mth collaborative data in the first dimensional vector, represents the value of the mth collaborative data in the second dimensional vector, represents the target error corresponding to the mth collaborative data, is the pre-fitted function; Obtain the prior error of each response in advance, record the correlation coefficient when the target error is less than the prior error as 1, and record the correlation coefficient when the target error is greater than or equal to the prior error as 0; Calculate the sum of the correlation coefficients corresponding to each reply, and record the reply with the largest sum of correlation coefficients as the third reply and send it to the user.
[0006] Furthermore, after the step of calculating the sum of the correlation coefficients corresponding to each reply and recording the reply with the largest sum of the correlation coefficients as the third reply and sending it to the user, the method further includes: After the user receives the third reply, determining whether the user has any further feedback; If there is feedback, the reply with the second largest sum of correlation coefficients is recorded as the fourth reply and sent to the user.
[0007] Furthermore, after the step of calculating the sum of the correlation coefficients corresponding to each reply, the step further includes: Determine whether the sum of the maximum correlation coefficients is less than a preset sum value; If the sum of the largest correlation coefficients is less than a preset sum value, the first question and the second question are forwarded to manual customer service.
[0008] Furthermore, before the step of substituting the values of the target dimensions of the first dimensional vector and the second dimensional vector into the formula respectively, the step further includes: Pre-acquire multiple groups of collaborative data corresponding to the multiple replies; wherein a group of collaborative data includes a first dimension vector and a second dimension vector; The preset fitting function is used to fit multiple sets of collaborative data in the same response to obtain the fitting function corresponding to the response. ; According to the preset error formula Get the prior error for each response; where, is the number of any two data combinations in multiple sets of collaborative data, represents the prior error, Respectively represent the i-th data and j-th data in a set of collaborative data, and i is not equal to j, are the preset parameters.
[0009] Furthermore, after fitting the multiple sets of collaborative data in the same reply by using a preset fitting function to obtain a fitting function corresponding to the reply, the method further includes: Acquire multiple groups of test data corresponding to each reply; wherein the test data and the collaborative data are of the same data type; Input each group of the test data into the corresponding fitting function one by one, and calculate the error value of each group of the test data according to a preset error calculation formula; The error value is smaller than the prior error and is recorded as 1, and the error value is greater than or equal to the prior error and is recorded as 0; Calculating the loss value of the fitting function according to the correlation value of each group of test data; Determining whether the loss value is greater than a preset loss value; If the loss value is greater than a preset loss value, the prior error is updated or the fitting function is refitted until the loss value is less than or equal to the preset loss value.
[0010] Furthermore, when the text similarity is greater than a preset similarity, the first question and the second question are converted into a first dimensional vector and a second dimensional vector respectively, and the first reply is converted into a third dimensional vector. The step of converting the first question into a first dimensional vector includes: The first question is standardized and a TOKEN list is created to import the first question into a data set, wherein the standardization includes removing punctuation marks, unifying the language, and deleting irrelevant words and sentences in the first question, wherein the irrelevant words and sentences include greetings, adjectives, and dirty words; The text data of the dataset is read through the preset BERT Chinese training model, and the word vector is constructed by fine-tuning the BERT training model, wherein the BERT training model is trained based on a professional vocabulary; The word vectors corresponding to the first question are sequentially input into the recurrent neural network, and the formula is t =softmax(Vs t ) Calculate the first dimension vector o t ; Among them, s t =f(Ux t +Ws t−1 +b),s t is the calculation function of the tth step, the x t is the tth word vector, s0 is the 0 vector, and V, U, W, and b are all preset parameters.
[0011] The present invention also provides a customer service robot, comprising: A first acquisition module, used to acquire a first question sent by a user; A first search module, used to search a preset database for a first answer based on the first question and send the first answer to the user; A second acquisition module, configured to acquire a second question sent by the user, and search the database for a second answer based on the second question; A first detection module, used to detect the text similarity between the first reply and the second reply; A conversion module, configured to convert the first question and the second question into a first dimensional vector and a second dimensional vector respectively, and convert the first reply into a third dimensional vector when the text similarity is greater than a preset similarity; A calculation module, used for subtracting the third dimensional vector from the first dimensional vector and the second dimensional vector respectively to obtain a first target vector and a second target vector; A second detection module, used to detect whether the values of a certain dimension in the first target vector and the second target vector are both greater than a preset value of the dimension; A marking module, used for marking a dimension as a target dimension if all values of a dimension are greater than a preset value of the dimension; The second search module is used to search for a third reply to send to the user based on the value of the target dimension of the first dimensional vector and the second dimensional vector.
[0012] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0013] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.
[0014] The beneficial effects of the present invention are as follows: by obtaining the first question and the second question after re-asking, detecting the text similarity between the first reply and the second reply, and then converting it into a dimension vector, and subtracting the dimension vector corresponding to the first reply to calculate the target dimension that has not been replied, searching for the third reply to reply to the user. It realizes intelligent reply after the user re-asks the question, and does not resend the content that has been replied to the user, but focuses on the dimension that has not been answered to the user, which can meet the questions of users from different countries in cross-border e-commerce, greatly improves the effectiveness of communication between users from other countries and customer service robots when purchasing, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1It is a flow chart of a cross-border e-commerce intelligent reply method according to an embodiment of the present invention; Figure 2 is a schematic block diagram of the structure of a customer service robot according to an embodiment of the present invention; Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.
[0016] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.
[0019] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone.
[0020] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0021] Reference Figure 1 The present invention proposes a cross-border e-commerce intelligent reply method, comprising: S1: Get the first question asked by the user; S2: searching a preset database for a first answer based on the first question, and sending the first answer to the user; S3: Obtaining a second question sent by the user, and searching the database for a second answer based on the second question; S4: Detecting text similarity between the first reply and the second reply; S5: When the text similarity is greater than a preset similarity, the first question and the second question are converted into a first dimension vector and a second dimension vector respectively, and the first reply is converted into a third dimension vector; S6: Subtract the third-dimensional vector from the first-dimensional vector and the second-dimensional vector respectively to obtain a first target vector and a second target vector; S7: Detect whether the values of a certain dimension in the first target vector and the second target vector are both greater than a preset value of the dimension; S8: If the values of a certain dimension are all greater than the preset value of the dimension, then the dimension is recorded as the target dimension; S9: Based on the values of the target dimension of the first dimensional vector and the second dimensional vector, searching for a third reply to send to the user.
[0022] As described in the above steps S1-S2, the first question sent by the user is obtained, and the first reply is searched in the preset database based on the first question and sent to the user. Specifically, according to the content and type of the first question, the corresponding preset database is accessed. The database should contain pre-prepared questions and corresponding replies, which should be reviewed to ensure accuracy and professionalism. In the database, keyword search or natural language processing technology is used to match the user's first question. Find the first reply that is most relevant and accurate to the first question, and send the first reply to the user.
[0023] As described in step S3 above, the second question sent by the user is obtained, and a second reply is searched from the database based on the second question. The method of searching the database for the second reply based on the second question is the same as the method of searching the first reply, which will not be repeated here.
[0024] As described in the above step S4, the text similarity between the first reply and the second reply is detected, wherein the method for calculating the text similarity can be a WMD algorithm (word mover's distance), an algorithm based on cosine similarity, a simhash algorithm, an SVM vector model, etc. to calculate the text similarity. Specifically, the first question and / or the second question needs to be converted into corresponding vectors, and then the calculation is performed based on the vectors. It can also be other methods of calculating text similarity, which is not limited in this application.
[0025] As described in step S5 above, when the text similarity is greater than the preset similarity, the first question and the second question are converted into a first dimension vector and a second dimension vector, respectively, and the first reply is converted into a third dimension vector. That is, when the text similarity is greater than the preset similarity, it means that the first reply and the second reply are essentially the same. Therefore, under the premise that the first reply is difficult to satisfy the user, the second reply is still assumed to not satisfy the user's question. At this time, the first question and the second question can be converted into a first dimension vector and a second dimension vector, respectively, and the first reply can be converted into a third dimension vector. The conversion method can be to segment the text in the question or reply. The segmentation can be calculated by any algorithm such as decision tree, multi-layer perceptron, naive Bayes (including Bernoulli Bayes, Gaussian Bayes and polynomial Bayes), random forest, AdaBoost, feedforward neural network and LSTM, and then vectorized after segmentation to obtain a multi-dimensional vector for subsequent calculation.
[0026] As described in step S6 above, the first dimensional vector and the second dimensional vector are respectively subtracted from the third dimensional vector to obtain the first target vector and the second target vector. Since the first dimensional vector contains corresponding dimensional information, it is necessary to subtract the third dimensional vector from it to reflect the dimensional information not present in the first reply, and the first target vector and the second target vector are calculated to avoid resending the content in the first reply.
[0027] As described in the above steps S7-S8, it is detected whether the values of a certain dimension in the first target vector and the second target vector are all greater than the preset value of the dimension. If there is a dimension whose values are all greater than the preset value of the dimension, then the dimension is recorded as the target dimension, that is, the customer service robot does not reply to these dimensions. Therefore, in the next reply, the third reply can be searched for. If there is no dimension whose values are all greater than the preset value of the dimension, it can be directly transferred to manual customer service for service, or it can be searched based on the second question and sent to the user. If the user is still not satisfied, it can be transferred to manual customer service.
[0028] As described in the above step S9, based on the values of the target dimension of the first dimensional vector and the second dimensional vector, a third reply is searched and sent to the user, that is, based on the values of the target dimension of the first dimensional vector and the second dimensional vector, a third reply is searched and sent to the user. Specifically, the matching degree between the values of the target dimension of the first dimensional vector and the second dimensional vector and each reply can be calculated, or the text description or keywords of the corresponding first dimensional vector and the second dimensional vector corresponding to the target dimension can be searched in a preset database for the third reply. Thus, intelligent replies are made to the user after the question is asked again, and the content that has been replied will not be resent to the user, but the focus is on the dimensions that have not been answered to the user, which can meet the questions of users from different countries in cross-border e-commerce, greatly improve the effectiveness of communication between users from other countries and customer service robots when purchasing, and improve the user experience.
[0029] In one embodiment, the step S9 of searching for a third reply to send to the user based on the value of the target dimension of the first dimensional vector and the second dimensional vector includes: S901: Substitute the values of each target dimension of the first dimensional vector and the second dimensional vector into the formula , and obtain the target error corresponding to the target dimension, where represents the value of the mth collaborative data in the first dimensional vector, represents the value of the mth collaborative data in the second dimensional vector, represents the target error corresponding to the mth collaborative data, is the pre-fitted function; S902: Obtain a priori error of each response in advance, record the correlation coefficient when the target error is less than the priori error as 1, and record the correlation coefficient when the target error is greater than or equal to the priori error as 0; S903: Calculate the sum of the correlation coefficients corresponding to each reply, and record the reply with the largest sum of correlation coefficients as the third reply and send it to the user.
[0030] As described in steps S901-S903 above, the search for the third reply is realized by substituting the values of each target dimension of the first dimensional vector and the second dimensional vector into the formula , get the target error of the corresponding target dimension, obtain the prior error of each reply in advance, record the correlation coefficient of the target error less than the prior error as 1, and record the correlation coefficient of the target error greater than or equal to the prior error as 0, that is, the target error is less than the prior error, which means that the dimension values corresponding to the first dimensional vector and the second dimensional vector are related to the reply, so that the sum of the correlation coefficients of the first dimensional vector and the second dimensional vector with each reply can be obtained, and then the reply with the largest sum of correlation coefficients is recorded as the third reply and sent to the user.
[0031] In one embodiment, after the step S903 of calculating the sum of the correlation coefficients corresponding to each reply and recording the reply with the largest sum of the correlation coefficients as the third reply and sending it to the user, the method further includes: S9041: After the user receives the third reply, determine whether the user has any further feedback; S9042: If there is feedback, the reply with the second largest sum of correlation coefficients is recorded as the fourth reply and sent to the user.
[0032] As described in the above steps S9041-S9042, that is, if the user has feedback, the reply with the second largest correlation coefficient is recorded as the fourth reply and sent to the user. If the user still has feedback, then manual customer service can be connected.
[0033] In one embodiment, after the step S903 of calculating the sum of the correlation coefficients corresponding to each reply, the method further includes: S9141: Determine whether the sum of the maximum correlation coefficients is less than a preset sum value; S9142: If the sum of the maximum correlation coefficients is less than a preset sum value, the first question and the second question are forwarded to manual customer service.
[0034] As described in the above steps S9141-S9142, the judgment of the sum of correlation coefficients is realized. If the maximum sum of correlation coefficients is less than the preset sum value, it means that the corresponding reply is not what the user needs because of the low correlation. Therefore, manual customer service can be connected. If the maximum sum of correlation coefficients is greater than or equal to the preset sum value, the reply with the largest sum of correlation coefficients can be recorded as the third reply and sent to the user.
[0035] In one embodiment, before step S901 of respectively substituting the values of the target dimensions of the first dimensional vector and the second dimensional vector into the formula, the method further includes: S9001: pre-acquire multiple groups of collaborative data corresponding to multiple replies; wherein a group of collaborative data includes a first dimension vector and a second dimension vector; S9002: Fit multiple sets of collaborative data in the same response using a preset fitting function to obtain a fitting function corresponding to the response ; S9003: According to the preset error formula Get the prior error for each response; where, is the number of any two data combinations in multiple sets of collaborative data, represents the prior error, Respectively represent the i-th data and j-th data in a set of collaborative data, and i is not equal to j, are the preset parameters.
[0036] As described in the above steps S9001-S9003, the calculation of the fitting function and the prior error is realized, that is, multiple sets of collaborative data corresponding to multiple replies are obtained in advance, and multiple sets of collaborative data in the same reply are fitted by a preset fitting function to obtain the fitting function corresponding to the reply. The fitting method can be polynomial fitting or other fitting methods, which is not limited in this application. Then, the a priori error is calculated. The a priori error can provide a comparison for the subsequent target error, that is, the correlation coefficient greater than or equal to the a priori error is recorded as 0, and the correlation coefficient less than the a priori error is recorded as 1, which provides a basis for subsequent judgment.
[0037] In one embodiment, after fitting multiple sets of collaborative data in the same reply by using a preset fitting function to obtain a fitting function corresponding to the reply S9002, the method further includes: S90031: Acquire multiple groups of test data corresponding to each reply; wherein the test data and the collaborative data are of the same data type; S90032: Input each group of the test data into the corresponding fitting function one by one, and calculate the error value of each group of the test data according to a preset error calculation formula; S90033: record the correlation value of the error value being less than the priori error as 1, and record the correlation value being greater than or equal to the priori error as 0; S90034: Calculate the loss value of the fitting function according to the correlation value of each group of test data; S90035: Determine whether the loss value is greater than a preset loss value; S90036: If the loss value is greater than a preset loss value, update the prior error or refit the fitting function until the loss value is less than or equal to the preset loss value.
[0038] As described in the above steps S90031-S90036, the rationality judgment of the fitting function is realized. Since the fitting effect of the fitting function may be relatively poor during the fitting process, the test data can be obtained, and then each group of the test data is input into the corresponding fitting function one by one, and the error value of each group of test data is calculated according to the preset error calculation formula. The calculation of the error value is the same as the above-mentioned method of calculating the target error, which will not be repeated here. Then, the relevant value of the error value less than the prior error is recorded as 1, and the relevant value greater than or equal to the prior error is recorded as 0, and the loss value is calculated. The loss value is calculated by adding the relevant values and dividing them by the corresponding number of data groups. The preset loss value is a preset loss value. When it is greater than the preset loss value, it is considered that the error of the fitting function is large. When it is less than or equal to the preset loss value, it is considered that the error of the fitting function is small. If the loss value is greater than the preset loss value, the prior error is updated or the fitting function is refitted until the loss value is less than or equal to the preset loss value.
[0039] In one embodiment, when the text similarity is greater than a preset similarity, the first question and the second question are converted into a first dimensional vector and a second dimensional vector respectively, and the first reply is converted into a third dimensional vector in step S5, the step of converting the first question into a first dimensional vector includes: S501: Standardize the first question and create a TOKEN list to import the first question into a data set, wherein the standardization includes removing punctuation marks, unifying the language, and deleting irrelevant words and sentences in the first question, wherein the irrelevant words and sentences include greetings, adjectives, and dirty words; S502: reading text data of a data set through a preset BERT Chinese training model, and constructing a word vector through fine-tuning of the BERT training model, wherein the BERT training model is trained based on a professional vocabulary; S503: Input the word vectors corresponding to the first question into the recurrent neural network in sequence, and use formula o t =softmax(Vs t ) Calculate the first dimension vector o t ; Among them, s t =f(Ux t +Ws t−1 +b),s t is the calculation function of the tth step, the x t is the tth word vector, s0 is the 0 vector, and V, U, W, and b are all preset parameters.
[0040] As described in the above steps S501-S503, the vector conversion of the first question is realized, that is, punctuation marks, unified language, and irrelevant words in the first question are removed, and the irrelevant words include greetings, adjectives, and dirty words. Then, the text data of the data set is read through the preset BERT Chinese training model, and the word vector is constructed by fine-tuning the BERT training model, wherein the BERT training model is trained based on a professional vocabulary, that is, the text data of the data set can be read through the BERT pre-training model, the model can be trained, and then the model parameters can be adjusted according to the training results to obtain the BERT Chinese training model. The word vectors corresponding to the first question are input into the recurrent neural network in sequence, and the formula is used. t =softmax(Vs t ) calculates the first dimension vector, and finally tags the first question based on the TOKEN list. In addition, the second question and the first answer can also be vectorized in the same way.
[0041] Reference Figure 2 The present invention provides a customer service robot, comprising: A first obtaining module 10 is used to obtain a first question sent by a user; A first search module 20, configured to search a preset database for a first answer based on the first question and send the answer to the user; A second acquisition module 30, configured to acquire a second question sent by the user, and search the database for a second answer based on the second question; A first detection module 40, configured to detect text similarity between the first reply and the second reply; A conversion module 50, configured to convert the first question and the second question into a first dimensional vector and a second dimensional vector respectively, and convert the first reply into a third dimensional vector when the text similarity is greater than a preset similarity; A calculation module 60, configured to subtract a third-dimensional vector from the first-dimensional vector and the second-dimensional vector, respectively, to obtain a first target vector and a second target vector; A second detection module 70, used to detect whether the values of a certain dimension in the first target vector and the second target vector are both greater than a preset value of the dimension; A marking module 80 is used to mark a dimension as a target dimension if all values of the dimension are greater than a preset value of the dimension; The second search module 90 is used to search for a third reply to send to the user based on the value of the target dimension of the first dimensional vector and the second dimensional vector.
[0042] In one embodiment, the second search module 90 includes: The numerical substitution submodule is used to substitute the numerical values of each target dimension of the first dimensional vector and the second dimensional vector into the formula , and obtain the target error corresponding to the target dimension, where represents the value of the mth collaborative data in the first dimensional vector, represents the value of the mth collaborative data in the second dimensional vector, represents the target error corresponding to the mth collaborative data, is the pre-fitted function; A priori error acquisition submodule is used to obtain the priori error of each response in advance, and record the correlation coefficient of the target error being less than the priori error as 1, and record the correlation coefficient of the target error being greater than or equal to the priori error as 0; The correlation coefficient sum calculation submodule is used to calculate the sum of the correlation coefficients corresponding to each reply, and record the reply with the largest sum of correlation coefficients as the third reply and send it to the user.
[0043] In one embodiment, the second search module 90 further includes: A feedback judgment submodule, used for judging whether the user has any more feedback after receiving the third reply; The fourth reply sending submodule is used to record the reply with the second largest sum of correlation coefficients as the fourth reply and send it to the user if there is feedback.
[0044] In one embodiment, the second search module 90 further includes: The maximum correlation coefficient sum judgment submodule is used to judge whether the maximum correlation coefficient sum is less than a preset sum value; The manual customer service forwarding submodule is used to forward the first question and the second question to the manual customer service if the sum of the maximum correlation coefficients is less than a preset sum value.
[0045] In one embodiment, the second search module 90 further includes: A collaborative data acquisition submodule is used to pre-acquire multiple sets of collaborative data corresponding to multiple replies; wherein a set of collaborative data includes a first dimension vector and a second dimension vector; The fitting submodule is used to fit multiple sets of collaborative data in the same response through a preset fitting function to obtain the fitting function corresponding to the response. ; The prior error calculation submodule is used to calculate the error according to the preset error formula Get the prior error for each response; where, is the number of any two data combinations in multiple sets of collaborative data, represents the prior error, Respectively represent the i-th data and j-th data in a set of collaborative data, and i is not equal to j, are the preset parameters.
[0046] In one embodiment, the second search module 90 further includes: A test data acquisition submodule, used to acquire multiple groups of test data corresponding to each reply; wherein the test data and the collaborative data are of the same data type; A test data input submodule, used to input each group of the test data into the corresponding fitting function one by one, and calculate the error value of each group of test data according to a preset error calculation formula; A marking submodule, used for marking a correlation value where the error value is less than the prior error as 1, and marking a correlation value where the error value is greater than or equal to the prior error as 0; A loss value calculation submodule, used to calculate the loss value of the fitting function according to the correlation value of each group of test data; A loss value judgment submodule, used to judge whether the loss value is greater than a preset loss value; An updating submodule is used to update the prior error or refit the fitting function if the loss value is greater than a preset loss value until the loss value is less than or equal to the preset loss value.
[0047] In one embodiment, the conversion module 50 includes: A standardization processing submodule, configured to perform standardization processing on the first question, and to establish a TOKEN list to import the first question into a data set, wherein the standardization processing includes removing punctuation marks in the first question, unifying the language, and deleting irrelevant words and sentences, wherein the irrelevant words and sentences include greetings, adjectives, and dirty words; A text data reading submodule is used to read the text data of the data set through a preset BERT Chinese training model, and to construct a word vector by fine-tuning the BERT training model, wherein the BERT training model is trained based on a professional vocabulary; The word vector input submodule is used to sequentially input the word vectors corresponding to the first question into the recurrent neural network, and use the formula t =softmax(Vs t ) Calculate the first dimension vector o t ; Among them, s t =f(Ux t +Ws t−1 +b),s t is the calculation function of the tth step, the x tis the tth word vector, s0 is the 0 vector, and V, U, W, and b are all preset parameters.
[0048] The beneficial effects of the present invention are as follows: by obtaining the first question and the second question after re-asking, detecting the text similarity between the first reply and the second reply, and then converting it into a dimension vector, and subtracting the dimension vector corresponding to the first reply to calculate the target dimension that has not been replied, searching for the third reply to reply to the user. It realizes intelligent reply after the user re-asks the question, and does not resend the content that has been replied to the user, but focuses on the dimension that has not been answered to the user, which can meet the questions of users from different countries in cross-border e-commerce, greatly improves the effectiveness of communication between users from other countries and customer service robots when purchasing, and improves the user experience.
[0049] Reference Figure 3 In an embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store various questions, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the cross-border e-commerce intelligent reply method described in any of the above embodiments can be implemented.
[0050] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.
[0051] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the cross-border e-commerce intelligent reply method described in any of the above embodiments can be implemented.
[0052] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0053] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0054] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0055] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0056] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.
Claims
1. A cross-border e-commerce intelligent reply method, characterized in that: include: Get the first question asked by the user; Searching a preset database for a first answer based on the first question and sending the first answer to the user; Obtaining a second question sent by the user, and searching the database for a second answer based on the second question; Detecting text similarity between the first reply and the second reply; When the text similarity is greater than a preset similarity, the first question and the second question are respectively converted into a first dimensional vector and a second dimensional vector, and the first reply is converted into a third dimensional vector; Subtract the third-dimensional vector from the first-dimensional vector and the second-dimensional vector respectively to obtain a first target vector and a second target vector; Detecting whether the values of a certain dimension in the first target vector and the second target vector are both greater than a preset value of the dimension; If the values of a certain dimension are all greater than the preset value of the dimension, then the dimension is recorded as the target dimension; Based on the values of the target dimension of the first dimensional vector and the second dimensional vector, a third reply is searched and sent to the user.
2. The cross-border e-commerce intelligent reply method according to claim 1, characterized in that: The step of searching for a third reply to send to the user based on the value of the target dimension of the first dimensional vector and the second dimensional vector comprises: Substitute the values of each target dimension of the first dimensional vector and the second dimensional vector into the formula , and obtain the target error corresponding to the target dimension, where represents the value of the mth collaborative data in the first dimensional vector, represents the value of the mth collaborative data in the second dimensional vector, represents the target error corresponding to the mth collaborative data, is the pre-fitted function; Obtain the prior error of each response in advance, record the correlation coefficient when the target error is less than the prior error as 1, and record the correlation coefficient when the target error is greater than or equal to the prior error as 0; Calculate the sum of the correlation coefficients corresponding to each reply, and record the reply with the largest sum of correlation coefficients as the third reply and send it to the user.
3. The cross-border e-commerce intelligent reply method according to claim 2, characterized in that: After the step of calculating the sum of the correlation coefficients corresponding to each reply and recording the reply with the largest sum of the correlation coefficients as the third reply and sending it to the user, the method further includes: After the user receives the third reply, determining whether the user has any further feedback; If there is feedback, the reply with the second largest sum of correlation coefficients is recorded as the fourth reply and sent to the user.
4. The cross-border e-commerce intelligent reply method according to claim 2, characterized in that: After the step of calculating the sum of the correlation coefficients corresponding to each reply, the method further includes: Determine whether the sum of the maximum correlation coefficients is less than a preset sum value; If the sum of the largest correlation coefficients is less than a preset sum value, the first question and the second question are forwarded to manual customer service.
5. The cross-border e-commerce intelligent reply method according to claim 2, characterized in that: Before the step of respectively substituting the values of the target dimensions of the first dimensional vector and the second dimensional vector into the formula, the method further includes: Pre-acquire multiple groups of collaborative data corresponding to the multiple replies; wherein a group of collaborative data includes a first dimension vector and a second dimension vector; The preset fitting function is used to fit multiple sets of collaborative data in the same response to obtain the fitting function corresponding to the response. ; According to the preset error formula Get the prior error for each response; where, is the number of any two data combinations in multiple sets of collaborative data, represents the prior error, Respectively represent the i-th data and j-th data in a set of collaborative data, and i is not equal to j, are the preset parameters.
6. The cross-border e-commerce intelligent reply method according to claim 5, characterized in that: After fitting the multiple sets of collaborative data in the same reply by using a preset fitting function to obtain a fitting function corresponding to the reply, the method further includes: Acquire multiple groups of test data corresponding to each reply; wherein the test data and the collaborative data are of the same data type; Input each group of the test data into the corresponding fitting function one by one, and calculate the error value of each group of the test data according to a preset error calculation formula; The error value is smaller than the prior error and is recorded as 1, and the error value is greater than or equal to the prior error and is recorded as 0; Calculating the loss value of the fitting function according to the correlation value of each group of test data; Determining whether the loss value is greater than a preset loss value; If the loss value is greater than a preset loss value, the prior error is updated or the fitting function is refitted until the loss value is less than or equal to the preset loss value.
7. The cross-border e-commerce intelligent reply method according to claim 1, characterized in that: When the text similarity is greater than a preset similarity, the first question and the second question are converted into a first dimensional vector and a second dimensional vector respectively, and the first reply is converted into a third dimensional vector. The step of converting the first question into a first dimensional vector includes: The first question is standardized and a TOKEN list is created to import the first question into a data set, wherein the standardization includes removing punctuation marks, unifying the language, and deleting irrelevant words and sentences in the first question, wherein the irrelevant words and sentences include greetings, adjectives, and dirty words; The text data of the dataset is read through the preset BERT Chinese training model, and the word vector is constructed by fine-tuning the BERT training model, wherein the BERT training model is trained based on a professional vocabulary; The word vectors corresponding to the first question are sequentially input into the recurrent neural network, and the formula is t =softmax(Vs t ) Calculate the first dimension vector o t ; Among them, s t =f(Ux t +Ws t−1 +b),s t is the calculation function of the tth step, the x t is the tth word vector, s0 is the 0 vector, and V, U, W, and b are all preset parameters.
8. A customer service robot, characterized in that: include: A first acquisition module, used to acquire a first question sent by a user; A first search module, used to search a preset database for a first answer based on the first question and send the first answer to the user; A second acquisition module, configured to acquire a second question sent by the user, and search the database for a second answer based on the second question; A first detection module, used to detect the text similarity between the first reply and the second reply; A conversion module, configured to convert the first question and the second question into a first dimensional vector and a second dimensional vector respectively, and convert the first reply into a third dimensional vector when the text similarity is greater than a preset similarity; A calculation module, used for subtracting the third dimensional vector from the first dimensional vector and the second dimensional vector respectively to obtain a first target vector and a second target vector; A second detection module, used to detect whether the values of a certain dimension in the first target vector and the second target vector are both greater than a preset value of the dimension; A marking module, used for marking a dimension as a target dimension if all values of a dimension are greater than a preset value of the dimension; The second search module is used to search for a third reply to send to the user based on the value of the target dimension of the first dimensional vector and the second dimensional vector.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and device for processing unanswered questions of smart customer service and computer equipment
CN112015878A
Real-time recruitment information updating method and device and computer equipment
CN112348479A
Client screening method, device and equipment based on artificial intelligence and storage medium
CN113643067A
Pollutant analysis method and device based on collaborative data
CN114757296A
Dynamic control method and device for switching to manual service, electronic equipment and medium
CN117436899A
Cited By
Cross-border e-commerce intelligent customer service system based on artificial intelligence
CN120765258A
