An Early Tracing Method for Public Opinion Attacks Based on Causal Reasoning and Bipartite Graph Alignment

Through the methods of causal reasoning and double-graph alignment, a low-confound bias and low-threshold drift external logical traceability model was constructed, combined with reinforcement learning and Transformer to identify key threshold factors, construct the cause super sub-graph backbone and perform node alignment, solving the problem of insufficient causal modeling in the tracing of public opinion dissemination, and realizing accurate communication structure traceability and stable traceability logic.

CN120031144BActive Publication Date: 2025-07-18XIAMEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510513246.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-18
Estimated Expiration
2045-04-23

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively model causal relationships in the dissemination and traceability of public opinion, resulting in node interactions being easily disturbed by false correlations, predicted results being susceptible to confounding factors, and the cross-graph semantic alignment mechanism is insufficient, resulting in bias in traceability results.

Method used

Using a method based on causal inference and double graph alignment, a low-confound bias endogenous logical tracing model and a low-threshold drift exogenous logical tracing model are constructed. Through reinforcement learning and Transformer, key threshold factors are identified, combined with sub-graph transformers and graph convolution networks, the cause super sub-graph backbone is constructed and node alignment is performed to decode the abnormal sub-graph.

Benefits of technology

Significantly reduce false causal correlations caused by confounding variables, improve the essential interpretation ability of traceability, realize accurate communication structure traceability, enhance the collaborative reasoning ability of cross-platform and cross-modal information, and ensure the robustness and continuity of the causal chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120031144B_ABST
    Figure CN120031144B_ABST
Patent Text Reader

Abstract

The present invention proposes an early tracing method for public opinion attacks based on causal reasoning and bi-graph alignment, which extracts event causal relationships from historical public opinion data to construct a hierarchically causal library with dynamic updates; based on the historical public opinion evolution path, uses graph convolutional networks to extract real-time propagation features, combines reinforcement learning and Bayesian abduction to generate internal cause links with low confounding bias, and identifies external cause nodes driving the links by means of a Transformer to identify threshold factors; finally, fuses internal and external cause nodes to construct a causal hypergraph, aligns nodes with the backbone of public opinion facts that aggregates social propagation, event evolution, and motivation logic, decodes abnormal subgraphs, and reversely locks sensitive users and communication structures, thereby improving the accuracy and timeliness of tracing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an early traceability method for public opinion attacks based on causal reasoning and dual-graph alignment, belonging to the technical fields 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 multi-modal data interaction, complex social relationship network diffusion, and dynamic semantic evolution. How to trace the dissemination 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 the publication number CN116303886A discloses a public opinion evolution prediction method based on a graph reasoning model, which is applied to the environment of public opinion generation and development. By collecting and integrating information points existing in the process of public opinion development, it predicts the future development trend of public opinion so as to be able to respond to emergencies in a timely manner and take corresponding measures; in a given social scenario graph and the conversations of interested people in the scenario graph, the GRM extracts features from the conversations of people 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 scenario and extracts its public opinion dissemination features to initialize the corresponding object nodes; then, the GRM uses GGNN to spread node information in the graph, fully mines the interaction between people and context objects, and adopts a graph attention mechanism to adaptively select the node with the largest amount of information by measuring the dissemination degree of public opinion for easy identification. This patent analyzes the public opinion dissemination trend by constructing a graph structure of social relationships and semantic objects and using node feature aggregation and gating mechanisms, but faces significant challenges in complex scenarios: this patent relies on the information dissemination mechanism of the graph structure and lacks the modeling of the deep causal relationship of public opinion evolution, resulting in that node interaction is vulnerable to false correlation interference and it is difficult to accurately trace the attack intention; at the same time, latent variables (such as unobserved motives) and external triggering factors are not explicitly modeled, and the prediction results are vulnerable to the influence of confounding factors, especially the causal chain robustness is insufficient in the threshold drift scenario. In addition, the utilization of context information in the "future" extrapolation link of this patent has limitations, and it is difficult to supplement the logical link with prior causal knowledge under sparse data, which is prone to misjudgment of causal relationships; while the propagation path mapping under a single graph structure lacks a cross-graph semantic alignment mechanism, resulting in a large deviation between the traceability result and the real propagation path.

[0004] Therefore, there is an urgent need for an early traceability method for public opinion attacks that optimizes causal link reasoning and improves the accuracy of structure alignment. Summary of the Invention

[0005] In order to solve the problems existing in the above-mentioned prior art, the present invention proposes an early traceability method for public opinion attacks based on causal reasoning and dual-graph alignment.

[0006] The technical solution of the present invention is as follows:

[0007] On the one hand, the present invention provides an early tracing method for public opinion attacks based on causal reasoning and bi-graph alignment. The method includes:

[0008] Construct an opinion evolution path graph based on existing public opinion views, and construct a low-confounding bias endogeneity logical abduction model based on the opinion evolution path graph. The low-confounding bias endogeneity logical abduction model is based on the structural causal model SCM, and uses context switching and reinforcement learning algorithms to select the optimal internal cause link;

[0009] Establish a low-threshold drift exogenous logical abduction model based on the optimal internal cause link. The low-threshold drift exogenous logical abduction model uses a threshold factor identification mechanism and a reinforcement learning algorithm to find the optimal external cause link;

[0010] Combine the nodes and edges contained in the optimal internal cause link and the optimal external cause link to obtain a subgraph, use the Subgraphormer to learn the subgraph node representation, and aggregate and update the node information to construct the backbone of the final cause hyper-subgraph;

[0011] Construct the backbone of the existing public opinion view facts based on the existing public opinion dissemination facts, align the nodes of the backbone of the final cause hyper-subgraph and the backbone of the existing public opinion view facts based on the bi-graph alignment mechanism, and decode the relevant opinion event subgraph;

[0012] Based on the relevant opinion event subgraph, reverse-frame the sensitive user nodes corresponding to the abnormal opinions in the social network, and lock the early dissemination structure that leads to the occurrence of potential public opinion attack intentions.

[0013] Preferably, the low-confounding bias endogeneity logical abduction model is based on the structural causal model SCM, and uses context switching and reinforcement learning algorithms to select the optimal internal cause link. Specifically:

[0014] Aggregate the node features and graph structure information of the opinion evolution path graph through a graph convolutional network to generate a structural variable that explicitly represents causal relationships. Among them, the structural variable corresponds to the exogenous variable in the structural causal model SCM and is used to model the causal dependence relationship between nodes;

