Cooperative enhancement method oriented to APT knowledge graph and large language model

By building an APT knowledge graph focused on the field of network security and working together with a large language model, the problem of domain barriers is solved, the semantic understanding and reasoning capabilities of the large language model in APT scenarios are improved, and more accurate and transparent analysis results are provided. , Enhanced defense and response capabilities against APT attacks.

CN118802369AActive Publication Date: 2024-10-18INFORMATION & COMMNUNICATION BRANCH STATE GRID JIANGXI ELECTRIC POWER CO +1

Patent Information

Application Number
CN202411265988.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-10-18
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

In the existing technology, there are domain barriers in the collaborative work of APT knowledge graphs and large language models, which are difficult to break. As a result, the knowledge graph is not close enough to the actual threat situation and cannot provide accurate and comprehensive information, which limits the ability to defend and respond to APT attacks.

Method used

By constructing an APT knowledge graph focusing on the field of network security, combined with the large language model, we design chain prompts for step-by-step answers, use sub-graphs to retrieve strongly related nodes to enrich context-aware prompts, generate comprehensive answers, and realize the use of large language models in Improved semantic understanding and reasoning capabilities in APT scenarios.

Benefits of technology

It improves the accuracy and adaptability of large language models in APT scenarios, enhances in-depth understanding and reasoning capabilities of threat intelligence, provides more accurate and transparent analysis results, and enhances defense and response capabilities against APT attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802369A_ABST
    Figure CN118802369A_ABST
Patent Text Reader

Abstract

The invention discloses a collaborative enhancement method oriented to an APT knowledge graph and a large language model. The collaborative enhancement method comprises the following steps: S1, constructing the APT knowledge graph focusing on the field of network security; s2, designing chained prompt words according to questions input by a user, sequentially transmitting the chained prompt words to the large language model for step-by-step answering, and querying and positioning the questions by the large language model by utilizing knowledge provided by the APT knowledge graph; s3, in combination with the positioned APT knowledge nodes and question content input by the user, enriching context sensing prompts by using strong correlation nodes retrieved by the sub-graph; and S4, the big language model generates a comprehensive answer for the user according to the context perception prompt. According to the method, the semantic comprehension, reasoning and prediction capabilities of the large language model in an APT scene are enhanced, the large language model can better analyze and deduce behaviors and attack paths of attackers, the accuracy in a complex network environment is improved, and the defending and coping capabilities for APT attacks are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network security technology, and specifically relates to a collaborative enhancement method for APT knowledge graphs and large language models. Background Art

[0002] Advanced Persistent Threat (APT), also known as advanced long-term threat, is a complex and persistent network attack, and is a major threat to important government and corporate assets in cyberspace. Due to the concealment and persistence of APT attacks, traditional network detection methods often cannot effectively identify them.

[0003] Cyber ​​Threat Intelligence (CTI) provides security researchers with an opportunity to gain in-depth insights into APT attacks. By collecting and analyzing threat intelligence, security professionals can identify and understand potential APT threats, including information such as attackers' behavior patterns, tools and techniques used, and target areas. This understanding enables organizations to take appropriate prevention, detection, and response measures to improve their ability to combat APT attacks.

[0004] At present, the main challenges faced by APT attack detection include the difficulty of detecting advanced intrusion methods and the difficulty of discovering long-term latent concealment. In order to cope with these challenges, knowledge graphs can be used to track and analyze APT organizations.

[0005] Knowledge graph (KG), as a semantic relationship model, can organize and represent knowledge in a graphical structure. Through knowledge graph technology, various threat information can be structured and associated, so that threat information can be easily obtained and analyzed. In the field of network security, knowledge graphs can be used to integrate knowledge about threat evolution, attacker behavior, and vulnerability information to understand threat intelligence more comprehensively and deeply, so that security researchers can accurately and efficiently obtain the various threat information they need.

[0006] The rise of large language models (LLMs) has become the core driving force for intelligent knowledge graphs, providing powerful language processing capabilities for the modeling, understanding and application of knowledge graphs. The key to knowledge graphs is to accurately extract the relationships between entities and perform reasoning analysis. By learning a large amount of text data, large language models can capture relational information in context, improve the accuracy of relationship extraction in knowledge graphs, and support reasoning about relationships to a certain extent. Large language models can automatically extract entities and relationships from text by processing large-scale corpora, facilitating the construction of knowledge graphs. In addition, large language models can also help knowledge graphs stay updated and adapt to new contexts and expressions by learning new language expressions, providing new possibilities for processing complex threat intelligence.

