Language analysis method and system based on deep learning language model

Through the preprocessing, anomaly detection and repair methods of deep learning language models, combined with convolutional neural networks and visual interfaces, the identification and repair of abnormal data in social media data is solved, and the accuracy and stability of language analysis is improved, especially in sentiment analysis.

CN120409473AInactive Publication Date: 2025-08-01SHENZHEN ZHONGHE JUNDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510285654.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing anomaly detection and data cleaning methods have limitations when processing social media data, especially when identifying and repairing abnormal data. Traditional methods lack effective feature modeling and optimization methods, resulting in inaccurate repaired data and affecting the final sentiment analysis results.

Method used

Through a deep learning language model method, text data is preprocessed, abnormal detection and repaired, language analysis is performed using convolutional neural network, combined with visual interface to display the results, and data repair is performed through information entropy and neighborhood optimization methods, Gaussian kernel function and cubic spline basis function are constructed for feature extraction and fitting, and convolutional neural network is used for emotional classification.

Benefits of technology

It improves the quality of text data, reduces the interference of abnormal data on normal data, improves the accuracy and stability of the language analysis model, enhances the ability to identify and repair abnormal data, and improves the accuracy of sentiment analysis and the reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409473A_ABST
    Figure CN120409473A_ABST
Patent Text Reader

Abstract

The invention discloses a language analysis method and system based on a deep learning language model, and relates to the technical field of natural language processing, and the method comprises the steps: collecting and preprocessing text data, and carrying out the anomaly detection based on the preprocessed text data; repairing the detected abnormal data, generating a repaired data set, and constructing a convolutional neural network (CNN) model to perform language analysis on text vectors in the repaired data set; and constructing a visual interface to display a language analysis result, and storing, collecting and analyzing text data generated. A cubic spline primary function and a second-order difference matrix method are combined, the fine processing capacity of text data is enhanced, the quality of the text data is improved by using calculation of an abnormal probability and a global abnormal score, a repair value is dynamically adjusted by using a weighted inverse scaling formula, interference of abnormal data on a model result is reduced, and the accuracy of the model result is improved. And the accuracy and robustness of the sentiment analysis result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a language analysis method and system based on a deep learning language model. Background Art

[0002] With the popularization of social media and online platforms, user-generated content has become an important data source for obtaining social emotions, public opinion trends, and consumer opinions. These text data contain rich information and can provide profound insights for market analysis, sentiment analysis, public opinion monitoring, etc. Traditional language analysis methods usually rely on manual feature extraction and simple rule matching when dealing with a large amount of heterogeneous and unstructured text data, and the effect is limited. With the continuous development of deep learning technology, language models based on neural networks have gradually become the mainstream methods in the field of text analysis. In particular, convolutional neural networks (CNNs), recurrent neural networks (RNNs), and the Transformer architecture have shown excellent performance in tasks such as text classification and sentiment analysis. These methods can automatically learn semantic features in the text and better solve the complexity and multiplicity problems in text data.

[0003] Deep learning language models still have certain deficiencies in the existing technology. Existing anomaly detection and data cleaning methods have certain limitations when dealing with social media data. Especially when identifying and repairing abnormal data, traditional methods lack effective feature modeling and optimization means, which easily lead to inaccurate repaired data and thus affect the final sentiment analysis results. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a language analysis method and system based on a deep learning language model to solve the problem that existing anomaly detection and data cleaning methods have certain limitations when dealing with social media data. Especially when identifying and repairing abnormal data, traditional methods lack effective feature modeling and optimization means, which easily lead to inaccurate repaired data and thus affect the final sentiment analysis results.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a language analysis method based on a deep learning language model, which includes collecting text data and performing preprocessing, performing anomaly detection based on the preprocessed text data; repairing the detected abnormal data to generate a repaired data set, constructing a convolutional neural network CNN model to perform language analysis on the text vectors in the repaired data set; constructing a visualization interface to display the language analysis results, and storing the text data collected and analyzed.

[0007] As a preferred solution of the language analysis method based on a deep learning language model according to the present invention, wherein: collecting text data and performing preprocessing means collecting text data from a social media platform using an open APL interface and performing preprocessing; The text data includes a release time, text content, and a user ID; Using regular expressions to clean the text data, converting the text data to lowercase using text normalization, identifying and deleting duplicate data using a hash value deduplication method, performing word segmentation processing using an optimal word segmentation method with bidirectional matching, performing matching and deleting stop words using a stop word list, mapping the word segmentation results after deleting stop words to text vectors using a pre-trained word embedding model GloVe, stacking the text vectors to generate a text vector matrix, and normalizing the text vector matrix.

