Text clustering method and computer readable medium

By performing feature extraction, projection clustering processing and feature reconstruction on dialogue text, the problem of low accuracy of text clustering in the prior art is solved, and more accurate text clustering results are achieved.

CN119807416APending Publication Date: 2025-04-11WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411902832.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When processing dialogue text, existing text clustering methods fail to make full use of the rich information in dialogue text, resulting in reduced clustering accuracy.

Method used

By extracting the clustered text sets, the question text features and answer text features are obtained, and projection clustering is performed, and the features are reconstructed by constructing an adjacency matrix, and finally secondary projection clustering is performed to improve the accuracy of clustering.

Benefits of technology

Through reconstruction features and secondary projection clustering processing, questions with similar answers can be accurately divided into the same category, improving the accuracy of text clustering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807416A_ABST
    Figure CN119807416A_ABST
Patent Text Reader

Abstract

The invention discloses a text clustering method and a computer readable medium, and the method comprises the steps: carrying out the feature extraction of a to-be-clustered text set, and obtaining a question text feature and an answer text feature; performing projection clustering processing according to the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix; constructing an adjacent matrix according to the candidate question clustering matrix and the candidate answer clustering matrix, and reconstructing the question text features and the answer text features according to the adjacent matrix to obtain reconstructed question features and reconstructed answer features; and performing secondary projection clustering processing according to the question text feature, the answer text feature, the reconstructed question feature and the reconstructed answer feature to obtain a target question clustering result and a target answer clustering result corresponding to the to-be-clustered text set. According to the technical scheme, semantic spaces of questions with similar answers are closer through feature reconstruction, so that the accuracy of text clustering is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of natural language processing, and specifically relates to a text clustering method and a computer-readable medium. Background Art

[0002] At present, banking services are gradually shifting from offline face-to-face service to online services, which has resulted in a large number of telephone services and online chat conversations. Call recordings can be converted into dialogue text corpus through ASR. Through cluster analysis of dialogue texts, these dialogue texts can be labeled for subsequent customer service intention analysis, business process mining, etc., to better meet customer needs and serve customers.

[0003] Existing clustering analysis methods classify texts by calculating text similarity, which does not fully utilize the rich information in the conversation text. It can easily lead to two texts that belong to the same category but have large differences in text descriptions being classified into different categories, thereby reducing the accuracy of clustering.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present application is to provide a text clustering method and a computer-readable medium to improve the accuracy of text clustering.

[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0007] According to one aspect of an embodiment of the present application, a text clustering method is provided, comprising:

[0008] Performing feature extraction on the text set to be clustered to obtain question text features and answer text features; wherein the text set to be clustered includes a plurality of dialogue texts, and the dialogue texts include question texts and answer texts;

[0009] Performing projection clustering processing according to the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix;

[0010] Constructing an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix, and reconstructing the question text features and the answer text features according to the adjacency matrix to obtain reconstructed question features and reconstructed answer features;

[0011] A secondary projection clustering process is performed based on the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain a target question clustering result and a target answer clustering result corresponding to the text set to be clustered.

[0012] According to one aspect of an embodiment of the present application, a text clustering device is provided, including:

[0013] A feature extraction module is used to extract features from the text set to be clustered to obtain question text features and answer text features; wherein the text set to be clustered includes a plurality of dialogue texts, and the dialogue texts include question texts and answer texts;

[0014] A primary clustering module, used to perform projection clustering processing according to the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix;

[0015] A feature reconstruction module, used to construct an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix, and reconstruct the question text features and the answer text features according to the adjacency matrix to obtain reconstructed question features and reconstructed answer features;

[0016] The secondary clustering module is used to perform secondary projection clustering processing according to the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain the target question clustering results and the target answer clustering results corresponding to the text set to be clustered.

[0017] In one embodiment of the present application, the adjacency matrix includes a question adjacency matrix and an answer adjacency matrix; the feature reconstruction module includes:

[0018] A question reconstruction unit, used for calculating the product between the answer adjacency matrix and the question text feature to obtain an adjacent question feature, and performing weighted concatenation of the question text feature and the adjacent question feature to obtain the reconstructed question feature;

[0019] The answer reconstruction unit is used to calculate the product between the question adjacency matrix and the answer text feature to obtain the adjacent answer feature, and perform weighted concatenation of the answer text feature and the adjacent answer feature to obtain the reconstructed answer feature.

[0020] In one embodiment of the present application, the question reconstruction unit is specifically used to:

[0021] Multiplying the question text feature by a first weight to obtain a first question feature, and multiplying the adjacent question feature by a second weight to obtain a second question feature; wherein the sum of the first weight and the second weight is a set value;

[0022] The first question feature and the second question feature are concatenated to obtain the reconstructed question feature.

[0023] In one embodiment of the present application, the answer reconstruction unit is specifically used to:

[0024] Multiplying the answer text feature by a first weight to obtain a first answer feature, and multiplying the adjacent answer feature by a second weight to obtain a second answer feature; wherein the sum of the first weight and the second weight is a set value;

[0025] The first answer feature and the second answer feature are concatenated to obtain the reconstructed answer feature.

[0026] In one embodiment of the present application, the adjacency matrix includes a question adjacency matrix and an answer adjacency matrix; the feature reconstruction module is specifically used for:

[0027] For the question texts corresponding to the candidate question clustering matrix, if the category of the first question text is the same as the category of the second question text, then the elements in the question adjacency matrix are set to the first value; otherwise, the elements in the question adjacency matrix are set to the second value;

[0028] For the answer text corresponding to the answer question clustering matrix, if the category of the first answer text is the same as the category of the second answer text, the elements in the answer adjacency matrix are set to the first value; otherwise, the elements in the answer adjacency matrix are set to the second value.

[0029] In one embodiment of the present application, the secondary clustering module is specifically used for:

