Text clustering method and device, computer equipment and storage medium

The text clustering method automates the determination of clustering levels and title generation for credit review text using SBERT, UMAP, HDBSCAN, and c-TF-IDF, enhancing data structure and accuracy while reducing manual intervention.

CN119128150AActive Publication Date: 2024-12-13PING AN INT FINANCIAL LEASING CO LTD

Patent Information

Application Number
CN202411174498.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-13
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

Existing multi-layer clustering methods for credit review text cannot automatically determine the number of clustering levels and name the clustered text collection, requiring manual intervention and inefficient rule formulation.

Method used

A text clustering method involving multi-layer clustering processing using SBERT, UMAP, HDBSCAN, and c-TF-IDF algorithms to automatically set clustering levels and generate hierarchical titles, followed by cluster verification using a large language model to ensure semantic coherence.

Benefits of technology

Automatically sets clustering levels, enhances structured representation of credit review data, improves title relevance and accuracy, and reduces manual effort by generating descriptive category names with improved logical and semantic coherence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128150A_ABST
    Figure CN119128150A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the field of artificial intelligence and text hierarchical clustering, and relates to a text clustering method, which comprises the following steps of: obtaining credit review text data, performing multi-layer clustering processing on the credit review text data to obtain a clustering topic set and a clustering text set, inputting the clustering topic set and the clustering text set into a preset large language model, and generating a credit title set, the credit title set comprising a plurality of levels of credit titles, and performing clustering verification on the credit titles of all levels in the credit title set to obtain a credit clustering relation. The invention further provides a text clustering device, computer equipment and a storage medium. According to the method, the manual intervention requirement is reduced through automatic clustering level judgment, meanwhile, the clustering title is automatically generated through the large language model, the labor amount of manual naming is reduced, and the accuracy of clustering and title generation is ensured through clustering verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of artificial intelligence and text hierarchical clustering, and in particular to a text clustering method, apparatus, computer equipment and storage medium. Background Art

[0002] One requirement in the credit review scenario is to perform multi-layer classification on the credit review text. The original credit review multi-layer classification requires manual determination of the number of classification layers and the classification rules of each layer. Therefore, new multi-layer classification rules need to be set for texts with new distribution characteristics, which requires a lot of effort to determine whether the text conforms to the existing classification rules, and even requires the formulation of new classification rules.

[0003] To solve the above problems, the traditional solution adopts a multi-layer clustering method. The existing multi-layer clustering method is set to three-layer clustering to obtain primary text, secondary text and tertiary text, and cluster the tertiary text according to multiple levels of TFIDF scores.

[0004] However, this multi-layer clustering method cannot automatically determine the clustering results of each layer, and this method uses three-layer clustering and cannot automatically set the number of clustering layers. In addition, this clustering method cannot automatically name the clustered text collection. Summary of the invention

[0005] The purpose of the embodiments of the present application is to propose a text clustering method, apparatus, computer device and storage medium to solve the problem that the number of clustering levels cannot be automatically set and the clustered text collection cannot be automatically named and verified.

[0006] In order to solve the above technical problems, the present application embodiment provides a text clustering method, which adopts the following technical solution:

[0007] Obtain credit review text data;

[0008] Performing multi-layer clustering processing on the credit review text data to obtain a cluster topic set and a cluster text set;

[0009] Inputting the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set, wherein the credit review title set includes credit review titles of several levels;

[0010] Cluster verification is performed on the credit review titles of all levels in the credit review title set to obtain credit review cluster connections.

[0011] Furthermore, the step of performing multi-layer clustering processing on the credit review text data to obtain a cluster topic set and a cluster text set specifically includes:

[0012] Inputting the credit review text data into a preset clustering module for clustering processing to obtain a target text data set and a target clustering theme;

[0013] Counting the number of texts in the target text data set to obtain a first judgment result corresponding to the number of texts;

[0014] If the first judgment result is that the number of texts in the target text data set is greater than 1, the target text data set is used as input data and is input into the preset clustering module for iteration to obtain a sub-level target text data set and a sub-level target clustering topic until the number of texts in the sub-level target text data set is equal to 1;

[0015] If the first judgment result is that the number of texts in the target text data set is equal to 1, the target text data set is used as the cluster text set, and the target cluster topic is used as the cluster topic set.

[0016] Further, if the first judgment result is that the number of texts in the target text data set is greater than 1, the target text data set is used as input data and is input into the preset clustering module for iteration to obtain a sub-level target text data set and a sub-level target clustering topic until the number of texts in the sub-level target text data set is equal to 1, the method further includes:

[0017] Counting the number of texts in the sub-level target text data set to obtain a second judgment result corresponding to the number of texts in the sub-level target text data set;

