Public opinion attack early tracing method based on causal reasoning and double-graph alignment
By using causal reasoning and double-graph alignment methods in the tracing of public opinion attacks, the causal link inference modeling is constructed and optimized, and the problems of insufficient causal relationship modeling and inaccurate traceability in the existing technology are solved, and more efficient and accurate traceability of the intention of public opinion attacks is achieved.
Patent Information
- Application Number
- CN202510513246.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-23
AI Technical Summary
The existing technology is difficult to accurately tracing the intention of public opinion attacks in complex scenarios, and lacks modeling of the deep causal relationships in the evolution of public opinion, and is susceptible to false correlation interference and confounding factors.
Using a method based on causal reasoning and double-graph alignment, we construct a path map of public opinion evolution and a low-mixed bias endogenous logical tracing model, combined with a reinforcement learning algorithm, and establish a low-threshold drift external drive model to find the optimal external factor link, and finally construct the ultimate cause super sub-graph backbone through the sub-graph transformer and the double-graph alignment mechanism.
Significantly reduce the false causal relationship caused by confounding variables, improve the essential interpretation ability of attack intention traceability, realize accurate communication structure traceability, and enhance the ability to coordinate reasoning for complex public opinion ecology.
Smart Images

Figure CN120031144A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an early source tracing method for public opinion attacks based on causal reasoning and dual-graph alignment, and belongs to the technical field of network security and data mining. Background Art
[0002] With the rapid development of social media, online public opinion has shown an explosive growth trend. Its dissemination process involves multimodal data interaction, complex social relationship network diffusion and dynamic semantic evolution. How to trace the source and diffusion path of potential attack intentions from massive data has become a major challenge in the field of network security.
[0003] For example, the Chinese invention patent application with publication number CN116303886A discloses a method for predicting the evolution of public opinion based on a graph reasoning model, which is applied to the environment of the generation and development of public opinion. By collecting and integrating information points existing in the process of public opinion development, it predicts the development trend of future public opinion so as to be able to respond to emergencies in a timely manner and take corresponding measures. In a given social scene graph and conversations between characters of interest in the scene graph, GRM extracts features from the character conversations and initializes relationship nodes with these public opinion features. It uses a pre-trained Faster-RCNN detector to search for public opinion vocabulary in the scene and extracts its public opinion propagation features to initialize corresponding object nodes. Then, GRM uses GGNN to propagate node information in the graph, fully explores the interaction between people and context objects, and adopts a graph attention mechanism to adaptively select nodes with the largest amount of information by measuring the degree of propagation of public opinion for easy identification. This patent constructs a graph structure of social relations and semantic objects, and uses node feature aggregation and gating mechanisms to analyze the trend of public opinion dissemination. However, it faces significant challenges in complex scenarios: the patent relies on the information dissemination mechanism of the graph structure, and lacks modeling of the deep causal relationship of public opinion evolution, which makes node interactions susceptible to false correlation interference and difficult to accurately trace attack intentions; at the same time, hidden variables (such as unobserved motivations) and external triggering factors are not explicitly modeled, and the prediction results are susceptible to confounding factors, especially in the scenario of threshold drift, the causal chain is not robust enough. In addition, the patent has limitations on the use of contextual information of the "future" extrapolated link. It is difficult to supplement the logical link with prior causal knowledge under sparse data, which can easily lead to misjudgment of causal relationships; and the propagation path mapping under a single graph structure lacks a cross-graph semantic alignment mechanism, resulting in a large deviation between the traceability results and the actual propagation path.
[0004] Therefore, there is an urgent need for an early tracing method for public opinion attacks that optimizes causal link reasoning and improves structural alignment accuracy. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention proposes an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment.
[0006] The technical solution of the present invention is as follows: On the one hand, the present invention provides a method for early tracing of public opinion attacks based on causal reasoning and dual-graph alignment, the method comprising: Based on the existing public opinion viewpoints, a public opinion evolution path map is constructed, and based on the public opinion evolution path map, a low-confounding bias endogenous logic abduction model is constructed. The low-confounding bias endogenous logic abduction model is based on the structured causal model (SCM), and uses context switching and reinforcement learning algorithms to select the optimal endogenous cause link; A low-threshold drift exogenous-driven logic abduction model is established based on the optimal internal cause link, wherein the low-threshold drift exogenous-driven logic abduction model finds the optimal external cause link through a threshold factor identification mechanism and a reinforcement learning algorithm; The nodes and edges contained in the optimal internal cause link and the optimal external cause link are combined to obtain a subgraph, and the subgraph transformer Subgraphormer is used to learn the subgraph node representation, and the node information is aggregated and updated to construct the final causal super subgraph backbone; Based on the existing public opinion dissemination facts, the existing public opinion fact trunk is constructed. Based on the dual-graph alignment mechanism, the final cause super-subgraph trunk is node-aligned with the existing public opinion fact trunk, and the relevant opinion event subgraph is decoded. Based on the relevant opinion event subgraph, the sensitive user nodes corresponding to abnormal opinions in the social network are reversely framed, and the early propagation structure that leads to potential public opinion attack intentions is locked.
[0007] Preferably, the low confounding bias endogenous logic abduction model is based on the structured causal model SCM, and uses context switching and reinforcement learning algorithms to select the optimal internal cause link, specifically: The node features and graph structure information of the public opinion evolution path graph are aggregated through a graph convolutional network to generate structural variables that explicitly represent causal relationships, wherein the structural variables correspond to exogenous variables in the structured causal model (SCM) and are used to model the causal dependency relationship between nodes; The future extrapolated links of the real-time public opinion evolution path are encoded into node embedding vectors through a graph convolutional network, mapped to a pre-built priori event causal library, and similar causal patterns are searched using cosine similarity. The optimal internal cause link is obtained based on the causal pattern with the highest similarity. The method also includes supplementing the optimal internal cause link with logical edges, specifically, if there is no edge between nodes in the optimal internal cause link, adding causal edges according to the global event graph; using the conditional self-distributed Markov network to iteratively calculate the probability of events in the optimal internal cause link after adding causal edges, generating hidden variables, and obtaining the preset public opinion attack intention based on the counterfactual constraints and the hidden variables; The generalized causal edges in the global event graph are mapped to the real-time public opinion evolution path graph, the missing edges are supplemented, and the node representation is adjusted according to the supplemented edges to obtain the updated real-time public opinion evolution path graph.
[0008] Preferably, mapping to the pre-built priori event causal library specifically involves finding subgraph isomorphism in the causal graph structure of the structured causal model SCM, and selecting a path that complies with the constraints of the structured causal model SCM through a Markov decision process of reinforcement learning, wherein: The Markov decision process is formulated as a four-tuple ,state Represents the set of states when the agent chooses a path at different points in time; action De novo entity To the end entity possible paths; transition probabilities Represents the probability of the agent choosing the next path in path reasoning; reward Includes basic rewards and path rewards , expressed as: ; In the formula, and They are the learnable weight coefficient of basic reward and the learnable weight coefficient of path reward respectively; is the time step The state of being below; is the time step Next action.
[0009] Preferably, the conditional self-distributed Markov network is used to iteratively calculate the probability of occurrence of events in the optimal internal cause link after adding causal edges, and generate hidden variables, which are expressed as follows: ; In the formula, is a hidden variable; express a step of reasoning; express a chain of inference steps; express a chain of inference steps; is the transformation weight matrix; is the activation function; For the The event representation of the reasoning step; For the The event representation of the reasoning step; express The condition that a chain of inference steps has already occurred The probability of a chain of inference steps occurring.
[0010] Preferably, a low threshold drift exogenous drive logic causal model is established based on the optimal internal cause link, and the low threshold drift exogenous drive logic causal model searches for the optimal external cause link through a threshold factor identification mechanism and a reinforcement learning algorithm, specifically: For the endogenous evolutionary logic path in the real-time public opinion evolution path graph that has been mapped back to the optimal endogenous cause link, Transformer is used to aggregate the causal relationship information of the endogenous evolutionary logic path, and the token representation of the event is aggregated to obtain the event-level representation; the graph neural network is used to merge the structural information of the public opinion evolution path graph, and the threshold factor that affects the threshold effect between endogenous variables is integrated, which is expressed as follows: ; ; ; In the formula, Indicates transformer layers; Indicates an event No. transformer layers; Indicates an event No. Tokens; Indicates an event No. Tokens; For events The query matrix of the attention operation; For events Event-level representation of ; For events No. A graph attention layer, For events and events The threshold factor of is the threshold factor weight matrix; To perform the transpose operation; It is a multi-head attention mechanism; The conditional self-distributed encoder aggregates the threshold factor and the endogenous link representation and its neighbor representation to model the exogenous driving variables corresponding to the endogenous evolutionary logic path, that is, the virtual first and last exogenous node representation. , expressed as: ; In the formula, Indicates an event exogenous variables; Indicates an event The mean of the distribution of the exogenous variable; represents the value sampled from a standard normal distribution; Indicates an event The standard deviation of the distribution of the exogenous variable; and is the learnable weight matrix; For events The corresponding input vector; and is the bias term; and For events and events The representation of endogenous link causal pairs; For events context; For events The threshold factor of Taking the virtual head and tail external cause node representation and the optimal internal cause link as input, on the real-time public opinion evolution path graph, the optimal link tracing of the actual external cause node is carried out for the strongly associated subgraph composed of the five-hop range of the optimal internal cause link. In this process, the agent continuously interacts with the environment to select the optimal reasoning path combination. The actual external nodes are connected in the order of the public opinion evolution path diagram to form a link and obtain the optimal external link.
[0011] Preferably, the nodes and edges contained in the optimal internal cause link and the optimal external cause link are combined to obtain a subgraph, a subgraph transformer is used to learn the subgraph node representation, and the node information is aggregated and updated to construct the final causal super subgraph backbone, specifically: The overall structure of the subgraph is divided into multiple substructures, a product graph is constructed for each substructure, and the causal nodes in the product graph are marked. The subgraph transformer is used to learn the subgraph features, including: Construct an adjacency matrix to represent the connectivity between the product graphs of the subgraphs, including the internal subgraph connectivity, the external subgraph connectivity, and the adjacency matrix of the point update, where: The internal subgraph connectivity is formulated as: ; ; In the formula, Representing a subgraph Nodes in ; Representing a subgraph Nodes in ; Represents the connection of nodes within the same subgraph; Indicates that the subgraph is judged by the Kronecker function and Whether it is the same subgraph; Representation Node and Adjacent in the original image; External subgraph connectivity is formulated as: ; ; In the formula, Represents connections between the same nodes in different subgraphs; Indicates that the node is judged by the Kronecker function and Whether they are the same node; Representing a subgraph and The root nodes of are adjacent in the original graph; The adjacency matrix of the point update is expressed as: ; In the formula, Represents the updated adjacency matrix of the point; the updated adjacency matrix of the point is obtained by and The index to determine the specific element value, when and When , the matrix element at the corresponding position is 1, otherwise it is 0; Encode the positions of nodes in the subgraph, treat the marked cause node as the root node, and learn node representations of the product graph through the subgraph attention block. Use the adjacency matrix to control the internal and external subgraph attention mechanism, where only the non-zero entries of the adjacency matrix are weighted; The attention results are fused through the graph isomorphic network to obtain the final representation of the node; The final representations of the same nodes in different substructures are merged through splicing operations; based on the subgraph relationship, each causal node aggregates the neighborhood node information of the current node according to the global edge relationship of the future extrapolated structure, and the node representation after neighborhood aggregation is used as a supernode. The edges in the subgraph connect these supernodes, and the supernode representation is updated again to obtain the final causal super-subgraph backbone.
[0012] Preferably, the existing opinion fact backbone is constructed based on the existing opinion dissemination facts, specifically, the opinion fact representation of the existing opinion dissemination facts is gradually aggregated, including aggregating corpus into user heterogeneous facts, aggregating user into event heterogeneous facts, and aggregating motivation into event heterogeneous facts, wherein: The aggregating corpus to user heterogeneous facts specifically includes taking the propagation relationship of corpus released by users in the social network as the backbone of the connection relationship, aggregating the feature representation of each corpus to the corresponding social network user node, and updating the feature representation of each user node according to the edge relationship of corpus propagation; The aggregating user-to-event heterogeneous facts specifically includes, after completing the aggregation update of the corpus to the user node, based on the updated user node representation, taking the evolution context of the main opinion events of the community as the connection trunk, aggregating the feature representation of each user node to the opinion event to which it belongs, and then updating the feature representation of each opinion event node according to the edge relationship of the event evolution context; Specifically, the said aggregating motivation to event heterogeneous facts is that after completing the aggregation update from user to event, the main viewpoint event evolution context of the community is continued as the connection trunk, and each motivation element in the event motivation connotation logic link is aggregated to the viewpoint event to which it belongs, and each viewpoint event node is updated once according to the edge relationship; The evolutionary context of aggregated opinion facts is taken as the backbone of existing public opinion facts.
[0013] Preferably, based on the dual-graph alignment mechanism, the final cause super-subgraph trunk is node-aligned with the existing opinion fact trunk, and the relevant opinion event subgraph is decoded, specifically: The dual graphs are encoded respectively, and the dual graphs are the final cause super subgraph backbone and the existing opinion fact backbone, and are input into the Graphormer-based encoder and the graph attention network-based encoder for processing and output distribution G M and G N , construct the potential matrix A to fuse the structural relevance of the two graphs, score the structural relevance of the two graphs through the fully connected layer, and decode the relevant opinion event subgraphs whose relevance reaches the preset threshold , where the optimization objectives are to minimize the distribution difference between the relevant opinion event subgraph and the existing opinion fact trunk and to maximize the correlation score between the relevant opinion event subgraph and the extrapolated cause super subgraph trunk, which can be expressed as: ; In the formula, Represents the decoded related view event subgraph Main diagram of events with existing public opinion KL divergence of Represents the decoded related view event subgraph and extrapolated causal hypergraph The relevance score.
[0014] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a method for early tracing of public opinion attacks based on causal reasoning and dual graph alignment as described in the present invention.
[0015] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for early tracing of public opinion attacks based on causal reasoning and dual-graph alignment as described in the present invention.
[0016] The present invention has the following beneficial effects: 1. The present invention is an early source tracing method for public opinion attacks based on causal reasoning and dual-graph alignment. It explicitly models the causal mechanism through latent variables and structural variables, combines counterfactual invariance constraints, separates endogenous causality from confounding interference, significantly reduces false causal associations caused by confounding variables, improves the essential explanatory power of attack intention tracing, and avoids misjudgments caused by data noise or external interference. 2. The present invention is an early source tracing method for public opinion attacks based on causal reasoning and dual-graph alignment. It aligns nodes of the extrapolated causal hypergraph with the public opinion fact backbone graph that aggregates multi-source data, maximizes structural relevance using the cross-graph attention mechanism, effectively integrates prior knowledge (extrapolated causes) and real-time data (propagation facts), enhances the collaborative reasoning ability of cross-platform and cross-modal information in a complex public opinion ecosystem, and realizes accurate propagation structure tracing; 3. The present invention is an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment. It identifies key threshold factors based on Transformer and reinforcement learning, dynamically controls the triggering conditions of external nodes to internal causal links, improves the adaptability of causal chains to dynamic evolution, prevents causal breaks caused by threshold drift, and ensures the robustness and continuity of the tracing logic. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of the method of the present invention; Figure 2 This is a low-confounding bias endogenous logic abduction structure diagram of an embodiment of the present invention; Figure 3 This is a low threshold drift exogenous driven logic causal structure diagram of an embodiment of the present invention; Figure 4 It is the extrapolated causal super subgraph trunk aggregation network diagram of the embodiment of the present invention; Figure 5 It is a prior view fact trunk learning network diagram of an embodiment of the present invention; Figure 6 This is a diagram of an extrapolated cause-viewpoint dual-image association alignment decoding architecture of an embodiment of the present invention; Figure 7 Schematic diagram of a SABB module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0020] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0021] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0022] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0023] Embodiment 1: See also Figure 1 This embodiment provides an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment. Through the causal reasoning and dual-graph alignment mechanism, the identification of potential public opinion attack intentions and efficient tracing of the propagation structure are achieved. The method includes: S1. Construct a priori event causal library. Specifically, in this embodiment: The core of constructing a priori event causal library is to systematically extract and organize causal knowledge from large-scale corpus. In this embodiment, the CausalBank Corpus corpus is used as the original data source. The English causal event pairs of the CausalBank Corpus contain 314 million common sense causal event pairs, providing a causal common sense foundation covering a wide range of fields. The extraction of these causal pairs depends on language patterns (such as causal connectives) and semantic rules to ensure the reliability and logic of each pair of events (cause-effect). This embodiment obtains the causal event pairs in the CausalBank Corpus corpus, and performs cleaning and deduplication operations; Based on the above processed causal event pairs, a Casual Event Graph (CEG) is constructed. CEG is a directed acyclic graph (DAG) formalized as , where the node set Represents events, edge sets Represents the causal relationship between events, each node corresponds to an event, and each edge Indicates Events and There is a causal relationship between events. To ensure the coverage and connectivity of the graph, 500,000 nodes are randomly selected from the entire corpus, and anchor events are located by semantic similarity (such as the ELMo pre-trained model), and edge connections are expanded by breadth-first search (BFS). CEG is used as the prior event causal library of this embodiment to support the interpretability of causal reasoning; S2. Construct a public opinion evolution path map based on public opinion historical data, and construct a low-confounding bias endogenous logic abduction model based on the public opinion evolution path map to obtain the optimal endogenous cause link: S21. Construct a public opinion evolution path map based on existing public opinion viewpoints as a basis for subsequent tracing. Specifically, in this embodiment: The existing public opinions come from various channels such as social media, news reports, forums, etc., reflecting people's views on specific events or topics at different times; a public opinion evolution diagram is constructed according to the order in which the existing public opinions appear and the correlation between them. The public opinion evolution diagram is the preliminary framework of the public opinion evolution path diagram, in which: the order reflects the time context of public opinion development, and the correlation reflects the logical connection between different opinions; In order to deeply explore the motivations and connotations behind existing public opinions, each of which may have its own reasons and intentions, we need to conduct multiple rounds of analysis on existing public opinions, gradually extract key information, and improve the details of the public opinion evolution path map; Based on the above-mentioned public opinion evolution diagram and the analysis of existing public opinion viewpoints, the direction of future changes in public opinion communication positions is predicted, specifically: On the one hand, we adopt the method of fast deterministic first-hop node selection: the first-hop node refers to the key node that may appear first in the future public opinion propagation path, and fast determinism means to determine the public opinion or event that is most likely to become the first-hop node based on existing data and analysis in a relatively short period of time; On the other hand, we conduct forward-looking exploration of slow uncertain multi-hop links: Multi-hop links refer to the path of public opinion propagation from the current state to multiple stages in the future. Since the future is uncertain, this process is relatively slow and requires comprehensive consideration of various possible factors and changes. On the basis of constructing the public opinion evolution diagram and predicting the direction of position change, we further extrapolate the potential situation of future public opinion dissemination from the logical level, obtain various situations and trends that may appear in the future public opinion dissemination, and provide a basis for subsequent analysis and decision-making; Gradually reflect on the overall structure of the extrapolation of the logic of "existing + future" public opinion dissemination, including checking whether there are loopholes, unreasonable assumptions or omitted factors in the entire analysis process; through reflection, trace the causes and links of the formation of the future public opinion dissemination path, understand what factors lead to the predicted future situation, and how these factors interact with each other; The above steps complete the construction of the public opinion evolution path map; S22, such as Figure 2 As shown in the figure, a low-confounding bias endogenous logic abduction model is constructed based on the public opinion evolution path diagram. The low-confounding bias endogenous logic abduction model is based on the structured causal model SCM and uses context switching and reinforcement learning algorithms to select the optimal endogenous cause link, specifically: S221, Path map of public opinion evolution (with the intention of public opinion attack association), aggregate its node features and graph structure information to generate structural variables , which is equivalent to defining the causal relationship between observed variables and latent variables (such as confounding factors) in SCM. Node features (such as event type, communication subject) correspond to observed variables in SCM; graph structure information (such as communication path, temporal relationship) corresponds to causal dependency (edge) in SCM; structural variables explicitly model confounding factors (such as unobserved communication motivation), similar to separating direct effects and indirect effects through structural equations in SCM, clarifying the causal relationship between events, and alleviating the false correlation between endogenous variables; Structure variables Will be used to control the internal link Identify and predict public opinion attack intentions Prediction and ; By optimizing the joint likelihood Establishing internal links To predict the intention of public opinion attacks On this basis, in order to alleviate the causal relationship found in training and real The SCM in this example introduces a front door path to , where the hidden variable is defined as a robust explanatory feature. To enhance robustness, we assume Following the Gaussian distribution, it can be expressed as ,in, represents Gaussian distribution; is the mean vector of the multivariate Gaussian distribution; is a diagonal matrix, is the variance; based on counterfactual invariance, the latent variable Generate predicted public opinion attack intentions And compare it with the intention of public opinion attack near and To ensure the correctness of the path found, clarify the nature of the link cause, thereby reducing the impact of confounding variables and enhancing the causal consistency between the internal cause link and the attack intention; Preferably, this embodiment also uses the structural variable Dynamically expand the prior event causal library; S222, To overcome the future extrapolation link (real-time public opinion evolution path map ) The context information is limited. First, the future extrapolation link is mapped to the prior event causal library, the internal cause nodes are traced back in the context of the prior event causal library, and these internal cause nodes are combined into a chain in the optimal order to obtain the optimal internal cause link. Specifically: This embodiment uses a graph convolutional network (GCN) to combine the node features and structural information of the extrapolated part of the opinion evolution path graph to update the node representation. Specifically, an attention mechanism of the influence factor is introduced to quantify the influence of neighbor nodes on the current node, where the influence factor is expressed in the formula: ; In the formula, Indicates the distance from the current node The degree of influence of the neighboring node on the current node; is the initial impact, the default value is 1; is a hyperparameter between 0 and 1, which will increase with the number of hops As it increases, the influence of neighbor nodes decays exponentially; It is a parameter determined by time information, less than 1, and is used to further adjust the degree of influence according to the relationship between the time information of the neighboring nodes and the central node; ; In the formula, is the original vector after node feature transformation, is the linear transformation matrix, They are head entity, relationship, tail entity, and timestamp respectively; Use nonlinear function LeakyRelu to process , expressed as: ; In the formula, After processing with the nonlinear function LeakyRelu ; The node representation is updated based on the node features and structural information and is expressed as follows: ; ; In the formula, For the updated node ' is the activation function; For Node The set of all neighbor nodes; To connect nodes The edge set of ; for relative attention; Mapping is performed in the prior event causal library to enrich the causal information between events, and finally a substitute causal path search based on cosine similarity is established to obtain the optimal internal cause link based on the causal pattern with the highest similarity; In order to accurately mine the endogenous evolutionary logic path, this embodiment adopts a combination strategy of reinforcement learning and attention mechanism, specifically: The reinforcement learning part is defined as a Markov decision process, which is formulated as a four-tuple , where the status Represents the state set of the agent when choosing a path at different time points (specifically choosing a certain entity point); action De novo entity To the end entity possible paths; transition probabilities Represents the probability of the agent choosing the next path in path reasoning; reward Includes basic rewards and path rewards , the basic reward is based on whether the agent successfully reaches the target entity, while the path reward takes into account the length and diversity of the path, which can be expressed as: ; In the formula, and They are the learnable weight coefficient of basic reward and the learnable weight coefficient of path reward respectively; is the time step The state of being below; is the time step The action below; On this basis, the triple consisting of the input head entity, event relationship and timestamp is With time step The attention matrix of the network under And LSTM representation of triples , the agent (causal link reasoning) continuously interacts with the environment (real-time opinion evolution path diagram, prior event causal library and path exploration state space), uses the LSTM-based policy network to update parameters and select the most explanatory optimal reasoning path combination, that is, the optimal internal cause link after context enrichment, which is expressed as: ; In the formula, Indicates in status Take action The probability of represents a pre-set parameter matrix; represents the weighted activation function; in: ; ; In the formula, represents the initial hidden vector; LSTM stands for long short-term memory network; is the weight matrix associated with the starting state, 0 represents the value of the initial hidden vector; is the hidden vector at time step t; is the action information of the previous time step; is the weight matrix of the current time step; is the hidden vector of the previous time step; S223. Use the optimal logical edge relationship on the global event graph (a hypergraph structure built based on a priori event causal library, where nodes represent historical event entities (such as public opinion events, participating entities), and edges represent generalized causal logic across scenarios and fields (not simple temporal relationships)) as a guide to map the optimal internal cause link after context enrichment back to the real-time public opinion evolution path graph. If there is no edge between nodes, add logical edges, update the internal cause link representation in the local context, and extract hidden variables from the updated internal cause link Specifically, this embodiment uses a conditional self-distributed Markov network to learn the causal relationship within the link, based on event representation Iteratively calculate the probability of an event occurring , extract the hidden variables , expressed as; ; In the formula, is a hidden variable; express a step of reasoning; express a chain of inference steps; express a chain of inference steps; is the transformation weight matrix; is the activation function; For the The event representation of the reasoning step; For the The event representation of the reasoning step; express The condition that a chain of inference steps has already occurred The probability of occurrence of a chain of reasoning steps; By hidden variables Predicting the intention of public opinion attack: Based on the “hidden variables → The counterfactual invariance of the intention of public opinion attack is that no matter how other conditions change, the hidden variable This causal relationship between the intention of public opinion attack is unchanged, pulling the hidden variable Predict public opinion attack intentions and get close to the original attack intentions, guiding latent variables Learn the endogenous causal nature of the link, thereby achieving endogenous logical reasoning with low confounding bias; It can be seen from step S22 that the low-confounding bias endogenous logic abduction model described in this embodiment (the confounding bias refers to other factors interfering with the judgment of causal relationships, and the endogeneity refers to the mutual influence between the internal variables of the model leading to inaccurate conclusions) generates structural variables by aggregating the nodes and graph structure information of the evolutionary path graph. The structural variables are used to control the identification of endogenous links and the prediction of attack intentions, and provide prior knowledge for dynamic reasoning; the contextual knowledge is supplemented by mapping future extrapolated links to the prior event causal library dynamically expanded based on the structural variables, and the optimal endogenous link is selected by using the reinforcement learning algorithm, and the hidden variables are extracted from the optimal endogenous link. The latent variables are used to predict the public opinion attack intention based on the counterfactual invariance, so as to achieve low-confounding bias endogenous logic abduction; S3, such as Figure 3 As shown, a low threshold drift exogenous driven logic abduction model is established based on the optimal internal cause link. The low threshold drift exogenous driven logic abduction model finds the optimal external cause link through the threshold factor identification mechanism and the reinforcement learning algorithm, wherein: S31. For the endogenous evolutionary logic path in the real-time public opinion evolution path graph that has been mapped back to the optimal internal cause link, Transformer is used to aggregate the causal relationship information of the endogenous evolutionary logic path. Each event can be composed of many tokens, and the token representation of the event is aggregated to obtain the event-level representation; then the graph neural network (GNN) is used to merge the structural information of the public opinion evolution path graph, and finally the threshold factor that affects the threshold effect between endogenous variables is integrated, which is expressed as follows: ; ; ; In the formula, Indicates transformer layers; Indicates an event No. A transformer layer, which serves as both the key matrix and the value matrix; Indicates an event No. Tokens; Indicates an event No. Tokens; For events The query matrix of the attention operation; For events Event-level representation of ; For events No. A graph attention layer, For events and events The threshold factor of is the threshold factor weight matrix; To perform the transpose operation; It is a multi-head attention mechanism; S32, using recurrent neural network to threshold factor Perform time series recursion to capture the threshold dynamics in the evolution path, use the conditional self-distributed encoder to aggregate the threshold factor and the endogenous link representation with its neighbor representation, and model the external driving variables corresponding to the endogenous evolutionary logic path, that is, the virtual first and last external node representation , expressed as: ; In the formula, Indicates an event exogenous variables; Indicates an event The mean of the distribution of the exogenous variable; represents the value sampled from a standard normal distribution; Indicates an event The standard deviation of the distribution of the exogenous variable; and is the learnable weight matrix; For events The corresponding input vector; and is the bias term; and For events and events The representation of endogenous link causal pairs; For events The context of , i.e., the representation of neighbors; For events The threshold factor of S33. To ensure the causal robustness of the derived optimal link of the actual external cause node and effectively alleviate the threshold drift, it is necessary to trace the cause in the nodes that have a significant causal impact on the internal cause node. Using the virtual head and tail external cause node representation and the optimal internal cause link as input, on the real-time public opinion evolution path graph, the optimal link of the actual external cause node is traced for the strongly correlated subgraph composed within the five-hop range of the optimal internal cause link. During this process, the agent interacts continuously with the environment to select the optimal reasoning path combination; Preferably, the actual external nodes form a link in the order of connection in the public opinion evolution path diagram, that is, the optimal external link, to ensure that the link is sufficient to trigger the internal node to promote, so as to alleviate the threshold drift; It is proposed to integrate the optimal external cause link and the optimal internal cause link into a new representation through average pooling, and use it as a whole to predict the intention of public opinion attack. Based on counterfactual invariance, it is necessary to ensure the consistency of the predicted public opinion attack intention and the original attack intention, and then ensure the adaptability of internal and external causation by counterfactual invariance; In summary, in step S3, this embodiment integrates the optimal external cause link and the optimal internal cause link through average pooling to form a new representation, which is used as the overall extrapolation link logic representative for subsequent tracing of the key structure of existing fact dissemination. At the same time, in order to prevent the break of the causal chain and improve the robustness of the causal chain, this embodiment also combines the public opinion evolution path map to establish an effective threshold factor identification mechanism to ensure the advancement of the causal chain; S4, such as Figure 4 As shown in the figure, the nodes and edges contained in the optimal internal cause link and the optimal external cause link are combined to obtain the extrapolated causal backbone (subgraph). The subgraph transformer is used to learn the subgraph node representation, and the node information is aggregated and updated to construct the final causal super-subgraph backbone. Specifically: The overall structure of the subgraph is divided into multiple substructures, a product graph is constructed for each substructure, and the causal nodes in the product graph are marked. The subgraph transformer structure is used to learn the subgraph features, including: S41. The connection relationship between the product graphs of the subgraphs is represented by constructing an adjacency matrix, where: The adjacency matrix is also used to represent the connections between nodes within each subgraph, reflecting the structural characteristics within the subgraph. The internal subgraph connectivity is expressed as: ; ; In the formula, Representing a subgraph Nodes in ; Representing a subgraph Nodes in ; Represents the connection of nodes within the same subgraph; Indicates that the subgraph is judged by the Kronecker function and Whether it is the same subgraph; Representation Node and Adjacent in the original image; External subgraph connectivity is formulated as: ; ; In the formula, Represents connections between the same nodes in different subgraphs; Indicates that the node is judged by the Kronecker function and Whether they are the same node; Representing a subgraph and The root nodes of are adjacent in the original graph; The point-updated adjacency matrix is used in the node update process so that each node can obtain the representation of its root node. The root node can be understood as a node with an important position or starting role in the graph structure. The point-updated adjacency matrix is expressed in the formula: ; In the formula, Represents the adjacency matrix of the point update; the adjacency matrix of the point update is obtained by and The index to determine the specific element value, when and When , the matrix element at the corresponding position is 1, otherwise it is 0; The setting is to comply with the provisions on the value of adjacency matrix elements under the operation logic of point-by-point update of the graph and node receiving root representation. The node receiving root representation means that the root node is often in a special position in the graph, and other nodes may receive information or representation from the root node; when the value is 1, it means that there is a specific ( )(here The value is equivalent to the node ) to the node The connection is used to complete the point-by-point update and receive the root representation operation; S42, position encoding is performed on the nodes in the subgraph, and each node is given a coding information related to its position in the graph. After position encoding, the marked causal node is regarded as the root node, and the product graph is learned through the subgraph attention block to represent the node. The adjacency matrix is used to control the internal and external subgraph attention mechanism. The internal attention focuses on the information interaction between the nodes within the subgraph, and the external attention focuses on the information interaction between the nodes of different subgraphs. Specifically: Calculate the Query, Key, and Value transformation matrices using the sparse attention method , , , where Indicates the number of model layers, Indicated in The core of the attention mechanism is to calculate the correlation weights between nodes to determine the importance of each node to other nodes when the features are aggregated. The adjacency matrix of this embodiment records the connection relationship between nodes in the subgraph. Through the adjacency matrix, it can be clearly seen which nodes are connected and which are not. Therefore, the adjacency matrix can be used to control the calculation scope of the attention mechanism, and the attention weights are only calculated for the node pairs with connections, that is, the attention weights are only calculated for the non-zero entries in the adjacency matrix. , where is the attention weight, is the query matrix, is the key matrix, is the adjacency matrix; it enables nodes to selectively focus on nodes from the same or different subgraphs, thereby effectively fusing information between subgraphs; The graph isomorphism network GIN encoder is used to update the node representation, and finally various updates are fused to obtain the final representation of the node, which can be expressed as: ; ; In the formula, is a learnable parameter; For the Layer multilayer perceptron; For the The input features of the layer; Indicates internal attention; Indicates external attention; Indicates point update; Indicates Sub-graph attention block of the layer; S43, merging the final representations of the same node in different substructures through a concatenation operation, integrating the information provided by different substructures, and obtaining a more comprehensive node feature; S44, based on the extrapolated causal trunk edge relationship, each causal node (whose initial representation is provided by the above-mentioned independent substructure learning) aggregates the neighboring node information of the current node according to the global edge relationship of the future extrapolated structure, which is expressed as follows: ; The most prominent features in the field are focused through maximum pooling; where Representation Node The set of neighbor nodes; Representation Node The eigenvector of Representation Node Aggregate information; The representation after neighborhood aggregation is taken as a supernode, and the edges in the cause trunk connect these supernodes. The supernode representation is updated again to obtain the final cause super subgraph trunk, which integrates the information of all substructures and more comprehensively reflects the cause and structural relationship of the problem. S5, such as Figure 5 As shown in the figure, the existing public opinion fact trunk is constructed based on the existing public opinion dissemination facts. Based on the dual-graph alignment mechanism, the final cause super-subgraph trunk is aligned with the existing public opinion fact trunk, and the relevant opinion event subgraph is decoded. Specifically: S51. In order to enhance the overall understanding of the three types of heterogeneous public opinion facts, namely, the communication relationship of social network user node corpus, the evolution context of community main opinion events, and the logical link of event motivation connotation, the opinion facts are gradually aggregated and expressed as follows: ; Furthermore, the aggregated opinion fact representation includes: S511, aggregate corpus to user heterogeneous facts: take the propagation relationship of corpus released by users in social network as the backbone of connection relationship, aggregate the feature representation of each corpus to the corresponding social network user node, and update the feature representation of each user node according to the edge relationship of corpus propagation; S512, aggregate heterogeneous facts from users to events: After completing the aggregation update from corpus to user nodes, based on the updated user node representation, take the evolution context of the main opinion events of the community as the connection trunk, aggregate the feature representation of each user node to the opinion event to which it belongs, and then update the feature representation of each opinion event node according to the edge relationship of the event evolution context; S513, Aggregate motivation to event heterogeneous facts: After completing the aggregation update from user to event, continue to use the evolution context of the community's main opinion events as the connection trunk, aggregate each motivation element in the event motivation connotation logic link (such as the cause and purpose of the event) to the corresponding opinion event, and then update each opinion event node according to the edge relationship; The evolution of the aggregated opinion facts after steps S511-S513 is used as the trunk of the existing public opinion facts; S52, construct the product graph corresponding to the existing opinion fact trunk, mark the opinion event nodes in the product graph in turn and regard them as the root nodes of each product graph, use the Subgraphomer structure described in step S4 to construct an adjacency matrix to represent the connection relationship between the product graphs, and Figure 7 The SABB shown learns the representation of each event node and updates it to each node of the existing opinion fact trunk, thereby learning the internal substructure characteristics of the opinion fact trunk and strengthening the local correlation between opinions; S53, such as Figure 6 As shown in the figure, a dual-graph alignment mechanism is designed to align the nodes of the extrapolated cause super-subgraph with the updated existing public opinion fact trunk to achieve the traceability of the communication structure. Specifically: Based on the final causal super-subgraph backbone and the updated existing public opinion fact backbone, a causal-opinion dual-graph node alignment decoding algorithm is constructed. The algorithm aims to align existing opinion events and extrapolated causal super-points according to the maximum node correlation. Specifically: S531, respectively encode the dual graphs, which are the final cause super-subgraph trunk and the existing opinion fact trunk, and input them into the encoder based on Graphormer and the encoder based on graph attention network for processing and output distribution G M and G N , construct the potential matrix A to fuse the structural relevance of the two graphs, score the structural relevance of the two graphs through the fully connected layer, and decode the relevant opinion event subgraphs whose relevance reaches the preset threshold , where the optimization goals are to minimize the distribution difference between the relevant opinion event subgraph and the existing public opinion fact trunk and to maximize the correlation score between the relevant opinion event subgraph and the extrapolated cause super subgraph trunk, trace the most sufficient structure and make the correlation score the highest, which can be expressed as: ; In the formula, Represents the decoded related view event subgraph Main diagram of events with existing public opinion KL divergence of Represents the decoded related view event subgraph and extrapolated causal hypergraph 's relevance score; Furthermore, the M network is a Graphormer-based encoder for processing the structured representation of the extrapolated causal backbone graph; the input is the encoded representation of the backbone graph (the entity embedding after Graphormer encoding), multi-head attention is used to model the super-node relationship, and the query, key, and value are generated through a learnable weight matrix. The output is layer normalized and feature transformed through a feedforward network, and finally a distribution GM is generated through a fully connected layer and a sigmoid activation function, which represents the conditional probability distribution from the backbone graph to the potential matrix A; The N network is an encoder based on a graph attention network, which captures the local dependencies between nodes. The input is the encoded representation of the existing fact backbone graph. The self-attention is used to calculate the attention score of each node and its neighbor nodes, and the weighted aggregation of neighbor information is used to update the node representation. Then, the distribution GN is generated through layer normalization and a fully connected layer, which represents the conditional probability distribution from the existing opinion fact backbone graph to the potential matrix A. S6. Based on the relevant opinion event subgraph, reverse frame the sensitive user nodes corresponding to abnormal opinions in the social network, and lock the early communication structure that leads to potential public opinion attack intentions.
[0024] Preferably, Figure 2-3 The SAVE basic unit in is the node name on the customized public opinion evolution path diagram, and SAVE stands for stance-aspect-value-emotion.
[0025] Embodiment 2: This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for early tracing of public opinion attacks based on causal reasoning and dual-graph alignment as described in any embodiment of the present invention is implemented.
[0026] Embodiment 3: This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for early tracing of public opinion attacks based on causal reasoning and dual-graph alignment as described in any embodiment of the present invention is implemented.
[0027] It is worth noting that the electronic device and computer-readable storage medium described in the present invention are based on the same inventive concept as the method described in Example 1 of the present invention, and will not be described in detail here.
[0028] In the embodiments of the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c may be single or multiple.
[0029] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0030] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0031] In several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk and other media that can store program codes.
[0032] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An early source tracing method for public opinion attacks based on causal reasoning and dual-graph alignment, characterized in that: The method comprises: Based on the existing public opinion viewpoints, a public opinion evolution path map is constructed, and based on the public opinion evolution path map, a low-confounding bias endogenous logic abduction model is constructed. The low-confounding bias endogenous logic abduction model is based on the structured causal model (SCM), and uses context switching and reinforcement learning algorithms to select the optimal endogenous cause link; A low-threshold drift exogenous-driven logic abduction model is established based on the optimal internal cause link, wherein the low-threshold drift exogenous-driven logic abduction model finds the optimal external cause link through a threshold factor identification mechanism and a reinforcement learning algorithm; The nodes and edges contained in the optimal internal cause link and the optimal external cause link are combined to obtain a subgraph, and the subgraph transformer Subgraphormer is used to learn the subgraph node representation, and the node information is aggregated and updated to construct the final causal super subgraph backbone; Based on the existing public opinion dissemination facts, the existing public opinion fact trunk is constructed. Based on the dual-graph alignment mechanism, the final cause super-subgraph trunk is node-aligned with the existing public opinion fact trunk, and the relevant opinion event subgraph is decoded. Based on the relevant opinion event subgraph, the sensitive user nodes corresponding to abnormal opinions in the social network are reversely framed, and the early propagation structure that leads to potential public opinion attack intentions is locked.
2. According to claim 1, a method for tracing the source of public opinion attacks based on causal reasoning and dual-graph alignment is characterized in that: The low confounding bias endogenous logic abduction model is based on the structured causal model SCM, and uses context switching and reinforcement learning algorithms to select the optimal internal cause link, specifically: The node features and graph structure information of the public opinion evolution path graph are aggregated through a graph convolutional network to generate structural variables that explicitly represent causal relationships, wherein the structural variables correspond to exogenous variables in the structured causal model (SCM) and are used to model the causal dependency relationship between nodes; The future extrapolated links of the real-time public opinion evolution path are encoded into node embedding vectors through a graph convolutional network, mapped to a pre-built priori event causal library, and similar causal patterns are searched using cosine similarity. The optimal internal cause link is obtained based on the causal pattern with the highest similarity. The method also includes supplementing the optimal internal cause link with logical edges, specifically, if there is no edge between nodes in the optimal internal cause link, adding causal edges according to the global event graph; using the conditional self-distributed Markov network to iteratively calculate the probability of events in the optimal internal cause link after adding causal edges, generating hidden variables, and obtaining the preset public opinion attack intention based on the counterfactual constraints and the hidden variables; The generalized causal edges in the global event graph are mapped to the real-time public opinion evolution path graph, the missing edges are supplemented, and the node representation is adjusted according to the supplemented edges to obtain the updated real-time public opinion evolution path graph.
3. According to claim 2, a method for tracing the source of public opinion attacks based on causal reasoning and dual-graph alignment is characterized in that: Mapping to the pre-built prior event causal library is specifically to find subgraph isomorphism in the causal graph structure of the structured causal model SCM, and select the path that meets the constraints of the structured causal model SCM through the Markov decision process of reinforcement learning, where: The Markov decision process is formulated as a four-tuple ,state Represents the set of states when the agent chooses a path at different points in time; action De novo entity To the end entity possible paths; transition probabilities Represents the probability of the agent choosing the next path in path reasoning; reward Includes basic rewards and path rewards , expressed as: ; In the formula, and They are the learnable weight coefficient of basic reward and the learnable weight coefficient of path reward respectively; is the time step The state of being below; is the time step Next action.
4. According to claim 3, a method for tracing the source of public opinion attacks based on causal reasoning and dual-graph alignment is characterized in that: The conditional self-distributed Markov network is used to iteratively calculate the probability of events occurring within the optimal internal cause link after adding causal edges, and generate hidden variables, which are expressed as follows; ; In the formula, is a hidden variable; express a step of reasoning; express a chain of inference steps; express a chain of inference steps; is the transformation weight matrix; is the activation function; For the The event representation of the reasoning step; For the The event representation of the reasoning step; express The condition that a chain of inference steps has already occurred The probability of a chain of inference steps occurring.
5. According to claim 4, a method for tracing the source of public opinion attacks based on causal reasoning and dual-graph alignment is characterized in that: A low-threshold drift exogenous-driven logic abduction model is established based on the optimal internal cause link. The low-threshold drift exogenous-driven logic abduction model finds the optimal external cause link through the threshold factor identification mechanism and the reinforcement learning algorithm. Specifically: For the endogenous evolutionary logic path in the real-time public opinion evolution path graph that has been mapped back to the optimal endogenous cause link, Transformer is used to aggregate the causal relationship information of the endogenous evolutionary logic path, and the token representation of the event is aggregated to obtain the event-level representation; the graph neural network is used to merge the structural information of the public opinion evolution path graph, and the threshold factor that affects the threshold effect between endogenous variables is integrated, which is expressed as follows: ; ; ; In the formula, Indicates transformer layers; Indicates an event No. transformer layers; Indicates an event No. Tokens; Indicates an event No. Tokens; For events The query matrix of the attention operation; For events Event-level representation of ; For events No. A graph attention layer, For events and events The threshold factor of is the threshold factor weight matrix; To perform the transpose operation; It is a multi-head attention mechanism; The conditional self-distributed encoder aggregates the threshold factor and the endogenous link representation and its neighbor representation to model the exogenous driving variables corresponding to the endogenous evolutionary logic path, that is, the virtual first and last exogenous node representation. , expressed as: ; In the formula, Indicates an event exogenous variables; Indicates an event The mean of the distribution of the exogenous variable; represents the value sampled from a standard normal distribution; Indicates an event The standard deviation of the distribution of the exogenous variable; and is the learnable weight matrix; For events The corresponding input vector; and is the bias term; and For events and events The representation of endogenous link causal pairs; For events context; For events The threshold factor of Taking the virtual first and last external cause node representations and the optimal internal cause link as input, on the real-time public opinion evolution path graph, the optimal link tracing of the actual external cause node is carried out for the strongly associated subgraph composed of the optimal internal cause link within the range of five hops. During this process, the agent continuously interacts with the environment to select the optimal reasoning path combination. The actual external nodes are connected in the order of the public opinion evolution path diagram to form a link and obtain the optimal external link.
6. According to claim 5, a method for tracing the source of public opinion attacks based on causal reasoning and dual-graph alignment is characterized in that: The nodes and edges contained in the optimal internal cause link and the optimal external cause link are combined to obtain a subgraph. The subgraph transformer is used to learn the subgraph node representation, and the node information is aggregated and updated to construct the final causal super subgraph backbone. Specifically: The overall structure of the subgraph is divided into multiple substructures, a product graph is constructed for each substructure, and the causal nodes in the product graph are marked. The subgraph transformer structure is used to learn the subgraph features, including: Construct an adjacency matrix to represent the connectivity between the product graphs of the subgraphs, including the internal subgraph connectivity, the external subgraph connectivity, and the adjacency matrix of the point update, where: The internal subgraph connectivity is formulated as: ; ; In the formula, Representing a subgraph Nodes in ; Representing a subgraph Nodes in ; Represents the connection of nodes within the same subgraph; Indicates that the subgraph is judged by the Kronecker function and Whether it is the same subgraph; Representation Node and Adjacent in the original image; External subgraph connectivity is formulated as: ; ; In the formula, Represents connections between the same nodes in different subgraphs; Indicates that the node is judged by the Kronecker function and Whether they are the same node; Representing a subgraph and The root nodes of are adjacent in the original graph; The adjacency matrix of the point update is expressed as: ; In the formula, Represents the updated adjacency matrix of the point; the updated adjacency matrix of the point is obtained by and The index to determine the specific element value, when and When , the matrix element at the corresponding position is 1, otherwise it is 0; Encode the positions of nodes in the subgraph, treat the marked cause node as the root node, and learn node representations of the product graph through the subgraph attention block. Use the adjacency matrix to control the internal and external subgraph attention mechanism, where only the non-zero entries of the adjacency matrix are weighted; The attention results are fused through the graph isomorphic network to obtain the final representation of the node; The final representations of the same nodes in different substructures are merged through splicing operations; based on the subgraph relationship, each causal node aggregates the neighborhood node information of the current node according to the global edge relationship of the future extrapolated structure, and the node representation after neighborhood aggregation is used as a supernode. The edges in the subgraph connect these supernodes, and the supernode representation is updated again to obtain the final causal super-subgraph backbone.
7. According to claim 6, a method for tracing the source of public opinion attacks based on causal reasoning and dual-graph alignment is characterized in that: Based on the existing public opinion dissemination facts, the existing public opinion opinion fact backbone is constructed. Specifically, the opinion fact representation of the existing public opinion dissemination facts is gradually aggregated, including aggregating corpus to user heterogeneous facts, aggregating user to event heterogeneous facts, and aggregating motivation to event heterogeneous facts, among which: The aggregating corpus to user heterogeneous facts specifically includes taking the propagation relationship of corpus released by users in the social network as the backbone of the connection relationship, aggregating the feature representation of each corpus to the corresponding social network user node, and updating the feature representation of each user node according to the edge relationship of corpus propagation; The aggregating user-to-event heterogeneous facts specifically includes, after completing the aggregation update of the corpus to the user node, based on the updated user node representation, taking the evolution context of the main opinion events of the community as the connection trunk, aggregating the feature representation of each user node to the opinion event to which it belongs, and then updating the feature representation of each opinion event node according to the edge relationship of the event evolution context; Specifically, the said aggregating motivation to event heterogeneous facts is that after completing the aggregation update from user to event, the main viewpoint event evolution context of the community is continued as the connection trunk, and each motivation element in the event motivation connotation logic link is aggregated to the viewpoint event to which it belongs, and each viewpoint event node is updated once according to the edge relationship; The evolutionary context of aggregated opinion facts is taken as the backbone of existing public opinion facts.
8. According to claim 7, a method for tracing the source of public opinion attacks based on causal reasoning and dual-graph alignment is characterized in that: Based on the dual-graph alignment mechanism, the final cause super-subgraph trunk is aligned with the existing opinion fact trunk, and the relevant opinion event subgraph is decoded, specifically: Encode the dual graphs separately, the dual graphs are the final cause super sub-graph backbone and the existing opinion fact backbone, and input them into the Graphormer-based encoder and the graph attention network-based encoder for processing and output distribution GM and GN respectively, construct the potential matrix A to fuse the structural correlation of the dual graphs, score the structural correlation of the dual graphs through the fully connected layer, and decode the relevant opinion event sub-graphs whose correlation reaches the preset threshold , where the optimization objectives are to minimize the distribution difference between the relevant opinion event subgraph and the existing opinion fact trunk and to maximize the correlation score between the relevant opinion event subgraph and the extrapolated cause super subgraph trunk, which can be expressed as: ; In the formula, Represents the decoded related view event subgraph Main diagram of events with existing public opinion KL divergence of Represents the decoded related view event subgraph and extrapolated causal hypergraph The relevance score.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for early tracing of public opinion attacks based on causal reasoning and dual-graph alignment as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Public opinion evolution prediction method based on graph reasoning model
CN116303886A
Network public opinion anomaly identification and processing method
CN116795985A
Propagation-oriented key element dynamic tracing method
CN117057342A
Online public opinion propagation and offline event association semantic generation method and system
CN118536510A
APT attack threat judgment method based on traceability graph matching and storage medium
CN119853961A
Cited By
Time sequence marine ecological environment early warning monitoring data abnormal point detection method
CN120196879A
APT attack path traceability method and device based on traceability graph
CN121309047A