[0015] Encode the future extrapolation link of the real-time opinion evolution path into a node embedding vector through a graph convolutional network, map it to a pre-constructed prior event causal library, use cosine similarity to search for similar causal patterns, and obtain the optimal internal cause link based on the causal pattern with the highest similarity;

[0016] The method further includes supplementing logical edges for the optimal internal cause link. Specifically, if there is no edge between nodes in the optimal internal cause link, causal edges are added according to the global event graph; the conditional self-distribution Markov network is used to iteratively calculate the occurrence probability of events in the optimal internal cause link after adding causal edges, generate latent variables, and obtain the preset public opinion attack intention based on counterfactual constraints and latent variables.

[0017] Map the generalized causal edges in the global event graph to the real-time public opinion evolution path graph, supplement the missing edges, and adjust the node representation according to the supplemented edges to obtain the updated real-time public opinion evolution path graph.

[0018] Preferably, mapping to the pre-constructed prior event causality library specifically means finding subgraph isomorphism in the causal graph structure of the structural causal model SCM, and selecting a path that conforms to the constraints of the structural causal model SCM through the Markov decision process of reinforcement learning, where:

[0019] The Markov decision process is represented by a quadruple in formula , state represents the set of states of the agent when choosing a path at different time points; action represents the possible path from the head entity to the tail entity ; the transition probability represents the probability of the agent choosing the next path in path inference; the reward includes the basic reward and the path reward , and is expressed by the formula:

[0020] ;

[0021] In the formula, and are the learnable weight coefficients of the basic reward and the path reward respectively; is the state at time step ; is the action at time step .

[0022] Preferably, the conditional self-distribution Markov network is used to iteratively calculate the occurrence probability of events in the optimal internal cause link after adding causal edges, generate latent variables, and is expressed by the formula:

[0023] ;

[0024] In the formula, is the latent variable; represents inference steps; represents a chain of inference steps. denote a chain of is the transformation weight matrix; is the activation function; is the event representation of the is the event representation of the denote the probability of occurrence of a chain of in the condition that a chain of

[0025] Preferably, a low-threshold drift external drive logical abduction model is established based on the optimal internal cause link, and the low-threshold drift external drive logical abduction model finds the optimal external cause link through a threshold factor identification mechanism and a reinforcement learning algorithm. Specifically:

[0026] For the endogenous evolution logic path in the real-time public opinion evolution path map mapped back to the optimal internal cause link, use Transformer to aggregate the causal relationship information of the endogenous evolution logic path, and aggregate the token representation token of the event to obtain the event-level representation; use a graph neural network to merge the structure information of the public opinion evolution path map, and integrate to obtain the threshold factor affecting the occurrence of the threshold effect between endogenous variables, which is expressed by the formula:

[0027] ;

[0028] ;

[0029] ;

[0030] In the formula, represents the th Transformer layer; represents the event the th Transformer layer; represents the event the th token; represents the event the th token; is the query matrix of the attention operation for the event ; is the event-level representation of the event ; is the event the th graph attention layer, is the event and the event Threshold factor; is the threshold factor weight matrix; is for the transpose operation; is the multi-head attention mechanism;

[0031] The conditional self-distribution encoder is used to aggregate the threshold factor and the representation of the endogenous link with the representations of its neighbors, and model to obtain the external driving variables corresponding to the endogenous evolution logic path, that is, the virtual head and tail external cause node representations , which is expressed by the formula:

[0032] ;

[0033] In the formula, represents the exogenous variable of event ; represents the mean of the exogenous variable distribution of event ; represents the value sampled from the standard normal distribution; represents the standard deviation of the exogenous variable distribution of event ; and are learnable weight matrices; is the input vector corresponding to event ; and are bias terms; and are the representations of the endogenous link causal pairs of event and event ; is the context of event ; is the threshold factor of event ;

[0034] Taking the virtual head and tail external cause node representations and the optimal internal cause link as inputs, on the real-time public opinion evolution path graph, conduct the optimal link abduction of the actual external cause nodes for the strongly connected subgraph formed within five hops of the optimal internal cause link. During this process, the agent and the environment continuously interact to select the optimal inference path combination;

[0035] The actual external cause nodes form a link according to the connection order of the public opinion evolution path graph to obtain the optimal external cause link.

[0036] Preferably, combine the nodes and edges contained in the optimal internal cause link and the optimal external cause link to obtain a subgraph, use the subgraph transformer to learn the subgraph node representations, and aggregate and update the node information to construct the backbone of the final cause supergraph, specifically:

[0037] Divide the overall structure of the subgraph into multiple substructures, construct a product graph for each substructure, and mark the cause nodes in the product graph. Then, use a subgraph transformer to learn the subgraph features, including:

[0038] Construct an adjacency matrix to represent the connection relationships between the product graphs of the subgraphs, including internal subgraph connectivity, external subgraph connectivity, and the adjacency matrix for point update, where:

[0039] The internal subgraph connectivity is expressed by the formula:

[0040] ;

[0041] ;

[0042] In the formula, represents the node in the subgraph ; represents the node in the subgraph ; represents the connection between nodes within the same subgraph; represents judging whether the subgraphs and are the same subgraph through the Kronecker function; represents that the node is adjacent to in the original graph;

[0043] The external subgraph connectivity is expressed by the formula:

[0044] ;

[0045] ;

[0046] In the formula, represents the connection between the same nodes in different subgraphs; represents judging whether the nodes and are the same nodes through the Kronecker function; represents that the root nodes of the subgraphs and are adjacent in the original graph;

[0047] The adjacency matrix for point update is expressed by the formula:

[0048] ;

[0049] In the formula, represents the adjacency matrix for point update; the specific element values of the adjacency matrix for point update are determined by the indices of and When And When, the matrix element at the corresponding position is 1, and in other cases it is 0;

[0050] Perform position encoding on the nodes in the subgraph, regard the marked causal nodes as root nodes, use the subgraph attention block in the product graph to learn node representations, and use the adjacency matrix to control the internal and external subgraph attention mechanisms, where weights are only calculated for non-zero entries in the adjacency matrix;

[0051] Fuse the attention results through the graph isomorphism network to obtain the final representation of the nodes;

[0052] Merge the final representations of the same nodes in different substructures through a concatenation operation; based on the subgraph relationship, each causal node aggregates the neighborhood node information of the current node according to the global edge connection relationship of the future extrapolation structure, and uses the node representation after neighborhood aggregation as a supernode. The edges in the subgraph connect these supernodes, and update the supernode representation again to obtain the final causal super-subgraph backbone.