[0030] Perform secondary projection clustering processing according to the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain multiple question feature clusters and multiple answer feature clusters;

[0031] Constructing a question objective function according to the plurality of question feature clusters, and constructing an answer objective function according to the plurality of answer feature clusters;

[0032] When the question objective function or the answer objective function does not meet the convergence condition, the question clustering matrix and the answer clustering matrix obtained by the secondary projection clustering process are used as the candidate question clustering matrix and the candidate answer clustering matrix respectively, and the step of constructing an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix is ​​returned;

[0033] When the question objective function or the answer objective function meets the convergence condition, a target question clustering result and a target answer clustering result corresponding to the to-be-clustered text set are obtained according to the multiple question feature clusters and the multiple answer feature clusters.

[0034] In one embodiment of the present application, the secondary clustering module is specifically used for:

[0035] Calculate the square of the distance between each question text feature and the cluster center in each question feature cluster;

[0036] The question objective function is constructed according to the weighted sum of the distances between each question text feature and the cluster center.

[0037] In one embodiment of the present application, the secondary clustering module is specifically used for:

[0038] Regularizing the weights of the distances between the features of each question text and the cluster center to obtain regularized weights, and multiplying the regularized weights by a weight smoothing coefficient to obtain a corrected error;

[0039] The question objective function is constructed according to the weighted sum of the distances between each question text feature and the cluster center, and the correction error.

[0040] In one embodiment of the present application, among the multiple question feature clusters, the weighted sum of the distances between each question text feature and the center of a first cluster corresponding to a first question cluster is less than the weighted sum of the distances between each question text feature and the center of a second cluster corresponding to a second question cluster, wherein each question text feature belongs to the first question feature cluster and does not belong to the second question feature cluster.

[0041] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the text clustering method in the above technical solution is implemented.

[0042] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor executes the executable instructions so that the electronic device performs the text clustering method in the above technical solution.

[0043] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the text clustering method in the above technical solution.

[0044] In the technical solution provided in the embodiment of the present application, first, feature extraction is performed on the text set to be clustered to obtain question text features and answer text features; wherein the text set to be clustered includes multiple dialogue texts, and the dialogue texts include question texts and answer texts; then, projection clustering processing is performed based on the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix; next, an adjacency matrix is ​​constructed based on the candidate question clustering matrix and the candidate answer clustering matrix, and the question text features and the answer text features are reconstructed based on the adjacency matrix to obtain reconstructed question features and reconstructed answer features; finally, secondary projection clustering processing is performed based on the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain the target question clustering results and the target answer clustering results corresponding to the text set to be clustered. It can be seen that the technical solution of the present application constructs an adjacency matrix through the clustering results of the initial projection clustering processing, and then reconstructs the question and answer text features through the adjacency matrix, so that the semantic space of questions with similar answers will be closer. Subsequent secondary projection clustering processing can make questions with different text content but similar answers accurately classified into the same category, thereby improving the accuracy of text clustering.

[0045] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 The schematic diagram shows the architecture of the blockchain network using the technical solution of the present application.

[0048] Figure 2 The flowchart of a text clustering method provided by an embodiment of the present application is schematically shown.

[0049] Figure 3 The flowchart of a text clustering method provided by an embodiment of the present application is schematically shown.

[0050] Figure 4 The flowchart of a text clustering method provided by an embodiment of the present application is schematically shown.

[0051] Figure 5 The structural block diagram of the text clustering device provided in an embodiment of the present application is schematically shown.

[0052] Figure 6 The figure schematically shows a block diagram of a computer system structure of an electronic device suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0053] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0054] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0055] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0056] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0057] Figure 1 The exemplary system architecture block diagram applying the technical solution of the present application is schematically shown.

[0058] like Figure 1As shown, the system architecture 100 may include a terminal device 110, a network 120 and a server 130. The terminal device 110 may include a smart phone, a tablet computer, a laptop computer, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc. The server 130 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The network 120 may be a communication medium of various connection types that can provide a communication link between the terminal device 110 and the server 130, for example, a wired communication link or a wireless communication link.

[0059] According to the implementation requirements, the system architecture in the embodiment of the present application can have any number of terminal devices, networks and servers. For example, the server 130 can be a server group composed of multiple server devices. In addition, the technical solution provided in the embodiment of the present application can be applied to the terminal device 110, can also be applied to the server 130, or can be implemented by the terminal device 110 and the server 130 together, and the present application does not make any special restrictions on this.

[0060] Figure 2 The flowchart of a text clustering method provided by an embodiment of the present application is schematically shown.

[0061] like Figure 2 As shown, a large amount of conversation text G represents the text set to be clustered that participates in clustering, which includes customer text q and customer service text a, wherein customer text q refers to the question text sent by the user, and customer service text a refers to the answer text fed back by the customer service in response to the user's question. The customer text q and the customer service text a are input into the pre-trained large language model M, and the pre-trained large language model M is used to perform feature extraction on the customer text q and the customer service text a respectively, to obtain the corresponding customer semantic vector Q and customer service semantic vector A, wherein the customer semantic vector Q represents the question text feature, and the customer service semantic vector A represents the answer text feature. Then, the customer semantic vector Q and the customer service semantic vector A are subjected to projection clustering E(W, C), that is, preliminary projection clustering processing, to obtain the customer clustering result Y. q And customer service clustering results Y a , where customer clustering result Y q That is, it represents the candidate question clustering matrix and the customer service clustering result Y aThat is, it represents the candidate answer clustering matrix. Next, the customer semantic vector Q and the customer service semantic vector A are reconstructed respectively through the preliminary projection clustering results to obtain the new customer semantic space and the new customer service semantic space. Reconstruction refers to building an adjacency matrix based on the preliminary projection clustering results, and then mapping the customer semantic vector Q to the new customer semantic space through the adjacency matrix to obtain the reconstructed question feature. At the same time, the customer service semantic vector A is mapped to the new customer service semantic space through the adjacency matrix to obtain the reconstructed answer feature. Here, the relationship between the customer semantic vector Q and the reconstructed question feature Q' is: Q'=αQ||(1-α)M a Q, where || represents splicing processing, M a Represents the adjacency matrix; similarly, the relationship between the customer service semantic vector A and the reconstructed answer feature A' is: A'=αA||(1-α)M q A, where || represents splicing processing, M q Represents the adjacency matrix. Finally, the reconstructed question features and reconstructed answer features in the reconstructed new semantic space are subjected to secondary projection clustering E(W, C) to obtain the final target question clustering results and target answer clustering results. Secondary projection clustering can be an iterative process, which aims to optimize the objective function. When the objective function meets the requirements, the clustering ends.

