Dialogue text clustering method and related device

CN117332086BActive Publication Date: 2026-10-30CHONGQING ANT CONSUMER FINANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311296904.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2026-10-30
Estimated Expiration
2043-10-07

AI Technical Summary

Technical Problem

然而,上述构造标注好的数据集都需要人工标注,耗时耗力,导致高昂的人工成本和大量的时间消耗

Benefits of technology

[0027]本说明书一些实施例提供的技术方案带来的有益效果至少包括:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117332086B_ABST
    Figure CN117332086B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a dialogue text clustering method and related equipment, and relates to the field of natural language processing. In the specification, a plurality of dialogue texts are obtained, the dialogue texts being generated by at least two users in a dialogue process. Further, semantic feature information and word frequency feature information corresponding to each dialogue text are extracted, the semantic feature information and the word frequency feature information corresponding to each dialogue text are integrated, the plurality of dialogue texts are clustered, at least one clustering result corresponding to the plurality of dialogue texts is obtained, and at least one dialogue text is included in each clustering result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of natural language processing, and in particular to a method for clustering dialogue text and related equipment. Background Technology

[0002] With the development of science and technology and the internet, the amount of text data is constantly increasing. Using dialogue text clustering methods can efficiently extract valuable information from this text data. For example, as licensed non-bank financial institutions, consumer finance companies can use intelligently built and operated customer service systems to handle users' inquiries and resolve problems throughout the entire lifecycle of credit product use. Furthermore, with the development of internet technology, customer service systems have gradually moved from telephone service to a coexistence of online and telephone services. In other words, online service is a form of communication between users and customer service personnel through chat text boxes. However, due to the diversity of text content in user-customer service communication and the presence of a large amount of redundant expression, clustering the communication text generated in online customer service systems, and then mining and understanding this text through clustering to improve the identification and perception of user communication preferences and visitor intentions, is an indispensable part of the intelligent construction and operation of online customer service systems.

[0003] Currently, dialogue text clustering methods are mainly determined using machine learning or deep learning techniques from artificial intelligence technologies.

[0004] Machine learning-based dialogue text clustering methods primarily divide the problem into two parts: feature engineering and classifiers. Feature engineering includes text preprocessing, feature extraction, and text representation. This process begins with text cleaning, using word segmentation tools to segment the text into words. Then, methods such as bag-of-words, term frequency, and TF-IDF (term frequency–inverse document frequency) are used to represent the text as vectors. These vectors are then input into classifiers such as Support Vector Machines (SVM) or decision trees to obtain the final clustering result. However, machine learning has limited feature representation capabilities and requires manual feature processing, ultimately leading to low accuracy in dialogue text clustering.

[0005] Deep learning-based dialogue text clustering methods first clean and segment the text, then convert the text into dense word embeddings using neural networks such as word2vec, and finally train the word embeddings using neural networks such as fully connected networks or Long Short-Term Memory (LSTM) to obtain the final clustering results.

[0006] The aforementioned dialogue text clustering methods all require constructing labeled datasets to train deep learning models and / or classifiers, thereby clustering multiple dialogue texts using the trained deep learning models and / or classifiers. However, constructing these labeled datasets requires manual annotation, which is time-consuming and labor-intensive, resulting in high labor costs and significant time consumption. Summary of the Invention

[0007] This specification provides a method and related device for clustering dialogue text, which can enhance the accuracy and efficiency of dialogue text clustering. The technical solution is as follows:

[0008] Firstly, embodiments of this specification provide a dialog text clustering method, which includes:

[0009] Obtain multiple dialogue texts; wherein each dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple dialogue texts are not completely the same;

[0010] Based on the plurality of dialogue texts, semantic feature information corresponding to each dialogue text is extracted based on at least one first keyword in each dialogue text, and word frequency feature information corresponding to each dialogue text is extracted based on at least one second keyword in each dialogue text;

[0011] Based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, the multiple dialogue texts are clustered to obtain at least one clustering result; wherein each clustering result includes at least one of the dialogue texts.

[0012] Secondly, embodiments of this specification provide a dialog text clustering method, which includes:

[0013] Obtain the dialogue text to be clustered;

[0014] Based on the dialogue text to be clustered, semantic feature information corresponding to the dialogue text to be clustered is extracted based on at least one first keyword in the dialogue text to be clustered, and word frequency feature information corresponding to the dialogue text to be clustered is extracted based on at least one second keyword in the dialogue text to be clustered.

[0015] Based on at least one clustering result, and the semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, the dialogue text to be clustered is clustered to determine the target clustering result to which the dialogue text to be clustered belongs in the at least one clustering result; wherein, the at least one clustering result is obtained by the dialogue text clustering method as described in the first aspect.

[0016] Thirdly, embodiments of this specification provide a dialog text clustering device, the dialog text clustering device comprising:

[0017] The first acquisition module is used to acquire multiple dialogue texts; wherein each dialogue text is text generated by at least two users during a dialogue, and the multiple dialogue texts correspond to at least two users who are not completely the same;

[0018] The first extraction module is used to extract semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and to extract word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text;

[0019] The first clustering module is used to cluster the multiple dialogue texts according to the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, and obtain at least one clustering result; wherein each clustering result includes at least one of the dialogue texts.

[0020] Fourthly, embodiments of this specification provide a dialog text clustering device, the dialog text clustering device comprising:

[0021] The second acquisition module is used to acquire the dialogue text to be clustered.

[0022] The second extraction module is used to extract semantic feature information corresponding to the dialogue text to be clustered based on at least one first keyword in the dialogue text to be clustered, and to extract word frequency feature information corresponding to the dialogue text to be clustered based on at least one second keyword in the dialogue text to be clustered.

[0023] The second clustering module is used to cluster the dialogue text to be clustered based on at least one clustering result and the semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, and to determine the target clustering result to which the dialogue text to be clustered belongs in the at least one clustering result; wherein, the at least one clustering result is obtained by the dialogue text clustering method as described in the first aspect.

[0024] Fifthly, embodiments of this specification provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.

[0025] Sixthly, embodiments of this specification provide a computer program product that stores multiple instructions adapted for loading by a processor and executing the above-described method steps.

[0026] In a seventh aspect, embodiments of this specification provide an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.

[0027] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:

[0028] This specification's embodiments acquire multiple dialogue texts generated by at least two users during a conversation. Further, by extracting semantic and word frequency features from each dialogue text, the multiple dialogue texts are clustered to obtain at least one clustering result. This specification overcomes the problem of dialogue texts being "rich in spoken language and low in information density" by extracting semantic features that characterize the deep semantic information of the dialogue texts and word frequency features of at least one keyword in the dialogue texts. Furthermore, by comprehensively integrating semantic and word frequency features to cluster multiple dialogue texts, unsupervised clustering of multiple dialogue texts can be achieved without pre-constructing labeled datasets to train clustering models or algorithms. This reduces manual costs and time consumption while achieving good clustering results and high accuracy. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1This is a schematic diagram of multiple dialogue texts provided in the embodiments of this specification;

[0031] Figure 2 This is a flowchart illustrating a dialogue text clustering method provided in the embodiments of this specification;

[0032] Figure 3 This is a schematic diagram of a process for obtaining dialogue text provided in the embodiments of this specification;

[0033] Figure 4 This is a schematic diagram of a process for obtaining multiple clustering results provided in the embodiments of this specification;

[0034] Figure 5 This is a flowchart illustrating a dialogue text clustering method provided in the embodiments of this specification;

[0035] Figure 6 This is a schematic diagram of a process for obtaining semantic feature information provided in an embodiment of this specification;

[0036] Figure 7 This is a flowchart illustrating a dialogue text clustering method provided in the embodiments of this specification;

[0037] Figure 8 This is a flowchart illustrating a dialogue text clustering method provided in the embodiments of this specification;

[0038] Figure 9 This is a schematic diagram of the structure of a dialog text clustering device provided in the embodiments of this specification;

[0039] Figure 10 This is a schematic diagram of another dialog text clustering device provided in the embodiments of this specification;

[0040] Figure 11 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this specification. Detailed Implementation

[0041] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0042] In the description of this specification, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this specification based on the specific circumstances. Furthermore, in the description of this specification, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0043] The present specification will now be described in detail with reference to specific embodiments.

[0044] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the feature information, dialogue text, first keyword, and second keyword involved in this specification were all obtained with full authorization.

[0045] With the development of science and technology and the internet, the amount of text data is constantly increasing. Using dialogue text clustering methods can efficiently extract valuable information from this text data. For example, as licensed non-bank financial institutions, consumer finance companies can use intelligently built and operated customer service systems to handle users' inquiries and resolve problems throughout the entire lifecycle of credit product use. Furthermore, with the development of internet technology, customer service systems have gradually moved from telephone service to a coexistence of online and telephone services. In other words, online service is a form of communication between users and customer service personnel through chat text boxes. However, due to the diversity of text content in user-customer service communication and the presence of a large amount of redundant expression, clustering the communication text generated in online customer service systems, and then mining and understanding this text through clustering to improve the identification and perception of user communication preferences and visitor intentions, is an indispensable part of the intelligent construction and operation of online customer service systems.

[0046] Currently, dialogue text clustering methods are mainly determined using machine learning or deep learning techniques from artificial intelligence technologies.