[0053] Preferably, construct the existing public opinion view fact backbone based on the existing public opinion dissemination facts, specifically by gradually aggregating the view fact representations of the existing public opinion dissemination facts, including aggregating corpora to user heterogeneous facts, aggregating users to event heterogeneous facts, and aggregating motives to event heterogeneous facts, where:

[0054] The specific process of aggregating corpora to user heterogeneous facts is to use the dissemination relationship of the corpora published by users in the social network as the backbone of the connection relationship, aggregate the feature representations of each corpus to the corresponding social network user nodes, and update the feature representations of each user node according to the edge connection relationship of the corpus dissemination;

[0055] The specific process of aggregating users to event heterogeneous facts is to, after completing the aggregation and update from corpora to user nodes, based on the updated user node representations, use the evolution context of the main view events in the community as the backbone of the connection, aggregate the feature representations of each user node to the view events to which it belongs, and then update the feature representations of each view event node according to the edge connection relationship of the event evolution context;

[0056] The specific process of aggregating motives to event heterogeneous facts is to, after completing the aggregation and update from users to events, continue to use the evolution context of the main view events in the community as the connection backbone, aggregate each motive element in the connotative logic link of the event motive to the view events to which it belongs, and each view event node is updated once again according to the edge connection relationship;

[0057] Use the evolution context of the aggregated view facts as the existing public opinion view fact backbone.

[0058] Preferably, based on the dual-graph alignment mechanism, the backbone of the final cause hyper-subgraph is node-aligned with the backbone of the existing public opinion view facts, and the relevant view event subgraphs are decoded, specifically as follows:

[0059] Encode the two graphs respectively, where the two graphs are the backbone of the final cause hyper-subgraph and the backbone of the existing public opinion view facts, and input them into the encoder based on Graphormer and the encoder based on the graph attention network for processing to output distributions G M and G N , construct a potential matrix A to fuse the structural relevance of the two graphs, score the structural relevance of the two graphs through a fully connected layer, and decode the relevant view event subgraphs whose relevance reaches the preset threshold , where minimizing the distribution difference between the relevant view event subgraph and the backbone of the existing public opinion view facts and maximizing the relevance score between the relevant view event subgraph and the backbone of the extrapolated cause hyper-subgraph are used as the optimization objectives, and are expressed by the formula:

[0060] ;

[0061] In the formula, represents the decoded relevant view event subgraph and the backbone graph of the existing public opinion view events of the KL divergence; represents the decoded relevant view event subgraph and the extrapolated cause hyper-subgraph of the relevance score.

[0062] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, it implements an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment as described in the present invention.

[0063] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment as described in the present invention.

[0064] The present invention has the following beneficial effects:

[0065] 1. The present invention is an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment. By explicitly modeling the causal mechanism with latent variables and structural variables, combined with counterfactual invariance constraints, it separates endogenous causality from confounding interference, significantly reduces the false causal associations caused by confounding variables, improves the essential explanatory ability of attack intention tracing, and avoids misjudgments caused by data noise or external interference;

[0066] 2. The present invention is an early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment. It aligns the cause hyper-subgraph generated by extrapolation with the backbone graph of public opinion facts aggregating multi-source data, maximizes the structural relevance using a cross-graph attention mechanism, effectively integrates prior knowledge (extrapolated causes) and real-time data (dissemination facts), enhances the collaborative reasoning ability for cross-platform and cross-modal information in a complex public opinion ecosystem, and realizes accurate tracing of the dissemination structure.

[0067] 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 cause nodes for internal causal links, improves the adaptability of the causal chain 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

[0068] Figure 1 is the flowchart of the method of the present invention;

[0069] Figure 2 is the low-confounding bias endogenous logic abductive structure diagram of an embodiment of the present invention;

[0070] Figure 3 is the low-threshold drift exogenous logic abductive structure diagram of an embodiment of the present invention;

[0071] Figure 4 is the backbone aggregation network diagram of the extrapolated cause hyper-subgraph of an embodiment of the present invention;

[0072] Figure 5 is the existing view fact backbone learning network diagram of an embodiment of the present invention;

[0073] Figure 6 is the extrapolated cause-view dual-graph correlation alignment decoding architecture diagram of an embodiment of the present invention;

[0074] Figure 7 is the schematic diagram of the SABB module of an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0075] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0076] It should be understood that the step numbers used in the text are only for convenient description and do not limit the execution order of the steps.

[0077] It should be understood that the terms used in the specification of the present invention are merely for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0078] The terms "comprising" and "including" indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.

[0079] The term "and / or" refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0080] Embodiment 1:

[0081] See Figure 1 , this embodiment provides an early traceability method for public opinion attacks based on causal reasoning and bi - graph alignment. Through the causal reasoning and bi - graph alignment mechanism, it realizes the identification of potential public opinion attack intentions and the efficient traceability of the dissemination structure. The method includes:

[0082] S1. Construct a prior event - causality library. Specifically, in this embodiment:

[0083] The core of constructing the prior event - causality library lies in systematically extracting and organizing causal knowledge from large - scale corpora. In this embodiment, the CausalBank Corpus is used as the original data source. The English causal event pairs in the CausalBank Corpus contain 314 million common - sense causal event pairs, providing a causal common - sense basis 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). In this embodiment, the causal event pairs in the CausalBank Corpus are obtained and subjected to cleaning and deduplication operations;

[0084] Based on the processed causal event pairs above, construct a Casual Event Graph (CEG). CEG is a directed acyclic graph (DAG), formalized as , where the node set represents events, and the edge set represents the causal relationship between events. Each node corresponds to an event, and each edge represents the th event and the 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;

[0085] 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:

[0086] S21. Construct a public opinion evolution path map based on existing public opinion viewpoints as a basis for subsequent tracing. Specifically, in this embodiment:

[0087] 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;

[0088] 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;

[0089] 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:

[0090] 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;

[0091] 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.

[0092] 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;

[0093] Gradually reflect on the overall structure of the extrapolation of the "existing + future" public opinion dissemination logic, including checking for loopholes, unreasonable assumptions, or omitted factors in the entire analysis process; through reflection, trace the causes and links of the formation of future public opinion dissemination paths, understand what factors have led to the predicted future situation, and how these factors interact with each other;

[0094] Complete the construction of the public opinion evolution path map through the above steps;