[0018] When the second judgment result is that the number of texts in the target text data set is equal to 1, all the target text data sets and the sub-level target text data sets are collected as the cluster text set, and all the target cluster topics and the sub-level target cluster topics are collected as the cluster topic set.

[0019] Furthermore, the preset clustering module includes the step of inputting the letter review text data into the preset clustering module for clustering processing to obtain a target text data set and a target clustering theme, specifically including:

[0020] Performing text representation on the credit review text data through the SBERT model to obtain a text embedding vector;

[0021] Performing dimensionality reduction processing on the text embedding vector by using the UMAP algorithm to obtain a target text vector;

[0022] Clustering the target text vectors based on the HDBSCAN algorithm to obtain the target text data set;

[0023] The target text data set is subjected to topic generation by using the c-TF-IDF algorithm to obtain the target clustering topic.

[0024] Furthermore, the step of inputting the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set specifically includes:

[0025] Performing text extraction on the clustered topic set through the preset large language model to obtain a target title factor;

[0026] Extracting the title of each clustered text in the clustered text set based on the target title factor to obtain the credit review title;

[0027] The letter review titles corresponding to all the clustered texts are collected to obtain the letter review title set.

[0028] Furthermore, the step of clustering and verifying the credit review titles of all levels in the credit review title set to obtain the credit review clustering connection specifically includes:

[0029] Performing semantic judgment on the credit review title to generate a target credit review tag, wherein one target credit review tag corresponds to one credit review title;

[0030] The target credit review labels corresponding to the credit review titles at different levels are verified on the credit review text data through a preset text question and answer template to obtain the credit review clustering relationship.

[0031] Furthermore, after the step of clustering and verifying the credit review titles of all levels in the credit review title set to obtain the credit review clustering connection, the step further includes:

[0032] Based on the credit review clustering relationship, the credit review text data is screened for titles to obtain a target credit review title name.

[0033] In order to solve the above technical problems, the present application embodiment also provides a text clustering device, which adopts the following technical solution:

[0034] The acquisition module is used to obtain the letter review text data;

[0035] A processing module, used for performing multi-layer clustering processing on the credit review text data to obtain a cluster topic set and a cluster text set;

[0036] A generation module, used for inputting the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set, wherein the credit review title set includes credit review titles of several levels;

[0037] The verification module is used to perform cluster verification on the credit review titles of all levels in the credit review title set to obtain the credit review cluster connection.

[0038] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0039] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the text clustering method when executing the computer-readable instructions.

[0040] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0041] A computer-readable storage medium, characterized in that computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the text clustering method are implemented.

[0042] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0043] The embodiment of the present application obtains letter review text data, performs multi-layer clustering processing on the letter review text data, obtains cluster topic sets and cluster text sets, inputs the cluster topic sets and the cluster text sets into a preset large language model, generates a letter review title set, performs clustering verification on letter review titles of all levels in the letter review title set, obtains letter review clustering connections, and deeply mines the hierarchical structure in the text data through multi-layer clustering processing, effectively extracts topics and text sets of different levels, and enhances the structured representation of the data. Secondly, the clustering results are input into the large language model to generate hierarchical letter review titles, which improves the relevance and accuracy of the titles, realizes the automatic generation of descriptive category names, and reduces manual participation. Finally, through cluster verification, the logical and semantic coherence of the titles at each level is ensured, and the clustering quality and reliability of the results are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0046] Figure 2A flowchart of an embodiment of a text clustering method according to the present application;

[0047] Figure 3 is a structural schematic diagram of an embodiment of a text clustering device according to the present application;

[0048] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0050] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0051] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0052] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0053] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0054] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers, etc.

[0055] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0056] It should be noted that the text clustering method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the text clustering device is generally arranged in the server / terminal device.

[0057] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0058] Continue to refer Figure 2 , a flowchart of a text clustering method according to an embodiment of the text clustering method of the present application is shown, comprising the following steps:

[0059] Step S201, obtaining letter review text data.

[0060] In this embodiment, the text clustering method can be deployed in a text clustering platform. The text clustering platform can be constructed by a server or a server cluster. The server or server cluster can be any electronic device with functions such as text recognition, text processing, data transmission, and data storage. The text clustering method runs on the electronic device (for example, Figure 1 The server / terminal device shown in the figure) can obtain the letter review text data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0061] In this embodiment, the credit review text data can be various text information generated during the credit review process. Specifically, the credit review text data can include personal credit reports, loan application forms, repayment records, transaction history, financial statements, etc., covering all written materials related to the borrower's credit. More specifically, the credit review text data contains rich personal and financial information, which can be used to assess the borrower's credit status and debt repayment ability, and can help financial institutions make more accurate loan decisions and reduce credit risks.

[0062] Step S202, performing multi-layer clustering processing on the credit review text data to obtain a cluster topic set and a cluster text set.