[0008] As a preferred solution of the language analysis method based on a deep learning language model according to the present invention, wherein: performing anomaly detection based on the preprocessed text data means setting a global neighborhood number A using an inflection point detection method, calculating the Euclidean distance of text vectors in the normalized text vector matrix using the Euclidean distance formula, sorting the Euclidean distances of the text vectors from smallest to largest, and selecting the Euclidean distances of the smallest A text vectors to form a global neighborhood set; Calculating the average value of the text vectors in the global neighborhood set to obtain the neighborhood geometric center , where i is the index of the data point; Calculating the Euclidean distance from the text vector to the neighborhood geometric center, defined as the geometric deviation ; Combining the text vector and the geometric deviation to generate an enhanced feature vector , with the formula: ; where is the text vector of the i-th data point, stacking the enhanced feature vectors to generate an enhanced feature matrix ; Calculating the average distance of the Euclidean distances in the global neighborhood set, set as the kernel width ; Using a Gaussian kernel function to map the enhanced feature matrix to the kernel space, calculating the elements of the kernel feature matrix to generate a kernel feature matrix ; Based on the kernel feature matrix, calculating spline nodes using an equidistant node division method ; Construct the corresponding cubic spline basis functions based on the spline nodes and record the responses of the cubic spline basis functions , where is the response of the i-th data point to the r-th cubic spline basis function. Generate the basis function matrix B using the spline response matrix generation method; Based on the cubic spline basis functions, calculate the elements of the second-order difference matrix using the second-order derivative integration method , generate the second-order difference matrix D, and the formula is: ; where and are the maximum and minimum values of the spline nodes respectively, T is the characteristic coordinate of the data point in the kernel space, and are the cubic spline basis functions of the r-th and o-th splines respectively; Set the regularization parameter using the Akaike information criterion ; Based on the enhanced feature matrix , the basis function matrix B, and the second-order difference matrix D, construct the objective function , and the formula is: ; where is the linear combination of the cubic spline basis functions, is the spline coefficient, and p is the transpose operator symbol; Solve for the optimal spline coefficient using the least squares method; Calculate the fitted value of the i-th data point using the optimal spline coefficient , and the formula is: ; where m is the number of cubic spline basis functions, is the r-th optimal spline coefficient, is the characteristic coordinate of the i-th data point in the kernel space; Calculate the data residual of the i-th data point based on the difference between the fitted value and the geometric deviation degree in the enhanced feature matrix; Calculate the hat matrix H based on the basis function matrix B and the second-order difference matrix D, and the formula is: ; Based on the data residual and the hat matrix H, calculate the standardized residual , and construct the residual matrix E using the residual matrix generation method; For each column of the residual matrix E, calculate the probability density of the residuals in the u-th column using the probability density function , where x is the residual value; Based on the probability density of the residuals in the u-th column , calculate the anomaly probability using the anomaly probability calculation formula ; Based on the anomaly probability , calculate the global anomaly score of the i-th data point using the anomaly probability accumulation method; Set the anomaly threshold using the percentile method, compare the global anomaly score with the anomaly threshold, set the data points with a global anomaly score greater than or equal to the anomaly threshold as anomaly data, and set the data points with a global anomaly score less than the anomaly threshold as normal data; Traverse all data points to filter out anomaly data and generate an anomaly data set.

[0009] As a preferred solution of the language analysis method based on a deep learning language model according to the present invention, wherein: the repairing the detected anomaly data to generate a repaired data set means setting the number of anomaly neighborhoods using the neighborhood optimization method of information entropy , extracting the anomaly data from the anomaly data set, calculating the Euclidean distance between the anomaly data and the normal data using the Euclidean distance formula, sorting the Euclidean distances between the anomaly data and the normal data in ascending order, and selecting the smallest Euclidean distances between the anomaly data and the normal data to form a distribution neighborhood set; Calculate the average value of the data points in the distribution neighborhood set to obtain the centroid of the distribution neighborhood set ; Calculate the direction vector between the centroid and the anomaly data using the vector difference method; Based on the direction vector, generate a preliminary repair value using the linear repair method ; Calculate the average Euclidean distance value from the preliminary repair value to the neighborhood points in the distribution neighborhood set using the neighborhood average distance calculation method ; Based on the average Euclidean distance value , calculate the dynamic adjustment coefficient using the weighted inverse proportion scaling formula ; Based on the centroid and the preliminary repair value , adjust the preliminary repair value using the repair value adjustment method to obtain the final repair value , the formula is: ; Replace the corresponding anomaly data with the final repair value to generate a repaired data set.

[0010] As a preferred solution of the language analysis method based on the deep learning language model of the present invention, wherein: the construction of the convolutional neural network CNN model to perform language analysis on the text vectors in the repaired data set means collecting text data with labels and performing preprocessing to obtain text vectors after historical normalization processing, and generating a training set; Construct a convolutional neural network CNN model, including an input layer, a convolutional layer, a pooling layer, and a fully connected output layer; Define the input layer as the text vector after normalization processing; Use the training set to train the convolutional neural network CNN model, and use the loss function and the Adam optimizer to perform iterative optimization of the model parameters; Input the text vectors after normalization processing in the repaired data set into the trained convolutional neural network CNN model to obtain the probability of sentiment classification, and the sentiment classification includes positive and negative sentiments; Select the category with the highest probability as the language analysis result according to the probability of sentiment classification.

