Text clustering enhanced visual analysis method and device based on large language model

By connecting text data with topics before encoding and using large language models for clustering and evaluation, the problems of insufficient coding performance and insufficient compatibility in text data analysis are solved, and the accuracy of clustering and data analysis are improved. sex.

CN119293254AInactive Publication Date: 2025-01-10HANGZHOU INST FOR ADVANCED STUDY UCAS +1

Patent Information

Application Number
CN202411825568.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as insufficient coding performance, insufficient compatibility and poor interpretation in text data analysis, resulting in poor text clustering accuracy.

Method used

Before encoding, the text data to be analyzed is connected to the topic, topic extraction and clustering is performed through a large language model, vectorized data points are generated, clustering and performance evaluation are performed, and visual analysis is combined to improve clustering accuracy.

Benefits of technology

Improve coding quality in the original vector space, enhance the subject intensity of data points, improve the accuracy and distinction of clustering, and ensure the accuracy of data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293254A_ABST
    Figure CN119293254A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a text clustering enhancement visual analysis method and device based on a large language model. The method comprises the steps of obtaining to-be-analyzed text data; the to-be-analyzed text data comprises a plurality of data points; performing topic extraction on the to-be-analyzed text data to obtain a plurality of topics corresponding to each data point; wherein a probability is allocated to each topic; connecting the plurality of themes corresponding to each data point with the to-be-analyzed text data to obtain the connected to-be-analyzed text data; processing the connected to-be-analyzed text data through a coding model to obtain vectorized data points; clustering each vectorized data point to obtain a clustering result; wherein the clustering result comprises a plurality of clustering clusters; each clustering cluster corresponds to one prediction clustering label and one semantic topic; and performing performance evaluation and visual analysis on the clustering result to obtain a data analysis result. According to the scheme, the accuracy is good when the data analysis function is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a text clustering enhanced visual analysis method and device based on a large language model. Background Art

[0002] Large Language Models (LLMs) are natural language processing technologies based on deep learning. They can effectively use deep learning technologies and large data sets to capture and explain subtle language differences, especially in complex NLP (Natural Language Processing) tasks such as text clustering. Text clustering aims to organize texts into groups based on their similarities. In related technologies, text clustering is usually achieved by deploying clustering algorithms on pre-trained embedding models. As the performance of pre-trained embedding models improves, the text clustering effect is also better.

[0003] However, when using the above scheme to analyze text data, there are problems such as insufficient encoding performance, insufficient compatibility between traditional clustering and large language models, and poor interpretability, which lead to poor accuracy in text data analysis. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a text clustering enhanced visual analysis method and device based on a large language model to solve the problem of poor accuracy in text data analysis in related technologies.

[0005] In a first aspect, the present invention provides a text clustering enhanced visual analysis method based on a large language model, the method comprising: Acquire text data to be analyzed; the text data to be analyzed includes multiple data points; Performing topic extraction on the text data to be analyzed to obtain multiple topics corresponding to each of the multiple data points; wherein a probability is assigned to each topic; Connecting a plurality of topics corresponding to each of the plurality of data points with the text data to be analyzed to obtain connected text data to be analyzed; Processing the connected text data to be analyzed through the encoding model to obtain vectorized data points; Clustering the vectorized data points to obtain a clustering result; wherein the clustering result includes a plurality of clusters; each cluster includes at least two data points; each cluster corresponds to a predicted cluster label and a semantic topic; The clustering results are subjected to performance evaluation and visual analysis to obtain data analysis results.

[0006] In an optional implementation, subject extraction is performed on the text data to be analyzed to obtain multiple subjects corresponding to each of the multiple data points, including: For each data point, extract multiple keywords of the data point through a language model; Based on the extracted multiple keywords of the data points, identifying multiple topics of the data points; The step of connecting the plurality of topics corresponding to each of the plurality of data points with the text data to be analyzed includes: Connect multiple keywords of each data point with the text data to be analyzed.

[0007] In an optional implementation, the performing performance evaluation on the clustering result includes: Calculating the clustering entropy of each data point based on the clustering result; For each cluster, calculate the intra-class average distance, intra-class maximum distance, intra-class deviation and density index between each pair of data points in the cluster; Calculate the type word frequency ratio corresponding to each cluster; Based on the clustering entropy of each data point, the confusion of each data point assigned to each cluster cluster is obtained; Based on the intra-class average distance, intra-class maximum distance, intra-class deviation and density index between each pair of data points in each cluster, the numerical compactness of the clustering result is obtained; Based on the type word frequency ratio corresponding to each cluster, a consistency evaluation value and a diversity evaluation value of the clustering result are obtained.

[0008] In an optional implementation, the performing performance evaluation on the clustering result further includes: When the text data to be analyzed includes a true label, calculating the normalized mutual information and accuracy of the text data to be analyzed and the true label; When the text data to be analyzed does not contain a true label, the text type word frequency ratio of the text data to be analyzed is calculated.

[0009] In an optional implementation, the text type word frequency ratio a-TTR is calculated by the following formula:

[0010] in, is the number of data points in cluster i, is the total number of data points in the j clusters, is the type word frequency ratio of cluster i.

[0011] In an optional implementation, the visual analysis of the clustering results includes: A t-SNE scatter plot is generated based on the clustering result, and a lens view is generated based on the region of interest selected in the t-SNE scatter plot; the lens view includes, from the inside to the outside, a donut plot composed of clusters to which each data point belongs, a donut plot composed of thematic distributions of each data point, and a donut plot composed of cluster entropies of each data point; Generate an instant view based on the currently selected data point; the instant view includes a plurality of candidate predicted cluster labels corresponding to the currently selected data point and a modification suggestion for the predicted cluster label; Based on the multiple candidate prediction cluster labels in the instant view, a cluster view is generated; wherein the cluster view includes a performance evaluation radar chart and a word cloud chart corresponding to each candidate prediction cluster label; Based on the predicted clustering label selected in the instant view, an indicator view is generated; the indicator view is used to display the accuracy, normalized mutual information and text type word frequency ratio of the selected predicted clustering label; wherein, each time a predicted clustering label is selected, a set of corresponding accuracy, normalized mutual information and text type word frequency ratio is displayed.