[0063] In this embodiment, the clustering theme set may be a collection of subject words or subject phrases identified in each clustering level obtained through multi-layer clustering processing. The clustering theme set represents the main concepts and key information in the credit review text data, and is used to describe the core content of the text in each cluster. The clustering theme set may include keywords such as credit risk, loan purpose, and repayment ability.

[0064] In this embodiment, the above-mentioned clustered text set may refer to a text set formed by grouping according to similarity or subject consistency during the multi-layer clustering process. Specifically, each clustered text set contains clustered texts with similar themes or contents, and the above-mentioned clustered texts are classified into the same category through common features or keywords. For example, texts related to the topic of "loan default" will be clustered in one cluster, while texts related to "asset evaluation" will form another cluster. One of the above-mentioned clustered subject sets corresponds to one of the above-mentioned clustered text sets.

[0065] Specifically, regarding the specific implementation process of the above-mentioned multi-layer clustering processing of the credit review text data to obtain the cluster topic set and the cluster text set, this application will provide further detailed descriptions of this in subsequent specific embodiments, and will not be elaborated in detail here.

[0066] Step S203: input the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set.

[0067] In this embodiment, the credit review title set includes several levels of credit review titles. Specifically, the credit review title can be a title text used to describe the core content of each cluster text in the cluster text set. The credit review title can be a concise phrase text such as "high-risk borrower analysis" or "stable repayment record assessment". The specific form of the credit review title depends on the level of detail of the cluster text and the information accuracy required by the user. The credit review title can be used by financial institutions to quickly grasp the key information of the credit review text data and optimize the efficiency and accuracy of the credit review process.

[0068] In this embodiment, the above-mentioned preset large language model can be a general language model for text generation and semantic understanding optimization, such as OpenAI's GPT series, Google's BERT model or T5 model.

[0069] Specifically, the above-mentioned preset large language model can learn the deep structure and semantics of the language by pre-training on a large-scale data set, so that it can effectively understand and generate accurate titles related to the input clustered topic set and clustered text set. The specific model to be selected can be determined according to the requirements of the task and the expected output complexity. For example, according to the expected output complexity from high to low, the GPT-4 model, BERT model, and T5 model can be selected in turn.

[0070] Specifically, regarding the specific implementation process of inputting the clustered topic set and the clustered text set into the preset large language model to generate the credit review title set, this application will provide further detailed descriptions in subsequent specific embodiments and will not be elaborated on here.

[0071] Step S204, cluster verification is performed on the credit review titles of all levels in the credit review title set to obtain credit review cluster connections.

[0072] In this embodiment, the above-mentioned credit review clustering relationship can be used to represent the logical and semantic relationship between credit review titles and credit review text data at all levels. Specifically, the above-mentioned credit review clustering relationship can be used to reveal the subject similarity relationship between different credit review titles and credit review text data, ensuring that each credit review title correctly reflects the core content of the credit review text data and is logically consistent with other credit review titles.

[0073] Specifically, regarding the above-mentioned specific implementation process of clustering and verifying the credit review titles of all levels in the credit review title set to obtain the credit review clustering connection, this application will provide further detailed descriptions of this in subsequent specific embodiments, and will not be elaborated on here.

[0074] The present application obtains letter review text data, performs multi-layer clustering processing on the letter review text data, obtains cluster topic sets and cluster text sets, inputs the cluster topic sets and the cluster text sets into a preset large language model, generates a letter review title set, performs clustering verification on letter review titles of all levels in the letter review title set, obtains letter review clustering connections, deeply mines the hierarchical structure in the text data through multi-layer clustering processing, effectively extracts topics and text sets of different levels, and enhances the structured representation of the data. Secondly, the clustering results are input into the large language model to generate hierarchical letter review titles, which improves the relevance and accuracy of the titles, realizes the automatic generation of descriptive category names, and reduces manual participation. Finally, through cluster verification, the logical and semantic coherence of the titles at each level is ensured, and the clustering quality and reliability of the results are improved.

[0075] In some optional implementations, step S202 includes the following steps:

[0076] Input the credit review text data into the preset clustering module for clustering processing to obtain the target text data set and target clustering topics;

[0077] Counting the number of texts in the target text data set to obtain a first judgment result corresponding to the number of texts;

[0078] If the first judgment result is that the number of texts in the target text data set is greater than 1, the target text data set is used as input data and is input into a preset clustering module for iteration to obtain a sub-level target text data set and a sub-level target clustering topic until the number of texts in the sub-level target text data set is equal to 1;

[0079] If the first judgment result is that the number of texts in the target text data set is equal to 1, the target text data set is used as the cluster text set, and the target cluster topic is used as the cluster topic set.