[0011] As a preferred solution of the language analysis method based on the deep learning language model of the present invention, wherein: the construction of the visualization interface to display the language analysis result means using the front-end framework React.js to construct the visualization interface, including a main chart area and a top information bar; Display the optimized language analysis result in the main chart area, and display the probability of sentiment classification in the top information bar; Allow users who have passed real-name verification to view.

[0012] As a preferred solution of the language analysis method based on the deep learning language model of the present invention, wherein: the storage of the text data generated by collection and analysis means storing the collected text data and the language analysis results generated by analysis in the central database, and setting security access measures. The central database performs cloud backup on the stored data, and regularly performs integrity detection on the stored data and the backup data. After the detection is completed, an integrity detection record is generated and synchronously stored in the central database.

[0013] In the second aspect, the present invention provides a language analysis system based on a deep learning language model, including, A collection and detection module, configured to collect text data and perform preprocessing, and perform anomaly detection based on the preprocessed text data; A repair and analysis module, configured to repair the detected abnormal data, generate a repaired data set, and construct a convolutional neural network CNN model to perform language analysis on the text vectors in the repaired data set; A visualization and storage module, configured to construct a visualization interface to display the language analysis result and store the text data generated by collection and analysis.

[0014] In a third aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and: when the computer program is executed by the processor, any step of the language analysis method based on a deep learning language model as described in the first aspect of the present invention is implemented.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and: when the computer program is executed by the processor, any step of the language analysis method based on a deep learning language model as described in the first aspect of the present invention is implemented.

[0016] The beneficial effects of the present invention are as follows: the present invention collects text data and performs preprocessing, performs anomaly detection based on the preprocessed text data; repairs the detected abnormal data to generate a set of repaired data, constructs a convolutional neural network (CNN) model to perform language analysis on the text vectors in the set of repaired data; improves the quality of text data, reduces the interference of abnormal data on normal data, and enhances the accuracy and stability of the language analysis model for deep learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for description in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is a flowchart of the language analysis method based on a deep learning language model in Embodiment 1.

[0019] Figure 2 It is a structural diagram of the language analysis system based on a deep learning language model in Embodiment 1. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To make the above objects, features, and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings of the specification.

[0021] Many specific details are set forth in the following description in order to provide a thorough understanding of the present invention. However, the present invention may be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0022] Second, the "one embodiment" or "embodiment" referred to herein means a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or alternative embodiments that exclude each other with other embodiments.

[0023] Embodiment 1, referring to Figure 1 and Figure 2 , is the first embodiment of the present invention. This embodiment provides a language analysis method based on a deep learning language model, including the following steps: S1. Collect text data and perform preprocessing, and perform anomaly detection based on the preprocessed text data; Specifically, collecting text data and performing preprocessing means collecting text data from a social media platform using an open APL interface and performing preprocessing; The text data includes the release time, text content, and user ID; The text data is cleaned using regular expressions, converted to lowercase using text normalization, duplicate data is identified and removed using the hash value deduplication method, word segmentation is performed using the optimal word segmentation method of bidirectional matching, stop words are matched and removed using a stop word list, the word segmentation results after removing stop words are mapped to text vectors using the pre-trained word embedding model GloVe, the text vectors are stacked to generate a text vector matrix, and the text vector matrix is normalized.

[0024] Collecting text data from a social media platform through an open APL interface and performing cleaning, normalization, deduplication, word segmentation, and mapping on the data can effectively improve the data quality. Through the hash value deduplication method, duplicate text data can be quickly and accurately identified and removed, ensuring the authenticity and representativeness of the analysis results. The optimal word segmentation method of bidirectional matching can analyze the text from different directions, avoiding the ambiguity problem caused by unidirectional word segmentation, improving the accuracy of word segmentation and the expressiveness of the language. By using a stop word list, irrelevant words can be effectively removed, reducing the noise interference during model training. The word embedding model improves the accuracy and richness of text representation by considering the context information of words. Especially when dealing with long texts or complex texts, the word embedding model can effectively improve the performance of the model, especially having significant advantages in tasks such as sentiment analysis and text classification. The normalized data not only improves the computational efficiency of the model but also enhances its convergence and prediction accuracy.

