Firewall configuration acquisition method, system and computer readable storage medium

By taking screenshots from firewall operation videos and using deep learning models for text recognition and classification, the problem of automated evaluation caused by redundant firewall configuration information is solved, and efficient configuration information extraction and automated evaluation are achieved.

CN118333030BActive Publication Date: 2024-10-11HEFEI TANOVO INFORMATION SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410763926.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-10-11
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

The existing firewall configuration web page information is too complex, resulting in low efficiency during manual evaluation and the lack of automated evaluation methods.

Method used

By taking screenshots from firewall operation videos, using classification networks and BERT-BILSTM-CRF models for text recognition and information extraction, automatically filling in form pages, generating result records, and realizing automated evaluation of firewalls.

Benefits of technology

It improves the accuracy of configuration information extraction, saves form filling time, and realizes automated firewall evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333030B_ABST
    Figure CN118333030B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system and computer-readable storage medium for obtaining firewall configuration, wherein the method for obtaining firewall configuration includes the following steps: S1, obtaining screenshots of different pages from a firewall operation video; S2, using a classification network to classify the screenshots into 6 categories according to control points; S3, performing text recognition on each picture that is not classified as Background, and extracting information through a BERT‑BILSTM‑CRF model; S4, automatically filling in the extracted information to the corresponding position of the form page, and generating a result record. The method, system and computer-readable storage medium for obtaining firewall configuration adopt a new lightweight classification network architecture, which can reduce the training time and the consumption of computing resources; in addition, a deep learning method is used to obtain the text information of the firewall configuration page, and the text information is converted into a triple, which improves the accuracy of configuration information extraction and saves the time of filling in the form.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network information security technology, and in particular to a firewall configuration acquisition method, system and computer-readable storage medium. Background Art

[0002] A firewall is a network access controller composed of a combination of software and hardware. It controls the network packets flowing through the firewall according to certain security rules, such as prohibition or forwarding. It can shield the information, topology and operating status inside the protected network, thereby acting as a network security barrier.

[0003] In order to ensure the security and functionality of the firewall, some security technical requirements need to be followed and corresponding testing and evaluation must be performed.

[0004] Currently, the web page information of firewall configuration is too redundant, and too much useless information leads to low efficiency during manual evaluation. Summary of the invention

[0005] In view of this, the technical problem to be solved by the present invention is to provide a firewall configuration acquisition method, system and computer-readable storage medium, which can automatically identify the firewall configuration page and extract key information, generate a result record, and realize the automated evaluation of the firewall.

[0006] The technical solution of the present invention is achieved in this way:

[0007] The present invention proposes a method for obtaining firewall configuration, comprising the following steps:

[0008] S1. Get screenshots of different pages from the firewall operation video;

[0009] S2. Classify the screenshots into 6 categories according to the control points {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background} using a classification network;

[0010] S3, perform text recognition on each picture that is not classified as Background, and extract information through the BERT-BILSTM-CRF model;

[0011] S4. Automatically fill in the extracted information into the corresponding position of the form page to generate a result record.

[0012] Preferably, the S1 specifically includes:

[0013] S101, extracting picture frames from the firewall operation video and converting them into grayscale images;

[0014] S102, calculating the hash value of each frame and the Hamming distance of the hash values ​​of adjacent frames, and when the Hamming distance of adjacent frames is greater than 0.9*length*width, saving the screenshot of the current frame;

[0015] S103, traversing the image frames in the firewall operation video to obtain screenshots of all different pages.

[0016] Preferably, S2 specifically includes:

[0017] S201, performing data enhancement on the screenshot;

[0018] S202, adding two cross-layer connections on the basis of the yolov5 structure, mapping the shallow features that retain more information of the original image to the deep features, adding a path to bypass the nonlinear transformation, and obtaining a classification network;

[0019] S203, training the classification network model through the screenshots after data enhancement, using a binary cross entropy loss function for classification loss, and dividing the classification into six categories {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background} according to the control points;

[0020] S204, classifying the screenshots through the trained classification network, using sigmoid as an activation function to calculate the probability that the current input belongs to each category, and taking the category with the highest probability as the category of the current input screenshot.

[0021] Preferably, before S3, the method further includes:

[0022] Model training: Perform text recognition on each image that is not classified as Background, and process the recognized text content into SPO triples as training data to train the BERT-BILSTM-CRF model.

[0023] Preferably, in the model training, the loss function adopts negative log-likelihood so that the score of the true label sequence is the highest among all possible sequences.

[0024] Preferably, before generating the result record, the method further includes:

[0025] Conduct compliance assessment.

[0026] The present invention also proposes a firewall configuration acquisition system, comprising:

[0027] Automatic screenshot module, used to obtain screenshots of different pages from firewall operation videos;

[0028] A page classification module, used to classify the screenshots into 6 categories according to control points {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background} using a classification network;

[0029] The information extraction module is used to perform text recognition on each image that is not classified as Background and extract information through the BERT-BILSTM-CRF model;

[0030] The filling module is used to automatically fill in the extracted information into the corresponding position of the form page and generate result records.

