Network threat identification and defense method and system based on data enhancement and adversarial evolution

CN121486068BActive Publication Date: 2026-08-21INFORMATION COMM COMPANY STATE GRID SHANDONG ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511778703.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-08-21
Estimated Expiration
2045-11-28

AI Technical Summary

Technical Problem

这种单一视角导致对攻击特征的刻画不完整,防御系统难以形成覆盖攻击全链路的综合认知,从而增加误报或漏报风险,降低整体检测精度与响应效果

Benefits of technology

本公开的基于数据增强与对抗演化的网络威胁识别防御方法,以结构化与非结构化并重的专业级网络安全知识库为基础,通过检索增强生成技术向大语言模型提供按需知识输入,结合序列化攻击生成机制、生成对抗网络与强化学习驱动的对抗演化闭环,并通过“评估—筛选—写回”机制持续更新对抗经验知识库,从而实现对复杂攻击的高效识别、预测性防御与自适应优化。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121486068B_ABST
    Figure CN121486068B_ABST
Patent Text Reader

Abstract

The present disclosure provides a network threat identification and defense method and system based on data enhancement and adversarial evolution, relating to the technical field of network security defense, comprising: acquiring a log stream of a network event, and preprocessing and vectorizing the same; performing knowledge base RAG retrieval on the vectorized network event, and retrieving attack and defense labels of similar network events in the knowledge base; constructing a prompt word, inputting the prompt word into an LLM inference model, and predicting a next network attack operation; starting a double-agent adversarial network mechanism in the LLM inference model, introducing a reinforcement learning evaluation process, constructing a multi-objective loss function, and taking the multi-objective loss function as an optimization index of the attack sample and a standard for whether to hand over to a defense agent; the defense agent identifies the attack sample, improves the ability to analyze fuzzy attack characteristics by optimizing the prompt word, and obtains an analysis prediction result. The present disclosure improves the modeling and prediction ability of attack sequences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of network security defense technology, specifically to a network threat identification and defense method and system based on data augmentation and adversarial evolution. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] In recent years, with the widespread deployment of internet infrastructure, cloud services, and the Internet of Things (IoT), the number and complexity of cyberattacks have increased significantly, posing serious challenges to the information asset security of enterprises, governments, and key industries. Traditional cybersecurity defense systems mainly rely on signature databases, rule engines, and static or offline trained models based on single data modalities (such as text logs or traffic statistics) to identify and respond to threats. However, attack methods have gradually evolved into attack chains with temporal progression, multiple steps, and stealthy characteristics. Existing technologies have revealed several shortcomings in addressing complex threats, necessitating the development of new technologies to address them. These limitations are manifested in the following aspects: (1) In the existing defense system, the lack of knowledge sources and the ability to integrate multi-source information has become a key factor restricting the effectiveness of defense. Many defense systems still rely primarily on text logs, IDS / IPS alerts, or vulnerability descriptions as information sources, while rarely making systematic use of binary samples (such as static signatures of malicious programs, API call sequences, and behavioral digests) and temporal traffic characteristics of the network or application layer (such as session statistics, payload characteristics, and anomaly frequency). This single perspective leads to an incomplete characterization of attack features, making it difficult for defense systems to form a comprehensive understanding covering the entire attack chain, thereby increasing the risk of false positives or false negatives and reducing the overall detection accuracy and response effectiveness.

[0004] (2) Current defense mechanisms have weak predictive and modeling capabilities when dealing with serialized, multi-step attacks. Traditional detection mechanisms often focus on feature matching of isolated events and lack the ability to characterize the temporal sequence and logical relationships between attack steps. Attackers typically construct attack chains through steps such as probing, exploitation, privilege escalation, lateral movement, and data exploration. If the defense system cannot identify and predict these temporal relationships, it will be difficult to take timely blocking or mitigation measures before critical steps, resulting in high post-attack costs and rapid risk spread.

[0005] (3) Existing defense strategies also have significant limitations in generalization capabilities. Many existing solutions rely on static rules or single models trained on limited samples. These strategies often fail when faced with unknown variants or rapidly evolving attack strategies. Attackers can easily circumvent known rules or model detection by adjusting parameters or combining strategies, causing the defense effectiveness to degrade over time. The lack of online updates and adaptive learning mechanisms makes it difficult to quickly identify and respond to new types of attacks, thus weakening long-term protection capabilities.

[0006] (4) At the same time, there is a general lack of a closed-loop adversarial evolution mechanism between attack generation and defense updates. Current attack and defense exercises are mostly manually constructed or based on fixed scripts, making it difficult to form a training cycle in which the generator and the defender continuously play against each other and drive each other in a simulation environment. The lack of a dynamic process in which attack generation drives defense evolution and defense feedback drives attack optimization leads to a lag in defense strategy updates, making it difficult to continuously improve robustness and combat capability.

[0007] (5) In generative attack and defense systems, the problem of low efficiency in quality assessment and optimization of generated samples is also very prominent. If the generated attack samples lack a systematic multi-dimensional evaluation (such as realism, effectiveness, diversity, feasibility, and novelty), a large number of low-value samples will often be generated, wasting computing resources and adversarial training time, and affecting training efficiency and model improvement speed. The lack of an evaluation mechanism directly limits the effect of co-optimization between the generator and the defender.

