Intelligent calling method and system based on natural language processing
Through natural language processing technology, the user's call intention was analyzed and the operator was directly determined, which solved the problem of low user consultation efficiency in the existing intelligent customer service system, and achieved more efficient problem solving and resource matching.
Patent Information
- Application Number
- CN202411140365.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-26
AI Technical Summary
The existing intelligent customer service system is easy to answer questions when users consult. Users need to listen to voice prompts patiently and select buttons. It is easy to press wrongly or be dissatisfied with the options, which makes it difficult to effectively solve the problems and waste time.
Using intelligent calling method based on natural language processing, convert voice data into text through speech recognition, word segmentation processing and weighted word embedding vector construction, use three-layer stacked gated loop unit to analyze user call intentions, and determine operators based on intentions, supporting typical Direct mapping or intelligent matching of intent.
Users can directly describe problems in natural language, save consulting time, improve problem solving efficiency, optimize customer service resource allocation, match more suitable operators, and improve user experience and service efficiency.
Smart Images

Figure CN119031074A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an intelligent calling method and system based on natural language processing. Background Art
[0002] With the intelligent upgrade of corporate customer service centers and call centers, intelligent customer service robots are gradually being used. However, when answering customers' consultation questions, existing intelligent customer service robots are prone to answer irrelevant questions and are unable to solve customers' actual problems. Therefore, manual answers are still an indispensable link.
[0003] When connecting to a human customer service representative, users need to use buttons to specify the content of the inquiry. For example, according to the voice prompt, press 1 to select service A and press 2 to select service B. This requires users to listen to all the voice prompts patiently before making a choice. It is easy to press the wrong button, and it is also easy to find that the options provided do not contain the content you want to inquire about, which wastes a lot of time and makes it difficult to effectively solve the problem. Summary of the invention
[0004] In order to solve the technical problems that the current customer service calling method requires users to patiently listen to all voice prompts and then make a choice, which is easy to be affected by pressing the wrong button, and it is also easy for the provided options to not contain the content that the user wants to consult, thus wasting a lot of time and the problem is difficult to be effectively solved, the present invention provides an intelligent calling method and system based on natural language processing.
[0005] The technical solution provided by the embodiment of the present invention is as follows:
[0006] First aspect:
[0007] An intelligent calling method based on natural language processing provided by an embodiment of the present invention is applied to a memory, including:
[0008] S1: Obtain the user's voice data;
[0009] S2: converting the voice data into text data through a speech recognition algorithm based on natural language processing;
[0010] S3: performing word segmentation processing on the text data;
[0011] S4: Combine the weight values of each word segment to construct the weighted word embedding vector of each word segment;
[0012] S5: Analyze the user's calling intention through three layers of stacked gated recurrent units according to the weighted word embedding vector;
[0013] S6: Determine whether the user's call intention is a typical intention; if so, determine the operator for this connection based on the established mapping relationship between the typical intention and the operator; otherwise, determine the operator for this connection through an intelligent matching algorithm.
[0014] Second aspect:
[0015] An embodiment of the present invention provides an intelligent call system based on natural language processing, including:
[0016] processor;
[0017] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the intelligent calling method based on natural language processing as described in the first aspect is implemented.
[0018] The third aspect:
[0019] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the intelligent calling method based on natural language processing as described in the first aspect is implemented.
[0020] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0021] (1) In the present invention, users can directly use natural language to describe their problems without having to press keys or wait for long voice prompts. The voice data is converted into text data through a speech recognition algorithm based on natural language processing, and then the user's call intention is analyzed through a three-layer stacked gated recurrent unit. The operator to be connected is directly determined based on the call intention, which saves the user's consultation time and improves the efficiency of solving the user's problem.
[0022] (2) In the present invention, when the user's call intention is a typical intention, the operator for this connection is determined based on the established mapping relationship between the typical intention and the operator, and when the user's call intention is an atypical intention, the operator for this connection is determined through an intelligent matching algorithm. This can better match user needs with suitable solutions or operators, optimize customer service resource allocation, and improve the efficiency of solving user problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0024] Figure 1A flowchart of an intelligent calling method based on natural language processing provided by an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of the structure of an intelligent call system based on natural language processing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0027] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0028] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0029] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0030] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0031] Reference Manual Attached Figure 1 , showing a flow chart of an intelligent calling method based on natural language processing provided by an embodiment of the present invention.
[0032] The embodiment of the present invention provides a processing flow of an intelligent calling method based on natural language processing, which may include the following steps:
[0033] S1: Obtain the user's voice data.
[0034] S2: Convert voice data into text data through a speech recognition algorithm based on natural language processing.
[0035] Among them, Natural Language Processing (NLP) technology is a subfield of computer science, artificial intelligence and linguistics, focusing on the interaction between computers and human (natural) language. Its purpose is to enable computers to understand, interpret, generate and relate to human language. NLP technology plays a key role in processing text and voice data and has a wide range of applications, including search engines, speech recognition, translation software, chatbots, etc.
[0036] Among them, converting voice data into text data through Automatic Speech Recognition (ASR) algorithm is already a very existing technology.
[0037] Specifically, the features of speech signals can be mapped to corresponding phonemes (basic units of speech) through acoustic models. Modern acoustic models are usually based on deep neural networks (DNN) or convolutional neural networks (CNN), and recent trends also include recurrent neural networks (RNN) such as long short-term memory networks (LSTM) and gated recurrent units (GRU). Linguistic information in speech recognition is processed through language models, that is, it predicts the probability of the next word appearing in a given word sequence. Commonly used language models include n-gram models, recurrent neural network language models (RNN-LM), etc. Modern speech recognition systems may also use pre-trained language models such as BERT, GPT, etc. to better understand the context. After that, the decoder combines the outputs of the acoustic model and the language model to convert the phoneme sequence into a possible word sequence. The task of the decoder is to find the most likely text output under the conditions of the acoustic and language models. Common decoding techniques include Viterbi algorithm, beam search, etc.
[0038] Furthermore, natural language processing technology can also identify the emotional state of the user's voice data. When identifying emotional states, the acoustic features of the voice signal are very important. These features can be extracted from the audio signal, such as frequency features: such as fundamental frequency (F0), spectrum envelope, formant, etc., reflecting the pitch and sound quality of the voice. Energy features: such as energy envelope, short-term energy, indicating the volume change of the voice. Time domain features: such as speaking speed, pause time, rhythm, etc. When the voice is converted to text, NLP technology can also be used for text sentiment analysis. Multimodal emotion recognition combines multiple information sources such as speech and text to improve the accuracy of emotion recognition, combining data features from different modalities as input to the emotion recognition model. Then, support vector machine (SVM), random forest, convolutional neural network (CNN), long short-term memory network (LSTM), etc. are used for emotion recognition.
[0039] S3: Perform word segmentation on text data.
[0040] Optionally, the text data can be segmented using techniques such as regular expressions, maximum matching (MM), bidirectional maximum matching (BMM), hidden Markov model (HMM), and conditional random field (CRF).
[0041] S4: Combine the weight values of each word segment to construct the weighted word embedding vector of each word segment.
[0042] In a possible implementation, S4 specifically includes sub-steps S401 to S404:
[0043] S401: Extracting text features of each word segment.
[0044] Optionally, the text features include: term frequency TF feature, term frequency-inverse document frequency TF-IDF feature and inverse gravity moment IGM feature.
[0045] S402: Determine the weight value of each word segment according to the text feature of each word segment.
[0046] Optionally, the weight value of each word segmentation is determined according to the following formula:
[0047] βi=λ1TF i +λ2TFIDF i +λ3IGM i
[0048] Among them, β i Indicates the weight value of the i-th word, TF i Represents the TF feature of the i-th word, TFIDF i Represents the TF-IDF feature of the i-th word, IGM i represents the IGM feature of the i-th word segment, λ1 represents the weight contribution of the TF feature, λ2 represents the weight contribution of the TF-IDF feature, and λ3 represents the weight contribution of the IGM feature.
[0049] Among them, the TF (Term Frequency) feature reflects the frequency of words appearing in the text and can help capture high-frequency words in the text.
[0050] Optionally, the TF feature is specifically:
[0051]
[0052] Among them, TFi represents the TF feature of the i-th word, c i represents the number of occurrences of the i-th participle, and n represents the total number of participles.
[0053] Among them, the TF-IDF (term frequency-inverse document frequency) feature not only considers the frequency of a word in a single document, but also considers its inverse document frequency in the entire corpus, reducing the weight of common words that appear commonly in many documents and increasing the weight of distinctive words in specific texts.
[0054] Optionally, the TF-IDF feature is specifically:
[0055] TFIDF i =TF i IDF i
[0056]
[0057] Among them, TFIDF i Represents the TF-IDF feature of the i-th word, IDF i represents the frequency of the reverse information of the i-th word, D represents the total number of texts, and D i Represents the total number of texts containing the i-th word.
[0058] Among them, the IGM (Inverse Gravity Moment) feature can reflect the distribution characteristics of words in different documents and enhance the words with high discrimination but uncommon.
[0059] Optionally, the IGM features are specifically:
[0060]
[0061] Among them, IGM i represents the IGM feature of the i-th word, p j Indicates the position of the i-th word when it appears for the jth time in the text, j = 1, 2, ..., m i , m i represents the total number of times the i-th word appears in the text, G w Indicates the center of gravity of the location.
[0062] S403: Extract word embedding vectors of each word segment.
[0063] Optionally, extract word embedding vectors of each word segment through Word2Vec, GloVe, FastText, etc.
[0064] S404: Construct a weighted word embedding vector by combining the weight values of each word segment.
[0065] Optionally, a weighted word embedding vector is constructed by combining the weight values of each word segmentation according to the following formula:
[0066]
[0067] Among them, V i represents the i-th weighted word embedding vector, β i represents the weight value of the i-th word, v i represents the word embedding vector of the i-th word segment, and w represents the sliding window width.
[0068] It should be noted that the weighted word embedding vector can more accurately reflect the semantic contribution of important words in the text, which makes the generated vector representation more accurate when performing similarity calculation, classification and other tasks. Especially in natural language processing tasks, accurate semantic representation is crucial to improving model performance.
[0069] In the present invention, the method of constructing a weighted word embedding vector can strengthen the expression of important information, reduce the interference of noise words, and enhance the understanding of local context while maintaining the semantic information of word embedding, thereby improving the effect of natural language processing tasks.
[0070] S5: Analyze the user’s calling intention based on the weighted word embedding vector through three layers of stacked gated recurrent units.
[0071] Among them, the Gated Recurrent Unit (GRU) is a neural network structure used to process sequence data and is a variant of the recurrent neural network (RNN). GRU overcomes the gradient vanishing problem of traditional RNN when processing long sequences by introducing a gating mechanism. It can better capture long-term dependencies while maintaining sequence information.
[0072] Optionally, the three-layer stacked gated recurrent unit includes a first gated recurrent unit, a second gated recurrent unit, and a third gated recurrent unit that are stacked. The input layer of the first gated recurrent unit is used to obtain a weighted word embedding vector sequence, the candidate layer of the first gated recurrent unit is connected to the input layer of the second gated recurrent unit, the candidate layer of the second gated recurrent unit is connected to the input layer of the third gated recurrent unit, and the output layer of the third gated recurrent unit is connected to a fully connected layer, and the fully connected layer is used to fuse the hidden states in the candidate layers of the first gated recurrent unit, the second gated recurrent unit, and the third gated recurrent unit to obtain a comprehensive hidden state.
[0073] In the present invention, different GRU layers can learn and capture different levels of features in the input data. The bottom GRU focuses more on local, low-level features, such as short-term dependencies and basic patterns, while the high-level GRU can capture more complex, high-level features and long-range dependencies. This hierarchical feature learning capability makes the model more effective in processing complex sequence data.
[0074] Furthermore, the final fully connected layer can make comprehensive use of feature information at all levels by fusing the hidden states from each GRU layer. This fusion process enables the model to consider both low-level and high-level features at the same time, providing more comprehensive contextual information and decision-making basis for the final output.
[0075] Optionally, the three-layer stacked gated recurrent unit further includes: an attention layer. The attention layer is used to add attention weights to the comprehensive hidden state at each moment.
[0076] In this invention, the attention mechanism allows the model to focus on a specific part of the input sequence when predicting, rather than processing the entire input sequence on average. This focusing ability enables the model to better capture information that is more important to the current task or output, improving the accuracy of the results.
[0077] In a possible implementation, S5 specifically includes sub-steps S501 to S506:
[0078] S501: Input the weighted word embedding vector sequence into the first gated recurrent unit to obtain a first hidden state.
[0079] For each gated recurrent unit, the hidden state can be extracted according to the following formula:
[0080] z t =σ(W uz x t +Wh z h t-1 +b z )
[0081] r t =σ(W ur x t +W hr h t-1 +b r )
[0082] c t =σ(W uc x t +W hc (r t ⊙h t-1 )+b c )
[0083] ht =(1-z t )⊙h t-1 +z t ⊙c t
[0084] Among them, z t represents the output vector of the update gate at time t, σ() represents the activation function, and W uz represents the weight matrix between the input layer and the update gate, x t represents the input data at time t (weighted word embedding vector sequence), W hz represents the self-connection weight matrix of the update gate between time t and time t-1, h t-1 represents the hidden state at time t-1, b z represents the bias term of the update gate, r t represents the output vector of the reset gate at time t, W ur represents the weight matrix between the input layer and the reset gate, W h r represents the self-connection weight matrix of the reset gate between time t and time t-1, b r represents the bias term of the reset gate, c t represents the output vector of the candidate layer at time t, W uc Represents the weight matrix between the input layer and the candidate layer, W hc represents the self-connection weight matrix between the candidate layer at time t and time t-1, b c represents the bias term of the candidate layer, ⊙ represents the element-wise product operation, and h t represents the hidden state at time t.
[0085] S502: Input the first hidden state into the second gated recurrent unit to obtain a second hidden state.
[0086] S503: Input the second hidden state into the third gated recurrent unit to obtain a third hidden state.
[0087] S504: The first hidden state, the second hidden state and the third hidden state are fused through a fully connected layer to obtain a comprehensive hidden state:
[0088] H t =ω1h 1t +ω2h 2t +ω3h 3t
[0089] Among them, H t represents the comprehensive hidden state, h 1t represents the first hidden state, ω1 represents the weight coefficient of the first hidden state, and h 2t represents the second hidden state, ω2 represents the weight coefficient of the second hidden state, and h 3tRepresents the third hidden state, and ω3 represents the weight coefficient of the third hidden state.
[0090] Among them, those skilled in the art can set the weight coefficient ω1 of the first hidden state, the weight coefficient ω2 of the second hidden state, and the weight coefficient ω3 of the third hidden state according to actual conditions, and the present invention does not limit this.
[0091] It should be noted that the features learned by different GRU layers may be different. The bottom layer may capture relatively low-level local features, while the upper layer may learn more abstract high-level features. By fusing these different levels of hidden states, the model can comprehensively utilize information at different levels to obtain a richer and more complete feature representation.
[0092] S505: Add attention weights to the comprehensive hidden state at each moment through the attention layer:
[0093] e t =σ(W h H t +b h )
[0094]
[0095] H' t =α t H t
[0096] Among them, e t represents the attention score at time t, σ() represents the activation function, and W h represents the attention weight matrix, H t represents the comprehensive hidden state at time t, b h represents the bias term of the attention layer, α t represents the attention weight at time t, exp() represents an exponential function with a natural constant as the base, T represents the total length of the segmentation, and H′ t Represents the comprehensive hidden state after adding the attention weight.
[0097] It should be noted that by adding attention weights to the comprehensive hidden states at each moment, the model can capture important information more accurately and effectively, improving the quality and reliability of decision-making. This mechanism is particularly suitable for processing complex sequence data and tasks that require fine-grained information processing.
[0098] S506: Predict the user's calling intention based on the comprehensive latent state after adding the attention weight:
[0099] P = Soffmax(W h H' t +b h )
[0100] P=[P1,…,P i ,…,P n ]
[0101] Among them, P represents the probability value of the user's call intention belonging to each typical intention, P i represents the probability value that the user's call intention belongs to the i-th typical intention, Softmax() represents the Softmax activation function, and W h represents the weight matrix between the fully connected layer and the prediction layer, b h represents the prediction layer bias term, i = 1, 2, ..., n, where n represents the total number of typical intents.
[0102] Optionally, the category with the highest probability value is used as the user's call intention recognition result.
[0103] It should be noted that the Softmax activation function can be used to convert the output of the model into a probability distribution, which means that each component P of the output i Both represent the probability that the input data belongs to the i-th category. In this way, the model can not only predict the most likely category, but also provide the probability of each category, thereby quantifying the confidence of the prediction.
[0104] Specifically, the gradient descent method can be used to train the model parameters of the three-layer stacked gated recurrent unit.
[0105] The cross entropy loss function is used as the loss function of the gradient descent method.
[0106] The method for updating the model parameters of the three-layer stacked gated recurrent unit is as follows:
[0107]
[0108] Among them, θ t+1 represents the model parameters at the t+1th iteration, θ t represents the model parameters at the tth iteration, θ t-1 represents the model parameters at the t-1th iteration, ηt represents the adaptive learning rate at the tth iteration, Denotes the loss function L on θ t The gradient of , w represents the inertia coefficient.
[0109] It should be noted that by adding the inertia term, the direction and amplitude of the previous update can be utilized, which helps to accelerate convergence in areas with consistent gradient directions. This can significantly reduce the number of iterations required to reach the global or local optimal solution. At the same time, the introduction of the inertia coefficient w can help smooth the path of gradient updates and reduce oscillations in deep non-convex loss spaces. Especially when the learning rate is large, the inertia term can prevent drastic changes in the update direction and maintain the stability of training.
[0110] Furthermore, the adaptive learning rate is calculated as:
[0111]
[0112] Among them, η t represents the adaptive learning rate at the tth iteration, η0 represents the initial learning rate, and θ u represents the weight and bias of the s-th subnetwork at the u-th iteration, The loss function L is related to θ u The gradient of , u=1,2,…,k, μ represents a hyperparameter that prevents the denominator from being zero.
[0113] It should be noted that the learning rate is dynamically adjusted based on the cumulative sum of squares of past gradients. When the gradient is large, the cumulative sum of squares increases and the learning rate decreases; when the gradient is small, the cumulative sum of squares is small and the learning rate is relatively large. This adaptive adjustment can help the model learn quickly in the early stages of training, while reducing the step size and making fine adjustments when approaching the optimal solution.
[0114] Although the gradient descent method can be used to train model parameters. However, there is no fixed algorithm for selecting the initial parameters of the three-layer stacked gated recurrent unit, which are generally selected randomly. The initial parameters of the three-layer stacked gated recurrent unit represent the initial direction of network convergence and the starting point of learning. The randomly selected initial values will cause the three-layer stacked gated recurrent unit to be trained from a random direction. If you want to obtain the correct convergence direction, you must spend a lot of time on repeated training and learning, which will slow down the network convergence. The random starting point will also increase the probability that the model parameters will converge into a local optimum.
[0115] In order to improve the recognition effect of three-layer stacked gated recurrent units, appropriate initial model parameters must be selected. The present invention innovatively proposes a method for optimizing the initial model parameters through a harmony search algorithm.
[0116] Among them, the Harmony Search Algorithm (HS) is a heuristic optimization algorithm based on finding harmonious tones during music improvisation. The Harmony Search Algorithm imitates the process of musicians finding the best harmony by constantly adjusting the tones during improvisation.
[0117] The inverse of the above cross entropy loss function is used as the fitness function of the harmony search algorithm.
[0118] Initialize the harmony memory library. The harmony memory library includes multiple harmonies. Harmonies include multiple components. Each harmony represents a feasible set of model parameters, and each component represents a model parameter:
[0119]
[0120] Among them, HM represents the harmony memory, D represents the harmony dimension, and X i represents the i-th harmony, i = 1, 2, ..., HMS, HMS represents the size of the harmony memory bank, x ij represents the jth component in the ith harmony, j = 1, 2, …, D, where D represents the harmony dimension.
[0121] Generate a random number r1 and determine whether the random number r1 is less than the probability of the harmony memory. If so, randomly generate a new harmony through the harmony memory. Otherwise, generate a new harmony through random selection.
[0122] Optionally, randomly generating new harmonies through a harmony memory library is specifically as follows:
[0123] X new =[x new,1 , x new,2 …, x new,D ]x new,j ∈rand[x 1j , x 2j , …, x HMS,j ]
[0124] Among them, X new Indicates new harmony, x new,j represents the jth component in the new harmony, j = 1, 2, ..., D, D represents the harmony dimension, rand represents random selection, x ij represents the jth component in the ith harmony, i=1, 2, ..., HMS, and HMS represents the size of the harmony memory bank.
[0125] It should be noted that randomly selecting components from multiple harmonies in the harmony memory can maintain the diversity of the newly generated harmony. This diversity helps to explore the solution space, avoid the algorithm from falling into the local optimum, and improve the global search ability. The harmonies stored in the harmony memory have been optimized and screened to a certain extent, and usually have a higher fitness value. Using this existing information to generate new harmonies can increase the possibility that the new harmony has a good fitness value and improve the optimization efficiency.
[0126] Optionally, generating new harmony by random selection is as follows:
[0127] x new,j = r1[upper j -lower j ]+lower j
[0128] Among them, upper j Represents the upper boundary of the jth component, lower j represents the lower bound of the j-th component.
[0129] It should be noted that by randomly generating the components of the new harmony within a predetermined range, this method allows exploring all possible areas of the entire solution space. This global search capability helps to discover potential excellent solutions that have not been included in the harmony memory library and avoid falling into local optimality.
[0130] Optionally, the upper boundary and the lower boundary are specifically:
[0131]
[0132]
[0133] in, represents the upper boundary of the jth component at the tth iteration, represents the upper boundary of the jth component at the t-1th iteration, HM(:j) represents the jth component in the harmony memory library, max[HM(:j)] represents the maximum value of the jth component in the harmony memory library, represents the lower bound of the j-th component at the t-th iteration, represents the lower boundary of the j-th component at the t-1-th iteration, min[HM(:j)] represents the minimum value of the j-th component in the harmony memory library, and T represents the total number of iterations.
[0134] It should be noted that as the number of iterations increases, the search range gradually narrows, which promotes the algorithm to gradually converge to the optimal solution. A larger search range in the early stage helps to explore the solution space extensively and find multiple potential good solutions, while gradually narrowing the range in the later stage can enable a detailed search to ensure that a local optimal solution or a solution close to the global optimal solution is found.
[0135] In the case of randomly generating a new harmony through the harmony memory library, a random number r2 is generated, and it is determined whether the random number r2 is less than the pitch fine-tuning probability. If so, a new harmony is generated through pitch fine-tuning. Otherwise, the harmony remains unchanged.
[0136] Optionally, generating a new harmony by fine-tuning the pitch is specifically as follows:
[0137] x new,j =x new,j+r2BW+r3(x best,j -x worst,j )+x worst,j
[0138] Among them, x′ new,j represents the jth component of the harmony after the new harmony is fine-tuned, x new,j Indicates that the jth component in the new harmony is randomly generated through the harmony memory library, BW represents the fine-tuning bandwidth, r3 represents a random number between -1 and 1, and x best,j Indicates the ,th component in the harmony with the highest current fitness value, x worst,j Represents the jth component in the harmony with the lowest current fitness value.
[0139] It should be noted that by fine-tuning the existing solution, a detailed local search for the solution can be performed to further improve the fitness value. This method can further tap the potential of the solution when it is already good and improve the accuracy of the solution. Fine-tuning with the information of the current optimal solution and the worst solution can effectively guide the new solution to a better direction. Specifically, the difference between the optimal solution and the worst solution provides a gradient information that helps the new solution move in the direction of improvement.
[0140] The generated new harmony is compared with the harmony with the lowest fitness value in the harmony memory library to determine whether the fitness value of the new harmony is greater than the fitness value of the harmony with the lowest fitness value in the harmony memory library. If so, the harmony with the lowest fitness value in the harmony memory library is replaced with the new harmony to update the harmony memory library.
[0141] Otherwise, keep the harmony memory unchanged.
[0142] Determine whether the current number of iterations has reached the maximum number of iterations. If so, output the model parameter set of the harmony representative with the highest fitness. Otherwise, return to continue iterating.
[0143] In the present invention, suitable initial parameters can significantly accelerate the convergence speed of the neural network. The initial parameters found by the harmony search algorithm are usually closer to the optimal solution than the randomly selected initial parameters, which reduces the amplitude and number of model adjustments during the training process, thereby accelerating convergence.
[0144] S6: Determine whether the user's call intention is a typical intention. If so, determine the operator for this connection based on the established mapping relationship between the typical intention and the operator. Otherwise, determine the operator for this connection through an intelligent matching algorithm.
[0145] In a possible implementation, S6 specifically includes: determining whether the probability value of the user's call intention belonging to each typical intention is greater than a preset probability value. If so, it is determined that the current call intention belongs to a typical intention, and the operator for this connection is determined according to the established mapping relationship between the typical intention and the operator. Otherwise, the operator for this connection is determined by an intelligent matching algorithm.
[0146] Among them, those skilled in the art can set the size of the preset probability value according to actual conditions, and the present invention does not limit it.
[0147] It should be noted that when the user's call intention clearly belongs to a typical intention, the system can directly use the established mapping relationship to assign the user to the most suitable operator. This ensures that the user's problem can be handled by the operator with the most relevant experience, improving service quality and problem-solving efficiency. By processing atypical intentions through intelligent matching algorithms, the system can flexibly respond to various complex and unforeseen situations. This algorithm can dynamically select the most suitable operator based on factors such as the operator's current status, skills, and historical performance, and adapt to changing user needs and workloads.
[0148] In the present invention, for typical requests, users are served quickly and accurately. For atypical requests, the intelligent matching algorithm provides flexible solutions. This system not only improves the efficiency and quality of services, but also can continuously adapt to and meet the diverse needs of users.
[0149] In a possible implementation, determining the operator for this connection by using an intelligent matching algorithm in S6 specifically includes sub-steps S601 to S606:
[0150] S601: According to the voice data and the corresponding text data, the matching degree between each operator and the current call is determined from multiple evaluation dimensions, and a matching degree matrix is constructed:
[0151]
[0152] Among them, A represents the matching matrix, a i represents the matching degree vector of the ith operator, and the matching degree vector a of the ith operator i =[a i1 , …a ij , …, a im ], a ij represents the matching degree of the ith operator under the jth evaluation dimension, j = 1, 2, ..., m, m represents the total number of evaluation dimensions, i = 1, 2, ..., n, n represents the total number of operators.
[0153] Optionally, the evaluation dimensions include: professional field ability, emotion processing ability, language ability, satisfaction with historical handling of similar issues, and historical user handling satisfaction.
[0154] Optionally, the matching degree of the operator under the evaluation dimension of professional field ability is calculated in a specific manner: the matching degree under the evaluation dimension of professional field ability is determined according to the number of hits of the operator's professional field label in the text data. For example, if the word "air conditioner" is mentioned many times in the text data, the matching degree of the operator with the professional field label of air conditioner will increase, and the matching degree will also increase as the number of times the customer mentions increases.
[0155] Optionally, the matching degree of the operator under the evaluation dimension of emotion processing ability is calculated in a specific manner: the current user emotion is identified according to the voice data, and the matching degree under the evaluation dimension of emotion processing ability is determined according to the ability value of the operator when processing such emotion. For example, if the user is currently in an angry emotional state, the ability value of each operator when processing angry emotion is used as the matching degree under the evaluation dimension of emotion processing ability.
[0156] Optionally, the matching degree of the operator under the evaluation dimension of language ability is calculated in a specific manner: identifying whether the current user uses a dialect based on the voice data, and determining the matching degree under the evaluation dimension of language ability based on the ability value of the operator to process the language used by the user. For example, if the user uses Mandarin, the matching degree of the operator who can process Mandarin is set to 100, and if the user uses a dialect, the matching degree of the operator who can process the dialect is set to 100.
[0157] Optionally, the matching degree of the operator under the evaluation dimension of satisfaction with the handling of similar issues in the past is calculated as follows: the matching degree under the evaluation dimension of satisfaction with the handling of similar issues in the past is determined based on the identified user's call intention and the user's satisfaction when the operator handled similar issues.
[0158] Optionally, the matching degree of the operator under the evaluation dimension of historical user processing satisfaction is calculated as follows: query the historical call requests of the current user, and determine the matching degree under the evaluation dimension of historical user processing satisfaction according to the satisfaction of each operator with the previous call request processing of the user.
[0159] Furthermore, in order to unify the scales under each evaluation dimension, the matching degree under each evaluation dimension may be normalized.
[0160] S602: The maximum values in each column of the matching matrix form a positive ideal value vector, and the minimum values in each column form a negative ideal value vector:
[0161]
[0162]
[0163] Among them, a + represents a positive ideal value vector, max represents the maximum value, a - represents the negative ideal value vector, and min represents the minimum value.
[0164] S603: Calculate the Euclidean distance between the matching degree vector of each operator and the positive ideal value vector and the negative ideal value vector:
[0165]
[0166]
[0167] in, represents the matching degree vector and positive ideal value vector of the ith operator, Represents the matching degree vector and negative ideal value vector of the i-th operator.
[0168] It should be noted that the difference between the operator's performance and the optimal value is quantified by calculating the Euclidean distance between the operator's matching degree vector and the positive ideal value vector (optimal performance) and the negative ideal value vector (worst performance). This distance calculation provides a quantitative method to evaluate the relative merits of operators and helps to select operators more objectively.
[0169] S604: Calculate the closeness between the matching degree vector of each operator and the positive ideal value vector:
[0170]
[0171] Among them, g i Represents the closeness between the matching vector of the i-th operator and the positive ideal value vector.
[0172] S605: Sort the operators in descending order of closeness to the positive ideal value vector.
[0173] It should be noted that the calculation of closeness is based on a comprehensive consideration of the operator's performance relative to the ideal performance. Through this calculation, a clear ranking can be provided for all operators, thereby helping the system to allocate tasks or resources in the most reasonable order. This ranking is transparent and data-based, reducing the impact of subjective judgment.
[0174] S606: Select the operator who is currently in an idle state and has the highest degree of closeness to the positive ideal value vector as the operator for this connection.
[0175] It should be noted that by selecting the idle operator with the highest degree of proximity to the positive ideal value vector, the system can match the most suitable operator to handle the current user's request. This matching method ensures that the operator has a high level of ability in each evaluation dimension, thereby improving the efficiency, accuracy and service quality of problem solving.
[0176] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0177] (1) In the present invention, users can directly use natural language to describe their problems without having to press keys or wait for long voice prompts. The voice data is converted into text data through a speech recognition algorithm based on natural language processing, and then the user's call intention is analyzed through a three-layer stacked gated recurrent unit. The operator to be connected is directly determined based on the call intention, which saves the user's consultation time and improves the efficiency of solving the user's problem.
[0178] (2) In the present invention, when the user's call intention is a typical intention, the operator for this connection is determined based on the established mapping relationship between the typical intention and the operator, and when the user's call intention is an atypical intention, the operator for this connection is determined through an intelligent matching algorithm. This can better match user needs with suitable solutions or operators, optimize customer service resource allocation, and improve the efficiency of solving user problems.
[0179] Reference Manual Attached Figure 2 , showing a schematic structural diagram of an intelligent call system based on natural language processing provided by the present invention.
[0180] The present invention further provides an intelligent calling system 20 based on natural language processing, which is applied to the above-mentioned intelligent calling method based on natural language processing, and comprises:
[0181] Processor 201.
[0182] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201 , the intelligent calling method based on natural language processing as in the method embodiment is implemented.
[0183] The natural language processing-based intelligent call system 20 provided in the present invention can execute the above-mentioned natural language processing-based intelligent call method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0184] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0185] (1) In the present invention, users can directly use natural language to describe their problems without having to press keys or wait for long voice prompts. The voice data is converted into text data through a speech recognition algorithm based on natural language processing, and then the user's call intention is analyzed through a three-layer stacked gated recurrent unit. The operator to be connected is directly determined based on the call intention, which saves the user's consultation time and improves the efficiency of solving the user's problem.
[0186] (2) In the present invention, when the user's call intention is a typical intention, the operator for this connection is determined based on the established mapping relationship between the typical intention and the operator, and when the user's call intention is an atypical intention, the operator for this connection is determined through an intelligent matching algorithm. This can better match user needs with suitable solutions or operators, optimize customer service resource allocation, and improve the efficiency of solving user problems.
[0187] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0188] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0189] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0190] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0191] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0192] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0193] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0194] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0195] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0196] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0197] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0198] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0199] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, an intelligent calling method based on natural language processing as described in the method embodiment is implemented.
[0200] A computer-readable storage medium provided by the present invention can implement the steps and effects of the intelligent calling method based on natural language processing in the above method embodiment. To avoid repetition, the present invention will not go into details.
[0201] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0202] (1) In the present invention, users can directly use natural language to describe their problems without having to press keys or wait for long voice prompts. The voice data is converted into text data through a speech recognition algorithm based on natural language processing, and then the user's call intention is analyzed through a three-layer stacked gated recurrent unit. The operator to be connected is directly determined based on the call intention, which saves the user's consultation time and improves the efficiency of solving the user's problem.
[0203] (2) In the present invention, when the user's call intention is a typical intention, the operator for this connection is determined based on the established mapping relationship between the typical intention and the operator, and when the user's call intention is an atypical intention, the operator for this connection is determined through an intelligent matching algorithm. This can better match user needs with suitable solutions or operators, optimize customer service resource allocation, and improve the efficiency of solving user problems.
[0204] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0205] There are a few points to note:
[0206] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0207] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0208] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0209] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An intelligent calling method based on natural language processing, It is characterized in that Applied to memory, including: S1: Obtain the user's voice data; S2: converting the voice data into text data through a speech recognition algorithm based on natural language processing; S3: performing word segmentation processing on the text data; S4: Combine the weight values of each word segment to construct the weighted word embedding vector of each word segment; S5: Analyze the user's calling intention through three layers of stacked gated recurrent units according to the weighted word embedding vector; S6: Determine whether the user's call intention is a typical intention; if so, determine the operator for this connection based on the established mapping relationship between the typical intention and the operator; otherwise, determine the operator for this connection through an intelligent matching algorithm.
2. The intelligent calling method based on natural language processing according to claim 1, It is characterized in that The S4 specifically includes: S401: extracting text features of each word segment; S402: Determine the weight value of each segmentation according to the text features of each segmentation; S403: extracting word embedding vectors of each word segment; S404: Construct a weighted word embedding vector by combining the weight values of each word segment.
3. The intelligent calling method based on natural language processing according to claim 2, It is characterized in that The text features include: term frequency TF feature, term frequency-inverse document frequency TF-IDF feature and inverse gravity moment IGM feature.
4. The intelligent calling method based on natural language processing according to claim 1, It is characterized in that The three-layer stacked gated recurrent unit includes a first gated recurrent unit, a second gated recurrent unit and a third gated recurrent unit which are stacked; the input layer of the first gated recurrent unit is used to obtain a weighted word embedding vector sequence, the candidate layer of the first gated recurrent unit is connected to the input layer of the second gated recurrent unit, the candidate layer of the second gated recurrent unit is connected to the input layer of the third gated recurrent unit, the output layer of the third gated recurrent unit is connected to a fully connected layer, and the fully connected layer is used to fuse the hidden states in the candidate layers of the first gated recurrent unit, the second gated recurrent unit and the third gated recurrent unit to obtain a comprehensive hidden state.
5. The intelligent calling method based on natural language processing according to claim 4, It is characterized in that The three-layer stacked gated recurrent unit also includes: an attention layer; the attention layer is used to add attention weights to the comprehensive hidden state at each moment.
6. The intelligent calling method based on natural language processing according to claim 5, It is characterized in that The S5 specifically includes: S501: Inputting the weighted word embedding vector sequence into the first gated recurrent unit to obtain a first hidden state; S502: Inputting the first hidden state into the second gated recurrent unit to obtain a second hidden state; S503: Inputting the second hidden state into the third gated recurrent unit to obtain a third hidden state; S504: Fusing the first hidden state, the second hidden state, and the third hidden state through a fully connected layer to obtain a comprehensive hidden state: H t =ω 1 h 1t +oh 2 h 2t +oh 3 h 3t Among them, H t represents the comprehensive hidden state, h 1t represents the first hidden state, ω 1 represents the weight coefficient of the first hidden state, h 2t represents the second hidden state, ω 2 represents the weight coefficient of the second hidden state, h 3t represents the third hidden state, ω 3 Represents the weight coefficient of the third hidden state; S505: Add attention weights to the comprehensive hidden state at each moment through the attention layer: e t =σ(W h H t +b h ) H′ t =a t H t Among them, e t represents the attention score at time t, σ() represents the activation function, and W h represents the attention weight matrix, H t represents the comprehensive hidden state at time t, b h represents the bias term of the attention layer, α t represents the attention weight at time t, exp() represents an exponential function with a natural constant as the base, T represents the total length of the segmentation, and H' t Represents the comprehensive hidden state after adding the attention weight; S506: Predict the user's calling intention based on the comprehensive latent state after adding the attention weight: P=Softmax(W h H' t +b h ) P=[P 1 ,…,P i ,…,P n ] Among them, P represents the probability value of the user's call intention belonging to each typical intention, P i represents the probability value that the user's call intention belongs to the i-th typical intention, Softmax() represents the Softmax activation function, and W h represents the weight matrix between the fully connected layer and the prediction layer, b h represents the prediction layer bias term, i = 1, 2, ..., n, and n represents the total number of typical intents.
7. The intelligent calling method based on natural language processing according to claim 6, It is characterized in that The S6 is specifically: Determine whether the probability value of the user's call intention belonging to each typical intention is greater than the preset probability value; if so, determine that the call intention is a typical intention, and determine the operator for this connection based on the established mapping relationship between the typical intention and the operator; otherwise, determine the operator for this connection through an intelligent matching algorithm.
8. The intelligent calling method based on natural language processing according to claim 1, It is characterized in that Determining the operator for this connection by using the intelligent matching algorithm in S6 specifically includes: S601: According to the voice data and the corresponding text data, the matching degree between each operator and the current call is determined from multiple evaluation dimensions, and a matching degree matrix is constructed: Among them, A represents the matching matrix, a i represents the matching degree vector of the ith operator, the matching degree vector of the ith operator a=[a i1 ,…a ij ,…,a im ], a ij represents the matching degree of the ith operator under the jth evaluation dimension, j = 1, 2, ..., m, m represents the total number of evaluation dimensions, i = 1, 2, ..., n, n represents the total number of operators; S602: The maximum values in each column of the matching matrix are used to form a positive ideal value vector, and the minimum values in each column are used to form a negative ideal value vector: Among them, a + represents a positive ideal value vector, max represents the maximum value, a - represents the negative ideal value vector, and min represents the minimum value; S603: Calculate the Euclidean distance between the matching degree vector of each operator and the positive ideal value vector and the negative ideal value vector: in, represents the matching degree vector of the ith operator and the positive ideal value vector, represents the matching degree vector of the i-th operator and the negative ideal value vector; S604: Calculate the closeness between the matching degree vector of each operator and the positive ideal value vector: Among them, g i represents the closeness between the matching degree vector of the ith operator and the positive ideal value vector; S605: sorting the operators in descending order of closeness to the positive ideal value vector; S606: Select the operator who is currently in an idle state and has the highest degree of closeness to the positive ideal value vector as the operator for this connection.
9. The intelligent calling method based on natural language processing according to claim 1, It is characterized in that The evaluation dimensions include: professional field ability, emotion processing ability, language ability, satisfaction with the handling of historical similar issues, and historical user satisfaction with the handling.
10. An intelligent calling system based on natural language processing, It is characterized in that include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the intelligent calling method based on natural language processing as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Method and device for scheduling of controller based on competency
CN117273305A
Personnel distribution management system and method for online customer service
CN117875652A
Invocational willingness assessment method and system based on natural semantic analysis
CN118195562A