[0012] In a second aspect, the present invention provides a text clustering enhanced visual analysis device based on a large language model, the device comprising: An acquisition module, used to acquire text data to be analyzed; the text data to be analyzed includes multiple data points; A topic extraction module is used to extract topics from the text data to be analyzed, and obtain multiple topics corresponding to each of the multiple data points; wherein a probability is assigned to each topic; A connection module, used for connecting a plurality of topics corresponding to each of the plurality of data points with the text data to be analyzed to obtain the connected text data to be analyzed; An encoding module, used for processing the connected text data to be analyzed through an encoding model to obtain vectorized data points; A clustering module, used for clustering the vectorized data points to obtain a clustering result; wherein the clustering result includes a plurality of clusters; each cluster includes at least two data points; each cluster corresponds to a predicted cluster label and a semantic theme; The analysis module is used to perform performance evaluation and visual analysis on the clustering results to obtain data analysis results.

[0013] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the text clustering enhanced visual analysis method based on a large language model of the above-mentioned first aspect or any corresponding embodiment thereof.

[0014] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the text clustering enhanced visual analysis method based on a large language model of the above-mentioned first aspect or any corresponding embodiment thereof.

[0015] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the text clustering enhanced visual analysis method based on a large language model according to the first aspect or any corresponding embodiment thereof.

[0016] The technical solution provided by this application may have the following beneficial effects: The text clustering enhanced visual analysis method based on a large language model provided in the present application first obtains the text data to be analyzed containing multiple data points, then extracts the topic of the text data to be analyzed, obtains multiple topics corresponding to each of the multiple data points, and assigns a probability to each topic. Then, the multiple topics corresponding to each of the multiple data points are connected to the text data to be analyzed to obtain the connected text data to be analyzed, and then the connected text data to be analyzed is processed by the encoding model to obtain each data point after vectorization, and then the vectorized data points are clustered to obtain the clustering result, wherein the clustering result includes multiple cluster clusters, each cluster cluster includes at least two data points, and each cluster cluster corresponds to a predicted cluster label and a semantic topic. Finally, the clustering result is subjected to performance evaluation and visual analysis to obtain the data analysis result. The above scheme connects the text data to be analyzed and the topic before encoding, which can improve the encoding quality in the original vector space, and can enhance the topic strength of each data point through connection, increase the distinction between data points of different topics, and thus improve the accuracy of subsequent clustering, and combine performance evaluation and visual analysis to ensure the accuracy of data analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 is a flow chart of a text clustering enhanced visual analysis method based on a large language model according to an embodiment of the present invention; Figure 2is a flow chart of another method for text clustering enhanced visual analysis based on a large language model according to an embodiment of the present invention; Figure 3 is a schematic diagram of a lens design according to an embodiment of the present invention; Figure 4 is a schematic diagram of an overall view according to an embodiment of the present invention; Figure 5 is a schematic diagram of a text clustering enhanced visual analysis system based on a large language model according to an embodiment of the present invention; Figure 6 is a structural block diagram of a text clustering enhanced visual analysis device based on a large language model according to an embodiment of the present invention; Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0020] Large Language Models (LLMs) are natural language processing technologies based on deep learning. They can effectively use deep learning technologies and large data sets to capture and explain subtle language differences, especially in complex NLP (Natural Language Processing) tasks such as text clustering. Text clustering aims to organize texts into groups based on their similarities. In related technologies, text clustering is usually achieved by deploying clustering algorithms on pre-trained embedding models. As the performance of pre-trained embedding models improves, the text clustering effect is also better.

[0021] However, when analyzing specialized text data through the above scheme, the following problems exist: 1. The encoding performance of the general text encoder in the large language model is insufficient, and the accuracy is low when analyzing different text data sets. If the encoding model is fine-tuned for different text data sets, the analysis threshold and the cost of manpower and computing power will increase significantly; 2. In the process of integrating large language models into clustering, the identification and correction of abnormal data rely on the indicators preset in the model for filtering. There is no human intervention, which leads to unreliable accuracy verification at each step when analyzing text data. 3. The algorithms in related technologies are only applicable to scenarios with real labels in text data. However, text data sets in actual application scenarios usually do not have real labels, which makes it difficult to determine the appropriate number of clusters. 4. Clustering evaluation indicators in related technologies (such as silhouette coefficient) are often ineffective when applied to text data.

[0022] Therefore, an embodiment of the present invention provides a text clustering enhanced visual analysis method based on a large language model, which connects the text data to be analyzed with the topic before encoding, and combines performance evaluation and visual analysis to achieve the effect of improving the accuracy of data analysis.

[0023] According to an embodiment of the present invention, an embodiment of a text clustering enhanced visual analysis method based on a large language model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0024] In this embodiment, a text clustering enhanced visual analysis method based on a large language model is provided, which can be used in laptop computers, desktop computers, servers, etc. Figure 1 is a flowchart of a text clustering enhanced visual analysis method based on a large language model according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S101, obtaining text data to be analyzed.

[0025] The text data to be analyzed can be a large amount of text data that needs to be analyzed in actual application scenarios. The text data to be analyzed contains multiple data points, each of which can be a complete text unit in the text data to be analyzed. It can be set according to actual needs. For example, the text data to be analyzed is customer service data for handling bank cards, then a data point can be a question uttered by a bank card user or a complete conversation between a bank card user and customer service. When obtaining the text data to be analyzed, the text data of the target web page can be automatically captured by a web crawler, or it can be collected according to needs. For example, in the scenario of data analysis of academic journals, the journal data in the academic journal website can be captured, or the required journal files can be downloaded by yourself as the text data to be analyzed.

[0026] Step S102, extracting topics from the text data to be analyzed to obtain multiple topics corresponding to each of the multiple data points.

[0027] The topic can be a keyword, a summary of the main meaning, a central idea, etc. of the text data. When extracting topics from the text data to be analyzed, multiple topics can be extracted for each data point of the text data to be analyzed. The specific number of topics to be extracted can be set according to the needs, such as 1 to 3. Among them, a probability is assigned to each topic, and the sum of the probabilities assigned to multiple topics corresponding to a data point is 1. If the data point itself contains a vague topic, for example, a data point corresponds to multiple topics, and the probabilities between multiple topics are similar, then the data point is likely to make mistakes in the subsequent clustering process. Therefore, the probability assigned to the topic can be used as a basis for quickly screening abnormal data points in the subsequent visual analysis interface, thereby improving the accuracy of data analysis. Exemplarily, for the text "Do you know what your exchange rates are?", two topics "Exchange rate query" and "Current exchange rate" are extracted, and the probabilities are assigned to 0.8 and 0.2 respectively. The probability difference between the two topics is large, indicating that the topic identified for the text is relatively clear.