[0007] The domain-specific knowledge learning ability of LLMs enables them to better adapt to the construction of domain-specific knowledge graphs, especially in the field of network security. By introducing professional terminology, attack methods and language styles in the field of network security, LLMs help to build a more accurate APT knowledge graph focused on the field of network security. Integrating the APT knowledge graph into the large language model can enhance the contextual understanding and reasoning ability of threat intelligence, provide more accurate and customized analysis results, and help to deeply mine threat information related to APT organizations. The APT knowledge graph based on the large language model can perform targeted threat modeling, better capture the behavior patterns, target areas and attack chains of APT attackers, and help improve the level of identification and prevention of specific threats.

[0008] By combining LLMs with expertise in the APT field, we can break down domain barriers in knowledge graph construction, making the knowledge graph closer to actual threat scenarios and providing security professionals with more accurate and comprehensive information, thereby enhancing the ability to defend and respond to APT attacks.

[0009] The fusion of knowledge graphs and large language models can be achieved through three main paths, namely, Knowledge Graph-enhanced Large Language Models, Large Language Model-enhanced Knowledge Graphs, and Collaborative Large Language Models and Knowledge Graphs.

[0010] KG-enhanced LLMs: In this route, knowledge graphs are used to enhance the training and reasoning process of large language models. The entity and relationship information in the knowledge graph is organically integrated into the language model to improve the model's understanding of context and entity relationships. By providing structured entity relationship information, the knowledge graph enhances the language model's ability in context understanding and relationship reasoning, especially for language generation tasks involving scarce entities and relationships, and can generate more accurate and rich text.

[0011] LLMs-enhanced KGs: In this approach, large language models are used to enhance tasks such as information extraction, relational reasoning, and entity linking in knowledge graphs. Language models provide rich language representations for knowledge graphs by learning from large amounts of text data. LLMs improve the accuracy of entity and relation extraction in knowledge graphs, especially in dealing with ambiguity and language variation, helping to more accurately capture contextual information in knowledge graphs and enhance the ability of relational reasoning.

[0012] Collaboration between LLMs and KGs: In this approach, knowledge graphs and large language models work together. Knowledge graphs provide structured information, while large language models process and understand the information in knowledge graphs in a natural language manner, and the two promote each other. By combining the structured information of knowledge graphs and the natural language understanding capabilities of large language models, the overall context perception and reasoning level are improved. This method can adapt to different tasks, supporting both querying and reasoning on knowledge graphs and tasks such as natural language generation.

[0013] Large language models, such as GPT-4 and GLM, have made remarkable achievements in the field of natural language processing (NLP), especially in a variety of tasks such as question answering, machine translation, and text generation. However, these models still have limitations when dealing with tasks that contain factual knowledge. For example, they sometimes produce statements containing incorrect facts, a phenomenon known as the "hallucination" problem. For example, when asked "When did Einstein discover gravity", the model may incorrectly cite facts related to Isaac Newton.

[0014] One solution is to pre-train LLMs with domain-specific data instead of relying on general text corpora. Models that adopt this approach include SecurityLLM, CySecBERT, SecureBERT, MalBERT, CATBERT, DarkBERT, PubMedBERT, and BioMedGPT. However, pre-training LLMs from scratch is not realistic because it requires a lot of computational cost and time to achieve human-like performance of current LLMs. And in the field of APT, pre-training of LLMs is not yet supported by public models.

[0015] How to utilize the collaborative work of LLMs and KGs to break down the domain barriers in the construction of knowledge graphs, make knowledge graphs closer to actual threat scenarios, and provide security professionals with more accurate and comprehensive information, thereby enhancing the ability to defend and respond to APT attacks, is an urgent problem to be solved. Summary of the invention

[0016] The technical problem to be solved by the present invention is to provide a collaborative enhancement method for APT knowledge graph and large language model in response to the deficiencies in the above-mentioned prior art. The method effectively integrates the APT knowledge graph into the large language model to enhance the semantic understanding, reasoning and prediction capabilities of the large language model in APT scenarios. The large language model can better analyze and infer attacker behavior and attack paths, improve accuracy in complex network environments, and enhance the defense and response capabilities against APT attacks.