[0047] Machine learning-based dialogue text clustering methods primarily divide the problem into two parts: feature engineering and classifiers. Feature engineering includes text preprocessing, feature extraction, and text representation. This process begins with text cleaning, using word segmentation tools to segment the text into words. Then, methods such as bag-of-words, term frequency, and TF-IDF (term frequency–inverse document frequency) are used to represent the text as vectors. These vectors are then input into classifiers such as Support Vector Machines (SVM) or decision trees to obtain the final clustering result. However, machine learning has limited feature representation capabilities and requires manual feature processing, ultimately leading to low accuracy in dialogue text clustering.

[0048] Deep learning-based dialogue text clustering methods first clean and segment the text, then use neural networks such as word2vec to transform the text into dense distributed word vectors, and finally use neural networks such as Convolutional Neural Networks (CNN) or Long Short-Term Memory (LSTM) to train the distributed word vectors corresponding to the text to obtain the final clustering result.

[0049] like Figure 1 As shown, Figure 1 This is a schematic diagram of multiple dialogue texts provided in an embodiment of this specification. The multiple dialogue texts in this diagram include at least dialogue text 101 and dialogue text 102. It is understood that... Figure 1 The amount and content of the dialogue text shown are for illustrative purposes only, and this specification does not impose any limitations on them.

[0050] Dialogue text can be understood as the text generated during a conversation between at least two users. For example... Figure 1As shown, dialogue text 101 is the text generated during the dialogue between customer 2011 and customer service representative 2012, and dialogue text 102 is the text generated during the dialogue between user 2021 and user 2022. Specifically, dialogue text 101 includes: the sub-dialogue text "Need human customer service" output by customer 2011 through an electronic device; the sub-dialogue text "I understand you want to clear up your doubts, dear, please describe your problem, don't worry" output by customer 2011 through an electronic device; the sub-dialogue text "I would like to discuss my repayment plan, I'm short on cash" output by customer 2011 through another electronic device; and the sub-dialogue text "Is the caller's mobile phone number linked to an Alipay account?" output by customer 2012 through another electronic device, etc.

[0051] Multiple dialogue texts correspond to at least two users who are not exactly the same. For example, customer service representative 2012 corresponding to dialogue text 101 and user 2022 corresponding to dialogue text 102 are the same user, while customer service representative 2011 corresponding to dialogue text 101 and user 2021 corresponding to dialogue text 102 are not the same user. Another example is that the two users corresponding to dialogue text 101 and the two users corresponding to dialogue text 102 are completely different, and the areas covered by their respective dialogue content are also different.

[0052] It is understood that the dialogue text can be obtained through different methods, and the content of the dialogue text can be text corresponding to different scenarios. For example, the dialogue text can be travel-related text, health consultation-related text / articles related to health and wellness, etc. The dialogue text can be obtained by receiving input from a user through the input device of an electronic device, or it can be retrieved from an authorized platform or storage unit through a user's instruction, etc. This specification embodiment does not impose any limitations on this. In addition, the length of the dialogue text can be long text (such as thousands or tens of thousands of characters) or short text (such as tens or hundreds of characters), and this specification embodiment does not impose any limitations on this.

[0053] In this specification, the dialogue text includes multiple rounds of sub-dialogue text. Taking the dialogue text as the text generated by two users during a conversation as an example, the sub-dialogue texts corresponding to the two users are sorted according to the time sequence. A round of sub-dialogue text begins with the sub-dialogue text corresponding to one user and ends with the sub-dialogue text corresponding to the other user. Therefore, the dialogue text includes multiple rounds of dialogue text.

[0054] For example, such as Figure 1As shown, the dialogue text 102 includes at least two rounds of sub-dialogue text, namely a round of sub-dialogue text 1021 and another round of sub-dialogue text 1022. The first round of sub-dialogue text 1021 begins with the sub-dialogue text corresponding to user 202 and ends with the sub-dialogue text corresponding to user 2022. The second round of sub-dialogue text 1022 begins with the sub-dialogue text corresponding to user 2011 and ends with the sub-dialogue text corresponding to user 2022. It can be understood that, as... Figure 1 The number of rounds of sub-dialogue texts included in the dialogue text 102 shown is for illustrative purposes only. This specification also includes other numbers of rounds, and the dialogue texts 101 and 102 shown are dialogue texts generated by two users during a dialogue. This specification also includes other numbers of dialogue texts generated by users during a dialogue.

[0055] The aforementioned dialogue text clustering methods all require constructing labeled datasets to train deep learning models and / or classifiers, thereby clustering multiple dialogue texts using the trained models and / or classifiers. However, constructing these labeled datasets necessitates manual annotation, which is time-consuming and labor-intensive, resulting in high labor costs and significant time expenditure. Furthermore, as time progresses and transactions evolve, the content and topics of user communication change. Clustering methods that pre-define category spaces lack the ability to perceive changes in data distribution in real time, and re-annotating the data involves substantial manual, financial, and time investment. In contrast, unsupervised dialogue text clustering methods do not require labeled information, making them a more flexible and effective approach.

[0056] Therefore, this specification proposes a dialogue text clustering method to solve some or all of the above-mentioned problems. In one embodiment, such as Figure 2 The diagram illustrates a dialog text clustering method proposed in an embodiment of this specification. This method can be implemented using a computer program and can run on a dialog text clustering device based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application.

[0057] Specifically, the dialogue text clustering method includes:

[0058] S102, Obtain multiple dialogue texts.

[0059] Each dialogue text consists of text generated by at least two users during a conversation, and the at least two users corresponding to multiple dialogue texts are not entirely the same. For details on the specific content of the multiple dialogue texts and the methods for obtaining them, please refer to the above. Figure 1 As shown, it will not be elaborated further here.

[0060] The execution subject of the embodiments in this specification is a terminal device, which is an electronic device used by the user. This electronic device can be a personal computer, mobile phone, tablet computer, laptop, or other computer device with certain computing power that runs applications or web pages with text clustering functions. It can also be a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. It is understood that the number and type of terminal devices mentioned above are merely illustrative, and the embodiments in this specification do not impose any limitations on them.

[0061] In one embodiment, multiple original dialogue texts are obtained; wherein each original dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple original dialogue texts are not completely the same; based on the multiple original dialogue texts, the sub-dialogue texts corresponding to at least two users in each original dialogue text are merged to obtain the dialogue text corresponding to each original dialogue text, which includes multiple rounds of sub-dialogue texts.

[0062] The original dialogue text can be understood as directly acquiring the text generated by at least two users during a conversation. For example, after a user enters an online customer service system via an electronic device, they further access the system's human customer service channel by sending keywords or using the electronic device's controls. The user then engages in a conversation with a customer service representative through the electronic device's input device. Because the conversation between the user and / or the customer service representative is a free-flowing question-and-answer session, during the entire dialogue process, which includes one round of question-and-answer, the user and / or the customer service representative may generate multiple dialogue texts on a single topic, resulting in multiple chat boxes displayed on the electronic device's screen.

[0063] like Figure 3 As shown, Figure 3 This is a schematic diagram of a process for obtaining dialogue text provided in the embodiments of this specification. Figure 3 The left image shows the collected original dialogue text 301, collected in chronological order of the dialogue. The original dialogue text 301 includes two speakers: a user with dialogue ID "customer" and a customer service representative with dialogue ID "online_service". The original dialogue text 301 includes the text content of the dialogue text corresponding to each dialogue ID (represented by asterisks * in the image).

[0064] Furthermore, the sub-dialogue texts corresponding to at least two users in the original dialogue text are merged to obtain the dialogue texts corresponding to each original dialogue text, which include multiple rounds of sub-dialogue texts. According to the time sequence of the dialogue, each round of sub-dialogue is merged according to the rule that "the dialogue text generated by one user comes first, and the dialogue text generated by the other user comes later," thus obtaining the multi-round sub-dialogue texts, which are the dialogue texts corresponding to the original dialogue texts.

[0065] like Figure 3 As shown, Figure 3 The right figure shows the dialogue text 301 obtained after merging the original dialogue text 301 in the left figure. In this embodiment, by merging the original dialogue text, the information density of the merged dialogue text can be effectively improved, thereby improving the efficiency of clustering multiple dialogue texts.

[0066] In another embodiment, after merging the original dialogue text to obtain the final dialogue text, the dialogue text is further cleaned to obtain the cleaned dialogue text. Specifically, the above-mentioned cleaning process includes at least one or more of the following methods: removing unnecessary data such as garbled characters, English characters, URL links, and emojis from the dialogue text using regular expressions or other methods; and converting traditional Chinese characters to simplified Chinese characters. In this embodiment, the dialogue text is cleaned, for example, by removing stop words and special symbols to reduce the adverse effects of stop words or special symbols on the extraction of word frequency feature information from the dialogue text.

[0067] S104. Based on multiple dialogue texts, extract semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and extract word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text.

[0068] Each dialogue text includes at least one primary keyword, and the primary keyword included in different dialogue texts is not exactly the same as the primary keyword included in other dialogue texts. For example, one dialogue text includes two primary keywords, namely "agree" and "understand", another dialogue text includes three primary keywords, namely "agree" and "thank you", and yet another dialogue text includes two primary keywords, namely "disagree" and "dissatisfied".

[0069] Each dialogue text also includes at least one second keyword, and the at least one second keyword included in different dialogue texts is not exactly the same as the at least one second keyword included in other dialogue texts.