[0062] The text clustering method provided in this application is described in detail below in conjunction with specific implementation methods.

[0063] Figure 3 The flowchart of a text clustering method provided by an embodiment of the present application is schematically shown. The method can be implemented by a terminal device or a server, such as Figure 1 The terminal device 110 or the server 130 shown. Figure 3 As shown, the text clustering method provided in this embodiment includes steps 310 to 340, which are specifically as follows:

[0064] Step 310: extract features from the text set to be clustered to obtain question text features and answer text features; wherein the text set to be clustered includes multiple dialogue texts, and the dialogue texts include question texts and answer texts.

[0065] Specifically, the text set to be clustered is a set of multiple dialogue texts that need to be clustered, where the dialogue text includes question text and answer text. The question text refers to the question asked by the questioner, and the answer text refers to the answer given by the answerer to the question asked by the questioner. Usually, a large number of dialogue texts are generated in the field of customer service. Clustering analysis of these dialogue texts can mine customer intentions, understand user needs, optimize product services, and improve user experience.

[0066] To extract features from the text set to be clustered, the question text and the answer text in the text set to be clustered are respectively extracted. Then, feature extraction is performed on the question text to obtain question text features, and feature extraction is performed on the answer text to obtain answer text features. Feature extraction is actually to convert text information into vector information for subsequent clustering processing. Feature extraction can be implemented by pre-training a large language model. In the process of feature extraction, the question text or the answer text can first be segmented to obtain a text word sequence; then each word in the text word sequence can be vectorized to obtain the corresponding features.

[0067] Step 320: Perform projection clustering processing based on the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix.

[0068] Specifically, after feature extraction is performed on the text set to be clustered, preliminary projection clustering processing is performed on the question text features and the answer text features at the same time, and respective clustering results are obtained, and the clustering results here are recorded as the rough question clustering matrix and the candidate answer clustering matrix. In this embodiment, the projection clustering processing refers to multi-view projection clustering processing, which is a clustering method for processing data from multiple different perspectives or data sources, which can not only retain important information in each view, but also capture the complementarity between different views, thereby improving the quality of clustering. The multi-view data in this embodiment includes question text features and answer text features. Through multi-view projection clustering, not only the important information of the question text and the answer text itself can be retained, but also the connection between the question text and the answer text can be captured, thereby improving the accuracy of text clustering.

[0069] In the clustering process, the cluster labels corresponding to the question text features and the answer text features can be initialized first. After the clustering is completed, a clustering matrix indicating the category can be obtained, that is, a candidate question clustering matrix and a candidate answer clustering matrix. In the clustering matrix, if the question text feature or the answer text feature belongs to a certain category, the element corresponding to the category in the candidate question clustering matrix or the candidate answer clustering matrix is ​​1, otherwise it is 0.

[0070] Step 330: construct an adjacency matrix based on the candidate question clustering matrix and the candidate answer clustering matrix, and reconstruct the question text features and the answer text features based on the adjacency matrix to obtain reconstructed question features and reconstructed answer features.

[0071] Specifically, the adjacency matrix is ​​a matrix that represents the relationship between the candidate question clustering matrix and the candidate answer clustering matrix. The relationship here refers to whether the categories divided by the two question text features (or answer text features) in the clustering results are the same. After obtaining the adjacency matrix, the question text features and the answer text features are reconstructed using the adjacency matrix, that is, the question text features and the answer text features are mapped to a new semantic space to obtain reconstructed question features and reconstructed answer features, which is equivalent to correcting the deviation of the question text features and the answer text features to make subsequent clustering more accurate.

[0072] Step 340: Perform secondary projection clustering processing based on the question text features, answer text features, reconstructed question features, and reconstructed answer features to obtain target question clustering results and target answer clustering results corresponding to the text set to be clustered.

[0073] Specifically, after obtaining the reconstructed question features and the reconstructed answer features, they are combined with the question text features and the answer text features, and projection clustering is performed again to obtain the final clustering results, which are the target question clustering results and the target answer clustering results corresponding to the text set to be clustered. The secondary projection clustering method here is the same as the aforementioned preliminary projection clustering method, which can be multi-view projection clustering. Of course, different clustering methods can also be used, such as kmeans clustering.

[0074] In the technical solution provided in the embodiment of the present application, first, feature extraction is performed on the text set to be clustered to obtain question text features and answer text features; wherein the text set to be clustered includes multiple dialogue texts, and the dialogue texts include question texts and answer texts; then, projection clustering processing is performed based on the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix; next, an adjacency matrix is ​​constructed based on the candidate question clustering matrix and the candidate answer clustering matrix, and the question text features and the answer text features are reconstructed based on the adjacency matrix to obtain reconstructed question features and reconstructed answer features; finally, secondary projection clustering processing is performed based on the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain the target question clustering results and the target answer clustering results corresponding to the text set to be clustered. It can be seen that the technical solution of the present application constructs an adjacency matrix through the clustering results of the initial projection clustering processing, and then reconstructs the question and answer text features through the adjacency matrix, so that the semantic space of questions with similar answers will be closer. Subsequent secondary projection clustering processing can make questions with different text content but similar answers accurately classified into the same category, thereby improving the accuracy of text clustering.