[0008] (6) Insufficient coverage and real-time performance of the knowledge base are also significant shortcomings in current technology. Many defense systems rely on manually maintained static knowledge bases or rule bases. These resources are slow to update and costly to maintain when facing new vulnerabilities and new types of attacks. Static knowledge sources are difficult to support on-demand retrieval and automatic invocation, which limits the ability of intelligent agents to obtain the latest threat intelligence in a timely manner and support real-time reasoning and training.

[0009] (7) In actual deployment, the requirements of multi-model fusion, complex feature extraction, and manual annotation make the system architecture complex and computationally expensive, which is not conducive to its promotion and use in large-scale distributed environments. Especially in application scenarios that require ensuring business continuity and compliance auditing, how to efficiently generate and train attack and defense systems in a controlled environment has become a major challenge in reality.

[0010] In summary, existing technologies have significant shortcomings in areas such as multi-source knowledge fusion of text and binary samples, temporal traffic features, serial attack modeling and prediction, defense strategy generalization, adversarial evolution closed loop, quality control of generated samples, and real-time knowledge base updates. These issues directly limit the adaptability and recognition efficiency of intelligent agents in complex and dynamic network environments, reducing the practical effectiveness and sustainable evolution capability of defense systems. Summary of the Invention

[0011] To address the aforementioned issues, this disclosure proposes a network threat identification and defense method and system based on data augmentation and adversarial evolution. It constructs a professional-grade network security knowledge base, provides on-demand knowledge input to a large language model through retrieval-enhanced generation technology, and combines a serialized attack generation mechanism, generative adversarial networks, and a reinforcement learning-driven adversarial evolution closed-loop method. Through an "evaluation-screening-writeback" mechanism, it continuously updates the adversarial experience knowledge base, thereby achieving efficient identification, predictive defense, and adaptive optimization of complex attacks.

[0012] According to some embodiments, the present disclosure adopts the following technical solutions: Network threat identification and defense methods based on data augmentation and adversarial evolution include: Acquire the log stream of network events, and preprocess and vectorize it; The vectorized network events are then retrieved using the RAG knowledge base to obtain attack and defense tags for similar network events in the knowledge base. Construct prompt words, input the prompt words into the LLM inference model, predict the next network attack operation, and extract and implement defenses; In this model, a dual-agent adversarial network mechanism is initiated in the LLM inference model. The attacking agent generates attack samples based on attack and defense labels and prompt words. A reinforcement learning evaluation process is introduced, and the indicator weights are dynamically adjusted according to the current adversarial stage. A multi-objective loss function is constructed and used as the optimization indicator for attack samples and the standard for whether to hand them over to the defending agent. The defending agent identifies attack samples and improves its ability to distinguish fuzzy attack features by optimizing prompt words, thereby obtaining the identification and prediction results.

[0013] According to some embodiments, the present disclosure adopts the following technical solutions: A network threat identification and defense system based on data augmentation and adversarial evolution includes: The log acquisition and preprocessing module is used to acquire the log stream of network events and preprocess and vectorize it. The retrieval module is used to perform knowledge base RAG retrieval on vectorized network events to obtain attack and defense tags for similar network events in the knowledge base; The attack prediction module is used to construct prompt words, input the prompt words into the LLM inference model, predict the next network attack operation, and extract and implement defenses. In this model, a dual-agent adversarial network mechanism is initiated in the LLM inference model. The attacking agent generates attack samples based on attack and defense labels and prompt words. A reinforcement learning evaluation process is introduced, and the indicator weights are dynamically adjusted according to the current adversarial stage. A multi-objective loss function is constructed and used as the optimization indicator for attack samples and the standard for whether to hand them over to the defending agent. The defending agent identifies attack samples and improves its ability to distinguish fuzzy attack features by optimizing prompt words, thereby obtaining the identification and prediction results.

[0014] According to some embodiments, the present disclosure adopts the following technical solutions: A computer program product includes a computer program that, when executed by a processor, implements the network threat identification and defense method based on data augmentation and adversarial evolution.

[0015] According to some embodiments, the present disclosure adopts the following technical solutions: A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the network threat identification and defense method based on data augmentation and adversarial evolution.

[0016] According to some embodiments, the present disclosure adopts the following technical solutions: An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the network threat identification and defense method based on data augmentation and adversarial evolution.

[0017] Compared with the prior art, the beneficial effects of this disclosure are as follows: This disclosed network threat identification and defense method based on data augmentation and adversarial evolution is based on a professional-grade network security knowledge base that emphasizes both structured and unstructured data. It provides on-demand knowledge input to a large language model through retrieval-enhanced generation technology, combines a serial attack generation mechanism, a generative adversarial network, and a reinforcement learning-driven adversarial evolution closed loop, and continuously updates the adversarial experience knowledge base through an "evaluation-screening-write-back" mechanism, thereby achieving efficient identification, predictive defense, and adaptive optimization of complex attacks.