[0080] In this embodiment, the first judgment result can be an evaluation result obtained by counting the number of texts in the target text data set. Specifically, the first judgment result can be used to determine whether the target text data set needs to continue clustering segmentation. If the number of texts in the target text data set is greater than 1, this means that there are enough texts in the current collection and further segmentation can be performed to explore more detailed clustering topics and text data sets; if the number of texts is equal to 1, it means that the target text data set is specific enough and does not need to be further segmented.

[0081] In this embodiment, the sub-level target text data set may be a text set obtained from the target text data set through further clustering and segmentation, and the texts contained in the text set have higher similarity in certain specific topics or features.

[0082] In this embodiment, the above-mentioned sub-level target clustering topics can be clustering topics generated for each sub-level target text data set, representing the core content or main information of the sub-level target text data set. The above-mentioned sub-level target clustering topics can be used to help further understand the specific focus or features of each sub-level target text data set, and provide guidance for subsequent data processing and information extraction.

[0083] Specifically, regarding the specific implementation process of inputting the credit review text data into the preset clustering module for clustering processing to obtain the target text data set and the target clustering theme, this application will provide further detailed descriptions of this in subsequent specific embodiments and will not be elaborated in detail here.

[0084] In a possible embodiment, the credit review text data is first input into the clustering module constructed by the BERTopic algorithm (i.e., the above-mentioned preset clustering module), and a preliminary clustering process is performed to generate a target text data set and its corresponding target clustering topic. Then, the target text data set is loaded into a DataFrame structure using Python's Pandas library, and then the len() function or .shape[0] attribute of the DataFrame is used to obtain the number of texts in the data set. If the number of texts exceeds 1, it means that the text data in the target text data set can be further subdivided, so the target text data set is re-input into the above-mentioned clustering module for further iterative clustering to generate a smaller sub-level target text data set and the corresponding clustering topic. This iterative process continues until the number of texts in any sub-level target text data set drops to 1. If the number of texts is equal to 1, the target text data set is regarded as a clustered text set, and its corresponding clustering topic is determined as the clustering topic set of the clustered text set.

[0085] Through the multi-layer clustering processing method in the above-mentioned embodiment, the present application can effectively organize and deeply analyze the credit review text data. Through automatic iterative clustering segmentation, the credit review text data can be divided in detail at different levels, thereby revealing the complex structure and deep-level themes in the credit review text data, improving the depth of understanding of the credit review text data, and enhancing the retrievability and manageability of information. The clustering themes of each layer accurately reflect the key themes in the clustered text set, providing financial institutions with more accurate credit review decision support.

[0086] In some optional implementations, after the step of "when the first judgment result is that the number of texts in the target text data set is greater than 1, the target text data set is used as input data and is repeatedly input into a preset clustering module for iteration to obtain a sub-level target text data set and a sub-level target clustering topic until the number of texts in the sub-level target text data set is equal to 1", the following steps are also included:

[0087] Counting the number of texts in the sub-level target text data set to obtain a second judgment result corresponding to the number of texts in the sub-level target text data set;

[0088] When the second judgment result is that the number of texts in the target text data set is equal to 1, all target text data sets and sub-level target text data sets are collected as cluster text sets, and all target cluster topics and sub-level target cluster topics are collected as cluster topic sets.

[0089] In this embodiment, the second judgment result can be an evaluation result obtained by counting the number of texts in the sub-level target text data set. Specifically, the second judgment result can be used to determine whether the sub-level target text data set needs to continue clustering and segmenting. If the number of texts in the sub-level target text data set is greater than 1, this means that there are enough texts in the current set and further segmentation can be performed to explore more detailed clustering topics and text data sets; if the number of texts is equal to 1, it means that the sub-level target text data set is specific enough and does not need to be further segmented.

[0090] In a possible embodiment, first use Python's Pandas library for each sub-level target text dataset, load the dataset into a DataFrame and obtain the number of texts through the len() function or the .shape[0] attribute to form a second judgment result. If the second judgment result shows that the number of texts is equal to 1, it indicates that the sub-level target text dataset no longer needs to be further segmented and can be directly regarded as the final clustered text set. At this time, all target text datasets and sub-level target text datasets are aggregated as the final clustered text set, and the corresponding target cluster topics and sub-level target cluster topics are collected as the final cluster topic set.

[0091] This application can achieve refined data analysis and optimized information structuring through statistical and clustering segmentation methods for sub-level target text datasets, and automatically determine when to stop further clustering segmentation, ensuring that the processing of each sub-level target text dataset is necessary and sufficient, avoiding the problem of over-segmentation or under-segmentation.

[0092] In some optional implementations, the step of "inputting the credit review text data into a preset clustering module for clustering processing to obtain a target text data set and a target clustering topic" includes the following steps:

[0093] The SBERT model is used to represent the credit review text data and obtain the text embedding vector.

[0094] Use the UMAP algorithm to reduce the dimension of the text embedding vector and obtain the target text vector;

[0095] Cluster the target text vectors based on the HDBSCAN algorithm to obtain the target text dataset;

[0096] The c-TF-IDF algorithm is used to generate topics for the target text dataset and obtain the target clustering topics.

[0097] In this embodiment, the preset clustering module may include a text representation submodule, a text clustering submodule and a topic representation submodule. The text representation submodule is composed of the SBERT model as the main architecture and the UMAP algorithm as the auxiliary algorithm; the text clustering submodule is composed of the HDBSCAN algorithm as the basic algorithm, and the topic representation submodule is composed of the c-TF-IDF algorithm as the basic algorithm.

[0098] In this embodiment, the SBERT model can be a variant based on the BERT (Bidirectional Encoder Representations from Transformers) architecture, which is specifically used to generate text embeddings at the sentence or paragraph level, and is obtained by using a pre-trained Transformer model and fine-tuning it.

[0099] In this embodiment, the above-mentioned UMAP algorithm (Uniform Manifold Approximation and Projection) may be a nonlinear dimensionality reduction technology, which is used to map high-dimensional data to a low-dimensional space while preserving the original structure of the data as much as possible.

[0100] In this embodiment, the above-mentioned HDBSCAN algorithm (Hierarchical Density-Based Spatial Clustering of Applications with Noise) can be a density-based clustering algorithm, which can process data with different density areas and identify noise points. The above-mentioned HDBSCAN does not require the pre-specification of the number of clusters and is suitable for automatically discovering the number and shape of clusters.

[0101] In this embodiment, the c-TF-IDF algorithm (Class-based Term Frequency-Inverse Document Frequency) can be a special TF-IDF algorithm for extracting topics from a text collection. Different from the traditional TF-IDF algorithm that mainly focuses on the frequency and inverse document frequency of words, the c-TF-IDF algorithm emphasizes the distribution weight of words in clusters by calculating the importance of words in specific categories, thereby effectively revealing the theme words or phrases of each clustered text set.

[0102] In a possible embodiment, the credit review text data is first processed by the SBERT model to generate a high-dimensional text embedding vector, which is then reduced in dimension by the UMAP algorithm and converted into a low-dimensional target text vector to facilitate more effective clustering analysis. The low-dimensional target text vector is then input into the HDBSCAN algorithm to cluster the data based on density and hierarchical principles, automatically identify and generate a target text data set, and finally, the c-TF-IDF algorithm is used to perform topic analysis on the text data set generated by each cluster, extract the keyword of each cluster, and form a clear target clustering topic.

[0103] This application achieves efficient and in-depth credit review text data analysis by integrating the implementation plans of SBERT, UMAP, HDBSCAN and c-TF-IDF algorithms. SBERT provides accurate text representation and retains the semantic information of sentences. UMAP effectively reduces the dimension and provides a suitable data structure for clustering. HDBSCAN automatically identifies data clusters through its density-based clustering method, optimizes the quality and accuracy of clustering results, and is not affected by noise. Finally, the c-TF-IDF algorithm accurately extracts topics, enhances the interpretability of clustering results, and improves the automation level, accuracy and efficiency of credit review data processing, enabling financial institutions to conduct credit assessments faster and more accurately, thereby improving decision-making quality and customer service levels.

[0104] In some optional implementations, step S203 includes the following steps:

[0105] The text of the clustered topic set is refined through the preset large language model to obtain the target title factor;

[0106] Based on the target title factor, extract the title of each clustered text in the clustered text set to obtain the credit review title;

[0107] Collect the credit review titles corresponding to all clustered texts to obtain a credit review title set.

[0108] In this embodiment, the target title factor may be a core concept, a keyword group or a phrase extracted from the cluster topic set, and the target title factor may be used to summarize the topic of each cluster.

[0109] In a possible embodiment, the above clustered topic set can be input into the ERNIE (Enhanced Representation through kNowledge Integration) model. The above ERNIE is a pre-trained model based on knowledge enhancement, which can be used to process text data and extract target title factors. The clustered topic set is deeply analyzed through the ERNIE model, and keywords and phrases closely related to each topic are extracted as target title factors. Then, using the target title factors, an accurate and descriptive credit review title is automatically generated for each text in the clustered text set through a graph network-based extraction algorithm. Finally, all generated credit review titles are collected to form a comprehensive credit review title set.