[0031] Preferably, the automated screenshot module is used to extract picture frames from the firewall operation video and convert them into grayscale images;

[0032] Calculate the hash value of each frame and the Hamming distance of the hash values ​​of adjacent frames. When the Hamming distance of adjacent frames is greater than 0.9*length*width, save the screenshot of the current frame.

[0033] Traverse the image frames in the firewall operation video and obtain screenshots of all different pages.

[0034] Preferably, the page classification module is used to perform data enhancement on the screenshot;

[0035] Add two cross-layer connections on the basis of the yolov5 structure to map the shallow features that retain more information of the original image to the deep features, add a path to bypass the nonlinear transformation, and obtain a classification network;

[0036] The classification network is trained by the screenshots after data enhancement. The classification loss adopts the binary cross entropy loss function and is divided into six categories according to the control points: {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background};

[0037] The screenshots are classified by the trained classification network, and the activation function uses sigmoid to calculate the probability that the current input belongs to each category, and the category with the highest probability is taken as the category of the current input screenshot.

[0038] The present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the firewall configuration acquisition method as described in any one of the above items is implemented.

[0039] The firewall configuration acquisition method, system and computer-readable storage medium proposed in the present invention use a deep learning method to obtain text information from the firewall configuration page and convert it into triples, thereby improving the accuracy of configuration information extraction and saving form filling time. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flowchart of a method for obtaining firewall configuration proposed in an embodiment of the present invention;

[0041] Figure 2 This is a structural block diagram of a firewall configuration acquisition system proposed in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0043] like Figure 1 As shown, the embodiment of the present invention proposes a method for obtaining firewall configuration, comprising the following steps:

[0044] S1. Get screenshots of different pages from the firewall operation video;

[0045] S2, the screenshots are classified into 6 categories according to the control points {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background} using the classification network;

[0046] S3, perform text recognition on each picture that is not classified as Background, and extract information through the BERT-BILSTM-CRF model;

[0047] S4. Automatically fill in the extracted information into the corresponding position of the form page to generate a result record.

[0048] It can be seen that in the embodiment of the present invention, a deep learning method is used to obtain the text information of the firewall configuration page, and the text information is converted into a triple, which improves the accuracy of configuration information extraction and saves the time of filling out the form. Example 1

[0049] Automatic screenshot: Automatically save image frames of different scenes from the video.

[0050] 1.1 Extract the picture frames from the operation video and convert them into grayscale images;

[0051] 1.2 Calculate the hash value of each frame and the Hamming distance of the hash values ​​of adjacent frames. When the Hamming distance of adjacent frames is greater than 0.9*length*width, save the picture of the current frame;

[0052] 1.3 In this way, the image frames in the entire video file are traversed to obtain screenshots of all different pages.

[0053] Page classification: The saved screenshots are classified according to the control points using a classification network. The classification network used is a lightweight network architecture that combines a new type of gradient path planning with yolov5.

[0054] 2.1 Training data preparation: The screenshots obtained above are enhanced using geometric transformation, color transformation, mixup and other techniques.

[0055] 2.2 Network structure: Two cross-layer connections are added on the basis of the yolov5 structure to map the shallow features that retain more information of the original image to the deep features, which facilitates the transmission of information and the flow of gradients. By adding a path to bypass nonlinear transformations, the model is easier to converge and the training time and computing resource consumption can be reduced.

[0056] 2.3 Model training: The enhanced image data is trained using the classification network proposed in 2.2. The classification loss adopts the binary cross entropy loss function, and is divided into six categories according to the control points: {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background}.

[0057] 2.4 Classification reasoning: During the detection process, each frame of the input model is classified. The activation function uses sigmoid to calculate the probability that the current input belongs to each category, and the category with the highest probability is taken as the category of the current input frame.

[0058] Key information extraction: Convert images into text and extract key information.

[0059] 3.1 Training data preparation: Use OCR technology to perform text recognition on each picture that is not classified as Background, and process the text content into SPO triples as training data;

[0060] 3.2 Model training: The BERT-BILSTM-CRF network is used to train the model for the dataset in 3.1. The loss function uses negative log-likelihood so that the score of the true label sequence is the highest among all possible sequences.

[0061] 3.3 Information extraction: During the detection process, OCR technology is used to perform text recognition on each picture that is not classified as Background, and then the model trained in 3.2 is used to extract information.

[0062] 3.4 Intelligent filling: Automatically fill in the extracted information into the corresponding position of the form page, give a compliance judgment, and generate a result record.

[0063] like Figure 2 As shown, the present invention also proposes a firewall configuration acquisition system, comprising:

[0064] Automatic screenshot module 1, used to obtain screenshots of different pages from the firewall operation video;

[0065] Page classification module 2, used to classify screenshots into 6 categories according to control points {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background} using a classification network;

[0066] Information extraction module 3 is used to perform text recognition on each picture that is not classified as Background and extract information through the BERT-BILSTM-CRF model;

[0067] The filling module 4 is used to automatically fill in the extracted information into the corresponding position of the form page and generate a result record.

[0068] In a preferred embodiment of the present invention, the automated screenshot module is used to extract picture frames from the firewall operation video and convert them into grayscale images;

