Hotspot public opinion information detection method and system and electronic equipment

The public opinion text information is encoded and feature fused through the Bert pre-training network, which solves the problem of low accuracy in judging the similarity of public opinion text information and low accuracy of hotspot information, and achieves high-precision detection of hotspot public opinion information.

CN118733862AInactive Publication Date: 2024-10-01CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410795867.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-10-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, the similarity discrimination accuracy of public opinion text information is low, and the acquisition accuracy of hot public opinion information is not high, mainly due to insufficient semantic information of word vectors and loss of context information.

Method used

Bert pre-training network is used to encode public opinion text information to obtain word embedding vectors. Through information encoding, pooling processing and feature fusion, the accuracy of similarity discrimination is improved and hot public opinion information is obtained.

Benefits of technology

By deeply understanding the context of public opinion text information and enriching feature representation, it significantly improves the accuracy of similarity discrimination and the accuracy of hot public opinion information, with low cost and wide application range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733862A_ABST
    Figure CN118733862A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet, in particular to a hotspot public opinion information detection method and system and electronic equipment, and the method comprises the steps: obtaining target public opinion text information; according to the method, hot public opinion information is obtained by obtaining the similarity between target public opinion text information, and the step of obtaining the similarity between the target public opinion text information comprises the substeps that any two pieces of target public opinion text information are input into a preset similarity judgment model, information coding, pooling processing, feature fusion and similarity judgment are carried out, and the similarity between the target public opinion text information is obtained. Traversing all the target public opinion text information to obtain the similarity between the two current target public opinion text information, and traversing all the target public opinion text information to obtain the similarity between all the target public opinion text information; the information coding is carried out by utilizing a Bert pre-training network of a similarity discrimination model; according to the method, the accuracy of similarity detection can be improved, and the precision of hot public opinion information is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method, system and electronic device for detecting hot public opinion information. Background Art

[0002] With the popularization of the Internet and social media, the speed and scope of information dissemination have been greatly improved, and the detection of hot public opinion information has become increasingly important in the fields of news dissemination, marketing, and corporate decision-making. At present, clustering is usually used to determine the similarity of public opinion text information, and then word frequency statistics are used to obtain hot public opinion information.

[0003] However, the above-mentioned similarity determination method is heavily dependent on the quality of the word vector of the public opinion text information. If the word vector used contains less semantic information, the accuracy of the similarity determination result may be low. In addition, if only the word frequency statistics method is used to obtain hot public opinion information, the context information in the public opinion text information is easily lost, resulting in low accuracy of the obtained hot public opinion information. Summary of the invention

[0004] The present application provides a hot public opinion information detection method, system and electronic device to solve the problem of low accuracy in similarity judgment of public opinion text information in the prior art and low accuracy of hot public opinion information obtained in the prior art.

[0005] This application provides a method for detecting hot public opinion information, the method comprising:

[0006] Obtaining target public opinion text information, wherein the target public opinion text information includes a plurality of segmented words;

[0007] Using the Bert pre-trained network in the preset similarity discrimination model, the target public opinion text information is encoded to obtain a word embedding vector, and the word embedding vector corresponds one-to-one to the word segmentation;

[0008] By obtaining the similarity between the target public opinion text information, hot public opinion information is obtained, wherein obtaining the similarity between the target public opinion text information includes: inputting any two of the target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all the target public opinion text information to obtain the similarity between all the target public opinion text information; the information encoding is performed using the Bert pre-trained network of the similarity discrimination model.

[0009] In one embodiment of the present application, any two of the target public opinion text information are input into a preset similarity discrimination model, and information encoding, pooling processing, feature fusion and similarity discrimination are performed to obtain the similarity between the two target public opinion text information, including the following steps:

[0010] Inputting the first target public opinion text information and the second target public opinion text information into the Bert pre-trained network, performing information encoding, and obtaining a plurality of first word embedding vectors and second word embedding vectors, wherein the first word embedding vectors correspond one-to-one to the word segments of the first target public opinion text information, and the second word embedding vectors correspond one-to-one to the word segments of the second target public opinion text information;

[0011] Performing average pooling on all of the first word embedding vectors to obtain a first pooled vector, and performing average pooling on all of the second word embedding vectors to obtain a second pooled vector;

[0012] Performing feature fusion on the first pooled vector and the second pooled vector to obtain a fused vector;

[0013] Based on the fusion vector, similarity determination is performed to obtain the similarity between the first target public opinion text information and the second target public opinion text information.

[0014] In one embodiment of the present application, the step of performing feature fusion on the first pooling vector and the second pooling vector to obtain a fused vector includes:

[0015] Obtaining a difference between the first pooled vector and the second pooled vector;

[0016] determining the absolute value of the difference as a target value;

[0017] Based on the first pooling vector, the second pooling vector and the target value, feature fusion is performed to obtain the fusion vector.

[0018] In one embodiment of the present application, the target public opinion text information refers to the public opinion text information in a topic cluster, and the topic cluster includes: a topic category and public opinion text information under the current topic category;

[0019] The step of obtaining the subject cluster comprises:

[0020] Acquire initial public opinion information, where the initial public opinion information is obtained from a target website by using crawler technology;

[0021] Performing word segmentation processing on the initial public opinion information to obtain multiple word segments;

[0022] Based on the segmentation, a target matrix corresponding to the initial public opinion information is constructed, wherein the row number of the target matrix represents the serial number of the initial public opinion information, the column number of the target matrix represents the serial number of the segmentation in the initial public opinion information, and the element in the target matrix represents the frequency of occurrence of the current segmentation in the initial public opinion information;

[0023] Inputting the target matrix into the trained LDA model to obtain the topic of the initial public opinion information;

[0024] When the topics of all the initial public opinion information are determined, at least one topic cluster is obtained.

[0025] In one embodiment of the present application, the steps of performing word segmentation processing on the initial public opinion information to obtain a plurality of word segments include:

[0026] Based on a preset keyword table, the initial public opinion information is filtered to obtain first public opinion information, where the first public opinion information includes keywords in the keyword table;

[0027] Performing data cleaning on the first public opinion information to obtain second public opinion information;

[0028] The second public opinion information is segmented using a preset segmentation tool to obtain a plurality of segmented words.

[0029] In one embodiment of the present application, the step of inputting the target matrix into the trained LDA model to obtain the topic of the initial public opinion information includes:

[0030] Input the target matrix into the trained LDA model to obtain a topic distribution list, wherein the topic distribution list includes multiple topic elements, and the topic elements include: a topic ID and a probability that the initial public opinion information belongs to the current topic;

[0031] Traversing the topic distribution list to determine the topic ID with the highest probability as the target topic ID;

[0032] The topic corresponding to the target topic ID is determined as the topic of the current initial public opinion information.

[0033] In one embodiment of the present application, the step of obtaining hot public opinion information by obtaining the similarity between the target public opinion text information includes:

[0034] Based on the similarity between the target public opinion text information, a binary adjacency matrix is ​​generated, wherein the binary adjacency matrix is ​​a w×w dimensional matrix, and the elements in the binary adjacency matrix represent the similarity between the i-th target public opinion text information and the j-th target public opinion text information, wherein w represents the number of target public opinion text information, i represents the row number of the binary adjacency matrix, and j represents the column number of the binary adjacency matrix;

[0035] Converting the binary adjacency matrix into an undirected graph, wherein the nodes in the undirected graph are the target public opinion text information, and the edges of the undirected graph represent the similarity between two target public opinion text information;

[0036] Based on the undirected graph, the hot public opinion information is obtained.

[0037] In one embodiment of the present application, based on the undirected graph, the step of obtaining the hot public opinion information includes:

[0038] Using a depth-first search strategy, traverse the nodes in the undirected graph to obtain a plurality of connected subgraphs, wherein the connected subgraphs include a plurality of nodes of the same viewpoint, wherein the nodes of the same viewpoint refer to nodes whose similarity with each other is greater than or equal to a preset similarity threshold;

[0039] Obtain the number of nodes in each of the connected subgraphs;

[0040] Determine one or more of the connected subgraphs having a larger number of nodes as target subgraphs;

[0041] At least one of the target public opinion text information corresponding to the target subgraph is determined as the hot public opinion information.

[0042] This application also provides a hot public opinion information detection system, including:

[0043] An information acquisition module is used to acquire target public opinion text information, wherein the target public opinion text information includes a plurality of segmented words;

[0044] A processing module is used to obtain hot public opinion information by obtaining the similarity between the target public opinion text information, wherein obtaining the similarity between the target public opinion text information includes: inputting any two of the target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all the target public opinion text information to obtain the similarity between all the target public opinion text information; the information encoding is performed using the Bert pre-trained network of the similarity discrimination model.

[0045] The present application also provides an electronic device, including a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement a hot public opinion information detection method as provided in any of the above embodiments.