[0070] In this embodiment, the first keyword is related to emotions and / or opinions, and the second keyword is related to specific matters. For example, the first keyword includes "dissatisfaction", "satisfaction", "agree", "disagree", "willing", "understand", "do not understand", etc., and the second keyword includes "product use", "repayment date", "interest and fees", "loan interest rate", "negotiated repayment", etc.

[0071] The choice of the first keyword and the second keyword is different. Therefore, the semantic feature information obtained by the first keyword and the word frequency feature information obtained by the second keyword can represent the feature information of the dialogue text from two different perspectives, thereby improving the accuracy of clustering multiple dialogue texts.

[0072] Based on at least one primary keyword in each dialogue text, semantic feature information corresponding to each dialogue text is extracted. Semantic analysis is a technique for summarizing and analyzing the textual information of dialogue texts. By analyzing the textual information of dialogue texts, the core key content of the textual information of dialogue texts is extracted. Identifying at least one keyword in the dialogue text, and then extracting semantic feature information based on at least one primary keyword, can improve the expressive power of the extracted semantic feature information in representing the dialogue text.

[0073] Based on at least one second keyword in each dialogue text, word frequency feature information is extracted for each dialogue text. Word frequency feature information is a technique for summarizing and analyzing the word segmentation information of dialogue texts. By segmenting the dialogue text and then extracting the word frequency feature information of at least one second keyword in each dialogue text and multiple dialogue texts, the word frequency feature information corresponding to each dialogue text is obtained. Identifying at least two keywords in the dialogue text and then extracting word frequency feature information based on at least one second keyword can improve the expressive power of the extracted word frequency feature information in representing the dialogue text.

[0074] In one embodiment, before extracting the semantic and word frequency features of the dialogue text, preprocessing is performed on the dialogue text, including entity disambiguation, entity unification, and co-reference resolution. For example, in dialogue text, the same word may have different meanings in different contexts, thus requiring entity disambiguation. The purpose of entity disambiguation is to assign the same word to different entities based on different contexts. For instance, JMS, appearing in a basketball context, can be identified as an NBA player, while appearing in a movie-related context, it can be identified as a movie director. Similarly, in practical applications, there may be situations where two words correspond to the same entity, such as "Beijing" and "the capital of the motherland." Although these two words are literally different entities, they actually refer to the same entity, thus requiring entity unification (entity resolution) for multiple word segments in the dialogue text. Co-reference resolution is also an important step in preprocessing. Dialogue text typically contains many pronouns such as "he," "it," and "they," and preprocessing also needs to determine the entity corresponding to each pronoun. For example, in a conversation text, a user says, "I still have a question about this date." After dereferencing, the "this date" can be identified as specifically referring to the "repayment date."

[0075] Preprocessing, such as entity disambiguation, entity normalization, and referential resolution, can improve the expressive power of extracted semantic and word frequency features in representing dialogue texts, thereby enhancing the clustering effect of multiple dialogue texts.

[0076] S106. Based on the semantic feature information and word frequency feature information corresponding to each dialogue text, cluster the multiple dialogue texts to obtain at least one clustering result.

[0077] Each clustering result includes at least one dialogue text. It is understood that the at least one dialogue text included in each clustering result is not entirely identical to the at least one dialogue text included in other clustering results.

[0078] Clustering methods for clustering multiple dialogue texts can involve representing the semantic and word frequency features of each dialogue text as vectors, i.e., each dialogue text corresponds to a vector set, which includes vectors representing the semantic and word frequency features of the dialogue text. Further, multiple vector sets are processed by a clustering algorithm to obtain at least one clustering result for the multiple dialogue texts. The aforementioned clustering algorithm can be a clustering or classification algorithm from machine learning, thereby performing clustering processing on multiple training data to obtain multiple clustering results. The clustering processing can also be any applicable clustering algorithm conceived by those skilled in the art, such as K-means clustering, DBSCAN clustering, or quantum clustering, or any applicable clustering algorithm conceived by those skilled in the art, such as linear regression, logistic regression, KNN, or support vector machines.

[0079] like Figure 4 As shown, Figure 4 This is a flowchart illustrating a process for obtaining multiple clustering results, as provided in an embodiment of this specification. In this embodiment, multiple dialogue texts are included, specifically dialogue texts 4011, 4012, 4013, 4014, 4015, 4016, ..., 401N. Based on the semantic and word frequency features of each dialogue text, the multiple dialogue texts are clustered to obtain at least three clustering results. Specifically, clustering result 4021 includes dialogue texts 4011, 4013, and 4014; clustering result 4022 includes dialogue texts 4015 and 4016; and clustering result 4023 includes dialogue text 4012.

[0080] For example, clustering result 4021 corresponds to multiple dialogue texts, as well as multiple primary keywords including "agree" and "satisfied" and multiple secondary keywords including "repayment date" and "negotiated repayment". Clustering result 4022 corresponds to multiple dialogue texts, as well as multiple primary keywords including "disagree" and "dissatisfied" and multiple secondary keywords including "interest and fees".

[0081] In one embodiment, annotation information corresponding to each clustering result is obtained based on the word frequency feature information corresponding to at least one dialogue text included in each clustering result; the clustering results are then associated with the annotation information corresponding to the clustering results. The annotation information includes multiple keywords or a keyword map composed of multiple keywords. Based on the annotation information corresponding to each clustering result, users can easily understand the detailed information of the clustering result to which the dialogue text belongs.

[0082] Specifically, each clustering result includes at least one dialogue text, word frequency feature information corresponding to each dialogue text, and a set of M pre-selected keywords determined based on the word frequency feature information corresponding to each dialogue text. From these M pre-selected keywords, a selection algorithm selects the top N keywords, which are then used as annotation information for the clustering result. This annotation information is further associated with the clustering result. For example, clustering result 4021 corresponds to multiple dialogue texts, and the annotation information for clustering result 4021 includes the keywords "agree" and "negotiate repayment." Clustering result 4022 corresponds to multiple dialogue texts, and the annotation information for clustering result 4022 includes the keywords "dissatisfied" and "interest and fees."

[0083] In another embodiment, after training to obtain multiple clustering results, the dialogue text to be clustered is acquired. After clustering the dialogue text to be clustered, the target clustering result to which the dialogue text belongs is determined. Users can obtain the annotation information associated with the target clustering result and quickly understand the dialogue text to be clustered with the help of the annotation information. For example, if the target clustering result to which the dialogue text belongs is clustering result 4021, and the annotation information corresponding to clustering result 4021 includes the keywords "agree" and "negotiate repayment," then users can quickly understand that the dialogue text to be clustered is related to "negotiate repayment" based on this annotation information, and thus respond quickly to the dialogue text to be clustered, such as taking measures related to "negotiate repayment."

[0084] Furthermore, users can analyze multiple dialogue texts within a preset time period based on clustering results associated with annotation information. For example, within a preset time period, multiple dialogue texts are clustered into clustering result 4022, and the annotation information corresponding to clustering result 4022 includes the keywords "dissatisfaction" and "interest and fees." Therefore, users can analyze and understand that a large number of dialogue texts related to "dissatisfaction" and "interest and fees" were generated during this time period, thereby enabling them to respond quickly to relevant products or matters, such as taking adjustment measures related to "interest and fees."

[0085] This specification's embodiments acquire multiple dialogue texts generated by at least two users during a conversation. Further, by extracting semantic and word frequency features from each dialogue text, the multiple dialogue texts are clustered to obtain at least one clustering result. This specification overcomes the problem of dialogue texts being "rich in colloquial expressions and low in information density" by extracting semantic features that characterize the deep semantic information of the dialogue texts and word frequency features of at least one keyword in the dialogue texts. Furthermore, by comprehensively integrating semantic and word frequency features to cluster multiple dialogue texts, clustering multiple dialogue texts can be achieved without pre-constructing labeled datasets to train clustering models or algorithms. This reduces manual costs and time consumption while achieving good clustering results and high accuracy.

[0086] In one embodiment, such as Figure 5 The diagram illustrates a dialog text clustering method proposed in an embodiment of this specification. This method can be implemented using a computer program and can run on a dialog text clustering device based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application.

[0087] Specifically, the dialogue text clustering method includes:

[0088] S202, Obtain multiple dialogue texts.

[0089] See section 102 above; it will not be repeated here.

[0090] S204. Obtain a set of first keywords that includes multiple first keywords.

[0091] The first keyword set includes multiple first keywords. The first keyword set can be obtained by having technicians set it based on experience, or by further expanding the initial keyword set by using an unsupervised word segmentation model to perform unsupervised word segmentation on all sample texts or multiple dialogue texts after removing common stop words, and then manually selecting the top N most frequent words from the segmentation results to obtain the first keyword set.

[0092] The unsupervised word segmentation model can be the BAStruct BERT model, and the stop word set including multiple stop words can be selected from the Machine Intelligence Laboratory of Harbin Institute of Technology or Sichuan University, or an open-source Chinese stop word list. The sample text can come from any allowed text data set.

[0093] S206. Based on multiple dialogue texts and multiple first keywords in the first keyword set, determine at least one first keyword in each dialogue text.

[0094] Based on the set of first keywords, match multiple first keywords included in each dialogue text within multiple dialogue texts. For example, such as... Figure 1 The dialogue text 101 shown is determined to have the first keyword "doubt" based on its text data and the multiple first keywords included in the first keyword set. The method for determining at least the first keyword included in other dialogue texts is as described above.

[0095] S208. Extract semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text.