[0028] Step S103 , connecting the multiple topics corresponding to each of the multiple data points with the text data to be analyzed to obtain connected text data to be analyzed.

[0029] Connecting the multiple topics corresponding to each of the multiple data points with the text data to be analyzed means combining the multiple topics corresponding to each data point with the text data to be analyzed to enhance the amount of information, improve distinguishability and provide more valuable information for the subsequent text analysis process.

[0030] It should be noted that in the related art, the text data to be analyzed and the extracted topics are first encoded and then connected. Since the encoding model generates vectors of the same dimension for the text data to be analyzed and the topics, and connecting the text data to be analyzed and the topics will double the dimension, the dimension of each data point will be increased, affecting the subsequent clustering and dimensionality reduction process and failing to significantly enhance the topic strength of the text data to be analyzed; while the present invention connects the text data to be analyzed and the topics before encoding, thereby improving the encoding quality in the original vector space, and enhancing the topic strength of each data point through text connection, making the differences between data points of different topics more obvious, thereby improving the effect of subsequent clustering.

[0031] Step S104, processing the connected text data to be analyzed through the encoding model to obtain each vectorized data point.

[0032] Encoding the text means converting the text into a vectorized representation. For example, the encoding model Instructor-large is used to encode the text data to be analyzed through the instruction "Represent utterances for intent classification", so as to define the encoding target of each data point in response to the user's fine-tuning instructions. Different fine-tuning instructions can also be used for the same data point to generate different encoding vectors, and then each data point is vectorized to obtain each vectorized data point. Instructor-large can ensure performance while maintaining a medium parameter scale.

[0033] Step S105, clustering each vectorized data point to obtain a clustering result.

[0034] A clustering algorithm is used to cluster each vectorized data point to obtain a clustering result, wherein the clustering result includes multiple clusters, each cluster includes at least two data points, each cluster corresponds to a predicted cluster label and a semantic topic, the predicted cluster label is used to indicate the category label of the cluster, such as the first category and the second category, and the semantic topic is used to indicate the main meaning of the cluster. Exemplarily, the clustering algorithm K-Means is used to cluster each vectorized data point.

[0035] Step S106: Perform performance evaluation and visual analysis on the clustering results to obtain data analysis results.

[0036] When evaluating the performance of clustering results, internal evaluation indicators in related technologies can be used to evaluate the similarity, dispersion, distance ratio, etc. of each clustering cluster based on the characteristics of the text data to be analyzed. External evaluation indicators can be used to compare the clustering results with pre-labeled data sets to evaluate their consistency, information sharing, precision, and recall. When visually analyzing the clustering results, scatter plots and dimensionality reduction of high-dimensional data can be used to display the distribution effects of each clustering cluster. Through performance evaluation and visual analysis, data analysis results of the text data to be analyzed can be obtained.

[0037] The text clustering enhanced visual analysis method based on a large language model provided in this embodiment first obtains the text data to be analyzed containing multiple data points, then extracts the topic of the text data to be analyzed, obtains multiple topics corresponding to each of the multiple data points, and assigns a probability to each topic. Then, the multiple topics corresponding to each of the multiple data points are connected to the text data to be analyzed to obtain the connected text data to be analyzed, and then the connected text data to be analyzed is processed by the encoding model to obtain each data point after vectorization, and then the vectorized data points are clustered to obtain a clustering result, wherein the clustering result includes multiple cluster clusters, each cluster cluster includes at least two data points, and each cluster cluster corresponds to a predicted cluster label and a semantic topic. Finally, the clustering result is subjected to performance evaluation and visual analysis to obtain a data analysis result. The above scheme connects the text data to be analyzed and the topic before encoding, which can improve the encoding quality in the original vector space, and can enhance the topic strength of each data point through connection, increase the distinction between data points of different topics, and thus improve the accuracy of subsequent clustering, and combine performance evaluation and visual analysis to ensure the accuracy of data analysis.

[0038] In this embodiment, a text clustering enhanced visual analysis method based on a large language model is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 2 is a flowchart of a text clustering enhanced visual analysis method based on a large language model according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps: Step S201, obtaining text data to be analyzed.

[0039] The text data to be analyzed includes multiple data points.

[0040] Optionally, after obtaining the text data to be analyzed, the text data to be analyzed is cleaned, including removing spaces and special characters, case matching, stemming, and word form restoration. The text data to be analyzed can also be restructured into a list format for subsequent steps.

[0041] Step S202: extracting topics from the text data to be analyzed to obtain multiple topics corresponding to each of the multiple data points.

[0042] In it, a probability is assigned to each topic.

[0043] Specifically, the above step S202 includes: Step S2021: for each data point, extract multiple keywords of the data point through a language model.

[0044] Exemplarily, a large language model GPT-3.5 Turbo is used to perform topic extraction. First, multiple keywords are extracted for each data point. The specific number of keywords extracted can be set according to actual needs. Generally speaking, no more than three keywords are sufficient to capture the basic topic. For example, one data point is a sentence, and a sentence contains multiple topics, each of which is summarized by a keyword.

[0045] Step S2022: identifying multiple topics of the data point based on the multiple keywords extracted from the data point.

[0046] Among them, each topic is identified by multiple keywords, and each data point corresponds to multiple topics. By extracting multiple topics for each data point, the inherent topic ambiguity of the data point itself can be resolved, thereby improving the accuracy of subsequent text data analysis.

[0047] Step S203 , connecting the multiple topics corresponding to each of the multiple data points with the text data to be analyzed to obtain connected text data to be analyzed.

[0048] Specifically, the multiple keywords extracted from each data point are connected with the text data to be analyzed to enhance the distinction between the data points.

[0049] Step S204, processing the connected text data to be analyzed through the encoding model to obtain each vectorized data point.

[0050] For example, the text data to be analyzed is recorded as D, which contains n data points, D={x1,…,x n}. For each data point, a set of keywords is extracted, denoted as T={t1,…,t n}, where ti = {K ij ,P ij}, j ranges from 1 to 3, K represents the extracted keyword, and P represents the probability of the corresponding keyword. The encoding model is represented as E, and the vectorized data point (vectorized encoding) can be represented as v i =E(concatenate(x i , K i )).