[0095] S22. As Figure 2 shown, based on the public opinion evolution path map, construct a low-confounding bias endogenous logic abduction model. The low-confounding bias endogenous logic abduction model is based on the structural causal model SCM, and uses context switching and reinforcement learning algorithms to select the optimal internal cause link. Specifically:

[0096] S221. For the public opinion evolution path map (associated with the public opinion attack intention ), aggregate its node features and graph structure information to generate a structural variable , which is equivalent to defining the causal relationship between observed variables and latent variables (such as confounding factors) in the SCM. Node features (such as event type, dissemination subject) correspond to the observed variables in the SCM; graph structure information (such as dissemination path, temporal relationship) corresponds to the causal dependence relationship (edges) in the SCM; the structural variable explicitly models confounding factors (such as unobserved dissemination motivation), similar to separating direct effects and indirect effects through structural equations in the SCM, clarifying the causal relationship between events, and alleviating the spurious correlation between endogenous variables;

[0097] The structural variable will be used to control the identification of the internal cause link and predict the public opinion attack intention of the prediction and ; establish a causal connection from the internal cause link to the predicted public opinion attack intention by optimizing the joint likelihood ; on this basis, in order to reduce the influence of the distribution deviation between the found during training and the real , the SCM of this embodiment introduces a front-door path , where the latent variable is defined as a robust explanatory feature. To enhance robustness, assume follows a Gaussian distribution, denoted as , where, represents the Gaussian distribution; is the mean vector of the multivariate Gaussian distribution; is a diagonal matrix, is the variance; generate the predicted public opinion attack intention from the latent variable based on counterfactual invariance and compare it with the public opinion attack intention to approach and , to ensure the correctness of the path sought, clarify the essence of the link cause, thereby reducing the influence of confounding variables and enhancing the causal consistency between the internal cause link and the attack intention;

[0098] Preferably, this embodiment also dynamically expands the prior event causal library through the structure variable ;

[0099] S222. To overcome the limited context information of the future extrapolation link (real-time public opinion evolution path diagram ), first map the future extrapolation link to the prior event causal library, trace back the internal cause nodes in the context of the prior event causal library, and combine these internal cause nodes into a chain in the optimal order to obtain the optimal internal cause link. Specifically:

[0100] This embodiment uses a graph convolutional network (GCN) to combine the node features and structural information of the extrapolation part of the public opinion evolution path diagram 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. Among them, the influence factor is expressed by the formula:

[0101] ;

[0102] In the formula, represents the degree of influence of neighbor nodes that are hops away from the current node on the current node; is the initial influence, with a default value of 1; is a hyperparameter between 0 and 1, which will cause the influence of neighbor nodes to decay exponentially as the number of hops increases; 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 neighbor nodes and the central node;

[0103] ;

[0104] In the formula, is the original vector after node feature transformation, is the linear transformation matrix, are the head entity, relationship, tail entity, and timestamp respectively;

[0105] Use the non-linear function LeakyRelu to process , and it is expressed by the formula:

[0106] ;

[0107] In the formula, is after being processed by the non - linear function LeakyRelu ;

[0108] Updating the node representation by combining node features and structural information is expressed by the formula:

[0109] ;

[0110] ;

[0111] In the formula, is the representation of the updated node ; is the activation function; is the set of all neighbor nodes of node ; is the set of edges connecting node ; is the relative attention;

[0112] Map in the prior event causality library to enrich the causal information between events, and finally establish a proxy causal path search based on cosine similarity, and obtain the optimal internal cause link based on the causal pattern with the highest similarity;

[0113] In order to accurately mine the endogenous evolution logic path, this embodiment adopts a combined strategy of reinforcement learning and attention mechanism. Specifically:

[0114] The reinforcement learning part is defined as a Markov decision process, which is expressed by the quadruple , where the state represents the set of states when the agent selects paths at different time points (specifically selects a certain entity point); the action represents the possible path from the head entity to the tail entity ; the transition probability represents the probability that the agent selects the next path in path reasoning; the reward includes the basic reward and the path reward , the basic reward is based on whether the agent successfully reaches the target entity, and the path reward takes into account the length and diversity of the path, which is expressed by the formula:

[0115] ;

[0116] In the formula, and They are the basic reward learnable weight coefficient and the path reward learnable weight coefficient respectively; is the time step of the state; is the time step of the action;

[0117] On this basis, for the triple composed of the input head entity, event relationship and time stamp and the attention matrix of the network at the time step and the representation of the triple by the LSTM, the agent (causal link inference) updates the parameters by continuously interacting with the environment (real-time public opinion evolution path graph, prior event causal library and path exploration state space), and selects the most explanatory optimal inference path combination, that is, the optimal internal cause link after context enrichment, which is expressed by the formula:

[0118] ;

[0119] In the formula, represents the probability of taking the action in the state ; represents the preset parameter matrix; represents the weighted activation function;

[0120] Among them:

[0121] ;

[0122] ;

[0123] In the formula, represents the initial hidden vector; LSTM represents the long short-term memory network; is the weight matrix related to the starting state, and 0 represents the value of the initial hidden vector; is the hidden vector at the 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;

[0124] S223. Using the optimal logical edge connection relationship on the global event graph (a hypergraph structure constructed based on the prior event causality library, where nodes represent historical event entities (such as public opinion events, participating entities), and edges represent generalized causal logics across scenarios and domains (not simple time series relationships)) as a guide, map the optimal internal cause link enriched by context back to the real-time public opinion evolution path graph. If there is no edge connection between nodes, supplement the logical edge, update the internal cause link representation in the local context, and extract latent variables from the updated internal cause link , specifically, in this embodiment, a conditional self-distribution Markov network is used to learn the causal pointing relationship within the link, and based on the event representation iteratively calculate the probability of the event occurring , and extract latent variables , which is expressed by the formula;

[0125] ;

[0126] In the formula, is the latent variable; represents inference steps; represents the chain of inference steps; represents the chain of inference steps; is the transformation weight matrix; is the activation function; is the event representation at the th inference step; is the event representation at the th inference step; represents the probability of the chain of the th inference step occurring under the condition that the chain of the

[0127] th inference step has occurred; Predict the public opinion attack intention by the latent variable : Due to the counterfactual invariance of "latent variable → public opinion attack intention", that is, no matter how other conditions change, the causal relationship between the latent variable and the public opinion attack intention remains unchanged. Traction the latent variable to predict the public opinion attack intention and get closer to the original attack intention, and guide the latent variable