[0096] Specifically, based on at least one first keyword in each dialogue text, at least one key sub-dialogue text in the multi-round sub-dialogue texts included in each dialogue text is determined; wherein, each key sub-dialogue text in each dialogue text includes at least one first keyword; based on the key sub-dialogue text in each dialogue text, semantic feature information corresponding to each dialogue text is extracted.

[0097] First, the key sub-dialogue text in each dialogue text is determined by identifying at least one key sub-dialogue text within the multiple rounds of sub-dialogue texts: based on at least one keyword included in the dialogue text, each round of sub-dialogue text is traversed. If a round of sub-dialogue text contains at least one keyword, it is marked as a key sub-dialogue text. In other words, the i-th sub-dialogue text xi can be represented as a set of multiple key sub-dialogue texts. Where eij represents the j-th round key sub-dialogue text in the i-th dialogue text, i represents the label of the dialogue text, and j represents the round label of the key sub-dialogue text, increasing from 1 to m, that is, the dialogue text includes m rounds of key sub-dialogue text.

[0098] Furthermore, through contrastive learning, semantic feature information corresponding to each dialogue text is extracted based on at least one key sub-dialogue text in each dialogue text. This is achieved by performing data augmentation on each key sub-dialogue text in each dialogue text to obtain augmented texts corresponding to each key sub-dialogue text. Based on the key sub-dialogue texts in each dialogue text and their corresponding augmented texts, at least one positive sample pair and one negative sample pair are obtained for each dialogue text. Finally, based on these at least one positive sample pair and one negative sample pair, semantic feature information corresponding to each dialogue text is extracted through contrastive learning.

[0099] like Figure 6 As shown, Figure 6This is a schematic diagram of a process for obtaining semantic feature information provided in an embodiment of this specification. In this embodiment, taking the dialogue text numbered 1 in a dialogue text set composed of multiple dialogue texts as an example, the dialogue text x1 includes multiple key sub-dialogue texts, specifically including key sub-dialogue text e11, key sub-dialogue text e12, and key sub-dialogue text e13.

[0100] Data augmentation is performed on multiple key sub-dialogue texts corresponding to the given dialogue text to obtain augmented texts corresponding to each round of key sub-dialogue texts. Specifically, data augmentation is performed on key sub-dialogue text e11 to obtain augmented texts. Data augmentation is performed on the key sub-dialogue text e12 to obtain the augmented text. Data augmentation is performed on the key sub-dialogue text e13 to obtain the augmented text.

[0101] Each round's key sub-dialogue text and its corresponding augmented text form a positive sample pair, while each round's key sub-dialogue text forms a negative sample pair with other rounds' key dialogue texts. Specifically, the key sub-dialogue text e11 and its augmented text... Forming a positive sample pair, the key sub-dialogue text e12 and the amplified text Forming a positive sample pair, the key sub-dialogue text e13 and the amplified text A positive sample pair is formed. Key sub-dialogue texts e11 and e12 form a negative sample pair, key sub-dialogue texts e12 and e13 form a negative sample pair, and key sub-dialogue texts e11 and e13 form a negative sample pair.

[0102] Within the batch training framework, each sample batch randomly selects M key sub-dialogue texts as sample pairs for training the semantic feature information extractor 503. Based on the M key sub-dialogue texts, each sample batch contains M positive sample pairs consisting of the key sub-dialogue texts and augmented texts. These M positive sample pairs are grouped into a set c1, and the sample batch also contains M... 2 —M negative sample pairs consisting of key sub-dialogue texts and other key dialogue texts, which will be used to analyze the M samples. 2 —M negative sample pairs form a set c2.

[0103] In the semantic feature information extractor 503, a comparative learning process is performed to bring positive sample pairs closer together and push negative sample pairs further apart. The semantic feature information extractor 503 includes the following loss function:

[0104]

[0105] Among them, z ij=text_encoder(e ij ,θ). text_encoder(e ij Let ,θ) denote the semantic feature information extractor 503. This semantic feature information extractor 503 has a learnable set of parameters θ and is able to map the input key dialogue text into a text vector embedding. This represents a similarity metric for a specific vector. τ represents the temperature coefficient, which is a hyperparameter that is set.

[0106] Preferably, a pre-trained BERT model is used as the semantic feature extractor 503 to extract semantic feature information from the dialogue text. Cosine similarity is also used as a similarity criterion between the two vectors, which includes the following formula:

[0107]

[0108] The semantic feature extractor 503 is trained using the loss function described above. Training of the semantic feature extractor 503 is completed when the loss function converges to a set threshold or when a set number of training epochs are reached. Specifically, the loss function can be optimized using an Adam optimizer based on stochastic gradient descent (SGD).

[0109] After training, the semantic feature extractor 503 can extract feature information from multi-turn key sub-dialogue texts in the dialogue text. At the same time, the contrastive learning design enables the semantic feature extractor 503 to have the ability to distinguish dialogue texts with different semantics.

[0110] Based on the trained semantic feature information extractor 503, a single dialogue text x i The semantic feature information extractor 503 extracts multi-turn key sub-dialogue text. ij The feature information is then used to extract the multi-turn key sub-dialogue text. ij The set of feature information Further obtain the dialogue text x i The corresponding semantic feature information deep_fea∈R d1 Where d1 represents the feature dimension mapped by the semantic feature information extractor 503 to the key sub-dialogue text of each round. That is... Figure 6 As shown, the dialogue text x1 obtains semantic feature information 504 through the semantic feature information extractor 503.

[0111] In one embodiment, the method for performing data augmentation processing on at least one round of key sub-dialogue texts is as follows: based on at least one round of key sub-dialogue texts in each dialogue text, perform word segmentation processing on at least one round of key sub-dialogue texts in each dialogue text to obtain at least one round of word-segmented key sub-dialogue texts in each dialogue text; based on at least one round of word-segmented key sub-dialogue texts in each dialogue text, perform synonym replacement processing and / or random word insertion processing and / or random word swapping processing on at least one round of word-segmented key sub-dialogue texts in each dialogue text to obtain augmented texts corresponding to at least one round of key sub-dialogue texts in each dialogue text.

[0112] Specifically, regarding a key sub-dialogue text e in the dialogue text ij First, use word segmentation tools (such as jieba segmentation) to analyze the key sub-dialogue text e. ij Perform word segmentation. Further, obtain the first amplified text through synonym replacement (SR), that is, from the key sub-dialogue text e. ij From the corresponding word segmentation results, n1 words that do not belong to the stop word set are randomly selected, and their synonyms are randomly selected to replace them. Further, the first expanded text is subjected to random insertion (RI) to obtain the second expanded text, that is, a word that does not belong to the stop word set is randomly found in the word segmentation results, and its random synonym is calculated and inserted into a random position in the sentence. This step is repeated n2 times. Further, the second expanded text is subjected to random swap (RS) to obtain the expanded text, that is, the key sub-dialogue text e is randomly selected. ij The two word segments in the corresponding sentence are swapped, and this step is repeated n3 times.

[0113] This embodiment may also include other types of data augmentation processing; the above is merely an example.

[0114] In this embodiment, data amplification processing is performed on at least one round of key sub-dialogue text in each dialogue text to obtain amplified text corresponding to at least one round of key sub-dialogue text in each dialogue text. Furthermore, based on the at least one round of key sub-dialogue text and the amplified text corresponding to each dialogue text, semantic feature information corresponding to each dialogue text is extracted through contrastive learning. Data amplification processing on key sub-dialogue text can effectively improve the training effect of semantic feature information extractor, and the design of contrastive learning can enable semantic feature information extractor to have the ability to distinguish dialogue texts with different semantics, thereby improving the accuracy of extracting semantic feature information corresponding to dialogue texts.

[0115] S210. Obtain a set of multiple second keywords that include the second keyword.

[0116] The second keyword set includes multiple second keywords. The second keyword set can be obtained either by setting it based on the experience of technical personnel, or by further expanding the initial keyword set by using an unsupervised word segmentation model to perform unsupervised word segmentation on all sample texts or multiple dialogue texts after removing common stop words, and then manually selecting the top N most frequent words from the segmentation results to obtain the second keyword set.

[0117] The unsupervised word segmentation model can be the BAStruct BERT model, and the stop word set including multiple stop words can be selected from the Machine Intelligence Laboratory of Harbin Institute of Technology or Sichuan University, or an open-source Chinese stop word list. The sample text can come from any allowed text data set.

[0118] In this embodiment, the first keyword is related to emotions and / or opinions, and the second keyword is related to specific matters. For example, the first keyword includes "dissatisfaction", "satisfaction", "agree", "disagree", "willing", "understand", "do not understand", etc., and the second keyword includes "product use", "repayment date", "interest and fees", "loan interest rate", "negotiated repayment", etc.

[0119] S212. Based on multiple dialogue texts and multiple second keywords in the set of second keywords, determine at least one second keyword in each dialogue text.

[0120] Based on the multiple first keywords included in the second keyword set, match multiple second keywords included in each dialogue text within multiple dialogue texts. For example, such as... Figure 1 The dialogue text 101 shown is determined to have the second keyword "repayment date" based on its text data and the multiple second keywords included in the second keyword set. The method for determining at least the second keyword included in other dialogue texts is as described above.

[0121] S214. Based on at least one second keyword in each dialogue text, determine the word frequency and inverse text index corresponding to at least one second keyword in each dialogue text.