[0051] Step S205, clustering each vectorized data point to obtain a clustering result.

[0052] The clustering result includes multiple clusters; each cluster includes at least two data points; and each cluster corresponds to a predicted cluster label and a semantic topic.

[0053] For example, let V = {v1,…,v n}, V represents the combination of all vectorized codes, M represents the clustering algorithm, and by specifying the required number of clusters, the clustering result is PL=M(V), where PL represents the predicted cluster label of each data point.

[0054] In order to obtain the precise meaning of each predicted cluster, after the clustering process, a large language model is integrated to interpret the keywords extracted from all data points in each cluster, thereby extracting a more detailed topic representation. For example, using the prompt "Your task is to extract the topic that best describes the group of keywords provided in the list. Please return only this topic", a semantic overview is obtained for each cluster as a semantic topic.

[0055] Step S206: Perform performance evaluation and visual analysis on the clustering results to obtain data analysis results.

[0056] Specifically, the above step S206 includes: Step S2061, performing performance evaluation on the clustering results.

[0057] Optionally, use the following evaluation indicators to evaluate the performance of the clustering results: 1. Real-time level indicators: The clustering entropy of each data point is calculated based on the clustering result. The clustering entropy is used to measure the confusion of the data point distribution in the clustering result. Different from the method of using the t distribution formula to calculate the probability in the related art, the softmax form of the exponential function is used in this embodiment for improvement. Compared with the t distribution formula, it is simpler, more efficient and easier to implement, and more suitable for large-scale data processing.

[0058] Specifically, let µ k represents the kth cluster center. First, calculate each data point v i The distance between all cluster centers is recorded as Then, the data point v is assigned using the following formula i The soft probability p of belonging to cluster k ik :

[0059] where e -dik Use the exponential function to convert the distance to [0, 1], p ik Represents data point v i The probability of belonging to cluster k.

[0060] Next, based on these probabilities, select the largest K closest The clustering entropy of each data point is calculated using the following formula:

[0061]

[0062] Among them, K closest Set to 10, p ' ik According to K closest Renormalized probabilities.

[0063] Cluster entropy is an important indicator for front-end judgment, reflecting the confusion or uncertainty of each data point assigned to the surrounding clusters. A higher cluster entropy indicates that the clustering result of the data point has a greater degree of confusion. Optionally, the three nearest clusters of each data point are recorded for subsequent use, such as displaying to users or analyzing data points.

[0064] 2. Clustering level indicators: For each cluster, the intra-class average distance, intra-class maximum distance, and intra-class deviation between each pair of data points in the cluster are calculated.

[0065] The average intra-class distance, maximum intra-class distance, intra-class deviation, density index and type word frequency ratio are clustering level indicators. The average intra-class distance, maximum intra-class distance, intra-class deviation and density index evaluate the clustering quality from the dimension of numerical compactness, and the type word frequency ratio evaluates the clustering quality from the dimension of text-level analysis.

[0066] (1) Average Distance within a cluster is used to measure the average distance between each pair of data points in the same cluster. The calculation formula is:

[0067] Where n is the number of data points in the cluster, d(x i ,x j ) represents the data point x i and x j A larger average distance indicates that the clusters are more dispersed.

[0068] (2) Maximum Distance captures the maximum distance between any two data points in the same cluster and is defined as:

[0069] Among them, d(x i ,x j ) is the data point xi and x j A larger maximum distance indicates that there may be significant abnormal data within the cluster.

[0070] (3) Deviation measures the standard deviation of the distance between each pair of data points in the same cluster, providing an indication of the distribution of data points in the cluster, and is defined as follows:

[0071] in, is the average distance within the class, and μ is the average distance.

[0072] (4) Density is used to indicate the proportion of data points contained in a circle with the average distance within the cluster as the radius at the density center of the cluster. The calculation formula for density D (which is not the same concept as the text data D to be analyzed in the previous article) is:

[0073] Higher density indicates tighter clustering, while lower density may indicate the presence of anomalous data.

[0074] (5) Calculate the type word frequency ratio corresponding to each cluster.

[0075] For text-level analysis, we use the type word frequency ratio (TTR) to evaluate the lexical diversity within each cluster, calculated as:

[0076] A higher type-to-word frequency ratio indicates that the vocabulary within the cluster is more diverse, indicating potential dispersion and text-level anomaly data.

[0077] Furthermore, based on the clustering entropy of each data point, the perplexity of each data point assigned to each cluster is obtained. Based on the intra-class average distance, intra-class maximum distance, intra-class deviation and density index between each pair of data points in each cluster, the numerical compactness of the clustering result is obtained. Based on the type word frequency ratio corresponding to each cluster, the consistency evaluation value and diversity evaluation value of the clustering result are obtained.

[0078] 3. Overall evaluation of clustering performance: (1) Normalized mutual information (NMI) and accuracy (ACC). When the text data to be analyzed contains true labels, the ideal evaluation indicator is to compare the relationship between the true labels and the predicted labels. Since the predicted cluster labels obtained from the clustering algorithm are usually different from the true labels assigned to the same cluster, it is necessary to measure the difference between the two. Optionally, the normalized mutual information (NMI) and accuracy (ACC) of the text data to be analyzed and the true labels are calculated, and the optimal alignment between the true clusters and the predicted clusters is found through the Hungarian algorithm to compare the difference between the predicted cluster labels and the true labels.

[0079] (2) Text type word frequency ratio a-TTR. When the text data to be analyzed does not contain true labels, internal indicators are needed to evaluate the quality of clustering. Internal indicators in related technologies, such as silhouette coefficient, are not sufficient to evaluate the clustering results at the text level. Semantic modifications during subsequent visual analysis may have a negative impact on these internal indicators. Therefore, a direct text-based indicator is needed to evaluate the quality of clustering. Optionally, an adjusted type word frequency ratio, called text type word frequency ratio, is defined as a new internal indicator, and the clustering results are evaluated by calculating the text type word frequency ratio of the text data to be analyzed.

[0080] Optionally, the text type word frequency ratio a-TTR is calculated using the following formula:

[0081] in, is the number of data points in cluster i, is the total number of data points in the j clusters, is the type word frequency ratio of cluster i.

[0082] Step S2062: Perform visual analysis on the clustering results.

