A method and system for predicting interstate cyberattacks based on the fusion of GNN and LLM
By constructing a multimodal dataset and integrating a multi-view dynamic graph neural network with a large language model, the problem of insufficient data fusion in the prediction of inter-state cyberattacks was solved, and more accurate and timely prediction results were achieved.
Patent Information
- Application Number
- CN202510716382.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2045-05-30
AI Technical Summary
Existing technologies struggle to fully capture complex relationships in predicting inter-state cyberattacks, and traditional methods lack efficient fusion mechanisms when processing multimodal data, resulting in poor prediction accuracy and timeliness.
By acquiring news event data and historical cyberattack data, analyzing news text using a large language model, constructing a multimodal dataset, and modeling using a multi-view dynamic graph neural network, combined with fine-tuning using the LoRA method, semantic fusion of graph and text data is achieved, ultimately generating inter-state cyberattack prediction results.
It enables more accurate and timely prediction of inter-state cyberattacks, outputs reasoning processes to assist decision-making, and improves the timeliness and interpretability of predictions.
Smart Images

Figure CN120389903B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network security, and in particular to a method and system for predicting inter-state network attacks based on the fusion of GNN and LLM. Background Technology
[0002] In the field of cybersecurity, the prediction of cyberattacks between nations is crucial. Currently, the global cyberspace security situation is complex and volatile, with frequent cyber confrontations between nations. Traditional technologies have many limitations in addressing such issues. From a technical perspective, past cyberattack predictions have often relied on single data sources, making it difficult to comprehensively capture the complex relationships between nations. For example, while relying solely on historical cyberattack data can provide basic information about an attack, it cannot be combined with a comprehensive analysis of factors such as international relations and diplomatic dynamics. For instance, when predicting the likelihood of a cyberattack by country A against country B, if the tense diplomatic relations between the two countries due to trade frictions are not considered, the prediction results are often one-sided.
[0003] Existing technologies also have shortcomings in data processing and model building. Traditional methods lack efficient fusion mechanisms when processing multimodal data (cyberattack data and news event text data). For example, when generating datasets for analysis, they cannot effectively integrate different types of data, making it difficult to uncover deep relationships between data in subsequent modeling. In model building, the models used struggle to account for dynamic changes and multi-view features of the data. For instance, traditional graph models cannot effectively interact and fuse features of data from both cyberattack and news event perspectives over time, unlike multi-view dynamic graph neural networks. This results in poor accuracy and timeliness in predicting cyberattacks between nations, making it difficult to meet the needs of practical cybersecurity protection.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore includes information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a method and system for predicting inter-state cyberattacks based on the fusion of GNN and LLM, which at least partially overcomes the problems existing in the prior art. It acquires news event data from GDELT and historical cyberattack data from DAM, analyzes the news text using a large language model to construct a multimodal dataset, and processes it into a target directed multi-view dynamic graph. Node embedding information is generated through neural network modeling of the multi-view dynamic graph. This is then input into the large language model and fine-tuned using the LoRA method to achieve semantic fusion of graph and text data. Combined with the target event set, through feature extraction and correlation analysis, the large language model predicts and verifies the attack prediction results, outputting the inference process to assist decision-making.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0007] According to one aspect of this application, a method for predicting inter-state cyberattacks based on the fusion of GNN and LLM is provided, comprising: acquiring a target event set and a training sample set, wherein the training sample set includes a news event dataset, historical cyberattack data, a satellite remote sensing image dataset, and a social media sentiment dataset; based on the news event dataset, performing content analysis on the news text using a large language model, combining the historical cyberattack data, converting the military facility change features in the satellite images into text semantic embeddings through a cross-modal alignment module, quantifying the sentiment polarity of social media sentiment into numerical features, and generating a multimodal dataset for cyberattack prediction; processing the multimodal dataset, layering it according to time granularity, with each layer containing country nodes, event nodes, and related nodes. The system aggregates features from different levels through dynamic time windows to generate a directed multi-view dynamic graph of the target, consisting of network attacks, news events, image events, and public opinion events. Based on a multi-view dynamic graph neural network, the system models and processes the directed multi-view dynamic graph to generate node embedding information. This node embedding information is injected into each layer of a large language model, fine-tuned using the LoRA method, and an adversarial fusion module is introduced. Simultaneously, causal explanation chains are generated through attention weight visualization, forming the semantic information of the fused graph data and text data. Based on the large language model and combining the semantic information of the fused graph data and text data, the system processes the target event set and simulates attack probability changes under different scenarios through a counterfactual reasoning module, generating inter-state network attack prediction results.
[0008] Another aspect of this application discloses a device for predicting inter-state cyberattacks based on the fusion of GNN and LLM, characterized by comprising: an acquisition module for acquiring a target event set and a training sample set, wherein the training sample set includes a news event dataset, historical cyberattack data, a satellite remote sensing image dataset, and a social media sentiment dataset; a processing module for performing content analysis on news texts using a large language model based on the news event dataset, combining historical cyberattack data, converting military facility change features in satellite images into text semantic embeddings through a cross-modal alignment module, quantifying the sentiment polarity of social media sentiments into numerical features, and generating a multimodal dataset for cyberattack prediction; and processing the multimodal dataset by layering it according to time granularity, with each layer containing national nodes. Points, event nodes, and relationship nodes are aggregated with features at different levels through dynamic time windows to generate a directed multi-view dynamic graph of the target, consisting of network attacks, news events, image events, and public opinion events. The directed multi-view dynamic graph is modeled and processed based on a multi-view dynamic graph neural network to generate node embedding information. This node embedding information is injected into each layer of a large language model, fine-tuned using the LoRA method, and an adversarial fusion module is introduced. Simultaneously, causal explanation chains are generated through attention weight visualization, forming the semantic information of the fused graph data and text data. Based on the large language model and the semantic information of the fused graph data and text data, the target event set is processed. A counterfactual reasoning module simulates the changes in attack probability under different scenarios, generating inter-state network attack prediction results.
[0009] According to another aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a second processor, implements the above-described method for predicting inter-state cyberattacks based on the fusion of GNN and LLM.
[0010] This application presents a method and system for predicting inter-state cyberattacks based on the fusion of GNN and LLM. The server aims to solve the problem of predicting inter-state cyberattacks by combining the advantages of GNN and LLM. First, news event data is obtained from GDELT and historical cyberattack data from DAM. After analyzing the news text using a large language model, a multimodal dataset is constructed and processed into a target directed multi-view dynamic graph. Then, node embedding information is generated through neural network modeling of the multi-view dynamic graph. This information is then injected into the large language model and fine-tuned using the LoRA method to achieve semantic fusion of graph and text data. Finally, combined with the target event set, through feature extraction and association analysis, the large language model predicts and verifies the attack prediction result, and can also output the reasoning process to assist decision-making.
[0011] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0012] Figure 1 This document illustrates a flowchart of an interstate network attack prediction method based on the fusion of GNN and LLM, provided in an embodiment of this application. Figure 2 This illustration shows a schematic diagram of the structure of an interstate network attack prediction device based on the fusion of GNN and LLM according to an embodiment of this application; Figure 3 The diagram illustrates the relationship between time interval and data volume for a national network attack prediction method based on the fusion of GNN and LLM provided in one embodiment of this application. Detailed Implementation
[0013] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0014] The following is combined Figure 1 This application describes a method for predicting inter-state cyberattacks based on the fusion of GNN and LLM according to exemplary embodiments. In one embodiment, this application also proposes a method and system for predicting inter-state cyberattacks based on the fusion of GNN and LLM. Figure 1 As shown, this method is applied to a server and includes: S101, obtain the target event set and training sample set.
[0015] In one implementation, the news event dataset is selected from the Global Events, Languages, and Tones Database (GDELT), which collects news events worldwide and provides rich event information; the cyberattack history data uses the Digital Attack Map (DAM) dataset, which records the process of cyberattacks between countries; the satellite remote sensing image dataset is acquired through commercial remote sensing platforms (such as PlanetLabs), providing remote sensing images of sensitive areas such as military bases and ports of target countries with a resolution of ≥0.5 meters; and the social media sentiment dataset is crawled through APIs of platforms such as Twitter and Telegram, containing public opinion data. These data sources are extensive and authoritative, providing multi-dimensional information for the prediction task.
[0016] Data was retrieved from the GDELT database, which provides information such as event URLs. Using these URLs, a distributed crawler script was developed to obtain the original news web pages. During the retrieval process, for broken links, a strategy of obtaining backup web pages from TheInternetArchive was adopted to ensure data integrity. Then, the web page parsing tool Trafilatura was used to obtain the news text, and duplicate entries were merged. Because the same URL may correspond to multiple data entries, some due to the web page mentioning multiple countries or event types, and others simply due to repetition, duplicate data needed to be removed, merging multiple data entries corresponding to the same URL into a larger event data set for easier subsequent analysis.
[0017] For satellite remote sensing image data, images of target areas are acquired periodically via commercial remote sensing platform APIs. Target detection models such as YOLOv8 are used to identify military facilities (e.g., missile launchers, radar stations) within the images, and the CLIP model is used to convert visual features into semantic text descriptions. Social media sentiment data is crawled in real-time via APIs based on keywords (e.g., "war," "sanctions"), and sentiment analysis tools such as VADER are used to quantify the sentiment polarity of the text, generating a sentiment index ranging from -100 to +100.
[0018] The DAM network attack dataset records network attacks between two countries over a period of time. In the original data table, several records from the same pair of countries within a certain time period are identical except for the time field; these are considered a single network attack event. First, the original database is divided by the attacking and attacked countries, resulting in a set of data items identical to both. Next, the data is sorted by attack time, and the time difference between adjacent records is determined. The "inflection point principle" is used, selecting 120 minutes as the time interval threshold. Records exceeding this threshold are considered to belong to two different attacks; otherwise, they are considered to be from the same attack. For identical attack data, only one record is retained, and redundant data is deleted.
[0019] After the above processing, the obtained news event data, historical cyberattack data, semantic descriptions of satellite remote sensing images, and social media sentiment indices are integrated into a training sample set. This training sample set contains rich information: the news event data covers the time, location, participants, and semantic features obtained through large language model analysis; the historical cyberattack data contains key information such as attack time and attack type; the satellite remote sensing image data provides physical evidence of changes in military facilities; and the social media sentiment data reflects public sentiment trends, laying the foundation for the subsequent generation of a multimodal dataset for cyberattack prediction and serving as the data cornerstone of the entire prediction model.
[0020] S102, based on a news event dataset, uses a large language model to perform content analysis on news texts, combines historical data on cyberattacks, and uses a cross-modal alignment module to convert the characteristics of changes in military facilities in satellite images into text semantic embeddings. It also quantifies the sentiment polarity of social media sentiments into numerical features, generating a multimodal dataset for cyberattack prediction.
[0021] In one implementation, based on a news event dataset, a web crawler script is used to obtain original news web pages. These pages are then processed by a parsing tool, and a duplicate item merging operation is performed to generate the original news text information. URLs are extracted from the news event dataset (GDELT database), and a distributed web crawler script is used to obtain the original news web pages. During the acquisition process, for broken links, backup web pages are obtained using TheInternetArchive to ensure data integrity. For example, when processing the 2020 GDELT event database, some URL links were found to be broken. By obtaining backup web pages from TheInternetArchive, the relevant web page content was successfully retrieved. Then, the web page parsing tool Trafilatura is used to parse the original web pages and extract the news text. Since the same URL may correspond to multiple data entries, a duplicate item merging operation is required. When processing a batch of data, it was found that 10 data entries corresponded to the same URL. Among them, 3 entries were duplicates because the web pages mentioned multiple countries, and 2 entries were simply duplicates. These 10 data entries were merged into one event data set, ultimately generating the original news text information.
[0022] Simultaneously, remote sensing image data (resolution ≥ 0.5 meters) of military bases, ports, and communication hubs in the target country are acquired through satellite imagery APIs. The YOLOv8 model is used to detect military facilities (such as missile launchers and radar stations) in the images. Then, the visual features are mapped into textual semantic descriptions (such as "Satellite images show that three new radar facilities have been added to the border base of country A") through the CLIP model. Public opinion data from platforms such as Twitter and Telegram are crawled through social media APIs. The VADER sentiment analysis tool is used to quantify the sentiment polarity of the text and generate a sentiment index ranging from -100 to +100.
[0023] For the original news text, a large language model (such as Qwen-2.5) is used to identify invalid content, determine its relevance to international relations, identify national roles, and generate event summaries, thus producing news text analysis information. In the invalid content identification process, the model identifies and marks invalid content such as "page not found" and "inaccessible." Regarding the international relations relevance assessment, the model filters out text related to bilateral relations and removes irrelevant news such as domestic sporting events. In national role identification, the model determines the roles of each country from the news text; for example, in a news story about "country A providing economic aid to country B," A is identified as the aid provider (initiator) and B as the recipient (victim). Furthermore, the model generates summaries for lengthy texts to reduce redundant information.
[0024] The LLM-Image cross-modal converter transforms the characteristics of changes in military facilities in satellite images (such as runway expansion and troop concentration) into text semantic embeddings (such as "increased intensity of military activities"); and uses a sentiment analysis model to quantify the polarity of public opinion on social media and generate a numerical public sentiment index.
[0025] For historical cyberattack data, the data is divided by attacking and attacked countries, sorted by attack time, and aggregated based on a 120-minute time difference threshold. After data filtering, processed cyberattack data is generated. The DAM dataset records cyberattack processes between two countries over a period of time. First, it is divided by attacking and attacked countries. Then, the data within each dataset is sorted by attack time. The "inflection point principle" is used to determine the 120-minute time difference threshold for aggregation events. For example, in the dataset, attack records at 10:00 and 12:30 (150-minute time difference) are considered two attacks, while 10:00 and 11:30 (90-minute time difference) are considered one attack. After aggregating attack events, duplicate or invalid data, such as records with missing attack times or unclear types, are filtered out to generate processed cyberattack data. An attack-event time correlation matrix is constructed, establishing a time-series correlation between each attack and news events, satellite image changes, and public opinion fluctuations within the 72 hours prior to the attack. For example, satellite imagery showing changes in military deployments 24 hours before the attack, plus a surge in negative sentiment on social media 12 hours before the attack, is flagged as a "highly correlated attack".
[0026] Based on news text analysis, processed cyberattack data, satellite image semantic descriptions, and social media sentiment indices, a cross-modal alignment module is used for fusion: Entity alignment: unifying the mapping of national entities in news reports, geographical coordinates in satellite images, and IP addresses in attack data; Semantic alignment: mapping the news text of "military exercises," troop assembly features in satellite images, and tension indices in social media to the same semantic space through comparative learning; Temporal alignment: constructing a time synchronization mechanism to ensure the association of multi-source data within the same time window (e.g., aligning satellite image changes at 14:00 on 2023-05-10 with news reports at 14:30); Feature enhancement: generating composite features, such as attack risk index = 0.4 × degree of change in military deployment + 0.3 × intensity of diplomatic conflict + 0.2 × public hostility + 0.1 × historical attack frequency, ultimately generating a multidimensional tensor representation containing text features, image features, numerical features, and temporal features, serving as a multimodal dataset for cyberattack prediction.
[0027] Taking the example of "Country X launching a DDoS attack against Country Y at 10:00 AM on October 10, 2024," the following information is integrated: Attack data: attack time and type; News text: Diplomatic friction arose between Country X and Country Y over trade issues, with Country X as the initiator and Country Y as the recipient; Satellite imagery: Three days before the attack, Country X added missile launchers to its border military base (semantic description); Public opinion data: One day before the attack, the anti-China sentiment index on social media towards Country X was -90. This forms a multi-dimensional data record, ensuring that the data not only includes direct attack information but also incorporates multi-dimensional background factors such as military deployments and social sentiment, providing more comprehensive feature inputs for the predictive model.
[0028] S103 processes the multimodal dataset, stratifies it by time granularity, and each layer of the graph contains country nodes, event nodes, and relationship nodes. It aggregates features from different levels through dynamic time windows to generate a target directed multi-view dynamic graph composed of network attacks, news events, image events, and public opinion events.
[0029] In one implementation, data on cyberattacks, news events, image events, and public opinion events are extracted from an existing multimodal dataset to generate corresponding subsets. For example, the multimodal dataset contains cyberattack data, news event data, satellite image data, and social media public opinion data from multiple countries between January 1 and December 31, 2020. Through data filtering and extraction operations, the cyberattack-related data is extracted to form a subset, including information such as attack time, initiating country, target country, and attack type; the news event data is extracted to form a subset, covering the release time, involved countries, and content summary; the satellite image data is extracted to form an image event subset, including semantic descriptions of changes in military facilities and geographical coordinates; and the social media public opinion data is extracted to form a subset, including sentiment index and keywords.
[0030] Using countries as nodes, the initiator of an event as the source node, and the recipient as the target node, node information is generated by combining satellite imagery geographic coordinate mapping and public opinion entity identification. In the subset of network attack data, if there is a record of "On March 5, 2020, country A launched a DDoS attack against country B," country A is the source node and country B is the target node. Similarly, in the subset of news events, if there is a report of "trade negotiations between country A and country B," both countries A and B are involved. Furthermore, the country to which military facilities belong is determined through satellite imagery geographic coordinate mapping, such as a military base located on the border of country A; and the country mentioned on social media is determined through public opinion entity identification, such as a tweet mentioning "the government of country C." Each country node includes attributes such as GDP and population (obtained from other data sources), image event nodes contain semantic descriptions such as "military exercises," and public opinion event nodes contain numerical attributes, forming node information.
[0031] Based on the data from each subset, edge information is generated according to event type and temporal causal relationship. On average, each graph contains 1003 edges for network attack data, 710 edges for news event data, 420 edges for image event data, and 580 edges for public opinion event data. For network attack data, country A launched a DDoS attack on March 5, 2020, and an SQL injection attack on May 10, 2020, forming edges between countries A and B respectively, with edge attributes of attack time and type. In news events, events such as trade negotiations and diplomatic statements between countries A and B form edges labeled with summaries and timestamps. In image events, the addition of missile launchers at a border base in country A forms the edge "Country A - Image Event," with the attribute "Military Activity Intensity +0.6." In public opinion events, the anti-country A sentiment index among the people of country B is -90, forming the edge "Country B - Public Opinion Event," with the attribute "Sentiment Polarity -90." At the same time, edges across event types are generated according to temporal causal relationships. For example, a temporal correlation edge is generated between changes in military deployments in satellite images three days before the attack and the attack event, with a weight of 0.8.
[0032] Based on the generated node and edge information, a directed graph is constructed, divided into four views: network attacks, news events, image events, and public opinion events, generating a preliminary structure for a directed multi-view dynamic graph. This structure contains 214 country nodes and four types of event nodes (news / attack / image / public opinion). For example, in the network attack view, the edge pointing from country A node to country B node is labeled "2020-03-05 DDoS attack"; in the image event view, country A node connects to the "border base expansion" image event node, with the edge attribute "2020-03-02 runway extended by 500 meters". The cross-view edge associations are optimized through a graph attention mechanism, such as calculating the association weight between the news event "trade sanctions" and the image event "military exercise", enhancing the attention coefficient of the "sanctions-exercise" cross-view edge, ultimately generating the target directed multi-view dynamic graph.
[0033] In this dynamic graph, inter-state interactions are presented through four views: the cyberattack view shows the historical trajectory of attacks, the news event view reflects diplomatic dynamics, the image event view provides evidence of military deployments, and the public opinion event view reflects social sentiment. For example, by linking the multiple views—such as the expansion of military facilities in country A in the image view, country A's trade sanctions against country B in the news view, and the high level of anti-A sentiment among the people of country B in the public opinion view—it is possible to intuitively infer the increased cyberattack risk for countries A and B. This graph structure provides multi-dimensional features for subsequent multi-view dynamic graph neural network modeling, and through cross-view feature fusion and temporal hierarchical analysis, it enhances the spatiotemporal correlation and causal interpretability of attack predictions.
[0034] S104, Modeling the target directed multi-view dynamic graph based on a multi-view dynamic graph neural network to generate node embedding information.
[0035] In one implementation, the target directed multi-view dynamic graph consists of cyberattacks and news events, containing information such as nodes and edges. Structural analysis involves extracting key elements from the graph. For example, when analyzing the relationship between country A and country B, node information is extracted from the graph, including relevant attributes of countries A and B (such as GDP, population, etc.), as well as edge information, such as the type and timing of cyberattacks, and summaries and timestamps of news events. This information is organized into graph structure information, providing a foundation for subsequent processing, much like breaking down a complex network graph into a list of easily understood and processed components.
[0036] The process involves parameter initialization and model loading for a multi-view dynamic graph neural network, generating model initialization information. Taking a multi-view dynamic graph neural network as an example, setting appropriate initial parameters can help the model converge faster and avoid getting stuck in local optima during training. Parameters that need to be initialized include the learning rate and weight decay coefficient. The learning rate controls the step size of parameter updates during training. If the learning rate is set too large, the model will skip the optimal solution during training, leading to failure to converge; if it is set too small, the training speed will be extremely slow, requiring more training time and computational resources. The initial learning rate is set to 0.001. This value was determined through multiple experiments and optimizations. At this learning rate, the model can adjust parameters within a reasonable time, gradually approaching the optimal solution, effectively balancing training speed and convergence performance. For example, during training, the model calculates the gradient based on the current parameters and the loss function. With a learning rate of 0.001, the model will update parameters according to the gradient direction with an appropriate step size, allowing the model to move in the direction of reducing loss.
[0037] Weight decay is used to prevent overfitting. During training, the model may overlearn noise and details in the training data, leading to decreased generalization ability on new data. Weight decay constrains model parameters, preventing them from becoming too large and thus avoiding excessive model complexity. Setting the weight decay coefficient to 0.0001 helps to appropriately adjust the model weights during training, suppressing excessive parameter growth and improving the model's generalization ability. For example, when dealing with data on inter-state cyberattacks, the model may learn some occasional but unrepresentative attack patterns. The weight decay mechanism can reduce the impact of these patterns on the model, allowing it to focus more on universal and regular features.
[0038] Using model initialization information, the graph structure information is processed through a graph self-attention mechanism. This mechanism allows the model to automatically learn the importance weights between nodes. At a given moment, the network attack view contains records of country A launching a DDoS attack against country B, while the news event view contains news about trade negotiations between countries A and B. The graph self-attention mechanism calculates the attention weight of each node to other nodes based on the attributes of the nodes (countries A and B) and the information about the edges between them. For example, for a node of country A, when calculating its features, it will pay more attention to edges related to the DDoS attack and the parts of the trade negotiation news event relevant to itself. The calculation formula is: Where q, k, and v represent the query, key, and value, respectively. In this example, q is the feature vector of the node representing country A, k is the key vector matrix of all nodes (including countries A and B), and v is the value vector matrix of all nodes. This is the dimension of the key vector. Through this calculation, initial node feature information for each node is generated in the current view and snapshot. These features include information about the node itself and its neighboring nodes.
[0039] Temporal interactive attention is used to process initial node feature information, learning temporal evolution patterns. Simultaneously, complementary information from different views is utilized to generate temporally fused feature information. The temporal interactive attention mechanism captures changes in node features over time and complementary information between different views. Over a period of time, the frequency and types of cyberattacks between countries A and B change, while news events are constantly updated, involving the development of relations between the two countries. The temporal interactive attention mechanism analyzes the initial node feature information at different times, such as comparing the cyberattack-related features of country A at different points in time with the news event-related features. It can discover that when trade negotiations between countries A and B reach an impasse, the frequency of cyberattacks increases in the subsequent period. In this way, a temporal evolution pattern is learned, and information from different views (cyberattack view and news event view) is fused. The calculation formula can be expressed as: Where M is the fused feature. It is the attention weight at time t. This represents the initial node feature information at time t. Through calculation, temporal fusion feature information containing both temporal dynamics and complementary view information is generated, enabling the model to better understand the changes in inter-country relations over time.
[0040] Multi-graph attention is a technique that integrates features from multiple views. Its core lies in using attention weights to measure the importance of different view features in generating node embedding information. In the inter-state cyberattack prediction scenario involved in this invention, there are two views: cyberattacks and news events. The cyberattack view includes information such as attack time, attack type, initiating country, and target country; the news event view covers news release time, involved countries, and news summary. The multi-graph attention mechanism calculates corresponding attention weights based on the node and edge information in each view, thereby determining the appropriate importance for each view's features when generating node embedding information.
[0041] By weightedly fusing features from different views using a multi-graph attention mechanism, rich node embeddings are generated. These embeddings are no longer limited to features from a single view but integrate key information from multiple views. Taking the analysis of the relationship between country A and country B as an example, in the cyberattack view, country A launched multiple attacks of different types against country B over a period of time. Meanwhile, in the news event view, there are news events between the two countries such as trade negotiations and diplomatic statements. The multi-graph attention mechanism comprehensively considers this information from different views. It analyzes the features of nodes (countries A and B) in each view, as well as the attributes of edges between nodes. The generated node embeddings include both the historical cyberattack behavior of countries A and B and the dynamic changes in their relationship reflected in news events. This comprehensive node embedding information can more fully represent the characteristics of national nodes, providing more valuable input for subsequent large language models and helping to improve the accuracy of inter-country cyberattack predictions.
[0042] Multi-graph attention mechanisms achieve feature fusion and node embedding information generation through a series of computational steps. Given V views, for each node i, its feature representation in the v-th view is: The multi-graph attention mechanism calculates the attention weight for each view. Then, the embedding information of node i is obtained by weighted summation. The formula is as follows: Among them, attention weight The calculation is typically based on node features and edge information, and normalized using the softmax function to ensure that the sum of the weights is 1. Through a multi-graph attention mechanism, features from multiple views can be effectively fused into the node embedding information, providing more representative and comprehensive data for subsequent model processing.
[0043] S105 injects node embedding information into each layer of the large language model, uses the LoRA method for fine-tuning, introduces an adversarial fusion module, and generates causal explanation chains through attention weight visualization to form semantic information of fused graph data and text data.
[0044] In one implementation, the node embedding information is subjected to dimensional adaptation and feature space alignment to generate adapted node embedding information. After the node embedding information is generated by the multi-view dynamic graph neural network, dimensional adaptation and feature space alignment are required because the dimensions and feature spaces of this information may not match the input requirements of the large language model. Taking the network attack and news event analysis scenarios of country A and country B as an example, the node embedding information is initially a high-dimensional vector with a dimension of
[512] , while the input vector dimension expected by the large language model is
[1024] . At this time, it is necessary to use a specific linear transformation matrix to process the node embedding information. Let the linear transformation matrix be... Its dimensions are [512, 1024], obtained through matrix multiplication. The original node embedding vector converts the dimension of the node embedding information from
[512] to
[1024] . In terms of format, if the original node embedding information is in tensor format, while the large language model requires list format, then a corresponding format conversion operation is required. In addition, through the domain classifier in the adversarial fusion module (such as a binary classifier that distinguishes between graph features and text features), the feature domain difference loss is calculated, and the feature space alignment parameters are optimized in reverse to force graph features and text features to be distributed in the semantic space in a consistent manner. Finally, the adapted node embedding information is generated so that it can be successfully input into the large language model.
[0045] We selected a Large Language Model (LLaMA) for loading, and then froze its pre-trained weights. This is because the pre-trained weights have already been learned on large-scale data and contain rich general knowledge. Freezing these weights avoids unnecessary modifications during subsequent fine-tuning, while also reducing training computation and preventing overfitting. The loaded LLaMA model has L layers, and the weight matrix for each layer... , , ..., Freezing these weights means they will no longer be updated during training. Simultaneously, the trainable rank factorization matrix of LoRA is initialized. In the LoRA method, for each layer's weight matrix... Approximation is made using two low-rank matrices A and B, namely... .here It is the original weight matrix. This is the adjustment part approximated by low-rank matrix multiplication. During initialization, matrices A and B are typically initialized with small random values, and cross-modal alignment constraints are injected: the attention weights of the pre-trained LLM on typical cross-modal samples (such as "military exercise news - satellite image features") are calculated and used as prior knowledge for initializing matrix A, for example, aligning the initial values of matrix A with the activation patterns of "military"-related text features. For example, for a layer's matrix A with dimensions [r, d] and matrix B with dimensions [d, r] (where r is the rank of the low-rank decomposition and d is the dimension-related parameter of the original weight matrix), the values of these two matrices can be randomly initialized using a uniform or normal distribution, such as... ,in It is a small positive number, such as 0.01. After these operations are completed, the initial state information of the model is generated, which prepares for the subsequent injection of node embedding information into the model and fine-tuning.
[0046] Based on the layered structure of the large language model, the adapted node embedding information is injected layer by layer. Taking an LLaMA model with L layers as an example, starting from the first layer, the adapted node embedding information is used as additional input and fused with the original input (such as word embeddings of text data). The input of the i-th layer is... (Including text-related feature representations), the adapted node embedding information is as follows: During injection, the two are combined through splicing or other fusion methods. For example, using splicing, the input of the i-th layer is updated to [ , Simultaneously, an attention consistency module is inserted between Transformer layers. This module calculates the cross-attention weights of graph features and text features, forcing their representations in intermediate layers to maintain semantic consistency. For example, it ensures cross-modal feature interaction by minimizing the cosine distance loss between graph features and text features. Thus, through layer-by-layer injection, each layer contains node embedding information and text-related information, generating model input information with node embeddings. This provides a foundation for the model to learn features from both graph and text data simultaneously during subsequent training.
[0047] In a nation-state cyberattack prediction model based on the fusion of GNN and LLM, the LoRA method is used to fine-tune the model's input information with node embeddings. LoRA achieves efficient model fine-tuning with a minimal number of parameters by freezing the weights of a pre-trained large language model (such as LLaMA) and injecting a trainable rank factorization matrix into each layer of the model. Let W be the weight matrix of a certain layer of the model; according to the LoRA method, it is decomposed into... ,in These are pre-trained weights, which remain unchanged. An approximation is made by the product of two low-rank matrices A and B, i.e. During training, only matrices A and B are updated. To illustrate with a simple example, if the original dimensions of the layer's weight matrix are... (d=1024), in LoRA, setting the low-rank r=16, the dimension of A is... (i.e., 1024) 16), the dimension of B is (i.e., 16) 1024).
[0048] During training, based on the backpropagation algorithm, the gradients of the loss function with respect to A and B are calculated using the model input information with node embeddings, and the values of A and B are updated using gradient descent. At this point, the loss function includes generative loss (such as the cross-entropy between the predicted attack probability and the true value) and adversarial loss (the discrimination error of the domain classifier on graph-text features). By simultaneously optimizing these two types of losses, the fusion effect of cross-modal features is enhanced. For example, using the Adam optimizer, its update formula is: ; ;in, and These are the matrix values for the current training step. This is the learning rate (set to 0.0001). and This represents the gradient of the loss function with respect to A and B at the current step. Through iterative training, A and B are gradually updated, allowing the model to better adapt to the task of predicting inter-state cyberattacks. As training progresses, A and B are continuously updated, ultimately yielding fine-tuned model parameters. These parameters include the optimization results after fusing graph and text data features. After multiple training rounds (T=5), the values of A and B converge to a suitable state. At this point, the updated A and B are compared with the pre-trained weights. By combining these, we obtain the fine-tuned weight matrix for this layer. Each layer of the model is processed in the same way to obtain the fine-tuned parameter information for the entire model. This parameter information records the optimization results of the model in learning the data characteristics related to inter-state cyberattacks, providing a more accurate model parameter foundation for subsequent joint semantic modeling.
[0049] Taking the Transformer architecture as an example of a large language model, it contains multiple attention layers and fully connected layers. During joint semantic modeling, node embeddings from graph data and word embeddings from text data interact within these layers. In the attention layer, the computation of the query, key, and value matrices comprehensively considers features from both types of data. Node embeddings are... The word embedding representation of text data is as follows For a given attention head, when calculating the query matrix Q, key matrix K, and value matrix V, the following will be included: and Combined in a specific way. For example, K , ,in , , It is a learnable weight matrix, and [;] denotes a concatenation operation. In this way, the model can capture the correlation between graph data and text data, such as analyzing potential patterns of interstate cyberattacks (graph data) in the context of a specific news event (text data).
[0050] In the multi-layered structure of the model, through multiple attention calculations and fully connected layer transformations, the semantics of graph and text data are continuously fused and more representative features are extracted. At each layer, the model adjusts the feature representation based on the input data and current parameters, ensuring that the fused features better reflect the intrinsic connection between inter-state cyberattacks and related news events. For example, in one layer, a non-linear activation function (such as the ReLU function) is used. The fused features are processed to enhance the model's expressive power. The fused feature vector x is processed by the ReLU function to obtain... This operation can highlight important features and suppress irrelevant information, thus allowing the model to focus more on key semantic information related to network attack prediction.
[0051] Through multi-layered joint semantic modeling, the model ultimately outputs semantic information that integrates graph and text data. This information provides a comprehensive understanding of inter-state cyberattacks, encompassing various potential patterns and relationships mined from the data. For example, the model output includes semantic vector representations of inter-state relations, attack probability trends, and the impact of related events. Taking countries A and B as an example, the integrated semantic information might indicate that, given the current trade friction (reflected in text data), the probability of country A launching a specific type of cyberattack against country B (reflected in graph data) is likely to increase in the near future, and this trend is closely related to recent diplomatic developments between the two countries. Simultaneously, through attention weight visualization tools, attention head weights related to "military exercise image features - border conflict news" are extracted from the Transformer layer, generating causal explanation chains, such as "satellite images show country A's missile deployment → news reports country A's military exercises → GNN extracts attack chain features → LLM predicts a 23% increase in attack probability," forming an interpretable reasoning path. This integrated semantic information provides rich and valuable input for subsequent inter-state cyberattack predictions, helping to improve the accuracy and reliability of predictions.
[0052] S106 processes the target event set based on a large language model combined with semantic information from fused graph data and text data. It simulates the changes in attack probability under different scenarios through a counterfactual reasoning module to generate prediction results of cyberattacks between countries.
[0053] In one implementation, a large language model is used to extract features from the semantic information of fused graph data and text data to generate fused data feature information. Taking countries A and B as examples, the semantic information of the fused graph data and text data includes the two countries' historical behavior in cyberattacks (such as graph data features like attack type and frequency), satellite image semantic embeddings (such as text descriptions of military base expansion), public opinion sentiment indices, and the semantics implied by related news events (such as text data features like diplomatic relations and trade dynamics). The large language model performs in-depth analysis of this information through its internal multi-layer neural network structure. The model performs semantic understanding of words and sentences in the text, and combines the features of nodes and edges in the graph data, satellite image semantic embeddings, and public opinion sentiment indices to extract representative fused data features. For example, by processing the fused information that "recent trade negotiations between Country A and Country B broke down, satellite images of Country A's border military base show the addition of missile launchers, and social media sentiment towards Country A reaches -90," the model extracts features such as "trade tension +0.8," "military deployment threat level +0.7," "social hostility +0.9," and "rising trend in cyberattack risk." Technically, the model uses an attention mechanism to assign different weights to different parts of the information, highlighting key information. The fused data is represented as follows: The feature weights calculated through the attention mechanism are: After weighted processing, fused data feature information is generated. The calculation formula can be expressed as: ,in Indicates different parts of the fused data. These are the corresponding weights. Large language models can extract valuable features for subsequent predictions from complex fused information.
[0054] The target event set contains a large number of historical cyberattack sequences, historical news event text sequences, image event time-series sequences, and public opinion event time-series sequences. For historical cyberattack sequences, key information such as attack time, attack type, and attack intensity needs to be extracted. For example, in a historical cyberattack sequence, it is recorded that "Country A launched a DDoS attack on Country B on January 5, 2024, lasting for 2 hours and affecting some critical network services in Country B." From this record, features such as attack time (January 5, 2024), attack type (DDoS attack), and attack intensity (affecting some critical network services) can be extracted. For historical news event text sequences, a large language model is used for parsing to extract information such as the countries involved, event theme, and event sentiment. For example, the news text "'Country A and Country B issued a strong statement on a territorial dispute, and relations between the two sides are tense'" can extract features such as the countries involved (Country A and Country B), event theme (territorial dispute), and event sentiment (tension). For image event time series, the time points and semantic descriptions of changes in military facilities are extracted (e.g., "On January 3, 2024, a new radar facility was added to a border base of Country A"). For public opinion event time series, the temporal fluctuations of the public sentiment index are extracted (e.g., "On January 4, 2024, the anti-Country A sentiment index on social media was -90"). By extracting and organizing this information, target event feature information is generated, providing basic data for subsequent correlation analysis.
[0055] This study analyzes the correlation between fused data features and target event features, combining multi-source event causal chains within a dynamic time window (e.g., 72 hours before the attack) to uncover potential connections. Taking previously extracted features as an example, the fused data features "tense trade relations" and "military deployment threat level" may have a causal relationship with the target event features "territorial disputes," "emotional inclination towards tense relations," "changes in military deployments in satellite images 3 days before the attack," and "surge in anti-aggressive public opinion 1 day before the attack." Analysis reveals that when trade tensions, territorial disputes, escalating military deployments, and increased public hostility occur consecutively within 72 hours, the likelihood of a cyberattack significantly increases. Statistical methods or machine learning algorithms can be used for correlation analysis. Cosine similarity is used to measure the degree of correlation between features, particularly for fused data feature vectors. and target event feature vector The formula for calculating cosine similarity is: By calculating the similarity between different feature vectors, we can determine which fused data features are closely related to the target event features. If the calculated cosine similarity between "the degree of trade tension" and "territorial disputes" and "the sentiment tendency of tension between the two sides" is high, it indicates that there is a strong correlation between them. After organizing this correlation information, we can generate correlation analysis results, which provide strong support for subsequent predictions.
[0056] The association analysis results are input into the prediction module of the large language model. The large language model, combined with the counterfactual reasoning module, simulates changes in attack probability under different scenarios, generating preliminary predictions of inter-state cyberattacks. Taking countries A and B as an example, the association analysis results show that in historical cases, the probability of cyberattacks is higher when trade relations between countries A and B are tense, there are territorial disputes, military deployments are escalated, and public opinion is highly hostile. The large language model generates target scenarios (such as "assuming country A cancels trade sanctions" and "assuming country B withdraws its military deployment") through the counterfactual reasoning module. It then uses a graph neural network to generate graph structure features after scenario perturbations (such as updating trade relationship edge weights after trade sanctions are canceled and updating military activity node features after military deployments are withdrawn), which are input into the large language model to simulate the attack probability distribution under different scenarios. For example, after receiving the original correlation information, the model first predicts a 70% probability that country A will launch a cyberattack against country B within the next week under the basic scenario. The attack type could be a DDoS attack or malware attack targeting critical infrastructure. Then, simulating a "lifting trade sanctions" scenario, after the graph neural network updates the weights of the trade relationship edges, the LLM predicts that the attack probability drops to 45%, and the attack type is more inclined towards low-intensity network reconnaissance. This preliminary prediction result includes the probability distribution of different scenarios, but still needs to be verified and adjusted.
[0057] The initial cross-state cyberattack predictions are validated and adjusted. Predictions with scenario simulations are generated by comparing the results with a historical counterfactual case library. This library stores historical predictions and actual attack data for similar scenarios (e.g., "After Country C lifted sanctions against Country D in 2023, the actual attack probability dropped from 60% to 30%"). During validation, the current counterfactual scenario prediction is compared with highly similar historical cases in the library. If the error between the base scenario's predicted attack probability of 70% and a similar case from 2023 exceeds 15%, the current prediction is adjusted based on the actual results of the historical case. Furthermore, domain expert knowledge is incorporated; for example, if experts indicate that Country A's current domestic political elections may prevent it from being subjected to a high-intensity attack, the probability of a high-intensity attack in the "base scenario" prediction is reduced by 20%.
[0058] After verification and adjustments, the final prediction results are generated with scenario simulations. For example: Basic scenario: Country A has a 55% probability of launching a cyberattack against Country B, with the attack type being either a DDoS attack (40% probability) or network penetration (35% probability); Trade sanctions lifted scenario: The attack probability drops to 30%, mainly low-intensity reconnaissance; Military deployment upgrade scenario: The attack probability rises to 80%, possibly targeting critical infrastructure. These results, through scenario probability distributions and causal explanation chains (such as the transmission path of "trade sanctions → military deployment → public opinion sentiment"), provide decision-makers with multi-dimensional predictive support, facilitating the early development of preventative strategies.
[0059] This application aims to address the challenge of predicting interstate cyberattacks by integrating the advantages of Graph Neural Networks (GNNs) and Large Language Models (LLMs) to improve prediction accuracy and interpretability. First, news event data is obtained from the Global Events, Languages, and Tones Database (GDELT), and historical cyberattack data is obtained from the Digital Attack Map (DAM). The LLM is used to perform deep analysis on the news text, and a multimodal dataset is constructed by combining it with the cyberattack data. This dataset is then processed to generate a directed multi-view dynamic graph of the target. Next, the multi-view dynamic graph neural network is used to model the graph, generating node embedding information through structural parsing, parameter initialization, graph self-attention encoding, temporal interactive attention processing, and multi-graph attention fusion. This information is then injected into each layer of the LLM and fine-tuned using the LoRA method to achieve deep semantic fusion of graph and text data. Finally, based on the fused semantic information and the target event set, through feature extraction and association analysis, the LLM predicts, verifies, and adjusts the data to obtain the interstate cyberattack prediction result. The inference process is also output, enhancing decision support capabilities.
[0060] In one implementation, such as Figure 2 As shown, this application also provides a state-to-state network attack prediction device based on the fusion of GNN and LLM, comprising: The acquisition module 201 is used to acquire the target event set and the training sample set, wherein the training sample set includes news event datasets, historical network attack data, satellite remote sensing image datasets, and social media sentiment datasets; Processing module 202 is used to perform content analysis on news texts based on news event datasets using a large language model. Combined with historical cyberattack data, it converts military facility change features in satellite images into text semantic embeddings through a cross-modal alignment module, quantifies the sentiment polarity of social media sentiment into numerical features, and generates a multimodal dataset for cyberattack prediction. The multimodal dataset is processed by layering it according to time granularity. Each layer contains country nodes, event nodes, and relationship nodes. Features at different levels are aggregated through dynamic time windows to generate a target directed multi-view dynamic graph composed of cyberattacks, news events, image events, and public opinion events. The target directed multi-view dynamic graph is modeled based on a multi-view dynamic graph neural network to generate node embedding information. This node embedding information is injected into each layer of the large language model, fine-tuned using the LoRA method, and an adversarial fusion module is introduced. Simultaneously, a causal explanation chain is generated through attention weight visualization, forming the semantic information of the fused graph data and text data. Based on the large language model and the semantic information of the fused graph data and text data, the target event set is processed. A counterfactual reasoning module simulates attack probability changes under different scenarios, generating inter-country cyberattack prediction results.
[0061] The various embodiments in this application are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for evaluating the inter-state network attack prediction method, electronic device, electronic device, and readable storage medium based on the fusion of GNN and LLM are basically similar to the above-described embodiments of the inter-state network attack prediction method based on the fusion of GNN and LLM, and therefore are described relatively simply. Relevant parts can be referred to in the descriptions of the above-described embodiments of the inter-state network attack prediction method based on the fusion of GNN and LLM.
Claims
1. A method for predicting inter-state network attacks based on the fusion of GNN and LLM, characterized in that, include: Obtain the target event set and the training sample set, wherein the training sample set includes news event datasets, historical network attack data, satellite remote sensing image datasets, and social media sentiment datasets; Based on a news event dataset, this study utilizes a large language model to perform content analysis on news texts. Combined with historical cyberattack data, a cross-modal alignment module converts changes in military facilities in satellite images into semantic descriptions of the text. The sentiment polarity of social media sentiment is quantified into a numerical sentiment index, generating a multimodal dataset for cyberattack prediction. The historical cyberattack data is categorized by attacking and attacked countries. Data within each dataset is then sorted by attack time, and an inflection point principle is used to determine a 120-minute time difference threshold for aggregating attack events. After aggregating attack events, duplicate or invalid data, including records with missing attack times or unclear types, is filtered out, generating processed cyberattack data. An attack-event time correlation matrix is constructed, establishing a temporal correlation between each attack and news events, satellite image changes, and public opinion fluctuations within the 72 hours preceding the attack. The multimodal dataset is processed and layered by time granularity. Each layer contains country nodes, event nodes, and relationship nodes. Features from different levels are aggregated through dynamic time windows to generate a target directed multi-view dynamic graph composed of network attack events, news events, image events, and public opinion events. Specifically, the multimodal dataset is processed and layered by time granularity. Each layer contains country nodes, event nodes, and relationship nodes. Features from different levels are aggregated through dynamic time windows. Data from network attack events, news events, image events, and public opinion events are extracted to generate corresponding subsets. Countries are used as nodes, event initiators as source nodes, and victims as target nodes. Node information is generated by combining satellite image geographic coordinate mapping and public opinion entity recognition. Edge information is generated according to event type and temporal causal relationships. A directed graph is constructed based on the generated node and edge information. The graph is divided into four views based on network attack events, news events, image events, and public opinion events. Cross-view edge associations are optimized through a graph attention mechanism to generate the target directed multi-view dynamic graph. The target directed multi-view dynamic graph is modeled and processed based on a multi-view dynamic graph neural network to generate node embedding information; The node embedding information is adapted for dimension and aligned with the feature space. An adversarial fusion module is introduced to generate adapted node embedding information. A large language model is loaded and the pre-trained weights are frozen. Cross-modal alignment constraints are injected when initializing the LoRA matrix. Adapted node embedding information is injected layer by layer. An attention consistency module is inserted between Transformer layers to ensure cross-modal feature interaction. When fine-tuning with LoRA, the adversarial loss and generation loss are optimized simultaneously. A causal explanation chain is generated through an attention weight visualization tool to form the semantic information of the fused graph data and text data. This process utilizes a large language model to combine semantic information from fused graph and text data to process the target event set. A counterfactual reasoning module simulates attack probability changes under different scenarios, generating inter-state cyberattack prediction results. This includes: feature extraction from the semantic information of the fused graph and text data using the large language model to generate fused data feature information; extraction of target event feature information from the target event set; correlation analysis between the fused data feature information and the target event feature information, inputting the correlation analysis results into the prediction module of the large language model; simulating attack probability changes under different scenarios using the large language model combined with the counterfactual reasoning module to generate preliminary inter-state cyberattack prediction information; and verification and adjustment by comparing with a historical counterfactual case library to generate inter-state cyberattack prediction results with scenario simulation.
2. The method as described in claim 1, characterized in that, Based on a news event dataset, this study utilizes a large language model to perform content analysis on news texts. Combined with historical cyberattack data, a cross-modal alignment module converts changes in military facilities in satellite images into text semantic embeddings. Furthermore, it quantifies the sentiment polarity of social media sentiment into numerical features, generating a multimodal dataset for cyberattack prediction, including: Based on a news event dataset, we use a web crawler script to obtain the original news web pages, process them with a parsing tool, and combine them with duplicate item merging to generate the original news text information. Remote sensing image data of military bases, ports, and communication hubs in target countries can be obtained through satellite imagery APIs. For the original news text information, a large language model is used to identify invalid content, determine international relations relevance, identify national roles, and generate event summaries to generate news text analysis information. The LLM-Image cross-modal converter converts the characteristics of changes in military facilities in satellite images into textual semantic descriptions. Social media sentiment is crawled using social media APIs, and the polarity of social media sentiment is quantified using a sentiment analysis model to generate a numerical sentiment index. The historical data of network attacks is divided into attacking and attacked countries, sorted by attack time, and events are aggregated based on a 120-minute time difference threshold. After filtering the data, processed network attack data information is generated. Construct an attack and event time correlation matrix to establish a time-series correlation between each attack and news events, satellite image changes, and public opinion fluctuations within 72 hours prior to the attack. Based on news text analysis information, processed network attack data information, text semantic description, and public opinion sentiment index, a multi-dimensional tensor representation containing text features, image features, numerical features, and temporal features is generated through cross-modal alignment module, serving as a multi-modal dataset for network attack prediction.
3. The method as described in claim 1, characterized in that, The directed multi-view dynamic graph of the target is modeled and processed based on a multi-view dynamic graph neural network to generate node embedding information, including: Perform structural analysis on the target directed multi-view dynamic graph to generate graph structure information; Perform parameter initialization and model loading processing on the multi-view dynamic graph neural network to generate model initialization information; The graph structure information is processed based on the model initialization information, and graph self-attention is used to encode each snapshot of each view to generate initial node feature information. The initial node feature information is processed by temporal interactive attention to learn the temporal evolution pattern. At the same time, the complementary information of different views is used to generate temporal fusion feature information. Multi-graph attention is used to process temporal fusion feature information, fusing features from multiple views to generate node embedding information.
4. A national network attack prediction device based on the fusion of GNN and LLM, characterized in that, The apparatus for implementing the method of claim 1 includes: The acquisition module is used to acquire the target event set and the training sample set. The training sample set includes news event datasets, historical network attack data, satellite remote sensing image datasets, and social media sentiment datasets. The processing module performs content analysis on news texts based on news event datasets using a large language model. It combines this with historical cyberattack data, converts changes in military facilities in satellite images into semantic descriptions through a cross-modal alignment module, and quantifies the sentiment polarity of social media sentiment into a numerical sentiment index, generating a multimodal dataset for cyberattack prediction. This multimodal dataset is then processed, layered by time granularity, with each layer containing country nodes, event nodes, and relationship nodes. Dynamic time windows are used to aggregate features from different levels, generating a dataset composed of cyberattack events, news events, image events, and public opinion events. The target is a directed multi-view dynamic graph. A multi-view dynamic graph neural network is used to model and process the target's directed multi-view dynamic graph, generating node embedding information. This node embedding information is injected into each layer of a large language model, fine-tuned using the LoRA method, and an adversarial fusion module is introduced. Simultaneously, an attention weight visualization tool is used to generate causal explanation chains, forming fused graph and text data semantic information. Based on the large language model and the fused graph and text data semantic information, the target event set is processed. A counterfactual reasoning module simulates attack probability changes under different scenarios, generating inter-state cyberattack prediction results.
5. An electronic device, characterized in that, include: First processor; and memory for storing executable instructions of the first processor; The first processor is configured to execute the interstate network attack prediction method based on the fusion of GNN and LLM as described in any one of claims 1 to 3 by executing the executable instructions.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the second processor, it implements the interstate network attack prediction method based on the fusion of GNN and LLM as described in any one of claims 1 to 3.