[0122] Term frequency and inverse text index are commonly used weighting techniques in information retrieval and data mining. Dialogue texts are typically characterized by "high levels of spoken language and low information density." To further enhance the ability to perceive second keywords during clustering tasks and improve the reusability of expert knowledge, this specification determines the term frequency and inverse text index corresponding to at least one second keyword in each dialogue text.

[0123] Specifically, based on at least one second keyword in the dialogue text, the word frequency and inverse text index corresponding to each second keyword are obtained by using open-source word segmentation tools and TF-IDF feature calculation tools.

[0124] In this embodiment, the size of the second keyword set should not be too large to avoid an explosion of information dimensions of the word frequency feature information corresponding to each dialogue text.

[0125] S216. Extract the word frequency feature information corresponding to each dialogue text based on the word frequency and inverse text index corresponding to at least one second keyword in each dialogue text.

[0126] Based on the word frequency and inverse text index TF-IDF corresponding to each second keyword, the word frequency feature information tfidf_fea∈Rd2 corresponding to the dialogue text xi is further obtained, where d2 represents the number of second keywords in the set of second keywords.

[0127] S218. Based on the semantic feature information and word frequency feature information corresponding to each dialogue text, cluster the multiple dialogue texts to obtain at least one clustering result.

[0128] See S106 above; it will not be repeated here.

[0129] This specification's embodiments acquire multiple dialogue texts generated by at least two users during a conversation. Further, by extracting semantic and word frequency features from each dialogue text, the multiple dialogue texts are clustered to obtain at least one clustering result. This specification overcomes the problem of dialogue texts being "rich in colloquial expressions and low in information density" by extracting semantic features that characterize the deep semantic information of the dialogue texts and word frequency features of at least one keyword in the dialogue texts. Furthermore, by comprehensively integrating semantic and word frequency features to cluster multiple dialogue texts, clustering multiple dialogue texts can be achieved without pre-constructing labeled datasets to train clustering models or algorithms. This reduces manual costs and time consumption while achieving good clustering results and high accuracy.

[0130] In one embodiment, such as Figure 7 The diagram illustrates a dialog text clustering method proposed in an embodiment of this specification. This method can be implemented using a computer program and can run on a dialog text clustering device based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application.

[0131] Specifically, the dialogue text clustering method includes:

[0132] S302, Obtain multiple dialogue texts.

[0133] See S102 above, which will not be repeated here.

[0134] S304. Based on multiple dialogue texts, extract semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and extract word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text.

[0135] See S102 or S204-S216 above, which will not be repeated here.

[0136] S306. Based on the semantic feature information and word frequency feature information corresponding to each dialogue text, determine the similarity between any two dialogue texts in the multiple dialogue texts.

[0137] Based on the semantic feature information deep_fea∈Rd1 and the word frequency feature information tfidf_fea∈Rd2 corresponding to each dialogue text, the similarity between any two dialogue texts in multiple dialogue texts is determined.

[0138] For example, the semantic feature information and word frequency feature information corresponding to the dialogue text are represented by vectors, that is, each dialogue text corresponds to a vector set. The cosine similarity between the vector set corresponding to each dialogue text and the vector set corresponding to other dialogue texts is calculated, so as to obtain the similarity between any two dialogue texts in multiple dialogue texts.

[0139] In one embodiment, the weight values ​​corresponding to the semantic feature information of each dialogue text and the weight values ​​corresponding to the word frequency feature information of each dialogue text are obtained; based on the semantic feature information, the weight values ​​corresponding to the semantic feature information, the word frequency feature information, and the weight values ​​corresponding to the word frequency feature information of each dialogue text, the similarity between any two dialogue texts in the multiple dialogue texts is determined. Specifically, calculating the similarity between any dialogue text xi and dialogue text xj includes the following formula:

[0140]

[0141] In other words, the similarity of any two dialogue text data can be based on semantic feature information deep_fea∈Rd1 and word frequency feature information tfidf_fea∈Rd2. The cosine similarity of the two feature information is calculated separately and then weighted and summed by a balancing coefficient a.

[0142] The value of 'a' can be determined through experience or clustering results. For example, a value of 1 for 'a' indicates that semantic features and word frequency features are equally important in measuring the similarity between any two dialogue texts. The larger the value of 'a', the more important word frequency features are in calculating the similarity between any two dialogue texts.

[0143] In this embodiment, by setting weights for semantic feature information and word frequency feature information corresponding to each dialogue text respectively, the rationality of calculating the similarity between any two dialogue texts can be improved, thereby improving the clustering effect of clustering multiple dialogue texts.

[0144] S308. Based on the similarity between any two dialogue texts in multiple dialogue texts, cluster the multiple dialogue texts to obtain at least one clustering result.

[0145] Based on the similarity between any two dialogue texts in multiple dialogue texts, and based on the principle that two dialogue texts with similarity higher than a threshold belong to the same clustering result, multiple dialogue texts are clustered to obtain at least one clustering result.

[0146] In this embodiment, based on the similarity between any two dialogue texts, a clustering algorithm is used to cluster the multiple dialogue texts, obtaining at least one clustering result. The clustering algorithm can be a clustering or classification algorithm from machine learning, thereby performing clustering processing on multiple training data to obtain multiple clustering results. The clustering processing can also be any applicable clustering algorithm conceived by those skilled in the art, such as K-means clustering, DBSCAN clustering, or quantum clustering, or any applicable clustering algorithm conceived by those skilled in the art, such as linear regression, logistic regression, KNN, or support vector machines. If K-means clustering is used to cluster multiple dialogue texts, the number of clusters, i.e., the number of clustering results n_clusters, also needs to be set. The number of clusters can be determined through experience or experimentation (such as the elbow method), and this embodiment does not impose any limitations on this.

[0147] This specification's embodiments acquire multiple dialogue texts generated by at least two users during a conversation. Further, by extracting semantic and word frequency features from each dialogue text, the multiple dialogue texts are clustered to obtain at least one clustering result. This specification overcomes the problem of dialogue texts being "rich in colloquial expressions and low in information density" by extracting semantic features that characterize the deep semantic information of the dialogue texts and word frequency features of at least one keyword in the dialogue texts. Furthermore, by comprehensively integrating semantic and word frequency features to cluster multiple dialogue texts, clustering multiple dialogue texts can be achieved without pre-constructing labeled datasets to train clustering models or algorithms. This reduces manual costs and time consumption while achieving good clustering results and high accuracy.

[0148] In one embodiment, such as Figure 8The diagram illustrates a dialog text clustering method proposed in an embodiment of this specification. This method can be implemented using a computer program and can run on a dialog text clustering device based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application.

[0149] Specifically, the dialogue text clustering method includes:

[0150] S402. Obtain the dialogue text to be clustered.

[0151] For methods on obtaining the dialogue text to be clustered, please refer to the methods on obtaining dialogue text, which will not be repeated here.

[0152] S404. Based on the dialogue text to be clustered, extract the semantic feature information corresponding to the dialogue text to be clustered based on at least one first keyword in the dialogue text to be clustered, and extract the word frequency feature information corresponding to the dialogue text to be clustered based on at least one second keyword in the dialogue text to be clustered.

[0153] The method for extracting the semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered is the same as the method for extracting the semantic feature information and word frequency feature information corresponding to the dialogue text, see S104, and will not be repeated here.

[0154] S408. Based on at least one clustering result, and the semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, cluster the dialogue text to be clustered, and determine the target clustering result to which the dialogue text to be clustered belongs in at least one clustering result.

[0155] At least one clustering result is obtained through, for example Figures 1-7 The clustering method is used to obtain the semantic and word frequency features of the dialogue text to be clustered. The similarity between the dialogue text to be clustered and at least one clustering result is calculated, and the clustering result with the highest similarity is determined as the target clustering result for the dialogue text to be clustered.

[0156] As shown in Figure 4, clustering results 4021, 4022, and 4023 are included. Based on the semantic and word frequency features of the dialogue text to be clustered, the similarity between the dialogue text to be clustered and each clustering result is calculated. For example, the similarity between the dialogue text to be clustered and at least one dialogue text included in each clustering result is calculated. A weighted average is then performed to obtain the similarity between the dialogue text to be clustered and each clustering result, and the clustering result with the highest similarity is determined as the target clustering result for the dialogue text to be clustered. For example, clustering result 4021 is determined as the target clustering result for the dialogue text to be clustered.

[0157] This specification's embodiments extract semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, and determine the target clustering result of the dialogue text to be clustered from at least one clustering result, thereby completing the clustering of the dialogue text to be clustered. In this specification, semantic feature information representing the deep semantic information of the dialogue text to be clustered, and word frequency feature information of at least one keyword in the dialogue text are extracted, overcoming the problem that the dialogue text to be clustered is "full of colloquial expressions and low information density". Furthermore, by integrating semantic feature information and word frequency feature information, the dialogue text to be clustered can be clustered without the need to construct a pre-labeled dataset to train a clustering model or clustering algorithm. This reduces manual costs and time consumption while achieving good clustering results and high accuracy.

[0158] The following are embodiments of the apparatus described in this specification, which can be used to execute the embodiments of the methods described in this specification. For details not disclosed in the apparatus embodiments of this specification, please refer to the embodiments of the methods described in this specification.

[0159] Please see Figure 9 This diagram illustrates the structure of a dialog text clustering apparatus provided in an exemplary embodiment of this specification. The dialog text clustering apparatus can be implemented as all or part of a device through software, hardware, or a combination of both. The dialog text clustering apparatus includes a first acquisition module 901, a first extraction module 902, and a first clustering module 903.

