Customer intention analysis method and system based on NLP
By calculating the emotional tendency bias coefficient and the ambiguity attention coefficient, determining the corpus guidance weight, and using the neural network model to analyze customer intentions, the problem of bias and low accuracy in customer intention analysis in the existing technology is solved, and a more accurate understanding of intentions is achieved.
Patent Information
- Application Number
- CN202410931815.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing data-driven customer intent analysis methods have biases in processing complex semantic emotional information in Chinese and user intent changes, and traditional methods assign equal weights to sentences, resulting in reduced analysis accuracy.
By obtaining customer corpus text data, extracting sentence words, calculating the emotional tendency deviation coefficient and ambiguity attention coefficient, analyzing customer intentions based on the neural network model, using the emotional tendency deviation coefficient and ambiguity attention coefficient to determine the corpus guidance weight of the sentence, and conducting deep learning model training .
It improves the accuracy of the analysis of customer intentions, takes into account contextual differences and word meaning deviations of polysemy words, distinguishes the importance of sentences, and enhances the accuracy of intention analysis.
Smart Images

Figure CN118468889B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to a customer intent analysis method and system based on NLP. Background Art
[0002] With the continuous development of NLP technology, human-computer interaction technology has gradually become the focus of this field. The most core task in the human-computer interaction process is to analyze the customer's intentions. Only by accurately understanding and predicting the user's behavior and needs can we provide more accurate personalized and efficient services.
[0003] At present, methods based on customer intent analysis are all data-driven. With a large amount of labeled sample data, they can accurately analyze customer intent information. However, in practice, Chinese expressions have complex semantic and emotional information. The same word expresses different intents in different contexts, and the user's intentions are constantly changing. At the same time, it is difficult to obtain a large amount of real labeled user data in actual scenarios. As a result, when directly using user data for intent analysis, there is a discrepancy between the user's actual intention and the user's intention, resulting in a deviation in the understanding of customer intent. Secondly, in traditional user intent analysis, equal sentence weights are applied to each sentence for model training. However, in fact, different sentences have different importance in different corpus environments, which reduces the accuracy of customer intent analysis. Summary of the invention
[0004] In order to solve the above technical problems, a customer intention analysis method and system based on NLP are provided to solve the existing problems.
[0005] The solution to the technical problem in this application is to provide a customer intention analysis method and system based on NLP, including the following steps:
[0006] In a first aspect, an embodiment of the present application provides a method for analyzing customer intention based on NLP, the method comprising the following steps:
[0007] Obtain the entire segment of customer corpus text data, and extract each text word of each sentence in the entire segment of customer corpus text data;
[0008] Determine the sentiment bias coefficient of each sentence in the entire customer corpus text data according to the difference degree of reduplication frequency and sentiment difference degree between each sentence in the entire customer corpus text data and its adjacent sentences;
[0009] According to the difference in word meaning between each sentence and the entire customer corpus text data, determine the ambiguity attention coefficient of each sentence in the entire customer corpus text data;
[0010] Based on the sentiment tendency deviation coefficient and the ambiguous attention coefficient, the corpus guidance weight of each sentence is determined, and the customer intention is analyzed using a neural network model.
[0011] Preferably, extracting each text word of each sentence in the entire segment of customer corpus text data includes:
[0012] Perform word segmentation on the entire segment of customer corpus text data;
[0013] The entire corpus text data is divided into several sentences, and each sentence is arranged in sequence according to the order of appearance of the words to obtain the text words of each sentence of the customer corpus text data.
[0014] Preferably, determining the sentiment tendency deviation coefficient of each sentence in the entire segment of customer corpus text data includes:
[0015] Multiple sentences adjacent to each sentence are combined to form a local sentiment set for each sentence;
[0016] Determine the reduplication difference of each sentence in the local sentiment set according to the reduplication frequency difference between each sentence and each sentence in the local sentiment set;
[0017] Determine the degree of difference in sentiment words between each sentence and each sentence in the local sentiment set according to the degree of difference in sentiment words between each sentence and each sentence in the local sentiment set;
[0018] Based on the sentiment difference and the reduplication difference, determining the sentiment difference index of each sentence in the local sentiment set, wherein the sentiment difference index is positively correlated with the sentiment difference and the reduplication difference, respectively;
[0019] According to the discreteness between the sentiment difference indexes of all sentences in the local sentiment set of each sentence, the sentiment tendency deviation coefficient of each sentence is determined.
[0020] Preferably, determining the reduplication difference of each sentence in the local sentiment set includes:
[0021] The cumulative sum of the occurrences of all reduplications in each sentence of the entire customer corpus text data is taken as the reduplication frequency of each sentence;
[0022] According to the difference between the frequency of reduplication of each sentence and each sentence in its local sentiment set, the reduplication difference degree of each sentence in the local sentiment set is determined.
[0023] Preferably, determining the sentiment difference of each sentence in the local sentiment set includes:
[0024] Match each text word of each sentence in the entire customer corpus text data with the Chinese sentiment vocabulary ontology to obtain the sentiment word of each sentence;
[0025] By extracting the features of sentiment words, we can obtain the sentiment vector of each sentence.
[0026] The distance between each sentence and the sentiment vector of each sentence in its local sentiment set is calculated as the sentiment difference of each sentence in the local sentiment set.
[0027] Preferably, determining the ambiguity attention coefficient of each sentence in the entire segment of customer corpus text data includes:
[0028] Get the word vectors of the polysemous words in each sentence and the word vectors of the polysemous words in the entire customer corpus text data;
[0029] The distance between the word vector of each polysemous word in each sentence and the word vector of the same polysemous word in the entire customer corpus text data is recorded as the word meaning deviation of each polysemous word in each sentence;
[0030] Based on the semantic deviation of each polysemous word in each sentence, the semantic difference and semantic dispersion of each sentence are calculated;
[0031] Based on the word sense difference and the word sense dispersion, the ambiguous attention coefficient of each sentence is determined, wherein the ambiguous attention coefficient is positively correlated with the word sense difference and the word sense dispersion, respectively, and if there is no polysemous word in the sentence, the ambiguous attention coefficient of the sentence is assigned a value of 1.
[0032] Preferably, the word vectors of the polysemous words in each sentence and the word vectors of the same polysemous words in the entire customer corpus text data are obtained by:
[0033] Based on the Chinese polysemous word corpus, a polysemous word dictionary is constructed;
[0034] Matching each text word of each sentence in the entire customer corpus text data with the polysemous word dictionary to obtain the polysemous words of each sentence;
[0035] Use the same method as the polysemous words in each sentence to obtain the polysemous words of the entire customer corpus text data;
[0036] The word vector algorithm model is used to obtain the word vectors of the polysemous words in each sentence and the word vectors of the same polysemous words in the entire customer corpus text data.
[0037] Preferably, the method for calculating the word meaning difference and word meaning dispersion of each sentence is:
[0038] The degree of difference in word meaning of each sentence is positively correlated with the word meaning deviation of all polysemous words;
[0039] The word sense dispersion of each sentence is determined according to the degree of dispersion between the word sense deviations of all polysemous words in each sentence.
[0040] Preferably, the corpus guidance weight of each sentence is a positive fusion of the sentiment tendency deviation coefficient and the ambiguous attention coefficient.
[0041] In the second aspect, an embodiment of the present application also provides an NLP-based customer intention analysis system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned NLP-based customer intention analysis methods when executing the computer program.
[0042] This application has at least the following beneficial effects:
[0043] The present application determines the sentiment tendency deviation coefficient of each sentence in the entire customer corpus text data by analyzing the differences in sentiment words and reduplications between each sentence and its adjacent sentences in the entire customer corpus text data. The beneficial effect of this application is that the sentiment information in the user corpus can be analyzed more accurately for customer intentions. The ambiguous attention coefficient of each sentence is determined by analyzing the polysemous words in the sentence. The beneficial effect of this application is that the meaning deviation of the polysemous words in each sentence is taken into account, reflecting the diversity in semantic understanding. The corpus guidance weight of each sentence is determined, and the customer intention is analyzed using a deep learning model. The beneficial effect of this application is that compared with the traditional user intention analysis that applies equal sentence weights to each sentence, the present application applies different guidance weights to different sentences when training the intention analysis model, and distinguishes the importance of sentences in the diagnostic corpus text data, so that the model can more accurately grasp the important information in the corpus text data and improve the accuracy of user intention analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The NLP-based customer intent analysis method of the present application is further described in detail below in conjunction with the accompanying drawings.
[0045] Figure 1 A flowchart of the steps of the NLP-based customer intent analysis method provided for this application;
[0046] Figure 2 A flowchart of the steps of the method for obtaining the sentiment tendency deviation coefficient of each sentence in the entire customer corpus text data provided by this application;
[0047] Figure 3 A flowchart of the steps of the method for obtaining the ambiguous attention coefficient of each sentence in the entire customer corpus text data provided in this application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of this application more clear, the following is a further detailed description of the NLP-based customer intention analysis method and system proposed in this application in conjunction with the accompanying drawings and implementation examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0049] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0050] See also Figure 1 , which shows a flowchart of a method for analyzing customer intention based on NLP according to an embodiment of the present application, the method comprising the following steps:
[0051] Step 1: obtain the entire customer corpus text data, and extract each text word of each sentence in the entire customer corpus text data.
[0052] The entire segment of customer corpus text data is obtained, and data cleaning and word segmentation operations are performed on the entire segment of customer corpus text data. The entire segment of corpus text data is divided into several sentences, where each sentence is arranged in the order of appearance of words, and each text word of each sentence of the customer corpus text data is obtained.
[0053] Preferably, as an embodiment of the present application, customer corpus text data can be obtained from user conversations during human-computer interaction using speech recognition technology, or directly obtained from user comment data, and the corpus text data is cleaned using regular expressions to remove special characters and punctuation marks in the text. Secondly, the jieba word segmentation tool is used to perform word segmentation operations on the corpus text data, wherein regular expressions and the jieba word segmentation tool are well-known technologies and will not be described in detail here.
[0054] It can be understood that regular expressions are used to clean the corpus text data, and jiaba segmentation is used to perform word segmentation on the corpus text data. As other implementation methods, implementers can use other methods of the prior art, such as string traversal methods to clean text data, and use HanLP segmentation or LTP segmentation methods to perform word segmentation operations. This embodiment does not impose any special restrictions on this.
[0055] At this point, the text words of each sentence in the entire customer corpus text data are obtained.
[0056] Step 2: Determine the sentiment bias coefficient of each sentence in the entire customer corpus text data according to the difference in frequency of reduplication and sentiment between each sentence and its adjacent sentences in the entire customer corpus text data.
[0057] Chinese text can express customers' emotional information more richly. Therefore, each sentence in the customer corpus text data contains emotional information. This emotional information is mainly reflected in two aspects. On the one hand, the sentence contains emotional words, and the customer's emotional information is obtained through these emotional words. On the other hand, there are reduplications in the sentence, and the emotional expression ability of the sentence is enhanced by repeating the same words once. And adjacent sentences should express the same or similar emotional information. If the emotional information is very different, it indicates that there is an emotional difference near the sentence, which will be more important for customer intention analysis, and the attention of the sentence should be increased. Therefore, the emotional information of each sentence is analyzed to obtain the emotional tendency deviation coefficient of each sentence in the customer corpus text data. The specific method is:
[0058] The cumulative sum of the occurrences of all reduplications in each sentence of the entire customer corpus text data is taken as the reduplication frequency of each sentence;
[0059] Match each text word of each sentence in the entire customer corpus text data with the Chinese sentiment vocabulary ontology to obtain the sentiment word of each sentence;
[0060] For all sentiment words in each sentence, the sentiment vector of each sentence is obtained by extracting sentiment word features;
[0061] It should be noted that the Chinese sentiment vocabulary ontology and sentiment word feature extraction are well-known technologies and will not be elaborated here; secondly, if the current sentence contains rich emotions, more reduplication will appear in the sentence, resulting in a higher frequency of reduplication.
[0062] Multiple sentences adjacent to each sentence are combined to form a local sentiment set for each sentence;
[0063] Preferably, as an embodiment of the present application, the four sentences adjacent to each sentence form a local sentiment set for each sentence.
[0064] Calculate the distance between each sentence and the sentiment vector of each sentence in its local sentiment set as the sentiment difference of each sentence in the local sentiment set;
[0065] Preferably, as an embodiment of the present application, the sentiment difference can calculate the DTW distance between each sentence and the sentiment vector of each sentence in its local sentiment set.
[0066] It can be understood that this embodiment obtains the emotional difference by calculating the DTW distance. As other implementation methods, the implementer can adopt other methods of the prior art, such as Euclidean distance, etc. This embodiment does not impose any special restrictions on this.
[0067] Determine the reduplication difference of each sentence in the local sentiment set according to the difference between the reduplication frequency of each sentence and each sentence in the local sentiment set;
[0068] Based on the sentiment difference and the reduplication difference, determining the sentiment difference index of each sentence in the local sentiment set, wherein the sentiment difference index is positively correlated with the sentiment difference and the reduplication difference, respectively;
[0069] It can be understood that a positive relationship means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. The specific relationship can be a multiplication relationship, an addition relationship, or the idempotence of an exponential function, which is determined by actual application and this application does not impose any special restrictions on this.
[0070] Preferably, as an embodiment of the present application, the reduplication difference degree can calculate the difference between the reduplication frequency of each sentence and each sentence in its local sentiment set; secondly, the sum of the sentiment difference degree and the reduplication difference degree is used as the sentiment difference index of each sentence in the local sentiment set.
[0071] It should be noted that if there is a sentiment deviation between the two sentences and there is a difference in the frequency of reduplication of the two sentences, the difference in reduplication is relatively large. At the same time, if the two sentences express different sentiment information, the measured distance of the sentiment vectors between the two sentences is relatively large, that is, the greater the sentiment difference, the greater the sentiment difference of the sentence.
[0072] Determine the emotional tendency deviation coefficient of each sentence according to the discreteness between the emotional difference indexes of all sentences in the local emotional set of each sentence;
[0073] Preferably, as an embodiment of the present application, the variance of the sentiment difference index of all sentences in the local sentiment set of each sentence is used as the sentiment tendency deviation coefficient of each sentence.
[0074] Preferably, as another embodiment of the present application, the standard deviation of the sentiment difference index of all sentences in the local sentiment set of each sentence is used as the sentiment tendency deviation coefficient of each sentence.
[0075] It is understandable that the degree of dispersion can be measured not only by variance or standard deviation, but also by other methods, such as coefficient of variation, information entropy, etc. This embodiment does not impose any special restrictions on this.
[0076] It should be noted that if a sentence and its adjacent sentences contain relatively rich emotional information and the difference between the emotional information is large, the emotional tendency deviation coefficient will be large, indicating that there may be an emotional transition in the sentence, and extra attention should be paid when analyzing the sentence.
[0077] Furthermore, the step flow chart of the method for obtaining the sentiment tendency deviation coefficient of each sentence in the entire customer corpus text data provided by the present application is as follows: Figure 2 shown.
[0078] At this point, the sentiment tendency deviation coefficient of each sentence in the entire customer corpus text data is obtained.
[0079] Step 3: Determine the ambiguity attention coefficient of each sentence in the entire customer corpus text data according to the difference in word meaning between each sentence and the entire customer corpus text data.
[0080] Furthermore, in Chinese texts, due to the complex context and strong contextual information, a word may have multiple meanings. The emergence of polysemous words makes it easy for the semantic understanding of sentences to be ambiguous, so that the same word may refer to different things in different contexts, increasing the complexity of intent analysis. Therefore, it is necessary to analyze the meaning of each sentence in the customer corpus text data to obtain the ambiguous attention coefficient. The specific method is:
[0081] Based on the Chinese polysemous word corpus, a polysemous word dictionary is constructed;
[0082] Matching each text word of each sentence in the entire customer corpus text data with the polysemous word dictionary to obtain the polysemous words of each sentence;
[0083] Use the same method as the polysemous words in each sentence to obtain the polysemous words of the entire customer corpus text data;
[0084] Use the word vector algorithm model to obtain the word vectors of the polysemous words in each sentence and the word vectors of the same polysemous words in the entire customer corpus text data;
[0085] Preferably, as an embodiment of the present application, the BERT algorithm is used to obtain word vectors, wherein the BERT algorithm is an existing well-known technology and this embodiment will not elaborate on it.
[0086] It can be understood that the BERT algorithm is used to obtain word vectors in this embodiment. As other implementation methods, the implementer can adopt other methods of the prior art, for example, adopting GloVe or ELMo algorithms to obtain word vectors, etc. This embodiment does not impose any special restrictions on this.
[0087] The distance between the word vector of each polysemous word in each sentence and the word vector of the same polysemous word in the entire customer corpus text data is recorded as the word meaning deviation of each polysemous word in each sentence;
[0088] Preferably, as an embodiment of the present application, the meaning deviation of each polysemous word in each sentence can calculate the DTW distance between the word vector of each polysemous word in each sentence and the word vector of the same polysemous word in the entire customer corpus text data.
[0089] Preferably, as another embodiment of the present application, the meaning deviation of each polysemous word in each sentence can be calculated by calculating the Euclidean distance between the word vector of each polysemous word in each sentence and the word vector of the same polysemous word in the entire customer corpus text data.
[0090] It is understandable that this embodiment only provides two distance measurement methods, namely, DTW distance and Euclidean distance. As other implementation methods, implementers can adopt other distance measurement methods in the prior art to obtain word meaning deviations, such as Hamming distance, Mahalanobis distance, etc. This embodiment does not impose any special restrictions on this.
[0091] The degree of difference in word meaning of each sentence is positively correlated with the word meaning deviation of all polysemous words;
[0092] Determine the word sense dispersion of each sentence according to the degree of dispersion between the word sense deviations of all polysemous words in each sentence;
[0093] Based on the word meaning difference and the word meaning dispersion, determining the ambiguity attention coefficient of each sentence, wherein the ambiguity attention coefficient is positively correlated with the word meaning difference and the word meaning dispersion, respectively, and if there is no polysemous word in the sentence, the ambiguity attention coefficient of the sentence is assigned a value of 1;
[0094] Preferably, as an embodiment of the present application, the mean of the sense deviations of all polysemous words is taken as the sense difference of each sentence; secondly, the variance of the sense deviations of all polysemous words is taken as the sense discreteness of each sentence; the ambiguous attention coefficient of each sentence is the product of the sense difference and the sense discreteness.
[0095] Preferably, as another embodiment of the present application, the standard deviation of the word sense deviations of all polysemous words is used as the word sense dispersion of each sentence.
[0096] Preferably, as another embodiment of the present application, the information entropy of the word sense deviations of all polysemous words is used as the word sense discreteness of each sentence.
[0097] It should be noted that if there are many polysemous words in each sentence, and the polysemous words in the sentence represent different semantic information in the entire corpus text, resulting in a large deviation in the word vector of the same polysemous words, a large deviation in word meaning, and a large fluctuation in the measured distance due to different semantic information, then the ambiguous attention coefficient is large.
[0098] Furthermore, the step flow chart of the method for obtaining the ambiguous attention coefficient of each sentence in the entire customer corpus text data provided by the present application is as follows: Figure 3 shown.
[0099] At this point, the ambiguous attention coefficient of each sentence in the entire customer corpus text data is obtained.
[0100] Step 4: Based on the sentiment tendency deviation coefficient and the ambiguous attention coefficient, the corpus guidance weight of each sentence is determined, and the customer intention is analyzed using a neural network model.
[0101] If a sentence contains rich emotional information and the emotion of the sentence changes greatly in a local range, the emotional tendency deviation coefficient of the sentence is large, indicating that the sentence may be a transition of semantic emotion, and it is necessary to increase the attention when evaluating user intention; at the same time, if there are polysemous words in a sentence with a large difference in meaning from the polysemous words in the corpus text, the ambiguous attention coefficient is large, indicating that in order to avoid semantic ambiguity, more attention is needed to more accurately analyze user intention information. Based on this analysis, the corpus guidance weight is determined according to the emotional tendency deviation coefficient and the ambiguous attention coefficient. The specific method is:
[0102] The sentiment tendency deviation coefficient and the ambiguous attention coefficient are positively integrated as the corpus guidance weight of each sentence;
[0103] It is understandable that forward fusion can represent a multiplication relationship, an addition relationship, and the idempotence of an exponential function, and this application does not impose any special restrictions on this.
[0104] Preferably, as an embodiment of the present application, the product of the sentiment tendency deviation coefficient and the ambiguity attention coefficient is used as the corpus guidance weight of each sentence.
[0105] 80% of the training set sample data is randomly selected from the dataset containing user intent classification labels, and all sentences in the entire corpus text data and the corpus guidance weights corresponding to each sentence are used as input. The neural network model is used for training to obtain a more accurate customer corpus intent classification model.
[0106] Preferably, as an embodiment of the present application, an LSTM network model is adopted, Adam is used as the optimizer, the loss function adopts the cross entropy loss function, the learning rate is set to 0.01, and the training epoch is set to 10.
[0107] Preferably, as another embodiment of the present application, a convolutional neural network model is adopted, Adagrad is used as the optimizer, the loss function adopts the cross entropy loss function, the learning rate is set to 0.01, and the training epoch is set to 10.
[0108] The obtained customer corpus intention classification model is deployed in the customer intention analysis system, and the customer corpus text data is input to obtain the customer's intention information, which is convenient for subsequent analysis based on customer intention.
[0109] Based on the same inventive concept as the above method, an embodiment of the present application also provides an NLP-based customer intention analysis system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned NLP-based customer intention analysis methods are implemented.
[0110] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the present application. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application without departing from the content of the technical solution of the present application, shall fall within the protection scope of the technical solution of the present application.
Claims
1. The customer intention analysis method based on NLP is characterized by: The method comprises the following steps: Obtain the entire segment of customer corpus text data, and extract each text word of each sentence in the entire segment of customer corpus text data; Determine the sentiment bias coefficient of each sentence in the entire customer corpus text data according to the difference degree of reduplication frequency and sentiment difference degree between each sentence in the entire customer corpus text data and its adjacent sentences; According to the difference in word meaning between each sentence and the entire customer corpus text data, determine the ambiguity attention coefficient of each sentence in the entire customer corpus text data; Based on the sentiment tendency deviation coefficient and the ambiguity attention coefficient, the corpus guidance weight of each sentence is determined, and the customer intention is analyzed using a neural network model; Determining the sentiment bias coefficient of each sentence in the entire customer corpus text data includes: Multiple sentences adjacent to each sentence are combined to form a local sentiment set for each sentence; Determine the reduplication difference of each sentence in the local sentiment set according to the reduplication frequency difference between each sentence and each sentence in the local sentiment set; Determine the degree of difference in sentiment words between each sentence and each sentence in the local sentiment set according to the degree of difference in sentiment words between each sentence and each sentence in the local sentiment set; Based on the sentiment difference and the reduplication difference, determining the sentiment difference index of each sentence in the local sentiment set, wherein the sentiment difference index is positively correlated with the sentiment difference and the reduplication difference, respectively; Determine the emotional tendency deviation coefficient of each sentence according to the discreteness between the emotional difference indexes of all sentences in the local emotional set of each sentence; Determining the ambiguous attention coefficient of each sentence in the entire customer corpus text data includes: Get the word vectors of the polysemous words in each sentence and the word vectors of the polysemous words in the entire customer corpus text data; The distance between the word vector of each polysemous word in each sentence and the word vector of the same polysemous word in the entire customer corpus text data is recorded as the word meaning deviation of each polysemous word in each sentence; Based on the semantic deviation of each polysemous word in each sentence, the semantic difference and semantic dispersion of each sentence are calculated; Based on the word sense difference and the word sense dispersion, the ambiguous attention coefficient of each sentence is determined, wherein the ambiguous attention coefficient is positively correlated with the word sense difference and the word sense dispersion, respectively, and if there is no polysemous word in the sentence, the ambiguous attention coefficient of the sentence is assigned a value of 1.
2. The NLP-based customer intention analysis method according to claim 1, characterized in that: The step of extracting each text word of each sentence in the entire customer corpus text data includes: Perform word segmentation on the entire segment of customer corpus text data; The entire corpus text data is divided into several sentences, and each sentence is arranged in sequence according to the order of appearance of the words to obtain the text words of each sentence of the customer corpus text data.
3. The NLP-based customer intention analysis method according to claim 1, characterized in that: Determining the reduplication difference of each sentence in the local sentiment set includes: The cumulative sum of the occurrences of all reduplications in each sentence of the entire customer corpus text data is taken as the reduplication frequency of each sentence; According to the difference between the frequency of reduplication of each sentence and each sentence in its local sentiment set, the reduplication difference degree of each sentence in the local sentiment set is determined.
4. The NLP-based customer intention analysis method according to claim 1, characterized in that: Determining the sentiment difference of each sentence in the local sentiment set includes: Match each text word of each sentence in the entire customer corpus text data with the Chinese sentiment vocabulary ontology to obtain the sentiment word of each sentence; By extracting the features of sentiment words, we can obtain the sentiment vector of each sentence. The distance between each sentence and the sentiment vector of each sentence in its local sentiment set is calculated as the sentiment difference of each sentence in the local sentiment set.
5. The NLP-based customer intention analysis method according to claim 1, characterized in that: The method for obtaining the word vector of the polysemous word in each sentence and the word vector of the same polysemous word in the entire customer corpus text data is as follows: Based on the Chinese polysemous word corpus, a polysemous word dictionary is constructed; Matching each text word of each sentence in the entire customer corpus text data with the polysemous word dictionary to obtain the polysemous words of each sentence; Use the same method as the polysemous words in each sentence to obtain the polysemous words of the entire customer corpus text data; The word vector algorithm model is used to obtain the word vectors of the polysemous words in each sentence and the word vectors of the same polysemous words in the entire customer corpus text data.
6. The NLP-based customer intention analysis method according to claim 1, characterized in that: The calculation method of the word meaning difference and word meaning dispersion of each sentence is: The degree of difference in word meaning of each sentence is positively correlated with the word meaning deviation of all polysemous words; The word sense dispersion of each sentence is determined according to the degree of dispersion between the word sense deviations of all polysemous words in each sentence.
7. The NLP-based customer intention analysis method according to claim 1, characterized in that: The corpus guidance weight of each sentence is a positive fusion of the sentiment tendency deviation coefficient and the ambiguous attention coefficient.
8. A customer intention analysis system based on NLP, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the NLP-based customer intent analysis method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Text fine granularity sentiment analysis method and text fine granularity sentiment analysis device
CN103049435A
Subjective text emotion analysis method based on deep learning
CN106776581A
Text tendency analysis method with network sentiment new word discovery method based on Word2Vec
CN107305539A
Emotion analysis method based on context word vectors and depth learning
CN108427670A
Semantic analysis method and system based on long and short term memory network
CN117610579A