[0025] Further, anomaly detection based on the preprocessed text data means using the inflection point detection method to set the global neighborhood number A, calculating the Euclidean distance of the text vectors in the normalized text vector matrix using the Euclidean distance formula, sorting the Euclidean distances of the text vectors from smallest to largest, and selecting the Euclidean distances of the smallest A text vectors to form the global neighborhood set; Calculate the average value of the text vectors in the global neighborhood set to obtain the neighborhood geometric center , where i is the index of the data point; Calculate the Euclidean distance from the text vector to the neighborhood geometric center, defined as the geometric deviation , the formula is: ; where is the text vector of the i-th data point; Combine the text vector and the geometric deviation to generate an enhanced feature vector , the formula is: ; Stack the enhanced feature vectors to generate an enhanced feature matrix ; By using the inflection point detection method to set the global neighborhood number A and calculating the relationship of the text vectors according to the Euclidean distance, those texts that are significantly different from most data points can be effectively identified. Calculating the Euclidean distance (geometric deviation) from the text vector to the neighborhood geometric center and combining it with the original text vector can generate an enhanced feature vector containing more information, enhancing the model's ability to identify abnormal data and further improving the recognition accuracy of abnormal data; Calculate the average distance of the Euclidean distances in the global neighborhood set and set it as the kernel width ; Use the Gaussian kernel function to map the enhanced feature matrix to the kernel space and calculate the elements of the kernel feature matrix to generate a kernel feature matrix , the formula is: ; ; where is the Gaussian kernel function, and are the enhanced feature vectors of the i-th and j-th data points respectively; Based on the kernel feature matrix, use the equidistant node division method to calculate the spline nodes ; Construct the corresponding cubic spline basis functions based on the spline nodes and record the responses of the cubic spline basis functions , where is the response of the i-th data point to the r-th cubic spline basis function. Use the spline response matrix generation method to generate the basis function matrix B, and the formula is: ; where is the cubic spline basis function of the r-th spline, T is the characteristic coordinate of the data point in the kernel space, and the characteristic coordinate of the data point in the enhanced feature space is represented by the row vector of the enhanced feature matrix mapped by the Gaussian kernel function; Based on the cubic spline basis functions, use the second derivative integration method to calculate the elements of the second difference matrix , and generate the second difference matrix D. The formula is: ; where and are the maximum and minimum values of the spline nodes respectively, and are the cubic spline basis functions of the r-th and o-th splines respectively; Use the Akaike information criterion to set the regularization parameter ; Based on the enhanced feature matrix , the basis function matrix B, and the second difference matrix D, construct the objective function , and the formula is: ; where is the linear combination of the cubic spline basis functions, representing the fitted smooth function value, is the spline coefficient, and p is the transpose operator; When dealing with high-dimensional text data, cubic spline basis functions can effectively model the complex relationships between data and avoid the limitations of traditional linear models. By using cubic spline basis functions, while ensuring smoothness, the details and variations of the data can be retained as much as possible. Using the second-order difference matrix can avoid overfitting of the model, especially when there are many data points. By integrating the second derivative of the spline basis function, the noise impact on the data can be effectively reduced, providing a smoother model fitting. This method is more effective than simple linear regression or high-order polynomial fitting methods, and can avoid over-complication of the model while ensuring the accuracy of data fitting. Using the Akaike Information Criterion to set the regularization parameter can effectively balance the model complexity and fitting degree. Through calculating the geometric deviation degree of the text vector and combining the application of the Gaussian kernel function, the present invention can accurately detect and repair abnormal data points. In the prior art, there is often a lack of effective high-dimensional feature modeling methods, resulting in inaccurate identification and repair of abnormal data. When dealing with abnormal data, the geometric center, Euclidean distance, and Gaussian kernel mapping are combined to optimize the effect of abnormal detection and repair. The prior art usually uses simple rules or threshold-based methods to detect abnormalities, without fully considering the complex relationships between data. The present invention not only processes text data through a single model, but also improves the refined processing ability of text data through a multi-level feature extraction and repair mechanism, combining the method of cubic spline basis functions and the second-order difference matrix. The regularization methods in the prior art are usually relatively simple, such as L1 or L2 regularization, while the present invention optimizes the regularization parameter by using the Akaike Information Criterion (AIC), enabling the model to better control the complexity when dealing with high-dimensional data, avoiding overfitting problems, and thus improving the robustness and generalization ability of the model; Solve for the optimal spline coefficients using the least squares method ; Use the optimal spline coefficients Calculate the fitted value of the i-th data point , the formula is: ; where m is the number of cubic spline basis functions, is the r-th optimal spline coefficient, is the characteristic coordinate of the i-th data point in the kernel space; Calculate the data residual of the i-th data point based on the difference between the fitted value and the geometric deviation degree in the enhanced feature matrix ; Calculate the hat matrix H based on the basis function matrix B and the second-order difference matrix D, the formula is: ; where p is the transpose operator symbol; The hat matrix is widely used in statistics and regression analysis. It can quantify the leverage of each data point, thereby evaluating the impact of each data point on the model fitting result. This method is particularly suitable for model fitting and outlier detection in multi-dimensional data. By measuring the impact of each data point, it avoids the overfitting problem in simple regression methods and can provide a more accurate repair. The introduction of the regularization parameter is very important for avoiding overfitting of the model. In the fitting process of high-dimensional data, regularization helps to balance the complexity and fitting ability of the model, avoiding overfitting on the training data and poor performance on the test data. Compared with traditional methods, the present invention further strengthens the weight evaluation of data points by introducing the hat matrix, enabling abnormal data points to be more accurately identified and repaired. Existing technologies usually screen abnormal data through simple threshold detection methods, while the present invention introduces regularization and difference matrices through a mathematical model, providing a more refined outlier detection process. Through the calculation of the hat matrix, leverage points in the data (i.e., data points with a large impact on fitting) can be identified, thus providing a more accurate method for repairing abnormal data. This method is more robust than traditional threshold-based outlier detection techniques and can effectively handle complex data. This method does not simply perform linear fitting on the data, but considers the non-linear characteristics of the data and captures the complex changes in the data through spline basis functions and difference matrices. Existing technologies usually use a single linear model or simple non-linear models, making it difficult to handle high-order features in complex data structures. These improvements make the invention show stronger robustness and accuracy than traditional methods when dealing with complex and high-dimensional data; Based on the data residuals and the hat matrix H, calculate the standardized residuals , and use the residual matrix generation method to construct the residual matrix E from the standardized residuals. The formula is: ; Where is the standard deviation of the residuals, is the diagonal element of the hat matrix, representing the influence degree of the i-th data point; For each column of the residual matrix E, use the probability density function to calculate the probability density of the residuals in the u-th column , and the formula is: ; where x is the residual value, is the standard deviation of the residuals in the u-th column, is the mean of the residuals in the u-th column; Based on the probability density of the residuals in the u-th column, use the outlier probability calculation formula to calculate the outlier probability , and the formula is: ; where is the anomaly probability of the i-th data point on the u-th feature; Based on the anomaly probability , the global anomaly score of the i-th data point is calculated using the anomaly probability accumulation method; The percentile method is used to set the anomaly threshold. The global anomaly score is compared with the anomaly threshold. Data points with a global anomaly score greater than or equal to the anomaly threshold are set as anomaly data, and data points with a global anomaly score less than the anomaly threshold are set as normal data; All data points are traversed to screen for anomaly data, generating an anomaly data set.