[0160] The first acquisition module 901 is used to acquire multiple dialogue texts; wherein each dialogue text is text generated by at least two users during a dialogue, and the multiple dialogue texts correspond to at least two users who are not completely the same;

[0161] The first extraction module 902 is used to extract semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and to extract word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text.

[0162] The first clustering module 903 is used to cluster the plurality of dialogue texts according to the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, and obtain at least one clustering result; wherein each clustering result includes at least one of the dialogue texts.

[0163] In one embodiment, the first extraction module 902 includes:

[0164] The first set unit is used to obtain a set of first keywords that includes multiple first keywords;

[0165] The first determining unit is configured to determine at least one first keyword in each of the multiple dialogue texts based on the multiple dialogue texts and multiple first keywords in the first keyword set;

[0166] The first extraction unit is used to extract semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text.

[0167] The second extraction unit is used to extract word frequency feature information corresponding to the dialogue text based on at least one second keyword in each of the multiple dialogue texts.

[0168] In one embodiment, the first extraction unit includes:

[0169] The first extraction subunit is used to determine at least one key sub-dialogue text among the multiple rounds of sub-dialogue texts included in each dialogue text based on at least one first keyword in each dialogue text; wherein, each key sub-dialogue text includes at least one first keyword.

[0170] The second extraction subunit is used to extract semantic feature information corresponding to each dialogue text based on at least one round of key sub-dialogue text in each dialogue text.

[0171] In one embodiment, the second extraction subunit is configured to perform data amplification processing on at least one key sub-dialogue text in each dialogue text according to at least one key sub-dialogue text in each dialogue text, so as to obtain amplified text corresponding to at least one key sub-dialogue text in each dialogue text respectively.

[0172] And for obtaining at least one positive sample pair and one negative sample pair corresponding to each of the dialogue texts based on at least one round key sub-dialogue text in each of the dialogue texts and the amplified text corresponding to at least one round key sub-dialogue text in each of the dialogue texts respectively;

[0173] And for extracting semantic feature information corresponding to each of the dialogue texts by contrastive learning based on at least one positive sample pair and one negative sample pair corresponding to each of the dialogue texts.

[0174] In one embodiment, the second extraction subunit is further configured to perform word segmentation on at least one round of key sub-dialogue text in each dialogue text based on at least one round of key sub-dialogue text in each dialogue text, so as to obtain at least one round of key sub-dialogue text after word segmentation in each dialogue text.

[0175] It is also used to perform synonym replacement processing and / or random word insertion processing and / or random word exchange processing on key sub-dialogue texts that have undergone at least one round of word segmentation processing in each of the dialogue texts, so as to obtain the amplified texts corresponding to the key sub-dialogue texts that have undergone at least one round of word segmentation processing in each of the dialogue texts.

[0176] In one embodiment, the first extraction module 902 includes:

[0177] The third extraction unit is used to extract semantic feature information corresponding to each of the multiple dialogue texts based on at least one first keyword in each of the dialogue texts.

[0178] The second set unit is used to obtain a set of second keywords that includes multiple second keywords;

[0179] The second determining unit is configured to determine at least one second keyword in each of the multiple dialogue texts based on the multiple dialogue texts and the multiple second keywords in the second keyword set;

[0180] The fourth extraction unit is used to determine the word frequency and inverse text index corresponding to at least one second keyword in each of the dialogue texts, based on at least one second keyword in each of the dialogue texts.

[0181] The fifth extraction unit is used to extract word frequency feature information corresponding to each dialogue text based on the word frequency and inverse text index corresponding to at least one second keyword in each dialogue text.

[0182] In one embodiment, the first keyword is related to emotions and / or opinions, and the second keyword is related to specific matters.

[0183] In one embodiment, the first clustering module 903 includes:

[0184] The similarity determination unit is used to determine the similarity between any two dialogue texts among the plurality of dialogue texts based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts respectively;

[0185] A similarity clustering unit is used to cluster the multiple dialogue texts based on the similarity between any two dialogue texts, and obtain at least one of the clustering results.

[0186] In one embodiment, the similarity determination unit includes:

[0187] The weight acquisition subunit is used to acquire the weight value corresponding to the semantic feature information of each dialogue text, and the weight value corresponding to the word frequency feature information of each dialogue text.

[0188] The similarity determination subunit is used to determine the similarity between any two dialogue texts among the plurality of dialogue texts based on the semantic feature information, the weight value corresponding to the semantic feature information, the word frequency feature information, and the weight value corresponding to the word frequency feature information, respectively.

[0189] In one embodiment, a similar clustering unit includes:

[0190] The similarity clustering subunit is used to cluster the multiple dialogue texts according to the similarity between any two dialogue texts in the multiple dialogue texts using a clustering algorithm, and obtain at least one of the clustering results.

[0191] In one embodiment, the first acquisition module 901 includes:

[0192] The original acquisition unit is used to acquire multiple original dialogue texts; wherein each original dialogue text is text generated by at least two users during a dialogue, and the multiple original dialogue texts correspond to at least two users who are not completely the same;

[0193] The merging processing unit is used to merge the sub-dialogue texts corresponding to at least two users in each of the multiple original dialogue texts to obtain a dialogue text corresponding to each of the original dialogue texts, which includes multiple rounds of sub-dialogue texts.

[0194] In one embodiment, the dialogue text clustering apparatus further includes:

[0195] The information acquisition module is used to obtain annotation information corresponding to each clustering result based on the word frequency feature information corresponding to at least one dialogue text included in each clustering result;

[0196] The information annotation module is used to associate each clustering result with the annotation information corresponding to the clustering result.

[0197] This specification's embodiments acquire multiple dialogue texts generated by at least two users during a conversation. Further, by extracting semantic and word frequency features from each dialogue text, the multiple dialogue texts are clustered to obtain at least one clustering result. This specification overcomes the problem of dialogue texts being "rich in colloquial expressions and low in information density" by extracting semantic features that characterize the deep semantic information of the dialogue texts and word frequency features of at least one keyword in the dialogue texts. Furthermore, by comprehensively integrating semantic and word frequency features to cluster multiple dialogue texts, clustering multiple dialogue texts can be achieved without pre-constructing labeled datasets to train clustering models or algorithms. This reduces manual costs and time consumption while achieving good clustering results and high accuracy.

[0198] Please see Figure 10 This diagram illustrates the structure of a dialog text clustering apparatus provided in an exemplary embodiment of this specification. The dialog text clustering apparatus can be implemented as all or part of a device through software, hardware, or a combination of both. The dialog text clustering apparatus includes a second acquisition module 1001, a second extraction module 1002, and a second clustering module 1003.

[0199] The second acquisition module 1001 is used to acquire the dialogue text to be clustered;

[0200] The second extraction module 1002 is used to extract semantic feature information corresponding to the dialogue text to be clustered based on at least one first keyword in the dialogue text to be clustered, and to extract word frequency feature information corresponding to the dialogue text to be clustered based on at least one second keyword in the dialogue text to be clustered.

[0201] The second clustering module 1003 is used to cluster the dialogue text to be clustered based on at least one clustering result, and semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, respectively, to determine the target clustering result to which the dialogue text to be clustered belongs in the at least one clustering result; wherein, the at least one clustering result is determined by means of, for example Figures 1-7 The dialogue text clustering method described in any one of the above methods is used to obtain the results.

[0202] This specification's embodiments extract semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, and determine the target clustering result of the dialogue text to be clustered from at least one clustering result, thereby completing the clustering of the dialogue text to be clustered. In this specification, semantic feature information representing the deep semantic information of the dialogue text to be clustered, and word frequency feature information of at least one keyword in the dialogue text are extracted, overcoming the problem that the dialogue text to be clustered is "full of colloquial expressions and low information density". Furthermore, by integrating semantic feature information and word frequency feature information, the dialogue text to be clustered can be clustered without the need to construct a pre-labeled dataset to train a clustering model or clustering algorithm. This reduces manual costs and time consumption while achieving good clustering results and high accuracy.

[0203] It should be noted that the dialogue text clustering device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the dialogue text clustering method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the dialogue text clustering device and the dialogue text clustering method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0204] The example numbers in this specification are for descriptive purposes only and do not represent the superiority or inferiority of the examples.

[0205] This specification also provides a computer storage medium that can store multiple instructions adapted to be loaded and executed by a processor as described above. Figure 1 - Figure 8 The specific execution process of the dialogue text clustering method described in the illustrated embodiment can be found in [reference needed]. Figure 1 - Figure 8 The specific details of the illustrated embodiments will not be elaborated here.

[0206] This specification also provides a computer program product that stores at least one instruction, said at least one instruction being loaded and executed by the processor as described above. Figure 1 - Figure 8 The specific execution process of the dialogue text clustering method described in the illustrated embodiment can be found in [reference needed]. Figure 1 - Figure 8 The specific details of the illustrated embodiments will not be elaborated here.

[0207] Please see Figure 11 This document provides a schematic diagram of the structure of an electronic device as an embodiment of the present specification. Figure 11As shown, the electronic device 1100 may include: at least one processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105, and at least one communication bus 1102.

[0208] The communication bus 1102 is used to realize the connection and communication between these components.

[0209] The user interface 1103 may include a display screen and a camera. Optionally, the user interface 1103 may also include a standard wired interface and a wireless interface.