[0018] This disclosed method for network threat identification and defense based on data augmentation and adversarial evolution constructs a professional-grade network security knowledge base. Designed by domain experts, this knowledge base covers all dimensions of network security knowledge, including attack methods, defense strategies, and threat identification, providing a systematic and comprehensive knowledge input for the Large Language Model (LLM), thus equipping it with a solid foundation in network security knowledge. Building upon this, a dual-agent adversarial mechanism is introduced: the attack agent generates attack text based on the LLM's security knowledge, while the defense agent is responsible for identifying and judging the attack text. To clarify the logical connections between attack behaviors, all attack processes are embedded with temporal sequence tags to represent the sequential order of operation steps. Through multiple rounds of adversarial evolution of "attack generation - defense identification," the stealth and diversity of attack text are continuously optimized, while the identification accuracy of the defense agent is iteratively improved.

[0019] This disclosed network threat identification and defense method based on data augmentation and adversarial evolution introduces a reinforcement learning mechanism into the adversarial framework to improve sample optimization efficiency. It designs multi-dimensional quantitative evaluation indicators, primarily targeting the realism, effectiveness, diversity, feasibility, and novelty of attacks, forming indicator judgments for attack samples. At this stage, the judgment phase of the defense agent is not required, reducing ineffective adversarial consumption. For attack texts evaluated as high-quality through reinforcement learning, in addition to being used in adversarial interactions with the defense agent, they are further stored in an "adversarial experience knowledge base." On the one hand, this provides the attack agent with reusable successful experience templates, enabling it to learn from the temporal logic and feature design of high-scoring samples in subsequent generation, accelerating the evolution of attack strategies. On the other hand, this knowledge base simultaneously serves as an incremental training data source for the defense agent, continuously updating identification rules and judgment models by learning the concealed features and novel attack patterns of high-scoring attack samples, thereby improving the ability to detect complex attack behaviors. Finally, this "adversarial experience knowledge base" should be added to the initial cybersecurity knowledge base. It's important to distinguish it from the initial knowledge base, forming two large, comprehensive knowledge bases. This comprehensive knowledge base will be used by the agent to learn from, allowing for subsequent rounds of optimization. Ultimately, this forms a complete technical loop of "knowledge input learning - reinforcement learning pre-optimization - dual-agent adversarial learning - experience accumulation - bidirectional learning - knowledge base writing back," effectively enhancing the agent's defensive adaptability and threat identification efficiency in dynamic cybersecurity environments. Attached Figure Description

[0020] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.

[0021] Figure 1 This is a flowchart illustrating the network threat identification and defense method based on data augmentation and adversarial evolution, as described in this disclosure. Detailed Implementation

[0022] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0023] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0024] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0025] Terminology Explanation 1. AI Agent: A computational entity that exhibits intelligent behavior through autonomy, responsiveness, initiative, and social capabilities. It interacts with its environment and users, achieving specific goals by perceiving input, reasoning about tasks, planning, acting, and using internal and external tools to perform tasks. Currently, AI agents are driven by large language models (such as GPT-4), a method that has revolutionized task completion across various domains, including healthcare, finance, customer service, and agent operating systems. These systems leverage the advanced capabilities of large language models in reasoning, planning, and action, enabling them to perform complex tasks with exceptional performance.

[0026] 2. Generative Adversarial Networks (GANs): Adversarial networks are a class of deep learning frameworks based on game theory. Their core principle is to improve performance on specific tasks through dynamic adversarial competition and collaborative optimization between two or more models. Generative Adversarial Networks (GANs) are the most representative branch. A GAN is a dual-model architecture consisting of a generator and a discriminator, jointly trained through a minimax game. The generator learns the probability distribution of real data, generating "fake samples" highly similar to real data; the discriminator distinguishes between "real data" and "generated fake samples." The ultimate goal is to make the samples generated by the generator so indistinguishable from the discriminator, reaching a Nash equilibrium. At this point, the generator possesses high-quality sample generation capabilities, and the discriminator achieves optimal discrimination performance.

[0027] 3. Reinforcement Learning (RL): Reinforcement learning refers to the process by which an agent learns the optimal policy by continuously performing actions, receiving state feedback, and receiving reward signals in an environment. Its essence is solving the "sequential decision problem." The agent needs to dynamically select actions in a time series, considering not only current rewards but also the cumulative sum of future rewards. The ultimate goal is to enable the agent to maximize cumulative rewards through policy-based actions in its interactions with the environment.

[0028] 4. RAG (Retrieval-Augmented Generation): This refers to a technical framework that combines "information retrieval" and "generative model". Its core is to provide content support for generative models (such as LLM) by retrieving accurate information from external knowledge bases, thereby improving the accuracy, reliability and timeliness of the output.

[0029] 5. Prompt: This refers to the input text used to guide, constrain, or inspire artificial intelligence generative models (such as Large Language Models (LLM) and generative AI tools) to output specific content. It is the core carrier for conveying task intent and providing contextual information during human-computer interaction, directly affecting the relevance, accuracy, and quality of the generative model's output. It is a crucial bridge connecting user needs and AI capabilities.