[0075] Figure 4The flowchart of a text clustering method provided by an embodiment of the present application is schematically shown. This embodiment is a further refinement of the above embodiment. Figure 4 As shown, the text clustering method provided in this embodiment includes steps 410 to 490, which are specifically as follows:

[0076] Step 410: extract features from the text set to be clustered to obtain question text features and answer text features; wherein the text set to be clustered includes multiple dialogue texts, and the dialogue texts include question texts and answer texts.

[0077] Step 420: Perform projection clustering processing based on the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix.

[0078] For steps 410 to 420, reference may be made to the related descriptions in the aforementioned steps 310 to 320, which will not be repeated here.

[0079] Step 430: construct a question adjacency matrix and an answer adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix.

[0080] Specifically, the adjacency matrix includes a question adjacency matrix and an answer adjacency matrix, the question adjacency matrix is ​​constructed based on the candidate question clustering matrix, and the answer adjacency matrix is ​​constructed based on the candidate answer clustering matrix. For the question adjacency matrix, the specific construction process includes: for the question text corresponding to the candidate question clustering matrix, if the category of the first question text is the same as the category of the second question text, then the element in the question adjacency matrix is ​​set to the first value; otherwise, the element in the question adjacency matrix is ​​set to the second value. Exemplarily, the first value can be set to 1 and the second value can be set to 0, then the element 1 in the adjacency matrix indicates that the question text and the answer text in the same dialogue text are of the same category, and the element 0 in the adjacency matrix indicates that the question text and the answer text in the same dialogue text are of different categories.

[0081] For the answer adjacency matrix, the specific construction process includes: for the answer text corresponding to the answer question clustering matrix, if the category of the first answer text is the same as the category of the second answer text, the element in the answer adjacency matrix is ​​set to the first value; otherwise, the element in the answer adjacency matrix is ​​set to the second value.

[0082] It can be seen that the construction process of the question adjacency matrix and the answer adjacency matrix is ​​similar. For the question text or answer text, the categories of its text features in the corresponding candidate clustering matrix are compared. If they belong to the same category, the elements in the corresponding adjacency matrix are set to the first value. If they are different, the elements in the corresponding adjacency matrix are set to the second value. The difference is that the elements in the question adjacency matrix correspond to the question text, and the elements in the answer adjacency matrix correspond to the answer text.

[0083] Step 440: Calculate the product of the answer adjacency matrix and the question text feature to obtain the adjacent question feature, and perform weighted concatenation of the question text feature and the adjacent question feature to obtain the reconstructed question feature.

[0084] Specifically, during reconstruction, the answer adjacency matrix is ​​used to reconstruct the question text features. In this way, in the reconstructed new semantic space, the semantic spaces of question texts with similar answers will be closer, thereby improving the accuracy of subsequent clustering.

[0085] The specific process of reconstructing the question text features by the answer adjacency matrix is ​​as follows: first, the product between the answer adjacency matrix and the question text features is calculated to obtain the adjacent question features; then the question text features are multiplied by the first weight to obtain the first question features, and the adjacent question features are multiplied by the second weight to obtain the second question features; wherein the sum of the first weight and the second weight is the set value; finally, the first question features are concatenated with the second question features to obtain the reconstructed question features. It can be expressed by the following formula:

[0086] Q′=αQ||(1-α)(M a Q)

[0087] Among them, Q′ represents the reconstructed question feature, Q represents the question text feature, and M a represents the answer adjacency matrix, α is the first weight, (1-α) is the second weight, and || represents vector concatenation. It can be seen that the sum of the first weight and the second weight is 1. In fact, the first weight reflects the proportion of question text features in the reconstructed question features. The larger the first weight, the greater the proportion of question text features in the reconstructed question features, which means that more question text features are retained during the reconstruction process. The value range of the first weight is [0, 1], and the general value is 0.5. Other values ​​of the first weight can also be obtained through model training.

[0088] Step 450: Calculate the product of the question adjacency matrix and the answer text feature to obtain the adjacency answer feature, and perform weighted concatenation of the answer text feature and the adjacency answer feature to obtain the reconstructed answer feature.

[0089] Specifically, similar to the reconstruction process of the question text features, the reconstruction of the answer text features uses the question adjacency matrix, and the specific process is: first calculate the product between the question adjacency matrix and the answer text features to obtain the adjacent answer features; then multiply the answer text features by the first weight to obtain the first answer features, and multiply the adjacent answer features by the second weight to obtain the second answer features; where the sum of the first weight and the second weight is the set value; finally, concatenate the first answer features with the second answer features to obtain the reconstructed answer features. It can be expressed by the following formula:

[0090] A′=αA||(1-α)(M q A)

[0091] Among them, A′ represents the reconstructed question feature, A represents the question text feature, and M q represents the question adjacency matrix, α is the first weight, and (1-α) is the second weight. The value of the first weight here is the same as the first weight value in the above-mentioned process of reconstructing the question text features.

[0092] Step 460: Perform secondary projection clustering processing based on the question text features, the answer text features, the reconstructed question features, and the reconstructed answer features to obtain multiple question feature clusters and multiple answer feature clusters.

[0093] Specifically, the secondary projection clustering process is the same as the primary projection clustering process in step 420, and will not be described in detail here.

[0094] Step 470: construct a question objective function based on multiple question feature clusters, and construct an answer objective function based on multiple answer feature clusters.

[0095] Specifically, the question objective function is constructed based on the projected clustering results of question features (including reconstructed question features and question text features). Correspondingly, the answer objective function is constructed based on the projected clustering results of answer features (including reconstructed answer features and answer text features). The construction processes of the two are similar. The specific construction process is explained below using the question objective function as an example.

[0096] When constructing the question objective function, first calculate the square of the distance between each question text feature and the cluster center in each question feature cluster; then construct the question objective function based on the weighted sum of the distances between each question text feature and the cluster center. For details, please refer to the following formula:

[0097]

[0098] Among them, E(W,C) represents the question objective function, Q′ ji represents the i-th question feature in the j-th question feature cluster (question features include reconstructed question features and question text features), C ji represents the cluster center of the jth question feature cluster, C li represents the cluster center of the lth question feature cluster, W ji represents the weight of the square of the distance from the i-th question feature in the j-th question feature cluster to the cluster center, W li represents the weight of the square of the distance from the ith question feature in the lth question feature cluster to the cluster center. k is the total number of question feature clusters, d is the total number of question text features, and 2d represents the total number of question text features and reconstructed question features.

[0099] Among them, S j It means: among multiple question feature clusters, the weighted sum of the distances between each question text feature and the center of the first cluster corresponding to the first question cluster is less than the weighted sum of the distances between each question text feature and the center of the second cluster corresponding to the second question cluster, wherein each question text feature belongs to the first question feature cluster but not to the second question feature cluster. That is, the distance between features within a cluster is less than the distance between features outside a cluster.

[0100] It can be understood that when constructing the answer objective function, the question features in the above formula can be replaced by the answer features, which will not be repeated here.

[0101] In one embodiment of the present application, in order to better obtain a cluster after high-dimensional projection, when constructing the question objective function, it is optimized, specifically: the weight of the distance between each question text feature and the cluster center is regularized and constrained to obtain the regularized weight, and the regularized weight is multiplied by the weight smoothing coefficient to obtain the corrected error; the question objective function is constructed according to the weighted sum of the distance between each question text feature and the cluster center, and the corrected error. The final question objective function E(W,C) is expressed as follows:

[0102]

[0103] in, Represents the weight W ji The regularized weights obtained by regularizing constraints are That is, the sum of the weights of all dimensions is 1. β is the smoothing coefficient, β ≥ 0, which is used to adjust the smoothness of the weights. The larger β is, the smoother the weights are, that is, the smaller the difference in weights of each dimension is.

[0104] This means correcting the error.

[0105] It can be understood that the optimization process of answering the objective function is similar to the optimization process of asking the objective function, and will not be repeated here.

[0106] Step 480 , when the question objective function or the answer objective function does not meet the convergence condition, the question clustering matrix and the answer clustering matrix obtained by the secondary projection clustering process are used as the candidate question clustering matrix and the candidate answer clustering matrix respectively, and the process returns to step 430 .

[0107] Step 490: When the question objective function or the answer objective function meets the convergence condition, a target question clustering result and a target answer clustering result corresponding to the text set to be clustered are obtained according to the multiple question feature clusters and the multiple answer feature clusters.

[0108] Specifically, when the objective function (question objective function and answer objective function) does not meet the convergence condition, it means that the clustering result is not accurate enough. At this time, return to step 430 and continue iterative clustering; when the objective function meets the convergence condition, it means that the clustering result is relatively accurate. At this time, the question feature clusters and answer feature clusters obtained by the last clustering are the target question clustering results and target answer clustering results corresponding to the text set to be clustered.

[0109] When the objective function does not meet the convergence condition, the clustering model parameters need to be updated according to the current clustering results, and then iterative training is continued based on the specific model after the updated parameters. In this embodiment, the model parameters that need to be updated include C and W, where C represents the number of clusters and W represents each weight. In this embodiment, during the iterative clustering process, C is first fixed, W is optimized, and then W is fixed and C is optimized, and finally the optimized C and W are obtained as model parameters.

[0110] The technical solution of the present application reconstructs the question text features through the answer adjacency matrix, and reconstructs the answer text features through the question adjacency matrix, so that after the reconstruction, the semantic spaces of questions with similar answers are closer, and the semantic spaces of answers to similar questions are also closer, so that questions with similar answers but different texts can be clustered into the same cluster, thereby improving the accuracy of clustering.

[0111] The implementation process of the technical solution of the present application is described below with a specific embodiment.

[0112] References Figure 2 As shown in the processing flow, let G represent a set of g dialogue texts, then G = {D 1 ,d 2 ,…,D g}, where D represents a conversation recording (ASR dialogue) translated from ASR (Automatic Speech Recognition), or a conversation text between a customer service representative and a customer. Let D = {S 1 ,S 2 ,…,S b}, where S represents a question-answer pair S = (q , a), b means that the dialogue D contains b question-answer pairs. Let symbol q=(u 1, ,u 2 ,…,u m ), a=(u 1, ,u 2 ,…,u m ) represent a sentence corresponding to the customer (question text) and a sentence corresponding to the customer service (answer text), u represents a character or word, and the sentence contains m characters or words (the number of characters or words contained in the question text and the answer text can be different).

[0113] Input a large amount of dialogue text G into the pre-trained large language model M, where the model M can be BERT, T5, Roberta, etc. Let h = M, h ∈ R n×d , where h is the hidden layer output of model M, d is the hidden layer length of model M, and n is the sentence length. Here, Bert is used as the pre-trained large language model M to introduce the subsequent steps. After the question text q and the answer text a are input into the model in parallel, each sentence can be obtained. in is the vector of a word in the sentence, The vector of the special character cls is used as the sentence vector, or the vector h of each sentence is obtained by directly taking avg (average value) or other methods. i ∈R 1*d , i∈[1,b]. Let t represent the number of question-answer pairs in a conversation, and the vector corresponding to all sentences in the conversation is H∈R t*d .