[0083] The visual analysis in this embodiment supports iterative operations and exploration of text clustering. Users can observe and further modify abnormal data after text clustering. The visual analysis includes four main views (lens view, instant view, cluster view and indicator view) and two auxiliary views (configuration panel and theme view), as follows: 1. Lens view: Figure 3is a schematic diagram of a lens design according to an embodiment of the present invention, wherein area a shows a scatter plot of t-SNE projection, area b is an area of ​​interest selected by a user, area c is three layers of information of different levels (i.e., clustering clusters, semantic themes, and clustering entropy) of data points in the selected area b, and area d is a lens image integrating the three layers of information. The lens view is based on the dimension reduction result of t-SNE after clustering, and uses a lens-based visualization image to help users explore data points and clusters, allowing users to check data points in the lens from multiple angles and quickly identify and correct abnormal data.

[0084] First, a t-SNE scatter plot is generated based on the clustering results, and a lens view is generated based on the region of interest selected in the t-SNE scatter plot. The lens view contains, from the inside to the outside, a donut chart consisting of the clusters to which each data point belongs, a donut chart consisting of the topic distribution of each data point, and a donut chart consisting of the cluster entropy of each data point. The goal of the lens view is to help users quickly filter abnormal data. Since the t-SNE projection loses a lot of information after dimensionality reduction, exploring directly on the t-SNE projection may not be effective. To solve this problem, the clustered t-SNE scatter plot is enhanced using a lens metaphor, which contains three layers of high-level information. The lens view assists the user's operation through a series of interactive buttons. In the entire lens, the elements in the three layers of donut charts correspond one-to-one to the data points contained in the lens. We will systematically introduce the functions of each layer, from the innermost layer to the outermost layer, and its corresponding interaction methods.

[0085] Specifically, the innermost ring of the lens represents the cluster to which the data points contained in the lens belong, and the bar chart corresponds to the data point. By default, the innermost ring is composed in the order of the number of the predicted cluster labels, and the bar charts of the same predicted cluster labels are grouped together. The data points in the same cluster are arranged clockwise in the order of the number. Each stacked bar chart in the middle layer of the lens represents the topic distribution of each data point. If a data point corresponds to multiple topics, it means that the data point is recognized as diverse by the language model, which is represented in the middle layer of the lens as containing multiple color blocks, and the area of ​​each block represents the probability of a topic for the data point. By default, the block with higher probability is closer to the center of the lens and has a darker color. If there is no ambiguity in the understanding of a data point, the probability of the entire topic will be 1, represented by a single color block. The bar chart in the outermost ring corresponds to the cluster entropy of each data point, where the height of each bar chart represents the size of the entropy. In the outermost ring, set the color transparency of the bar chart to 0.8 and use red to represent it. Through the outermost layer, data points that are nearby the selected data point but not selected by the lens can be observed. This feature allows the user to decide whether to include nearby data points in the lens selection process.

[0086] Figure 4is a schematic diagram of an overall view according to an embodiment of the present invention, and the lens view corresponds to Figure 4 Part C in the lens view. In the lens view, a variety of interactive functions are provided. First, the user can manipulate the position of the underlying scatter plot by dragging the mouse, thereby moving the focus while keeping the lens centered. In addition, the user can use the mouse wheel to zoom the scatter plot to adjust the observation scale within the lens, so as to interact with the data points in the lens more accurately. Second, at the data point level, the user can hover the mouse over a data point on the scatter plot to highlight it, and the corresponding bar chart of the same data point will also be highlighted in the lens to show the topic distribution and clustering entropy of the same data point. The transparency of other data points in the same cluster as the selected data point is reduced to 0.5, while the transparency of data points in different clusters is reduced to 0.2, so that users can observe the spatial relationship in detail. Clicking a data point will keep it highlighted and add it to the modification list. Then in Figure 4 The D area in the Mirror Image (which contains the modification list and the information corresponding to the selected data point) will provide detailed information about the data point and restore the transparency of other data points. Users can also perform the same operation directly on the innermost layer of the lens to achieve the same effect.

[0087] Finally, about the interaction with the top control buttons in the lens view. The first three buttons modify the arrangement of information on the border of the lens, which is initially set to "Group cluster". Clicking "Percentage" reorganizes the topic perplexity of each data point, starting from the vertical direction of the top of the lens and arranging clockwise. Points with greater topic diversity are arranged at the back, which helps to identify abnormal data. The "Entropy Desc" option arranges the lens in descending order to help observe and determine the need for modification of high entropy points. The "Lens Visibility" button allows the user to hide or show the lens. When hidden, the user can more clearly see the distribution of data points on the plane. The "Draw to start" button allows the user to select points of interest using the polygon selection tool. Compared with clicking on the scatter plot to select points, this method can more effectively select points to be modified. Clicking "Draw to start" will change the shape of the mouse cursor. After completing the polygon selection, the user can click "Draw Done" in the same button position to confirm the selection. Finally, click the "Select done" button to confirm the list of points to be modified and pass this list to the immediate view.

[0088] Using a lens design has many advantages over displaying this information via a list or matrix standalone view. The lens design preserves the meaningful spatial distribution of clusters derived from t-SNE dimensionality reduction, whereas a list or matrix would destroy this distribution. The lens view allows for dynamic exploration and statistical data collection in a single view, saving space and reducing information loss when users switch between views. The lens design effectively separates the internal space for interactive exploration from the external space for further exploration, and the multi-layer lens design enables observation of statistical information from multiple perspectives and investigation of the relationships between internal points. In addition, the lens design can be distinguished from the circle selection function, where users can use the lens for preliminary exploration and then use the circle selection function to make detailed selections for further exploration and modification, which is not possible in list / matrix and other multi-view collaborative methods.

[0089] 2. Instant View: Generate an instant view based on the currently selected data point. The instant view contains multiple candidate predicted cluster labels corresponding to the currently selected data point and modification suggestions for the predicted cluster labels. Figure 4 Section D of the .