[0128] As can be seen from the comprehensive step S22, the low-confounding bias endogenous logic abduction model in this embodiment (where the confounding bias refers to other factors interfering with the judgment of causal relationships, and the endogeneity refers to the inaccurate conclusions caused by the mutual influence between internal variables of the model) generates structural variables by aggregating the nodes and graph structure information of the evolutionary path diagram. The structural variables are used to control the identification of internal cause links and the prediction of attack intentions, providing prior knowledge for dynamic reasoning; by mapping the future extrapolation link to the prior event causal library dynamically expanded based on the structural variables to supplement context knowledge, and using the reinforcement learning algorithm to select the optimal internal cause link, extracting latent variables from the optimal internal cause link, and predicting the public opinion attack intention based on the latent variables using counterfactual invariance, the low-confounding bias endogenous logic abduction is realized;

[0129] S3. As Figure 3 shown, a low-threshold drift exogenous logic abduction model is established based on the optimal internal cause link. The low-threshold drift exogenous logic abduction model finds the optimal external cause link through a threshold factor identification mechanism and a reinforcement learning algorithm, where:

[0130] S31. For the endogenous evolutionary logic path in the real-time public opinion evolutionary path diagram that has been mapped back to the optimal internal cause link, use Transformer to aggregate the causal relationship information of the endogenous evolutionary logic path. Each event can be composed of many token representations. Aggregate the token representations of the events to obtain an event-level representation; then use a graph neural network (GNN) to merge the structure information of the public opinion evolutionary path diagram, and finally integrate the threshold factors that affect the occurrence of the threshold effect between endogenous variables, which is expressed by the formula:

[0131] ;

[0132] ;

[0133] ;

[0134] In the formula, represents the th transformer layer; represents the event the th transformer layer, and at the same time serves as the key matrix and the value matrix; represents the th token of the event; represents the th token of the event; is the query matrix for the attention operation of the event ; is the event Event-level representation; For an event the th graph attention layer, for an event and an event threshold factor; is the threshold factor weight matrix; is for transpose operation; is the multi-head attention mechanism;

[0135] S32. Use a recurrent neural network to perform temporal recursion on the threshold factor to capture the threshold dynamics in the evolution path. Use a conditional auto-distribution encoder to aggregate the threshold factor and the representation of the endogenous link and its neighbors, and model the external driving variable corresponding to the endogenous evolution logic path, that is, the virtual start and end external cause node representation , which is expressed by the formula:

[0136] ;

[0137] In the formula, represents the exogenous variable of event ; represents the mean of the exogenous variable distribution of event ; represents the value sampled from the standard normal distribution; represents the standard deviation of the exogenous variable distribution of event ; and are learnable weight matrices; is for event the corresponding input vector; and are bias terms; and are for event and event the representation of the endogenous link causal pair; is for event the context, that is, the representation of neighbors; is for event the threshold factor;

[0138] S33. To ensure the causal robustness of the optimal link of the derived actual external cause node and effectively alleviate the threshold drift, abduction needs to be performed among the nodes that have a significant causal impact on the internal cause node. Using the virtual start and end external cause node representation and the optimal internal cause link as inputs, on the real-time public opinion evolution path graph, perform abduction on the optimal link of the actual external cause node for the strongly connected subgraph formed within five hops of the optimal internal cause link. During this process, the agent continuously interacts with the environment to select the optimal inference path combination;

[0139] Preferably, the actual external cause nodes form a link according to the connection sequence of the public opinion evolution path diagram, that is, the optimal external cause link, to ensure that the link advancement sufficient to trigger the internal cause nodes can alleviate the threshold drift.

[0140] It is intended 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 public opinion attack intention. Based on counterfactual invariance, it is necessary to ensure the consistency between the predicted public opinion attack intention and the original attack intention, and further ensure the internal and external abductive adaptability with counterfactual invariance.

[0141] As shown above, in this embodiment, in step S3, the optimal external cause link and the optimal internal cause link are integrated through average pooling to form a new representation, which is used as the representative of the overall extrapolation link logic for subsequent tracing of the key structure of the existing fact dissemination. At the same time, to prevent the breakage of the causal chain and improve the robustness of the causal chain, this embodiment also establishes an effective threshold factor identification mechanism in combination with the public opinion evolution path diagram to ensure the advancement of the causal chain.

[0142] S4. As Figure 4 shown, the nodes and edges contained in the optimal internal cause link and the optimal external cause link are combined to obtain the extrapolated cause backbone (subgraph), and the subgraph transformer is used to learn the subgraph node representation and aggregate and update the node information to construct the final cause super-subgraph backbone. Specifically:

[0143] The overall structure of the subgraph is divided into multiple sub-structures, product graphs are constructed for each sub-structure, and the cause nodes in the product graphs are marked. The subgraph transformer structure is used to learn the subgraph features, including:

[0144] S41. The connection relationship between the product graphs of the subgraph is represented by constructing an adjacency matrix, where:

[0145] The adjacency matrix is also used to represent the connection situation between the nodes inside each subgraph, reflecting the internal structure characteristics of the subgraph. The internal subgraph connectivity is expressed by the formula:

[0146] ;

[0147] ;

[0148] In the formula, represents the node in the subgraph ; represents the node in the subgraph ; represents the connection between the nodes within the same subgraph; represents judging whether the subgraph and Whether it is the same sub - graph; represents a node and is adjacent in the original graph;

[0149] The external sub - graph connectivity is expressed by the formula:

[0150] ;

[0151] ;

[0152] In the formula, represents the connection of the same node in different sub - graphs; represents judging whether nodes and are the same nodes through the Kronecker function; represents that the root nodes of sub - graphs and are adjacent in the original graph;

[0153] The adjacency matrix for point update is used in the node update process, enabling each node to obtain the representation of its root node. The root node can be understood as a node with an important position or a starting role in the graph structure. The adjacency matrix for point update is expressed by the formula:

[0154] ;

[0155] In the formula, represents the adjacency matrix for point update; the adjacency matrix for point update determines the specific element values through the indices of and . When and , the matrix element at the corresponding position is 1, and in other cases it is 0; is set to conform to the regulation of the adjacency matrix element values under the operation logic of point - type update of the graph and nodes receiving root representations. The nodes receiving root representations means that the root node is often in a special position in the graph, and other nodes may receive information or representations from the root node; when the value is 1, it means that there is a connection from a specific ( ) (here takes the same value as node ) to node for completing the operations of point - type update and receiving root representations;