[0110] The above-mentioned graph network-based extraction algorithm can be a graph convolutional network (GCN). Specifically, the above-mentioned title extraction can be to regard each cluster text and target title factor as a node in the above-mentioned graph convolutional network, and the connection (edge) between the nodes represents the correlation between the cluster text and the target title factor. Then, GCN is trained on this graph to learn the embedding representation of the node (cluster text and target title factor). Through the above-mentioned embedding representation, GCN can effectively extract key information from each cluster text and convert this information into an accurate credit review title.

[0111] This application combines the ERNIE model and the graph convolutional network (GCN) implementation scheme to deeply understand and refine the key concepts and vocabulary in the clustered topic set, providing an accurate semantic basis for title generation. Further combined with GCN, by constructing a relationship graph of nodes and edges, it effectively simulates the interaction between clustered text and target title factors. The embedded representation obtained through network training further enhances the information extraction and title accuracy.

[0112] In some optional implementations, step S204 includes the following steps:

[0113] Perform semantic judgment on the credit review title and generate the target credit review label;

[0114] The target credit review labels corresponding to the credit review titles at different levels are verified on the credit review text data through a preset text question-answering template to obtain the credit review clustering connection.

[0115] In this embodiment, a target letter review tag corresponds to a letter review title, and the target letter review tag can be a text tag or keyword closely related to the letter review title. Specifically, the target letter review tag can be extracted from the letter review title and can be used to classify and index the letter review text.

[0116] In a possible embodiment, a semantic analysis of the credit review title can be performed through a large language model such as BERT or GPT, and the core concepts and keywords can be extracted as the above-mentioned target credit review labels. The credit review text data and the target credit review labels are integrated together and prepared as input data. The above-mentioned input data can be used to generate an instructive prompt to guide the large language model to perform analysis. Specifically, each credit review text data is combined with all target credit review labels and formatted into a standardized query according to the preset instruction, such as: "Please determine which title in the set the text belongs to based on the semantics of the text for the given text and title set, and finally return the title name to which the text belongs." This query is then input into a pre-trained large language model, such as GPT-3 or BERT. These models determine the title that best matches each text in the credit review text data based on the above content and the target credit review label, and establish the above-mentioned credit review clustering connection.

[0117] This application combines the credit review text with the target credit review label, verifies the credit review text data through a preset text question and answer template, and obtains the credit review clustering connection. It can accurately identify the relationship between the text and the title, ensure the accuracy and consistency of the clustering, improve the accessibility of information and operational efficiency in the credit review process, and help financial institutions to quickly and accurately conduct risk assessment and decision-making.

[0118] In some optional implementations, after step S204, the following steps are further included:

[0119] Based on the credit review clustering connection, the title of the credit review text data is screened to obtain the target credit review title name.

[0120] In a possible embodiment, the matching degree between each text data item and each title can be evaluated first based on the credit review clustering connection, and the best matching title, that is, those semantically closest titles, can be selected for each text segment as the target credit review title name. The selection accuracy of the target credit review title name can also be optimized by setting thresholds or using ranking algorithms, and finally a precisely matched and highly relevant target credit review title set is formed, thereby improving the organization and usability of the credit review document.

[0121] This application can achieve accurate classification and efficient management of letter review texts by screening titles of letter review text data based on letter review clustering connections, ensuring that each text is accurately matched with its most relevant title, thereby improving the speed and accuracy of information retrieval.

[0122] It can be understood that in the specific implementation of the present application, related data such as target credit review title credit review text data, cluster topic sets and cluster text sets are involved. When the embodiments in the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0123] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target credit review title name credit review text data, cluster topic set and cluster text set information, the above-mentioned target credit review title name credit review text data, cluster topic set and cluster text set information can also be stored in a blockchain node.

[0124] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0125] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0126] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0128] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0129] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a text clustering device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0130] like Figure 3 As shown, the text clustering device 300 described in this embodiment includes: an acquisition module 301, a processing module 302, a generation module 303 and a verification module 304. Among them:

[0131] The acquisition module 301 is used to acquire the letter review text data;

[0132] Processing module 302, used for performing multi-layer clustering processing on the letter review text data to obtain cluster topic sets and cluster text sets;

[0133] A generation module 303 is used to input the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set, wherein the credit review title set includes credit review titles of several levels;

[0134] The verification module 304 is used to perform cluster verification on the credit review titles of all levels in the credit review title set to obtain credit review cluster connections.

[0135] In a possible embodiment, the processing module 302 includes:

[0136] A first processing submodule is used to input the credit review text data into a preset clustering module for clustering processing to obtain a target text data set and a target clustering theme;

[0137] A first statistical submodule, used for counting the number of texts in the target text data set to obtain a first judgment result corresponding to the number of texts;

[0138] A first judgment submodule, for, if the first judgment result is that the number of texts in the target text data set is greater than 1, then the target text data set is used as input data, and is input into the preset clustering module for iteration to obtain a sub-level target text data set and a sub-level target clustering topic, until the number of texts in the sub-level target text data set is equal to 1;

