Knowledge enhancement ChatGLM-based network security intelligent command method and command room system
By using ChatGLM-based large-scale model fine-tuning and an intelligent command center system, the problems of slow identification accuracy and response speed in traditional cybersecurity methods have been solved, enabling efficient automated processing of cybersecurity incidents and rapid dispatch of security personnel.
Patent Information
- Application Number
- CN202410949029.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-08
AI Technical Summary
Traditional cybersecurity incident handling methods rely on manual processing and rule engines, resulting in low accuracy in incident identification and slow response speed. They cannot meet the needs for rapid identification and effective response to complex cybersecurity incidents, and the dispatch and command of cybersecurity personnel is time-consuming and labor-intensive.
By fine-tuning a large model based on knowledge-enhanced ChatGLM, combined with the low-rank adaptive fine-tuning method LoRA and command fine-tuning technology, a cybersecurity intelligent command center system is constructed to achieve automated and intelligent information system security protection. Collaborative combat command is achieved through database and LangChain technology, reducing technical barriers and improving response efficiency.
It has improved the efficiency of network security monitoring, identification, and incident response, automated and intelligentized network security analysis, reduced the burden of security decision-making, and improved the effectiveness and efficiency of network security maintenance.
Smart Images

Figure CN118921193A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and in particular to a network security intelligent command method and a command room system based on knowledge-enhanced ChatGLM. Background Art
[0002] In recent years, artificial intelligence technology has been increasingly used in the field of network security. Among them, ChatGLM, as a natural language generation model based on deep learning, has achieved remarkable results in the field of natural language processing. The ChatGLM model has a strong language generation capability and can generate high-quality, coherent text. If it is fine-tuned or the input is represented by knowledge enhancement through an external knowledge base, it can play a role in analyzing and understanding complex network security event descriptions and conversations.
[0003] Traditional methods of handling network security incidents often rely on manual processing and rule engines, facing problems such as low event identification accuracy and slow response speed. In addition, with the continuous evolution of network attack methods and the dynamic changes in the network environment, traditional methods can no longer meet the needs of rapid identification and effective response to complex network security incidents. At the same time, the dispatch and command of relevant network security personnel needs to be manual, which is time-consuming and laborious. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a network security intelligent command method and command room system based on knowledge-enhanced ChatGLM, which can not only open up the process and collaborate in the team, but also lower the technical threshold of network security analysis and reduce the burden of network security decision-making. By establishing a collaborative combat command room, online communication and collaboration are carried out based on text, pictures and attachments, which makes it convenient for security personnel to quickly call upon basic security capabilities, network equipment, audit systems, etc. within the network.
[0005] A network security intelligent command method based on knowledge-enhanced ChatGLM includes the following steps:
[0006] Compared with the prior art, the present invention has the following beneficial effects: the present invention utilizes the reasoning ability of the large model ChatGLM, and fine-tunes the large model ChatGLM by means of instruction fine-tuning data sets, so that it is more suitable for dialogues in the field of network security incidents; the present invention adopts artificial intelligence technology to realize the automation and intelligence of information system security protection and response, thereby greatly improving the efficiency of network security monitoring and identification and incident response and disposal, and accurately captures the actual network security needs through the fine-tuned large model ChatGLM, and responds in an appropriate manner, thereby improving the effect and efficiency of network security maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use are briefly introduced below. Obviously, the drawings in the following description only represent some embodiments of the present invention. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0008] Figure 1 It is a flow chart of a network security intelligent command method based on knowledge-enhanced ChatGLM according to an embodiment of the present invention;
[0009] Figure 2 It is a module block diagram of a network security intelligent command room system based on knowledge-enhanced ChatGLM of the present invention;
[0010] Figure 3 It is a detailed diagram of the working principle of the present invention. DETAILED DESCRIPTION
[0011] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0012] See also Figure 1 and Figure 3 The embodiment of the present invention proposes a network security intelligent command method based on knowledge-enhanced ChatGLM, which includes the following steps:
[0013] Construct a cybersecurity event dataset based on historical cybersecurity events, attack events, and their response strategies according to event types and areas of involvement, and store them in a database;
[0014] Using the cybersecurity incident dataset to fine-tune the ChatGLM model, so that the fine-tuned ChatGLM model can analyze the current cybersecurity incidents and generate corresponding responses;
[0015] The method of fine-tuning the ChatGLM large model by using the network security event dataset specifically includes: obtaining unstructured text of network security events, preprocessing the unstructured text, and generating a structured training set; using a large language model to generate a question-answer pair dataset with a specified format based on the structured training set; using the question-answer pair dataset to fine-tune the large language model based on the low-rank adaptive fine-tuning method LoRA, and obtaining the final network security field dialogue language model.
[0016] The detailed steps of fine-tuning the ChatGLM model based on the low-rank adaptive fine-tuning method LoRA are:
[0017] For a pre-trained model weight matrix W0∈R d×k , which can be updated by low-rank decomposition, that is, W0+ΔW=W0+BA, where B∈R d×r , A∈R r×K And rank r< <min(d,k)。
[0018] When the model is trained, W0 will be frozen and no gradient updates will be made, while parameters A and B are trainable.
[0019] Assuming the model input is x, this process can also be abstracted into the following formula:
[0020] h=W0x+ΔWx=W0x+BAx
[0021] For the ChatGLM model of the present invention, based on the above technology, the attention transformation linear layer and the output linear layer in the Transformer block of ChatGLM are low-rank adaptively fine-tuned, which can improve the performance of the model on specific tasks without significantly increasing the number of parameters, so that it can quickly adapt to tasks such as anomaly detection and threat identification in network security.
[0022] The self-attention module using low-rank adaptation can be described by the following formula:
[0023]
[0024] where F in represents the input feature embedding, d k represents the dimension of feature embedding, are the linear layer parameters fine-tuned using LoRA.
[0025] In practical applications, instruction fine-tuning technology is used. Instructions are natural language text inputs from users to specify tasks for large language models (for example, please write a learning experience about xxx), with the purpose of guiding or stimulating the model to perform specific tasks or generate specific outputs.
[0026] Instruction fine-tuning usually includes the following steps: ① Data preparation: Collect or create a set of training data containing natural language instructions and their corresponding outputs. This data should cover the types and scope of tasks that the model is expected to perform. ② Fine-tuning training: Use the above dataset to further train the pre-trained model. In this process, the model learns how to generate the correct response or perform a specific task based on the given natural language instructions. ③ Evaluation and adjustment: By evaluating the model performance on an independent validation set, identify the model's weaknesses, and adjust the training strategy accordingly to improve the model's ability to understand and execute instructions.
[0027] The instructions for fine-tuning the large model for extracting network security event attributes in this embodiment are as follows:
[0028] {"task":"AE","source":"computer","instruction":"{"instruction":"You are an expert in attribute extraction. Please extract attribute triples that conform to the schema definition from the input. Return an empty list if the attribute does not exist. Please answer in the format of a JSON string. ","schema":["Event Subject","Event Object","Event Trigger"],"input":"Company A suffered a sql injection attack from Organization B"}","output":"{"attack":[{"trigger":"Injection Attack","attribute_value":"sql injection attack"}],"Event Subject":[{"entity":"Company A"],"Event Object":[{"entity":"Company B"]}"}
[0029] The input is the text to be extracted, the schema is the attribute type expected to be extracted, and the output is the expected output format.
[0030] Specifically, unstructured texts of cybersecurity incidents can be obtained through the following channels: cybersecurity news websites and blogs, social media platforms, forums and communities, official bulletins and reports, threat intelligence platforms, corporate security blogs and announcements, and academic papers and conferences.
[0031] After collecting these texts, they can be organized and analyzed using natural language processing (NLP) technology, such as: text crawling: using crawler tools (such as Scrapy, BeautifulSoup) to crawl text from web pages; preprocessing: including removing HTML tags, extracting text content, word segmentation, removing stop words, etc.; analysis and classification: using NLP algorithms to perform topic modeling (such as LDA), sentiment analysis, entity recognition and other operations on text to extract valuable information. These methods can obtain and organize unstructured text of cybersecurity incidents from various sources, providing basic data for further analysis and research.
[0032] Obtain network security event information uploaded by on-duty personnel, and extract event element information and abnormal type information from the network security event information; the network security event information obtained includes but is not limited to: attack event type, such as DDoS attack, SQL injection attack, phishing attack, ransomware attack, botnet activity and other network attack forms; attacker information, including the attacker's IP address, geographic location, attack tools used, attack techniques, etc.; target information, such as the attacked system, web application, organization name, etc.
[0033] According to the extracted event element information and abnormal type information, LangChain technology is used to automatically match the historical event knowledge related to the extracted event element information and abnormal type information from the database, assemble it with the network security event information uploaded by the on-duty personnel (i.e. the original question), and perform semantic knowledge enhancement on the original information to obtain the assembled question;
[0034] Use the fine-tuned ChatGLM model to analyze the assembled problems and obtain the response strategies for the corresponding events (such as SQL injection prevention strategies including input validation and escaping, using parameterized queries and compiled statements, using database accounts with minimal permissions, etc.) and the corresponding technical fields involved;
[0035] According to the response strategy of the corresponding event and the corresponding technical field involved, a corresponding network security personnel dispatch plan is recommended, and the network security personnel dispatch plan is stored in the database during training.
[0036] Optionally, after obtaining the output, it is further input into the cybersecurity knowledge graph for information extraction and optimization;
[0037] Optionally, after repeated extractions, better output is obtained and scheduling is performed.
[0038] See also Figure 2 The embodiment of the present invention proposes a network security intelligent command room system based on knowledge-enhanced ChatGLM, which includes:
[0039] The database construction module is used to construct a network security event data set based on the event type and the field involved in historical network security events, attack events and their response strategies, and store them in the database. The database construction module is responsible for designing and implementing the database structure, defining data tables, fields and the relationship between them to meet the storage and retrieval requirements of network security information. It mainly includes the following contents:
[0040] Conduct demand analysis to determine the information that needs to be collected and stored; design the structure of the database and establish the relationship between tables; create corresponding data tables according to the database schema. Each data table represents a specific type of information, such as attack events, log records, network traffic, etc.; define appropriate fields for each data table, including primary keys, foreign keys, indexes, etc.; import existing network security information into the database and convert it into a format acceptable to the database; implement data access interfaces; maintain and update data sets to ensure the integrity and availability of data sets. Through the database construction module, create a well-structured, easy-to-manage and easy-to-query network security information data set to provide strong support for network security analysis, monitoring and response.
[0041] The model fine-tuning module is used to fine-tune the ChatGLM large model using the network security event data set, so that the fine-tuned ChatGLM large model can analyze the current network security events and generate corresponding responses.
[0042] The information extraction module is used to obtain the network security event information uploaded by the on-duty personnel, and to extract event element information and abnormal type information from the network security event information.
[0043] The query module is used to automatically match the historical event knowledge related to the extracted event element information and exception type information from the database using LangChain technology, assemble it with the network security event information uploaded by the on-duty personnel (i.e., the original question), and perform semantic knowledge enhancement on the original information to obtain the assembled question.
[0044] The event analysis module is used to analyze the assembled problems using the fine-tuned ChatGLM model to obtain the response strategies for the corresponding events and the corresponding technical fields involved.
[0045] The dispatch module is used to recommend corresponding network security personnel dispatch plans based on the response strategies of the corresponding events and the corresponding technical fields involved. The network security personnel dispatch plans are stored in the database during training. The following is a description of the command room dispatch module:
[0046] Task management and allocation: The scheduling module is responsible for receiving, analyzing and allocating various tasks in the command room, including but not limited to answering emergency calls, monitoring videos, and dispatching network security teams.
[0047] Personnel Scheduling and Assignment: Based on the nature and urgency of the task, the Scheduling module assigns the task to the appropriate command room personnel, taking into account their skills, location, and availability.
[0048] Resource management and coordination: Manage various resources in the command room, including communication equipment, surveillance cameras, etc., and ensure their effective coordination and utilization.
[0049] Task priority and adjustment: Taking into account the urgency and importance of the task, the scheduling module will adjust the execution order and priority of the task and make corresponding adjustments in a timely manner.
[0050] Real-time monitoring and response: Monitor the real-time status of various tasks and resources in the command room to promptly identify and respond to potential problems and emergencies.
[0051] Communication and collaboration support: Provides real-time communication tools and collaboration platforms to enable personnel in the command room to communicate and collaborate effectively to respond to complex emergency scenarios.
[0052] Reporting and analysis function: Generate task execution reports and data analysis to help managers understand the operation of the command room and make corresponding decisions and optimizations.
[0053] Security and authority management: Ensure the information and operation security in the command room, and perform corresponding access control based on personnel authority to ensure the security and stability of the system.
[0054] After the dispatch module obtains the corresponding output of the event analysis module, it executes the dispatch plan, reports to the security personnel, and strengthens protective measures.
[0055] Optionally, the result output by the event parsing module can be further input into a fine-tuned large language model, and after information structure extraction, it can be matched with a pre-defined network security knowledge graph to enhance the representation of semantic knowledge, and then input into the fine-tuned large language model for parsing to output the answer.
[0056] Optionally, the previous step can be repeated multiple times until a better output answer is obtained, and then scheduling is performed.
[0057] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A network security intelligent command method based on knowledge-enhanced ChatGLM, characterized in that: The steps include: Construct a cybersecurity event dataset based on historical cybersecurity events, attack events, and their response strategies according to event types and areas of involvement, and store them in a database; Using the cybersecurity incident dataset to fine-tune the ChatGLM model, so that the fine-tuned ChatGLM model can analyze the current cybersecurity incidents and generate corresponding responses; Obtain network security event information uploaded by on-duty personnel, and extract event element information and abnormal type information from the network security event information; Based on the extracted event element information and abnormal type information, LangChain technology is used to automatically match historical event knowledge related to the extracted event element information and abnormal type information from the database, assemble it with the network security event information uploaded by the on-duty personnel, and perform semantic knowledge enhancement on the original information to obtain the assembled problem; Use the fine-tuned ChatGLM model to analyze the assembled problems and obtain the response strategies for the corresponding events and the corresponding technical fields involved; Recommend corresponding network security personnel dispatch plans based on the response strategies for corresponding events and the corresponding technical fields involved.
2. The network security intelligent command method based on knowledge-enhanced ChatGLM as claimed in claim 1, characterized in that: The method of fine-tuning the ChatGLM large model by using the network security event dataset specifically includes: obtaining unstructured text of network security events, preprocessing the unstructured text, and generating a structured training set; using a large language model to generate a question-answer pair dataset with a specified format based on the structured training set; using the question-answer pair dataset to fine-tune the large language model based on the low-rank adaptive fine-tuning method LoRA, and obtaining the final network security field dialogue language model.
3. The network security intelligent command method based on knowledge-enhanced ChatGLM as claimed in claim 2, characterized in that: Obtain unstructured text of cybersecurity events through cybersecurity news websites and blogs, social media platforms, forums and communities, official bulletins and reports, threat intelligence platforms, enterprise security blogs and announcements, and academic papers and conferences.
4. The network security intelligent command method based on knowledge-enhanced ChatGLM as claimed in claim 2, characterized in that: The preprocessing of the unstructured text includes: text crawling: using a crawler tool to crawl text from a web page; preprocessing: including removing HTML tags, extracting text content, word segmentation, and removing stop words; analysis and classification: using an NLP algorithm to perform topic modeling, sentiment analysis, and entity recognition operations on the text.
5. The network security intelligent command method based on knowledge-enhanced ChatGLM as claimed in claim 1, characterized in that: The network security event information includes attack event type, attacker information and target information.
6. A network security intelligent command room system based on knowledge-enhanced ChatGLM, characterized in that: include: The database construction module is used to construct a cybersecurity event data set based on historical cybersecurity events, attack events and their response strategies according to event types and involved fields, and store them in the database; A model fine-tuning module, used to fine-tune the ChatGLM model using the cybersecurity event data set, so that the fine-tuned ChatGLM model can analyze the current cybersecurity events and generate corresponding responses; The information extraction module is used to obtain the network security event information uploaded by the on-duty personnel, and extract the event element information and abnormal type information from the network security event information; The query module is used to automatically match the historical event knowledge related to the extracted event element information and abnormal type information from the database using LangChain technology, and assemble it with the network security event information uploaded by the on-duty personnel to obtain the assembled problem; The event analysis module is used to analyze the assembled problems using the fine-tuned ChatGLM model to obtain the response strategies for the corresponding events and the corresponding technical fields involved. The scheduling module is used to recommend corresponding network security personnel scheduling plans based on the response strategies of corresponding events and the corresponding technical fields involved. The network security personnel scheduling plans are stored in the database during training.
7. The network security intelligent command room system based on knowledge-enhanced ChatGLM as claimed in claim 6, characterized in that: The model fine-tuning module is specifically used to obtain unstructured text of network security events, pre-process the unstructured text, and generate a structured training set; Using a large language model, based on the structured training set, a question-answer pair dataset with a specified format is generated; using the question-answer pair dataset, the large language model is fine-tuned based on the low-rank adaptive fine-tuning method LoRA to obtain the final network security field dialogue language model.
8. The network security intelligent command room system based on knowledge-enhanced ChatGLM as claimed in claim 7, characterized in that: The preprocessing of the unstructured text includes: text crawling: using a crawler tool to crawl text from a web page; preprocessing: including removing HTML tags, extracting text content, word segmentation, and removing stop words; analysis and classification: using an NLP algorithm to perform topic modeling, sentiment analysis, and entity recognition operations on the text.
Citation Information
Patent Citations
Question and answer model training method and intelligent question and answer method and device in network security field
CN116933075A
SQL (Structured Query Language) generation method and device based on background knowledge enhancement, equipment and medium
CN117312372A
Intelligent trademark law question and answer method for enhancing big language model reasoning through knowledge graph
CN117807202A
Generation script decision-making method fusing knowledge graph and large language generation model
CN117951314A
Network threat active defense system and method based on large model
CN118316736A
Cited By
Cloud edge collaborative security management method and device based on SDP
CN120074954A
A Cloud-Edge Collaborative Security Management Method and Device Based on SDP
CN120074954B