[0030] Example 1 One embodiment of this disclosure provides a network threat identification and defense method based on data augmentation and adversarial evolution, the method steps of which include: Step 1: Obtain the log stream of network events, and preprocess and vectorize it; Step 2: Perform a knowledge base RAG search on the vectorized network events to obtain attack and defense tags for similar network events in the knowledge base; Step 3: Construct cue words, input the cue words into the LLM inference model to predict the next network attack operation, and extract and implement defenses; In this model, a dual-agent adversarial network mechanism is initiated in the LLM inference model. The attacking agent generates attack samples based on attack and defense labels and prompt words. A reinforcement learning evaluation process is introduced, and the indicator weights are dynamically adjusted according to the current adversarial stage. A multi-objective loss function is constructed and used as the optimization indicator for attack samples and the standard for whether to hand them over to the defending agent. The defending agent identifies attack samples and improves its ability to distinguish fuzzy attack features by optimizing prompt words, thereby obtaining the identification and prediction results.

[0031] As one embodiment, the network threat identification and defense method based on data augmentation and adversarial evolution disclosed herein is based on a professional-grade network security knowledge base that emphasizes both structured and unstructured data. It provides on-demand knowledge input to a large language model through retrieval enhancement generation technology, combines a serial attack generation mechanism, a generative adversarial network, and a reinforcement learning-driven adversarial evolution closed loop, and continuously updates the adversarial experience knowledge base through an "evaluation-screening-write-back" mechanism, thereby achieving efficient identification, predictive defense, and adaptive optimization of complex attacks.

[0032] First, a professional-grade cybersecurity knowledge base is constructed. Designed by domain experts, this base covers all dimensions of cybersecurity knowledge, including attack methods, defense strategies, and threat identification. It provides systematic and comprehensive knowledge input for the Large Language Model (LLM), giving it a solid foundation in cybersecurity knowledge. Building upon this, a dual-agent adversarial network mechanism is introduced: the attacking agent generates attack text based on the LLM's security knowledge, while the defending agent is responsible for identifying and judging the attack text. To clarify the logical connections between attack behaviors, all attack processes are embedded with temporal sequence tags to represent the order of operation steps. Through multiple rounds of adversarial evolution of "attack generation - defense identification," the stealth and diversity of attack text are continuously optimized, while the recognition accuracy of the defending agent is iteratively improved.

[0033] Secondly, a reinforcement learning mechanism is introduced into this adversarial framework to improve sample optimization efficiency. Multi-dimensional quantitative evaluation indicators are designed, primarily targeting the realism, effectiveness, diversity, feasibility, and novelty of attacks, forming indicator judgments for attack samples. After the attack agent generates attack text, the reinforcement learning evaluation module first performs a pre-judgment based on the above indicators. If the predicted indicators are lower than a preset threshold, the sample is directly fed back to the attack agent's optimization module for targeted iterative modification based on the shortcomings identified in the judgment results. At this point, it does not need to enter the judgment stage of the defense agent, reducing ineffective adversarial consumption. If the predicted indicators reach or exceed the threshold, the sample is input into the defense agent for identification and judgment. Note that normal and safe inputs can also be mixed in, further enabling the defense agent to make a comprehensive judgment. For attack texts evaluated as high-quality by reinforcement learning, in addition to being used in adversarial interactions with the defense agent, they are further stored in an "adversarial experience knowledge base." On the one hand, this knowledge base provides reusable successful experience templates for attack agents, enabling them to learn from the temporal logic and feature design of high-scoring samples in subsequent generation, thus accelerating the evolution of attack strategies. On the other hand, this knowledge base simultaneously serves as an incremental training data source for defense agents. By learning the covert features and novel attack patterns of high-scoring attack samples, it continuously updates identification rules and judgment models, improving the ability to detect complex attack behaviors. Finally, this "adversarial experience knowledge base" should be added to the initial cybersecurity knowledge base, but it is important to distinguish it from the initial knowledge base, forming two large-scale comprehensive knowledge bases that are integrated into one. This knowledge base is then used by the agent for learning, allowing for subsequent rounds of optimization. Ultimately, this forms a complete technical closed loop of "knowledge input learning - reinforcement learning pre-optimization - dual-agent adversarial learning - experience accumulation - bidirectional learning - knowledge base writing back," effectively enhancing the agent's defensive adaptability and threat identification efficiency in dynamic cybersecurity environments.

[0034] As one embodiment, the network threat identification and defense method based on data augmentation and adversarial evolution disclosed herein is implemented in several parts. First, a professional-grade network security knowledge base is constructed. Then, a dual-agent adversarial mechanism is implemented, utilizing Generative Adversarial Network (GAN) technology and incorporating reinforcement learning support. The specific implementation process is as follows: Step 1: Build a professional-grade cybersecurity knowledge base; Acquire network event log streams and construct a professional-grade cybersecurity knowledge base. This knowledge base employs a hybrid structured and unstructured storage framework, with the knowledge system framework designed under the leadership of domain experts, and includes three core modules: (1) Basic security knowledge module: including network security protocols (TCP / IP, HTTPS, etc.), common vulnerability types (SQL injection, XSS, buffer overflow, etc.), attack principles (APT attack chain, ransomware propagation mechanism, etc.), and defense technologies (firewall rules, intrusion detection system (IDS) principles, etc.), mainly using structured data (such as Markdown tables and JSON fields) to facilitate subsequent retrieval and parsing.