[0026] Using the Gaussian kernel function to map the text vector to a high-dimensional space helps to handle the non-linear relationship of text data, thereby enhancing the expressive power of the model. By fitting the text data with the cubic spline basis function based on the high-dimensional space, the data change can be smoothed during the fitting process, noise can be eliminated, and the detection ability of the model for anomaly data can be further improved. The Akaike information criterion can help select the optimal regularization parameter to avoid overfitting. Calculating the anomaly probability of each data point and calculating the global anomaly score based on the anomaly probability accumulation method can comprehensively evaluate whether the text data is abnormal, provide multi-dimensional evaluation for the data, thereby improving the accuracy and reliability of anomaly data recognition. By combining deep learning with traditional statistical analysis methods, when dealing with large-scale unstructured data, the quality of text data can be effectively improved, especially the accuracy in anomaly detection and repair, and then the performance and reliability of the text analysis system can be enhanced.

[0027] S2. Repair the detected anomaly data to generate a repaired data set, and construct a convolutional neural network (CNN) model to perform language analysis on the text vectors in the repaired data set; Specifically, repairing the detected anomaly data to generate a repaired data set means setting the number of anomaly neighborhoods using the neighborhood optimization method of information entropy , extracting the anomaly data from the anomaly data set, calculating the Euclidean distance between the anomaly data and the normal data using the Euclidean distance formula, sorting the Euclidean distances between the anomaly data and the normal data from smallest to largest, and selecting the smallest Euclidean distances between the anomaly data and the normal data to form a distribution neighborhood set; Calculate the average value of the data points in the distribution neighborhood set to obtain the centroid of the distribution neighborhood set ; Use the vector difference method to calculate the direction vector between the centroid and the anomaly data; Based on the direction vector, use the linear repair method to generate a preliminary repair value ; Calculate the average Euclidean distance value from the preliminary repair value to the neighborhood points in the distribution neighborhood set using the neighborhood average distance calculation method ; Based on the average Euclidean distance value , calculate the dynamic adjustment coefficient using the weighted inverse proportional scaling formula , and the formula is: ; Based on the centroid and the preliminary repair value , adjust the preliminary repair value using the repair value adjustment method to obtain the final repair value , and the formula is: ; By calculating the centroid, local outliers can be adjusted towards the "center" of their neighborhoods, thus achieving more reasonable repair. In data repair, using the centroid instead of a single reference value can better adapt to the distribution characteristics of the data. Especially when facing complex and high-dimensional data, the centroid can provide a more accurate reference. The dynamic adjustment coefficient introduces flexible control of the repair amplitude, enabling the repair process to be dynamically adjusted according to specific situations. Traditional outlier repair methods usually adopt simple interpolation or mean-based methods, which cannot take into account the context information around data points. By introducing the centroid concept, similar information within the neighborhood can be utilized during the repair process, thus more accurately restoring outlier data points. The centroid repair method compares data points with the global trend of their neighborhoods, ensuring that the repaired data points do not deviate from their true distribution and are more in line with the changing patterns of actual data. The centroid reflects the global characteristics of neighborhood data, thus avoiding errors caused by the repair of a single data point, especially performing more excellently on high-dimensional and dynamic data sets. Existing technologies often ignore the context information of data and simply rely on local or global statistics (such as means, interpolation, etc.) for repair, which may lead to inaccurate or inconsistent repair results. When facing complex social media data or other highly diverse data sets, traditional repair methods usually have difficulty coping with the complexity and non-linear distribution of the data. Through the centroid repair method, it can effectively adapt to the distribution characteristics of the data. Especially in high-dimensional feature spaces, it can accurately capture the local and global relationships of data points. The repair methods in existing technologies usually fail to fully consider the non-linear relationships between data points, and the repair results may lead to data distortion. Especially in high-dimensional data analysis, traditional repair methods usually lack a dynamic adjustment mechanism, with a fixed repair strength and inability to adaptively adjust. However, the present invention introduces a dynamic adjustment coefficient, enabling the repair intensity to be adjusted according to the needs of specific data, providing a flexible repair strategy and avoiding problems of overfitting or insufficient repair. Compared with existing technologies, the present invention has significant improvements in repair accuracy, adaptation to complex data structures, and repair intensity control; Replace the corresponding abnormal data with the final repaired value to generate a repaired data set.