[0090] When the user uses the lens view to select a series of data points of interest for modification, all selected data points will be passed to the immediate view, which helps the user to examine the relevant information of the selected data points in more detail, and introduces a large language model to assist the user in determining whether to modify the clustering results of these data points. In the "Selected List" option bar, the user can select the specific points that need to be modified, and the corresponding original text will be displayed in the text column below. In order to enhance the user's spatial perception of the selected data points, when the target data point is selected, the lens view will automatically adjust the center of the lens to the target data point, and the target data point will be highlighted to emphasize the position of the target data point in the lens. At the same time, the three clusters closest to the target data point are displayed in the table below. By default, the first row of the table indicates the cluster to which the target data point belongs in the current clustering result. The cluster ID column (Cluster ID) displays the cluster number, and if the cluster is presented in a scatter plot, its corresponding color in the lens view (for example) will also be displayed. Figure 4 In the D part of the figure, the first cluster in the Cluster ID column is numbered 2 and the corresponding color is dark blue). If the cluster is not in the scatter plot, its boundary will be displayed as a gray dotted line, and the background color in the dotted line will be filled with white. The Topic column shows the high-level topics extracted for the cluster using a large language model. The Density Center column shows the data point corresponding to the density center in each cluster, which can be regarded as the representative data point of the cluster.

[0091] Based on the above information, the user can decide whether to modify the clustering of the selected data point. If the user is not sure how to make the modification, you can click the "Analyze" button to introduce a large language model to compare the similarity of the target data point with the nearest clustering cluster. The large language model analyzes the similarity between the target data point and the density center data point, considers the theme of the clustering cluster, and provides appropriate modification suggestions and reasons. Combining the feedback from the language model and the user's own semantic understanding, the user can directly click on the cluster number to modify it. Subsequently, by clicking the "Modify" button, the modified results are passed to the backend. If the user wants to evaluate the modification results, he can click "Confirm" to trigger the backend to calculate the relevant indicators, which will be presented in the indicator view.

[0092] The above process requires modifying each data point one by one. As the amount of data increases, although the system can filter out abnormal data efficiently and accurately, each modification takes a long time, resulting in high time cost and low efficiency. Therefore, based on the large language model, the function of automatically modifying all filtered abnormal data is provided. Users can click the "Auto" button to batch update the predicted clustering labels of the corresponding abnormal data, thereby significantly improving the efficiency of text analysis.

[0093] Exemplarily, the present invention targets English text 1 in the instant view, “There is an incoming payment into my account, but it is deactivated. Will they still be processed? (My account has an incoming payment, but it has been deactivated. Will they still be processed?)”, and obtains the subject of the cluster with cluster ID 2 as text 2 “Unauthorized Payment Issues (Unauthorized Payment Issues)”, and the density center is text 3 “Help me. There is a Direct Debit that I didn't make. (Help me. There is a direct debit that I didn't make.)”; the subject of the cluster with cluster ID 50 as text 4 “Pending Card Payments (Pending Card Payments)”, and the density center is text 5 “Why is a payment showing up on my card as… (Why is the payment shown on my card)”; the subject of the cluster with cluster ID 67 as text 6 “Transaction and Deposit Issues (Transaction and Deposit Issues)”, and the density center is text 7 “I made a transfer and it doesn't' showup in my account (I transferred the money, but it didn’t show up on my account)”; the final suggestion given was text 8 “Modify it to cluster: 50 Reason: The data sentence discusses an incoming payment that is not yet processed, similar to the concern about a payment. (Modify it to cluster: 50, reason: The data sentence discusses an incoming payment that is not yet processed, similar to the concern about a payment)”.

[0094] 3. Cluster view: Based on multiple candidate prediction cluster labels in the instant view, a cluster view is generated; wherein the cluster view includes a performance evaluation radar chart and a word cloud chart corresponding to each candidate prediction cluster label. Figure 4 The word cloud diagram of E1 in the Figure 4 The E2 part in.