[0035] (2) Case Library Module: Includes real network attack case studies (such as SolarWinds supply chain attack, Colonial Pipeline ransomware attack), attack and defense exercise scenario records, mainly in unstructured text (event reports, technical analysis documents), with expert-annotated key attack steps, defense failure points and other tags.

[0036] (3) Rules and Indicators Module: Includes attack feature rules (such as malicious code signatures and abnormal traffic features) and defense effectiveness evaluation indicators (such as false negative rate and false positive rate), stored in the form of a structured rule base (such as YARA rules and Snort rules).

[0037] Furthermore, the preprocessing stage requires knowledge cleaning to remove duplicate and outdated information, and to perform structured indexing (adding domain tags, keywords, and time-series logical markers to unstructured text) and format unification, converting PDF, Word, and other document vectors into LLM-parsable text format, laying the foundation for subsequent RAG retrieval and tool calls.

[0038] As one implementation, during the learning phase of an application, a tool is needed to access and browse knowledge for learning. This involves storing the knowledge base in a tool, allowing the agent to access and learn automatically. Simultaneously, during application, such as when an attack agent generates attack text, targeted retrieval and learning should be performed based on the actual generated text to improve performance. This is achieved using RAG retrieval technology. RAG retrieval technology acts as a "bridge" between the LLM and the knowledge base, enabling "on-demand retrieval and precise data feeding."

[0039] Step 2: Perform a knowledge base RAG search on the vectorized network events to obtain attack and defense tags for similar network events in the knowledge base; Specifically, by using RAG retrieval technology, real-time knowledge association between the knowledge base and the intelligent agent is achieved. Before generating attack samples or performing defense judgments, the intelligent agent can retrieve attack methods, defense rules, case characteristics, and other content from the knowledge base as needed, ensuring that it has a solid professional understanding of cybersecurity.

[0040] Step 3: Construct the input prompts. The prompts include system-level strong instructions, role-based prompts, and retrieved attack and defense tags. These prompts are integrated and input into the LLM inference model to predict the next network attack operation and extract the defense to be implemented. System-level strong instructions refer to a set of global, high-priority instructions pre-defined by the system designer to constrain the behavioral boundaries of the Large Language Model (LLM). These are not general prompts, but rather the core rules and task framework that the LLM must follow throughout the attack and defense inference process. Role-based prompts refer to the roles, capabilities, and task contexts assigned to the LLM to perform different attack and defense tasks; both are pre-defined.

[0041] Specifically, the LLM inference model is an LLM large language model, which includes an attacking agent and a defending agent. The dual-agent adversarial network mechanism is activated in the LLM inference model. At this time, the agent is given prompt words to help it understand its own role, etc. Reinforcement prompt words are also added to help the agent complete the subsequent tasks better. At the same time, reinforcement learning is combined to achieve bidirectional iterative optimization of attack and defense capabilities.

[0042] Furthermore, the goal of the attacking agent is to generate attack samples that are "highly adversarial and highly covert." Its reinforcement learning evaluation metrics focus on realism, effectiveness, diversity, and novelty, and the weights of these metrics are dynamically adjusted according to the current adversarial stage. The goal of the defending agent is to accurately identify attack samples. Its optimization criteria include recognition accuracy, false positive rate, and judgment efficiency. At the same time, it improves its ability to distinguish ambiguous attack features by optimizing prompt words.

[0043] As one embodiment, attack agents and defense agents are applied to generative adversarial networks and reinforcement learning. First, the attack agent generates attack samples based on relevant knowledge and prompts. The generated samples undergo standardized pre-judgment, with evaluation metrics including realism, effectiveness, diversity, feasibility, and novelty. Specifically, these metrics include: (1) Realism: The generated attack sequences are similar to the distribution of historical real attack samples. A discriminator (defense agent) or distance metric is used for judgment.

[0044] In the realism evaluation process, the sequences generated by the attacking agent are first mapped to a unified feature vector space and aligned with the embedding representations of historical real attack samples in the knowledge base. Then, the defending agent acts as a discriminator to comprehensively evaluate the semantic consistency, logical rationality of the behavior, and statistical distribution of the attack steps of the input sequences. To quantify realism, the system employs a dual evaluation method based on vector similarity and distribution distance. First, sample vectors are generated through calculation. Compared with the real sample vector Cosine similarity:

[0045] The above formula is used to measure the degree of semantic fit between the two. Secondly, a distance metric is used to measure the feature distributions of the generated sequence and the actual attack sequence, employing Mahalanobis distance:

[0046] in, The covariance matrix of the real samples is used to characterize the degree of deviation of the generated samples from the overall policy distribution. Internally, the discriminator also performs consistency checks on the logical chain of the attack sequence, including implicit features such as step transition probabilities, call pattern correlation, and the triggering order of key behaviors. A scoring function is used to comprehensively quantify the realism.