[0017] In order to solve the above technical problems, the technical solution adopted by the present invention is: a collaborative enhancement method for APT knowledge graph and large language model, the method comprising the following steps: Step S1: Construct an APT knowledge graph focusing on the field of network security; Step S2: Design chain prompts based on the questions input by the user and pass them to the large language model in sequence for step-by-step answers. The large language model uses the knowledge provided by the APT knowledge graph to query and locate the questions; Step S3: combining the located APT knowledge nodes with the question content input by the user, and enriching the context-aware prompts using the strongly related nodes retrieved from the subgraph; Step S4: The large language model generates a comprehensive answer for the user based on context-aware prompts.

[0018] In the above-mentioned collaborative enhancement method for APT knowledge graph and large language model, the specific process of constructing an APT knowledge graph focusing on the field of network security described in step S1 is as follows: Step S101: Collect relevant data in the field of network security and threat intelligence related to APT attacks, and use a public threat intelligence platform to obtain threat information in the field of network security; Step S102: performing deduplication and filtering processing on the information obtained from different data sources, and standardizing the format of the information in various data sources; Step S103: using named entity recognition technology to identify threat entity types in threat intelligence; using relationship extraction technology to extract relationships between different types of entities from threat intelligence; Step S104: Based on the results of the relationship extraction technology, the attacker entity identified by the named entity recognition technology is linked to the entity in the existing knowledge base, and the relationship between the entities in the knowledge graph is constructed to form an APT knowledge graph.

[0019] In the above-mentioned collaborative enhancement method for APT knowledge graph and large language model, the public threat intelligence platform described in step S101 includes MITRE, ATT&CK, and CVE; the threat information in the field of network security described in step S101 includes security reports, weapon tool analysis, and vulnerability information.

[0020] In the above-mentioned collaborative enhancement method for APT knowledge graph and large language model, the threat entity types in the threat intelligence described in step S103 include attackers, attack tools, attack targets, attack methods and vulnerabilities; the relationships between different types of entities described in step S103 include the relationship between attackers and attack targets, the relationship between attackers and attack tools, the relationship between attack tools and attack methods, and the relationship between attack tools, attack methods and vulnerabilities, covering all stages of the APT attack life cycle.

[0021] In the above-mentioned collaborative enhancement method for APT knowledge graph and large language model, the chain prompts designed according to the questions input by the user in step S2 are sequentially passed to the large language model for step-by-step answers. The specific process of the large language model using the knowledge provided by the APT knowledge graph to query and locate the question is as follows: Step S201: Perform named entity recognition on the APT knowledge graph for the question content input by the user, and extract entities related to the APT knowledge graph; Step S202: Divide the user input question into two parts, the first part is a part that only contains questions about entities, and the second part is a part that contains questions about entities and relationships; locate the APT knowledge nodes corresponding to the extracted entities in the APT knowledge graph, and the APT knowledge nodes include knowledge nodes that answer questions about entities and knowledge nodes that answer questions about entities and relationships; Step S203: Return the query result.

[0022] The above-mentioned collaborative enhancement method for APT knowledge graph and large language model, as described in step S201, performs named entity recognition on the APT knowledge graph for the question content input by the user, and when extracting entities related to the APT knowledge graph, applies zero-sample prompting technology based on the large language model to efficiently extract APT knowledge graph related entities from the question input by the user.

[0023] In the above-mentioned collaborative enhancement method for APT knowledge graph and large language model, when locating the APT knowledge node corresponding to the extracted entity in the APT knowledge graph as described in step S202, a query statement is designed to return the APT knowledge node details in JSON format, and when locating the knowledge node that answers the question about the entity and relationship, other related nodes of the APT knowledge node corresponding to the entity are traversed to obtain the related node subgraph.

[0024] In the above-mentioned collaborative enhancement method for APT knowledge graph and large language model, the located APT knowledge node and the question content input by the user are combined in step S3, and the context-aware prompt is enriched by using the strongly related nodes retrieved by the subgraph, and the retrieval efficiency and function are enhanced by using the subgraph retrieval algorithm, and the related nodes within the three-hop range of the APT knowledge node are retrieved in the related node subgraph, which includes the guidance of the large language model's answering method, the user's initial question and the information of the node itself; the specific process is: Step S301, searching entities related to the extracted APT knowledge according to the question content input by the user; Step S302: According to the APT knowledge node relationship in the question input by the user, a related node subgraph including the knowledge node and the relationship is retrieved; Step S303: retrieve and obtain several related node subgraphs containing the above knowledge nodes and relationships, sort them according to the number of related node subgraphs, select the related node subgraph with the highest number of nodes, and search the related nodes within three hops of the APT knowledge node in the related node subgraphs.