[0114] Split the text set G to be clustered into question-answer pairs (q, a), let z = g*t be the total amount of question-answer pairs, input it into the training large language model M, such as BERT, and obtain the customer's semantic vector matrix Q∈R z*d (i.e., question text features), where a sentence i, q i ∈R 1*d ,i∈[1,z], and the customer service semantic vector matrix A∈R z*d (i.e. answer text features), where a i ∈R 1*d ,i∈[1,z]. For Q and A, calculate the initial clustering labels of all texts respectively, let k q , k a It can represent the categories of Q and A respectively. After clustering, the category indicator matrix Y can be obtained q ∈R z*k , (i.e. candidate question clustering matrix), Y a ∈R z*k (i.e., candidate answer clustering matrix), where if the text belongs to category k, then the corresponding Y q or Y a The element is 1, otherwise it is 0. According to the category indicator matrix, the initial customer and customer service text sample indicators are obtained to determine whether they belong to the same category, and then the adjacency matrix M is constructed. q ∈R z*z (i.e., asking the adjacency matrix) and M a ∈R z*z (That is, answer the adjacency matrix). If two samples belong to the same category, the value in the adjacency matrix is ​​1, otherwise it is zero.

[0115] Based on the adjacency matrix between texts, the semantic vector spaces of customers and customer service are reconstructed as follows:

[0116] Q'=αQ||(1-α)(M a Q)

[0117] A'=αA||(1-α)(M q A)

[0118] The symbol || represents vector concatenation, Q'∈R z*2d , M a Q refers to the customer semantic vector space reconstructed by the adjacency matrix between the texts replied by the customer service (i.e., the question text features are reconstructed by the answer adjacency matrix), so that the semantic space of questions with similar answers will be closer. Similarly, A'∈R z*2d The first weight α∈[0,1] is used to adjust the weights of the original semantic space of the question text and the reconstructed semantic space constructed based on the answer in the reconstructed text semantic space. The larger α is, the greater the weight of the original semantic space is.

[0119] For example, the following question and answer example:

[0120] For example, (Q, A) 1 = {Q 1 : "I want to transfer money from my savings card to my credit card using my mobile phone. How can I do this? Is there a quick transfer function?";

[0121] A 1 : "Hello, the quick transfer function you mentioned is a service launched by our bank for the convenience of customers. You can log in through the mobile banking APP, find the 'Quick Transfer' option under the transfer and remittance menu, and then enter your credit card account number and transfer amount according to the prompts. After confirmation, the transfer can be completed."}

[0122] (Q,A) 2 = {Q 2 "I need to pay off my credit card debt urgently, but I'm away from home and don't know how to do it?";

[0123] A 2 : "Hello, the quick transfer function you mentioned is a service launched by our bank for the convenience of customers. You can log in through the mobile banking APP, find the 'Quick Transfer' option under the transfer and remittance menu, and then enter your credit card account number and transfer amount according to the prompts. After confirmation, the transfer can be completed."}

[0124] In existing text clustering methods, customer questions or customer service replies are usually clustered directly. 1 and ask questions 2The text contents between them are too different, and the clustering result will make the two not in the same category, but obviously they both belong to the same category, that is, they both belong to the category of asking about the specific operations of the quick transfer function.

[0125] In the technical solution of this application, through semantic space reconstruction, after the initial clustering, although the question Q 1 and ask questions 2 Cannot be clustered into the same category, but answer A 1 and answer A 2 is clustered into the same category, that is, M(A 1 ,A 2 )=1. Therefore, after question reconstruction:

[0126] Q 1 ′=αQ 1 ||(1-α)(Q 1 +Q 2 )

[0127] Q 2 ′=αQ 2 ||(1-α)(Q 1 +Q 2 )

[0128] And because M(Q 1 ,Q 2 )=0. Therefore, the answer after reconstruction is:

[0129] A 1 ′=αA 1 ||(1-α)(A 1 )

[0130] A 2 ′=αA 2 ||(1-α)(A 2 )

[0131] It can be seen that after reconstruction, Q 1 ′ and Q 2 ′ will become more similar, then in the subsequent iterations, Q 1 ′ and Q 2 ' will be correctly clustered into the same category, A 1 ′ and A 2 'Similarity remains unchanged.

[0132] In the projection clustering process, the technical solution of the present application adopts a local adaptive projection clustering method, which can automatically identify effective dimensions to distinguish samples among many dimensions, and give weights according to the importance of the dimensions, with smaller weight values ​​for unimportant dimensions.

[0133] Let {c 1 ,c2 ,c j ,...c k}, where c j ∈R 1*2d , C∈R k*2d , respectively represent the k cluster centers of Q' or A', let {w 1 ,w 2 ,w j ,...w k} respectively represent the corresponding weights w j ∈R 1*2d , W∈R k*2d After dividing the feature Q′ or A′ into K categories, K clusters can be obtained respectively, {S 1 ,S 2 ,S j ,...S k}, for a certain cluster, the following requirements are met after clustering:

[0134]

[0135] Among them, Q′ j Indicates that it belongs to cluster S j The characteristics of C j and C l Represents cluster S j and S l The above formula indicates that the distance between clusters is smaller than the distance between clusters outside. k Weights are locally adaptive, for example, for feature Q i , the vector semantic space includes the customer question Q, and the semantic space of questions reconstructed by answers similar to this question, w k The distinguishing ability of features in different semantic spaces will be adjusted according to the weights, and the weights will be adjusted to achieve the overall optimum. Therefore, the goal is to minimize the following objective function:

[0136]

[0137] In order to better obtain a cluster after high-dimensional projection, add a regularization constraint to the weight w Finally, the optimization objective function can be obtained:

[0138]

[0139] in That is, the sum of the weights of all dimensions is 1, and the parameter β>=0 adjusts the smoothness of the weights. The larger β is, the smoother the weights are, that is, the smaller the difference in weights of each dimension is.

[0140] The optimization process adopts the EM (Expectation Maximization) iteration method to minimize E(W, C), that is, fix C, optimize W, and then fix W and optimize the C value.