[0047] in, and Adjustments are made dynamically based on the phase of the competition. When the overall score exceeds a preset threshold... If no pattern collapse or logical abrupt change occurs, the generated sequence is considered a highly realistic and effective attack sample; if the score is too low, the sample is fed back to the optimization module of the attack agent so that it can more closely resemble the statistical characteristics and strategy structure of historical real attack behavior in subsequent generation.

[0048] (2) Effectiveness: Whether the attack can bypass the current defense strategy. The specific process is as follows: run in an abstract sandbox environment, calculate the attack "penetration score", and simulate the probability of being blocked or the false alarm rate.

[0049] Specifically, in the effectiveness evaluation, an abstract, multi-layered security sandbox environment is first constructed. This environment consists of a network access control model, an intrusion detection rule set, a behavior feature matcher, and a resource access constraint module. It simulates the protection chain in a real-world operating environment and comprehensively measures the executability, propagation, and evasion capabilities of attack sequences. The sequences generated by the attack agent are executed step-by-step within the sandbox. Each step is judged by the defense strategy model, including whether it matches the rule base, whether it triggers anomaly scoring thresholds, and whether it results in access denial. Based on these results, the system calculates the attack penetration score. It is defined as the proportion of critical steps in an attack sequence that successfully pass through defense interception, combined with the false positive rate and the blocking probability to form a combined evaluation. To achieve quantifiable effectiveness judgment, the system adopts the following comprehensive scoring model:

[0050] in, This represents the number of operation steps in the attack sequence. Indicates the first Whether the step is blocked by the defense rules in the sandbox environment (blocked is 1, passed is 0). Simultaneously, to measure the strategy avoidance capability, the system establishes a blocking model for the trigger probability of the sequence within the defense system:

[0051] in, The trigger probability for each rule-based hit is dynamically estimated by the anomaly feature model. The final effectiveness score is formed by balancing the "penetration score" and the "false alarm trigger rate."

[0052] in, and The weighting coefficients are dynamically adjusted according to the offensive and defensive phases, reflecting the emphasis on "breakthrough" or "stealth" in the current training cycle. When Exceeding the preset threshold If the attack process does not fail to execute, break logic, or be directly rejected by rules in the sandbox, it indicates that the attack sequence has a high breakthrough capability under the existing defense system and can be regarded as a highly effective sample. If the score is low, it is fed back to the attack agent optimization module to prompt it to improve the avoidance strategy, feature perturbation design, and step sequence organization in subsequent generation, thereby enhancing the overall attack effectiveness.

[0053] (3) Diversity: Avoid the generator from generating only one pattern. Diversity is calculated by statistically analyzing the feature / policy distance between generated samples.

[0054] Specifically, to measure whether pattern collapse occurs during the generation process of the attack agent, the system collects feature vector representations of attack sequences in each generation batch and performs a difference analysis on their semantic features, policy structure, and step sequence. First, the model maps each generated sample to a unified high-dimensional feature space to characterize the semantic content of the attack behavior and the policy combination method. Then, it calculates the pairwise feature distance between samples to determine whether different generated sequences maintain sufficient difference in attack path, parameter configuration, command combination method, and step order. The system is based on the feature vector set. A diversity measure function is constructed to quantify the overall diversity level by calculating the average distance between sample pairs. Its average distance in the feature space can be expressed as:

[0055] in, This represents the number of samples generated in this batch. The feature distance function is used. To further reflect the diversity at the policy level, the system also constructs a policy structure representation of the attack step sequence, describing the divergence of attack paths by calculating the edit distance between sequences or the structural difference between policy trees. Specifically, for any two attack sequences, the policy structure graph... and The system uses the widely adopted graph editing distance as a metric, and calculates... Convert to The policy distance is defined by the minimum cost of the required node replacement, insertion, and deletion operations.

[0056] in, This represents the graph edit distance, which can also degenerate into step edit distance (such as Levenshtein distance) in sequential attack paths. It describes the degree of deviation between step order, action type, and policy logic. The average diversity score at the policy level within a batch can be expressed as:

[0057] Finally, the feature space difference and the strategy structure difference are fused to construct a comprehensive diversity score:

[0058] in, The weighting coefficients are dynamically adjusted during the training phase to balance the importance of semantic and policy differences. When the overall diversity score is significantly higher than the set threshold, it indicates that the generator can adequately explore different attack strategies. If the score is low, it indicates that the generator is at risk of pattern collapse. The system then feeds back the batch of samples to the attack agent optimization module to improve the diversity and coverage of the generated sequences through policy perturbation, structural transformation, or cue word adjustment.

[0059] (4) Feasibility: Whether the attack sequence conforms to logic and environmental constraints. The specific calculation process involves using rule filters or environmental constraints to determine, for example, whether the order of scanning → penetration → privilege escalation is legal.

[0060] (5) Novelty: Whether it provides a new attack pattern compared with existing samples. By comparing the similarity between the generated sample and the knowledge base vector, the greater the distance, the more novel it is.