[0210] The network interface 1104 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0211] The processor 1101 may include one or more processing cores. The processor 1101 connects to various parts of the server 1100 via various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1105, and by calling data stored in the memory 1105. Optionally, the processor 1101 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1101 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 1101.

[0212] The memory 1105 may include random access memory (RAM) or read-only memory. Optionally, the memory 1105 may include a non-transitory computer-readable storage medium. The memory 1105 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1105 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1105 may also be at least one storage device located remotely from the aforementioned processor 1101. Figure 11 As shown, the memory 1105, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a dialog text clustering application.

[0213] exist Figure 11 In the illustrated electronic device 1100, the user interface 1103 is mainly used to provide an interface for user input and to obtain user input data; while the processor 1101 can be used to call the dialogue text clustering application stored in the memory 1105 and specifically perform the following operations:

[0214] Obtain multiple dialogue texts; wherein each dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple dialogue texts are not completely the same;

[0215] Based on the plurality of dialogue texts, semantic feature information corresponding to each dialogue text is extracted based on at least one first keyword in each dialogue text, and word frequency feature information corresponding to each dialogue text is extracted based on at least one second keyword in each dialogue text;

[0216] Based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, the multiple dialogue texts are clustered to obtain at least one clustering result; wherein each clustering result includes at least one of the dialogue texts.

[0217] In one embodiment, processor 1101 executes the following steps: extracting semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and extracting word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text. Specifically, the following steps are performed:

[0218] Get a set of first keywords that includes multiple first keywords;

[0219] Based on the plurality of dialogue texts and the plurality of first keywords in the first keyword set, determine at least one first keyword in each of the dialogue texts;

[0220] Based on at least one first keyword in each of the dialogue texts, extract the semantic feature information corresponding to each of the dialogue texts;

[0221] Based on the plurality of dialogue texts, word frequency feature information corresponding to each dialogue text is extracted based on at least one second keyword in each dialogue text.

[0222] In one embodiment, processor 1101 performs the step of extracting semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, specifically by:

[0223] Based on at least one first keyword in each of the dialogue texts, at least one key sub-dialogue text in the multiple rounds of sub-dialogue texts included in each of the dialogue texts is determined; wherein, each of the dialogue texts includes at least one first keyword in each of the at least one key sub-dialogue texts.

[0224] Based on at least one round of key sub-dialogue text in each of the dialogue texts, extract the semantic feature information corresponding to each of the dialogue texts.

[0225] In one embodiment, processor 1101 executes the step of extracting semantic feature information corresponding to each dialogue text based on at least one round of key sub-dialogue text in each dialogue text, specifically performing:

[0226] Based on at least one key sub-dialogue text in each of the dialogue texts, data amplification processing is performed on at least one key sub-dialogue text in each of the dialogue texts to obtain amplified text corresponding to at least one key sub-dialogue text in each of the dialogue texts.

[0227] Based on at least one key sub-dialogue text in each of the dialogue texts, and the amplified text corresponding to at least one key sub-dialogue text in each of the dialogue texts, at least one positive sample pair and one negative sample pair corresponding to each of the dialogue texts are obtained.

[0228] Based on at least one positive sample pair and one negative sample pair corresponding to each of the dialogue texts, semantic feature information corresponding to each of the dialogue texts is extracted through contrastive learning.

[0229] In one embodiment, processor 1101 executes the step of performing data augmentation processing on at least one round of key sub-dialogue texts in each of the dialogue texts, based on at least one round of key sub-dialogue texts in each of the dialogue texts, to obtain augmented texts corresponding to at least one round of key sub-dialogue texts in each of the dialogue texts, specifically:

[0230] Based on at least one round of key sub-dialogue text in each of the aforementioned dialogue texts, word segmentation is performed on at least one round of key sub-dialogue text in each of the aforementioned dialogue texts to obtain at least one round of key sub-dialogue text after word segmentation in each of the aforementioned dialogue texts.

[0231] Based on the key sub-dialogue texts that have undergone word segmentation processing in at least one round of each dialogue text, synonym replacement processing and / or random word insertion processing and / or random word swapping processing are performed on the key sub-dialogue texts that have undergone word segmentation processing in at least one round of each dialogue text to obtain the expanded texts corresponding to the key sub-dialogue texts in at least one round of each dialogue text.

[0232] In one embodiment, processor 1101 executes the following steps: extracting semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and extracting word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text. Specifically, the following steps are performed:

[0233] Based on the plurality of dialogue texts, semantic feature information corresponding to each dialogue text is extracted based on at least one first keyword in each dialogue text.

[0234] Get a set of secondary keywords that includes multiple secondary keywords;

[0235] Based on the plurality of dialogue texts and the plurality of second keywords in the second keyword set, determine at least one second keyword in each of the dialogue texts;

[0236] Based on at least one second keyword in each of the dialogue texts, determine the word frequency and inverse text index corresponding to at least one second keyword in each of the dialogue texts;

[0237] Based on the word frequency and inverse text index corresponding to at least one second keyword in each of the dialogue texts, word frequency feature information corresponding to each of the dialogue texts is extracted.

[0238] In one embodiment, the first keyword is related to emotions and / or opinions, and the second keyword is related to specific matters.

[0239] In one embodiment, processor 1101 performs clustering of the multiple dialogue texts based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, specifically executing:

[0240] Based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, the similarity between any two dialogue texts in the plurality of dialogue texts is determined;

[0241] Based on the similarity between any two dialogue texts in the plurality of dialogue texts, the plurality of dialogue texts are clustered to obtain at least one clustering result.

[0242] In one embodiment, processor 1101 executes the step of determining the similarity between any two dialogue texts among the plurality of dialogue texts based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, specifically executing:

[0243] Obtain the weight values ​​corresponding to the semantic feature information of each dialogue text, and the weight values ​​corresponding to the word frequency feature information of each dialogue text;

[0244] Based on the semantic feature information, the weight value corresponding to the semantic feature information, the word frequency feature information, and the weight value corresponding to the word frequency feature information of each of the aforementioned dialogue texts, the similarity between any two dialogue texts among the plurality of dialogue texts is determined.

[0245] In one embodiment, processor 1101 performs the step of clustering the plurality of dialogue texts based on the similarity between any two dialogue texts in the plurality of dialogue texts to obtain at least one clustering result, specifically by:

[0246] Based on the similarity between any two dialogue texts in the plurality of dialogue texts, a clustering algorithm is used to cluster the plurality of dialogue texts to obtain at least one clustering result.

[0247] In one embodiment, processor 1101 performs the acquisition of multiple dialogue texts, specifically;

[0248] Obtain multiple original dialogue texts; wherein each original dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple original dialogue texts are not completely the same;

[0249] Based on the multiple original dialogue texts, the sub-dialogue texts corresponding to at least two users in each original dialogue text are merged to obtain a dialogue text corresponding to each original dialogue text, which includes multiple rounds of sub-dialogue texts.

[0250] In one embodiment, after the processor 1101 performs clustering of the plurality of dialogue texts based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, and obtains at least one clustering result, it further performs:

[0251] Based on the word frequency feature information corresponding to at least one dialogue text included in each of the clustering results, the annotation information corresponding to each of the clustering results is obtained;

[0252] The clustering results are associated with the corresponding annotation information.

[0253] In one embodiment, processor 1101 can be used to invoke a conversational text clustering application stored in memory 1105, and specifically perform the following operations:

[0254] Obtain the dialogue text to be clustered;

[0255] Based on the dialogue text to be clustered, semantic feature information corresponding to the dialogue text to be clustered is extracted based on at least one first keyword in the dialogue text to be clustered, and word frequency feature information corresponding to the dialogue text to be clustered is extracted based on at least one second keyword in the dialogue text to be clustered.

[0256] Based on at least one clustering result, and the semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, the dialogue text to be clustered is clustered to determine the target clustering result to which the dialogue text to be clustered belongs in the at least one clustering result; wherein, the at least one clustering result is determined by means of, for example Figures 1-7 The dialogue text clustering method described above is used to obtain the results.

[0257] This specification's embodiments acquire multiple dialogue texts generated by at least two users during a conversation. Further, by extracting semantic and word frequency features from each dialogue text, the multiple dialogue texts are clustered to obtain at least one clustering result. This specification overcomes the problem of dialogue texts being "rich in colloquial expressions and low in information density" by extracting semantic features that characterize the deep semantic information of the dialogue texts and word frequency features of at least one keyword in the dialogue texts. Furthermore, by comprehensively integrating semantic and word frequency features to cluster multiple dialogue texts, clustering multiple dialogue texts can be achieved without pre-constructing labeled datasets to train clustering models or algorithms. This reduces manual costs and time consumption while achieving good clustering results and high accuracy.

[0258] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.

[0259] The above-disclosed embodiments are merely preferred embodiments of this specification and should not be construed as limiting the scope of this specification. Therefore, any equivalent variations made in accordance with the claims of this specification shall still fall within the scope of this specification.

Claims