[0141] The process of continuous iterative training has a great impact on Q 1 ′ and Q 2 The weight distribution of the dimension of the vector space will tend to: i ,i∈[1,d] <w j ,j∈[d+1,2d], so that the objective function can be minimized during the iteration process. 1 ′ and Q 2 ′ is more similar in the dimension [d+1,2d]. When optimizing E(W,C) to achieve the minimum value, a bi-cluster will be identified (that is, two samples show extremely high similarity in some dimensions, excluding the noise interference of some dimensions). Bi-cluster means that in high-dimensional data clustering, the algorithm can adjust the weight of the noise dimension to be smaller during the optimization iteration process. This is achieved through the optimization process described above. Then, in the semantic space of multiple views, the algorithm can find the effective semantic space.

[0142] Therefore, the technical solution of the present application not only constructs two semantic spaces for customer questions Q and customer service replies A, but also dynamically adjusts the importance of each dimension according to different semantic space vector dimensions, obtains clustering samples after dimension weight adjustment, and improves clustering effects. The technical solution of the present application adopts a multi-view projection clustering method, and the clustering results between different views promote each other to improve the effect. Multi-view collaborative clustering can also be extended to clustering scenarios of more data sources, improving the accuracy of text clustering. At the same time, in the high-dimensional user semantic space, the technical solution of the present application proposes an adaptive semantic space projection method, which automatically identifies the importance dimensions between features and assigns greater weights to better improve clustering robustness.

[0143] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0144] The following introduces an apparatus embodiment of the present application, which can be used to execute the text clustering method in the above-mentioned embodiment of the present application. Figure 5 The structural block diagram of the text clustering device provided in the embodiment of the present application is schematically shown. Figure 5 As shown, the text clustering device provided in the embodiment of the present application includes:

[0145] A feature extraction module 510 is used to extract features from the text set to be clustered, and obtain question text features and answer text features; wherein the text set to be clustered includes a plurality of dialogue texts, and the dialogue texts include question texts and answer texts;

[0146] A primary clustering module 520, configured to perform a projection clustering process based on the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix;

[0147] A feature reconstruction module 530 is used to construct an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix, and reconstruct the question text features and the answer text features according to the adjacency matrix to obtain reconstructed question features and reconstructed answer features;

[0148] The secondary clustering module 540 is used to perform secondary projection clustering processing according to the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain the target question clustering results and the target answer clustering results corresponding to the text set to be clustered.

[0149] In one embodiment of the present application, the adjacency matrix includes a question adjacency matrix and an answer adjacency matrix; the feature reconstruction module 530 includes:

[0150] A question reconstruction unit, used for calculating the product between the answer adjacency matrix and the question text feature to obtain an adjacent question feature, and performing weighted concatenation of the question text feature and the adjacent question feature to obtain the reconstructed question feature;

[0151] The answer reconstruction unit is used to calculate the product between the question adjacency matrix and the answer text feature to obtain the adjacent answer feature, and perform weighted concatenation of the answer text feature and the adjacent answer feature to obtain the reconstructed answer feature.

[0152] In one embodiment of the present application, the question reconstruction unit is specifically used to:

[0153] Multiplying the question text feature by a first weight to obtain a first question feature, and multiplying the adjacent question feature by a second weight to obtain a second question feature; wherein the sum of the first weight and the second weight is a set value;

[0154] The first question feature and the second question feature are concatenated to obtain the reconstructed question feature.

[0155] In one embodiment of the present application, the answer reconstruction unit is specifically used to:

[0156] Multiplying the answer text feature by a first weight to obtain a first answer feature, and multiplying the adjacent answer feature by a second weight to obtain a second answer feature; wherein the sum of the first weight and the second weight is a set value;

[0157] The first answer feature and the second answer feature are concatenated to obtain the reconstructed answer feature.

[0158] In one embodiment of the present application, the adjacency matrix includes a question adjacency matrix and an answer adjacency matrix; the feature reconstruction module 530 is specifically used for:

[0159] For the question texts corresponding to the candidate question clustering matrix, if the category of the first question text is the same as the category of the second question text, then the elements in the question adjacency matrix are set to the first value; otherwise, the elements in the question adjacency matrix are set to the second value;

[0160] For the answer text corresponding to the answer question clustering matrix, if the category of the first answer text is the same as the category of the second answer text, the elements in the answer adjacency matrix are set to the first value; otherwise, the elements in the answer adjacency matrix are set to the second value.

[0161] In one embodiment of the present application, the secondary clustering module 540 is specifically used for:

[0162] Perform secondary projection clustering processing according to the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain multiple question feature clusters and multiple answer feature clusters;

[0163] Constructing a question objective function according to the plurality of question feature clusters, and constructing an answer objective function according to the plurality of answer feature clusters;

[0164] When the question objective function or the answer objective function does not meet the convergence condition, the question clustering matrix and the answer clustering matrix obtained by the secondary projection clustering process are used as the candidate question clustering matrix and the candidate answer clustering matrix respectively, and the step of constructing an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix is ​​returned;

[0165] When the question objective function or the answer objective function meets the convergence condition, a target question clustering result and a target answer clustering result corresponding to the to-be-clustered text set are obtained according to the multiple question feature clusters and the multiple answer feature clusters.

[0166] In one embodiment of the present application, the secondary clustering module 540 is specifically used for:

[0167] Calculate the square of the distance between each question text feature and the cluster center in each question feature cluster;

[0168] The question objective function is constructed according to the weighted sum of the distances between each question text feature and the cluster center.

[0169] In one embodiment of the present application, the secondary clustering module 540 is specifically used for:

[0170] Regularizing the weights of the distances between the features of each question text and the cluster center to obtain regularized weights, and multiplying the regularized weights by a weight smoothing coefficient to obtain a corrected error;

[0171] The question objective function is constructed according to the weighted sum of the distances between each question text feature and the cluster center, and the correction error.

[0172] In one embodiment of the present application, among the multiple question feature clusters, the weighted sum of the distances between each question text feature and the center of a first cluster corresponding to a first question cluster is less than the weighted sum of the distances between each question text feature and the center of a second cluster corresponding to a second question cluster, wherein each question text feature belongs to the first question feature cluster and does not belong to the second question feature cluster.

