Public opinion detection method and device
By using graph attention network and jump knowledge network in financial public opinion monitoring to analyze the feature matrix of financial public opinion text, the problem of neglected relevance of public opinion information is solved, and more accurate public opinion detection is achieved.
Patent Information
- Application Number
- CN202411739835.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-18
AI Technical Summary
The existing technology ignores the correlation between public opinion information in financial public opinion monitoring, resulting in poor accuracy of public opinion detection and the inability to accurately judge the positive or negative feedback of public opinion to related events.
The graph attention network and the jump knowledge network are used to input the text feature matrix of the financial public opinion text into the graph attention network for feature analysis, and the aggregated text feature matrix is obtained through layer aggregation, and the event label is determined based on the matrix to characterize the positive or negative feedback of public opinion to the event.
By considering the comment and reply relationship between public opinion texts, the degree of fit between the test results and the actual situation is improved, and the accuracy of public opinion detection is improved.
Smart Images

Figure CN119646184A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning, and in particular to a method and device for detecting public opinion. Background Art
[0002] Financial public opinion monitoring refers to the process of real-time monitoring and analysis of public opinion trends in the financial market (such as commercial banks). It is an important tool for commercial banks to manage risks and conduct market research. When unfavorable public opinion against a bank appears in the market, negative public opinion will spread rapidly, damaging the bank's public image and brand reputation. If negative public opinion is not handled in a timely manner, unfavorable public opinion may lead to a decline in customer trust in the bank, which in turn affects the bank's business volume.
[0003] At present, the time series characteristics of public opinion events can be used for public opinion monitoring. Although this method is helpful for public opinion analysis of financial-related news, the correlation between public opinion information is ignored during the feature extraction process, resulting in poor accuracy of public opinion detection, that is, it is impossible to accurately judge whether public opinion is positive or negative feedback for related events.
[0004] Therefore, how to improve the accuracy of public opinion detection is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The present application provides a public opinion detection method to improve the accuracy of public opinion detection and more accurately determine whether the public opinion is positive feedback or negative feedback to related events. The present application also provides a public opinion detection device.
[0006] In a first aspect, the present application provides a public opinion detection method, comprising:
[0007] Obtaining a text feature matrix of the financial public opinion text, wherein the text feature matrix includes a plurality of nodes and connection relationships between the nodes;
[0008] The text feature matrix is input into the graph attention network for feature analysis, and the node feature matrix output by each layer of the graph attention network is layer-aggregated using the skip knowledge network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and the layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network;
[0009] An event label corresponding to the financial public opinion text is determined according to the aggregated text feature matrix, and the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for an event.
[0010] Optionally, determining the event label corresponding to the financial public opinion text according to the aggregated text feature matrix includes:
[0011] Determine the similarity between the aggregated text feature matrix and each potential topic vector in the memory space and normalize the similarity to obtain the probability that each topic of the event is similar;
[0012] Determine the probability as the weight of each of the topics, perform weighted calculation on each topic and the corresponding probability, and obtain the invariance feature of the event;
[0013] Concatenate the invariant feature with the aggregated text feature matrix to obtain a concatenated vector;
[0014] The concatenated vector is input into the fully connected layer and the normalized layer for full connection and normalization processing to obtain the event label.
[0015] Optionally, inputting the text feature matrix into a graph attention network for feature analysis includes:
[0016] Determine a similarity coefficient between each node feature and a neighbor node feature in the text feature, normalize the similarity coefficient, and determine an attention coefficient between each node feature and a neighbor node feature;
[0017] The attention coefficients of multiple neighboring node features of the same node feature are weighted summed, and the sum result is used as the new feature of the current node.
[0018] Optionally, the node feature matrix output by each layer of the graph attention network is aggregated by using the skip knowledge network to obtain an aggregated text feature matrix, including:
[0019] The node feature matrix output by each layer of the graph attention network is subjected to maximum pooling to obtain the aggregated text feature matrix.
[0020] Optionally, the graph attention network includes a first-layer graph attention network and a second-layer graph attention network, and the step of inputting the text feature matrix into the graph attention network for feature analysis includes:
[0021] The text feature matrix is input into the first-layer graph attention network for feature analysis, and the output result of the first-layer graph attention network is input into the second-layer graph attention network for feature analysis.
[0022] In a second aspect, the present application further provides a public opinion detection device, the device comprising:
[0023] An acquisition unit, used to acquire a text feature matrix of the financial public opinion text, wherein the text feature matrix includes a plurality of nodes and connection relationships between the nodes;
[0024] An obtaining unit is used to input the text feature matrix into the graph attention network for feature analysis, and to perform layer aggregation on the node feature matrix output by each layer of the graph attention network using the skip knowledge network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and the layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network;
[0025] A determination unit is used to determine an event label corresponding to the financial public opinion text according to the aggregated text feature matrix, and the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for an event.
[0026] Optionally, the determining unit is specifically configured to:
[0027] Determine the similarity between the aggregated text feature matrix and each potential topic vector in the memory space and normalize the similarity to obtain the probability that each topic of the event is similar;
[0028] Determine the probability as the weight of each of the topics, perform weighted calculation on each topic and the corresponding probability, and obtain the invariance feature of the event;
[0029] Concatenate the invariant feature with the aggregated text feature matrix to obtain a concatenated vector;
[0030] The concatenated vector is input into the fully connected layer and the normalized layer for full connection and normalization processing to obtain the event label.
[0031] Optionally, the obtaining unit is specifically used to:
[0032] Determine a similarity coefficient between each node feature and a neighbor node feature in the text feature, normalize the similarity coefficient, and determine an attention coefficient between each node feature and a neighbor node feature;
[0033] The attention coefficients of multiple neighboring node features of the same node feature are weighted summed, and the sum result is used as the new feature of the current node.
[0034] Optionally, the obtaining unit is specifically used to:
[0035] The node feature matrix output by each layer of the graph attention network is subjected to maximum pooling to obtain the aggregated text feature matrix.
[0036] Optionally, the graph attention network includes a first-layer graph attention network and a second-layer graph attention network, and the obtaining unit is specifically used to:
[0037] The text feature matrix is input into the first-layer graph attention network for feature analysis, and the output result of the first-layer graph attention network is input into the second-layer graph attention network for feature analysis.
[0038] In a third aspect, an embodiment of the present application provides a device, comprising a memory and a processor, wherein the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes any method described in the first aspect.
[0039] In a fourth aspect, an embodiment of the present application provides a computer storage medium, in which a code is stored. When the code is executed, a device executing the code implements the method described in any one of the first aspects above.
[0040] Compared with the prior art, this application has the following beneficial effects:
[0041] The present application obtains a text feature matrix of financial public opinion text, wherein the text feature matrix includes multiple nodes and connection relationships between the nodes, and inputs the text feature matrix into a graph attention network for feature analysis, and uses a jumping knowledge network to perform layer aggregation on the node feature matrix output by each layer of the graph attention network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network, and the event label corresponding to the financial public opinion text is determined according to the aggregated text feature matrix, wherein the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for the event. In this way, a graph attention neural network is used for feature analysis, and a jumping knowledge network is used to connect the output of each layer of the graph attention neural network. Compared with the traditional financial public opinion monitoring method based on time series, it can take into account the comment reply relationship between the public opinion texts, thereby improving the fit between the detection results and the actual situation, so that the detection results can be more consistent with the actual situation, thereby improving the accuracy of public opinion detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A flowchart of public opinion detection provided in an embodiment of the present application;
[0044] Figure 2A schematic diagram of a public opinion detection model provided in an embodiment of the present application;
[0045] Figure 3 A structural diagram of a specific implementation of the public opinion detection device provided in this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] Financial public opinion monitoring refers to the process of real-time monitoring and analysis of public opinion trends in the financial market (such as commercial banks). It is an important tool for commercial banks to manage risks and conduct market research. When unfavorable public opinion against a bank appears in the market, negative public opinion will spread rapidly, damaging the bank's public image and brand reputation. If negative public opinion is not handled in a timely manner, unfavorable public opinion may lead to a decline in customer trust in the bank, which in turn affects the bank's business volume.
[0048] At present, the time series characteristics of public opinion events can be used to monitor public opinion. After analysis, it was found that some financial-related topics on social media usually involve multiple parties and there are multiple rounds of responses and replies, which makes the financial public opinion text present the characteristics of a graph structure. Given that topics on social media have an important impact on financial public opinion, methods that rely solely on time series features can no longer meet the needs. That is, although this method helps to analyze public opinion on financial-related news, it ignores the correlation between public opinion information during the feature extraction process, resulting in poor accuracy in public opinion detection, that is, it is impossible to accurately judge whether public opinion is positive or negative feedback for related events.
[0049] In view of this, the present application provides a public opinion detection method, including obtaining a text feature matrix of a financial public opinion text, wherein the text feature matrix includes multiple nodes and connection relationships between the nodes, inputting the text feature matrix into a graph attention network for feature analysis, and using a skip knowledge network to perform layer aggregation on the node feature matrix output by each layer of the graph attention network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network, and determining the event label corresponding to the financial public opinion text according to the aggregated text feature matrix, wherein the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for the event. In this way, a graph attention neural network is used for feature analysis, and a skip knowledge network is used to connect the output of each layer of the graph attention neural network. Compared with the traditional financial public opinion monitoring method based on time series, it can take into account the comment reply relationship between the public opinion texts, thereby improving the fit between the detection results and the actual situation, thereby improving the accuracy of public opinion detection.
[0050] It should be noted that the public opinion detection method and device provided in this application are used in the application scenario of detecting public opinion on banks in the financial field. Other fields are any fields other than the financial field, for example, the field of deep learning. The above is only an example and does not limit the application field of the method and device provided in this application.
[0051] The method provided in the embodiment of the present application can be executed by software on a terminal device, which can be, for example, a mobile phone, a tablet computer, a computer, or the like.
[0052] In order to make the technical personnel in this field better understand the present application, the present application is further described in detail below in combination with the drawings and specific implementation methods. The method provided in the present application embodiment is described below by taking the first device as an example.
[0053] Figure 1 This is a flow chart of a method for detecting public opinion provided in an embodiment of the present application. Figure 1 As shown, the method includes:
[0054] S101: Obtain a text feature matrix of financial public opinion text.
[0055] The first device can obtain a text feature matrix of the financial public opinion text. The text feature matrix can be a graph structure, including multiple nodes and connection relationships between the nodes.
[0056] Exemplarily, taking Chinese social media data as an example, the first device can use posts in the spread of public opinion events as nodes of a graph and construct node features of the nodes.
[0057] Specifically, the first device can process the information related to the post into a vector. A post can be composed of multiple financial public opinion text contents. The financial public opinion text is text-encoded, and the encoded results are combined to form the encoding of the post. Finally, the post vectors of all the post codes involved in an event are spliced together to form the financial public opinion text feature matrix of the event. Among them, text encoding is the process of converting text information into word vectors. Before the conversion, the text (the text here refers to the financial public opinion text) can be cleaned. For example, the original text has text styles that are unique to many social media platforms, such as using "@" to mention a user, using "#" to represent the current topic, and using url links to further explain the information being transmitted, such as attaching a video link of the event. And then it needs to be removed. In addition, stop words in the text can also be cleared.
[0058] Exemplarily, the present application can use the BERT model to extract features from text data. Specifically, the processed content of the article is sent to the pre-trained model Bert-base-chinese to generate word vectors. Bert-base-chinese is a BERT pre-trained model for Chinese. The model consists of a 12-layer transformer encoder. The present application can take the hidden vector of the penultimate layer in the BERT model as the word vector of the text, average all the word vectors of the text, and generate a 768-dimensional vector representation, that is, combine the word vectors of the financial public opinion text corresponding to a post to form the encoding of the post, and finally splice the post vectors of all the post encodings involved in an event to form the financial public opinion text feature matrix of the event.
[0059] S102: Input the text feature matrix into the graph attention network for feature analysis, and use the skip knowledge network to aggregate the node feature matrix output by each layer of the graph attention network to obtain an aggregated text feature matrix.
[0060] The first device may first input the text feature matrix into the graph attention network for feature analysis, wherein the graph attention network may be used to update the features of each node in combination with the features of neighboring nodes in the text features.
[0061] For example, the Graph Attention Network (GAT) uses an attention mechanism to aggregate the features of adjacent vertices. The attention mechanism can adaptively assign weights to different neighbor vertices. The vertex update process of GAT can be divided into two processes, as follows:
[0062] First, the similarity coefficient between each node feature and the neighbor node feature in the text feature can be determined, the similarity coefficient can be normalized, and the attention coefficient between each node feature and the neighbor node feature can be determined. Then, the attention coefficients of multiple neighbor node features of the same node feature can be weighted summed, and the summed result can be used as the new feature of the current node.
[0063] Specifically, the calculation process of each node aggregating neighbor node features and updating its own features is shown in formula (1).
[0064]
[0065] where σ(·) is the ReLU activation function, W l is a weight parameter used to represent the neighbor nodes of node i. is the attention coefficient from node j to node i in layer l, Update the previous node j for layer l. Node i after node j is updated in combination with its neighboring vertices.
[0066] In some possible implementations, for example, Figure 2 As shown, the graph attention network can be divided into two layers, and the output result of the first layer of the graph attention network can be used as the input of the second layer of the graph attention network. The multi-layer graph attention network can collect higher-order neighbor node information.
[0067] The first device can use the jumping knowledge network to perform layer aggregation on the node feature matrix output by each layer of the graph attention network to obtain an aggregated text feature matrix. Among them, layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network, and the jumping knowledge network (Jumping Knowledge Networks, JK-Net) can have an adaptive aggregation mechanism. JK-Net mainly achieves this goal through two architectural changes. First, JK-Net uses a jump connection method in each layer of the graph neural network to achieve more flexible information transfer. Secondly, JK-Net uses a layer aggregation mechanism to adaptively fuse the output of each layer, thereby achieving more accurate node aggregation.
[0068] Specifically, there are many ways to aggregate layers. For example, the outputs of multiple graph attention networks can be combined by serial operation, and linear transformation can be performed to obtain an aggregated text feature matrix. For example, layer aggregation can be performed by maximum pooling to obtain an aggregated text feature matrix. For example, Bi-LSTM+attention can be used to perform layer aggregation.
[0069] In the following application, the method of performing layer aggregation by maximum pooling to obtain an aggregated text feature matrix is used as an example. As shown in formula (2):
[0070]
[0071] Among them, Z i is the aggregated text feature matrix, and h is the output of each layer of the graph attention network.
[0072] S103: Determine the event label corresponding to the financial public opinion text according to the aggregated text feature matrix.
[0073] The first device may determine an event label corresponding to the financial public opinion text according to the aggregated text feature matrix, wherein the event label may be used to characterize whether the financial public opinion text is positive feedback or negative feedback for the event.
[0074] In some possible implementations, the application currently tends to capture a large number of event-specific features in the visible data, lacking the ability to capture event-invariant features, which are considered to be very important for the generalization of the model. Figure 2 As shown, the present application can also be combined with a memory network ( Figure 2 The memory module in the event extracts event-invariant features of the event. Among them, event-invariant features refer to features that remain consistent across different events. These features do not depend on the properties of a specific event, but are common features across multiple events. In the field of machine learning and pattern recognition, event-invariant features are crucial to improving the generalization ability of the model and the recognition performance across events. These features can capture the essential properties of the data, so that the model can still maintain high recognition accuracy and robustness when facing new events or unseen data.
[0075] Specifically, the first device can determine the similarity between the aggregated text feature matrix and each potential topic vector in the memory space and normalize the similarity to obtain the probability that each topic of the event is similar, and then determine the probability as the weight of each topic, perform weighted calculation on each topic and the corresponding probability, and obtain the invariant feature of the event. That is, the similarity of each potential topic vector in the memory space is determined according to the dot product calculation query v, and the similarity is normalized using the soft max function to obtain the probability α that the event is similar to each potential topic. k Then, with similarity probability α k As the weight of each topic, the invariant feature of event m is obtained by weighted summation. The specific formula can be shown in formula (3) and formula (4).
[0076] α k =soft max(vT M k ) (3)
[0077]
[0078] Among them, V T (i.e., dot product calculation query v) is the input event feature vector, which can be obtained by i Perform event representation to obtain, M∈R d×K , which is used to capture the internal latent topic information of the event, d is the vector dimension of each latent topic, and k is the number of latent topic clusters.
[0079] Finally, the invariant feature m is concatenated with the input event vector v to generate a new event representation v~, which can also be called a concatenated vector, as shown in formula (5):
[0080]
[0081] The concatenated vector is input into the fully connected layer and the normalized layer for full connection and normalization processing to obtain the event label P. The event label can be used to characterize whether the financial public opinion text is positive feedback or negative feedback for the event, as shown in formula (6):
[0082]
[0083] The present application obtains a text feature matrix of financial public opinion text, wherein the text feature matrix includes multiple nodes and connection relationships between the nodes, and inputs the text feature matrix into a graph attention network for feature analysis, and uses a jumping knowledge network to perform layer aggregation on the node feature matrix output by each layer of the graph attention network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network, and the event label corresponding to the financial public opinion text is determined according to the aggregated text feature matrix, wherein the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for the event. In this way, a graph attention neural network is used for feature analysis, and a jumping knowledge network is used to connect the output of each layer of the graph attention neural network. Compared with the traditional financial public opinion monitoring method based on time series, it can take into account the comment reply relationship between the public opinion texts, thereby improving the fit between the detection results and the actual situation, so that the detection results can be more consistent with the actual situation, thereby improving the accuracy of public opinion detection.
[0084] The above are some specific implementations of the public opinion detection method provided in the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided in the embodiment of the present application will be introduced from the perspective of functional modularization. The device and the public opinion detection method described above can be referred to each other.
[0085] Figure 3 The structural block diagram of the public opinion detection device provided by the embodiment of the present invention is referred to as the specific implementation mode 2. Figure 3 The device may include:
[0086] An acquisition unit 300 is used to acquire a text feature matrix of a financial public opinion text, wherein the text feature matrix includes a plurality of nodes and connection relationships between the nodes;
[0087] An obtaining unit 310 is used to input the text feature matrix into a graph attention network for feature analysis, and to perform layer aggregation on the node feature matrix output by each layer of the graph attention network using a skip knowledge network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and the layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network;
[0088] The determination unit 320 is used to determine the event label corresponding to the financial public opinion text according to the aggregated text feature matrix, and the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for the event.
[0089] Optionally, the determining unit is specifically configured to:
[0090] Determine the similarity between the aggregated text feature matrix and each potential topic vector in the memory space and normalize the similarity to obtain the probability that each topic of the event is similar;
[0091] Determine the probability as the weight of each of the topics, perform weighted calculation on each topic and the corresponding probability, and obtain the invariance feature of the event;
[0092] Concatenate the invariant feature with the aggregated text feature matrix to obtain a concatenated vector;
[0093] The concatenated vector is input into the fully connected layer and the normalized layer for full connection and normalization processing to obtain the event label.
[0094] Optionally, the obtaining unit is specifically used to:
[0095] Determine a similarity coefficient between each node feature and a neighbor node feature in the text feature, normalize the similarity coefficient, and determine an attention coefficient between each node feature and a neighbor node feature;
[0096] The attention coefficients of multiple neighboring node features of the same node feature are weighted summed, and the summation result is used as the new feature of the current node.
[0097] Optionally, the obtaining unit is specifically used to:
[0098] The node feature matrix output by each layer of the graph attention network is subjected to maximum pooling to obtain the aggregated text feature matrix.
[0099] Optionally, the graph attention network includes a first-layer graph attention network and a second-layer graph attention network, and the obtaining unit is specifically used to:
[0100] The text feature matrix is input into the first-layer graph attention network for feature analysis, and the output result of the first-layer graph attention network is input into the second-layer graph attention network for feature analysis.
[0101] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.
[0102] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the method described in any embodiment of the present application.
[0103] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements the method described in any embodiment of the present application.
[0104] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.
[0105] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0106] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0107] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A method for detecting public opinion, characterized in that: include: Obtaining a text feature matrix of the financial public opinion text, wherein the text feature matrix includes a plurality of nodes and connection relationships between the nodes; The text feature matrix is input into the graph attention network for feature analysis, and the node feature matrix output by each layer of the graph attention network is layer-aggregated using the skip knowledge network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and the layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network; An event label corresponding to the financial public opinion text is determined according to the aggregated text feature matrix, and the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for an event.
2. The method according to claim 1, characterized in that Determining the event label corresponding to the financial public opinion text according to the aggregated text feature matrix includes: Determine the similarity between the aggregated text feature matrix and each potential topic vector in the memory space and normalize the similarity to obtain the probability that each topic of the event is similar; Determine the probability as the weight of each of the topics, perform weighted calculation on each topic and the corresponding probability, and obtain the invariance feature of the event; Concatenate the invariant feature with the aggregated text feature matrix to obtain a concatenated vector; The concatenated vector is input into the fully connected layer and the normalized layer for full connection and normalization processing to obtain the event label.
3. The method according to claim 1, characterized in that The step of inputting the text feature matrix into a graph attention network for feature analysis includes: Determine a similarity coefficient between each node feature and a neighbor node feature in the text feature, normalize the similarity coefficient, and determine an attention coefficient between each node feature and a neighbor node feature; The attention coefficients of multiple neighboring node features of the same node feature are weighted summed, and the sum result is used as the new feature of the current node.
4. The method according to claim 1, characterized in that: The node feature matrix output by each layer of the graph attention network is aggregated by using the skip knowledge network to obtain an aggregated text feature matrix, including: The node feature matrix output by each layer of the graph attention network is subjected to maximum pooling to obtain the aggregated text feature matrix.
5. The method according to claim 1, characterized in that The graph attention network includes a first-layer graph attention network and a second-layer graph attention network, and the inputting the text feature matrix into the graph attention network for feature analysis includes: The text feature matrix is input into the first-layer graph attention network for feature analysis, and the output result of the first-layer graph attention network is input into the second-layer graph attention network for feature analysis.
6. A public opinion detection device, characterized in that: include: An acquisition unit, used to acquire a text feature matrix of the financial public opinion text, wherein the text feature matrix includes a plurality of nodes and connection relationships between the nodes; An obtaining unit is used to input the text feature matrix into the graph attention network for feature analysis, and to perform layer aggregation on the node feature matrix output by each layer of the graph attention network using the skip knowledge network to obtain an aggregated text feature matrix, wherein the graph attention network is used to update the features of each node in combination with the features of neighboring nodes in the text features, and the layer aggregation is used to aggregate the information of the node features output by each layer of the graph attention network; A determination unit is used to determine an event label corresponding to the financial public opinion text according to the aggregated text feature matrix, and the event label is used to characterize whether the financial public opinion text is positive feedback or negative feedback for an event.
7. The device according to claim 6, characterized in that The determining unit is specifically configured to: Determine the similarity between the aggregated text feature matrix and each potential topic vector in the memory space and normalize the similarity to obtain the probability that each topic of the event is similar; Determine the probability as the weight of each of the topics, perform weighted calculation on each topic and the corresponding probability, and obtain the invariance feature of the event; Concatenate the invariant feature with the aggregated text feature matrix to obtain a concatenated vector; The concatenated vector is input into the fully connected layer and the normalized layer for full connection and normalization processing to obtain the event label.
8. The device according to claim 6, characterized in that The obtaining unit is specifically used for: Determine a similarity coefficient between each node feature and a neighbor node feature in the text feature, normalize the similarity coefficient, and determine an attention coefficient between each node feature and a neighbor node feature; The attention coefficients of multiple neighboring node features of the same node feature are weighted summed, and the sum result is used as the new feature of the current node.
9. The device according to claim 6, characterized in that The obtaining unit is specifically used for: The node feature matrix output by each layer of the graph attention network is subjected to maximum pooling to obtain the aggregated text feature matrix.
10. The device according to claim 6, characterized in that The graph attention network includes a first-layer graph attention network and a second-layer graph attention network, and the obtaining unit is specifically used for: The text feature matrix is input into the first-layer graph attention network for feature analysis, and the output result of the first-layer graph attention network is input into the second-layer graph attention network for feature analysis.