[0028] Through the neighborhood optimization method of information entropy, it is possible to effectively reduce misjudged abnormal data, optimize the data repair process. The combination of Euclidean distance and vector difference method makes the repair process not only focus on the numerical values of abnormal data, but also on their characteristic coordinates in space, thereby enhancing the directionality and pertinence of the repair process. The repair result can make the most appropriate adjustment to abnormal data on the basis of maintaining the original data pattern. By calculating the centroid of the distribution neighborhood set, the optimal repair direction can be effectively located in space, and the weighted inverse proportional scaling formula further optimizes the calculation of the repair value, making the repair process not only ensure high precision but also improve the calculation efficiency. Especially when dealing with large-scale data, it greatly reduces the calculation cost. Using the weighted inverse proportional scaling formula can dynamically adjust the repair strength according to the distance of neighborhood points, avoiding problems such as overfitting or insufficient accuracy in the repair process, so that the final repair result better conforms to the overall law of data distribution. Through the repair value adjustment method combined with centroid calculation, it can dynamically respond to different types of data distributions and has high adaptability. This method can effectively discover abnormal data and repair them according to the distribution characteristics of the data, avoiding the problem of misrepair commonly existing in traditional methods.

[0029] Furthermore, construct a convolutional neural network CNN model to perform language analysis on the text vectors in the repaired data set, which means collecting text data with labels and preprocessing them to obtain text vectors after historical normalization processing to generate a training set; Construct a convolutional neural network CNN model, including an input layer, a convolutional layer, a pooling layer, and a fully connected output layer; Define the input layer as the text vector after normalization processing; Use the training set to train the convolutional neural network CNN model, and use the loss function and Adam optimizer to iteratively optimize the model parameters; Input the text vectors after normalization processing in the repaired data set into the trained convolutional neural network CNN model to obtain the probability of sentiment classification, and the sentiment classification includes positive and negative sentiments; Select the category with the highest probability as the language analysis result according to the probability of sentiment classification.

[0030] The text analysis method based on convolutional neural network does not require manual design of complex features, but relies on the network to automatically extract key features in the text. The convolutional neural network can capture local semantic relationships in the text through convolutional operations. The Adam optimizer is used for iterative optimization of model parameters, making the training process more efficient and avoiding the learning rate adjustment problem that may occur in the traditional gradient descent method. Through the training of the CNN model, text data with characteristics such as noise, spelling mistakes, and non-standard language expressions can be processed, improving the robustness and generalization ability of the model. By using the CNN model trained with the training set, high-precision sentiment classification results can be obtained. Through accurate sentiment classification, enterprises and organizations can better understand user emotions and make corresponding decisions.

[0031] S3. Build a visual interface to display the language analysis results and store the text data collected, analyzed. Specifically, building a visual interface to display the language analysis results means using the front-end framework React.js to build a visual interface, including the main chart area and the top information bar. Display the optimized language analysis results in the main chart area and display the probability of sentiment classification in the top information bar. Allow users who have passed real-name verification to view.

[0032] The virtual DOM technology of React.js can ensure that even when dealing with a large amount of data, the interface update remains efficient, avoiding unnecessary re-rendering. By displaying the results of language analysis in the main chart area, users can intuitively view the sentiment classification (positive or negative) of each piece of text. In the top information bar, the probability value of sentiment classification provides the user with the detail of sentiment analysis. The real-name verification function can ensure that only authorized users can access specific data. The front-end interface implemented by React.js can not only dynamically update the results of language analysis, but also support users to adjust the display form or data filtering conditions according to their own needs. Through the design of the main chart area and the top information bar, users can conveniently and intuitively understand complex language analysis results, improving the usage efficiency and experience of the system.

[0033] Furthermore, storing the text data collected, analyzed means storing the collected text data and the language analysis results generated by analysis into the central database, and setting security access measures. The central database backs up the stored data to the cloud and regularly conducts integrity detection on the stored data and the backup data. After the detection is completed, an integrity detection record is generated and synchronously stored into the central database.