[0046] Beneficial effects of the present application: The present application proposes a method, system and electronic device for detecting hot public opinion information. The method obtains target public opinion text information, which includes multiple word segments; obtains the similarity between target public opinion text information to obtain hot public opinion information, wherein obtaining the similarity between target public opinion text information includes: inputting any two target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all target public opinion text information to obtain the similarity between all target public opinion text information; information encoding is performed using a Bert pre-trained network of a similarity discrimination model. The method can obtain a word embedding vector by using a Bert pre-trained network to encode the target public opinion text information, thereby enabling an in-depth understanding of the context of the target public opinion text information. Moreover, by performing pooling processing, feature representation can be enriched. Furthermore, by performing operations such as feature fusion, the accuracy of the obtained similarity can be effectively improved, thereby improving the accuracy of the obtained hot public opinion information, with low cost and wide application range. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A flowchart of a method for detecting hot public opinion information provided in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of the structure of a similarity discrimination model in a hot public opinion information detection method provided in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of the structure of a hot public opinion information detection system provided in one embodiment of the present application;

[0050] Figure 4 It is a structural schematic diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0051] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0052] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0053] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.

[0054] Combine the following Figures 1 to 4 , the hot public opinion information detection method, system and electronic equipment provided in this application are explained.

[0055] See also Figure 1 , Figure 1 A flowchart of a method for detecting hot public opinion information provided by an embodiment of the present application is shown in FIG. Figure 1 As shown, the hot public opinion information detection method includes:

[0056] S110: Obtain target public opinion text information, where the target public opinion text information includes a plurality of tokens.

[0057] S120: Obtain hot public opinion information by obtaining the similarity between the target public opinion text information, wherein obtaining the similarity between the target public opinion text information includes: inputting any two of the target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all the target public opinion text information to obtain the similarity between all the target public opinion text information; the information encoding is performed using the Bert (Bidirectional Encoder Representations from Transformers) pre-trained network of the similarity discrimination model.

[0058] It should be noted that the Bert pre-trained network refers to the bert-base-chinese network, that is, the Bert Chinese pre-trained network. By using the Bert pre-trained network, the word segments in the target public opinion text information are encoded separately, and a word embedding vector with richer semantics can be obtained. These word embedding vectors contain rich contextual information and semantic features, which help to improve the accuracy of the subsequent similarity between the target public opinion text information. In addition, by performing pooling processing, the feature representation can be enriched. Furthermore, by performing operations such as feature fusion, the accuracy of the obtained similarity can be effectively improved, thereby improving the accuracy of the obtained hot public opinion information.

[0059] It should also be noted that by adopting the above method to obtain hot public opinion information, the accuracy is higher and the cost is lower.

[0060] In some embodiments, the steps of inputting any two of the target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the two current target public opinion text information include:

[0061] 1. Input the first target public opinion text information and the second target public opinion text information into the Bert pre-trained network, perform information encoding, and obtain multiple first word embedding vectors and second word embedding vectors, wherein the first word embedding vector corresponds one-to-one to the word segmentation of the first target public opinion text information, and the second word embedding vector corresponds one-to-one to the word segmentation of the second target public opinion text information.

[0062] 2. Perform average pooling on all the first word embedding vectors to obtain a first pooled vector, and perform average pooling on all the second word embedding vectors to obtain a second pooled vector.

[0063] Specifically, all first word embedding vectors are averaged in the corresponding dimension to obtain the first pooled vector. Similarly, all second word embedding vectors are averaged in the corresponding dimension to obtain the second pooled vector. It should be mentioned that the sizes of different pooled vectors are the same, that is, the sizes of the first pooled vector and the second pooled vector are the same, which is convenient for subsequent recognition discrimination.

[0064] It should be noted that, by performing the above-mentioned average pooling operation, the sentence feature representation of the target public opinion text information can be enriched, and a pooling vector with richer semantic features can be obtained, namely the above-mentioned first pooling vector and the second pooling vector.

[0065] 3. Perform feature fusion on the first pooled vector and the second pooled vector to obtain a fused vector.

[0066] It should be noted that, by performing feature fusion on the first pooling vector and the second pooling vector, it can help to improve the accuracy of the obtained similarity.

[0067] 4. Based on the fusion vector, perform similarity judgment to obtain the similarity between the first target public opinion text information and the second target public opinion text information.

[0068] In some embodiments, the step of performing feature fusion on the first pooling vector and the second pooling vector to obtain a fused vector includes:

[0069] 1. Obtain a difference between the first pooled vector and the second pooled vector.

[0070] 2. Determine the absolute value of the difference as the target value.

[0071] 3. Perform feature fusion based on the first pooling vector, the second pooling vector and the target value to obtain the fused vector.

[0072] Specifically, the first pooled vector, the second pooled vector and the target value are concatenated to obtain the fused vector. By performing the above feature fusion step, it is better ensured that the fused vector contains both the semantic information of the two target public opinion text information and the semantic difference information between the two target public opinion text information, which helps to improve the accuracy of subsequent similarity detection.