[0095] In the clustering view, two views are provided, left and right. Once the clustering results are obtained, the left view (E1) automatically presents comprehensive information for each cluster. The performance evaluation radar chart uses five normalized indicators to display the clustering quality, allowing users to analyze dispersion from the perspective of vectors and text and determine whether there are significant anomalies in each cluster cluster. The word cloud chart intuitively displays the keywords identified based on the text in the cluster cluster, reflecting the different themes within the cluster, so that users can have a macro understanding of the themes of the cluster cluster. When a data point is selected in the instant view, the left view will focus on the three clusters closest to the data point. Users can switch between "All" and "Compare" modes to change the display mode through the provided buttons. The right view (E2) provides a comparative perspective. When the user selects a data point in the instant view, the right view will show the comparison between the three clusters closest to the data point. In addition, the cluster view also uses the nearest cluster radar chart (corresponding to Figure 4 The stacked bar chart below the radar chart of the nearest cluster (corresponding to Figure 4 Section E4 in Figure 1 shows the top three topics in each cluster sorted by frequency, helping users grasp the semantic information of the clusters.

[0096] Example of a word cloud in cluster view Figure 1 For cluster ID 2, word cloud Figure 2 For cluster ID 50, word cloud Figure 3 For cluster ID 67, in the word cloud, the greater the probability of the keyword, the larger the font size. For example, Figure 1 The fonts of "transaction", "unauthorized", and "payment" are larger, and the word cloud Figure 2 The words “pending” and “payment” are larger in font and larger than the word cloud. Figure 1 Word cloud of several words in larger font size Figure 3 Among them, "transfer" has the largest font, followed by "deposit".

[0097] 4. Indicator view: Generate an indicator view based on the predicted cluster labels selected in the instant view; the indicator view is used to display the accuracy, normalized mutual information, and text type word frequency ratio of the selected predicted cluster labels; each time a predicted cluster label is selected, a set of corresponding accuracy, normalized mutual information, and text type word frequency ratio is displayed. Figure 4 Part F of the

[0098] Once you click "Confirm" in the live view, the backend will calculate three specific metrics for this modification. Each confirmation will generate a new set of metrics in the metric view, recording the user's modification process over time. Since the number of modified data points may be relatively small, the change in the metric may be very small, so a progress bar is used to visualize the change in effect. The progress bar displays two decimal places and includes the value to help users accurately evaluate the changes before and after the modification, and then help users make informed judgments on the correctness of abnormal data modifications. The metric view supports the same as the "Modification" column ( Figure 4 When a user clicks on a specific row in the "Modified" column, the progress bars of other rows show the comparison results with the selected row. If the indicators are the same, a blue horizontal bar is displayed. If the indicators of other rows are higher than the selected row, a red upward arrow indicates an increase. On the contrary, if the indicators of other rows are lower than the selected row, a green downward arrow indicates a decrease, to further help users make comparisons between multiple rows and gain a deeper understanding of the changes brought about by the modification.

[0099] 5. Configuration panel: The configuration panel contains controls for selecting text datasets and language models, setting text connection modes, and selecting the number of clusters to display. Users can use controls to select the desired text datasets and language models, set text connection modes, and select the number of clusters to display in the lens view. Since it is impractical to display all clusters, the displayed clusters are based on "Show the highest entropy point" and "Show the nearest cluster", which is less than 30 by default.

[0100] 6. Theme view: The Topic View contains a setup control that allows users to upload prompts for topic extraction. A combined bar chart and line chart are available in the Topic View. In the bar chart, users can explore the top 10 keywords after extraction. The line chart provides a threshold setting control for users to set a threshold to observe the number of phrases exceeding this threshold in 10 incremental thresholds. The number of phrases observed at each threshold helps determine the hyperparameters of the clustering algorithm. Users can confirm the settings and activate the "Cluster Text" button to generate the relevant charts.

[0101] Step S2063, obtaining data analysis results based on performance evaluation and visual analysis.

[0102] Users can perform data analysis and obtain the required data analysis results through the above performance evaluation indicators and visual analysis interface.

[0103] The text clustering enhanced visual analysis method based on a large language model provided in this embodiment first obtains the text data to be analyzed containing multiple data points, then extracts the topic of the text data to be analyzed, obtains multiple topics corresponding to each of the multiple data points, and assigns a probability to each topic. Then, the multiple topics corresponding to each of the multiple data points are connected to the text data to be analyzed to obtain the connected text data to be analyzed, and then the connected text data to be analyzed is processed by the encoding model to obtain each data point after vectorization, and then the vectorized data points are clustered to obtain a clustering result, wherein the clustering result includes multiple cluster clusters, each cluster cluster includes at least two data points, and each cluster cluster corresponds to a predicted cluster label and a semantic topic. Finally, the clustering result is subjected to performance evaluation and visual analysis to obtain a data analysis result. The above scheme connects the text data to be analyzed and the topic before encoding, which can improve the encoding quality in the original vector space, and can enhance the topic strength of each data point through connection, increase the distinction between data points of different topics, and thus improve the accuracy of subsequent clustering, and combine performance evaluation and visual analysis to ensure the accuracy of data analysis.

[0104] As one or more specific application embodiments of the embodiments of the present invention, the optimal implementation scheme or the scheme that the inventor most wants to embody is described below in combination with specific application scenarios.

[0105] Figure 5 1 is a schematic diagram of a text clustering enhanced visual analysis system based on a large language model according to an embodiment of the present invention. The text clustering enhanced visual analysis system based on a large language model comprises a data processing module, a text clustering module, an evaluation index calculation module, a clustering evaluation module and a visual analysis system module. The workflow of the text clustering enhanced visual analysis system based on a large language model starts from the data processing module, in which preliminary data cleaning is performed, and topics are extracted from text data (text data to be analyzed) using LLMs, and then the text data is mixed and encoded into high-dimensional vectors. Next, the text clustering module clusters these high-dimensional vectors and performs cluster-level topic extraction (semantic topics). The processed data is then input into the evaluation index calculation module to calculate the instant and cluster-level data required for visual analysis. The visual analysis system module integrates and displays the above information, supports user exploration and modification using lens views and other interactive views, and continuously presents the overall clustering results through iterative interaction with the clustering evaluation module.

[0106] In the present embodiment, a text clustering enhanced visual analysis device based on a large language model is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0107] This embodiment provides a text clustering enhanced visual analysis device based on a large language model, such as Figure 6 As shown, including: The acquisition module 601 is used to acquire the text data to be analyzed; the text data to be analyzed includes multiple data points; The topic extraction module 602 is used to extract topics from the text data to be analyzed, and obtain multiple topics corresponding to each of the multiple data points; wherein a probability is assigned to each topic; A connection module 603, used to connect the multiple topics corresponding to each of the multiple data points with the text data to be analyzed to obtain the connected text data to be analyzed; An encoding module 604 is used to process the connected text data to be analyzed through an encoding model to obtain vectorized data points; A clustering module 605 is used to cluster the vectorized data points to obtain a clustering result; wherein the clustering result includes a plurality of clusters; each cluster includes at least two data points; each cluster corresponds to a predicted cluster label and a semantic topic; The analysis module 606 is used to perform performance evaluation and visual analysis on the clustering result to obtain a data analysis result.

[0108] In an optional embodiment, the topic extraction module is also used to: for each data point, extract multiple keywords of the data point through a language model; identify multiple topics of the data point based on the extracted multiple keywords of the data point; connect the multiple topics corresponding to each data point of the multiple data points with the text data to be analyzed, including: connecting the multiple keywords of each data point with the text data to be analyzed; the device also includes a keyword frequency module, which is used to: for any two keywords among all the extracted keywords, calculate the frequency of the combination of the two keywords in the text data to be analyzed.

[0109] In an optional embodiment, the analysis module is also used to: calculate the clustering entropy of each data point based on the clustering result; for each clustering cluster, calculate the intra-class average distance, intra-class maximum distance, intra-class deviation and density index between each pair of data points in the clustering cluster; calculate the type word frequency ratio corresponding to each clustering cluster; based on the clustering entropy of each data point, obtain the confusion of each data point assigned to each clustering cluster; based on the intra-class average distance, intra-class maximum distance, intra-class deviation and density index between each pair of data points in each clustering cluster, obtain the numerical compactness of the clustering result; based on the type word frequency ratio corresponding to each clustering cluster, obtain the consistency evaluation value and diversity evaluation value of the clustering result.

[0110] In an optional embodiment, the analysis module is also used to: when the text data to be analyzed contains a true label, calculate the normalized mutual information and accuracy of the text data to be analyzed and the true label; when the text data to be analyzed does not contain a true label, calculate the text type word frequency ratio of the text data to be analyzed.

[0111] In an optional implementation, the text type word frequency ratio a-TTR is calculated by the following formula:

[0112] in, is the number of data points in cluster i, is the total number of data points in the j clusters, is the type word frequency ratio of cluster i.

[0113] In an optional embodiment, the analysis module is also used to: generate a t-SNE scatter plot based on the clustering result, and generate a lens view based on the area of ​​interest selected in the t-SNE scatter plot; the lens view includes, from the inside to the outside, a donut chart consisting of the clusters to which each data point belongs, a donut chart consisting of the topic distribution of each data point, and a donut chart consisting of the cluster entropy of each data point; generate an instant view based on the currently selected data point; the instant view includes multiple candidate predicted cluster labels corresponding to the currently selected data point and modification suggestions for the predicted cluster labels; generate a cluster view based on multiple candidate predicted cluster labels in the instant view; wherein the cluster view includes a performance evaluation radar chart and a word cloud chart corresponding to each candidate predicted cluster label; generate an indicator view based on the predicted cluster label selected in the instant view; the indicator view is used to display the accuracy, normalized mutual information and text type word frequency ratio of the selected predicted cluster label; wherein, each time a predicted cluster label is selected, a set of corresponding accuracy, normalized mutual information and text type word frequency ratio is displayed.

[0114] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0115] The text clustering enhanced visual analysis device based on a large language model in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0116] The embodiment of the present invention also provides a computer device having the above Figure 6 The text clustering enhanced visual analysis device based on a large language model is shown.