[0061] Specifically, in the novelty assessment process, the system first encodes the attack sequence generated by the attacking agent into a vector embedding representation, and performs a unified feature space mapping with the embeddings of historical attack samples stored in a professional-grade cybersecurity knowledge base and an adversarial experience knowledge base, so as to compare the degree of difference from the semantic, policy, and behavioral pattern levels. Subsequently, the system calculates the generated sequence vectors. With the set of all sample vectors in the knowledge base The similarity between samples is used, with minimum similarity or maximum distance serving as an important criterion for measuring the novelty of the sample. To quantify novelty, a distance-based offset metric is introduced:

[0062] As the distance between the generated sample and any known attack sample in the knowledge base increases, it indicates that the generated sample exhibits more previously unseen behavioral patterns or strategy combinations. Furthermore, a probability distribution model of attack behavior is constructed to analyze the strategy distribution of the generated samples. Distribution of historical attack strategies The degree of deviation between them is calculated and evaluated using KL divergence or Jensen-Shannon distance to further capture distributional differences at the strategy level, reflecting the overall deviation of new attack paths from existing attack paradigms:

[0063] In summary, the novelty score is calculated by fusing distance bias and distribution shift:

[0064] in, To balance "policy innovation" and "semantic difference," weight parameters are dynamically adjusted during the training phase. When the overall novelty score exceeds a preset threshold... If the score is high, it indicates that the generated sample has obvious innovative features in terms of behavioral logic, attack chain structure, or strategy combination. It can be regarded as a highly novel attack sample and will be given priority to be written into the adversarial experience knowledge base. If the score is low, it means that the generated content is too similar to existing attack samples. The system will feed it back to the attack agent optimization module to encourage it to explore more differentiated attack paths and strategy structures in subsequent generation, thereby enhancing the innovation of the overall attack mode.

[0065] Furthermore, the optimization objective of the attack agent is F = realism (A) + effectiveness (B) + feasibility (C) + diversity (D) + novelty (E), where each indicator can be quantified and scored, forming the multi-objective loss function of the Generator. This loss function is used to judge the quality of the generated attack text, serving as an optimization indicator and a standard for whether to submit it to the discriminator (defense agent).

[0066] As one example, the specific process of judging the quality of the generated attack text and using it as an optimization metric and a standard for whether to submit it to the discriminator (defense agent) includes: If the metric does not exceed expectations, reinforcement learning optimization is performed until the expected result is reached and then handed over to the discriminator for judgment. Regardless of the discriminator's judgment result, optimization is performed in conjunction with the loss function. The difference is that if the discriminator's judgment is successful, then optimization is also performed in conjunction with this judgment result.

[0067] For the discriminator, an evaluation experience base is added, and some basic evaluation criteria are designed as initialization. Regardless of success or failure, the prompt words and evaluation experience base are optimized; this process is reinforcement learning, where the discriminator continuously learns and optimizes the evaluation experience base. An excellence level is set; if the generated attack text exceeds this level, it is added to the "adversarial experience knowledge base" for reference by both the attacking and defending agents during subsequent optimization. After approximately 50 iterations, the evaluation experience base is finally added to the "adversarial experience knowledge base" to form a comprehensive learning base. A highly excellent "adversarial experience knowledge base" is generated, which not only enriches the initial knowledge base but also provides other agents with learning opportunities, thus enabling the discriminator to identify cybersecurity attacks. This process is repeated through multiple iterations to continuously enrich the "adversarial experience knowledge base."

[0068] Example 2 One embodiment of this disclosure provides a network threat identification and defense system based on data augmentation and adversarial evolution, comprising: The log acquisition and preprocessing module is used to acquire the log stream of network events and preprocess and vectorize it. The retrieval module is used to perform knowledge base RAG retrieval on vectorized network events to obtain attack and defense tags for similar network events in the knowledge base; The attack prediction module is used to construct prompt words, input the prompt words into the LLM inference model, predict the next network attack operation, and extract and implement defenses. In this model, a dual-agent adversarial network mechanism is initiated in the LLM inference model. The attacking agent generates attack samples based on attack and defense labels and prompt words. A reinforcement learning evaluation process is introduced, and the indicator weights are dynamically adjusted according to the current adversarial stage. A multi-objective loss function is constructed and used as the optimization indicator for attack samples and the standard for whether to hand them over to the defending agent. The defending agent identifies attack samples and improves its ability to distinguish fuzzy attack features by optimizing prompt words, thereby obtaining the identification and prediction results.

[0069] Example 3 One embodiment of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the network threat identification and defense method based on data augmentation and adversarial evolution.

[0070] Example 4 One embodiment of this disclosure provides a non-transitory computer-readable storage medium for storing computer instructions. When these computer instructions are executed by a processor, they implement the network threat identification and defense method based on data augmentation and adversarial evolution.

[0071] Example 5 One embodiment of this disclosure provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the network threat identification and defense method based on data augmentation and adversarial evolution.

[0072] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0073] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0074] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.

Claims