[0025] Compared with the prior art, the present invention has the following advantages: 1. By constructing an APT knowledge graph focusing on the field of network security, the present invention enables large language models (LLMs) to achieve in-depth understanding and utilization of threat intelligence corpus, thereby improving the efficiency and accuracy of large language models in APT scenarios.

[0026] 2. The knowledge graph node data enhancement scheme of the present invention provides structured and highly correlated information, especially the chain decomposition prompts Prompt1 and Prompt2, so that the large language model can more accurately understand the entities, relationships and contexts behind the threat. The step-by-step answers of the large model to user questions further improve the interpretability of the large language model on the APT knowledge graph, enabling users to more intuitively understand the decision-making process of the large language model and enhance the credibility and interpretability of the large language model.

[0027] 3. The present invention effectively integrates the APT knowledge graph into the large language model. The target subgraph obtained through subgraph retrieval and the large language model can seamlessly utilize these strongly correlated key nodes and relationship information in enriching contextual prompts to generate accurate and comprehensive answers, thereby enhancing the semantic understanding, reasoning and prediction capabilities of the large language model in APT scenarios. The large language model can better analyze and infer attacker behavior and attack paths, and improve accuracy in complex network environments.

[0028] 4. The present invention focuses on the integration of APT knowledge graphs in the field of network security, so that the large language model can better adapt to the professional terminology and context in the field of network security, thereby improving the adaptability of the large language model in APT scenarios.

[0029] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 The schematic diagram of the method of the present invention. DETAILED DESCRIPTION

[0031] like Figure 1 As shown, the collaborative enhancement method for APT knowledge graph and large language model of the present invention includes the following steps: Step S1: Construct an APT knowledge graph focusing on the field of network security; In this embodiment, the specific process of constructing the APT knowledge graph focusing on the field of network security described in step S1 is: Step S101: Collect relevant data in the field of network security and threat intelligence related to APT attacks, and use a public threat intelligence platform to obtain threat information in the field of network security; In this embodiment, the data collected in the network security field in step S101 includes blogs and reports, the public threat intelligence platforms in step S101 include MITRE, ATT&CK, and CVE, and the threat information in the network security field in step S101 includes security reports, weapon tool analysis, and vulnerability information. This can better update and expand the knowledge graph.

[0032] Step S102: De-duplicate and filter the information obtained from different data sources to ensure the accuracy and reliability of the information in the knowledge graph; and standardize the format of the information in various data sources to facilitate subsequent data integration and processing; Step S103: using named entity recognition (NER) technology to identify threat entity types in threat intelligence; using relation extraction (RE) technology to extract relationships between different types of entities from threat intelligence; In this embodiment, the types of threat entities in the threat intelligence described in step S103 include attackers, attack tools, attack targets, attack methods and vulnerabilities; the relationships between different types of entities described in step S103 include the relationship between attackers and attack targets, the relationship between attackers and attack tools, the relationship between attack tools and attack methods, and the relationship between attack tools, attack methods and vulnerabilities, covering all stages of the APT attack life cycle.

[0033] Step S104: Based on the results of the relationship extraction technology, the attacker entity identified by the named entity recognition technology is linked to the entity in the existing knowledge base to ensure the consistency of the entities in the knowledge graph, build the relationship between the entities in the knowledge graph, and form an APT knowledge graph.

[0034] Step S2: Design chain prompts based on the questions input by the user and pass them to the large language model in sequence for step-by-step answers. The large language model uses the knowledge provided by the APT knowledge graph to query and locate the questions; In this embodiment, the chain prompts (i.e., Prompt1 and Prompt2) designed according to the question input by the user in step S2 are sequentially passed to the large language model for step-by-step answers. The specific process of the large language model querying and locating the question using the knowledge provided by the APT knowledge graph is as follows: Step S201: Perform named entity recognition on the APT knowledge graph for the question content input by the user, and extract entities related to the APT knowledge graph; In this embodiment, in step S201, named entity recognition of the APT knowledge graph is performed on the question content input by the user. When extracting entities related to the APT knowledge graph, zero-shot prompting technology is applied based on the large language model to efficiently extract entities related to the APT knowledge graph from the question input by the user.

[0035] In specific implementation, the large language model is the GPT-3.5-Turbo model.