[0069] Calculate the hash value of each frame and the Hamming distance of the hash values ​​of adjacent frames. When the Hamming distance of adjacent frames is greater than 0.9*length*width, save the screenshot of the current frame.

[0070] Traverse the image frames in the firewall operation video and obtain screenshots of all different pages.

[0071] In a preferred embodiment of the present invention, the page classification module is used to perform data enhancement on the screenshot;

[0072] Add two cross-layer connections on the basis of the yolov5 structure to map the shallow features that retain more information of the original image to the deep features, add a path to bypass the nonlinear transformation, and obtain a classification network;

[0073] The classification network model is trained through the screenshots after data enhancement. The classification loss adopts the binary cross entropy loss function. According to the control points, it is divided into six categories: {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background};

[0074] The screenshots are classified by the trained classification network, and the activation function uses sigmoid to calculate the probability that the current input belongs to each category, and the category with the highest probability is taken as the category of the current input screenshot.

[0075] The present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the firewall configuration acquisition method as described in any one of the above items is implemented.

[0076] The firewall configuration acquisition method, system and computer-readable storage medium proposed in the present invention adopt a new lightweight classification network architecture, which can reduce the training time and the consumption of computing resources; in addition, a deep learning method is used to obtain the text information of the firewall configuration page and convert it into a triplet, which improves the accuracy of configuration information extraction and saves the time of filling out the form.

[0077] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM or a CD, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of each embodiment of the present application.

[0078] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that contains one or more available media integration. Available media can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state hard disk), etc.

[0079] Finally, it should be noted that the above is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for obtaining firewall configuration, characterized in that: The following steps are involved: S1. Get screenshots of different pages from the firewall operation video; S2. Classify the screenshots into 6 categories according to the control points {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background} using a classification network; S3, perform text recognition on each picture that is not classified as Background, and extract information through the BERT-BILSTM-CRF model; S4, automatically filling in the extracted information into the corresponding position of the form page to generate a result record; The S1 specifically includes: S101, extracting picture frames from the firewall operation video and converting them into grayscale images; S102, calculating the hash value of each frame and the Hamming distance of the hash values ​​of adjacent frames, and when the Hamming distance of adjacent frames is greater than 0.9*length*width, saving the screenshot of the current frame; S103, traversing the image frames in the firewall operation video to obtain screenshots of all different pages; The S2 specifically includes: S201, performing data enhancement on the screenshot; S202, adding two cross-layer connections on the basis of the yolov5 structure, mapping the shallow features that retain more information of the original image to the deep features, adding a path to bypass the nonlinear transformation, and obtaining a classification network; S203, training the classification network model through the screenshots after data enhancement, using a binary cross entropy loss function for classification loss, and dividing the classification into six categories according to the control points: {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background}; S204, classifying the screenshots through the trained classification network, using sigmoid as an activation function to calculate the probability that the current input belongs to each category, and taking the category with the highest probability as the category of the current input screenshot.

2. The method for obtaining firewall configuration according to claim 1, characterized in that: Before the S3, it also includes: Model training: Perform text recognition on each image that is not classified as Background, and process the recognized text content into SPO triples as training data to train the BERT-BILSTM-CRF model.

3. The method for obtaining firewall configuration according to claim 2, characterized in that: In the model training, the loss function uses negative log-likelihood so that the score of the true label sequence is the highest among all possible sequences.

4. The method for obtaining firewall configuration according to claim 1, characterized in that: Before generating the result record, the method further includes: Conduct compliance assessment.

5. A firewall configuration acquisition system, characterized in that: Includes the following modules: Automatic screenshot module, used to obtain screenshots of different pages from firewall operation videos; A page classification module, used to classify the screenshots into 6 categories according to control points {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background} using a classification network; The information extraction module is used to perform text recognition on each image that is not classified as Background and extract information through the BERT-BILSTM-CRF model; The filling module is used to automatically fill in the extracted information into the corresponding position of the form page and generate result records; The automatic screenshot module is used to extract picture frames from the firewall operation video and convert them into grayscale images; Calculate the hash value of each frame and the Hamming distance of the hash values ​​of adjacent frames. When the Hamming distance of adjacent frames is greater than 0.9*length*width, save the screenshot of the current frame. Traverse the image frames in the firewall operation video and obtain screenshots of all different pages; The page classification module is used to perform data enhancement on the screenshots; Add two cross-layer connections on the basis of the yolov5 structure to map the shallow features that retain more information of the original image to the deep features, add a path to bypass the nonlinear transformation, and obtain a classification network; The classification network is trained by the screenshots after data enhancement. The classification loss adopts the binary cross entropy loss function and is divided into six categories according to the control points: {IdentityAuthentication, AccessControl, Audit, IntrusionPrevention, OtherControl, Background}; The screenshots are classified by the trained classification network, and the activation function uses sigmoid to calculate the probability that the current input belongs to each category, and the category with the highest probability is taken as the category of the current input screenshot.

6. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method for obtaining firewall configuration according to any one of claims 1 to 4 is implemented.