A digital customer service queue optimization method based on machine learning algorithm
By correcting and filtering the correlation of keyword sequences in historical service records, a more accurate keyword merging sequence is generated for training the machine learning model, which solves the problem of insufficient accuracy of the TF-IDF algorithm in customer demand identification. It improves the queuing optimization effect of digital customer service and improves service efficiency and user experience.
Patent Information
- Application Number
- CN202410749155.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-12
AI Technical Summary
In the existing technology, keyword extraction based on the TF-IDF algorithm has insufficient accuracy when identifying customer needs, resulting in poor robustness of the machine model and inability to accurately reflect customer needs, affecting the queuing optimization effect of digital customer service.
By obtaining the keyword sequence, reply template number, satisfaction score and duration in the historical service records, the keyword sub-sequences are divided and merged, the correlation degree is calculated, the correlation degree is corrected, and the final keyword merge sequence is selected for training machine learning. model to improve the accuracy of keyword extraction.
It improves the machine model's accuracy in identifying customer needs, reduces unnecessary queuing and transfer times, and improves service efficiency and user experience.
Smart Images

Figure CN118333238B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a digital customer service queuing optimization method based on a machine learning algorithm. Background Art
[0002] Many digital customer service systems configure dedicated manual customer service reception for different types of customer issues. When there are many customers consulting, the digital customer service often adopts simplified strategies such as first-come, first-served or random assignment. These strategies do not fully consider the complexity and diversity of customer consultation issues. Therefore, when transferred to manual customer service, there is no guarantee that customers will receive customer service support that specifically solves their problems, causing customers to have to wait in line again, resulting in extra time consumption and affecting customer experience. If digital customer service can identify customer needs more accurately, on the one hand, it can respond to customer needs in a timely manner, and on the other hand, when transferring to manual customer service, it can more accurately transfer customers to manual customer service that specializes in handling such issues, thereby improving the efficiency and quality of customer service, reducing customer waiting time, and improving customer satisfaction. Therefore, it is crucial to optimize the digital customer service queuing process by improving the accuracy of digital customer service in identifying customer needs.
[0003] In the prior art, for the optimization of the data customer service queuing process, first, a traditional keyword extraction algorithm (such as the TF-IDF algorithm) is used to extract keywords of customer request content in historical service records to form a training set, and the training set is used to train the machine model to obtain a trained machine model. The trained machine model is then used to obtain the customer service response template corresponding to the customer's real-time request content, and then the manual customer service is transferred according to the customer response template. Automatic recognition and response are achieved with the help of the machine model to ensure that customer needs can be quickly and accurately identified.
[0004] However, when using the TF-IDF algorithm to extract keywords, it tends to regard words with higher frequency as keywords and assign them higher weights, and tends to ignore words with lower frequency. In the actual description of customer needs, some low-frequency words may have important semantic information and relevance, corresponding to specific customer service response templates or keywords in specific scenarios. That is, the traditional keyword extraction algorithm has certain limitations in correctly reflecting customer needs, resulting in poor robustness of the machine model trained based on keywords extracted from historical service records, making the subsequent identification of customer needs using the trained machine model inaccurate.
[0005] Therefore, how to improve the accuracy of keyword extraction in the training set of the machine model to ensure that the results of customer demand identification using the trained machine model are more accurate has become an urgent problem to be solved. Summary of the invention
[0006] In view of this, an embodiment of the present invention provides a digital customer service queuing optimization method based on a machine learning algorithm to solve the problem of how to improve the accuracy of keyword extraction in the training set of the machine model to ensure that the results of customer demand identification using the trained machine model are more accurate.
[0007] An embodiment of the present invention provides a method for optimizing a digital customer service queue based on a machine learning algorithm, the method comprising the following steps:
[0008] Obtain M historical service records of the digital customer service, and for any historical service record, obtain a keyword sequence, a reply template number sequence, a satisfaction score, and a queuing time and processing time corresponding to each customer request content according to all customer request contents in the historical service record;
[0009] For any historical service record whose length of the reply template number sequence does not meet the requirement, taking the keywords in the keyword sequence of the historical service record as a benchmark, respectively obtain the keyword subsequences composed of the keywords contained in each customer request content in the historical service record, divide and merge all the keyword subsequences to obtain at least one keyword merge sequence, and obtain the target reply template number of each keyword merge sequence according to the reply template number sequence of the historical service record;
[0010] For any reply template number of the digital customer service, according to the target reply template number of each keyword merge sequence in each of the historical service records, a keyword merge sequence set of the reply template number is obtained, and for any keyword in any keyword merge sequence in the keyword merge sequence set, according to the queuing time, processing time and satisfaction score of each keyword merge sequence in the keyword merge sequence set, a first modified relevance degree of the keyword in the keyword merge sequence is obtained;
[0011] Using the set of reply template numbers corresponding to the keywords, the first modified relevance degree of the keywords in the keyword merger sequence is modified to obtain the second modified relevance degree of the keywords in the keyword merger sequence, and the keywords in the keyword merger sequence are screened and removed according to the second modified relevance degree of each keyword in the keyword merger sequence to obtain a final keyword merger sequence;
[0012] The preset machine learning model is trained using each final keyword merge sequence and the corresponding target reply template number in all historical service records to obtain a trained machine learning model, which is then used to optimize the digital customer service queue.
[0013] Preferably, the dividing and merging of all keyword subsequences to obtain at least one keyword merged sequence includes:
[0014] For any keyword subsequence, obtain the occurrence frequency of each keyword in the keyword subsequence in the corresponding customer request content, set the occurrence frequency of the keyword in the keyword sequence that is not in the keyword subsequence to a preset value, and form a frequency sequence of the keyword subsequence according to the occurrence frequency of each keyword in the keyword subsequence and the occurrence frequency of the keyword in the keyword sequence that is not in the keyword subsequence;
[0015] According to the order of the conversation rounds, the similarity between every two adjacent frequency sequences is calculated respectively to obtain a similarity sequence. For any two adjacent similarities in the similarity sequence, when the latter of the two similarities is less than the former, the intersection of the keyword subsequences corresponding to the two similarities is obtained as a partitioning subsequence. According to the partitioning subsequences in all the keyword subsequences, all the keyword subsequences before each of the partitioning subsequences are merged into a keyword merged sequence, and at least one keyword merged sequence is obtained accordingly.
[0016] Preferably, the step of obtaining the target reply template number of each keyword merging sequence according to the reply template number sequence of the historical service record includes:
[0017] For any keyword merge sequence, according to the reply template number corresponding to each keyword subsequence corresponding to the keyword merge sequence in the reply template number sequence of the historical service record, select the reply template number corresponding to the last keyword subsequence as the target reply template number of the keyword merge sequence.
[0018] Preferably, obtaining the first modified relevance degree of the keyword in the keyword merge sequence according to the queuing time, processing time and satisfaction score of each keyword merge sequence in the keyword merge sequence set includes:
[0019] Counting a first number of keyword merging sequences to which the keyword belongs in the keyword merging sequence set and a total number of keyword merging sequences contained in the keyword merging sequence set, and obtaining a first ratio between the first number and the total number;
[0020] According to the queuing time and processing time corresponding to each keyword merged sequence in the keyword merged sequence set, an average queuing time and an average processing time are obtained, any keyword merged sequence in the keyword merged sequence set is taken as a target sequence, a product of the average queuing time and the average processing time is used as a numerator, and a product of the queuing time and processing time corresponding to the target sequence is used as a denominator to obtain a corresponding second ratio, and a multiplication result between the satisfaction score of the historical service record to which the target sequence belongs and the second ratio is obtained;
[0021] Obtain the sum of the multiplication results corresponding to each keyword merger sequence in the keyword merger sequence set, obtain the TF-IDF value of the keyword in the keyword merger sequence, and use the product of the sum, the TF-IDF value and the first ratio as the first modified association degree of the keyword in the keyword merger sequence.
[0022] Preferably, the method of using the set of reply template numbers corresponding to the keywords to correct the first corrected relevance degree of the keywords in the keyword merger sequence to obtain the second corrected relevance degree of the keywords in the keyword merger sequence includes:
[0023] According to the target reply template number of each of the keyword merge sequences, a reply template number set corresponding to the keyword is obtained; for any reply template number in the reply template number set, the frequency of occurrence of the reply template number in the reply template number set is counted; the product of the first corrected association degree of the keyword in the keyword merge sequence under the reply template number and the frequency of occurrence of the reply template number in the reply template number set is obtained; according to the product corresponding to each reply template number in the reply template number set, the variance of the product is calculated as the numbering complexity of the keyword;
[0024] Substituting the opposite number of the keyword numbering complexity into an exponential function with a natural constant as the base to obtain a corresponding first function value, substituting the opposite number of the first modified association degree of the keyword in the keyword merger sequence into an exponential function with a natural constant as the base to obtain a corresponding second function value, and obtaining a difference between the constant 1 and the second function value;
[0025] The average value between the first function value and the difference value is used as the second corrected relevance degree of the keyword in the keyword merging sequence.
[0026] Preferably, the step of screening and removing keywords in the keyword merging sequence according to the second modified relevance degree of each keyword in the keyword merging sequence to obtain a final keyword merging sequence includes:
[0027] An averaging operation is performed on the second modified relevance degree of each keyword in the keyword merging sequence to obtain a corresponding average value, and keywords in the keyword merging sequence whose second modified relevance degree is greater than the average value form a final keyword merging sequence.
[0028] Preferably, the step of optimizing the digital customer service queue by using the trained machine learning model includes:
[0029] Obtain real-time customer request content, perform keyword extraction on the real-time customer request content, obtain a corresponding real-time keyword sequence, input the real-time keyword sequence into the trained machine learning model, output a corresponding reply template number, if after the reply template number corresponding to the output is fed back to the customer, if the keywords in the real-time request content that continue to be extracted are manual, then transfer to the corresponding manual customer service according to the fed-back reply template number.
[0030] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0031] The present invention aims at the digital customer service process. By analyzing the correlation between the keyword sequences of different customer request contents and the corresponding reply templates, the keyword sequences extracted from different historical service records are made representative and can better reflect customer needs. The keyword sequences are used as training sets, and then the machine learning model trained with the training sets can understand customer intentions more quickly and accurately, thereby providing customers with more accurate and effective services, reducing unnecessary queuing and transfer time, accelerating service response speed, and improving user service experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0033] Figure 1 This is a method flow chart of a digital customer service queuing optimization method based on a machine learning algorithm provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0034] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0035] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0036] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.
[0037] See also Figure 1 , is a method flow chart of a digital customer service queuing optimization method based on a machine learning algorithm provided in Embodiment 1 of the present invention, such as Figure 1 As shown, the method may include:
[0038] Step S101, obtain M historical service records of digital customer service. For any historical service record, according to all customer request contents in the historical service record, obtain the keyword sequence, reply template number sequence, satisfaction score, and the queuing time and processing time corresponding to each customer request content.
[0039] A historical service record data set is obtained from the digital customer service system, where the historical service record data set includes M historical service records, and one historical service record represents a complete consulting service for a customer, where M is a positive integer. Then, for any historical service record, the historical service record is preprocessed, that is, the incomplete, inconsistent, and duplicate records are removed using data cleaning technology.
[0040] Apply data conversion technology to normalize each field in each historical service record, such as unified timestamp format, coding standardization, etc. Since in each historical service record, for any round of customer consultation, there is a queuing time in each round of consultation, that is, the waiting time from the time the customer sends the consultation content to the time the digital customer service answers the question. At the same time, there is a processing time in each round of request consultation, that is, the time taken for the digital customer service to reply to a request consultation. Therefore, for any round of consultation in each historical service record, the queuing time and processing time corresponding to the round of consultation can be directly extracted from the service log of the digital customer service system. For the convenience of expression, each round of consultation corresponds to a customer request content. Therefore, the queuing time and processing time corresponding to each round of consultation are recorded as a queuing time and a processing time corresponding to a customer request content.
[0041] There are multiple reply templates for automatic replies in the data customer service system, and each reply template corresponds to a number, and each reply template number is unique. For any historical service record, the reply template number used can be extracted from the historical service record, and the reply template numbers are combined into a reply template number sequence according to the order of the customer's request content. Since a customer will be surveyed on service satisfaction after consulting the customer, the historical service record will also have a service satisfaction score, and the service satisfaction score in the historical service record is extracted and recorded as the satisfaction score.
[0042] At the same time, the corresponding text information of each customer request content in the historical service record is extracted through natural language processing technology, and then all the text information is processed, that is, the TF-IDF (term frequency-inverse document frequency) algorithm is used to extract keywords from all customer request contents, and the extracted keywords are combined into a keyword sequence, that is, the historical service record corresponds to a keyword sequence.
[0043] At this point, for any historical service record in the digital customer service system, the keyword sequence, reply template number sequence, satisfaction score in the historical service record, and the queuing time and processing time corresponding to each customer request content in the historical service record are obtained.
[0044] Step S102, for any historical service record whose reply template number sequence length does not meet the requirements, take the keywords in the keyword sequence of the historical service record as the benchmark, obtain the keyword subsequences composed of the keywords contained in each customer request content in the historical service record, divide and merge all the keyword subsequences to obtain at least one keyword merged sequence, and obtain the target reply template number of each keyword merged sequence according to the reply template number sequence of the historical service record.
[0045] When using the TF-IDF algorithm to extract keywords from all customer request contents in historical service records, the following problems may occur:
[0046] Over-emphasis on high-frequency common words: The TF-IDF algorithm tends to emphasize words that appear frequently and in a small number of documents in the entire dataset. However, this sometimes causes some high-frequency but common words to be mistaken for keywords. If a customer request contains many colloquial words, the frequency of the word in the customer request content is high, causing it to be mistakenly extracted as a keyword.
[0047] Ignoring low-frequency keywords: For keywords that appear only a few times in the entire dataset but are very meaningful for a single document, the TF-IDF algorithm may underestimate their importance. For example, suppose there is a customer request about a screen failure on a specific model of mobile phone. The keyword "screen flicker" may appear only a few times in the entire request document set, resulting in a high IDF value, but if it only appears once or twice in a specific request, its TF value will be very low, which may cause this important keyword to be ignored.
[0048] Therefore, it is necessary to optimize the keyword sequence of each historical service record to improve the accuracy of keyword extraction from customer request content in each historical service record, so that the extracted keyword sequence is representative and can better reflect customer needs.
[0049] Specifically, considering that there may be multiple rounds of conversations in one conversation in the actual digital customer service process, there are probably two reasons for this: first, the customer request is not resolved in a single conversation, and details are supplemented through multiple rounds of conversations. At this time, the later the reply template number is, the stronger the correlation between the keyword sequence and the later reply template; second, the customer has multiple requests, and each request has its own correlation with the corresponding reply template; therefore, it is necessary to determine whether there is a corresponding relationship between the sequence composed of different keywords and different reply templates in the historical service records of multiple rounds of conversation in one round of conversation.
[0050] For any historical service record, when the length of the reply template number sequence of the historical service record is not 1, it means that there are multiple rounds of dialogue between the customer and the digital customer service (one round of dialogue corresponds to one customer request content). When the length of the reply template number sequence of the historical service record is 1, it means that there is only one round of dialogue between the customer and the digital customer service, and the correlation between the keyword sequence of the historical service record and the corresponding reply template is strong. Therefore, according to the length of the reply template number sequence of each historical service record, the keyword correlation analysis is performed on each historical service record whose reply template number sequence length is not 1.
[0051] For any historical service record whose length of the reply template number sequence is not 1, firstly, perform keyword extraction on each customer request content in the historical service record to obtain the keyword subsequence corresponding to each customer request content, wherein the method for extracting keywords from each customer request content in the historical service record is: taking the keyword sequence of the historical service record as the benchmark, for any customer request content, according to the keywords in the keyword sequence, the keywords contained in the customer request content are combined into a keyword subsequence of the customer request content, and the keyword type position in the keyword subsequence is consistent with the keyword sequence. For example: suppose the keyword sequence of a historical service record is , then the keyword subsequence of a customer request content in this historical service record is , not , so far, the keyword subsequence of each customer request content in the historical service record can be obtained.
[0052] Then, after obtaining the keyword subsequences of each customer request content in the historical service record, all keyword subsequences are divided and merged to obtain at least one keyword merged sequence, wherein the division and merging method is:
[0053] For any keyword subsequence, obtain the occurrence frequency of each keyword in the keyword subsequence in the corresponding customer request content, set the occurrence frequency of the keyword in the keyword sequence that is not in the keyword subsequence to a preset value, and form a frequency sequence of the keyword subsequence according to the occurrence frequency of each keyword in the keyword subsequence and the occurrence frequency of the keyword in the keyword sequence that is not in the keyword subsequence;
[0054] According to the order of the conversation rounds, the similarity between every two adjacent frequency sequences is calculated respectively to obtain a similarity sequence. For any two adjacent similarities in the similarity sequence, when the latter of the two similarities is less than the former, the intersection of the keyword subsequences corresponding to the two similarities is obtained as a partitioning subsequence. According to the partitioning subsequences in all the keyword subsequences, all the keyword subsequences before each of the partitioning subsequences are merged into a keyword merged sequence, and at least one keyword merged sequence is obtained accordingly.
[0055] In one embodiment, it is assumed that the keyword sequence of the historical service record is , any keyword subsequence is , after obtaining the occurrence frequency of A and the occurrence frequency of E, the occurrence frequencies of B, C, and D are all set to 0, and a frequency sequence with a length of 5 can be obtained. Similarly, the length of the frequency sequence of each keyword subsequence is also 5. At this time, the frequency sequence of each keyword subsequence in the historical service record is of equal length. Each frequency sequence is used as a feature vector to obtain the cosine value of the angle between two adjacent frequency sequences, and the cosine value of the angle is used as the similarity between the corresponding two adjacent frequency sequences. The fewer non-zero values in the frequency sequences of the same length, the higher the similarity. Then, a similarity sequence can be obtained. When the similarities between two adjacent ones decrease (that is, the difference between the latter and the former is less than 0), it is considered that there are large differences between the two input contents of the customer, and the possibility of the customer request changing is large. Then, the intersection of the keyword subsequences corresponding to these two similarities is used as the division node of the customer request change. For example, there is a first similarity between sequence 1 and sequence 2, and there is a second similarity between sequence 2 and sequence 3. When the second similarity is less than the first similarity, sequence 2 is used as the division node, so that all division nodes in all keyword subsequences can be obtained, and all keyword subsequences before each division node are merged into a keyword merged sequence, and multiple keyword merged sequences in the historical service record are obtained.
[0056] Finally, the target reply template number of each keyword merge sequence is obtained according to the reply template number sequence of the historical service record, specifically: for any keyword merge sequence, according to the reply template number corresponding to each keyword subsequence corresponding to the keyword merge sequence in the reply template number sequence of the historical service record, select the reply template number corresponding to the last keyword subsequence as the target reply template number of the keyword merge sequence.
[0057] It should be noted that one customer request content corresponds to a reply template number and a keyword subsequence. Therefore, the reply template number corresponding to the last keyword subsequence in each keyword merge sequence is used as the target reply template number of the corresponding keyword merge sequence.
[0058] At this point, multiple keyword merging sequences in each historical service record and the target reply template number of each keyword merging sequence are obtained.
[0059] Step S103: For any reply template number of the digital customer service, obtain a keyword merge sequence set of the reply template number according to the target reply template number of each keyword merge sequence in each historical service record; for any keyword in any keyword merge sequence in the keyword merge sequence set, obtain the first corrected association degree of the keyword in the keyword merge sequence according to the queuing time, processing time and satisfaction score of each keyword merge sequence in the keyword merge sequence set.
[0060] The stronger the correlation between keywords and customer service reply content, the more the corresponding keyword extraction can reflect customer needs, that is, the more accurate the keyword extraction is at this time; if the frequency of occurrence of a certain keyword in all customer request content corresponding to the same reply template is higher, it means that the correlation between the keyword and the reply template is stronger; in addition, the higher the satisfaction score, the more the customer service reply content is in line with customer needs. At this time, it is believed that the keyword merger sequence can better reflect customer needs, that is, the more accurate the keyword extraction is; however, customer satisfaction will also be affected by other factors, such as waiting time and processing time. The longer the waiting time, the lower the customer satisfaction. Therefore, when combining customer satisfaction scores for correlation analysis, it is necessary to combine the waiting time and processing time for analysis to obtain more accurate results.
[0061] Since the reply templates in the digital customer service system are fixed and the corresponding reply template numbers are unique, for any reply template number, the keyword merge sequence set of the reply template number is obtained according to the target reply template number of each keyword merge sequence in each historical service record, and the queue time, processing time and satisfaction score corresponding to the jth keyword merge sequence in the keyword merge sequence set are recorded as , , , where a keyword merge sequence is formed by merging multiple keyword subsequences, and a keyword subsequence corresponds to a queuing time and a processing time. Therefore, the queuing time and processing time corresponding to a keyword merge sequence are the sum of the queuing time and the sum of the processing time of all the corresponding keyword subsequences, respectively.
[0062] After obtaining the keyword merge sequence set corresponding to the reply template number, for any keyword in any keyword merge sequence in the keyword merge sequence set, according to the queuing time, processing time and satisfaction score of each keyword merge sequence in the keyword merge sequence set, obtain the first modified relevance degree of the keyword in the keyword merge sequence, and the specific acquisition method includes:
[0063] Counting a first number of keyword merging sequences to which the keyword belongs in the keyword merging sequence set and a total number of keyword merging sequences contained in the keyword merging sequence set, and obtaining a first ratio between the first number and the total number;
[0064] According to the queuing time and processing time corresponding to each keyword merged sequence in the keyword merged sequence set, an average queuing time and an average processing time are obtained, any keyword merged sequence in the keyword merged sequence set is taken as a target sequence, a product of the average queuing time and the average processing time is used as a numerator, and a product of the queuing time and processing time corresponding to the target sequence is used as a denominator to obtain a corresponding second ratio, and a multiplication result between the satisfaction score of the historical service record to which the target sequence belongs and the second ratio is obtained;
[0065] Obtain the sum of the multiplication results corresponding to each keyword merger sequence in the keyword merger sequence set, obtain the TF-IDF value of the keyword in the keyword merger sequence, and use the product of the sum, the TF-IDF value and the first ratio as the first modified association degree of the keyword in the keyword merger sequence.
[0066] In one embodiment, taking the i-th keyword in the j-th keyword merge sequence in the keyword merge sequence set as an example, obtaining the TF-IDF value of the i-th keyword in the j-th keyword merge sequence belongs to the prior art and will not be repeated here. According to the queue time and processing time corresponding to each keyword merge sequence in the keyword merge sequence set, the average queue time is obtained. and average processing time , and then according to the TF-IDF value and average queue time of the i-th keyword in the j-th keyword combined sequence , average processing time As well as the queuing time, processing time and satisfaction score corresponding to the j-th keyword combined sequence, the first modified relevance degree of the i-th keyword in the j-th keyword combined sequence is obtained, and the calculation expression of the first modified relevance degree is:
[0067]
[0068] in, represents the first modified relevance of the i-th keyword in the j-th keyword combined sequence, represents the first number of keyword merged sequences to which the ith keyword belongs in the keyword merged sequence set, n represents the total number of keyword merged sequences contained in the keyword merged sequence set, represents the TF-IDF value of the i-th keyword in the j-th keyword combined sequence, represents the satisfaction score of the historical service record to which the j-th keyword merge sequence belongs, Indicates the average queue time corresponding to the keyword merge sequence set, Indicates the average processing time corresponding to the keyword merge sequence set, represents the queue time corresponding to the j-th keyword merge sequence, Indicates the processing time corresponding to the j-th keyword merge sequence.
[0069] It should be noted that It is used to indicate the frequency of occurrence of the ith keyword in the keyword merge sequence set. The higher the frequency, the stronger the correlation between the ith keyword and the reply template corresponding to the keyword merge sequence set. The higher the satisfaction score of each keyword merge sequence in the keyword merge sequence set, the stronger the correlation between the ith keyword and the reply template corresponding to the keyword merge sequence set. However, when the satisfaction score of each keyword merge sequence in the keyword merge sequence set is small, it may be due to excessive queuing time and processing time. Therefore, when the queue corresponding to a keyword merge sequence is The smaller the queue time and processing time are relative to the average queue time and average processing time, the more the customer satisfaction score at this time can reflect the customer's satisfaction with the customer service reply content. Therefore, the TF-IDF value of the i-th keyword in the j-th keyword combined sequence is more worthy of reference. Conversely, when the queue time and processing time corresponding to a keyword combined sequence are greater than the average queue time and average processing time, it means that the customer satisfaction score may be affected by the queue process and cannot fully reflect the customer's satisfaction with the customer service reply content. The reference value of the TF-IDF value of the i-th keyword in the j-th keyword combined sequence is lower, and then use Characterization The reference level.
[0070] Since the customer demands corresponding to a single reply template are similar, even if it is less common than other keywords in a single customer request, the common demands of multiple customers can increase the relevance of the keyword. Correspondingly, the words generated due to customer expression habits and other reasons have a lower relevance to the reply template of digital customer service. Although the word is mentioned more frequently than other keywords in a single customer request, the relevance of the keyword can still be reduced according to the common demands of multiple customers. Therefore, the analysis of the first modified relevance can avoid the phenomenon of low-frequency keywords being ignored and high-frequency common words being over-emphasized to a certain extent.
[0071] At this point, for each reply template number, the first modified relevance level of each keyword in each keyword merging sequence in the corresponding keyword merging sequence set can be obtained.
[0072] Step S104, using the reply template number set corresponding to the keyword, correct the first corrected association degree of the keyword in the keyword merge sequence to obtain the second corrected association degree of the keyword in the keyword merge sequence, and filter and remove the keywords in the keyword merge sequence according to the second corrected association degree of each keyword in the keyword merge sequence to obtain the final keyword merge sequence.
[0073] Considering that high-frequency common words also include common words that most customers use in daily expressions, these words have no practical reference significance for the selection of digital customer service response templates, such as "this, that, it", etc. The most notable feature of this type of words is that they can appear in any keyword merger sequence and point to any response template, that is, the keyword merger sequence where such words are located will correspond to multiple response templates. The more response templates a keyword corresponds to, the more likely it is to be a common word. Therefore, according to the response template corresponding to the keyword merger sequence where each keyword is located, the first corrected correlation degree of the keyword in the keyword merger sequence to which it belongs is corrected to obtain the second corrected correlation degree of the keyword in the keyword merger sequence to which it belongs. Then the method for obtaining the second corrected correlation degree of each keyword in each keyword merger sequence is as follows:
[0074] According to the target reply template number of each of the keyword merge sequences, a reply template number set corresponding to the keyword is obtained; for any reply template number in the reply template number set, the frequency of occurrence of the reply template number in the reply template number set is counted; the product of the first corrected association degree of the keyword in the keyword merge sequence under the reply template number and the frequency of occurrence of the reply template number in the reply template number set is obtained; according to the product corresponding to each reply template number in the reply template number set, the variance of the product is calculated as the numbering complexity of the keyword;
[0075] Substituting the opposite number of the keyword numbering complexity into an exponential function with a natural constant as the base to obtain a corresponding first function value, substituting the opposite number of the first modified association degree of the keyword in the keyword merger sequence into an exponential function with a natural constant as the base to obtain a corresponding second function value, and obtaining a difference between the constant 1 and the second function value;
[0076] The average value between the first function value and the difference value is used as the second corrected relevance degree of the keyword in the keyword merging sequence.
[0077] In one embodiment, if the customer service reply templates corresponding to a word are more uniform, it means that the word is more targeted to the corresponding customer service reply template; if the more customer service reply templates a word corresponds to, the weaker the targeting of the word, in which case the word is more likely to be a high-frequency common word; however, not all one-to-many relationships are high-frequency common words, and some keywords may be for a type of problem, such as the specifications, prices, and other information of a "mobile phone". In this case, the keyword "mobile phone" will correspond to multiple customer service reply templates, and the difference between the former and the latter is that the latter itself has a strong correlation with the corresponding customer service reply template. Therefore, for the ith keyword in the jth keyword merge sequence in the keyword merge sequence set, firstly, according to all historical service records, The target reply target number corresponding to each keyword merge sequence in the record is used, and the target reply template number corresponding to the keyword merge sequence where the ith keyword is located is used to form the reply template number set of the ith keyword. Then, for any reply template number in the reply template number set of the ith keyword, the frequency of occurrence of the reply template number in the reply template number set is counted. Since the ith keyword corresponds to a first corrected correlation degree in the keyword merge sequence corresponding to each reply template number, the variance of the product of the first corrected correlation degree corresponding to the ith keyword under each reply template number and the frequency of occurrence of the corresponding reply template number in the reply template number set is calculated, and the corresponding variance is obtained as the numbering complexity of the ith keyword. .
[0078] The complexity of getting the number of the i-th keyword Then, using the numbering complexity of the i-th keyword The first modified relevance degree of the ith keyword in the jth keyword combined sequence is modified to obtain the second modified relevance degree of the ith keyword in the jth keyword combined sequence. The calculation expression of the second modified relevance degree is:
[0079]
[0080] in, represents the second modified correlation degree of the ith keyword in the jth keyword combined sequence, exp() represents an exponential function with a natural constant as the base, represents the numbering complexity of the i-th keyword, It represents the first modified relevance degree of the i-th keyword in the j-th keyword combined sequence, and 1 represents a constant.
[0081] It should be noted that the higher the numbering complexity of the ith keyword, the worse the correlation between the ith keyword and the reply template, the weaker the targeting of the ith keyword, and the smaller the second corrected correlation degree of the ith keyword in the jth keyword merge sequence. Therefore, the first corrected correlation degree of the ith keyword in the jth keyword merge sequence is first normalized, and then the normalized first corrected correlation degree is corrected using the normalized numbering complexity to obtain the second corrected correlation degree of the ith keyword in the jth keyword merge sequence.
[0082] The second corrected correlation degree of each keyword in each keyword merging sequence in the keyword merging sequence set corresponding to each reply template number is calculated in turn, so that for each keyword merging sequence in all historical service records, the keywords in the corresponding keyword merging sequence are screened and removed according to the second corrected correlation degree of each keyword in the keyword merging sequence to obtain a final keyword merging sequence. For any keyword merging sequence, the method for screening and removing keywords for the keyword merging is: averaging the second corrected correlation degree of each keyword in the keyword merging sequence to obtain the corresponding average value, and the keywords in the keyword merging sequence whose second corrected correlation degree is greater than the average value form the final keyword merging sequence.
[0083] At this point, the final keyword merging sequence corresponding to the customer request content in the M historical service records is obtained.
[0084] Step S105, use each final keyword merging sequence and the corresponding target reply template number in all historical service records to train the preset machine learning model to obtain a trained machine learning model, and use the trained machine learning model to optimize the digital customer service queue.
[0085] After obtaining the final keyword merging sequence corresponding to the customer request content in the M historical service records, since each final keyword merging sequence corresponds to a target reply template number, each final keyword merging sequence in all historical service records and the corresponding target reply template number are used to train the preset machine learning model. Preferably, the preset machine learning model in the embodiment of the present invention is a random forest model.
[0086] The final keyword merge sequence is used as the input of the random forest model, and the corresponding target reply template number is used as the output of the random forest model. The random forest model learns the correspondence between a large number of final keyword merge sequences and the corresponding target reply template numbers, and finally obtains a random forest model that can automatically output the corresponding reply template number according to the keyword sequence, that is, a trained random forest model, which is used to optimize the digital customer service queue using the trained machine learning model. Among them, using the trained machine learning model to optimize the digital customer service queue includes:
[0087] Obtain real-time customer request content, perform keyword extraction on the real-time customer request content, obtain a corresponding real-time keyword sequence, input the real-time keyword sequence into the trained machine learning model, output a corresponding reply template number, if after the reply template number corresponding to the output is fed back to the customer, if the keywords in the real-time request content that continue to be extracted are manual, then transfer to the corresponding manual customer service according to the fed-back reply template number.
[0088] In actual application, the reply templates in the database are classified and marked for different types of customer questions, and then a mapping table is established in the system so that each reply template is associated with a specific type of question, and each type of question corresponds to a manual customer service staff who specializes in solving this type of problem. When a new customer service request enters the system, the keyword sequence of the customer request content is first extracted, and then the keyword sequence is directly input into the trained random forest model. The model outputs the corresponding reply template number, and then the corresponding reply template is replied to the customer. If the customer needs manual service, such as the customer input content is "manual", the corresponding manual customer service staff who specializes in solving this type of problem is directly found according to the reply template number, and then the customer is transferred to the corresponding manual customer service staff. At the same time, the relevant reply template number is also provided to the manual customer service staff so that the manual customer service staff can quickly understand the customer's general needs and ensure that the customer's questions can be quickly answered professionally and accurately without going through multiple transfers or waiting in line, thereby improving service quality and customer experience, and improving processing speed and service quality.
[0089] To sum up, the embodiments of the present invention aim at the digital customer service process, by analyzing the correlation between the keyword sequences of different customer request contents and the corresponding reply templates, so that the keyword sequences extracted from different historical service records are representative and can better reflect customer needs, and use them as training sets. Then, the machine learning model trained with the training sets can understand customer intentions more quickly and accurately, and provide customers with more accurate and effective services, so as to reduce unnecessary queuing and transfer time, speed up service response speed, and improve user service experience.
[0090] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A digital customer service queue optimization method based on machine learning algorithm, It is characterized in that The method comprises: Obtain M historical service records of the digital customer service, and for any historical service record, obtain a keyword sequence, a reply template number sequence, a satisfaction score, and a queuing time and processing time corresponding to each customer request content according to all customer request contents in the historical service record; For any historical service record whose length of the reply template number sequence is not the preset length, taking the keywords in the keyword sequence of the historical service record as a benchmark, respectively obtain the keyword subsequences composed of the keywords contained in each customer request content in the historical service record, divide and merge all the keyword subsequences to obtain at least one keyword merge sequence, and obtain the target reply template number of each keyword merge sequence according to the reply template number sequence of the historical service record; For any reply template number of the digital customer service, according to the target reply template number of each keyword merge sequence in each of the historical service records, a keyword merge sequence set of the reply template number is obtained, and for any keyword in any keyword merge sequence in the keyword merge sequence set, according to the queuing time, processing time and satisfaction score of each keyword merge sequence in the keyword merge sequence set, a first modified relevance degree of the keyword in the keyword merge sequence is obtained; Using the set of reply template numbers corresponding to the keywords, the first modified relevance degree of the keywords in the keyword merger sequence is modified to obtain the second modified relevance degree of the keywords in the keyword merger sequence, and the keywords in the keyword merger sequence are screened and removed according to the second modified relevance degree of each keyword in the keyword merger sequence to obtain a final keyword merger sequence; Using each final keyword merge sequence and the corresponding target reply template number in all historical service records, a preset machine learning model is trained to obtain a trained machine learning model, and the trained machine learning model is used to optimize the digital customer service queue; The step of dividing and merging all keyword subsequences to obtain at least one keyword merged sequence includes: For any keyword subsequence, obtain the occurrence frequency of each keyword in the keyword subsequence in the corresponding customer request content, set the occurrence frequency of the keyword in the keyword sequence that is not in the keyword subsequence to a preset value, and form a frequency sequence of the keyword subsequence according to the occurrence frequency of each keyword in the keyword subsequence and the occurrence frequency of the keyword in the keyword sequence that is not in the keyword subsequence; According to the order of the conversation rounds, the similarity between each two adjacent frequency sequences is calculated to obtain a similarity sequence. For any two adjacent similarities in the similarity sequence, when the latter of the two similarities is less than the former, the intersection of the keyword subsequences corresponding to the two similarities is obtained as a partitioning subsequence. According to the partitioning subsequences in all the keyword subsequences, all the keyword subsequences before each partitioning subsequence are merged into a keyword merged sequence, and at least one keyword merged sequence is obtained accordingly. The step of obtaining a target reply template number for each keyword merging sequence according to the reply template number sequence of the historical service record includes: For any keyword merging sequence, according to the reply template number corresponding to each keyword subsequence corresponding to the keyword merging sequence in the reply template number sequence of the historical service record, select the reply template number corresponding to the last keyword subsequence as the target reply template number of the keyword merging sequence; The step of obtaining the first modified relevance degree of the keyword in the keyword merge sequence according to the queuing time, processing time and satisfaction score of each keyword merge sequence in the keyword merge sequence set includes: Counting a first number of keyword merging sequences to which the keyword belongs in the keyword merging sequence set and a total number of keyword merging sequences contained in the keyword merging sequence set, and obtaining a first ratio between the first number and the total number; According to the queuing time and processing time corresponding to each keyword merged sequence in the keyword merged sequence set, an average queuing time and an average processing time are obtained, any keyword merged sequence in the keyword merged sequence set is taken as a target sequence, a product of the average queuing time and the average processing time is used as a numerator, and a product of the queuing time and processing time corresponding to the target sequence is used as a denominator to obtain a corresponding second ratio, and a multiplication result between the satisfaction score of the historical service record to which the target sequence belongs and the second ratio is obtained; Obtaining the sum of the multiplication results corresponding to each keyword merger sequence in the keyword merger sequence set, obtaining the TF-IDF value of the keyword in the keyword merger sequence, and taking the product of the sum, the TF-IDF value and the first ratio as the first modified relevance degree of the keyword in the keyword merger sequence; The method of using the set of reply template numbers corresponding to the keywords to correct the first corrected relevance degree of the keywords in the keyword merge sequence to obtain the second corrected relevance degree of the keywords in the keyword merge sequence includes: According to the target reply template number of each of the keyword merge sequences, a reply template number set corresponding to the keyword is obtained; for any reply template number in the reply template number set, the frequency of occurrence of the reply template number in the reply template number set is counted; the product of the first corrected degree of association of the keyword in the keyword merge sequence under the reply template number and the frequency of occurrence of the reply template number in the reply template number set is obtained; according to the product corresponding to each reply template number in the reply template number set, the variance of the product is calculated as the numbering complexity of the keyword; Substituting the opposite number of the keyword numbering complexity into an exponential function with a natural constant as the base to obtain a corresponding first function value, substituting the opposite number of the first modified association degree of the keyword in the keyword merger sequence into an exponential function with a natural constant as the base to obtain a corresponding second function value, and obtaining a difference between the constant 1 and the second function value; taking the average value between the first function value and the difference value as the second corrected relevance degree of the keyword in the keyword combined sequence; The step of screening and removing the keywords in the keyword merging sequence according to the second modified relevance degree of each keyword in the keyword merging sequence to obtain a final keyword merging sequence includes: An averaging operation is performed on the second modified relevance degree of each keyword in the keyword merging sequence to obtain a corresponding average value, and keywords in the keyword merging sequence whose second modified relevance degree is greater than the average value form a final keyword merging sequence.
2. According to the digital customer service queuing optimization method based on machine learning algorithm according to claim 1, It is characterized in that The method of using the trained machine learning model to optimize the digital customer service queue includes: Obtain real-time customer request content, perform keyword extraction on the real-time customer request content, obtain a corresponding real-time keyword sequence, input the real-time keyword sequence into the trained machine learning model, output a corresponding reply template number, if after the reply template number corresponding to the output is fed back to the customer, if the keywords in the real-time request content that continue to be extracted are manual, then transfer to the corresponding manual customer service according to the fed-back reply template number.