[0036] Step S202: Divide the user input question into two parts, the first part is a part that only contains questions about entities, and the second part is a part that contains questions about entities and relationships; locate the APT knowledge nodes corresponding to the extracted entities in the APT knowledge graph, and the APT knowledge nodes include knowledge nodes that answer questions about entities and knowledge nodes that answer questions about entities and relationships; Step S203: Return the query result.

[0037] In this embodiment, when locating the APT knowledge node corresponding to the extracted entity in the APT knowledge graph as described in step S202, a query statement is designed to return the APT knowledge node details in JSON format, and when locating the knowledge node that answers the question about the entity and relationship, other related nodes of the APT knowledge node corresponding to the entity are traversed to obtain a related node subgraph.

[0038] For example, the query node statement is: 'MATCH (m:Person{name:'Alice'})-[r]-(n:Person{name:'Bob'})RETURN r;'.

[0039] Step S3, combining the located APT knowledge nodes with the question content input by the user, and using the strongly related nodes retrieved from the subgraph to enrich the "context-aware prompts"; In this embodiment, in step S3, the APT knowledge node located is combined with the question content input by the user, and the context-aware prompt is enriched by using the strongly related nodes retrieved by the subgraph. The subgraph retrieval algorithm is used to enhance the retrieval efficiency and function, and the related nodes within the three-hop range of the APT knowledge node are retrieved in the related node subgraph, which includes the guidance of the large language model to answer the question, the user's initial question and the information of the node itself; the specific process is: Step S301, searching entities related to the extracted APT knowledge according to the question content input by the user; Step S302: According to the APT knowledge node belonging relationship in the question input by the user, a related node subgraph including the knowledge node and the relationship is retrieved; Step S303: retrieve and obtain several related node subgraphs containing the above knowledge nodes and relationships, sort them according to the number of related node subgraphs, select the related node subgraph with the highest number of nodes, and search the related nodes within three hops of the APT knowledge node in the related node subgraphs.

[0040] For example, when a user asks the big model: "Can you describe the capability level of the APT33 organization?", the "context-aware prompt" is as follows: "I will give you a question or instruction. Your goal is to answer my question or complete my instruction. My question or instruction is: 'Can you describe the capability level of the APT33 organization?' It is possible that this question or instruction, or part of it, requires relevant information to be extracted from the data to provide a satisfactory answer or complete the task. Therefore, the necessary information or data is provided below as the background for solving the problem or completing the instruction. You will write a comprehensive answer to this question or instruction. Now, use the above information + the nodes queried in the APT knowledge graph and their relationship attribute information to construct a comprehensive answer."

[0041] Step S4: The large language model generates a comprehensive answer for the user based on the “context-aware prompt”, thereby enabling the large language model to answer the questions raised by the user in a more accurate manner.

[0042] In summary, according to the characteristics of APT attacks and related threat intelligence, the present invention has developed effective text mining and information extraction technologies, processed unstructured information in threat intelligence corpus, filtered noise, extracted key information, and constructed an APT knowledge graph in the field of network security; studied the fusion strategy of knowledge graph and large language model, designed effective data structure and model architecture, realized the organic integration of information in APT knowledge graph into large language model, improved the deep understanding and reasoning ability of large language model for threat intelligence, made the decision process of large language model enhanced with APT knowledge graph node data more transparent and explainable, and enhanced the user's trust and understanding of the output of large language model.

[0043] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0044] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0045] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0046] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0047] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A collaborative enhancement method for APT knowledge graph and large language model, characterized in that: The method comprises the following steps: Step S1: Construct an APT knowledge graph focusing on the field of network security; Step S2: Design chain prompts based on the questions input by the user and pass them to the large language model in sequence for step-by-step answers. The large language model uses the knowledge provided by the APT knowledge graph to query and locate the questions; Step S3: combining the located APT knowledge nodes with the question content input by the user, and enriching the context-aware prompts using the strongly related nodes retrieved from the subgraph; Step S4: The large language model generates a comprehensive answer for the user based on context-aware prompts.

2. A collaborative enhancement method for APT knowledge graph and large language model according to claim 1, characterized in that: The specific process of constructing the APT knowledge graph focusing on the field of network security described in step S1 is as follows: Step S101: Collect relevant data in the field of network security and threat intelligence related to APT attacks, and use a public threat intelligence platform to obtain threat information in the field of network security; Step S102: performing deduplication and filtering processing on the information obtained from different data sources, and standardizing the format of the information in various data sources; Step S103: using named entity recognition technology to identify threat entity types in threat intelligence; using relationship extraction technology to extract relationships between different types of entities from threat intelligence; Step S104: Based on the results of the relationship extraction technology, the attacker entity identified by the named entity recognition technology is linked to the entity in the existing knowledge base, and the relationship between the entities in the knowledge graph is constructed to form an APT knowledge graph.