1. A network threat identification and defense method based on data augmentation and adversarial evolution, characterized in that, include: Acquire the log stream of network events, and preprocess and vectorize it; The vectorized network events are then retrieved using the RAG knowledge base to obtain attack and defense tags for similar network events in the knowledge base. Construct prompt words, input the prompt words into the LLM inference model, predict the next network attack operation, and extract and implement defenses; In this model, a dual-agent adversarial network mechanism is initiated in the LLM inference model. The attacking agent generates attack samples based on attack and defense labels and prompt words. A reinforcement learning evaluation process is introduced, and the indicator weights are dynamically adjusted according to the current adversarial stage. A multi-objective loss function is constructed and used as the optimization indicator for attack samples and the standard for whether to hand them over to the defending agent. The defending agent identifies attack samples and improves its ability to distinguish fuzzy attack features by optimizing prompt words, thereby obtaining the identification and prediction results.

2. The network threat identification and defense method based on data augmentation and adversarial evolution as described in claim 1, characterized in that, The knowledge base is a professional-grade cybersecurity knowledge base, employing a hybrid structured and unstructured storage architecture. It includes a basic security knowledge module, a case study module, and a rules and indicators module. The basic security knowledge module includes network security protocols, common vulnerability types, attack principles, and defense technologies, primarily using structured data. The case study module includes real-world network attack incident cases and attack and defense exercise scenario records, primarily using unstructured text, supplemented with expert-annotated key attack steps and defense failure point tags. The rules and indicators module includes attack characteristic rules and defense effectiveness evaluation indicators, stored in a structured rule base format.

3. The network threat identification and defense method based on data augmentation and adversarial evolution as described in claim 1, characterized in that, The process of acquiring the log stream of network events and preprocessing and vectorizing it includes: knowledge cleaning in the preprocessing stage to remove duplicate and outdated information, adding domain tags, keywords and time sequence logic tags to unstructured text, establishing structured indexes, vectorizing PDF and Word documents, and converting them into a text format that LLM can parse.

4. The network threat identification and defense method based on data augmentation and adversarial evolution as described in claim 1, characterized in that, The LLM inference model includes an attack agent and a defense agent, employing a dual-agent adversarial network mechanism. The attack agent aims to generate highly adversarial and covert attack samples. Its reinforcement learning evaluation metrics include realism, effectiveness, diversity, feasibility, and novelty, with the weights of these metrics dynamically adjusted according to the current adversarial stage. The defense agent aims to identify attack samples, and its optimization criteria include recognition accuracy, false positive rate, and decision efficiency. Simultaneously, it enhances its ability to distinguish ambiguous attack features by optimizing prompt words.

5. The network threat identification and defense method based on data augmentation and adversarial evolution as described in claim 4, characterized in that, The attack agent generates attack samples based on attack and defense tags and prompts. It performs standard pre-judgments on the generated samples. Among them, the realism index is that the generated attack sample sequence is similar to the distribution of historical real attack samples; the effectiveness index is whether the current attack can bypass the current defense strategy; the diversity index is to avoid the generator generating only one pattern; the feasibility index is whether the attack step sequence conforms to logic and environmental constraints; and the novelty index is whether it provides a new attack pattern compared with existing samples.

6. The network threat identification and defense method based on data augmentation and adversarial evolution as described in claim 5, characterized in that, Each metric can be quantified and scored, forming the Generator's multi-objective loss function. The multi-objective loss function is used to judge the quality of the attack text generated by the attacking agent, and uses it as an optimization metric and a standard for whether to hand it over to the defending agent. If the metric does not exceed the expectation, reinforcement learning optimization is performed until the expectation is met and the text is handed over to the defending agent for judgment. Regardless of the defending agent's judgment, the loss function is always used for optimization.

7. A network threat identification and defense system based on data augmentation and adversarial evolution, characterized in that: include: The log acquisition and preprocessing module is used to acquire the log stream of network events and preprocess and vectorize it. The retrieval module is used to perform knowledge base RAG retrieval on vectorized network events to obtain attack and defense tags for similar network events in the knowledge base; The attack prediction module is used to construct prompt words, input the prompt words into the LLM inference model, predict the next network attack operation, and extract and implement defenses. In this model, a dual-agent adversarial network mechanism is initiated in the LLM inference model. The attacking agent generates attack samples based on attack and defense labels and prompt words. A reinforcement learning evaluation process is introduced, and the indicator weights are dynamically adjusted according to the current adversarial stage. A multi-objective loss function is constructed and used as the optimization indicator for attack samples and the standard for whether to hand them over to the defending agent. The defending agent identifies attack samples and improves its ability to distinguish fuzzy attack features by optimizing prompt words, thereby obtaining the identification and prediction results.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the network threat identification and defense method based on data augmentation and adversarial evolution as described in any one of claims 1-6.

9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the network threat identification and defense method based on data augmentation and adversarial evolution as described in any one of claims 1-6.

10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the network threat identification and defense method based on data augmentation and adversarial evolution as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Network attack and defense decision support method and system based on artificial intelligence

    CN119155099A

  • Generative confrontation-driven intelligent security defense method and system

    CN120602194A