[0034] Storing the collected text data and the results after language analysis in the central database can not only effectively integrate data from different sources, but also ensure the unified management and efficient query of data. To ensure the confidentiality and security of data, a strict access control mechanism is adopted to manage the access permissions of each user and system. Regular integrity checks ensure the availability and reliability of data. Even when data corruption or tampering occurs, it can be detected and repaired in a timely manner. By recording and synchronously storing the results of each integrity check in the central database, the system can provide traceability of data integrity. This not only provides necessary audit records for data managers, but also helps trace the cause of data corruption when problems occur, improving the transparency and management efficiency of the system. Through strict security access control measures, the security and privacy protection of data are ensured. At the same time, the combination of cloud backup and integrity check mechanism makes the long-term storage of data more robust and can effectively cope with the data risks brought by emergencies.

[0035] This embodiment also provides a language analysis system based on a deep learning language model, including: A collection and detection module, configured to collect text data and perform preprocessing, and perform anomaly detection based on the preprocessed text data; A repair and analysis module, configured to repair the detected abnormal data, generate a set of repaired data, and construct a convolutional neural network (CNN) model to perform language analysis on the text vectors in the set of repaired data; A visualization and storage module, configured to construct a visualization interface to display the language analysis results and store the text data generated by collection and analysis.

[0036] This embodiment also provides a computer device applicable to the case of a language analysis method based on a deep learning language model, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the language analysis method based on a deep learning language model as proposed in the above embodiment.

[0037] The computer device may be a terminal, which includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0038] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the language analysis method based on a deep learning language model as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM for short), Electrically Erasable Programmable Read-Only Memory (EEPROM for short), Erasable Programmable Read-Only Memory (EPROM for short), Programmable Read-Only Memory (PROM for short), Read-Only Memory (ROM for short), magnetic memory, flash memory, a magnetic disk, or an optical disc.

[0039] In summary, the present invention collects text data and performs preprocessing, performs anomaly detection based on the preprocessed text data; repairs the detected abnormal data to generate a set of repaired data, constructs a Convolutional Neural Network (CNN) model to perform language analysis on the text vectors in the set of repaired data; improves the quality of text data, reduces the interference of abnormal data on normal data, and enhances the accuracy and stability of the deep learning language analysis model.

[0040] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A language analysis method based on a deep learning language model, characterized in that: including Collecting text data and performing preprocessing, and performing anomaly detection based on the preprocessed text data; Repairing the detected abnormal data, generating a set of repaired data, and constructing a Convolutional Neural Network (CNN) model to perform language analysis on the text vectors in the set of repaired data; Constructing a visualization interface to display the results of language analysis, and storing the text data collected and analyzed.

2. The language analysis method based on a deep learning language model according to claim 1, wherein: The collecting text data and performing preprocessing refers to collecting text data from a social media platform using an open APL interface and performing preprocessing; The text data includes the publishing time, text content, and user ID; Performing data cleaning on the text data using regular expressions, converting the text data to lowercase using text normalization, identifying and deleting duplicate data using the hash value deduplication method, performing word segmentation using the optimal word segmentation method of bidirectional matching, performing matching and deleting stop words using a stop word list, mapping the word segmentation results after deleting stop words to text vectors using a pre-trained word embedding model GloVe, stacking the text vectors to generate a text vector matrix, and performing normalization processing on the text vector matrix.

3. The language analysis method based on a deep learning language model according to claim 2, characterized in that: The performing anomaly detection based on the preprocessed text data refers to setting the global neighborhood number A using the inflection point detection method, calculating the Euclidean distance of the text vectors in the normalized text vector matrix using the Euclidean distance formula, sorting the Euclidean distances of the text vectors from smallest to largest, and selecting the Euclidean distances of the smallest A text vectors to form a global neighborhood set; Calculate the average value of the text vectors in the global neighborhood set to obtain the geometric center of the neighborhood , where i is the index of the data point; Calculate the Euclidean distance from the text vector to the geometric center of the neighborhood, which is defined as the geometric deviation ; Combine the text vector and the geometric deviation to generate an enhanced feature vector , and the formula is: ; wherein is the text vector of the i-th data point, and for the enhanced feature vector perform stacking to generate an enhanced feature matrix ; Calculate the average distance of Euclidean distances in the global neighborhood set and set it as the kernel width ; Map the enhanced feature matrix to the kernel space using the Gaussian kernel function and calculate the elements of the kernel feature matrix to generate the kernel feature matrix ; ; Calculate the spline nodes using the equally spaced node division method based on the kernel feature matrix ; Construct corresponding cubic spline basis functions based on spline nodes and record the responses of the cubic spline basis functions , where is the response of the i-th data point in the r-th cubic spline basis function, and use the spline response matrix generation method to generate the basis function matrix B from the responses Based on cubic spline basis functions, the elements of the second-order difference matrix are calculated using the second derivative integration method , and the second-order difference matrix D is generated. The formula is as follows: ; where and are the maximum and minimum values of the spline nodes respectively, T is the characteristic coordinate of the data point in the kernel space, and are the cubic spline basis functions of the r-th and o-th splines respectively; Setting the regularization parameter using the Akaike information criterion ; Based on the enhanced feature matrix , construct the objective function based on the basis function matrix B and the second-order difference matrix D , and the formula is as follows: ; wherein is a linear combination of cubic spline basis functions, is a spline coefficient, and p is a transpose operator symbol; Solve for the optimal spline coefficients using the least squares method ; Use the optimal spline coefficients Calculate the fitted value of the i-th data point , the formula is: ; where m is the number of cubic spline basis functions, is the r-th optimal spline coefficient, is the characteristic coordinate of the i-th data point in the kernel space; Calculate the data residual of the i-th data point based on the difference between the fitted value and the geometric deviation degree in the enhanced feature matrix ; Calculating the hat matrix H based on the basis function matrix B and the second-order difference matrix D, with the formula: ; Based on data residuals and the hat matrix H to calculate the standardized residuals , and use the residual matrix generation method to construct the residual matrix E from the standardized residuals; For each column of the residual matrix E, calculate the probability density of the residuals in the u-th column using the probability density function , where x is the residual value; Probability density based on the residual of the u-th column , calculate the anomaly probability using the anomaly probability calculation formula ; Based on the anomaly probability , the global anomaly score of the i-th data point is calculated using the anomaly probability accumulation method; Setting the anomaly threshold using the percentile method, comparing the global anomaly score with the anomaly threshold, setting the data points with the global anomaly score greater than or equal to the anomaly threshold as abnormal data, and setting the data points with the global anomaly score less than the anomaly threshold as normal data; Traversing all data points to screen for abnormal data and generating a set of abnormal data.