[0139] The second judgment submodule is used to use the target text data set as the cluster text set and the target cluster topic as the cluster topic set if the first judgment result is that the number of texts in the target text data set is equal to 1.

[0140] In a possible embodiment, after the first judgment submodule, the method further includes:

[0141] A second statistical submodule is used to count the number of texts in the sub-level target text data set to obtain a second judgment result corresponding to the number of texts in the sub-level target text data set;

[0142] The third judgment submodule is used to collect all the target text data sets and the sub-level target text data sets as the cluster text set, and collect all the target cluster topics and the sub-level target cluster topics as the cluster topic set when the second judgment result is that the number of texts in the target text data set is equal to 1.

[0143] In a possible embodiment, the first processing submodule includes:

[0144] A representation unit, used for performing text representation on the credit review text data through the SBERT model to obtain a text embedding vector;

[0145] A dimensionality reduction processing unit, used to perform dimensionality reduction processing on the text embedding vector by using a UMAP algorithm to obtain a target text vector;

[0146] A clustering unit, used for clustering the target text vector based on the HDBSCAN algorithm to obtain the target text data set;

[0147] A generating unit is used to generate topics for the target text data set by using a c-TF-IDF algorithm to obtain the target clustering topics.

[0148] In a possible embodiment, the generating module 303 includes:

[0149] The second processing submodule is used to perform text extraction on the clustered topic set through the preset large language model to obtain a target title factor;

[0150] A title extraction submodule, used for extracting the title of each clustered text in the clustered text set based on the target title factor to obtain the credit review title;

[0151] The collecting submodule is used to collect the credit review titles corresponding to all the clustered texts to obtain the credit review title set.

[0152] In a possible embodiment, the verification module 304 includes:

[0153] The third processing submodule is used to perform semantic judgment on the credit review title and generate a target credit review tag, where one target credit review tag corresponds to one credit review title;

[0154] The fourth processing submodule is used to verify the target credit review labels corresponding to the credit review titles at different levels through a preset text question and answer template on the credit review text data to obtain the credit review clustering relationship.

[0155] In a possible embodiment, after the verification module 304, the following steps are included:

[0156] The title screening submodule is used to screen the title of the letter review text data based on the letter review clustering relationship to obtain the target letter review title name.

[0157] In this embodiment, by acquiring letter review text data, multi-layer clustering processing is performed on the letter review text data to obtain cluster topic sets and cluster text sets, the cluster topic sets and the cluster text sets are input into a preset large language model to generate a letter review title set, clustering verification is performed on letter review titles of all levels in the letter review title set to obtain letter review clustering connections, and the hierarchical structure in the text data is deeply mined through multi-layer clustering processing, and the topics and text sets of different levels are effectively extracted, thereby enhancing the structured representation of the data. Secondly, the clustering results are input into the large language model to generate hierarchical letter review titles, thereby improving the relevance and accuracy of the titles, realizing automatic generation of descriptive category names, and reducing manual participation. Finally, through clustering verification, the logical and semantic coherence of the titles at each level is ensured, thereby improving the clustering quality and reliability of the results.

[0158] In this embodiment, the operations performed by the above units or modules correspond one-to-one to the steps of the text clustering method in the above implementation mode, which will not be described in detail here.

[0159] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0160] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0161] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0162] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the text clustering method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0163] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the text clustering method.

[0164] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0165] The present embodiment provides a computer device, which obtains letter review text data, performs multi-layer clustering processing on the letter review text data, obtains cluster topic sets and cluster text sets, inputs the cluster topic sets and the cluster text sets into a preset large language model, generates a letter review title set, performs clustering verification on letter review titles of all levels in the letter review title set, obtains letter review clustering connections, deeply mines the hierarchical structure in the text data through multi-layer clustering processing, effectively extracts topics and text sets of different levels, and enhances the structured representation of the data. Secondly, the clustering results are input into the large language model to generate hierarchical letter review titles, which improves the relevance and accuracy of the titles, realizes the automatic generation of descriptive category names, and reduces manual participation. Finally, through cluster verification, the logical and semantic coherence of the titles at each level is ensured, and the clustering quality and reliability of the results are improved.

[0166] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the text clustering method as described above.

[0167] The present embodiment provides a computer-readable storage medium, which obtains letter review text data, performs multi-layer clustering processing on the letter review text data, obtains cluster topic sets and cluster text sets, inputs the cluster topic sets and the cluster text sets into a preset large language model, generates a letter review title set, performs clustering verification on letter review titles of all levels in the letter review title set, obtains letter review clustering connections, deeply mines the hierarchical structure in the text data through multi-layer clustering processing, effectively extracts topics and text sets of different levels, and enhances the structured representation of the data. Secondly, the clustering results are input into the large language model to generate hierarchical letter review titles, which improves the relevance and accuracy of the titles, realizes the automatic generation of descriptive category names, and reduces manual participation. Finally, through cluster verification, the logical and semantic coherence of the titles at each level is ensured, and the clustering quality and reliability of the results are improved.