[0156] S42. Perform position encoding on the nodes in the subgraph, assign an encoding information related to its position in the graph to each node. After position encoding, regard the marked cause nodes as root nodes, learn node representations of the product graph through the subgraph attention block, and use the adjacency matrix to control the internal and external subgraph attention mechanisms. The internal attention focuses on the information interaction between nodes within the subgraph, while the external attention focuses on the information interaction between nodes in different subgraphs. Specifically:

[0157] Calculate the Query, Key, and Value transformation matrices through the sparse attention method , , , where in the formula, represents the number of model layers, represents at the th layer, the feature matrix of all nodes, and the rest are learnable weight matrices; The core of the attention mechanism is to calculate the correlation weights between nodes to determine the importance of each node to other nodes during feature aggregation. The adjacency matrix in this embodiment records the connection relationships between nodes in the subgraph. Through the adjacency matrix, it can be clearly determined which nodes are connected and which are not. Therefore, the adjacency matrix can be used to control the calculation range of the attention mechanism, and calculate the attention weights only for node pairs with connections, that is, calculate the attention weights only for non-zero entries in the adjacency matrix , where in the formula, is the attention weight, is the query matrix, is the key matrix, is the adjacency matrix; enabling nodes to selectively focus on nodes from the same or different subgraphs, thus effectively fusing information between subgraphs;

[0158] Use the graph isomorphism network GIN encoder to update the node representations, and finally fuse various updates to obtain the final representation of the nodes, which is expressed by the formula:

[0159] ;

[0160] ;

[0161] where in the formula, is a learnable parameter; is the multi-layer perceptron at the th layer; is the input feature at the th layer; represents the internal attention; represents the external attention; represents the point update; represents at the th layer of the subgraph attention block;

[0162] S43. Merge the final representations of the same nodes in different substructures through splicing operations, synthesize the information provided by different substructures, and obtain more comprehensive node features;

[0163] S44. Based on the extrapolated causal backbone edge relationship, each causal node (whose initial representation is provided by the above independent substructure learning) aggregates the neighborhood node information of the current node according to the global edge relationship of the future extrapolated structure, and is expressed by the formula:

[0164] ;

[0165] Focus on the most prominent features in the field through max pooling; in the formula, represents the set of neighbor nodes of node ; represents the feature vector of node ; represents the aggregated information of node ;

[0166] Take the representation after neighborhood aggregation as a super node, and the edges in the causal backbone connect these super nodes, and update the super node representation again to obtain the final causal super-subgraph backbone, which synthesizes the information of all substructures and more comprehensively reflects the causes and structural relationships of the problem;

[0167] S5. As Figure 5 shown, construct the existing public opinion view fact backbone based on the existing public opinion dissemination facts, align the nodes of the final causal super-subgraph backbone with the existing public opinion view fact backbone based on the bi-graph alignment mechanism, and decode the relevant view event subgraphs. Specifically:

[0168] S51. For the existing public opinion dissemination facts, to enhance the overall understanding of three types of heterogeneous public opinion facts: the dissemination relationship of user node corpora in the social network, the evolution context of the main view events in the community, and the logical link of event motivation connotations, gradually aggregate the view fact representations, and are expressed by the formula:

[0169] ;

[0170] Furthermore, aggregating the view fact representations includes:

[0171] S511. Aggregate the corpora to user heterogeneous facts: Use the dissemination relationship of user-issued corpora in the social network as the backbone of the connection relationship, aggregate the feature representations of each corpus to the corresponding social network user nodes, and update the feature representations of each user node according to the edge relationship of corpus dissemination;

[0172] S512. Aggregate users to event heterogeneous facts: After completing the aggregation and update from corpus to user nodes, based on the updated user node representations, using the evolution context of the community's main opinion events as the main connection backbone, aggregate the feature representations of each user node to the opinion events it belongs to, and then update the feature representations of each opinion event node according to the edge connection relationships in the event evolution context;

[0173] S513. Aggregate motivations to event heterogeneous facts: After completing the aggregation and update from users to events, continue to use the evolution context of the community's main opinion events as the main connection backbone, aggregate each motivation element (such as the reasons and purposes for triggering events) in the connotative logic link of event motivations to the opinion events they belong to, and then each opinion event node is updated once according to the edge connection relationships;

[0174] Take the evolution context of the aggregated opinion facts after steps S511 - S513 as the backbone of the existing public opinion view facts;

[0175] S52. Construct the product graph corresponding to the backbone of the existing public opinion view facts, sequentially label the opinion event nodes in the product graph and regard them as the root nodes of each product graph, adopt the Subgraphormer structure described in step S4, construct an adjacency matrix to represent the connection relationships between the product graphs, and learn the representation of each event node through SABB as shown in Figure 7 and update it to each node of the existing public opinion fact backbone, so as to learn the internal sub - structure characteristics of the public opinion view fact backbone and strengthen the local relevance between views;

[0176] S53. As shown in Figure 6 , design a dual - graph alignment mechanism to align the nodes of the extrapolated cause hyper - subgraph with the updated backbone of the existing public opinion view facts to achieve the tracing of the propagation structure. Specifically:

[0177] Based on the backbone of the final cause hyper - subgraph and the updated backbone of the existing public opinion view facts, construct a cause - view dual - graph node alignment decoding algorithm. The algorithm aims to align the existing opinion events and the extrapolated cause hyper - points according to the maximum node relevance. Specifically:

[0178] S531. Encode the two graphs respectively. The two graphs are the backbone of the final cause hyper - subgraph and the backbone of the existing public opinion view facts, and input them into the encoder based on Graphormer and the encoder based on the graph attention network for processing and output distributions G M and G N , construct a potential matrix A to fuse the structural relevance of the two graphs, score the structural relevance of the two graphs through a fully - connected layer, and decode the relevant opinion event sub - graphs whose relevance reaches the preset threshold , where minimizing the distribution difference between the sub-graph of relevant opinion events and the backbone of existing public opinion fact, and maximizing the relevance score between the sub-graph of relevant opinion events and the backbone of the extrapolated cause super-graph are taken as the optimization objectives, tracing the most sufficient structure and making the relevance score the highest, which is expressed by the formula:

[0179] ;

[0180] In the formula, represents the decoded sub-graph of relevant opinion events and the backbone graph of existing public opinion events of the KL divergence; represents the decoded sub-graph of relevant opinion events and the extrapolated cause super-graph of the relevance score;