[0173] The specific details of the text clustering device provided in each embodiment of the present application have been described in detail in the corresponding method embodiment and will not be repeated here.

[0174] Figure 6 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.

[0175] It should be noted that Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0176] like Figure 6 As shown, the computer system 600 includes a central processing unit 601 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 602 (ROM) or the program loaded from the storage part 608 to the random access memory 603 (RAM). Various programs and data required for system operation are also stored in the random access memory 603. The central processing unit 601, the read-only memory 602 and the random access memory 603 are connected to each other through a bus 604. An input / output interface 605 (Input / Output interface, i.e., I / O interface) is also connected to the bus 604.

[0177] The following components are connected to the input / output interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a local area network card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.

[0178] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processor 601, various functions defined in the system of the present application are executed.

[0179] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0180] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0181] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0182] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0183] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

[0184] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A text clustering method, characterized in that: include: Performing feature extraction on the text set to be clustered to obtain question text features and answer text features; wherein the text set to be clustered includes a plurality of dialogue texts, and the dialogue texts include question texts and answer texts; Performing projection clustering processing according to the question text features and the answer text features to obtain a candidate question clustering matrix and a candidate answer clustering matrix; Constructing an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix, and reconstructing the question text features and the answer text features according to the adjacency matrix to obtain reconstructed question features and reconstructed answer features; A secondary projection clustering process is performed based on the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain a target question clustering result and a target answer clustering result corresponding to the text set to be clustered.

2. The text clustering method according to claim 1, characterized in that: The adjacency matrix includes a question adjacency matrix and an answer adjacency matrix; Reconstructing the question text features and the answer text features according to the adjacency matrix to obtain reconstructed question features and reconstructed answer features includes: Calculating the product of the answer adjacency matrix and the question text feature to obtain an adjacent question feature, and weighted concatenating the question text feature and the adjacent question feature to obtain the reconstructed question feature; The product of the question adjacency matrix and the answer text feature is calculated to obtain an adjacency answer feature, and the answer text feature and the adjacency answer feature are weightedly concatenated to obtain the reconstructed answer feature.

3. The text clustering method according to claim 2, characterized in that: The question text feature and the adjacent question feature are weightedly concatenated to obtain the reconstructed question feature, including: Multiplying the question text feature by a first weight to obtain a first question feature, and multiplying the adjacent question feature by a second weight to obtain a second question feature; wherein the sum of the first weight and the second weight is a set value; The first question feature and the second question feature are concatenated to obtain the reconstructed question feature.

4. The text clustering method according to claim 2, characterized in that: The answer text feature and the adjacent answer feature are weightedly concatenated to obtain the reconstructed answer feature, including: Multiplying the answer text feature by a first weight to obtain a first answer feature, and multiplying the adjacent answer feature by a second weight to obtain a second answer feature; wherein the sum of the first weight and the second weight is a set value; The first answer feature and the second answer feature are concatenated to obtain the reconstructed answer feature.

5. The text clustering method according to claim 1, characterized in that: The adjacency matrix includes a question adjacency matrix and an answer adjacency matrix; Constructing an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix, including: For the question texts corresponding to the candidate question clustering matrix, if the category of the first question text is the same as the category of the second question text, then the elements in the question adjacency matrix are set to the first value; otherwise, the elements in the question adjacency matrix are set to the second value; For the answer text corresponding to the answer question clustering matrix, if the category of the first answer text is the same as the category of the second answer text, the elements in the answer adjacency matrix are set to the first value; otherwise, the elements in the answer adjacency matrix are set to the second value.

6. The text clustering method according to claim 1, characterized in that: Performing secondary projection clustering processing according to the question text features, the answer text features, the reconstructed question features, and the reconstructed answer features to obtain target question clustering results and target answer clustering results corresponding to the text set to be clustered, including: Perform secondary projection clustering processing according to the question text features, the answer text features, the reconstructed question features and the reconstructed answer features to obtain multiple question feature clusters and multiple answer feature clusters; Constructing a question objective function according to the plurality of question feature clusters, and constructing an answer objective function according to the plurality of answer feature clusters; When the question objective function or the answer objective function does not meet the convergence condition, the question clustering matrix and the answer clustering matrix obtained by the secondary projection clustering process are used as the candidate question clustering matrix and the candidate answer clustering matrix respectively, and the step of constructing an adjacency matrix according to the candidate question clustering matrix and the candidate answer clustering matrix is ​​returned; When the question objective function or the answer objective function meets the convergence condition, a target question clustering result and a target answer clustering result corresponding to the to-be-clustered text set are obtained according to the multiple question feature clusters and the multiple answer feature clusters.

7. The text clustering method according to claim 6, characterized in that: Constructing a question objective function according to the plurality of question feature clusters includes: Calculate the square of the distance between each question text feature and the cluster center in each question feature cluster; The question objective function is constructed according to the weighted sum of the distances between each question text feature and the cluster center.

8. The text clustering method according to claim 6, characterized in that: The question objective function is constructed according to the weighted sum of the distances between each question text feature and the cluster center, including: Regularizing the weights of the distances between the features of each question text and the cluster center to obtain regularized weights, and multiplying the regularized weights by a weight smoothing coefficient to obtain a corrected error; The question objective function is constructed according to the weighted sum of the distances between each question text feature and the cluster center, and the correction error.

9. The text clustering method according to claim 6, characterized in that: Among the multiple question feature clusters, the weighted sum of the distances between each question text feature and the center of a first cluster corresponding to a first question cluster is less than the weighted sum of the distances between each question text feature and the center of a second cluster corresponding to a second question cluster, wherein each question text feature belongs to the first question feature cluster and does not belong to the second question feature cluster.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the text clustering method according to any one of claims 1 to 9 is implemented.