Network public opinion text clustering method, device, equipment, medium and program product
By acquiring keyword sets from online public opinion texts and response texts and generating synonyms, and combining them with tags to calculate similarity, the problem of inaccurate clustering of online public opinion texts was solved, achieving higher clustering accuracy.
Patent Information
- Application Number
- CN202611132576.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-11-06
AI Technical Summary
In existing technologies, online public opinion text clustering is based solely on word segmentation results, which leads to online public opinion texts with different expressions but actually corresponding to the same type of event being classified into different categories, resulting in inaccurate clustering results.
By acquiring the first set of keywords from online public opinion texts and response texts, generating a second set of keywords for synonyms, and combining the first tag to calculate the similarity, clustering results of online public opinion texts are generated, including user sentiment tags and business keyword tags, in order to improve clustering accuracy.
This avoids the problem of online public opinion texts with different expressions but actually corresponding to the same type of event being classified into different categories, thus improving the accuracy of the clustering results of online public opinion texts.
Smart Images

Figure CN123048780A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field, and in particular to a method, apparatus, device, medium, and program product for clustering online public opinion texts. Background Technology
[0002] With the development of internet technology, online public opinion texts have become a core element reflecting user opinions. Clustering online public opinion texts and then processing abnormal events corresponding to online public opinion based on the clustering results has become increasingly important.
[0003] In related technologies, multiple collected online public opinion texts are first processed by word segmentation to obtain the word segmentation results of each online public opinion text. Then, by calculating the similarity of the word segmentation results of the online public opinion texts, the online public opinion texts are clustered to obtain the above-mentioned clustering results of multiple online public opinion texts.
[0004] However, the above-mentioned schemes, which rely solely on word segmentation results to cluster online public opinion texts, are prone to classifying texts with different expressions but corresponding to the same type of event into different categories. For example, the texts "Broadband cannot be connected" and "No internet" essentially correspond to the same type of event, but because their word segmentation results are low in similarity, they are classified into different categories. Thus, the clustering results of online public opinion texts in these related technologies are not accurate enough. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and program product for clustering online public opinion texts, which can improve the accuracy of online public opinion text clustering results.
[0006] In a first aspect, embodiments of this application provide a method for clustering online public opinion texts. The method includes: obtaining a first keyword set based on at least one online public opinion text and a response text, wherein the online public opinion text describes a user's expressed opinion, and the response text responds to the user's expressed opinion; the first keyword set includes first keywords extracted from the online public opinion text and the response text; inputting the first keyword set into a word vector model to generate a second keyword set, wherein the second keyword set includes synonyms of the first keywords; and generating a clustering result for the at least one online public opinion text based on the first keyword set, the second keyword set, and a first tag corresponding to the at least one online public opinion text, wherein the first tag includes at least one of the following: a user sentiment tag and a business keyword tag, wherein the user sentiment tag describes the sentiment type and intensity corresponding to the online public opinion text, and the business keyword tag describes the content category to which the online public opinion text belongs.
[0007] The technical solution provided in this application brings at least the following beneficial effects: In this solution, the first keyword set of online public opinion text and response text are obtained respectively, and synonyms of the first keyword are generated to obtain the second keyword set. Then, based on the first keyword set, the second keyword set and the first label corresponding to each public opinion text, the clustering result of the public opinion text is determined. This avoids the problem that online public opinion texts with different expressions but actually corresponding to the same type of event are classified into different categories, and improves the accuracy of the clustering result of online public opinion text.
[0008] One possible implementation involves generating a clustering result for the at least one online public opinion text based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text. This includes: calculating a first similarity between every two online public opinion texts in the at least one online public opinion text based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text; and generating a clustering result for the at least one online public opinion text based on the first similarity.
[0009] Another possible implementation involves calculating the first similarity between every two online public opinion texts based on the first keyword set, the second keyword set, and the first tag corresponding to at least one online public opinion text. This includes: calculating a second similarity based on the first keyword set corresponding to the first and second online public opinion texts, where the first online public opinion text is any one of the at least one online public opinion texts, and the second online public opinion text is any one of the at least one online public opinion texts other than the first online public opinion text; calculating a third similarity based on the second keyword set corresponding to the first and second online public opinion texts; calculating a fourth similarity based on the first tag corresponding to the first and second online public opinion texts; and calculating the first similarity between the first and second online public opinion texts based on the second, third, and fourth similarities.
[0010] Another possible implementation is that generating the clustering result of the above-mentioned at least one online public opinion text includes: classifying the above-mentioned at least one online public opinion text into at least one category; the method further includes: based on the clustering result of the above-mentioned at least one online public opinion text, determining at least one abnormal event, the above-mentioned abnormal event being the event corresponding to the category in the above-mentioned at least one category where the number of online public opinion texts exceeds a first threshold; and based on the above-mentioned at least one abnormal event, determining the processing strategy for the above-mentioned at least one abnormal event.
[0011] Another possible implementation involves calculating the first similarity between the first online public opinion text and the second online public opinion text based on the second, third, and fourth similarities, including: weighting the second similarity based on a first weight to obtain a weighted second similarity; weighting the third similarity based on the second weight to obtain a weighted third similarity; weighting the fourth similarity based on the third weight to obtain a weighted fourth similarity; calculating the arithmetic sum of the weighted second, third, and fourth similarities, and determining the arithmetic sum as the first similarity between the first and second online public opinion texts.
[0012] Secondly, embodiments of this application provide a network public opinion text clustering device, comprising: an acquisition module and a generation module; the acquisition module is configured to acquire a first keyword set based on at least one network public opinion text and a response text, wherein the network public opinion text describes the viewpoint expressed by a user, and the response text is used to respond to the viewpoint expressed by the user, and the first keyword set includes first keywords extracted from the network public opinion text and the response text; the generation module is configured to input the first keyword set into a word vector model to generate a second keyword set, wherein the second keyword set includes synonyms of the first keywords; and, based on the first keyword set, the second keyword set, and a first tag corresponding to the at least one network public opinion text, generate a clustering result for the at least one network public opinion text, wherein the first tag includes at least one of the following: a user sentiment tag and a business keyword tag, wherein the user sentiment tag describes the sentiment type and sentiment intensity corresponding to the network public opinion text, and the business keyword tag describes the content category to which the network public opinion text belongs.
[0013] One possible implementation is that the above-mentioned generation module is specifically used to: calculate the first similarity between every two online public opinion texts in the above-mentioned at least one online public opinion text based on the above-mentioned first keyword set, the above-mentioned second keyword set and the first tag corresponding to the above-mentioned at least one online public opinion text; and generate the clustering result of the above-mentioned at least one online public opinion text based on the first similarity.
[0014] Another possible implementation is that the above-mentioned generation module is specifically used to: calculate a second similarity based on the first set of keywords corresponding to the first and second online public opinion texts, wherein the first online public opinion text is any one of the at least one online public opinion texts, and the second online public opinion text is any one of the at least one online public opinion texts other than the first online public opinion text; calculate a third similarity based on the second set of keywords corresponding to the first and second online public opinion texts; calculate a fourth similarity based on the first tags corresponding to the first and second online public opinion texts; and calculate a first similarity between the first and second online public opinion texts based on the second, third, and fourth similarities.
[0015] Another possible implementation is that the above-mentioned generation module is specifically used to: classify the above-mentioned at least one online public opinion text into at least one category; the above-mentioned device further includes: a determination module; the determination module is used to determine at least one abnormal event based on the clustering result of the above-mentioned at least one online public opinion text, the above-mentioned abnormal event being the event corresponding to the category in the above-mentioned at least one category where the number of online public opinion texts exceeds a first threshold; and to determine the processing strategy for the above-mentioned at least one abnormal event based on the above-mentioned at least one abnormal event.
[0016] Another possible implementation is that the above-mentioned generation module is specifically used to: weight the second similarity based on the first weight to obtain a weighted second similarity; weight the third similarity based on the second weight to obtain a weighted third similarity; weight the fourth similarity based on the third weight to obtain a weighted fourth similarity; calculate the arithmetic sum of the weighted second similarity, the weighted third similarity, and the weighted fourth similarity, and determine the arithmetic sum as the first similarity between the first online public opinion text and the second online public opinion text.
[0017] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory stores a program or instructions executable on the processor, wherein the program or instructions, when executed by the processor, implement the method of the first aspect described above.
[0018] Fourthly, this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a computer, implement the method of the first aspect described above.
[0019] Fifthly, this application provides a computer program product stored in a storage medium, which, when executed by a computer, implements the method described in the first aspect.
[0020] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0021] The beneficial effects of the second to sixth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description
[0022] Figure 1 A schematic diagram of the network architecture for the application of a network public opinion text clustering method provided in this application embodiment;
[0023] Figure 2 A flowchart illustrating a method for clustering online public opinion texts provided in this application embodiment;
[0024] Figure 3 A flowchart illustrating another method for clustering online public opinion texts provided in this application embodiment;
[0025] Figure 4 A flowchart illustrating another method for clustering online public opinion texts provided in this application embodiment;
[0026] Figure 5 A flowchart illustrating another method for clustering online public opinion texts provided in this application embodiment;
[0027] Figure 6 A flowchart illustrating another method for clustering online public opinion texts provided in this application embodiment;
[0028] Figure 7 A schematic diagram of the structure of a network public opinion text clustering device provided in this application embodiment;
[0029] Figure 8 A schematic diagram of another network public opinion text clustering device provided in this application embodiment;
[0030] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] The following section will describe in detail the network public opinion text clustering method, apparatus, equipment, medium, and program products provided in this application, with reference to the accompanying drawings.
[0032] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0033] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0034] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0035] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0036] The embodiments of this application provide a method, apparatus, device, medium, and program product for clustering online public opinion texts, which can be applied to scenarios of clustering online public opinion texts.
[0037] Currently, with the rapid development of internet technology and the exponential growth of internet users, online public opinion has become a focus of attention for all sectors of society. Public opinion analysis systems collect internet public opinion volume through keyword matching via interfaces and files, label public opinion data based on rule models and traditional machine learning, and classify and further analyze public opinion through manual calibration, outputting analysis results to provide early warnings of emergencies and control the development of events. It is an important information monitoring and analysis tool for corporate reputation, playing a crucial role in areas such as corporate brand management and public relations crisis response.
[0038] In related technologies, multiple collected online public opinion texts are first processed by word segmentation to obtain the word segmentation results of each online public opinion text. Then, by calculating the similarity of the word segmentation results of the online public opinion texts, the online public opinion texts are clustered to obtain the clustering results of the above multiple online public opinion texts.
[0039] However, the semantic understanding of the text in the above-mentioned schemes remains at the level of surface-level vocabulary statistics, failing to delve into the contextual logic and the true user intent. This leads to the fragmentation of public opinion information that essentially belongs to the same event but is expressed differently by different users, resulting in low clustering recall and long average event discovery time. Thus, the clustering results of online public opinion texts in these related technologies are not accurate enough.
[0040] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, device, medium, and program product for clustering online public opinion texts. Based on at least one online public opinion text and a response text, a first keyword set is obtained. The online public opinion text describes a user's expressed opinion, and the response text responds to that opinion. The first keyword set includes first keywords extracted from the online public opinion text and the response text. The first keyword set is input into a word vector model to generate a second keyword set, which includes synonyms of the first keywords. Based on the first keyword set, the second keyword set, and a first tag corresponding to the at least one online public opinion text, a clustering result for the at least one online public opinion text is generated. The first tag includes at least one of the following: a user sentiment tag and a business keyword tag. The user sentiment tag describes the sentiment type and intensity corresponding to the online public opinion text, and the business keyword tag describes the content category to which the online public opinion text belongs. In this scheme, the first keyword set of online public opinion text and response text are obtained respectively, and synonyms of the first keyword are generated to obtain the second keyword set. Then, based on the first keyword set, the second keyword set and the first label corresponding to each public opinion text, the clustering result of the public opinion text is determined. This avoids the problem of online public opinion texts with different expressions but actually corresponding to the same type of event being classified into different categories, and improves the accuracy of the clustering result of online public opinion text.
[0041] The following description, in conjunction with the accompanying drawings, details the network public opinion text clustering method, apparatus, device, medium, and program products provided in the embodiments of this application.
[0042] Figure 1 This illustration shows the network architecture of an application of a network public opinion text clustering method provided in an embodiment of this application. For example... Figure 1 As shown, the network architecture includes a network public opinion text clustering device 101 and a terminal device 102. The network public opinion text clustering device 101 and the terminal device 102 are interconnected.
[0043] In some embodiments, the online public opinion text clustering device 101 may be a server, a computer, or a processor or processing unit within a server or computer. The server may be a single server or a server cluster consisting of multiple servers. It should be noted that this application embodiment does not limit the specific device form of the online public opinion text clustering device 101. Figure 1 The example shown is a network public opinion text clustering device 101, which is a single server.
[0044] In some embodiments, the terminal device may be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., and the embodiments of this application do not specifically limit it. Figure 1 The example shown is a mobile phone, with terminal device 102 as an example.
[0045] It should be noted that the network architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As network architectures evolve, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0046] See Figure 2 This is a flowchart illustrating a method for clustering online public opinion texts according to an embodiment of this application. Figure 2 As shown, the online public opinion text clustering method provided in this application embodiment can be implemented by the above-mentioned online public opinion text clustering device, specifically including the following steps 201 to 203.
[0047] Step 201: The online public opinion text clustering device obtains the first keyword set based on at least one online public opinion text and response text.
[0048] In some embodiments, the aforementioned online public opinion text is used to describe the views expressed by users, the aforementioned response text is used to respond to the views expressed by users, and the aforementioned first keyword set includes first keywords extracted from the aforementioned online public opinion text and the aforementioned response text.
[0049] In some embodiments, the online public opinion text clustering device has built-in multiple adaptation interfaces such as Hypertext Transfer Protocol (HTTP), API, and file import, which are compatible with heterogeneous data from multiple online platforms across all channels, with unified interface specifications, and can access new data sources without secondary development.
[0050] In some embodiments, the aforementioned online public opinion text may include at least one of the following: user comments, user updates, user reviews of products, and user complaint tickets. Of course, the aforementioned online public opinion text may also include other types of online public opinion text, which can be determined according to actual needs, and this application does not limit this.
[0051] In some embodiments of this application, the online public opinion text clustering device can perform semantic analysis on online public opinion text and response text to extract the aforementioned first keyword set.
[0052] In some embodiments, the above-mentioned online public opinion text clustering device may adopt a millisecond-level incremental scheduling strategy based on timestamps and public opinion identifiers to collect only newly added public opinion data, rather than repeatedly capturing all data, in order to solve the problem of data collection lag in the prior art.
[0053] Step 202: The online public opinion text clustering device inputs the first keyword set into the word vector model to generate the second keyword set.
[0054] In some embodiments, the second set of keywords includes synonyms of the first keyword.
[0055] In some embodiments of this application, the online public opinion text clustering device can automatically generate synonyms, near-synonyms, and derived expressions of the first keyword based on word vector models such as Word2Vec and semantic expansion algorithms, thereby obtaining the aforementioned second keyword set. For example, the online public opinion text clustering device can generate the near-synonym "cannot access the internet" for "broadband outage".
[0056] In some embodiments, the online public opinion text clustering device can perform data cleaning processing on the first keyword set and the second keyword set to remove duplicate data, garbled characters, advertising spam, and meaningless short text from the first keyword set and the second keyword set.
[0057] Step 203: The online public opinion text clustering device generates the clustering result of the above-mentioned at least one online public opinion text based on the first keyword set, the second keyword set, and the first label corresponding to at least one online public opinion text.
[0058] In some embodiments, the online public opinion text clustering device can classify the above-mentioned at least one online public opinion text into at least one category based on a first set of keywords, a second set of keywords, and a first tag corresponding to at least one online public opinion text.
[0059] It should be noted that the specific implementation process of the online public opinion text clustering device, which classifies the above-mentioned at least one online public opinion text into at least one category based on the first keyword set, the second keyword set, and the first tag corresponding to at least one online public opinion text, can be found in the relevant description in the following embodiments. To avoid repetition, this application will not elaborate on it here.
[0060] In some embodiments, combined with Figure 2 ,like Figure 3 As shown, step 203 above can be implemented through steps 203a and 203b.
[0061] Step 203a: The online public opinion text clustering device calculates the first similarity between every two online public opinion texts based on the first keyword set, the second keyword set, and the first label corresponding to at least one online public opinion text.
[0062] In some embodiments, the first similarity between each two online public opinion texts is used to indicate the probability that each two online public opinion texts belong to the same category.
[0063] In some embodiments, the online public opinion text clustering device can calculate the first similarity between any two online public opinion texts based on the first keyword set, the second keyword set, and the first tag corresponding to at least one online public opinion text.
[0064] It should be noted that the specific implementation process of the network public opinion text clustering device, which calculates the first similarity between any two network public opinion texts based on the first keyword set, the second keyword set, and the first tag corresponding to at least one network public opinion text, can be found in the relevant description in the following embodiments. To avoid repetition, this application will not elaborate further here.
[0065] In some embodiments, combined with Figure 3 ,like Figure 4 As shown, step 203a can be implemented through steps 203a1 to 203a4.
[0066] Step 203a1: The online public opinion text clustering device calculates the second similarity based on the first set of keywords corresponding to the first online public opinion text and the second online public opinion text.
[0067] In some embodiments, the first online public opinion text is any one of the at least one online public opinion texts, and the second online public opinion text is any one of the at least one online public opinion texts other than the first online public opinion text.
[0068] In some embodiments, the second similarity is used to indicate the degree of similarity between the first online public opinion text and the first keyword corresponding to the second online public opinion text.
[0069] Step 203a2: The online public opinion text clustering device calculates the third similarity based on the second keyword set corresponding to the first and second online public opinion texts.
[0070] In some embodiments, the aforementioned third similarity is used to indicate the degree of similarity between the second keywords corresponding to the first online public opinion text and the second online public opinion text.
[0071] Step 203a3: The online public opinion text clustering device calculates the fourth similarity based on the first label corresponding to the first online public opinion text and the second online public opinion text.
[0072] In some embodiments, the fourth similarity is used to indicate the degree of similarity between the first online public opinion text and the first tag corresponding to the second online public opinion text.
[0073] Step 203a4: The online public opinion text clustering device calculates the first similarity between the first online public opinion text and the second online public opinion text based on the second similarity, the third similarity, and the fourth similarity.
[0074] In some embodiments, the online public opinion text clustering device can perform a weighted summation of the second similarity, the third similarity, and the fourth similarity to obtain a first similarity between the first online public opinion text and the second online public opinion text.
[0075] It should be noted that the specific implementation process of the network public opinion text clustering device for weighted summation of the second similarity, third similarity and fourth similarity to obtain the first similarity between the first network public opinion text and the second network public opinion text can be found in the relevant description in the following embodiments. To avoid repetition, this application will not elaborate on it here.
[0076] In some embodiments, combined with Figure 4 ,like Figure 5 As shown, step 203a4 above can be implemented through steps 203a4a to 203a4d.
[0077] Step 203a4a: The online public opinion text clustering device weights the second similarity based on the first weight to obtain the weighted second similarity.
[0078] In some embodiments, the first weight is used to indicate the importance of the second similarity in the clustering of online public opinion texts.
[0079] Step 203a4b: The online public opinion text clustering device weights the third similarity based on the second weight to obtain the weighted third similarity.
[0080] In some embodiments, the second weight is used to indicate the importance of the third similarity in online public opinion text clustering.
[0081] Step 203a4c: The online public opinion text clustering device weights the fourth similarity based on the third weight to obtain the weighted fourth similarity.
[0082] In some embodiments, the aforementioned third weight is used to indicate the importance of the fourth similarity in online public opinion text clustering.
[0083] Step 203a4d: The online public opinion text clustering device calculates the arithmetic sum of the weighted second similarity, the weighted third similarity, and the weighted fourth similarity, and determines the arithmetic sum as the first similarity between the first online public opinion text and the second online public opinion text.
[0084] In some embodiments, the online public opinion text clustering device may use a first weight, a second weight, and a third weight to weight the second similarity, the third similarity, and the fourth similarity, respectively, to obtain the first similarity between the first online public opinion text and the second online public opinion text.
[0085] In this way, the online public opinion text clustering device can calculate a second similarity based on the first set of keywords corresponding to any two online public opinion texts, then calculate a third similarity based on the second set of keywords corresponding to any two online public opinion texts, and finally calculate a fourth similarity based on the first label of any two online public opinion texts. Then, the second, third, and fourth similarities are weighted and summed using the first, second, and third weights respectively to obtain the first similarity between the first and second online public opinion texts. Based on the first similarity, the clustering result of the online public opinion texts is generated, which avoids the problem of online public opinion texts with different expressions but actually corresponding to the same type of event being classified into different categories, thus improving the accuracy of the clustering result of online public opinion texts.
[0086] In this way, the online public opinion text clustering device can calculate the second similarity based on the first set of keywords corresponding to any two online public opinion texts, then calculate the third similarity based on the second set of keywords corresponding to any two online public opinion texts, and calculate the fourth similarity based on the first label of any two online public opinion texts. Then, based on the second, third, and fourth similarities, the first similarity between any two online public opinion texts is calculated, and based on the first similarity, the clustering result of the online public opinion texts is generated. This avoids the problem of online public opinion texts with different expressions but actually corresponding to the same type of event being classified into different categories, thus improving the accuracy of the clustering result of online public opinion texts.
[0087] Step 203b: The online public opinion text clustering device generates the clustering result of at least one of the above-mentioned online public opinion texts based on the first similarity.
[0088] In some embodiments, the online public opinion text clustering device can classify the above-mentioned at least one online public opinion text into at least one category based on a first similarity, so as to obtain the clustering result of the above-mentioned at least one online public opinion text.
[0089] It should be noted that the specific implementation process of the network public opinion text clustering device, which classifies the above-mentioned at least one network public opinion text into at least one category based on the first similarity, in order to obtain the clustering result of the above-mentioned at least one network public opinion text, can be referred to the relevant description in the following embodiments. To avoid repetition, this application will not elaborate on it here.
[0090] In this way, the online public opinion text clustering device can obtain the first set of keywords for online public opinion texts and response texts, and generate synonyms for the first keywords. Based on the first set of keywords, the second set of keywords, and the first label, it can calculate the first similarity between each pair of online public opinion texts. Then, based on the first similarity, it can generate the clustering result of at least one online public opinion text. This avoids the problem of online public opinion texts with different expressions but actually corresponding to the same type of event being classified into different categories, thus improving the accuracy of the clustering results of online public opinion texts.
[0091] In some embodiments, step 203 can be implemented by step 303, and the above method further includes steps 204a and 204b.
[0092] Step 303: The online public opinion text clustering device divides the above-mentioned at least one online public opinion text into at least one category.
[0093] In some embodiments, the above categories may also be referred to as event clusters.
[0094] In some embodiments, for newly arrived online public opinion texts, the system recalls at least one existing event cluster that is most similar to the original one through a vector database within milliseconds. If the highest similarity exceeds a threshold, the text is assigned to that cluster and the cluster center is updated; otherwise, a new event cluster is created.
[0095] Step 204a: Based on the clustering results of at least one online public opinion text, the online public opinion text clustering device determines at least one abnormal event.
[0096] In some embodiments, the aforementioned abnormal event is an event corresponding to a category in which the number of online public opinion texts in at least one of the aforementioned categories exceeds a first threshold.
[0097] In some embodiments, the aforementioned abnormal event may also be the time corresponding to the category where the rate at which new online public opinion text is added exceeds the second threshold.
[0098] In some embodiments, the first threshold can be a fixed value, such as 50. Of course, the first threshold can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0099] In some embodiments, the second threshold can be a fixed value, such as 50 messages per minute. Of course, the second threshold can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0100] Step 204b: The online public opinion text clustering device determines the processing strategy for the above-mentioned at least one abnormal event based on the above-mentioned at least one abnormal event.
[0101] In some embodiments, the above processing strategy includes at least one of the following: reminding the relevant person in charge through the system, reminding the relevant person in charge through SMS, or reminding the relevant person in charge through an IM tool. Of course, the above processing strategy may also include other processing strategies, which can be determined according to actual needs, and this application does not limit them.
[0102] In some embodiments, the online public opinion text clustering device can determine the handling strategy for abnormal events based on the urgency of the abnormal events.
[0103] In this way, the online public opinion text clustering device can generate a more accurate clustering result of online public opinion text based on the first similarity, and then determine the abnormal events and the handling strategy for the abnormal events based on the clustering result, thereby improving the efficiency of handling abnormal events.
[0104] In some embodiments, the first tag mentioned above includes at least one of the following: a user sentiment tag and a business keyword tag. The user sentiment tag is used to describe the sentiment type and sentiment intensity corresponding to the online public opinion text, and the business keyword tag is used to describe the content category to which the online public opinion text belongs.
[0105] This application provides a method for clustering online public opinion texts. It obtains the first keyword set of online public opinion texts and response texts respectively, generates synonyms of the first keywords, and obtains the second keyword set. Then, based on the first keyword set, the second keyword set, and the first label corresponding to each public opinion text, it determines the clustering result of the public opinion texts. This avoids the problem of online public opinion texts with different expressions but actually corresponding to the same type of event being classified into different categories, and improves the accuracy of the clustering results of online public opinion texts.
[0106] The methods of the embodiments of this application will be described below through specific examples.
[0107] like Figure 6 As shown, the implementation process of the method provided in this application embodiment includes the following S1 to S9:
[0108] S1. The online public opinion text clustering device obtains the first keyword set based on at least one online public opinion text and response text.
[0109] S2. The online public opinion text clustering device inputs the first set of keywords into the word vector model to generate the second set of keywords.
[0110] S3. The online public opinion text clustering device calculates the second similarity based on the first set of keywords corresponding to the first online public opinion text and the second online public opinion text.
[0111] S4. The online public opinion text clustering device calculates the third similarity based on the second set of keywords corresponding to the first and second online public opinion texts.
[0112] S5. The online public opinion text clustering device weights the second similarity based on the first weight to obtain the weighted second similarity.
[0113] S6. The network public opinion text clustering device weights the third similarity based on the second weight to obtain the weighted third similarity.
[0114] S7. The online public opinion text clustering device weights the fourth similarity based on the third weight to obtain the weighted fourth similarity.
[0115] S8. The online public opinion text clustering device calculates the arithmetic sum of the weighted second similarity, the weighted third similarity, and the weighted fourth similarity, and determines the arithmetic sum as the first similarity between the first online public opinion text and the second online public opinion text.
[0116] S9. The online public opinion text clustering device generates at least one clustering result for an online public opinion text based on the first similarity.
[0117] It should be noted that the descriptions of each step S1 to S9 in this embodiment can be found in the descriptions in the above embodiments, and will not be repeated here.
[0118] The following section provides a detailed explanation of the online public opinion text clustering method proposed in this application.
[0119] The network public opinion text clustering method proposed in this application involves a public opinion analysis system based on automatic clustering of internet public opinion. It adopts a full-link streaming processing plus a six-layer modular closed-loop architecture. The system consists of six core modules: a multi-source intelligent data acquisition module, a public opinion data preprocessing module, a vertical domain multimodal sentiment intelligent labeling module, a real-time deep semantic automatic clustering module, a dynamic threshold intelligent early warning module, and an automatic report generation and closed-loop handling module. Each module has standardized sub-modules. The modules complete collaborative interaction through real-time data flow. It can completely solve all the technical problems in related technologies, such as blind spots in data collection, low labeling accuracy, clustering lag, and weak closed-loop capability.
[0120] The network public opinion text clustering method proposed in this application involves a loosely coupled, highly cohesive, and fully closed-loop software system, which comprises six core modules.
[0121] The modules are logically linked in the following order: data input, data processing, intelligent labeling analysis and real-time clustering, early warning output, and closed-loop handling. Simultaneously, a feedback loop for labeling and clustering results is established to enable continuous iterative optimization of the model and strategy. The functions and interactions of each module are as follows:
[0122] Multi-source intelligent data acquisition module: The system's only data entry point, responsible for the intelligent capture and standardized access of multi-channel and heterogeneous public opinion data. Relying on the communication industry's dedicated big data system, it achieves real-time high-concurrency operation of massive data through the pioneering real-time intelligent decision engine, solving the problems of blind spots and lag in existing technology collection. The processed data is pushed to the public opinion data preprocessing module in real time.
[0123] The public opinion data preprocessing module is a data cleaning and structuring unit responsible for filtering dirty data, format normalization, and professional word segmentation, providing high-quality data for subsequent intelligent analysis. After processing, the data is pushed to the vertical domain multimodal sentiment intelligent labeling module.
[0124] Vertical domain multimodal sentiment intelligent labeling module: The core intelligent processing unit, based on pre-training of dedicated corpus for the communications industry, completes multi-dimensional labeling of sentiment analysis, content classification, and entity recognition, solving the problems of low labeling accuracy and reliance on manual labor in existing technologies. The labeled data is pushed to the real-time deep semantic automatic clustering module.
[0125] Real-time deep semantic automatic clustering module: The core analysis unit, based on deep semantic vectorization and efficient similarity calculation, realizes real-time clustering and event discovery of massive public opinion in minutes, solves the problems of low clustering recall and delayed discovery in existing technologies, and pushes the clustering results to the dynamic threshold intelligent early warning module;
[0126] Dynamic threshold intelligent early warning module: Risk judgment and output unit, which dynamically generates early warning thresholds based on clustering trends, realizes hierarchical automatic early warning, replaces manual judgment, and pushes early warning information to the automatic report generation and closed-loop processing module;
[0127] Automatic report generation and closed-loop handling module: The system's closed-loop exit point automatically generates structured analysis reports and issues handling work orders. At the same time, it feeds back the handling results to the front-end module, realizing a fully automated closed loop and solving the problems of excessive manual intervention and long response cycles in existing technologies.
[0128] The following is a detailed explanation of the technical solutions for each module:
[0129] Multi-source intelligent data acquisition module:
[0130] This module aims to solve the problems of blind spots and lag in existing technology data collection. It abandons the fixed data collection method of preset keywords + manual rules and has three sub-modules: heterogeneous data source adaptation sub-module, dynamic update sub-module of collection words, and incremental data collection scheduling sub-module.
[0131] Heterogeneous data source adaptation submodule: Built-in multiple adaptation interfaces such as HTTP, API, and file import, compatible with multiple network platforms, 12345 government hotline, communication customer service work orders, social media comments and other heterogeneous data from all channels, with unified interface specifications, allowing access to new data sources without secondary development;
[0132] The dynamic update submodule for collected keywords: Based on word vector models such as Word2Vec and semantic expansion algorithms, it automatically generates synonyms, near-synonyms, and derivative expressions of core keywords (such as "broadband disconnection" expanded to "cannot access the internet, optical modem red light, network disconnection"), replacing manual rules, covering all expression methods, dynamically updating collected keywords, achieving broad coverage of expression methods, and eliminating collection blind spots;
[0133] Incremental data collection and scheduling submodule: It adopts a millisecond-level incremental scheduling strategy based on timestamps and public opinion identifiers, and only collects newly added public opinion data, instead of repeatedly capturing all data. The collection latency is ≤100ms, which solves the problem of data collection lag in existing technologies.
[0134] Data Output: The module outputs standardized formatted raw public opinion data, including 27 fields in four modules: text content, publication time, source channel, and user information, which are pushed to the preprocessing module in real time.
[0135] Public opinion data preprocessing module:
[0136] It has two sub-modules to complete the data standardization process without manual intervention: data cleaning and word segmentation sub-module, and encoding normalization sub-module.
[0137] The data cleaning and word segmentation submodule automatically removes duplicate data, garbled characters, advertising spam, and meaningless short text (e.g., text with fewer than 2 characters) through regular expression matching and a rule engine, achieving a data cleaning accuracy of ≥98%. Simultaneously, it collaborates with the business side to compile and incorporate a dedicated word segmentation dictionary for the telecommunications industry (containing a vast amount of professional terms such as "out-of-line traffic," "optical modem failure," "roaming charges," and "5G base station"), avoiding errors in segmenting professional terms and improving the accuracy of subsequent analysis.
[0138] Encoding Normalization Submodule: Converts all data to UTF-8 encoding, unifies the time format (YYYY-MM-DD HH:MM:SS) and text format, and solves the problem of incompatibility between multiple data source formats;
[0139] Vertical Domain Multimodal Emotional Intelligence Tagging Module
[0140] This module addresses the issues of low accuracy and limited labeling dimensions in existing sentiment analysis technologies. It adopts an adaptive pre-trained model for the communications industry and comprises three sub-modules: an industry-adaptive pre-training sub-module, a multimodal sentiment recognition sub-module, and a multidimensional entity classification sub-module.
[0141] Industry-Adaptive Pre-training Submodule: Based on massive amounts of annotated public opinion data in the communications industry, the ERNIE-3.0-Medium basic model is pre-trained in an industry-adaptive manner. The masked language model task is used to enable the model to learn the contextual semantics of professional terms.
[0142] The multimodal emotion recognition submodule innovatively employs a three-stage optimization framework. In the first stage, adaptive pre-training allows the model to adapt to the domain. In the second stage, adversarial example augmentation is introduced, adding subtle perturbations to the model's embedding layer to train its robustness against input noise and ambiguous expressions. In the third stage, a hard-example focusing loss function is designed, assigning higher weights to samples with ambiguous classification boundaries and low confidence, forcing the model to focus on learning complex emotions such as "implicit negativity." Ultimately, the model can output three levels of emotion (positive / neutral / negative) and six emotion intensities, including anger and disappointment, with an accuracy exceeding 93%.
[0143] Multi-dimensional entity classification submodule: Automatically identifies entities (users, regions, business types, fault types) and content categories (complaints, inquiries, suggestions) in public opinion, with labeling dimensions covering 12 categories, requiring no manual calibration.
[0144] Data output: Output multi-dimensional labeled data with sentiment tags, sentiment intensity, entity tags, and content categories, and push it to the real-time clustering module.
[0145] Real-time deep semantic automatic clustering module:
[0146] The real-time deep semantic automatic clustering module aims to solve the problems of low recall and delayed discovery in existing shallow clustering. It consists of four sub-modules: deep semantic vectorization sub-module, efficient similarity calculation sub-module, incremental real-time clustering sub-module, and event summary generation sub-module.
[0147] Deep semantic vectorization submodule: Using deep semantic models such as BGE-Large, the labeled public opinion text is converted into a 1024-dimensional deep semantic vector to capture the contextual logic and real user intent, rather than surface word statistics;
[0148] The high-efficiency similarity calculation submodule innovatively adopts a ternary heterogeneous vector feature fusion of "user question - agent response - business keyword". It not only compares the user question vector, but also introduces the agent response vector (reflecting the problem solution) and the business keyword vector (reflecting the problem attributes), and dynamically calculates the weights of the three through an attention mechanism to finally obtain the comprehensive similarity, which greatly improves the clustering accuracy and solves the clustering error problem of "different expressions but the same event".
[0149] The incremental real-time clustering submodule employs a streaming processing framework. For newly arriving sentiment vectors, the system retrieves the top-K most similar existing event clusters within milliseconds using a vector database (such as Elasticsearch's HNSW index). If the highest similarity exceeds a threshold (e.g., 0.85), the vector is assigned to that cluster, and the cluster center is updated; otherwise, a new event cluster is created. This mechanism avoids full recalculation each time, achieving real-time clustering within 2.1 minutes with a recall rate exceeding 92%.
[0150] Event summary generation submodule: For clustered events of the same type, a large model is introduced to generate a 30-word ± structured summary and core keywords, without the need for manual extraction. The clustered summary is updated regularly (every 30 minutes) to ensure the accuracy of the summary.
[0151] Dynamic threshold intelligent early warning module:
[0152] To replace the existing manual early warning method, a model is trained to achieve adaptive early warning. It consists of three sub-modules: clustering trend monitoring sub-module, dynamic threshold calculation sub-module, and hierarchical early warning push sub-module.
[0153] Clustering Trend Monitoring Submodule: Real-time statistics on the growth rate of public opinion volume, the proportion of negative sentiment, and the geographical spread of clustered events;
[0154] Dynamic threshold calculation submodule: Based on historical data and real-time trends, it compares historical data with year-on-year, month-on-month, growth rate, and similar event alarm history, and automatically generates warning thresholds (e.g., warnings triggered when public opinion volume increases by ≥50 items within 10 minutes or when the negative proportion is ≥80%), without the need for manual intervention;
[0155] Tiered early warning push module: Based on the urgency and scope of impact of events, they are divided into three levels: "Urgent / Important / General," and automatically pushed to the relevant responsible persons via the system, SMS, and IM tools. The early warning delay is less than or equal to 500ms.
[0156] Automatic report generation and closed-loop processing module:
[0157] This module breaks down the final barrier between "analysis" and "execution." It consists of three sub-modules: a structured report generation sub-module, an automatic work order distribution sub-module, and a feedback sub-module on the handling results.
[0158] The structured report generation submodule: Based on predefined standardized templates (including event overview, sentiment trends, cluster details, propagation paths, etc.), the template engine automatically fills in the analysis results of the clustering and early warning modules, generating a complete public opinion analysis report within 20 minutes.
[0159] Automatic Work Order Distribution Submodule: The main model automatically assigns responsibility by linking information such as knowledge base, requirements from the Ministry of Industry and Information Technology and the group, and historical reports. Based on the responsibility assignment conclusions in the reports, it automatically creates and distributes work orders to the responsible departments by connecting with the management work orders, realizing multi-departmental coordination and collaborative problem solving.
[0160] The action effect feedback submodule continuously tracks the processing status and results of work orders, and uses the effective samples as positive feedback to automatically feed back to the retraining dataset of the sentiment labeling and clustering modules, so as to achieve continuous optimization of the model.
[0161] It should be noted that the various method embodiments described above, or the various possible implementations of the various method embodiments, can be executed individually, or, provided there is no conflict, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any limitations on this. It can be seen that the above mainly introduces the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, this application embodiment provides corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, this application embodiment can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0162] This application embodiment can divide the network public opinion text clustering device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0163] In some embodiments, this application also provides an apparatus for clustering online public opinion texts. This apparatus may include one or more functional modules for implementing the online public opinion text clustering method described in the above embodiments.
[0164] For example, Figure 7 This is a schematic diagram of a network public opinion text clustering device provided in an embodiment of this application. Figure 7 As shown, the online public opinion text clustering device 900 includes: an acquisition module 901 and a generation module 902.
[0165] The acquisition module 901 is configured to acquire a first keyword set based on at least one online public opinion text and a response text, wherein the online public opinion text describes the views expressed by users and the response text is used to respond to the views expressed by users, and the first keyword set includes first keywords extracted from the online public opinion text and the response text; the generation module 902 is configured to input the first keyword set into a word vector model to generate a second keyword set, wherein the second keyword set includes synonyms of the first keywords; and, based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text, generate a clustering result for the at least one online public opinion text, wherein the first tag includes at least one of the following: a user sentiment tag and a business keyword tag, wherein the user sentiment tag describes the sentiment type and sentiment intensity corresponding to the online public opinion text, and the business keyword tag describes the content category to which the online public opinion text belongs.
[0166] One possible implementation is that the generation module 902 is specifically used to: calculate the first similarity between every two online public opinion texts in the at least one online public opinion text based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text; and generate the clustering result of the at least one online public opinion text based on the first similarity.
[0167] Another possible implementation is that the generation module 902 is specifically used to: calculate a second similarity based on the first keyword set corresponding to the first and second online public opinion texts, wherein the first online public opinion text is any one of the at least one online public opinion texts, and the second online public opinion text is any one of the at least one online public opinion texts other than the first online public opinion text; calculate a third similarity based on the second keyword set corresponding to the first and second online public opinion texts; calculate a fourth similarity based on the first tags corresponding to the first and second online public opinion texts; and calculate a first similarity between the first and second online public opinion texts based on the second, third, and fourth similarities.
[0168] Another possible implementation is that the aforementioned generation module 902 is specifically used to: classify the aforementioned at least one piece of online public opinion text into at least one category; exemplarily, combined with Figure 7 ,like Figure 8As shown, the above-mentioned device further includes: a determination module 903; the determination module 903 is used to determine at least one abnormal event based on the clustering result of the at least one online public opinion text, wherein the abnormal event is an event corresponding to a category in which the number of online public opinion texts in the at least one category exceeds a first threshold; and to determine a processing strategy for the at least one abnormal event based on the at least one abnormal event.
[0169] Another possible implementation is that the generation module 902 is specifically used to: weight the second similarity based on the first weight to obtain a weighted second similarity; weight the third similarity based on the second weight to obtain a weighted third similarity; weight the fourth similarity based on the third weight to obtain a weighted fourth similarity; calculate the arithmetic sum of the weighted second similarity, the weighted third similarity, and the weighted fourth similarity, and determine the arithmetic sum as the first similarity between the first online public opinion text and the second online public opinion text.
[0170] The online public opinion text clustering device provided in this application obtains the first keyword set of online public opinion text and response text respectively, generates synonyms of the first keyword, and obtains the second keyword set. Then, based on the first keyword set, the second keyword set and the first label corresponding to each public opinion text, the clustering result of the public opinion text is determined. This avoids the problem that online public opinion texts with different expressions but actually corresponding to the same type of event are classified into different categories, and improves the accuracy of the clustering result of online public opinion text.
[0171] It should be noted that the online public opinion text clustering device can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0172] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 9 As shown, the electronic device 90 includes: a processor 92, a communication interface 93, and a bus 94. Optionally, the electronic device 90 may also include a memory 91.
[0173] Processor 92 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0174] Communication interface 93 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0175] The memory 91 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0176] As one possible implementation, the memory 91 can exist independently of the processor 92. The memory 91 can be connected to the processor 92 via a bus 94 and is used to store instructions or program code. When the processor 92 calls and executes the instructions or program code stored in the memory 91, it can implement the online public opinion text clustering method provided in this application embodiment.
[0177] In another possible implementation, memory 91 can also be integrated with processor 92.
[0178] Bus 94 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 94 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0179] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0180] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described network public opinion text clustering method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0181] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0182] This application also provides a readable storage medium storing a program or instructions. When executed by a computer, the program or instructions implement the network public opinion text clustering method provided in the above embodiments. It is understood that all or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The readable storage medium can be any of the foregoing embodiments or memory. The readable storage medium can also be an external storage device of the service invocation device, such as a plug-in hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, flash card, etc., equipped on the service invocation device. Further, the readable storage medium can include both internal storage units of the service invocation device and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the service invocation device. The readable storage medium can also be used to temporarily store data that has been output or will be output.
[0183] This application also provides a computer program product, which is stored in a storage medium and, when executed by a computer, implements the network public opinion text clustering method provided in the above embodiments.
[0184] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0185] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0186] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for clustering online public opinion texts, characterized in that, include: Based on at least one online public opinion text and one response text, a first keyword set is obtained, wherein the online public opinion text is used to describe the viewpoint expressed by the user, and the response text is used to respond to the viewpoint expressed by the user. The first keyword set includes first keywords extracted from the online public opinion text and the response text. The first keyword set is input into the word vector model to generate a second keyword set, which includes synonyms of the first keyword; Based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text, a clustering result of the at least one online public opinion text is generated. The first tag includes at least one of the following: user sentiment tag and business keyword tag. The user sentiment tag is used to describe the sentiment type and sentiment intensity corresponding to the online public opinion text, and the business keyword tag is used to describe the content category to which the online public opinion text belongs.
2. The online public opinion text clustering method according to claim 1, characterized in that, The step of generating clustering results for the at least one online public opinion text based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text includes: Based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text, calculate the first similarity between every two online public opinion texts in the at least one online public opinion text; Based on the first similarity, a clustering result is generated for the at least one online public opinion text.
3. The online public opinion text clustering method according to claim 2, characterized in that, The step of calculating the first similarity between every two online public opinion texts based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text includes: Based on the first set of keywords corresponding to the first online public opinion text and the second online public opinion text, a second similarity is calculated, wherein the first online public opinion text is any one of the at least one online public opinion texts, and the second online public opinion text is any one of the at least one online public opinion texts other than the first online public opinion text. A third similarity is calculated based on the second set of keywords corresponding to the first and second online public opinion texts; Based on the first tags corresponding to the first and second online public opinion texts, a fourth similarity is calculated; Based on the second similarity, the third similarity, and the fourth similarity, a first similarity is calculated between the first online public opinion text and the second online public opinion text.
4. The online public opinion text clustering method according to claim 1, characterized in that, The generation of the clustering results for the at least one online public opinion text includes: The at least one piece of online public opinion text shall be classified into at least one category; The method further includes: Based on the clustering results of the at least one online public opinion text, at least one abnormal event is identified. The abnormal event is the event corresponding to the category in which the number of online public opinion texts in the at least one category exceeds a first threshold. Based on the at least one abnormal event, determine the handling strategy for the at least one abnormal event.
5. The online public opinion text clustering method according to claim 3, characterized in that, The step of calculating the first similarity between the first online public opinion text and the second online public opinion text based on the second similarity, the third similarity, and the fourth similarity includes: The second similarity is weighted based on the first weight to obtain the weighted second similarity; The third similarity is weighted based on the second weight to obtain the weighted third similarity; The fourth similarity is weighted based on the third weight to obtain the weighted fourth similarity; Calculate the arithmetic sum of the weighted second similarity, the weighted third similarity, and the weighted fourth similarity, and determine the arithmetic sum as the first similarity between the first online public opinion text and the second online public opinion text.
6. A network public opinion text clustering device, characterized in that, include: Get modules and generate modules; The acquisition module is used to acquire a first keyword set based on at least one online public opinion text and response text, wherein the online public opinion text is used to describe the views expressed by the user, the response text is used to respond to the views expressed by the user, and the first keyword set includes first keywords extracted from the online public opinion text and the response text; The generation module is used to input the first keyword set obtained by the acquisition module into the word vector model to generate a second keyword set, wherein the second keyword set includes synonyms of the first keyword; Furthermore, based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text, a clustering result for the at least one online public opinion text is generated. The first tag includes at least one of the following: user sentiment tag and business keyword tag. The user sentiment tag is used to describe the sentiment type and sentiment intensity corresponding to the online public opinion text, and the business keyword tag is used to describe the content category to which the online public opinion text belongs.
7. The network public opinion text clustering device according to claim 6, characterized in that, The generation module is specifically used for: Based on the first keyword set, the second keyword set, and the first tag corresponding to the at least one online public opinion text, calculate the first similarity between every two online public opinion texts in the at least one online public opinion text; Based on the first similarity, a clustering result is generated for the at least one online public opinion text.
8. The network public opinion text clustering device according to claim 7, characterized in that, The generation module is specifically used for: Based on the first set of keywords corresponding to the first online public opinion text and the second online public opinion text, a second similarity is calculated, wherein the first online public opinion text is any one of the at least one online public opinion texts, and the second online public opinion text is any one of the at least one online public opinion texts other than the first online public opinion text. A third similarity is calculated based on the second set of keywords corresponding to the first and second online public opinion texts; Based on the first tags corresponding to the first and second online public opinion texts, a fourth similarity is calculated; Based on the second similarity, the third similarity, and the fourth similarity, a first similarity is calculated between the first online public opinion text and the second online public opinion text.
9. The network public opinion text clustering device according to claim 6, characterized in that, The generation module is specifically used for: The at least one piece of online public opinion text shall be classified into at least one category; The device further includes: a determining module; The determining module is used to determine at least one abnormal event based on the clustering result of the at least one online public opinion text. The abnormal event is the event corresponding to the category in which the number of online public opinion texts in the at least one category exceeds a first threshold. Based on the at least one abnormal event, determine the handling strategy for the at least one abnormal event.
10. The network public opinion text clustering device according to claim 8, characterized in that, The generation module is specifically used for: The second similarity is weighted based on the first weight to obtain the weighted second similarity; The third similarity is weighted based on the second weight to obtain the weighted third similarity; The fourth similarity is weighted based on the third weight to obtain the weighted fourth similarity; Calculate the arithmetic sum of the weighted second similarity, the weighted third similarity, and the weighted fourth similarity, and determine the arithmetic sum as the first similarity between the first online public opinion text and the second online public opinion text.
11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the online public opinion text clustering method as described in any one of claims 1 to 5.
12. A readable storage medium, characterized in that, The program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a computer, they implement the online public opinion text clustering method as described in any one of claims 1 to 5.
13. A computer program product, characterized in that, The computer program product is stored in a storage medium, and when the computer program product is executed by a computer, it implements the online public opinion text clustering method as described in any one of claims 1 to 5.
