Enterprise Business Management Method and System Based on Big Data
By constructing a training template binary for clear and fuzzy online conversation text training templates, the neural network is optimized using the representation vector distribution evaluation function and emotional polarity classification branch component, which solves the problem of low recognition accuracy of traditional models when dealing with fuzzy expression text, and improves the accuracy of sentiment analysis and the efficiency of enterprise business management.
Patent Information
- Application Number
- CN202410899050.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-07-05
AI Technical Summary
When traditional sentiment analysis models deal with texts with unclear semantic representations of emotions, the recognition accuracy rate decreases, making it difficult to effectively identify the emotional tendency of users' vague expressions.
Using a big data-based enterprise business management method, we optimize the neural network to improve the accuracy of emotional polarity detection by constructing training template binaries, including clear and fuzzy online conversation text training templates, and use basic representation information to extract branch components.
It improves the accuracy of emotional recognition of unclear texts with emotional semantic representation, enhances the company's insight into customer emotions, and optimizes service quality and response efficiency.
Smart Images

Figure CN118885611B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to an enterprise business management method and system based on big data. Background Art
[0002] In the wave of digital transformation, enterprises are increasingly relying on data-driven decision-making to optimize business processes, enhance the customer experience, and strengthen competitiveness. With the popularity of the Internet and mobile devices, the way enterprises interact with customers has changed fundamentally, and online conversations have become a key channel for understanding customer needs, providing instant help and support. Online conversation data, including but not limited to chat records, customer service call records, social media interactions, etc., contains rich user behavior patterns, preference information, as well as potential problems and needs. However, traditional enterprise business management systems often lack effective means to process these massive, unstructured data in real time, resulting in the inability to timely gain insights into market dynamics and customer needs, affecting service quality and response efficiency.
[0003] To address this challenge, the application of big data technology and artificial intelligence (AI) in enterprise business management has become increasingly prominent. Big data technology can not only efficiently store and manage massive data but also support high-speed data processing and analysis, while AI provides tools such as deep learning and natural language processing (NLP) on this basis, enabling the system to automatically identify, classify, and understand the user intentions and emotions in online conversations. For example, through text mining and semantic analysis, a computer system can automatically identify the types of questions users consult (such as product failures, payment issues, usage guide inquiries, etc.) and quickly provide solutions or transfer to the most suitable customer service staff based on historical data and knowledge bases, thus significantly shortening the problem-solving time and enhancing the user experience. In addition, the analysis based on user feedback and evaluations is a key link in continuously optimizing service quality. By using machine learning algorithms to analyze user emotions, satisfaction, and the reasons behind them, enterprises can accurately locate service shortcomings, timely adjust strategies, and even predict future trends, providing data support for product improvement and service innovation. This closed-loop management method ensures that enterprises can continuously adapt to market changes, maintain service competitiveness, while promoting the development of personalized services and enhancing user loyalty.
[0004] With the rapid development of big data and artificial intelligence technologies, the application of sentiment analysis technology in enterprise business management has become increasingly widespread. Sentiment analysis technology helps enterprises gain insights into market dynamics and understand customer needs by deeply processing and analyzing online conversation texts, thereby optimizing service quality and enhancing competitiveness. However, in practical applications, traditional sentiment analysis models often face challenges when dealing with texts with unclear sentiment semantic representations, such as cases where users express ambiguously, omit, or use slang, etc., which may lead to a decline in the sentiment recognition accuracy of the model. Summary of the Invention
[0005] In view of this, embodiments of the present application at least provide an enterprise business management method and system based on big data. The technical solution of the embodiments of the present application is implemented as follows:
[0006] On the one hand, embodiments of the present application provide an enterprise business management method based on big data. The method includes: determining training template binary groups from online session text training templates, where the training template binary groups include clear online session text training templates with clear emotional semantic representations and fuzzy online session text training templates with unclear emotional semantic representations. The clear online session text training templates and the fuzzy online session text training templates have the same prior emotional polarity markers, which are used to indicate the same target emotional polarity; extracting branch components based on basic representation information, and obtaining a first text representation vector of the clear online session text training template and a second text representation vector of the fuzzy online session text training template in the training template binary groups; determining a representation vector distribution evaluation function based on the representation vector position error of the first text representation vector and the second text representation vector in the representation vector domain; obtaining a first emotional polarity classification result corresponding to the clear online session text training template based on the first text representation vector and the basic emotional polarity classification branch component, and obtaining a second emotional polarity classification result corresponding to the fuzzy online session text training template based on the second text representation vector and the basic emotional polarity classification branch component; determining a first evaluation function and a second evaluation function based on the errors between the first emotional polarity classification result and the second emotional polarity classification result and the prior emotional polarity marker respectively; adjusting the parameters of the basic representation information extraction branch component and the basic emotional polarity classification branch component based on the first evaluation function, the second evaluation function, and the representation vector distribution evaluation function to obtain an emotional polarity classification component, which is used to detect the emotional polarity of the online session text to be analyzed.
[0007] On the second hand, the present application provides a computer system, including a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor executes the program, it implements the steps in the above method.
[0008] The beneficial effects of this application at least include: For the purpose of increasing the emotional recognition accuracy of texts with unclear emotional semantic representations, this application's embodiments use two online session text training templates, one with local masking processing and the other without masking processing, for text paragraphs with the same target emotional polarity as a training template pair. Based on the first text representation vector and the second text representation vector extracted by the basic representation information extraction branch component according to the training template pair, a representation vector distribution evaluation function is determined, and based on the emotion polarity classification results corresponding to the clear online session text training template and the fuzzy online session text training template respectively, a first evaluation function and a second evaluation function for obtaining the prior label of the corresponding emotional polarity are obtained. The parameters of the basic representation information extraction branch component and the basic emotion polarity classification branch component are adjusted based on the above three evaluation functions. Since the representation vector distribution evaluation function can determine the representation vector position error of the two text representation vectors in the representation vector domain, the neural network can acquire knowledge to reduce the representation vector position error through debugging, prompting the positions of the first text representation vector and the second text representation vector in the vector domain to be closer, forming an excellent commonality measurement basis. According to the debugging process of the first evaluation function and the second evaluation function, the neural network learns how to distinguish the target emotional polarity in different masking situations of text paragraphs with emotional expressions. Based on this, under the supervision of the above evaluation functions, an emotion polarity classification component for the fuzzy situation of text paragraphs with emotional expressions can be obtained through debugging. In the entire calibration process, it is independent of the participation of hyperparameters, but based on the representation vector positions of different emotional expression texts in the masking environment to increase the recognition and comparison ability, thereby calibrating the neural network with high accuracy based on this. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 FIG. is a schematic implementation flowchart of a big data-based enterprise business management method provided by an embodiment of this application.
[0010] Figure 2 FIG. is a schematic hardware entity diagram of a computer system provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0011] An embodiment of this application provides a big data-based enterprise business management method, which can be executed by a processor of a computer system. Among them, the computer system may refer to devices with data processing capabilities such as servers, laptop computers, tablet computers, and desktop computers.
[0012] Figure 1 FIG. is a schematic implementation flowchart of a big data-based enterprise business management method provided by an embodiment of this application, as Figure 1 shown, the method includes:
[0013] Step S10: Determine training template pairs from online session text training templates. The training template pairs include clear online session text training templates with explicit emotional semantic representations and fuzzy online session text training templates with unclear emotional semantic representations. The clear online session text training templates and the fuzzy online session text training templates have the same prior emotional polarity markers, which are used to indicate the same target emotional polarity.
[0014] In step S10 of the embodiment of the present application, the computer system selects training template pairs from a large number of online session text training templates. These pairs consist of two parts: clear online session text training templates with explicit emotional semantic representations and fuzzy online session text training templates with unclear emotional semantic representations.
[0015] Specifically, clear online session text training templates refer to texts with direct and explicit emotional expressions. For example, comments or inquiries in which users clearly express satisfaction or dissatisfaction. For example, a clear online session text training template might be: "The performance of this product is very good, and I am very satisfied." The emotional semantic representation of this sentence is clear, and the computer system can directly recognize the positive emotion of the user. Fuzzy online session text training templates, on the other hand, refer to texts with relatively implicit emotional expressions that are not easily parsed directly. Such texts are very common in actual online sessions. Users may adopt fuzzy expressions for various reasons (such as using jargon, internet memes, typos, etc.). For example, a fuzzy online session text training template might be: "This thing feels okay to use." Here, "thing" and "okay" are internet terms, and the emotional expression is relatively fuzzy, requiring the computer system to accurately identify through deep learning and natural language processing techniques. Clear online session text training templates and fuzzy online session text training templates need to have the same prior emotional polarity markers. This means that although the expression methods are different, the emotional tendencies expressed by the two groups of texts are the same. For example, although the above clear text and fuzzy text have different expression methods, they both express positive emotions, so they are both marked as "positive emotional polarity".
[0016] In practical applications, the computer system can screen out appropriate training template pairs from massive online session data through automated or semi-automated means. First, the computer system can use natural language processing techniques to perform a preliminary emotional polarity classification on the text, and then manually review and mark the texts with clear and fuzzy emotional expressions. Then, the computer system can pair the clear and fuzzy texts according to the prior emotional polarity markers to form training template pairs. These pairs will be used as training data for the emotion recognition model to help the model learn how to accurately identify emotional tendencies under different expression methods.
[0017] Through such a training template pair construction process, the computer system can effectively improve the recognition accuracy of the emotion recognition model when processing texts with unclear emotional semantic expressions, thereby providing more accurate and personalized service support for enterprises.
[0018] Step S20: Based on the basic representation information extraction branch component, obtain the first text representation vector of the clear online conversation text training template and the second text representation vector of the fuzzy online conversation text training template in the training template pair.
[0019] In step S20 of the embodiment of the present application, the computer system uses the basic representation information extraction branch component to respectively obtain the first text representation vector of the clear online conversation text training template and the second text representation vector of the fuzzy online conversation text training template from the training template pair.
[0020] First of all, the basic representation information extraction branch component is usually a pre-trained deep learning model, such as a text embedding model based on a convolutional neural network (CNN) or a recurrent neural network (RNN). The role of this model is to convert text data into numerical vectors that can be understood by the computer, that is, text representation vectors. These vectors contain key information of the text, such as vocabulary, grammar, and semantic features, and are the basis for subsequent emotion polarity classification.
[0021] For example, when the computer system receives the training template pair, the clear online conversation text training template and the fuzzy online conversation text training template are respectively input into the basic representation information extraction branch component. Taking the clear online conversation text training template as an example, assume the text is: "The performance of this product is very good, and I am very satisfied." The computer system performs preprocessing operations such as word segmentation and stop word removal on this text, and then inputs the processed vocabulary sequence into the text embedding model. The model will convert each vocabulary into a vector representation of a fixed dimension according to the semantic and context information of the vocabulary. Then, an aggregation operation (such as average pooling or max pooling) is performed on the vector representations of all vocabularies to generate a single vector representing the entire text, that is, the first text representation vector. Similarly, for the fuzzy online conversation text training template, such as: "This thing feels okay when used." The same processing process will be performed to generate the second text representation vector representing this fuzzy text. These text representation vectors are the key inputs for subsequent emotion polarity classification. They not only contain the basic information of the text but also incorporate complex semantic and context information through the non-linear transformation of the deep learning model. This enables the computer system to more accurately understand the emotional tendency of the text, thereby improving the accuracy of emotion analysis.
[0022] In the embodiments of the present application, by automatically converting text into numerical vectors, the computer system can efficiently perform sentiment analysis, helping enterprises gain insights into market dynamics and customer needs, optimize business processes, and improve service quality and response efficiency.
[0023] Step S30: Determine a representation vector distribution evaluation function based on the representation vector position error between the first text representation vector and the second text representation vector in the representation vector domain.
[0024] In the embodiments of the present application, step S30 is to measure the difference in sentiment representation between clear and fuzzy online conversation texts, so as to perform targeted optimization on the model subsequently.
[0025] In this step, the computer system obtains the first text representation vector of the clear online conversation text training template and the second text representation vector of the fuzzy online conversation text training template. These two vectors respectively represent the positions of the texts in the representation vector domain (i.e., a text feature space), which contains the sentiment semantic information of the texts. Then, the computer system calculates the position error of these two vectors in the feature space. This is usually achieved by calculating the distance or similarity between the vectors. For example, metrics such as Euclidean distance, cosine similarity, or Manhattan distance can be used. Suppose the first text representation vector is V1 and the second text representation vector is V2, then the position error can be expressed as dist(V1, V2), where dist is the distance or similarity calculation function. Taking specific numerical values as an example, assume V1 = [0.1, 0.2, 0.7], representing a clear text representation vector with a positive sentiment; while V2 = [0.3, 0.1, 0.6], representing a fuzzy text representation vector with the same positive sentiment. Using cosine similarity as the metric, the calculated similarity value will be close to 1 (indicating a high degree of similarity), but not exactly equal to 1 because there are slight differences in their positions in the feature space.
[0026] Based on these position errors, the computer system can further determine a characterization vector distribution evaluation function. This evaluation function is used to quantify the distribution difference between clear and fuzzy text characterization vectors in the feature space, so as to evaluate the performance of the model when dealing with fuzzy emotional expressions. The evaluation function is also called a loss function, a cost function or an objective function, and its specific form can be designed according to the application scenario and requirements, but usually factors such as the magnitude, distribution range of the position error and the relative relationship with other text characterization vectors need to be considered. In practical applications, the characterization vector distribution evaluation function can help the computer system identify problems existing in the model when dealing with fuzzy emotional expressions, such as being less sensitive to certain types of fuzzy expressions or being prone to misjudgment. By monitoring the change of this evaluation function, the computer system can timely adjust the parameters or structure of the model to optimize its performance in the sentiment analysis task. Step S30 provides an important basis for subsequent model optimization by calculating the position errors of clear and fuzzy text characterization vectors in the feature space and determining a characterization vector distribution evaluation function based on this. In the embodiments of the present application, this refined analysis method is beneficial to improving the robustness and adaptability of the sentiment analysis model.
[0027] Step S40: Based on the first text characterization vector, obtain the first emotion polarity classification result corresponding to the clear online conversation text training template based on the basic emotion polarity classification branch component, and based on the second text characterization vector, obtain the second emotion polarity classification result corresponding to the fuzzy online conversation text training template based on the basic emotion polarity classification branch component.
[0028] In the embodiments of the present application, sentiment analysis is a key step in optimizing service quality and improving customer satisfaction. Step S40 plays an important role in this process, which involves using the basic emotion polarity classification branch component to perform sentiment polarity classification on clear and fuzzy online conversation text training templates. In this step, the computer system is based on the first text characterization vector and the second text characterization vector extracted in Step S20, corresponding to the clear online conversation text training template and the fuzzy online conversation text training template respectively. These text characterization vectors contain key information of the text, such as vocabulary, grammar and semantic features, and are the basis for sentiment polarity classification.
[0029] Next, the computer system uses the basic emotion polarity classification branch component to classify these text characterization vectors. This component is usually a pre-trained machine learning model, such as a support vector machine (SVM), logistic regression or a deep neural network. Taking a deep neural network as an example, it may consist of multiple hidden layers, and each hidden layer extracts high-level features in the text characterization vector through a non-linear transformation. These features are then passed to the output layer, and the sentiment polarity classification result is generated through a softmax function or other classifiers.
[0030] Specifically, for the first text representation vector of the clear online conversation text training template, the basic emotion polarity classification branch component will output a classification result, such as "positive emotion" or "negative emotion". Suppose the clear online conversation text training template is: "The performance of this product is very good and I am very satisfied." After the corresponding first text representation vector is processed by the neural network, the output result is "positive emotion", which is consistent with the actual emotion polarity of the text.
[0031] Similarly, for the second text representation vector of the fuzzy online conversation text training template, the basic emotion polarity classification branch component will also output a classification result. For example, the fuzzy online conversation text training template is: "This thing feels okay when used." Although the expression is fuzzy, the system can still recognize its positive emotion tendency and output the corresponding classification result.
[0032] However, due to the diversity of the expression methods of fuzzy texts, there may be certain errors in the classification results. These errors will be used for the optimization and adjustment of the model in the subsequent steps. Through continuous iteration and training, the basic emotion polarity classification branch component can gradually improve the recognition accuracy of fuzzy emotion expressions, thereby enhancing the performance of the entire emotion analysis system.
[0033] To sum up, step S40 provides basic data for the subsequent model optimization by using the basic emotion polarity classification branch component to conduct emotion polarity classification on the clear and fuzzy online conversation text training templates. This process not only reflects the application value of machine learning in emotion analysis but also demonstrates the important role of big data technology in enterprise business management.
[0034] Step S50: Determine the first evaluation function and the second evaluation function according to the errors between the first emotion polarity classification result and the second emotion polarity classification result and the prior emotion polarity labels respectively.
[0035] In step S50 of the embodiments of the present application, the computer system will use the sentiment polarity prior labels in the training data to evaluate the sentiment polarity classification results of the model for clear and fuzzy online conversation texts, and determine the first evaluation function and the second evaluation function accordingly. During the training process, each clear and fuzzy online conversation text training template has a predetermined sentiment polarity label, such as "positive" or "negative", which is determined based on manual annotation or historical data and represents the true sentiment tendency of the text. Next, when the computer system uses the basic emotion polarity classification branch component to classify the sentiment polarity of clear and fuzzy texts, two sets of classification results will be obtained: the first emotion polarity classification result corresponds to the clear online conversation text, and the second emotion polarity classification result corresponds to the fuzzy online conversation text. These classification results reflect the model's judgment of the text's sentiment tendency. Then, in order to evaluate the performance of the model, the computer system will compare these two sets of classification results with their respective sentiment polarity prior labels, calculate the difference between them, that is, the classification error. This error is the inconsistency between the model's prediction result and the actual label, and it is an important basis for optimizing the model's performance.
[0036] In machine learning, evaluation functions are used to quantify this classification error. For sentiment analysis tasks, common evaluation functions include the cross-entropy loss function, etc. Taking the cross-entropy loss function as an example, the first evaluation function L1 and the second evaluation function L2 can be respectively expressed as:
[0037] The first evaluation function (cross-entropy loss for clear text):
[0038]
[0039] where N1 is the number of clear online conversation texts, is the sentiment polarity prior label of the i-th clear text (usually represented as one-hot encoding, such as [1,0] for positive and [0,1] for negative), is the probability distribution of the sentiment polarity predicted by the model for the i-th clear text.
[0040] The second evaluation function (cross-entropy loss for fuzzy text):
[0041]
[0042] where N2 is the number of fuzzy online conversation texts, is the sentiment polarity prior label of the j-th fuzzy text, is the probability distribution of the sentiment polarity predicted by the model for the j-th fuzzy text.
[0043] For example, suppose there are two online conversation text training templates:
[0044] Clear text: "The performance of this product is very good, and I am very satisfied." (Emotional polarity prior label: [1,0], indicating positive emotion).
[0045] Vague text: "This thing feels okay when used." (Emotional polarity prior label: [1,0], also indicating positive emotion).
[0046] Suppose the classification result of the clear text by the model is positive emotion (predicted probability distribution: [0.9, 0.1]), and the classification result of the vague text is negative emotion (predicted probability distribution: [0.2, 0.8]). According to the calculation formula of the cross-entropy loss function, the specific values of the first evaluation function and the second evaluation function can be calculated respectively, so as to evaluate the classification performance of the model on clear and vague texts. If the loss function value is low, it means that the model classification performance is good; otherwise, the model needs to be further optimized.
[0047] Step S60: Based on the first evaluation function, the second evaluation function, and the representation vector distribution evaluation function, adjust the parameters of the basic representation information extraction branch component and the basic emotion polarity classification branch component to obtain an emotion polarity classification component, which is used to detect the emotional polarity of the online conversation text to be analyzed.
[0048] In the embodiment of the present application, step S60 adjusts the parameters of the model based on multiple evaluation functions to improve the performance of the model. In step S60, the computer system obtains the results of three evaluation functions: the first evaluation function (classification error based on clear online conversation text), the second evaluation function (classification error based on vague online conversation text), and the representation vector distribution evaluation function (distribution difference of clear and vague text representation vectors in the feature space). These evaluation functions measure the performance of the model from different perspectives and provide a basis for subsequent parameter adjustment.
[0049] Next, the computer system will use these evaluation functions to adjust the parameters of the basic representation information extraction branch component and the basic emotion polarity classification branch component. These two components are the core parts of the sentiment analysis model, responsible for extracting text representation vectors and performing emotion polarity classification respectively.
[0050] Specifically, parameter adjustment is an iterative optimization process. The computer system sets an initial learning rate and other hyperparameters, and then, following the idea of the backpropagation algorithm, gradually updates the model parameters according to the gradient information of the evaluation function. In each iteration, the computer system calculates the values of the evaluation functions and adjusts the model parameters based on these values to minimize the output of the evaluation functions.
[0051] Taking a neural network as an example, the basic feature information extraction branch component and the basic sentiment polarity classification branch component may be composed of multiple fully connected layers, convolutional layers, pooling layers, etc. During the parameter adjustment process, the computer system updates the weights and bias terms in these layers to optimize the performance of the model. For example, if the values of the first evaluation function and the second evaluation function are high (i.e., the classification error is large), the computer system may increase the number of neurons in certain layers or adjust the type of activation function to enhance the representation ability of the model; if the value of the representation vector distribution evaluation function is high (i.e., the distribution difference between the representation vectors of clear and fuzzy texts is large), the computer system may adjust certain parameters in the basic feature information extraction branch component to make the representation vectors of these two types of texts closer in the feature space.
[0052] Through continuous iteration and optimization, the computer system will finally obtain a sentiment polarity classification component with better performance. This component can more accurately identify the sentiment polarity in online conversation texts and provide more accurate sentiment analysis services for enterprises. For example, when an enterprise receives a new customer feedback, the sentiment polarity classification component can quickly judge its sentiment tendency (positive, negative or neutral) and take corresponding business decisions (such as optimizing products, improving services, etc.) accordingly, thereby improving customer satisfaction and loyalty.
[0053] As an implementation manner, the representation vector position error can be obtained based on the following operations:
[0054] Step S301: Transform the first text representation vector into a first vector discrete coefficient in the representation vector domain, and transform the second text representation vector into a second vector discrete coefficient in the representation vector domain.
[0055] In the embodiment of the present application, step S301 transforms the text representation vector into a vector discrete coefficient in the representation vector domain. In step S301, the computer system transforms the first text representation vector (assumed to be represented as V1) of the clear online conversation text training template and the second text representation vector (assumed to be represented as V2) of the fuzzy online conversation text training template into their vector discrete coefficients in the representation vector domain respectively. Here, the vector discrete coefficient is a feature statistical result (such as statistical quantities like mean, variance, covariance, correlation coefficient, principal component, etc.) used to describe the dispersion degree or scatter situation of the data set. In this scenario, the covariance matrix can be selected as a form of manifestation of the vector discrete coefficient.
[0056] A text representation vector is a numerical vector extracted from text data by a basic representation information extraction branch component, which contains key information of the text, such as lexical, grammatical, and semantic features. Taking the first text representation vector V1 as an example, it may be a vector containing multiple numerical values, and each numerical value represents the intensity of a certain feature or attribute in the text. Similarly, the second text representation vector V2 also has a similar structure.
[0057] The covariance matrix is a square matrix, and its elements are the covariances between the i-th and j-th elements. For the first text representation vector V1 and the second text representation vector V2, their respective covariance matrices can be calculated separately, namely the first vector dispersion coefficient and the second vector dispersion coefficient.
[0058] Suppose both V1 and V2 are n-dimensional vectors containing n features. Their covariance matrix Cov can be calculated according to the following formula:
[0059]
[0060]
[0061] where N is the number of text representation vectors (for example, N can be the number of clear text or fuzzy text training samples), and are the mean vectors of V1 and V2 respectively. The mean vector is obtained by calculating the average value of the corresponding elements of all text representation vectors.
[0062] Step S302: Determine the position error of the representation vector based on the first vector dispersion coefficient and the second vector dispersion coefficient.
[0063] In the embodiment of the present application, the core of step S302 is to calculate the position error of the representation vector based on the first vector dispersion coefficient (such as covariance matrix Cov1) of the clear online session text and the second vector dispersion coefficient (such as covariance matrix Cov2) of the fuzzy online session text.
[0064] In step S301, the computer system has calculated the vector dispersion coefficients of the clear text and the fuzzy text in the representation vector domain, usually manifested as covariance matrices Cov1 and Cov2. These two matrices respectively reflect the dispersion situations of the clear text and the fuzzy text in the feature space.
[0065] To quantify the difference between these two scatter situations, i.e., the characterization vector position error, the computer system calculates the distance or similarity between Cov1 and Cov2. Here, the Frobenius norm (F-norm) can be selected as a method to measure the difference between matrices. The Frobenius norm calculates the square root of the sum of the squares of all elements of the matrix, which can effectively reflect the overall difference of the matrix.
[0066] The specific calculation formula is as follows:
[0067] Characterization vector position error = ||Cov1 - Cov2|| F ;
[0068] where ||·|| F represents the Frobenius norm. This formula calculates the degree of difference between Cov1 and Cov2. The greater the difference, the greater the characterization vector position error, indicating that the distribution difference between the clear text and the blurred text in the feature space is greater.
[0069] As another implementation, the characterization vector position error can be obtained based on the following operations:
[0070] Step S30A: When extracting branch components based on the basic characterization information to obtain the first text characterization vector of the clear online session text training template and the second text characterization vector of the blurred online session text training template in the training template pair, obtain the activation characterization vectors of the intermediate network and the classification network in the basic characterization information extraction branch component based on the automated model structure selection mechanism.
[0071] In the embodiments of the present application, the sentiment analysis model usually needs to process a large amount of online session text data and extract key information from it to judge the sentiment tendency. In this process, obtaining the text characterization vector and the activation characterization vectors of the intermediate network and the classification network is crucial for the training and optimization of the model.
[0072] In step S30A, the computer system processes the clear online session text training template and the blurred online session text training template in the training template pair through the basic characterization information extraction branch component, and obtains their first text characterization vector and second text characterization vector respectively. These two text characterization vectors are the digital representations of the text data in the feature space, containing key information of the text, such as vocabulary, grammar, and semantic features. However, simply obtaining the text characterization vector is not sufficient to comprehensively evaluate the performance of the model. To gain a deeper understanding of the internal mechanism of the model when processing text data, the computer system further obtains the activation characterization vectors of the intermediate network and the classification network. These activation characterization vectors reflect the feature representations of the text data at different levels of the model and are an important manifestation of the internal state of the model.
[0073] To obtain these activation representation vectors, the computer system employs an automated model structure selection mechanism (NAS). The automated model structure selection mechanism is a technique that can automatically search for and select the optimal neural network architecture. In step S30A, the automated model structure selection mechanism is used to dynamically determine the specific structures of the intermediate network and the classification network in the basic representation information extraction branch component. By attempting different network structure combinations, the automated model structure selection mechanism can find the network architecture most suitable for the current task and extract the corresponding activation representation vectors.
[0074] For example, assume there is a deep neural network as the basic representation information extraction branch component, which includes multiple hidden layers and an output layer. To obtain the activation representation vectors of the intermediate network and the classification network, the automated model structure selection mechanism can be used to search for the optimal structure in the network.
[0075] Specifically, first, a search space is defined, which contains various possible network structure combinations. Then, it will find the optimal network structure by continuously attempting and evaluating the performance of these combinations. During this process, the activation representation vectors of each intermediate layer and the output layer are recorded, and these vectors reflect the feature representations of the text data at different levels of the model.
[0076] For example, assume the optimal network structure found contains three hidden layers. When the clear online session text training template "The performance of this product is very good, and I am very satisfied" and the fuzzy online session text training template "This thing feels okay when used" are respectively input into this network, each hidden layer will output the corresponding activation representation vectors. These vectors not only contain the key information of the text but also reflect the internal state of the model when processing different texts. By obtaining these activation representation vectors, the computer system can more comprehensively evaluate the performance of the model and perform subsequent model optimization work based on these evaluation results. This is of great significance for improving the accuracy and robustness of the sentiment analysis model.
[0077] Step S30B: Determine a target network in the intermediate network and the classification network based on the activation representation vectors for obtaining the position error of the representation vectors.
[0078] In the embodiment of the present application, step S30B determines a target network from multiple candidate networks for subsequent calculation of the position error of the representation vectors. This step is based on the activation representation vectors obtained in step S30A, and these vectors reflect the feature representations of the text data in the intermediate network and the classification network.
[0079] In step S30A, the computer system has obtained the activation representation vectors of the intermediate network and the classification network in the basic representation information extraction branch component through the automated model structure selection mechanism. These activation representation vectors are generated when processing the clear online session text training template and the fuzzy online session text training template, and they contain the key information of the text data at different network levels.
[0080] In step S30B, the goal of the computer system is to determine a target network based on these activation representation vectors. This target network will be used in subsequent steps to calculate the representation vector position error to evaluate the performance difference of the model when processing clear and fuzzy texts. Specifically, the computer system analyzes the activation representation vectors of each candidate network in the intermediate network and the classification network. These candidate networks may have different structural configurations, such as different numbers of hidden layers, numbers of neurons, or types of activation functions. By analyzing the activation representation vectors of these networks, the computer system can evaluate their performance when processing text data.
[0081] To determine the target network, the computer system can adopt various strategies. A commonly used strategy is to compare the differences in activation representation vectors of different networks when processing the same text data. This difference can be measured by calculating the distance or similarity between the vectors. For example, the computer system can calculate the Euclidean distance or cosine similarity between the activation representation vectors of clear text and fuzzy text in different networks. The greater the distance or the smaller the similarity, the greater the performance difference of the network when processing these two types of texts.
[0082] Based on these comparison results, the computer system can select a network with a large performance difference as the target network. This is because a network with a large performance difference can better reflect the distribution difference of clear text and fuzzy text in the feature space, thus providing a more accurate representation vector position error.
[0083] For example, assume there is a deep neural network as the basic feature information extraction branch component, which includes multiple hidden layers and an output layer. In step S30A, the activation representation vectors of each hidden layer have been obtained. Now, it is necessary to determine a target network from these hidden layers. First, calculate the distance or similarity between the activation representation vectors of each hidden layer when processing clear text and fuzzy text. Assume that it is found that the difference between the activation representation vectors of the second hidden layer is the largest between the two types of text. This means that the second hidden layer has a relatively large performance difference when processing clear text and fuzzy text, so it is more likely to reflect the distribution difference of these two types of text in the feature space. Based on this discovery, the computer system selects the second hidden layer and its subsequent network as the target network. This target network will be used in subsequent steps to calculate the position error of the representation vector to guide the optimization of the model. In this way, the computer system can more accurately evaluate the performance of the model when processing fuzzy text and adjust the model parameters accordingly to improve its robustness and accuracy.
[0084] Step S30C: Determine the position error of the representation vector based on the first pseudo-operation representation vector and the second pseudo-operation representation vector output by the target network, where the first pseudo-operation representation vector is the representation vector obtained by the target network based on the clear online session text training template, and the second pseudo-operation representation vector is the representation vector obtained by the target network based on the fuzzy online session text training template.
[0085] In the embodiment of the present application, during the optimization process of the sentiment analysis model, in step S30C, based on the target network determined in step S30B, the computer system uses this network to process the clear and fuzzy online session text training templates, respectively obtains the first pseudo-operation representation vector and the second pseudo-operation representation vector, and then calculates the position error of the representation vector. In step S30B, the computer system has determined a target network based on the activation representation vectors in the intermediate network and the classification network. This target network is considered to be the network structure that can best reflect the distribution difference between clear text and fuzzy text in the feature space.
[0086] In step S30C, the computer system uses the target network to process the clear online session text training template. This processing process includes inputting the text data into the target network, and after the calculations of each layer of the network, finally outputting a representation vector, that is, the first pseudo-operation representation vector. This vector reflects the feature representation of the clear text in the target network. Then, the computer system uses the same target network to process the fuzzy online session text training template, and also outputs a representation vector, that is, the second pseudo-operation representation vector. This vector reflects the feature representation of the fuzzy text in the target network.
[0087] After obtaining the first pseudo-operation representation vector and the second pseudo-operation representation vector, the computer system calculates the position error between these two vectors. This error value reflects the distribution difference between the clear text and the blurred text in the target network, that is, the performance difference of the model when processing these two types of texts.
[0088] There are various methods to calculate the position error, such as calculating the Euclidean distance, cosine similarity, etc. between the two vectors. Which method to choose specifically depends on the actual application scenario and requirements. For example, if the absolute distance between the vectors is concerned, the Euclidean distance can be chosen; if the direction difference between the vectors is concerned, the cosine similarity can be chosen.
[0089] For example, suppose there is a deep neural network as the target network, which contains multiple hidden layers and an output layer. Now, there are two online session text training templates: one is the clear text "The performance of this product is very good and I am very satisfied", and the other is the blurred text "This thing feels okay when used".
[0090] The computer system first inputs the clear text into the target network. After the calculation of the network, a first pseudo-operation representation vector V1 is output. Similarly, the computer system inputs the blurred text into the target network and outputs a second pseudo-operation representation vector V2.
[0091] Suppose the Euclidean distance is chosen as the measurement index for the position error. The system first calculates the Euclidean distance D between V1 and V2, that is:
[0092]
[0093] where n is the dimension of the representation vector, V1 i and V2 i are the i-th elements of V1 and V2 respectively.
[0094] The calculated Euclidean distance D is the position error of the representation vector. This error value reflects the distribution difference between the clear text and the blurred text in the target network. If the value of D is large, it means that the performance difference of the model when processing these two types of texts is large, and it may be necessary to further adjust the model parameters or structure to optimize the performance. On the contrary, if the value of D is small, it means that the performance of the model when processing these two types of texts is relatively close, and it already has good robustness and accuracy.
[0095] As an implementation manner, if the target network is the target intermediate network among multiple intermediate networks of the basic representation information extraction branch component, step S30C, determining the position error of the representation vector based on the first pseudo-operation representation vector and the second pseudo-operation representation vector output by the target network, may specifically include:
[0096] Step S30C1: In the target intermediate network of the basic characterization information extraction branch component, obtain the first implicit representation vector of the clear online conversation text training template and the second implicit representation vector of the fuzzy online conversation text training template.
[0097] In step S30C1 of the embodiment of the present application, the computer system obtains the first implicit representation vector of the clear online conversation text training template and the second implicit representation vector of the fuzzy online conversation text training template in the target intermediate network of the basic characterization information extraction branch component.
[0098] In the sentiment analysis model, the basic characterization information extraction branch component is usually responsible for converting the original text data into a numerical vector form that can be understood by the computer, namely the text representation vector. These representation vectors can capture the key information in the text, such as vocabulary, grammar, and semantic features, providing a basis for subsequent sentiment polarity classification. In step S30C1, the computer system focuses on the manifestation form of these representation vectors at the intermediate network level of the model, namely the implicit representation vector. The implicit representation vector is calculated in the intermediate layer of the model, and it reflects the feature representation of the text data after being processed by the previous layers of the model. These implicit representation vectors are of great significance for understanding how the model processes text data and evaluating the performance of the model.
[0099] Specifically, in step S30C1, the computer system determines the target intermediate network. This target intermediate network is determined by an automated model structure selection mechanism and is considered to be the network layer that best reflects the distribution differences between clear text and fuzzy text in the feature space. Then, the computer system inputs the clear online conversation text training template and the fuzzy online conversation text training template into the target intermediate network respectively. These text training templates contain rich sentiment expression information and are the key data for training and optimizing the sentiment analysis model.
[0100] After the text training template is input into the target intermediate network, the computer system will go through a series of calculations and processes, and finally output the corresponding implicit representation vector. For the clear online conversation text training template, the computer system outputs the first implicit representation vector; for the fuzzy online conversation text training template, the computer system outputs the second implicit representation vector. For example, assume that a deep neural network is used as the basic characterization information extraction branch component, and this network contains multiple hidden layers. Through the automated model structure selection mechanism, the third hidden layer is determined as the target intermediate network. Now, there are two online conversation text training templates: one is the clear text "The performance of this product is very good, and I am very satisfied", and the other is the fuzzy text "This thing feels okay when used".
[0101] The computer system inputs these two text training templates into the target intermediate network (i.e., the third hidden layer) respectively. After the calculation and processing of the network, the computer system outputs the first implicit representation vector of the clear text and the second implicit representation vector of the fuzzy text.
[0102] Taking specific numerical values as an example, assume that both of these implicit representation vectors are 5-dimensional. The first implicit representation vector may be [0.8, 0.2, 0.1, 0.7, 0.3], while the second implicit representation vector may be [0.6, 0.3, 0.2, 0.5, 0.4]. These numerical values reflect the feature representation of the text data in the target intermediate network and provide a basis for calculating the position error of the representation vectors subsequently. Through the implementation of step S30C1, the computer system can obtain the implicit representation vectors of the clear text and the fuzzy text in the target intermediate network, providing an important basis for the subsequent model performance evaluation and optimization. In the embodiments of the present application, this ability is of great significance for improving the accuracy and robustness of the sentiment analysis model.
[0103] Step S30C2: Determine the position error of the representation vector based on the first implicit representation vector and the second implicit representation vector.
[0104] In step S30C2 of the embodiments of the present application, the computer system uses the first implicit representation vector (corresponding to the clear online conversation text training template) and the second implicit representation vector (corresponding to the fuzzy online conversation text training template) obtained in step S30C1 to calculate the position error between these two vectors.
[0105] During the training process of the sentiment analysis model, the model needs to be able to accurately identify and understand the sentiment tendencies in clear and fuzzy texts. To evaluate the performance differences of the model when processing these two types of texts, it is necessary to calculate the position error of the representation vectors of the clear text and the fuzzy text in the model. This error value reflects the robustness and accuracy of the model when processing different types of texts.
[0106] In step S30C1, the first implicit representation vector of the clear text and the second implicit representation vector of the fuzzy text have been obtained through the target intermediate network. These two vectors respectively represent the feature representations of the clear text and the fuzzy text at the intermediate network level of the model.
[0107] In step S30C2, the task of the computer system is to calculate the position error between these two implicit representation vectors. This error value can be measured in various ways, such as calculating the Euclidean distance, cosine similarity, etc. between the two vectors. Which method to choose specifically depends on the requirements of the application scenario and the characteristics of the data.
[0108] For example, assume that there is a deep neural network as the basic feature information extraction branch component, and the target intermediate network has been determined through an automated model structure selection mechanism. Now, there are two online session text training templates: the clear text "The performance of this product is very good, and I am very satisfied" and the fuzzy text "This thing feels okay when used".
[0109] In step S30C1, the first implicit representation vector V1 and the second implicit representation vector V2 of these two texts have been obtained through the target intermediate network. Assume that both V1 and V2 are 5-dimensional vectors, and the specific values are as follows: V1 = [0.8, 0.2, 0.1, 0.7, 0.3]; V2 = [0.6, 0.3, 0.2, 0.5, 0.4].
[0110] Next, in step S30C2, the Euclidean distance between V1 and V2 is calculated as the representation vector position error. According to the calculation formula of the Euclidean distance:
[0111]
[0112] This error value D reflects the distribution difference between the clear text and the fuzzy text in the target intermediate network. If the D value is large, it indicates that the performance difference of the model in processing these two types of texts is large, and it may be necessary to further adjust the model parameters or structure to optimize the performance. On the contrary, if the D value is small, it indicates that the performance of the model in processing these two types of texts is relatively close, and it already has good robustness and accuracy.
[0113] Through the implementation of step S30C2, the computer system can quantitatively evaluate the performance difference of the model in processing clear and fuzzy texts, providing strong support for subsequent model optimization. In the embodiments of this application, this evaluation method is of great significance for improving the accuracy and robustness of the sentiment analysis model.
[0114] As an implementation manner, in step S40, based on the first text representation vector, the first sentiment polarity classification result corresponding to the clear online session text training template is obtained based on the basic sentiment polarity classification branch component, and specifically may include:
[0115] Step S41: Obtain the clear clustering representative representation vectors corresponding to several sentiment polarities that can be detected by the basic sentiment polarity classification branch component, where the several sentiment polarities include the target sentiment polarity, and the clear clustering representative representation vector corresponding to the target sentiment polarity is obtained based on multiple clear online session text training templates.
[0116] In the embodiments of this application, step S41 involves obtaining the clear clustering representative representation vectors corresponding to several sentiment polarities that can be detected by the basic sentiment polarity classification branch component.
[0117] In the sentiment analysis model, the basic emotion polarity classification branch component is responsible for mapping the input text representation vector to predefined sentiment polarity categories. These sentiment polarity categories usually include positive, negative, and neutral, etc., representing different sentiment tendencies expressed by the text. To accurately perform sentiment polarity classification, the model needs to know the typical representation of each sentiment polarity category in the feature space, that is, the clear cluster representative representation vector.
[0118] In step S41, the computer system obtains several sentiment polarity categories that can be detected by the basic emotion polarity classification branch component. These sentiment polarity categories are predefined by the model and are used to identify different sentiment tendencies of the text. Then, for each sentiment polarity category, the computer system obtains its corresponding clear cluster representative representation vector based on multiple clear online session text training templates.
[0119] Specifically, the computer system will traverse all the clear online session text training templates and classify them into the corresponding sentiment polarity categories according to the sentiment polarity labels of each template. Then, for each sentiment polarity category, the computer system will extract the statistical features (such as mean, median, etc.) of all the clear text representation vectors in this category, or use a clustering algorithm (such as K-means) to perform clustering analysis on the text representation vectors in this category to obtain one or more clear cluster representative representation vectors representing this sentiment polarity category.
[0120] These clear cluster representative representation vectors reflect the typical representation of different sentiment polarity categories in the feature space and are an important basis for the model to perform sentiment polarity classification. They can help the model more accurately identify the sentiment tendency in the text and improve the accuracy of sentiment analysis.
[0121] For example, assume there is a sentiment analysis model for identifying the sentiment tendency in customer feedback. This model defines three sentiment polarity categories: positive, negative, and neutral. To train and optimize this model, a large number of clear online session text training templates are collected and each template is marked with a sentiment polarity.
[0122] In step S41, the computer system first obtains these three sentiment polarity categories. Then, for the positive sentiment polarity category, the computer system will extract all the clear text representation vectors marked as positive and calculate their mean vector as the clear cluster representative representation vector of the positive sentiment polarity. Similarly, for the negative and neutral sentiment polarity categories, the computer system will calculate their corresponding clear cluster representative representation vectors respectively.
[0123] Suppose the following three clear cluster representative representation vectors are obtained (taking a simplified two-dimensional vector as an example): positive sentiment polarity: [0.8, 0.2]; negative sentiment polarity: [0.2, 0.8]; neutral sentiment polarity: [0.5, 0.5].
[0124] These vectors respectively represent the typical representations of positive, negative, and neutral sentiment polarities in the feature space. In the subsequent sentiment polarity classification process, the model will use these vectors as references to compare and match the input text representation vector with them to determine the sentiment polarity category of the text. In this way, the model can more accurately identify the sentiment tendency in customer feedback and provide more valuable decision-making support for enterprises.
[0125] Step S42: Based on the first text representation vector and the clear cluster representative representation vectors respectively corresponding to the several sentiment polarities, determine the first detection confidence levels of the clear online session text training templates corresponding to the several sentiment polarities based on the basic emotion polarity classification branch component.
[0126] In step S42, the computer system has obtained the first text representation vector of the clear online session text, which is a numerical representation transformed from the key information extracted from the text by the basic representation information extraction branch component. At the same time, the computer system also has a set of clear cluster representative representation vectors, which represent the typical features of different sentiment polarities in the feature space and are learned based on multiple clear online session text training templates. Then, the computer system uses the basic emotion polarity classification branch component to determine the first detection confidence levels of the clear online session text training templates corresponding to different sentiment polarities. This component is usually a trained machine learning model, such as a support vector machine (SVM), logistic regression, or deep neural network, etc.
[0127] In the implementation process, the computer system compares the first text representation vector with the clear cluster representative representation vector corresponding to each sentiment polarity. This comparison process is usually achieved by calculating the similarity between vectors, and the similarity can be measured by metrics such as cosine similarity and Euclidean distance. The higher the similarity, the closer the first text representation vector is to the representative vector of a certain sentiment polarity, and thus the higher the confidence level that the text belongs to this sentiment polarity.
[0128] Specifically, the computer system calculates the similarity between the first text representation vector and the representative vector of the positive sentiment polarity to obtain a confidence score for the positive sentiment polarity; then calculates the similarity with the representative vector of the negative sentiment polarity to obtain a confidence score for the negative sentiment polarity; and so on until the confidence scores for all sentiment polarities are calculated.
[0129] For example, assume there is a sentiment analysis model used to identify the sentiment tendency in customer feedback. The model has defined three sentiment polarities: positive, negative, and neutral, and has obtained corresponding clear clustering representative representation vectors through learning based on a large number of clear online conversation text training templates.
[0130] Suppose there is a new clear online conversation text: "This product is really great, highly recommended!" First, the system extracts the first text representation vector of this text through the basic representation information extraction branch component. Then, the computer system uses the basic sentiment polarity classification branch component to calculate the confidence scores of this text corresponding to the positive, negative, and neutral sentiment polarities respectively.
[0131] Suppose the cosine similarity between the calculated first text representation vector and the positive sentiment polarity representative vector is 0.98 (very close to 1, indicating a high degree of similarity), the cosine similarity with the negative sentiment polarity representative vector is 0.1 (very low, indicating dissimilarity), and the cosine similarity with the neutral sentiment polarity representative vector is 0.3 (between 0 and 1, indicating a certain similarity but not strong).
[0132] Based on these similarity scores, the computer system can determine that the confidence that this text belongs to the positive sentiment polarity is very high, while the confidence that it belongs to the negative and neutral sentiment polarities is very low. Therefore, the computer system will finally classify the sentiment polarity of this text as positive.
[0133] In this way, the computer system can accurately identify the sentiment tendency in clear online conversation texts and provide valuable customer feedback analysis results for enterprises. This is of great significance for enterprises to optimize products and services and improve customer satisfaction.
[0134] Step S43: Determine the first emotion polarity classification result based on the first detection confidence.
[0135] In the embodiments of this application, the output of the sentiment analysis model - that is, the sentiment polarity classification result - is crucial for understanding customer feedback, optimizing service experience, and making more informed business decisions. In the classification process of the sentiment analysis model, step S43 is the key step to determine the final sentiment polarity classification result.
[0136] In step S43, the computer system determines the first emotion polarity classification result of the clear online conversation text based on the first detection confidence calculated in step S42. The first detection confidence is the similarity score between the text representation vector and the clear clustering representative representation vectors corresponding to different sentiment polarities, reflecting the possibility that the text belongs to different sentiment polarities.
[0137] Specifically, the computer system obtains a first detection confidence score for each sentiment polarity. These scores are obtained by calculating the similarity between the text representation vector and the representative vector of each sentiment polarity. The higher the similarity, the greater the likelihood that the text belongs to that sentiment polarity.
[0138] Then, the computer system compares the confidence scores of all sentiment polarities and selects the sentiment polarity with the highest confidence as the final classification result. In this process, the computer system may set a threshold, and only when the confidence of a certain sentiment polarity exceeds this threshold will it be selected as the classification result. If the confidence scores of all sentiment polarities are lower than the threshold, the computer system may select the sentiment polarity with the highest confidence as the result, or output an "uncertain" classification result. For example, assume there is a sentiment analysis model for analyzing the sentiment tendency of customers' product evaluations. This model defines three sentiment polarities: positive, negative, and neutral, and has obtained the corresponding clear clustering representative representation vectors through learning with a large number of clear online conversation text training templates.
[0139] Now, there is a new customer evaluation text: "This product is really great and very convenient to use!" First, the system extracts the first text representation vector of this text through the basic representation information extraction branch component. Then, in the basic sentiment polarity classification branch component, the computer system calculates the similarity between this text representation vector and the representative vectors of positive, negative, and neutral sentiment polarities to obtain the corresponding first detection confidence scores.
[0140] Assume the calculated similarity scores are as follows: the confidence of the positive sentiment polarity is 0.95, the confidence of the negative sentiment polarity is 0.03, and the confidence of the neutral sentiment polarity is 0.02. Since the confidence of the positive sentiment polarity is much higher than the other two sentiment polarities, the computer system finally classifies the sentiment polarity of this text as positive.
[0141] This classification result will be directly fed back to the enterprise to help the enterprise understand the positive evaluations of customers on the product, so as to optimize product design, improve service quality, or adjust market strategies. Through the accurate classification of the sentiment analysis model, the enterprise can better understand customer needs, enhance customer satisfaction, and improve market competitiveness.
[0142] As an implementation manner, the method further includes:
[0143] Step S100: Determine a first clustering centroid evaluation function based on the error between the second text representation vector and the clear clustering representative representation vector corresponding to the target sentiment polarity.
[0144] In the embodiments of the present application, the optimization of the sentiment analysis model not only needs to consider the classification accuracy of clear texts, but also needs to particularly focus on the processing ability of the model for fuzzy texts.
[0145] During the training process of the sentiment analysis model, the computer system has obtained clear clustering representative feature vectors corresponding to different sentiment polarities through step S41. These vectors represent the typical representations of clear texts in the feature space and are important bases for the model to perform sentiment classification. However, in practical applications, the model often needs to process a large amount of fuzzy text data. Due to the unclear expression mode or the fuzziness of sentiment expression, these data pose challenges to the classification of the model. To evaluate the model's ability to process fuzzy texts, step S100 introduces the first clustering centroid evaluation function. The core idea of this function is to compare the error between the second text feature vector of the fuzzy text and the clear clustering representative feature vector corresponding to the target sentiment polarity. This error reflects the accuracy of the model in mapping the fuzzy text to the clear text clustering center, that is, the model's ability to recognize the sentiment of fuzzy texts.
[0146] Specifically, assume there is a clear clustering representative feature vector V_clear of positive sentiment and a second text feature vector V_fuzzy of a fuzzy text. To calculate the error between these two vectors, the Euclidean distance can be used as a measurement index. The Euclidean distance calculates the square root of the sum of the squares of the differences between all corresponding elements of the two vectors and can intuitively reflect the degree of difference between the vectors. The calculation formula is as follows:
[0147]
[0148] where n is the dimension of the vector, V cleari and V fuzzyi are the i-th elements of V_clear and V_fuzzy respectively. This formula calculates the Euclidean distance D between V_fuzzy and V_clear, and Lc is the output value of the first clustering centroid evaluation function.
[0149] For example, assume there is a sentiment analysis model used to identify the sentiment tendency in customer feedback. The model has defined three sentiment polarities: positive, negative, and neutral, and has obtained the corresponding clear clustering representative feature vectors based on the learning of a large number of clear online conversation text templates. Now, there is a fuzzy customer feedback text: "This product feels okay, but there are some places that can be improved."
[0150] The computer system first extracts the second text feature vector V_fuzzy of this text through the basic feature information extraction branch component. Then, the computer system obtains the clear clustering representative feature vector V_clear corresponding to the positive sentiment polarity. Next, the computer system calculates the Euclidean distance D between V_fuzzy and V_clear as the output value of the first clustering centroid evaluation function.
[0151] Assume that the calculated Euclidean distance D is small, indicating that the second text representation vector of the fuzzy text is relatively close to the clear clustering representative representation vector of the positive sentiment polarity. This means that the model can more accurately map the fuzzy text to the positive sentiment clustering center, thereby more accurately identifying the sentiment tendency of the text as positive. Conversely, if the value of D is large, it indicates that there is a large error in the model when processing fuzzy text, and it is necessary to further optimize the model parameters or structure to improve the performance.
[0152] Through the implementation of step S100, the computer system can quantitatively evaluate the processing ability of the model for fuzzy text, providing strong support for subsequent model optimization. In the embodiments of the present application, this evaluation method is of great significance for improving the accuracy and robustness of the sentiment analysis model.
[0153] In step S60, based on the first evaluation function, the second evaluation function, and the representation vector distribution evaluation function, the parameter adjustment of the basic representation information extraction branch component and the basic emotion polarity classification branch component is performed to obtain the emotion polarity classification component, which may specifically include:
[0154] Step S61: Based on the first evaluation function, the second evaluation function, the first clustering centroid evaluation function, and the representation vector distribution evaluation function, the parameter adjustment of the basic representation information extraction branch component and the basic emotion polarity classification branch component is performed to obtain the emotion polarity classification component.
[0155] In the embodiments of the present application, the performance optimization of the sentiment analysis model is the key to improving service quality and customer satisfaction. Step S61 describes how to use multiple evaluation functions to perform parameter adjustment on the core components of the sentiment analysis model, namely the basic representation information extraction branch component and the basic emotion polarity classification branch component, so as to obtain the optimized emotion polarity classification component.
[0156] In step S61, the computer system calculates four key evaluation functions: the first evaluation function, the second evaluation function, the first clustering centroid evaluation function, and the representation vector distribution evaluation function. These evaluation functions measure the performance of the model from different perspectives, including the classification accuracy of clear text and fuzzy text, the mapping accuracy of fuzzy text to the clustering center of clear text, and the distribution difference of clear text and fuzzy text in the feature space.
[0157] Specifically, the first evaluation function and the second evaluation function are calculated based on the errors between the classification results of the clear text and the fuzzy text and the prior labels of the sentiment polarities, respectively, and are used to evaluate the classification performance of the model for these two types of texts. The first clustering centroid evaluation function evaluates the processing ability of the model for fuzzy texts by calculating the error between the representation vectors of the fuzzy texts and the representation vectors of the clear clustering representatives corresponding to the target sentiment polarities. The representation vector distribution evaluation function measures the distribution differences between these two types of texts in the model based on the position errors of the representation vectors of the clear text and the fuzzy text in the feature space.
[0158] After calculating these four evaluation functions, the computer system guides the parameter adjustment of the basic representation information extraction branch component and the basic sentiment polarity classification branch component according to the output values of these functions. This process is usually implemented using optimization algorithms such as gradient descent. By gradually adjusting parameters such as the weights and bias terms of the model, the output values of the evaluation functions are gradually reduced, thereby optimizing the performance of the model.
[0159] For example, suppose there is a sentiment analysis model for analyzing the sentiment tendencies in customer online conversations. This model includes a basic representation information extraction branch component and a basic sentiment polarity classification branch component, and has been preliminarily trained with a large amount of training data. However, in actual applications, it is found that the accuracy of the model in recognizing the sentiment of fuzzy texts is not high, which affects the overall performance.
[0160] To optimize the performance of the model, the method in step S61 is used to adjust the parameters of the model. First, the output values of the first evaluation function, the second evaluation function, the first clustering centroid evaluation function, and the representation vector distribution evaluation function are calculated. By analyzing the output values of these functions, it is found that the output value of the first clustering centroid evaluation function is relatively large, indicating that there are relatively large errors in the model when processing fuzzy texts.
[0161] To address this issue, the parameters of the basic representation information extraction branch component and the basic sentiment polarity classification branch component are adjusted based on the output values of these four evaluation functions. Specifically, the gradient descent algorithm is used to gradually adjust parameters such as the weights and bias terms of the model, so that the output values of these four evaluation functions gradually decrease. After multiple iterations of optimization, a new sentiment polarity classification component is obtained.
[0162] By comparing the model performance before and after optimization, it is found that the accuracy of the new sentiment polarity classification component in recognizing the sentiment of fuzzy texts has been significantly improved. This means that the model can better capture the sentiment tendencies in the text when processing fuzzy texts, thereby providing more accurate and reliable sentiment analysis results for enterprises. This is of great significance for improving customer satisfaction, optimizing service quality, and enhancing the competitiveness of enterprises.
[0163] As an implementation manner, in step S40, based on the second text representation vector, the second emotion polarity classification result corresponding to the fuzzy online conversation text training template is obtained based on the basic emotion polarity classification branch component, which may specifically include:
[0164] Step S44: Obtain fuzzy clustering representative representation vectors corresponding to several emotion polarities that can be detected by the basic emotion polarity classification branch component, where the several emotion polarities include the target emotion polarity, and the fuzzy clustering representative representation vector corresponding to the target emotion polarity is obtained based on multiple fuzzy online conversation text training templates.
[0165] In the embodiment of the present application, the basic emotion polarity classification branch component is responsible for mapping the input text representation vector to a predefined emotion polarity category. To accurately process fuzzy online conversation text, the model needs to understand the typical representations of different emotion polarities in fuzzy text, that is, fuzzy clustering representative representation vectors.
[0166] In step S44, the computer system determines several emotion polarity categories that can be detected by the basic emotion polarity classification branch component. These emotion polarity categories are predefined by the model and are used to identify different emotion tendencies of the text, such as positive, negative, and neutral, etc. Next, for each emotion polarity category, the computer system will obtain the corresponding fuzzy clustering representative representation vector based on multiple fuzzy online conversation text training templates. These fuzzy text training templates are online conversation texts that contain fuzzy expressions or unclear emotional semantics, and their belonging emotion polarity categories are determined through manual annotation or historical data.
[0167] The computer system traverses all fuzzy text training templates and classifies them into the corresponding emotion polarity categories according to the emotion polarity labels of each template. Then, for each emotion polarity category, the computer system extracts the statistical features of all fuzzy text representation vectors in this category or executes a clustering algorithm (such as K-means) to obtain one or more fuzzy clustering representative representation vectors representing this emotion polarity category.
[0168] These fuzzy clustering representative representation vectors reflect the typical representations of different emotion polarities in fuzzy text. Different from clear text, fuzzy text may contain unclear expressions or omitted information, which makes it difficult to directly judge their emotion polarities. However, through learning a large number of fuzzy texts, the computer system can still capture the common features in these texts and form fuzzy clustering representative representation vectors representing different emotion polarities. For example, assume there is an emotion analysis model for analyzing the emotion tendency in customer feedback. The model defines three emotion polarity categories: positive, negative, and neutral. To train and optimize this model, a large number of fuzzy online conversation text training templates are collected and the emotion polarity labels are marked for each template.
[0169] In step S44, the computer system determines these three emotional polarity categories. Then, for the positive emotional polarity category, the computer system extracts all the fuzzy text representation vectors marked as positive, and calculates their statistical features or uses a clustering algorithm to obtain one or more fuzzy clustering representative representation vectors representing the positive emotional polarity. Similarly, for the negative and neutral emotional polarity categories, the computer system also calculates their corresponding fuzzy clustering representative representation vectors respectively.
[0170] Suppose the following three fuzzy clustering representative representation vectors are obtained (taking a simplified two-dimensional vector as an example): Positive emotional polarity: [0.7, 0.3]; Negative emotional polarity: [0.3, 0.7]; Neutral emotional polarity: [0.5, 0.5].
[0171] These vectors respectively represent the typical representations of positive, negative, and neutral emotional polarities in fuzzy text. In the subsequent emotional polarity classification process, the model will use these vectors as references, compare and match the input fuzzy text representation vectors with them to determine the emotional polarity category of the text. In this way, the model can more accurately identify the emotional tendency in the fuzzy text and improve the accuracy of emotional analysis.
[0172] Step S45: Based on the second text representation vector and the clustering centroid representation vectors corresponding to the several emotional polarities respectively, determine the second detection confidence levels corresponding to the several emotional polarities of the fuzzy online conversation text training template based on the basic emotional polarity classification branch component.
[0173] In the embodiment of the present application, step S45 uses the basic emotional polarity classification branch component to determine the degree of association between the fuzzy text and different emotional polarities.
[0174] In the emotional analysis model, the basic emotional polarity classification branch component determines the emotional polarity of the text by calculating the similarity or distance between the input text and the predefined emotional polarities. For fuzzy online conversation text, due to the unclear expression method or the ambiguity of emotional semantics, the model needs to more finely evaluate the degree of association between the text and different emotional polarities.
[0175] In step S45, the computer system obtains the second text representation vector of the fuzzy online conversation text, which is obtained by the basic representation information extraction branch component extracting key information from the text and converting it into a numerical form. At the same time, the computer system also obtains the clustering centroid representation vectors corresponding to the several emotional polarities that can be detected by the basic emotional polarity classification branch component. These clustering centroid representation vectors represent the central positions of different emotional polarities in the feature space and are learned based on a large amount of training data.
[0176] Next, the computer system uses a similarity calculation mechanism (such as cosine similarity, Euclidean distance, etc.) in the basic emotion polarity classification branch component to calculate the similarity or distance between the second text representation vector and the cluster centroid representation vectors corresponding to each emotion polarity. This similarity or distance reflects the degree of association between the fuzzy text and different emotion polarities. Specifically, the computer system calculates the similarity between the second text representation vector and the cluster centroid representation vector corresponding to the positive emotion polarity to obtain a confidence score for the positive emotion polarity; then calculates the similarity between the second text representation vector and the cluster centroid representation vector corresponding to the negative emotion polarity to obtain a confidence score for the negative emotion polarity; and so on until the confidence scores for all emotion polarities are calculated. For example, assume there is a sentiment analysis model for analyzing the sentiment tendency in customer feedback. This model defines three emotion polarities: positive, negative, and neutral. Now, there is a fuzzy customer feedback text: "This product is okay to use, but there are some areas that need improvement."
[0177] In step S45, the computer system extracts the second text representation vector of this text through the basic representation information extraction branch component. Then, the computer system obtains the cluster centroid representation vectors corresponding to the positive, negative, and neutral emotion polarities respectively in the basic emotion polarity classification branch component.
[0178] Next, the computer system calculates the similarity between the second text representation vector and these three cluster centroid representation vectors. Assume that cosine similarity is used as the similarity calculation metric, and the calculated similarity scores are as follows: Positive emotion polarity: 0.7 (indicating that the text has a certain similarity to the positive emotion); Negative emotion polarity: 0.4 (indicating that the text has a lower similarity to the negative emotion); Neutral emotion polarity: 0.5 (indicating that the text has a moderate similarity to the neutral emotion).
[0179] Based on these similarity scores, the computer system can determine that the fuzzy text has the highest degree of association with the positive emotion, so it classifies its emotion polarity as positive. However, since the similarity score is not very high (for example, not reaching 0.9 or higher), the computer system may also consider that the sentiment tendency of this text is relatively fuzzy and requires further review or processing. In this way, the computer system can accurately evaluate the degree of association between the fuzzy online conversation text and different emotion polarities, and determine the emotion polarity classification result of the text based on the confidence score. This is of great significance for enterprises to understand customer feedback, optimize service quality, and enhance the customer experience.
[0180] Step S46: Determine the second emotion polarity classification result based on the second detection confidence.
[0181] In the embodiments of the present application, step S46 determines the final sentiment polarity classification result of the fuzzy text based on the second detection confidence calculated in step S45.
[0182] In the training and optimization process of the sentiment analysis model, for the sentiment polarity classification of fuzzy online conversation texts, the key lies in how to accurately evaluate the degree of association between the text and different sentiment polarities. In step S45, the second detection confidence of the fuzzy text with different sentiment polarities has been obtained by calculating the similarity or distance between the second text representation vector and the clustering centroid representation vectors corresponding to each sentiment polarity. In step S46, the computer system determines the final sentiment polarity classification result of the fuzzy text based on these second detection confidences. Specifically, the computer system compares the confidence scores of all sentiment polarities and selects the sentiment polarity with the highest confidence as the final classification result. In this process, the computer system may set a threshold, and only when the confidence of a certain sentiment polarity exceeds this threshold will it be selected as the classification result. If the confidences of all sentiment polarities are lower than the threshold, the computer system may output a "not sure" classification result, or select the sentiment polarity with the highest confidence as the result, but mark a lower confidence level at the same time. For example, assume there is a sentiment analysis model for analyzing the sentiment tendency in customer feedback. This model defines three sentiment polarities: positive, negative, and neutral. Now, there is a fuzzy customer feedback text: "Generally speaking, this product is okay, but there are some minor flaws."
[0183] In step S45, the computer system has calculated the second detection confidences of this text with positive, negative, and neutral sentiment polarities. Assume the obtained confidence scores are as follows: Positive sentiment polarity: 0.8 (indicating a relatively high similarity between the text and positive sentiment); Negative sentiment polarity: 0.2 (indicating a relatively low similarity between the text and negative sentiment); Neutral sentiment polarity: 0.4 (indicating a moderate similarity between the text and neutral sentiment, but lower than the positive sentiment).
[0184] In step S46, the computer system compares these confidence scores and selects the sentiment polarity with the highest confidence as the final classification result. In this example, the confidence of the positive sentiment polarity is the highest (0.8), so the system classifies the sentiment polarity of this text as positive. At the same time, since the confidence score is not very high (for example, not reaching 0.9 or higher), the computer system may mark a lower confidence level to indicate that there is a certain degree of uncertainty in the classification result.
[0185] In this way, the computer system can accurately evaluate the sentiment tendency of fuzzy online conversation texts and provide valuable customer feedback analysis results for enterprises. This is of great significance for enterprises to understand customer needs, optimize service quality, and improve customer satisfaction. At the same time, the computer system can also handle situations with low confidence and provide guidance for further review or processing.
[0186] As an implementation manner, the method further includes:
[0187] Step S200: Determine a second clustering centroid evaluation function based on the error between the first text representation vector and the fuzzy clustering representative representation vector corresponding to the target sentiment polarity.
[0188] In the embodiments of the present application, in order to further improve the performance of the sentiment analysis model, especially in dealing with the relationship between clear and fuzzy texts, the core of step S200 is to determine a loss function named the second clustering centroid evaluation function by calculating the error between the first text representation vector (the representation vector of clear text) and the fuzzy clustering representative representation vector corresponding to the target sentiment polarity.
[0189] During the training process of the sentiment analysis model, the model needs to be able to accurately distinguish the sentiment polarities of clear and fuzzy texts and understand the relationship between them. Step S200 helps the model better capture this relationship by introducing the second clustering centroid evaluation function.
[0190] Specifically, the computer system obtains the first text representation vector of the clear online conversation text. This vector is obtained by the basic representation information extraction branch component extracting key information from the clear text and converting it into a numerical form, representing the position of the clear text in the feature space.
[0191] At the same time, the computer system also obtains the fuzzy clustering representative representation vector corresponding to the target sentiment polarity (such as positive sentiment). This vector is learned based on multiple fuzzy online conversation text training templates and represents the typical features or clustering centers of this sentiment polarity in fuzzy texts. Next, the computer system calculates the error between the first text representation vector and the fuzzy clustering representative representation vector. This error reflects the distance or similarity difference between the clear text and the fuzzy text clustering center and is a key indicator for measuring the model's understanding ability of the relationship between clear and fuzzy texts. The error can be calculated using various methods, such as Euclidean distance, cosine similarity, etc. Taking Euclidean distance as an example, the calculation formula can refer to the output value Lc of the above first clustering centroid evaluation function, which will not be elaborated here.
[0192] For example, assume there is a sentiment analysis model for analyzing the sentiment tendency in customer feedback. The model has defined three sentiment polarities: positive, negative, and neutral, and has been preliminarily trained based on a large number of training templates of clear and fuzzy online conversation texts.
[0193] For example, there is a clear customer feedback text: "This product has excellent performance and I am very satisfied." At the same time, the fuzzy clustering representative feature vector corresponding to the positive sentiment polarity is also known. To evaluate the model's understanding ability of the relationship between clear text and fuzzy text, step S200 is executed.
[0194] First, the computer system extracts the first text feature vector of the clear text through the basic feature information extraction branch component. Then, the computer system calculates the Euclidean distance between this vector and the fuzzy clustering representative feature vector corresponding to the positive sentiment polarity. Assuming the calculated Euclidean distance is small (for example, less than a preset threshold), it indicates that the distance between the clear text and the fuzzy text clustering center is close, and the model's understanding of the relationship between clear text and fuzzy text is relatively accurate. On the contrary, if the Euclidean distance is large, it indicates that the model's understanding ability in this aspect needs to be improved.
[0195] Through the execution and result analysis of step S200, the model's understanding ability of the relationship between clear and fuzzy texts can be evaluated more accurately, and it can provide guidance for subsequent model optimization. This is of great significance for improving the accuracy and robustness of the sentiment analysis model, and helps enterprises better understand customer needs, optimize service quality, and enhance market competitiveness.
[0196] Step S60, based on the first evaluation function, the second evaluation function, and the feature vector distribution evaluation function, adjusts the parameters of the basic feature information extraction branch component and the basic emotion polarity classification branch component to obtain the emotion polarity classification component, which may include:
[0197] Step S601: Based on the first evaluation function, the second evaluation function, the second clustering centroid evaluation function, and the feature vector distribution evaluation function, adjust the parameters of the basic feature information extraction branch component and the basic emotion polarity classification branch component to obtain the emotion polarity classification component.
[0198] In the embodiment of the present application, the optimization of the sentiment analysis model is crucial for improving the customer experience and service quality. Step S601 describes how to comprehensively use multiple evaluation functions to adjust the parameters of the core components of the sentiment analysis model to obtain a more accurate and robust emotion polarity classification component.
[0199] In step S601, the computer system calculates four key evaluation functions: the first evaluation function, the second evaluation function, the second clustering centroid evaluation function, and the representation vector distribution evaluation function. These functions evaluate the performance of the sentiment analysis model from different perspectives.
[0200] The first evaluation function and the second evaluation function are calculated respectively based on the errors between the sentiment polarity classification results of clear text and fuzzy text and the true labels, and are used to evaluate the classification accuracy of the model for these two types of text.
[0201] The second clustering centroid evaluation function evaluates the model's ability to understand the relationship between clear text and fuzzy text by calculating the error between the clear text representation vector and the fuzzy text clustering center.
[0202] The representation vector distribution evaluation function measures the distribution difference between these two types of text in the model based on the position error of the representation vectors of clear text and fuzzy text in the feature space.
[0203] After obtaining the output values of these four evaluation functions, the computer system starts to use these values to adjust the parameters of the basic representation information extraction branch component and the basic emotion polarity classification branch component. This process usually involves the training and optimization algorithms of machine learning models, such as the gradient descent method.
[0204] Specifically, the computer system will gradually adjust parameters such as the weights and bias terms of the model to minimize the output values of these four evaluation functions. This means that the system tries to make the model more accurate in classifying clear and fuzzy text, while better understanding the relationship between clear text and fuzzy text, and optimizing the distribution of these two types of text in the feature space. For example, assume there is a sentiment analysis model used to analyze the sentiment tendency in customer online conversations. The model has been preliminarily trained with a large amount of training data, but in actual application, it is found that its ability to process fuzzy text is limited, and its understanding of the relationship between clear text and fuzzy text is not accurate enough.
[0205] To optimize the performance of the model, the method of step S601 is adopted. First, the output values of the four evaluation functions are calculated, and it is found that the value of the second clustering centroid evaluation function is relatively high, indicating that there is a large error in the model's understanding of the relationship between clear text and fuzzy text.
[0206] Next, based on the output values of these four evaluation functions, optimization algorithms such as the gradient descent method are used to adjust the parameters of the basic feature information extraction branch component and the basic emotion polarity classification branch component. Through multiple iterations of optimization, a new emotion polarity classification component is obtained. Compared with the model before optimization, the new emotion polarity classification component shows higher accuracy when processing fuzzy texts, and also has a more accurate understanding of the relationship between clear texts and fuzzy texts. This means that the model can better capture the emotional tendencies in the texts, providing more accurate and reliable sentiment analysis results for enterprises. This is of great significance for improving customer satisfaction, optimizing service quality, and enhancing the competitiveness of enterprises.
[0207] As an implementation manner, step S10 of determining the training template binary group from the online conversation text training template may specifically include:
[0208] Step S11: For a target online conversation text training template, if the corresponding training template binary group cannot be determined based on the target online conversation text training template, and at the same time the target online conversation text training template is the clear online conversation text training template, then a text mask character sequence is generated based on the text paragraph of the emotional expression in the clear online conversation text training template to obtain the fuzzy online conversation text training template corresponding to the clear online conversation text training template, and the text mask character sequence is used for local masking processing of the text paragraph of the emotional expression.
[0209] In the embodiments of the present application, the training of the sentiment analysis model requires sufficient training data, especially online conversation texts containing clear and fuzzy emotional expressions. However, in practical applications, there are usually more texts with clear expressions and relatively fewer texts with fuzzy expressions. To make up for this deficiency, step S11 provides an effective method, that is, generating a fuzzy online conversation text training template from a clear online conversation text training template to enrich the training data set. In step S11, the computer system identifies a target online conversation text training template. If this template is a clear online conversation text training template (i.e., the emotional expression is clear), and the system currently cannot find the corresponding fuzzy text for it to form a training template binary group, the computer system will start the process of generating fuzzy text.
[0210] Specifically, the computer system analyzes key paragraphs of emotional expressions in clear text. These paragraphs usually contain words or sentence structures that directly express emotional tendencies. Once these key paragraphs are identified, the computer system generates a sequence of text mask characters. The purpose of this sequence is to locally mask the text paragraphs of emotional expressions, making the originally clear emotional expressions become blurred. The masking process can be carried out in various ways, such as replacing key words or masking part of the text. For example, suppose there is a clear online conversation text training template: "The performance of this product is very excellent, and I am very satisfied." The system may identify "the performance is very excellent" as the key paragraph of emotional expression. To generate blurred text, the computer system may replace "very excellent" with "acceptable", or simply mask part of the words with "", such as "The performance of this product *, and I am very satisfied." In this way, the emotional expression of the original clear text becomes relatively blurred, but still retains the original emotional polarity.
[0211] Through step S11, the computer system can automatically generate corresponding blurred text from a large number of clear online conversation text training templates, thereby constructing a rich training data binary group. This not only helps to improve the processing ability of the emotional analysis model for blurred text, but also enhances the generalization performance of the model, making it more accurate and reliable in practical applications. In the embodiments of this application, this data enhancement technology is of great significance for optimizing the customer experience and improving the service quality.
[0212] Step S12: If the target online conversation text training template is the blurred online conversation text training template, determine the masked text paragraph and the unmasked text paragraph of the text paragraph of the emotional expression in the blurred online conversation text training template; based on the text paragraph of the emotional expression in the unmasked text paragraph, reconstruct the text paragraph of the emotional expression in the masked text paragraph to obtain the clear online conversation text training template corresponding to the blurred online conversation text training template.
[0213] In the embodiments of this application, when processing the blurred online conversation text training template, step S12 provides an effective method to generate the corresponding clear online conversation text training template. This is of great significance for enriching the training data set of the emotional analysis model and improving the processing ability of the model for clear text. In step S12, the computer system identifies a target online conversation text training template and determines that this template is a blurred online conversation text training template (that is, text with unclear or blurred emotional expressions). Then, the computer system analyzes the emotional expression in this blurred text to determine which text paragraphs are the key parts of the emotional expression and which are the masked or blurred parts.
[0214] Specifically, the computer system will search for text paragraphs in the fuzzy text that may contain sentiment information. These paragraphs may have unclear sentiment expressions due to the use of veiled expressions, slang, typos, etc. Then, the computer system will classify these paragraphs into two categories: masked text paragraphs and unmasked text paragraphs. Masked text paragraphs refer to those parts where the sentiment information is directly blurred, such as replacing words with emojis, using abbreviations or slang, etc.; while unmasked text paragraphs refer to those text parts that can still relatively clearly express sentiment despite the overall text being fuzzy. Once the masked text paragraphs and unmasked text paragraphs are determined, the computer system will attempt to reconstruct the masked text paragraphs based on the sentiment expression information in the unmasked text paragraphs, thereby obtaining the corresponding clear online conversation text training template. This process may involve operations such as parsing, replacing, or complementing fuzzy expressions.
[0215] For example, suppose there is a fuzzy online conversation text training template: "This thing feels pretty good, but there are some *s that need improvement." In this example, "This thing" and "*s" are masked text paragraphs, while "feels pretty good" is an unmasked text paragraph that can relatively clearly express positive sentiment. To reconstruct the clear text, the computer system may replace "This thing" with a specific product name (such as "This product"), and complete "*s" with a specific description (such as "functions"), thus obtaining the clear text: "This product feels pretty good, but some functions need improvement."
[0216] Through step S12, the computer system can effectively generate the corresponding clear text from the fuzzy online conversation text training template, further enriching the training data set of the sentiment analysis model. This not only helps to improve the model's processing ability for clear text, but also enhances the model's understanding ability for fuzzy text, making it more accurate and reliable in practical applications. In the embodiments of this application, this data enhancement technology is of great significance for optimizing the customer experience and improving the service quality.
[0217] As an implementation manner, for the purpose of improving the debugging efficiency, the method provided in the embodiments of this application further includes a pre-training process:
[0218] Step S1: Based on the branch component for extracting the characterization information to be debugged, obtain the first text characterization vector of the clear online conversation text training template and the second text characterization vector of the fuzzy online conversation text training template.
[0219] In the embodiments of this application, the pre-training of the sentiment analysis model is a key way to improve the model performance. Step S1 is responsible for extracting text representation vectors from clear and fuzzy online conversation text training templates, providing a basis for subsequent sentiment polarity classification. In step S1, the computer system uses the representation information extraction branch component to be debugged to process the clear online conversation text training template and the fuzzy online conversation text training template. This component is usually a pre-trained deep learning model, such as a convolutional neural network (CNN) or a recurrent neural network (RNN), which can automatically extract key information from the text and transform it into a text representation vector in numerical form.
[0220] For a clear online conversation text training template, such as "The performance of this product is very good, and I am very satisfied.", the representation information extraction branch component will analyze the vocabulary, grammar, and semantic features in the text and transform them into a vector representation of a fixed dimension, that is, the first text representation vector. This vector captures the key information in the text, such as product performance, satisfaction, etc., providing an important basis for subsequent sentiment polarity classification.
[0221] For a fuzzy online conversation text training template, such as "This thing feels okay.", due to its relatively fuzzy expression, the representation information extraction branch component needs to process it more carefully. The component will try to parse the veiled expressions, slang, or abbreviations in the text and extract the key features that can reflect the sentiment tendency of the text. Then, these features are transformed into the second text representation vector, although there may be certain differences or uncertainties compared with the vector of the clear text.
[0222] For example, assume that an enterprise has collected a large amount of online conversation text data, including text with clear positive sentiment (such as product positive reviews) and text with fuzzy sentiment (such as short evaluations in customer feedback). To train a model that can accurately identify the sentiment polarity of the text, the enterprise decides to adopt the pre-training method.
[0223] In step S1, the computer system uses the representation information extraction branch component to process the clear and fuzzy online conversation text training templates. For the clear text "The performance of this product is very good, and I am very satisfied.", the component extracts the key features and transforms them into the first text representation vector, such as [0.8, 0.2, 0.1,...], where each value represents the intensity of a certain feature or attribute in the text. For the fuzzy text "This thing feels okay.", the component also extracts features and transforms them into the second text representation vector, but due to the fuzziness of the text expression, this vector may be different from the vector of the clear text, such as [0.6, 0.3, 0.2,...].
[0224] Through the processing of step S1, the computer system obtains text representation vectors corresponding to clear and fuzzy online conversation texts. These vectors will serve as the basic data for subsequent sentiment polarity classification, helping the model better understand and identify the sentiment tendency in the text.
[0225] Step S2: Based on the first text representation vector, obtain the first basic sentiment polarity classification result corresponding to the clear online conversation text training template based on the sentiment polarity classification branch component to be debugged. Based on the second text representation vector, obtain the second basic sentiment polarity classification result corresponding to the fuzzy online conversation text training template based on the sentiment polarity classification branch component to be debugged.
[0226] In the embodiment of the present application, the pre-training process of the sentiment analysis model not only involves the extraction of text representations, but also includes the preliminary classification of text sentiment polarity. Step S2 performs sentiment polarity classification on the clear and fuzzy online conversation text training templates based on the sentiment polarity classification branch component to be debugged, so as to obtain the basic sentiment polarity classification results.
[0227] In step S2, the computer system uses the first text representation vector of the clear online conversation text and the second text representation vector of the fuzzy online conversation text obtained in step S1 as inputs. These representation vectors capture the key information in the text and are the basis for sentiment polarity classification.
[0228] Next, the computer system inputs these representation vectors into the sentiment polarity classification branch component to be debugged. This component is usually a machine learning model that has been preliminarily trained, such as a multi-layer perceptron (MLP), a support vector machine (SVM), or a deep neural network (DNN). This model is responsible for mapping the text representation vectors to predefined sentiment polarity categories, such as positive, negative, or neutral. For the first text representation vector of the clear online conversation text, the sentiment polarity classification branch component will output a corresponding sentiment polarity classification result, that is, the first basic sentiment polarity classification result, based on the key features and information it contains. Since the expression of the clear text is clear, this classification result usually has a high accuracy.
[0229] For the second text representation vector of the fuzzy online conversation text, due to its relatively fuzzy expression, the sentiment polarity classification branch component will face certain challenges in classification. However, through training and optimization, this component can still attempt to perform sentiment polarity classification on the fuzzy text and output a corresponding second basic sentiment polarity classification result. Although there may be certain errors or uncertainties in this classification result, it still provides an important basis for subsequent model debugging and optimization.
[0230] For example, assume that an enterprise has a sentiment analysis model for identifying the sentiment tendency in customer feedback. To improve the performance of the model, the enterprise decides to pre-train the model. In step S2, the computer system obtains the first text representation vector of the clear online conversation text "The performance of this product is very good. I am very satisfied." and the second text representation vector of the fuzzy online conversation text "This thing feels okay."
[0231] Next, the computer system inputs these two representation vectors into the sentiment polarity classification branch component to be debugged. For the clear text, the component outputs a basic classification result of positive sentiment because the text clearly expresses satisfaction and positive evaluation. For the fuzzy text, although the expression is relatively vague, the component still attempts to classify it and outputs a basic classification result that may be positive or neutral (specifically depending on the training and optimization of the model).
[0232] Through the processing in step S2, the computer system obtains the basic sentiment polarity classification results corresponding to the clear and fuzzy online conversation texts. These results will serve as the basic data for subsequent model debugging and optimization, helping the enterprise better understand the performance of the model and make targeted optimizations and improvements.
[0233] Step S3: Determine the first pre-debugging (i.e., pre-training) evaluation function and the second pre-debugging evaluation function according to the errors between the first basic sentiment polarity classification result and the second basic sentiment polarity classification result and the prior sentiment polarity markers respectively.
[0234] In the embodiment of the present application, step S3 determines two key evaluation functions - the first pre-debugging evaluation function and the second pre-debugging evaluation function according to the errors between the basic sentiment polarity classification results of the clear and fuzzy online conversation texts by the model and the true sentiment polarity markers. These two evaluation functions, also known as loss functions, are used to quantify the performance of the model in the pre-training stage and guide subsequent model parameter adjustment.
[0235] In step S3, the computer system obtains the first basic sentiment polarity classification result of the clear online conversation text and the second basic sentiment polarity classification result of the fuzzy online conversation text. These classification results are obtained based on the processing of the text representation vectors by the sentiment polarity classification branch component to be debugged. At the same time, the computer system also knows the prior sentiment polarity markers corresponding to each text training template, which are the true sentiment polarities manually marked and used to measure the accuracy of the model classification results.
[0236] Next, the computer system calculates the error between each basic sentiment polarity classification result and the corresponding prior sentiment polarity label. This error is usually measured using a loss function, and the choice of the loss function depends on the specific task requirements and model structure. In sentiment analysis tasks, commonly used loss functions include Cross-Entropy Loss, etc.
[0237] Taking Cross-Entropy Loss as an example, the calculation formulas for the first pre-debug evaluation function (i.e., the first loss function) and the second pre-debug evaluation function (i.e., the second loss function) can be expressed as follows:
[0238]
[0239]
[0240] where: N1 and N2 represent the number of clear texts and fuzzy texts respectively.
[0241] and represent the prior sentiment polarity labels of clear texts and fuzzy texts respectively, usually in one-hot encoding form. For example, a positive sentiment is [1,0], and a negative sentiment is [0,1]. and represent the probability distributions of the sentiment polarities predicted by the model for clear texts and fuzzy texts respectively. For example, assume that an enterprise has a sentiment analysis model for analyzing the sentiment tendency in customer feedback. In the pre-training stage, the sentiment polarity predicted by the model for the clear text "The performance of this product is very good, and I am very satisfied." is positive (assuming the probability distribution is [0.95, 0.05]), and the true sentiment polarity prior label of this text is also positive ([1,0]). For the fuzzy text "This thing feels okay.", the sentiment polarity predicted by the model may be positive or neutral (assuming the probability distribution is [0.6, 0.4]), and the true label is also positive ([1,0]).
[0242] Based on this information and the calculation formula of the Cross-Entropy Loss function, the computer system can calculate the values of the first pre-debug evaluation function and the second pre-debug evaluation function. These values reflect the accuracy of the model in classifying the sentiment polarities of clear and fuzzy texts in the pre-training stage and are important bases for subsequent model parameter adjustment. By minimizing the values of these two evaluation functions, the computer system can gradually optimize the performance of the model to make it more adaptable to the requirements of the actual business scenario.
[0243] Step S4: Based on the first pre-debugging evaluation function and the second pre-debugging evaluation function, adjust the parameters of the characterization information extraction branch component to be debugged and the emotion polarity classification branch component to be debugged, so as to obtain the basic characterization information extraction branch component and the basic emotion polarity classification branch component.
[0244] In the embodiment of the present application, during the pre-training process of the sentiment analysis model, in step S4, based on the first pre-debugging evaluation function and the second pre-debugging evaluation function calculated in the previous steps, the parameters of the characterization information extraction branch component and the emotion polarity classification branch component to be debugged are adjusted, so as to obtain the optimized basic characterization information extraction branch component and the basic emotion polarity classification branch component. In step S4, the computer system reviews the values of the first pre-debugging evaluation function and the second pre-debugging evaluation function calculated in step S3. These two evaluation functions respectively measure the sentiment polarity classification performance of the model on clear text and fuzzy text, and their values reflect the error between the model prediction result and the true sentiment polarity label. Then, the computer system uses the output values of these evaluation functions as a guide to adjust the parameters of the characterization information extraction branch component and the emotion polarity classification branch component to be debugged. This process usually involves the training and optimization algorithms of machine learning models, such as Gradient Descent or its variants.
[0245] During the parameter adjustment process, the computer system will gradually adjust parameters such as the weights and bias terms of the model according to the output values of the evaluation functions to minimize the values of the evaluation functions. This means that the system tries to make the model more accurate in classifying clear and fuzzy texts, thereby improving the performance of the entire sentiment analysis model. Specifically, if the value of the first pre-debugging evaluation function is high (i.e., the classification error of the model on clear text is large), the computer system may increase the ability of the characterization information extraction branch component to extract key features of clear text, or adjust the classification threshold of the emotion polarity classification branch component for clear text. Similarly, if the value of the second pre-debugging evaluation function is high (i.e., the classification error of the model on fuzzy text is large), the computer system may optimize the processing ability of the characterization information extraction branch component for fuzzy text, or adjust the classification strategy of the emotion polarity classification branch component for fuzzy text.
[0246] For example, assume that an enterprise has a sentiment analysis model for analyzing the sentiment tendency in customer online conversations. During the pre-training stage, the computer system calculates the values of the first pre-debugging evaluation function and the second pre-debugging evaluation function, and finds that the classification error of the model on fuzzy text is large.
[0247] To optimize the performance of the model on fuzzy texts, the computer system adjusted the parameters of the feature information extraction branch component and the sentiment polarity classification branch component in step S4. Specifically, the computer system enhanced the ability of the feature information extraction branch component to extract key features such as implicit expressions and slang in fuzzy texts. Meanwhile, it adjusted the classification threshold of the sentiment polarity classification branch component for fuzzy texts to be more lenient to accommodate the uncertainty of fuzzy expressions. After multiple iterations of optimization, the computer system obtained the optimized basic feature information extraction branch component and the basic sentiment polarity classification branch component. These components can converge to the optimal solution faster during subsequent formal training and exhibit better performance in practical applications, especially being able to more accurately identify the sentiment tendency when dealing with fuzzy texts.
[0248] An embodiment of this application provides a computer system, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements some or all of the steps in the above method.
[0249] Figure 2 The following is a schematic diagram of the hardware entity of a computer system provided by an embodiment of this application, as Figure 2 shown. The hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002. Among them, the memory 1002 stores a computer program that can run on the processor 1001. When the processor 1001 executes the program, it implements the steps in the method of any of the above embodiments. The memory 1002 stores a computer program that can run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001, and can also cache data to be processed or already processed by the processor 1001 and each module in the computer system 1000 (such as image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). When the processor 1001 executes the program, it implements the steps of the enterprise business management method based on big data in any of the above items. The processor 1001 generally controls the overall operation of the computer system 1000.
Claims
1. An enterprise business management method based on big data, characterized in that, The method includes: Determine training template pairs from the online session text training templates. The training template pairs include clear online session text training templates with clear emotional semantic representations and fuzzy online session text training templates with unclear emotional semantic representations. The clear online session text training templates and the fuzzy online session text training templates have the same prior emotional polarity markers, which are used to indicate the same target emotional polarity; Based on the basic representation information extraction branch component, obtain the first text representation vector of the clear online session text training template and the second text representation vector of the fuzzy online session text training template in the training template pairs; Based on the representation vector position error of the first text representation vector and the second text representation vector in the representation vector domain, determine the representation vector distribution evaluation function; wherein, the representation vector position error is the difference in the vector dispersion coefficients of the first text representation vector and the second text representation vector in the representation vector domain; Based on the first text representation vector, obtain the first emotional polarity classification result corresponding to the clear online session text training template based on the basic emotional polarity classification branch component. Based on the second text representation vector, obtain the second emotional polarity classification result corresponding to the fuzzy online session text training template based on the basic emotional polarity classification branch component; According to the errors between the first emotional polarity classification result and the second emotional polarity classification result and the prior emotional polarity marker respectively, determine the first evaluation function and the second evaluation function; Based on the first evaluation function, the second evaluation function and the representation vector distribution evaluation function, adjust the parameters of the basic representation information extraction branch component and the basic emotional polarity classification branch component to obtain an emotional polarity classification component, which is used to detect the emotional polarity of the online session text to be analyzed.
2. The method according to claim 1, characterized in that, The representation vector position error is obtained based on the following operations: Transform the first text representation vector into the first vector dispersion coefficient in the representation vector domain, and transform the second text representation vector into the second vector dispersion coefficient in the representation vector domain; Based on the first vector dispersion coefficient and the second vector dispersion coefficient, determine the representation vector position error; Or; The representation vector position error is obtained based on the following operations: When obtaining the first text representation vector of the clear online session text training template and the second text representation vector of the fuzzy online session text training template in the training template pairs based on the basic representation information extraction branch component, obtain the activation representation vectors of the intermediate network and the classification network in the basic representation information extraction branch component based on the automated model structure selection mechanism; Based on the activation representation vectors, determine the target network in the intermediate network and the classification network for obtaining the representation vector position error; Determine the representation vector position error based on the first pseudo-operation representation vector and the second pseudo-operation representation vector output by the target network. The first pseudo-operation representation vector is the representation vector obtained by the target network based on the execution of the clear online conversation text training template, and the second pseudo-operation representation vector is the representation vector obtained by the target network based on the execution of the fuzzy online conversation text training template.
3. The method according to claim 2, wherein If the target network is the target intermediate network among multiple intermediate networks of the basic representation information extraction branch component, the determination of the representation vector position error based on the first pseudo-operation representation vector and the second pseudo-operation representation vector output by the target network includes: Obtain the first hidden representation vector of the clear online conversation text training template and the second hidden representation vector of the fuzzy online conversation text training template in the target intermediate network of the basic representation information extraction branch component; Determine the representation vector position error based on the first hidden representation vector and the second hidden representation vector.
4. The method according to claim 1, characterized in that The obtaining of the first emotion polarity classification result corresponding to the clear online conversation text training template based on the first text representation vector by the basic emotion polarity classification branch component includes: Obtain the clear clustering representative representation vectors corresponding to several emotion polarities that can be detected by the basic emotion polarity classification branch component. The several emotion polarities include the target emotion polarity, and the clear clustering representative representation vector corresponding to the target emotion polarity is obtained based on multiple clear online conversation text training templates; Based on the first text representation vector and the clear clustering representative representation vectors corresponding to the several emotion polarities respectively, determine the first detection confidence levels of the clear online conversation text training template corresponding to the several emotion polarities respectively by the basic emotion polarity classification branch component; Determine the first emotion polarity classification result based on the first detection confidence levels.
5. The method according to claim 4, characterized in that, The method further includes: Determine the first clustering centroid evaluation function based on the error between the second text representation vector and the clear clustering representative representation vector corresponding to the target emotion polarity; The parameter adjustment of the basic representation information extraction branch component and the basic emotion polarity classification branch component based on the first evaluation function, the second evaluation function, and the representation vector distribution evaluation function to obtain the emotion polarity classification component includes: Based on the first evaluation function, the second evaluation function, the first clustering centroid evaluation function, and the representation vector distribution evaluation function, perform parameter adjustment on the basic representation information extraction branch component and the basic emotion polarity classification branch component to obtain the emotion polarity classification component.
6. The method according to claim 1, wherein The obtaining of the second emotion polarity classification result corresponding to the fuzzy online conversation text training template based on the second text representation vector by the basic emotion polarity classification branch component includes: Obtain the fuzzy clustering representative representation vectors corresponding to several emotional polarities detectable by the basic emotional polarity classification branch component, where the several emotional polarities include the target emotional polarity, and the fuzzy clustering representative representation vector corresponding to the target emotional polarity is obtained based on a plurality of the fuzzy online conversation text training templates; Based on the second text representation vector and the clustering centroid representation vectors corresponding to the several emotional polarities respectively, determine the second detection confidence levels of the fuzzy online conversation text training templates corresponding to the several emotional polarities respectively based on the basic emotional polarity classification branch component; Determine the second emotional polarity classification result based on the second detection confidence levels; 7. The method according to claim 6, characterized in that, The method further includes: Determine a second clustering centroid evaluation function based on the error between the first text representation vector and the fuzzy clustering representative representation vector corresponding to the target emotional polarity; The parameter adjustment of the basic representation information extraction branch component and the basic emotional polarity classification branch component based on the first evaluation function, the second evaluation function, and the representation vector distribution evaluation function to obtain an emotional polarity classification component includes: Based on the first evaluation function, the second evaluation function, the second clustering centroid evaluation function, and the representation vector distribution evaluation function, perform parameter adjustment on the basic representation information extraction branch component and the basic emotional polarity classification branch component to obtain the emotional polarity classification component; 8. The method according to claim 1, wherein The determining of the training template binary group from the online conversation text training templates includes: For a target online conversation text training template, if the corresponding training template binary group cannot be determined based on the target online conversation text training template, and at the same time the target online conversation text training template is the clear online conversation text training template, then generate a text mask character sequence based on the text paragraph of the emotional expression in the clear online conversation text training template to obtain the fuzzy online conversation text training template corresponding to the clear online conversation text training template, and the text mask character sequence is used for local masking processing of the text paragraph of the emotional expression; If the target online conversation text training template is the fuzzy online conversation text training template, then determine the masked text paragraph and the non-masked text paragraph of the text paragraph of the emotional expression in the fuzzy online conversation text training template; based on the text paragraph of the emotional expression in the non-masked text paragraph, reconstruct the text paragraph of the emotional expression in the masked text paragraph to obtain the clear online conversation text training template corresponding to the fuzzy online conversation text training template; 9. The method according to claim 1, characterized in that The method further includes: Based on the representation information extraction branch component to be debugged, obtain the first text representation vector of the clear online conversation text training template and the second text representation vector of the fuzzy online conversation text training template; Based on the first text representation vector, a first basic emotion polarity classification result corresponding to the clear online conversation text training template is obtained based on the emotion polarity classification branch component to be debugged. Based on the second text representation vector, a second basic emotion polarity classification result corresponding to the fuzzy online conversation text training template is obtained based on the emotion polarity classification branch component to be debugged; According to the errors between the first basic emotion polarity classification result and the second basic emotion polarity classification result and the prior emotional polarity labels respectively, a first pre-debugging evaluation function and a second pre-debugging evaluation function are determined; Based on the first pre-debugging evaluation function and the second pre-debugging evaluation function, parameter adjustment is performed on the representation information extraction branch component to be debugged and the emotion polarity classification branch component to be debugged, and the basic representation information extraction branch component and the basic emotion polarity classification branch component are obtained.
10. A computer system, comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Employee management system and application
CN113035193A
Method and system for automated sentiment classification
US20230325604A1