[0168] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0169] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A text clustering method, characterized in that: The steps include: Obtain credit review text data; Performing multi-layer clustering processing on the credit review text data to obtain a cluster topic set and a cluster text set; Inputting the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set, wherein the credit review title set includes credit review titles of several levels; Cluster verification is performed on the credit review titles of all levels in the credit review title set to obtain credit review cluster connections.

2. The text clustering method according to claim 1, characterized in that: The step of performing multi-layer clustering processing on the credit review text data to obtain a cluster topic set and a cluster text set specifically includes: Inputting the credit review text data into a preset clustering module for clustering processing to obtain a target text data set and a target clustering theme; Counting the number of texts in the target text data set to obtain a first judgment result corresponding to the number of texts; If the first judgment result is that the number of texts in the target text data set is greater than 1, the target text data set is used as input data and is input into the preset clustering module for iteration to obtain a sub-level target text data set and a sub-level target clustering topic until the number of texts in the sub-level target text data set is equal to 1; If the first judgment result is that the number of texts in the target text data set is equal to 1, the target text data set is used as the cluster text set, and the target cluster topic is used as the cluster topic set.

3. The text clustering method according to claim 2, characterized in that: If the first judgment result is that the number of texts in the target text data set is greater than 1, the target text data set is used as input data and is input into the preset clustering module for iteration to obtain a sub-level target text data set and a sub-level target clustering topic until the number of texts in the sub-level target text data set is equal to 1, and further includes: Counting the number of texts in the sub-level target text data set to obtain a second judgment result corresponding to the number of texts in the sub-level target text data set; When the second judgment result is that the number of texts in the target text data set is equal to 1, all the target text data sets and the sub-level target text data sets are collected as the cluster text set, and all the target cluster topics and the sub-level target cluster topics are collected as the cluster topic set.

4. The text clustering method according to claim 2, characterized in that: The preset clustering module includes the step of inputting the letter review text data into the preset clustering module for clustering processing to obtain a target text data set and a target clustering theme, specifically including: Performing text representation on the credit review text data through the SBERT model to obtain a text embedding vector; Performing dimensionality reduction processing on the text embedding vector by using the UMAP algorithm to obtain a target text vector; Clustering the target text vectors based on the HDBSCAN algorithm to obtain the target text data set; The target text data set is subjected to topic generation by using the c-TF-IDF algorithm to obtain the target clustering topic.

5. The text clustering method according to claim 1, characterized in that: The step of inputting the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set specifically includes: Performing text extraction on the clustered topic set through the preset large language model to obtain a target title factor; Extracting the title of each clustered text in the clustered text set based on the target title factor to obtain the credit review title; The letter review titles corresponding to all the clustered texts are collected to obtain the letter review title set.

6. The text clustering method according to claim 1, characterized in that: The step of clustering and verifying the credit review titles of all levels in the credit review title set to obtain the credit review clustering connection specifically includes: Performing semantic judgment on the credit review title to generate a target credit review tag, wherein one target credit review tag corresponds to one credit review title; The target credit review labels corresponding to the credit review titles at different levels are verified on the credit review text data through a preset text question and answer template to obtain the credit review clustering relationship.

7. The text clustering method according to claim 1, characterized in that: After the step of clustering and verifying the credit review titles of all levels in the credit review title set to obtain the credit review clustering connection, the method further includes: Based on the credit review clustering relationship, the credit review text data is screened for titles to obtain a target credit review title name.

8. A text clustering device, characterized in that: include: The acquisition module is used to obtain the letter review text data; A processing module, used for performing multi-layer clustering processing on the credit review text data to obtain a cluster topic set and a cluster text set; A generation module, used for inputting the clustered topic set and the clustered text set into a preset large language model to generate a credit review title set, wherein the credit review title set includes credit review titles of several levels; The verification module is used to perform cluster verification on the credit review titles of all levels in the credit review title set to obtain the credit review cluster connection.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the text clustering method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the text clustering method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Text clustering method and device, equipment and medium

    CN115858780A

  • Topic generation method based on pre-training model

    CN116361469A

  • Information generation method and device, electronic equipment and storage medium

    CN116662530A

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

    CN117407520A

  • Multi-stage clustering

    US11782955B1

Cited By

  • Electronic file intelligent sorting and filing method and system based on AI large model

    CN119988614A

  • An intelligent sorting and archiving method and system for electronic documents based on large AI models

    CN119988614B