[0117] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0118] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0119] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0120] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0121] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0122] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0123] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.

[0124] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0125] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0126] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall all fall within the scope of protection of the present invention.

Claims

1. A text clustering enhanced visual analysis method based on a large language model, characterized in that: The method comprises: Acquire text data to be analyzed; the text data to be analyzed includes multiple data points; Performing topic extraction on the text data to be analyzed to obtain multiple topics corresponding to each of the multiple data points; wherein a probability is assigned to each topic; Connecting a plurality of topics corresponding to each of the plurality of data points with the text data to be analyzed to obtain connected text data to be analyzed; Processing the connected text data to be analyzed through the encoding model to obtain vectorized data points; Clustering the vectorized data points to obtain a clustering result; wherein the clustering result includes a plurality of clusters; each cluster includes at least two data points; each cluster corresponds to a predicted cluster label and a semantic topic; The clustering results are subjected to performance evaluation and visual analysis to obtain data analysis results.

2. The method according to claim 1, characterized in that Performing topic extraction on the text data to be analyzed to obtain multiple topics corresponding to each of the multiple data points, including: For each data point, extract multiple keywords of the data point through a language model; Based on the extracted multiple keywords of the data points, identifying multiple topics of the data points; The step of connecting the plurality of topics corresponding to each of the plurality of data points with the text data to be analyzed includes: Connect multiple keywords of each data point with the text data to be analyzed.

3. The method according to claim 1, characterized in that The performing performance evaluation on the clustering result includes: Calculating the clustering entropy of each data point based on the clustering result; For each cluster, calculate the intra-class average distance, intra-class maximum distance, intra-class deviation and density index between each pair of data points in the cluster; Calculate the type word frequency ratio corresponding to each cluster; Based on the clustering entropy of each data point, the confusion of each data point assigned to each cluster cluster is obtained; Based on the intra-class average distance, intra-class maximum distance, intra-class deviation and density index between each pair of data points in each cluster, the numerical compactness of the clustering result is obtained; Based on the type word frequency ratio corresponding to each cluster, a consistency evaluation value and a diversity evaluation value of the clustering result are obtained.

4. The method according to claim 1, characterized in that The performing performance evaluation on the clustering result further includes: When the text data to be analyzed includes a true label, calculating the normalized mutual information and accuracy of the text data to be analyzed and the true label; When the text data to be analyzed does not contain a true label, the text type word frequency ratio of the text data to be analyzed is calculated.

5. The method according to claim 1, characterized in that The text type word frequency ratio a-TTR is calculated by the following formula: in, is the number of data points in cluster i, is the total number of data points in the j clusters, is the type word frequency ratio of cluster i.

6. The method according to claim 1, characterized in that The visual analysis of the clustering results includes: A t-SNE scatter plot is generated based on the clustering result, and a lens view is generated based on the region of interest selected in the t-SNE scatter plot; the lens view includes, from the inside to the outside, a donut plot composed of clusters to which each data point belongs, a donut plot composed of thematic distributions of each data point, and a donut plot composed of cluster entropies of each data point; Generate an instant view based on the currently selected data point; the instant view includes a plurality of candidate predicted cluster labels corresponding to the currently selected data point and a modification suggestion for the predicted cluster label; Based on the multiple candidate prediction cluster labels in the instant view, a cluster view is generated; wherein the cluster view includes a performance evaluation radar chart and a word cloud chart corresponding to each candidate prediction cluster label; Based on the predicted clustering label selected in the instant view, an indicator view is generated; the indicator view is used to display the accuracy, normalized mutual information and text type word frequency ratio of the selected predicted clustering label; wherein, each time a predicted clustering label is selected, a set of corresponding accuracy, normalized mutual information and text type word frequency ratio is displayed.

7. A text clustering enhanced visual analysis device based on a large language model, characterized in that: The device comprises: An acquisition module, used to acquire text data to be analyzed; the text data to be analyzed includes multiple data points; A topic extraction module is used to extract topics from the text data to be analyzed, and obtain multiple topics corresponding to each of the multiple data points; wherein a probability is assigned to each topic; A connection module, used for connecting a plurality of topics corresponding to each of the plurality of data points with the text data to be analyzed to obtain the connected text data to be analyzed; An encoding module, used for processing the connected text data to be analyzed through an encoding model to obtain vectorized data points; A clustering module, used for clustering the vectorized data points to obtain a clustering result; wherein the clustering result includes a plurality of clusters; each cluster includes at least two data points; each cluster corresponds to a predicted cluster label and a semantic theme; The analysis module is used to perform performance evaluation and visual analysis on the clustering results to obtain data analysis results.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the text clustering enhanced visual analysis method based on a large language model according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the text clustering enhanced visual analysis method based on a large language model according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the text clustering enhanced visual analysis method based on a large language model according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Text clustering-based subject term extraction method

    CN112749279A

  • Video bullet screen and comment theme fusion method based on text clustering

    CN115470344A

  • Automatic comment generation method based on large-scale language model and related device

    CN116882414A

  • Interactive hierarchical topic modeling visual analysis method and device based on BERTopic

    CN117407520A

  • Unstructured text data visualization method, device and equipment

    CN117874217A

Cited By

  • Semi-supervised clustering method and open question answering text coding method thereof

    CN119581050A

  • Data set quality evaluation method and device, equipment, medium and program product

    CN120372325A