3. A collaborative enhancement method for APT knowledge graph and large language model according to claim 2, characterized in that: The public threat intelligence platforms described in step S101 include MITRE, ATT&CK, and CVE; the threat information in the network security field described in step S101 includes security reports, weapon tool analysis, and vulnerability information.

4. A collaborative enhancement method for APT knowledge graph and large language model according to claim 2, characterized in that: The types of threat entities in the threat intelligence described in step S103 include attackers, attack tools, attack targets, attack methods and vulnerabilities; the relationships between different types of entities described in step S103 include the relationship between attackers and attack targets, the relationship between attackers and attack tools, the relationship between attack tools and attack methods, and the relationship between attack tools, attack methods and vulnerabilities, covering all stages of the APT attack life cycle.

5. A collaborative enhancement method for APT knowledge graph and large language model according to claim 1, characterized in that: In step S2, the chain prompts are designed according to the questions input by the user and are passed to the large language model in sequence for step-by-step answers. The specific process of the large language model using the knowledge provided by the APT knowledge graph to query and locate the question is as follows: Step S201: Perform named entity recognition on the APT knowledge graph for the question content input by the user, and extract entities related to the APT knowledge graph; Step S202: Divide the user input question into two parts, the first part is a part that only contains questions about entities, and the second part is a part that contains questions about entities and relationships; locate the APT knowledge nodes corresponding to the extracted entities in the APT knowledge graph, and the APT knowledge nodes include knowledge nodes that answer questions about entities and knowledge nodes that answer questions about entities and relationships; Step S203: Return the query result.

6. A collaborative enhancement method for APT knowledge graph and large language model according to claim 5, characterized in that: In step S201, named entity recognition of the APT knowledge graph is performed on the question content input by the user. When extracting entities related to the APT knowledge graph, zero-sample prompting technology is applied based on the large language model to efficiently extract entities related to the APT knowledge graph from the question input by the user.

7. A collaborative enhancement method for APT knowledge graph and large language model according to claim 5, characterized in that: When locating the APT knowledge node corresponding to the extracted entity in the APT knowledge graph as described in step S202, a query statement is designed to return the APT knowledge node details in JSON format. When locating the knowledge node that answers the question about the entity and relationship, other related nodes of the APT knowledge node corresponding to the entity are traversed to obtain the related node subgraph.

8. A collaborative enhancement method for APT knowledge graph and large language model according to claim 5, characterized in that: In step S3, when combining the located APT knowledge nodes with the question content input by the user and enriching the context-aware prompts using the strongly related nodes retrieved by the subgraph, the subgraph retrieval algorithm is used to enhance the retrieval efficiency and function, and the related nodes within three hops of the APT knowledge node are retrieved in the related node subgraph, which includes the guidance of the large language model's answering method, the user's initial question and the information of the node itself; The specific process is: Step S301, searching entities related to the extracted APT knowledge according to the question content input by the user; Step S302: According to the APT knowledge node belonging relationship in the question input by the user, a related node subgraph including the knowledge node and the relationship is retrieved; Step S303: retrieve and obtain several related node subgraphs containing the above knowledge nodes and relationships, sort them according to the number of related node subgraphs, select the related node subgraph with the highest number of nodes, and search the related nodes within three hops of the APT knowledge node in the related node subgraphs.

Citation Information

Patent Citations

  • Network security situation understanding analysis method based on knowledge graph

    CN116668057A

  • Knowledge graph generation type question answering method and system based on large language model

    CN117033608A

  • Domain knowledge graph automatic construction method based on large language model and prompt project

    CN117035076A

  • Knowledge graph retrieval method and system fusing pre-training language model

    CN117555985A

  • Network security emergency response knowledge graph completion method based on large language model

    CN117648448A

Cited By

  • Question answering method and device, equipment and medium

    CN119128181A

  • Medical large model fine tuning optimization method based on knowledge guidance and related device

    CN119830219A

  • A knowledge guide-based medical large model fine-tuning optimization method and related device

    CN119830219B

  • APT organization attack portrait generation reasoning method and device and electronic equipment

    CN120069066A

  • APT attack chain reconstruction method based on knowledge graph and graph neural network

    CN120185934A