[0181] Furthermore, the M network is an encoder based on Graphormer, which is used to process the structured representation of the extrapolated cause backbone graph; the input is the encoded representation of the backbone graph (the entity embedding after Graphormer encoding), using multi-head attention to model the hyper-node relationship, generating queries, keys, and values through a learnable weight matrix, and the output undergoes feature transformation through layer normalization and a feed-forward network, and finally generates a distribution GM through a fully connected layer and a sigmoid activation function, representing the conditional probability distribution from the backbone graph to the latent matrix A;

[0182] The N network is an encoder based on a graph attention network, which captures the local dependence relationship between nodes; the input is the encoded representation of the existing fact backbone graph, using self-attention to calculate the attention scores of each node with its neighbor nodes, weighted aggregating the neighbor information to update the node representation, and then generating a distribution GN through layer normalization and a fully connected layer, representing the conditional probability distribution from the existing public opinion fact backbone graph to the latent matrix A;

[0183] S6. Reverse-frame the sensitive user nodes corresponding to the abnormal opinions in the social network based on the sub-graph of relevant opinion events, and lock the early propagation structure that leads to the occurrence of potential public opinion attack intentions.

[0184] Preferably, Figures 2-3 the SAVE basic unit is the node name on the custom public opinion evolution path graph, and SAVE represents stance - aspect - value - emotion.

[0185] Embodiment 2:

[0186] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements an early tracing method for public opinion attacks based on causal reasoning and bi-graph alignment as described in any embodiment of the present invention.

[0187] Example 3:

[0188] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements an early tracing method for public opinion attacks based on causal reasoning and bi-graph alignment as described in any embodiment of the present invention.

[0189] It should be noted that the electronic device and the computer-readable storage medium described in the present invention are both based on the same inventive concept as the method described in Embodiment 1 of the present invention, and will not be elaborated herein.

[0190] In the embodiments of the present invention, "at least one" means one or more, and "a plurality" means 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 situation of A existing alone, A and B existing simultaneously, or B existing alone. Where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single items 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, and c may be single or multiple.

[0191] Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0192] 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 foregoing method embodiments, and will not be elaborated herein.

[0193] 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 such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.

[0194] The above are only the embodiments of the present invention, and thus do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall equally be included in the patent protection scope of the present invention.

Claims

1. An early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment, characterized in that The method includes: Constructing an opinion evolution path map based on existing public opinion views, and constructing a low-confounding bias endogenous logic abduction model based on the opinion evolution path map. Among them, the low-confounding bias endogenous logic abduction model is based on the structural causal model SCM, and uses context switching and reinforcement learning algorithms to select the optimal internal cause link. Specifically: Aggregating the node features and graph structure information of the opinion evolution path map through a graph convolutional network to generate a structural variable that explicitly represents causal relationships. Among them, the structural variable corresponds to the exogenous variable in the structural causal model SCM and is used to model the causal dependence relationship between nodes; Encoding the future extrapolation link of the real-time opinion evolution path into a node embedding vector through a graph convolutional network, mapping it to a pre-constructed prior event causal library, searching for similar causal patterns using cosine similarity, and obtaining the optimal internal cause link based on the causal pattern with the highest similarity; The method also includes supplementing the logical connection edges of the optimal internal cause link. Specifically, if there is no connection edge between the nodes in the optimal internal cause link, causal edges are added according to the global event graph; the conditional self-distribution Markov network is used to iteratively calculate the occurrence probability of events within the optimal internal cause link after adding causal edges to generate latent variables, which is expressed by the formula; ; In the formula, is a latent variable; represents inference steps; represents a chain of inference steps; represents a chain of inference steps; is a transformation weight matrix; is an activation function; is the event representation of the th inference step; is the event representation of the th inference step; represents the occurrence probability of the chain of inference steps given that the chain of inference steps has occurred; Obtaining a preset opinion attack intention based on counterfactual constraints and latent variables; Mapping the generalized causal edges in the global event graph to the real-time opinion evolution path map, supplementing the missing edges, and adjusting the node representation according to the supplemented edges to obtain an updated real-time opinion evolution path map; Establishing a low-threshold drift exogenous logic abduction model based on the optimal internal cause link. The low-threshold drift exogenous logic abduction model finds the optimal external cause link through a threshold factor identification mechanism and a reinforcement learning algorithm; Combining the nodes and edges contained in the optimal internal cause link and the optimal external cause link to obtain a subgraph, using the Subgraphormer to learn the node representation of the subgraph, and aggregating and updating the node information to construct the backbone of the final cause hyper-subgraph; Constructing the backbone of the existing public opinion view facts based on the existing public opinion dissemination facts, aligning the backbone of the final cause hyper-subgraph with the backbone of the existing public opinion view facts based on the bi-graph alignment mechanism, and decoding the relevant view event subgraph; Based on the relevant view event subgraph, reversely framing the sensitive user nodes corresponding to the abnormal views in the social network, and locking the early dissemination structure that leads to the occurrence of potential opinion attack intentions.

2. The early tracing method for public opinion attacks based on causal reasoning and dual-graph alignment according to claim 1, wherein Mapping to the pre-constructed prior event causal library specifically means finding subgraph isomorphisms in the causal graph structure of the structural causal model SCM, and selecting the path that conforms to the constraints of the structural causal model SCM through the Markov decision process of reinforcement learning, where: The Markov decision process is represented by a quadruple as follows , where the state represents the set of states when the agent selects paths at different time points; the action represents the possible paths from the head entity to the tail entity ; the transition probability represents the probability that the agent selects the next path in path reasoning; the reward includes the basic reward and the path reward , and is expressed by the formula: ; In the formula, and are the basic reward learnable weight coefficient and the path reward learnable weight coefficient respectively; is the state at time step ; is the action at time step .