[0073] Figure 2 This is a structural diagram of the similarity discrimination model in the hot public opinion information detection method provided in an embodiment of the present application. Please refer to Figure 2 , take sentence A and sentence B as an example, assuming that sentence A and sentence B belong to the same topic, sentence A includes n participles (such as Figure 2Tok1...Tokn), sentence B includes m participles (such as Figure 2 Tok1...Tokm in ( ). Among them, the n segmented words of sentence A constitute the target public opinion text information A, and the m segmented words of sentence B constitute the target public opinion text information B. Figure 2 The CLS in the code is the abbreviation of Classification, which means classification tag. In the Bert field, the output vector of the CLS tag is the representation of the entire input sentence. SEP is the abbreviation of Separator, which means separator. The target public opinion text information A and the target public opinion text information B are respectively input into the Bert pre-trained network (bert-base-chinese) for encoding to obtain the word embedding vector corresponding to the word segmentation, as shown in Figure 2 T1...Tn, and T1'...Tm' shown. It should be mentioned that in order to distinguish the different stages of similarity detection, Figure 2 The C in it is CLS, and T[SEP] is SEP. Next, the word embedding vector is input into the pooling layer in the similarity discrimination model, and average pooling is performed to obtain the first pooling vector Vector U and the second pooling vector Vector V. Then, the first pooling vector Vector U and the second pooling vector Vector V are subjected to feature fusion, i.e., vector concatenation, in the vector fusion layer in the similarity discrimination model to obtain a fused vector. The fused vector is formed by concatenating the absolute value of the difference between the first pooling vector, the first pooling vector, and the first pooling vector and the second pooling vector. In order to distinguish different stages, Figure 2 U in is the abbreviation of Vector U, and V is the abbreviation of Vector V. Then, the fused vector is input into the fully connected layer in the similarity discrimination model to perform similarity calculation and obtain the output result. Finally, the activation function is used, such as Figure 2 The Sigmoid function in activates and maps the output result to obtain a probability value, which represents the similarity between the target public opinion text information A and the target public opinion text information B.

[0074] During the specific implementation process, a threshold value, such as 0.5, can be set. If the similarity between the target public opinion text information A and the target public opinion text information B is greater than or equal to 0.5, it is considered that the target public opinion text information A and the target public opinion text information B are similar. If the similarity between the target public opinion text information A and the target public opinion text information B is less than 0.5, it is considered that the target public opinion text information A and the target public opinion text information B are not similar.

[0075] In some embodiments, the target public opinion text information refers to the public opinion text information in a topic cluster, and the topic cluster includes: a topic category and the public opinion text information under the current topic category.

[0076] It should be noted that, since different public opinion information involves different topics, such as public opinion information on vehicles may involve topics such as quality, speed, safety, and comfort, the above embodiment performs topic division to obtain the topic clusters as described above, and performs hot public opinion information detection for the public opinion text information in each topic cluster, that is, the target public opinion text information. Through the above method, that is, performing hot public opinion information detection for different topics, it is possible to improve the detection efficiency and accuracy of hot public opinion information while simplifying the difficulty of extracting and detecting hot public opinion information.

[0077] Furthermore, the step of acquiring the topic cluster includes:

[0078] First, initial public opinion information is obtained, and the initial public opinion information is obtained from the target website through crawler technology.

[0079] Specifically, the target website may be a website that allows data crawling, such as a social media website. By using crawler technology to obtain initial public opinion information from the target website, the comprehensiveness of the information obtained can be ensured, and the implementation is relatively convenient.

[0080] Secondly, the initial public opinion information is segmented to obtain a plurality of segmented words.

[0081] It should be mentioned that while performing the word segmentation process, it also includes: counting the frequency of occurrence of each word in the corresponding initial public opinion information, so as to facilitate the subsequent construction of the target matrix.

[0082] Then, based on the word segmentation, a target matrix corresponding to the initial public opinion information is constructed, wherein the row numbers of the target matrix represent the serial numbers of the initial public opinion information, the column numbers of the target matrix represent the serial numbers of the word segmentation in the initial public opinion information, and the elements in the target matrix represent the frequency of occurrence of the current word segmentation in the initial public opinion information.

[0083] It should be noted that the element in the ath row and bth column of the target matrix represents the frequency of the bth word segment in the ath initial public opinion information. By constructing the target matrix, it is convenient for the subsequent LDA (Latent Dirichlet Allocation) model to perform topic distribution identification.

[0084] The target matrix is ​​then input into the trained LDA model to obtain the theme of the initial public opinion information.

[0085] Finally, after determining the topics of all the initial public opinion information, at least one topic cluster is obtained.

[0086] Specifically, at least one topic cluster is obtained by clustering the word segments of the initial public opinion information of the same topic.

[0087] It should be noted that the training steps of the LDA model include:

[0088] 1. Obtain a training set, which includes: multiple sample matrices, the row numbers of the sample matrices represent the numbers of the public opinion information samples, the column numbers of the sample matrix represent the numbers of the segmented words in the public opinion information samples, and the elements in the sample matrix represent the frequency of occurrence of the current segmented word in the public opinion information samples.

[0089] 2. Initialize the LDA model, wherein the initialization step includes: setting model parameters of the LDA model, wherein the model parameters include: the number of topics and the number of iterations, etc. The number of topics can be set according to actual needs, and the number of iterations can be determined according to the convergence of the model.

[0090] 3. Input the training set into the initialized LDA model to train the LDA model. During the training process, the LDA model will learn the topic distribution in the target matrix and the term distribution under each topic, thereby completing the model training.

[0091] It should be mentioned that the trained LDA model in the above embodiment can be deployed on multiple computing nodes through a distributed computing framework (such as Spark, Hadoop, etc.) to process massive amounts of data in parallel, thereby speeding up the speed of topic division.

[0092] It is also worth mentioning that the above-mentioned LDA model can discover potential topics in the initial public opinion information in an unsupervised manner and ultimately determine the topic of the initial public opinion information. It has high flexibility and scalability and can adapt to public opinion text data sets of different scales and complexities.

[0093] In some embodiments, the step of performing word segmentation processing on the initial public opinion information to obtain a plurality of word segments includes:

[0094] 1. Based on a preset keyword table, the initial public opinion information is filtered to obtain first public opinion information, where the first public opinion information includes keywords in the keyword table.

[0095] It should be noted that the keyword table includes multiple keywords, and the keyword table can be set according to actual needs.

[0096] 2. Perform data cleaning on the first public opinion information to obtain second public opinion information.

[0097] It should be noted that data cleaning includes: removing irrelevant information, advertisements, duplicate comments and URL (Uniform Resource Locator), etc. By performing the above filtering and data cleaning steps, it is convenient to perform word segmentation processing, thereby helping to improve the accuracy of subsequent topic detection and similarity detection.

[0098] 3. Use a preset word segmentation tool to perform word segmentation processing on the second public opinion information to obtain a plurality of said word segments.

[0099] In some embodiments, the step of inputting the target matrix into a trained LDA model to obtain the topic of the initial public opinion information includes:

[0100] 1. Input the target matrix into the trained LDA model to obtain a topic distribution list, which includes multiple topic elements, including: topic ID and the probability that the initial public opinion information belongs to the current topic.

[0101] 2. Traverse the topic distribution list to determine the topic ID with the highest probability as the target topic ID.

[0102] 3. Determine the topic corresponding to the target topic ID as the topic of the current initial public opinion information.

[0103] It should be noted that by using the trained LDA model to determine the topic of the initial public opinion information, the accuracy is relatively high.

[0104] In order to further improve the accuracy and efficiency of hot public opinion information detection, in some embodiments, the step of obtaining hot public opinion information by obtaining the similarity between the target public opinion text information includes:

[0105] 1. Based on the similarity between the target public opinion text information, a binary adjacency matrix is ​​generated, where the binary adjacency matrix is ​​a w×w dimensional matrix. The elements in the binary adjacency matrix represent the similarity between the i-th target public opinion text information and the j-th target public opinion text information, wherein w represents the number of target public opinion text information, i represents the row number of the binary adjacency matrix, and j represents the column number of the binary adjacency matrix.

[0106] It should be mentioned that in order to simplify the calculation difficulty, in this embodiment, except for the diagonal elements, if the similarity between two target public opinion text information is greater than or equal to the preset similarity threshold, the corresponding elements in the binary adjacency matrix can be set to 1, and the rest can be set to 0.

[0107] It is also necessary to mention that the diagonal elements of the binary adjacency matrix can be set to 0. It can be understood that the diagonal elements of the binary adjacency matrix represent the similarity between itself, so in order to reduce the impact on other elements, the diagonal elements can be set to 0.

[0108] 2. Convert the binary adjacency matrix into an undirected graph, where the nodes in the undirected graph are the target public opinion text information, and the edges of the undirected graph represent the similarity between two target public opinion text information.

[0109] It should be noted that by converting the binary adjacency matrix into an undirected graph, it is convenient to perform subsequent hot public opinion information detection. It can be understood that the edges of an undirected graph have no direction and are used to represent a bidirectional relationship.

[0110] 3. Based on the undirected graph, obtain the hot public opinion information.

[0111] It should be noted that by performing hot public opinion information detection based on the undirected graph to obtain hot public opinion information with a high degree of visualization, different nodes, that is, the relationship between target public opinion text information can be clearly identified, which helps to improve the accuracy of hot public opinion information detection.

[0112] In some embodiments, based on the undirected graph, the step of obtaining the hot public opinion information includes:

[0113] First, a depth-first search (DFS) strategy is used to traverse the nodes in the undirected graph to obtain multiple connected subgraphs, wherein the connected subgraphs include multiple nodes of the same viewpoint, and the nodes of the same viewpoint refer to nodes whose similarity with each other is greater than or equal to a preset similarity threshold.

[0114] Specifically, DFS is used to traverse all nodes in an undirected graph. If the similarity between two nodes is greater than or equal to a preset similarity threshold, the two nodes are marked as the same connected subgraph until all nodes are visited and marked. The similarity threshold can be set according to actual needs, such as 0.5. By obtaining the connected subgraph, the relationship and structure between the target public opinion text information can be intuitively displayed.

[0115] Secondly, the number of nodes in each of the connected subgraphs is obtained.

[0116] Then, one or more of the connected subgraphs having a larger number of nodes are determined as target subgraphs.

[0117] Finally, at least one target public opinion text information corresponding to the target subgraph is determined as the hot public opinion information.

[0118] Specifically, one or more target public opinion text information in the target subgraph can be determined as representative information of the target subgraph, and the representative information can be determined as hot public opinion information. By adopting the above method to obtain hot public opinion information, the accuracy is high and the detection efficiency is high.

[0119] The hot public opinion information detection system provided by the present application is described below. The hot public opinion information detection system described below and the hot public opinion information detection method described above can be referenced to each other.

[0120] Please refer to Figure 3 The hot public opinion information detection system provided in this embodiment includes:

[0121] The information acquisition module 310 is used to acquire target public opinion text information, wherein the target public opinion text information includes a plurality of segmented words;

[0122] The processing module 320 is used to obtain the hot public opinion information by obtaining the similarity between the target public opinion text information, wherein obtaining the similarity between the target public opinion text information includes: inputting any two of the target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all the target public opinion text information to obtain the similarity between all the target public opinion text information; the information encoding is performed using the Bert pre-trained network of the similarity discrimination model. The information acquisition module 310 is connected to the processing module 320. The hot public opinion information detection system in this embodiment can achieve an in-depth understanding of the context of the target public opinion text information, can enrich the feature representation, effectively improve the accuracy of the obtained similarity, and improve the accuracy of the obtained hot public opinion information, with low cost, wide application range and strong feasibility.

[0123] In some embodiments, the processing module 320 is specifically used to input the first target public opinion text information and the second target public opinion text information into the Bert pre-trained network, perform information encoding, and obtain multiple first word embedding vectors and second word embedding vectors, wherein the first word embedding vector corresponds one-to-one to the word segmentation of the first target public opinion text information, and the second word embedding vector corresponds one-to-one to the word segmentation of the second target public opinion text information;

[0124] Performing average pooling on all of the first word embedding vectors to obtain a first pooled vector, and performing average pooling on all of the second word embedding vectors to obtain a second pooled vector;

[0125] Performing feature fusion on the first pooled vector and the second pooled vector to obtain a fused vector;

[0126] Based on the fusion vector, similarity determination is performed to obtain the similarity between the first target public opinion text information and the second target public opinion text information.

[0127] In some embodiments, the processing module 320 is further specifically used to obtain a difference between the first pooling vector and the second pooling vector;

[0128] determining the absolute value of the difference as a target value;

[0129] Based on the first pooling vector, the second pooling vector and the target value, feature fusion is performed to obtain the fusion vector.

[0130] In some embodiments, it further includes: a topic cluster acquisition module, which is used to acquire initial public opinion information, and the initial public opinion information is obtained from the target website through crawler technology;

[0131] Performing word segmentation processing on the initial public opinion information to obtain multiple word segments;

[0132] Based on the segmentation, a target matrix corresponding to the initial public opinion information is constructed, wherein the row number of the target matrix represents the serial number of the initial public opinion information, the column number of the target matrix represents the serial number of the segmentation in the initial public opinion information, and the element in the target matrix represents the frequency of occurrence of the current segmentation in the initial public opinion information;

[0133] Inputting the target matrix into the trained LDA model to obtain the topic of the initial public opinion information;

[0134] When the topics of all the initial public opinion information are determined, at least one topic cluster is obtained.

[0135] In some embodiments, the topic cluster acquisition module is specifically used to filter the initial public opinion information based on a preset keyword table to obtain first public opinion information, where the first public opinion information includes keywords in the keyword table;

[0136] Performing data cleaning on the first public opinion information to obtain second public opinion information;

[0137] The second public opinion information is segmented using a preset segmentation tool to obtain a plurality of segmented words.

[0138] In some embodiments, the topic cluster acquisition module is further specifically used to input the target matrix into a trained LDA model to obtain a topic distribution list, wherein the topic distribution list includes multiple topic elements, and the topic elements include: a topic ID and a probability that the initial public opinion information belongs to the current topic;

[0139] Traversing the topic distribution list to determine the topic ID with the highest probability as the target topic ID;

[0140] The topic corresponding to the target topic ID is determined as the topic of the current initial public opinion information.

[0141] In some embodiments, the processing module 320 is further specifically used to generate a binary adjacency matrix based on the similarity between the target public opinion text information, the binary adjacency matrix is ​​a w×w-dimensional matrix, and the elements in the binary adjacency matrix represent the similarity between the i-th target public opinion text information and the j-th target public opinion text information, wherein w represents the number of target public opinion text information, i represents the row number of the binary adjacency matrix, and j represents the column number of the binary adjacency matrix;

[0142] Converting the binary adjacency matrix into an undirected graph, wherein the nodes in the undirected graph are the target public opinion text information, and the edges of the undirected graph represent the similarity between two target public opinion text information;

[0143] Based on the undirected graph, the hot public opinion information is obtained.

[0144] In some embodiments, the processing module 320 is further specifically used to traverse the nodes in the undirected graph using a depth-first search strategy to obtain a plurality of connected subgraphs, wherein the connected subgraphs include a plurality of nodes of the same viewpoint, and the nodes of the same viewpoint refer to nodes whose similarity with each other is greater than or equal to a preset similarity threshold;

[0145] Obtain the number of nodes in each of the connected subgraphs;

[0146] Determine one or more of the connected subgraphs having a larger number of nodes as target subgraphs;

[0147] At least one of the target public opinion text information corresponding to the target subgraph is determined as the hot public opinion information.

[0148] In some embodiments, an electronic device is also provided, which may be a server, and its internal structure is shown in FIG. Figure 4 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the functions or steps on the server side of the above method are implemented.

[0149] In some embodiments, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: obtaining target public opinion text information, the target public opinion text information including a plurality of word segments; obtaining hot public opinion information by obtaining the similarity between the target public opinion text information, wherein obtaining the similarity between the target public opinion text information includes: inputting any two target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion, and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all target public opinion text information to obtain the similarity between all target public opinion text information; information encoding is performed using a Bert pre-trained network of a similarity discrimination model.

[0150] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining target public opinion text information, the target public opinion text information includes multiple word segments; obtaining hot public opinion information by obtaining the similarity between the target public opinion text information, wherein obtaining the similarity between the target public opinion text information includes: inputting any two target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all target public opinion text information to obtain the similarity between all target public opinion text information; information encoding is performed using a Bert pre-trained network of the similarity discrimination model.

[0151] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or electronic device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

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

[0153] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A method for detecting hot public opinion information, characterized in that: include: Obtaining target public opinion text information, wherein the target public opinion text information includes a plurality of segmented words; By obtaining the similarity between the target public opinion text information, hot public opinion information is obtained, wherein obtaining the similarity between the target public opinion text information includes: inputting any two of the target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all the target public opinion text information to obtain the similarity between all the target public opinion text information; the information encoding is performed using the Bert pre-trained network of the similarity discrimination model.

2. The method for detecting hot public opinion information according to claim 1, characterized in that: The steps of inputting any two target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the two target public opinion text information include: Inputting the first target public opinion text information and the second target public opinion text information into the Bert pre-trained network, performing information encoding, and obtaining a plurality of first word embedding vectors and second word embedding vectors, wherein the first word embedding vectors correspond one-to-one to the word segments of the first target public opinion text information, and the second word embedding vectors correspond one-to-one to the word segments of the second target public opinion text information; Performing average pooling on all of the first word embedding vectors to obtain a first pooled vector, and performing average pooling on all of the second word embedding vectors to obtain a second pooled vector; Performing feature fusion on the first pooled vector and the second pooled vector to obtain a fused vector; Based on the fusion vector, similarity determination is performed to obtain the similarity between the first target public opinion text information and the second target public opinion text information.

3. The method for detecting hot public opinion information according to claim 2, characterized in that: The step of performing feature fusion on the first pooled vector and the second pooled vector to obtain a fused vector includes: Obtaining a difference between the first pooled vector and the second pooled vector; determining the absolute value of the difference as a target value; Based on the first pooling vector, the second pooling vector and the target value, feature fusion is performed to obtain the fusion vector.

4. The method for detecting hot public opinion information according to claim 1, characterized in that: The target public opinion text information refers to the public opinion text information in the topic cluster, and the topic cluster includes: the topic category and the public opinion text information under the current topic category; The step of obtaining the subject cluster comprises: Acquire initial public opinion information, where the initial public opinion information is obtained from a target website by using crawler technology; Performing word segmentation processing on the initial public opinion information to obtain multiple word segments; Based on the segmentation, a target matrix corresponding to the initial public opinion information is constructed, wherein the row number of the target matrix represents the serial number of the initial public opinion information, the column number of the target matrix represents the serial number of the segmentation in the initial public opinion information, and the element in the target matrix represents the frequency of occurrence of the current segmentation in the initial public opinion information; Inputting the target matrix into the trained LDA model to obtain the topic of the initial public opinion information; When the topics of all the initial public opinion information are determined, at least one topic cluster is obtained.

5. The method for detecting hot public opinion information according to claim 4, characterized in that: The step of performing word segmentation processing on the initial public opinion information to obtain a plurality of word segments includes: Based on a preset keyword table, the initial public opinion information is filtered to obtain first public opinion information, where the first public opinion information includes keywords in the keyword table; Performing data cleaning on the first public opinion information to obtain second public opinion information; The second public opinion information is segmented using a preset segmentation tool to obtain a plurality of segmented words.

6. The method for detecting hot public opinion information according to claim 4, characterized in that: The step of inputting the target matrix into the trained LDA model to obtain the topic of the initial public opinion information includes: Input the target matrix into the trained LDA model to obtain a topic distribution list, wherein the topic distribution list includes multiple topic elements, and the topic elements include: a topic ID and a probability that the initial public opinion information belongs to the current topic; Traversing the topic distribution list to determine the topic ID with the highest probability as the target topic ID; The topic corresponding to the target topic ID is determined as the topic of the current initial public opinion information.

7. The method for detecting hot public opinion information according to any one of claims 1 or 4, characterized in that: The step of obtaining hot public opinion information by obtaining the similarity between the target public opinion text information includes: Based on the similarity between the target public opinion text information, a binary adjacency matrix is ​​generated, wherein the binary adjacency matrix is ​​a w×w dimensional matrix, and the elements in the binary adjacency matrix represent the similarity between the i-th target public opinion text information and the j-th target public opinion text information, wherein w represents the number of target public opinion text information, i represents the row number of the binary adjacency matrix, and j represents the column number of the binary adjacency matrix; Converting the binary adjacency matrix into an undirected graph, wherein the nodes in the undirected graph are the target public opinion text information, and the edges of the undirected graph represent the similarity between two target public opinion text information; Based on the undirected graph, the hot public opinion information is obtained.

8. The method for detecting hot public opinion information according to claim 7, characterized in that: Based on the undirected graph, the step of obtaining the hot public opinion information includes: Using a depth-first search strategy, traverse the nodes in the undirected graph to obtain a plurality of connected subgraphs, wherein the connected subgraphs include a plurality of nodes of the same viewpoint, wherein the nodes of the same viewpoint refer to nodes whose similarity with each other is greater than or equal to a preset similarity threshold; Obtain the number of nodes in each of the connected subgraphs; Determine one or more of the connected subgraphs having a larger number of nodes as target subgraphs; At least one of the target public opinion text information corresponding to the target subgraph is determined as the hot public opinion information.

9. A hot public opinion information detection system, characterized in that: include: An information acquisition module is used to acquire target public opinion text information, wherein the target public opinion text information includes a plurality of segmented words; A processing module is used to obtain hot public opinion information by obtaining the similarity between the target public opinion text information, wherein obtaining the similarity between the target public opinion text information includes: inputting any two of the target public opinion text information into a preset similarity discrimination model, performing information encoding, pooling processing, feature fusion and similarity discrimination to obtain the similarity between the current two target public opinion text information, traversing all the target public opinion text information to obtain the similarity between all the target public opinion text information; the information encoding is performed using the Bert pre-trained network of the similarity discrimination model.

10. An electronic device, characterized in that: It includes a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute the computer program stored in the memory to implement the hot public opinion information detection method as described in any one of claims 1 to 8.