1. A dialogue text clustering method, the dialogue text clustering method comprising: Obtain multiple dialogue texts; wherein each dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple dialogue texts are not completely the same; The acquisition of multiple dialogue texts includes; Obtain multiple original dialogue texts; wherein each original dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple original dialogue texts are not completely the same; Based on the multiple original dialogue texts, the sub-dialogue texts corresponding to at least two users in each original dialogue text are merged to obtain the dialogue text corresponding to each original dialogue text, which includes multiple rounds of sub-dialogue texts. In this process, each round of dialogue is merged according to the time sequence of the dialogue and the rule that the dialogue text generated by one user comes first and the dialogue text generated by another user comes later, so as to obtain the dialogue text corresponding to each original dialogue text, which includes the dialogue text of multiple rounds of dialogue text. Based on the plurality of dialogue texts, semantic feature information corresponding to each dialogue text is extracted based on at least one first keyword in each dialogue text, and word frequency feature information corresponding to each dialogue text is extracted based on at least one second keyword in each dialogue text; the first keyword is related to emotion and / or opinion, and the second keyword is related to specific matters; Based on at least one first keyword in each of the dialogue texts, semantic feature information corresponding to each of the dialogue texts is extracted, including: Based on at least one first keyword in each of the dialogue texts, at least one key sub-dialogue text in the multiple rounds of sub-dialogue texts included in each of the dialogue texts is determined; wherein, each of the dialogue texts includes at least one first keyword in each of the at least one key sub-dialogue texts. Based on at least one key sub-dialogue text in each dialogue text, extract the semantic feature information corresponding to each dialogue text; Based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, the multiple dialogue texts are clustered to obtain at least one clustering result; wherein each clustering result includes at least one of the dialogue texts.

2. The dialogue text clustering method according to claim 1, wherein the step of extracting semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and extracting word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text, comprises: Get a set of first keywords that includes multiple first keywords; Based on the plurality of dialogue texts and the plurality of first keywords in the first keyword set, at least one first keyword is determined in each of the dialogue texts; Based on at least one first keyword in each of the dialogue texts, extract the semantic feature information corresponding to each of the dialogue texts; Based on the plurality of dialogue texts, word frequency feature information corresponding to each dialogue text is extracted based on at least one second keyword in each dialogue text.

3. The dialogue text clustering method according to claim 2, wherein extracting semantic feature information corresponding to each dialogue text based on at least one round of key sub-dialogue text in each dialogue text includes: Based on at least one key sub-dialogue text in each of the dialogue texts, data amplification processing is performed on at least one key sub-dialogue text in each of the dialogue texts to obtain amplified text corresponding to at least one key sub-dialogue text in each of the dialogue texts. Based on at least one key sub-dialogue text in each of the dialogue texts, and the amplified text corresponding to at least one key sub-dialogue text in each of the dialogue texts, at least one positive sample pair and one negative sample pair corresponding to each of the dialogue texts are obtained. Based on at least one positive sample pair and one negative sample pair corresponding to each of the dialogue texts, semantic feature information corresponding to each of the dialogue texts is extracted through contrastive learning.

4. The dialogue text clustering method according to claim 3, wherein the step of performing data augmentation processing on at least one key sub-dialogue text in each of the dialogue texts based on at least one key sub-dialogue text in each of the dialogue texts to obtain augmented texts corresponding to at least one key sub-dialogue text in each of the dialogue texts, includes: Based on at least one round of key sub-dialogue text in each of the aforementioned dialogue texts, word segmentation is performed on at least one round of key sub-dialogue text in each of the aforementioned dialogue texts to obtain at least one round of key sub-dialogue text after word segmentation in each of the aforementioned dialogue texts. Based on the key sub-dialogue texts that have undergone word segmentation processing in at least one round of each dialogue text, synonym replacement processing and / or random word insertion processing and / or random word swapping processing are performed on the key sub-dialogue texts that have undergone word segmentation processing in at least one round of each dialogue text to obtain the expanded texts corresponding to the key sub-dialogue texts in at least one round of each dialogue text.

5. The dialogue text clustering method according to claim 1 or 2, wherein the step of extracting semantic feature information corresponding to each dialogue text based on at least one first keyword in each dialogue text, and extracting word frequency feature information corresponding to each dialogue text based on at least one second keyword in each dialogue text, comprises: Based on the plurality of dialogue texts, semantic feature information corresponding to each dialogue text is extracted based on at least one first keyword in each dialogue text. Get a set of secondary keywords that includes multiple secondary keywords; Based on the plurality of dialogue texts and the plurality of second keywords in the second keyword set, determine at least one second keyword in each of the dialogue texts; Based on at least one second keyword in each of the dialogue texts, determine the term frequency and inverse document frequency (TF-IDF) corresponding to at least one second keyword in each of the dialogue texts. Based on the word frequency and inverse text index corresponding to at least one second keyword in each of the dialogue texts, word frequency feature information corresponding to each of the dialogue texts is extracted.

6. The dialogue text clustering method according to claim 1, wherein clustering the plurality of dialogue texts based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts includes: Based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, the similarity between any two dialogue texts in the plurality of dialogue texts is determined; Based on the similarity between any two dialogue texts in the plurality of dialogue texts, the plurality of dialogue texts are clustered to obtain at least one clustering result.

7. The dialogue text clustering method according to claim 6, wherein determining the similarity between any two dialogue texts among the plurality of dialogue texts based on the semantic feature information and word frequency feature information corresponding to each of the dialogue texts respectively includes: Obtain the weight values ​​corresponding to the semantic feature information of each dialogue text, and the weight values ​​corresponding to the word frequency feature information of each dialogue text; Based on the semantic feature information, the weight value corresponding to the semantic feature information, the word frequency feature information, and the weight value corresponding to the word frequency feature information of each of the aforementioned dialogue texts, the similarity between any two dialogue texts among the plurality of dialogue texts is determined.

8. The dialogue text clustering method according to claim 6 or 7, wherein clustering the plurality of dialogue texts based on the similarity between any two dialogue texts to obtain at least one clustering result includes: Based on the similarity between any two dialogue texts in the plurality of dialogue texts, a clustering algorithm is used to cluster the plurality of dialogue texts to obtain at least one clustering result.

9. The dialogue text clustering method according to claim 1, further comprising, after clustering the plurality of dialogue texts according to the semantic feature information and word frequency feature information corresponding to each of the dialogue texts to obtain at least one clustering result: Based on the word frequency feature information corresponding to at least one dialogue text included in each of the clustering results, the annotation information corresponding to each of the clustering results is obtained; The clustering results are associated with the corresponding annotation information.

10. A dialogue text clustering method, the dialogue text clustering method comprising: Obtain the dialogue text to be clustered; Based on the dialogue text to be clustered, semantic feature information corresponding to the dialogue text to be clustered is extracted based on at least one first keyword in the dialogue text to be clustered, and word frequency feature information corresponding to the dialogue text to be clustered is extracted based on at least one second keyword in the dialogue text to be clustered. Based on at least one clustering result, and the semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, the dialogue text to be clustered is clustered to determine the target clustering result to which the dialogue text to be clustered belongs in the at least one clustering result; wherein, the at least one clustering result is obtained by the dialogue text clustering method as described in any one of claims 1-9.

11. A dialog text clustering device, the dialog text clustering device comprising: A first acquisition module is used to acquire multiple dialogue texts; wherein each dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple dialogue texts are not completely identical; acquire multiple original dialogue texts; wherein each original dialogue text is text generated by at least two users during a dialogue, and the at least two users corresponding to the multiple original dialogue texts are not completely identical; based on the multiple original dialogue texts, merge the sub-dialogue texts corresponding to at least two users in each original dialogue text to obtain a dialogue text corresponding to each original dialogue text including multiple rounds of sub-dialogue texts; wherein, according to the time order of dialogue generation, and following the rule that the dialogue text generated by one user comes first, the dialogue text generated by another user comes later, each round of sub-dialogue is merged to obtain a dialogue text corresponding to each original dialogue text including multiple rounds of dialogue texts. A first extraction module is configured to extract semantic feature information corresponding to each of the plurality of dialogue texts based on at least one first keyword in each dialogue text, and extract word frequency feature information corresponding to each of the dialogue texts based on at least one second keyword in each dialogue text; wherein the first keyword is related to emotion and / or opinion, and the second keyword is related to specific matters; determine at least one key sub-dialogue text in the multiple rounds of sub-dialogue texts included in each dialogue text based on at least one first keyword in each dialogue text; wherein each key sub-dialogue text includes at least one first keyword; and extract semantic feature information corresponding to each dialogue text based on at least one key sub-dialogue text. The first clustering module is used to cluster the multiple dialogue texts according to the semantic feature information and word frequency feature information corresponding to each of the dialogue texts, and obtain at least one clustering result; wherein each clustering result includes at least one of the dialogue texts.

12. A dialog text clustering device, the dialog text clustering device comprising: The second acquisition module is used to acquire the dialogue text to be clustered. The second extraction module is used to extract semantic feature information corresponding to the dialogue text to be clustered based on at least one first keyword in the dialogue text to be clustered, and to extract word frequency feature information corresponding to the dialogue text to be clustered based on at least one second keyword in the dialogue text to be clustered. The second clustering module is used to cluster the dialogue text to be clustered based on at least one clustering result and the semantic feature information and word frequency feature information corresponding to the dialogue text to be clustered, and to determine the target clustering result to which the dialogue text to be clustered belongs in the at least one clustering result; wherein, the at least one clustering result is obtained by the dialogue text clustering method as described in any one of claims 1-9.

13. A computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the method steps of any one of claims 1 to 10.

14. A computer program product storing a plurality of instructions adapted for loading by a processor and executing the method steps of any one of claims 1 to 10.

15. An electronic device comprising: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Network information topic detection method, system and device based on multi-feature fusion

    CN114579731A