3. The early traceability method for public opinion attacks based on causal reasoning and dual-graph alignment according to claim 2, wherein Establishing a low-threshold drift exogenous logic abduction model based on the optimal internal cause link. The low-threshold drift exogenous logic abduction model finds the optimal external cause link through a threshold factor identification mechanism and a reinforcement learning algorithm. Specifically: For the endogenous evolution logic path in the real-time public opinion evolution path map mapped back to the optimal internal cause link, use Transformer to aggregate the causal relationship information of the endogenous evolution logic path, and aggregate the token representation tokens of the event to obtain the event-level representation; use the graph neural network to merge the structure information of the public opinion evolution path map, and integrate to obtain the threshold factor that affects the occurrence of the threshold effect between endogenous variables, which is expressed by the formula: ; ; ; In the formula, represents the th transformer layer; represents event the th transformer layer; represents the th token of the event; represents the th token of the event; is the query matrix of the attention operation for event ; is the event-level representation of event ; is the th graph attention layer of event is the threshold factor of event and event ; is the threshold factor weight matrix; is for the transpose operation; is the multi-head attention mechanism; Use a conditional auto-distribution encoder to aggregate the threshold factor and the representation of the endogenous link with the representations of its neighbors, and model to obtain the external driving variable corresponding to the endogenous evolution logic path, that is, the representation of the virtual head and tail external cause nodes , which is expressed by the formula as: ; In the formula, represents the exogenous variable of event ; represents the mean of the exogenous variable distribution of event ; represents the value sampled from the standard normal distribution; represents the exogenous variable of event ; and are learnable weight matrices; is the input vector corresponding to event ; and are bias terms; and are the representations of the endogenous link causal pairs of event and event ; is the context of event ; is the threshold factor of event ; Using the virtual head and tail external cause nodes representation and the optimal internal cause link as the input, on the real-time public opinion evolution path map, conduct the abduction of the optimal link of the actual external cause nodes for the strongly connected subgraph formed within five hops of the optimal internal cause link. During this process, the agent continuously interacts with the environment to select the optimal inference path combination; The actual external cause nodes form a link according to the connection order of the public opinion evolution path map to obtain the optimal external cause link.

4. An early traceability method for public opinion attacks based on causal reasoning and dual-graph alignment according to claim 3, characterized in that Combine the nodes and edges contained in the optimal internal cause link and the optimal external cause link to obtain a subgraph. Use the subgraph transformer to learn the subgraph node representation, and aggregate and update the node information to construct the backbone of the final cause hyper-subgraph. Specifically: Divide the overall structure of the subgraph into multiple sub-structures, construct a product graph for each sub-structure, and mark the cause nodes in the product graph. Use the subgraph transformer structure to learn the subgraph features, including: Construct an adjacency matrix to represent the connection relationship between the product graphs of the subgraph, including the internal subgraph connectivity, the external subgraph connectivity, and the adjacency matrix of point update, where: The internal subgraph connectivity is expressed by the formula: ; ; In the formula, represents a node in sub - graph ; represents a node in sub - graph ; represents the connection of nodes within the same sub - graph; represents judging whether sub - graphs and are the same sub - graph through the Kronecker function; represents that node is adjacent to in the original graph; The external subgraph connectivity is expressed by the formula: ; ; In the formula, represents the connection of the same node in different subgraphs; represents judging whether nodes and are the same nodes through the Kronecker function; represents that the root node of subgraph and are adjacent in the original graph; The adjacency matrix of point update is expressed by the formula: ; In the formula, represents the adjacency matrix for point update; the adjacency matrix for point update determines the specific element values through the and indexes. When and , the matrix element at the corresponding position is 1, and in other cases it is 0; Perform position encoding on the nodes in the subgraph, regard the marked cause nodes as the root nodes, use the subgraph attention block to learn the node representation of the product graph, and use the adjacency matrix to control the internal and external subgraph attention mechanisms. Among them, only calculate the weights for the non-zero entries of the adjacency matrix; Fuse the attention results through the graph isomorphism network to obtain the final representation of the nodes; Merge the final representations of the same nodes in different sub-structures through the splicing operation; based on the subgraph relationship, each cause node aggregates the neighborhood node information of the current node according to the global edge connection relationship of the future extrapolation structure, and uses the node representation after neighborhood aggregation as the super node. The edges in the subgraph connect these super nodes, and update the super node representation again to obtain the backbone of the final cause hyper-subgraph.

5. An early traceability method for public opinion attacks based on causal reasoning and dual-graph alignment according to claim 4, characterized in that, Construct the backbone of the existing public opinion view facts based on the existing public opinion dissemination facts. Specifically, gradually aggregate the view fact representations of the existing public opinion dissemination facts, including aggregating the corpus to user heterogeneous facts, aggregating users to event heterogeneous facts, and aggregating motives to event heterogeneous facts, where: The specific process of aggregating the corpus to user heterogeneous facts is to use the dissemination relationship of the corpus published by users in the social network as the backbone of the connection relationship, aggregate the feature representations of each corpus to the corresponding social network user nodes, and update the feature representations of each user node according to the edge connection relationship of the corpus dissemination; The aggregation of users to event heterogeneous facts specifically means that after the aggregation and update of the corpus to the user nodes, based on the updated user node representations, using the evolution context of the main view events of the community as the main connection backbone, aggregating the feature representations of each user node to the view events it belongs to, and then updating the feature representations of each view event node according to the edge connection relationship of the event evolution context; The aggregation of motivations to event heterogeneous facts specifically means that after the aggregation and update of users to events, continuing to use the evolution context of the main view events of the community as the main connection backbone, aggregating each motivation element in the connotative logical link of the event motivation to the view events it belongs to, and then performing another update on each view event node according to the edge connection relationship; Use the evolution context of the aggregated view facts as the backbone of the existing public opinion view facts.

6. The early traceability method for public opinion attacks based on causal reasoning and dual-graph alignment according to claim 5, wherein Based on the dual-graph alignment mechanism, align the nodes of the final cause hypergraph backbone with the backbone of the existing public opinion view facts, and decode the relevant view event subgraphs, specifically: Encode the two graphs respectively. The two graphs are the backbone of the final cause hyperon graph and the backbone of the existing public opinion view facts, and input them into the encoder based on Graphormer and the encoder based on the graph attention network for processing to output distributions GM and GN. Construct the latent 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 view event subgraph whose relevance reaches the preset threshold , where minimizing the distribution difference between the relevant view event subgraph and the backbone of the existing public opinion view facts and maximizing the relevance between the relevant view event subgraph and the backbone of the extrapolated cause hyperon graph are used as the optimization objectives, which are expressed by the formula as: ; In the formula, represents the decoded relevant opinion event sub-graph and the KL divergence from the existing public opinion event backbone graph ; represents the decoded relevant opinion event sub-graph and the relevance score of the extrapolated cause hyper-graph .

7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements 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 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements 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 6.

Citation Information

Patent Citations

  • Public opinion evolution prediction method based on graph reasoning model

    CN116303886A

  • Propagation-oriented key element dynamic tracing method

    CN117057342A

  • Online public opinion propagation and offline event association semantic generation method and system

    CN118536510A