4. The language analysis method based on a deep learning language model according to claim 3, characterized in that: Repairing the detected abnormal data to generate a repaired data set means setting the number of abnormal neighborhoods using the neighborhood optimization method of information entropy , extracting the abnormal data from the abnormal data set, calculating the Euclidean distance between the abnormal data and the normal data using the Euclidean distance formula, sorting the Euclidean distances between the abnormal data and the normal data from smallest to largest, and selecting the smallest Euclidean distances between the abnormal data and the normal data to form a distribution neighborhood set; Calculate the average value of the data points in the distribution neighborhood set to obtain the centroid of the distribution neighborhood set ; Calculating the direction vector of the centroid and the abnormal data using the vector difference method; Based on the direction vector, use the linear repair method to generate preliminary repair values ; Calculate the average Euclidean distance value from the preliminary repair value to the neighborhood points in the distribution neighborhood set using the neighborhood average distance calculation method ; Based on the average Euclidean distance value , calculate the dynamic adjustment coefficient using the weighted inverse proportional scaling formula ; Based on the centroid and the preliminary repair value , the preliminary repair value is adjusted using the repair value adjustment method to obtain the final repair value , and the formula is: ; Replacing the corresponding abnormal data with the final repair value to generate a set of repaired data.

5. The language analysis method based on a deep learning language model according to claim 4, characterized in that: The constructing a Convolutional Neural Network (CNN) model to perform language analysis on the text vectors in the set of repaired data refers to collecting text data with labels and performing preprocessing to obtain the text vectors after historical normalization processing, and generating a training set; Constructing a Convolutional Neural Network (CNN) model, including an input layer, a convolutional layer, a pooling layer, and a fully connected output layer; Defining the input layer as the text vectors after normalization processing; Training the Convolutional Neural Network (CNN) model using the training set, and performing iterative optimization of the model parameters using a loss function and an Adam optimizer; Inputting the text vectors after normalization processing in the set of repaired data into the trained Convolutional Neural Network (CNN) model to obtain the probability of sentiment classification, where the sentiment classification includes positive and negative sentiments; Selecting the category with the highest probability as the result of language analysis according to the probability of sentiment classification.

6. The language analysis method based on a deep learning language model according to claim 5, characterized in that: The constructing a visualization interface to display the results of language analysis refers to constructing a visualization interface using the front-end framework React.js, including a main chart area and a top information bar; The optimized language analysis results are displayed in the main chart area, and the probability of sentiment classification is displayed in the top information bar. Allow users who have passed real-name verification to view.

7. The language analysis method based on a deep learning language model according to claim 6, characterized in that: The storage of the text data generated by collection and analysis means storing the collected text data and the language analysis results generated by analysis into a central database, and setting security access measures. The central database backs up the stored data to the cloud, and periodically performs integrity detection on the stored data and the backup data. After the detection is completed, an integrity detection record is generated and synchronously stored in the central database.

8. A language analysis system based on a deep learning language model, based on the language analysis method based on a deep learning language model according to any one of claims 1 to 7, characterized in that: Including A collection and detection module for collecting text data and performing preprocessing, and performing anomaly detection based on the preprocessed text data. A repair and analysis module for repairing the detected abnormal data, generating a set of repaired data, and constructing a convolutional neural network (CNN) model to perform language analysis on the text vectors in the set of repaired data. A visualization and storage module for constructing a visualization interface to display the language analysis results and storing the text data generated by collection and analysis.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the language analysis method based on the deep learning language model according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the language analysis method based on the deep learning language model according to any one of claims 1 to 7.