Industrial Internet of Things firewall self-expansion method and system
By constructing a device list and analysis module to generate device characteristics, and using a random forest model to match security policies and automate deployment, it solves the problem of traditional firewalls lacking self-expansion and intelligent analysis in industrial environments, and achieves more efficient security policy matching and firewalling. Updates that improve the flexibility and security of industrial IoT firewalls.
Patent Information
- Application Number
- CN202411048387.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-08-01
Smart Images

Figure CN118573482B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial Internet of Things security, and in particular relates to an industrial Internet of Things firewall self-expansion method and system. Background Art
[0002] Industrial Internet of Things refers to the real-time data collection, transmission, analysis and feedback achieved by connecting sensors, equipment and control systems to the Internet in the industrial field, so as to improve production efficiency, optimize resource utilization, and enhance product quality and safety. With the popularization of Industry 4.0 and intelligent manufacturing concepts, Industrial Internet of Things has become an important direction for the development of modern industry. By combining traditional industrial systems with information technology, enterprises can realize the automation and intelligence of production processes and significantly enhance their competitiveness.
[0003] However, with the popularization of the Industrial Internet of Things and the expansion of application scenarios, the cybersecurity challenges faced by industrial control systems and critical infrastructure are becoming increasingly severe. Diverse attack methods, complex network environments and other threats may not only lead to production interruptions, equipment damage and production data leakage, but may also cause serious consequences such as threats to personal safety, leakage of corporate trade secrets and supply chain disruptions. In the industrial field, the losses caused by a security vulnerability or attack incident may be huge, so it is crucial to strengthen the security protection of the Industrial Internet of Things.
[0004] In order to deal with these threats, industrial IoT firewalls have become an indispensable security protection tool. Although traditional firewalls can provide certain protection, they have the following main problems when facing the ever-evolving network environment and complex attack methods: (1) Lack of targeting: lack of in-depth understanding of industrial environment-specific protocols and communication modes, unable to effectively identify and block specific threats to industrial equipment in different industrial production scenarios; (2) Fixed rule sets: relying on static rule sets to identify and block network traffic, these rule sets may be difficult to adapt to the ever-changing network topology and communication modes in the industrial IoT environment; (3) Insufficient scalability: traditional firewalls are usually designed for relatively small-scale enterprise networks and cannot be easily expanded to support large-scale industrial equipment and network architectures; (4) Lack of intelligent analysis: lack of advanced intelligent analysis and learning capabilities, unable to monitor and analyze network traffic in real time and identify abnormal behavior or potential security threats; (5) Difficult security updates: software and firmware updates usually require manual operations, and the deployment and maintenance costs are relatively high, especially in large-scale network environments, requiring a lot of manpower and material resources.
[0005] Chinese Patent Publication No.: CN114039738B discloses a firewall rule configuration method and its system, medium and electronic device. The method includes: the firewall device receives a network communication request sent by an electronic device in the Internet of Things; the firewall device determines whether the network communication behavior of the electronic device meets the firewall rules of the electronic device, wherein the firewall rules are obtained by the firewall device from the server; the firewall device prohibits the network communication behavior of the electronic device when it is determined that the firewall rules are not met; the firewall device allows the network communication behavior of the electronic device when it is determined that the firewall rules are met. When the firewall device is connected to the electronic device for communication, the firewall device controls the network communication behavior of the electronic device based on the firewall rules, which enhances the security capabilities of the electronic device to a certain extent and improves the intelligent experience of the electronic device and the firewall device.
[0006] It can be seen that the firewall rule configuration method and its system, medium and electronic device have the following problems: the firewall rules in the invention are obtained from the server, are limited by the firewall rules in the server, cannot be flexibly changed according to the real-time updated network communication behavior, and lack scalability. Summary of the invention
[0007] To this end, the present invention provides an industrial Internet of Things firewall self-expansion method and system to overcome the problems in the prior art of not being able to flexibly change according to real-time updated network communication behaviors and lacking self-expansion.
[0008] To achieve the above object, on the one hand, the present invention provides an industrial Internet of Things firewall self-expansion method, comprising:
[0009] The device identification module scans the IP addresses and open ports in the industrial Internet of Things, identifies the device type, obtains the connection relationship between devices, and builds a device list and adjacency matrix;
[0010] The data analysis module outputs a number of device features based on the device list and the adjacency matrix, wherein the device features include basic attribute features, performance parameter features, usage status features, fault maintenance features, and external environment features;
[0011] The data analysis module outputs information gain values for the device features and generates a device data set for the device features corresponding to the information gain values that meet preset standards, so as to divide the device data set into a training set and a test set in a preset ratio;
[0012] The security policy matching module inputs the training set into a random forest model, and the random forest model outputs a matching score for the security policies in the database by constructing a decision tree;
[0013] The security policy matching module determines, based on the maximum matching score value, to select the security policy corresponding to the maximum matching score value as the optimal security policy for matching, or selects the preliminary security policy as the optimal security policy for matching;
[0014] The security policy determination module inputs the test set into the random forest model to output the accuracy, precision, recall and F1 value under the condition that the security policy corresponding to the maximum matching score is selected for matching, so as to determine whether the security policy meets the preset standard;
[0015] The preliminary security policy setting module determines and sets the setting mode of the preliminary security policy based on the security value for any device under the condition that the preliminary security policy is selected for matching;
[0016] The automatic deployment module uses an automatic deployment script to add the optimal security policy to the firewall device.
[0017] Furthermore, the information gain value is calculated as follows:
[0018] ,
[0019] Among them, H(D) is the collective entropy of the data set, P i is the proportion of security policy i in the data set, c is the total number of security policies in the data set, H(D|A) is the conditional entropy of input feature A to the data set, n is the number of values of feature A, |D i |The input feature A corresponds to security policy D i The number of data samples, IG(A) is the information entropy corresponding to the input feature A.
[0020] Furthermore, the security policy matching module determines the optimal security policy based on the maximum matching score, wherein:
[0021] If the maximum value of the matching score is less than a preset standard value, the preliminary security strategy is selected as the optimal security strategy for matching;
[0022] If the maximum value of the matching score is greater than or equal to the preset standard value, the security policy corresponding to the maximum value of the matching score is selected as the optimal security policy for matching.
[0023] Further, the preliminary security policy setting module determines a setting mode of the preliminary security policy based on the security value, wherein:
[0024] If the safety value is less than the first preset safety value, the first setting method is used to determine the preliminary safety strategy;
[0025] If the safety value is greater than or equal to the first preset safety value and less than the second preset safety value, the second setting method is used to determine the preliminary safety strategy;
[0026] If the security value is greater than or equal to the second preset security value, a third setting method is used to determine the preliminary security policy.
[0027] Further, the preliminary security policy setting module sets the preliminary security policy in the third setting mode, wherein:
[0028] If the historical data damage degree is greater than or equal to the preset data damage degree, determining the number of traps to be a first number;
[0029] If the damage degree of the historical data is less than the preset data damage degree, the number of traps is determined to be the first number.
[0030] Further, the preliminary security policy setting module determines the trap setting content in the second setting mode, wherein:
[0031] If the intrusion data level is greater than or equal to the preset intrusion data level, determining that the proportion of real data in the content setting of the trap is a first proportion;
[0032] If the intrusion data level is lower than the preset intrusion data level, determining that the proportion of real data in the content setting of the trap is the second proportion;
[0033] Among them, the number of traps under the second setting mode is the second number.
[0034] Furthermore, the first setting manner includes a first layer of traps set in the third setting manner and a second layer of traps set in the second setting manner.
[0035] Furthermore, the security policy determination module determines whether the optimal security policy matched by the random forest model meets a preset standard based on the test set, wherein:
[0036] If the accuracy rate, the precision rate, the recall rate and the F1 value are respectively greater than or equal to the preset accuracy rate, the preset precision rate, the preset recall rate and the preset F1 value, it is determined that the optimal security strategy matched by the random forest model meets the preset standard;
[0037] If any one of the accuracy rate, the precision rate, the recall rate and the F1 value is less than the corresponding preset value, it is determined that the optimal security policy matched by the random forest model does not meet the preset standard.
[0038] Furthermore, the security policy determination module increases the number of decision trees to be constructed based on the accuracy difference, precision difference, recall difference and / or F1 value difference under the condition that the optimal security policy does not meet the preset standard, and the increase in the number of decision trees to be constructed is different based on each difference.
[0039] On the other hand, the present invention also provides an industrial Internet of Things firewall self-expansion system, comprising:
[0040] A device identification module, used to construct a device list and an adjacency matrix and output device features based on the device list and the adjacency matrix;
[0041] A data analysis module, connected to the device identification module, for generating a device data set based on the device features, dividing the device data set into a training set and a test set, and outputting a safety value based on the device data set;
[0042] A security policy matching module, which is connected to the data analysis module, and is used to output a matching score based on the training set, and to determine, based on the maximum matching score, to select a security policy corresponding to the maximum matching score as the optimal security policy for matching, or to select a preliminary security policy as the optimal security policy for matching;
[0043] A security policy determination module is connected to the security policy matching module, and inputs the test set into the random forest model to output the accuracy, precision, recall and F1 value under the condition that the security policy corresponding to the maximum matching score is selected for matching, so as to determine whether the security policy meets the preset standard, and adjusts the security policy if it does not meet the preset standard;
[0044] A preliminary security policy setting module, which is connected to the security policy matching module and is used to determine a setting mode of the preliminary security policy based on the security value and perform preliminary security policy setting;
[0045] The automated deployment module is connected to the security policy matching module and is used to add the optimal security policy that meets the preset standards to the firewall device using an automated deployment script.
[0046] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention constructs a device list and an adjacency matrix based on new device types in the industrial Internet of Things and the connection types between the devices, so as to better understand and analyze the network structure; outputs device features based on the device list and the adjacency matrix to output information gain values based on the device features, and generates a device data set based on the device features corresponding to the information gain values that meet preset standards, screens the device features, and selects features that have a large impact on security policy matching to improve the matching accuracy of the security policy; divides the device data set into a training set and a test set, and outputs a security value based on the device data set, the training set is used for a random forest model to output a matching score, and determines based on the maximum matching score to select a security policy corresponding to the maximum matching score or selects a preliminary security policy as the optimal security policy for matching, thereby improving the matching accuracy of the model and improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0047] Furthermore, based on the comparison result between the information gain value and the preset information gain value, the present invention screens the device features that have a great influence on the security policy matching results, forms the device data values with the device features corresponding to the information gain values that meet the preset standards, and divides them according to the preset ratio to construct multiple decision trees. Each decision tree is trained with randomly extracted features and samples, thereby ensuring the generalization ability of the model, improving the matching accuracy of the model, and improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0048] Furthermore, the present invention determines the optimal security policy based on the maximum value of the matching score. If the maximum value of the matching score is less than the preset standard value, it indicates that the security policies in the existing security policy library are insufficient to deal with network intrusions, and it is necessary to enable the preliminary security policies for deployment, thus overcoming the problem that the existing security policies are insufficient to deal with network intrusions, thereby improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0049] Furthermore, the present invention grades the degree of network intrusion based on the security value, thereby determining the setting method of the preliminary security policy, and adopts different setting methods for each level of network intrusion, thereby maximizing the efficiency of firewall use while ensuring security, thereby improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0050] Furthermore, the present invention determines whether the security strategy corresponding to the maximum matching score meets the preset standards as the optimal security strategy based on accuracy, precision, recall and F1 value, and optimizes the number of decision trees to be constructed based on each difference, thereby overcoming the problem that a single indicator cannot fully reflect the performance of the model, thereby improving the accuracy of the judgment of the model simulation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1This is a flow chart of the industrial Internet of Things firewall self-expansion method according to an embodiment of the present invention;
[0052] Figure 2 This is a structural block diagram of the industrial Internet of Things firewall self-expansion system according to an embodiment of the present invention;
[0053] Figure 3 A flow chart for determining an optimal security strategy for an embodiment of the present invention;
[0054] Figure 4 The present invention is a flowchart of a method for determining a setting method of a preliminary security policy according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0056] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0057] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0058] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0059] See also Figure 1 As shown, it is a flow chart of the industrial Internet of Things firewall self-extension method according to an embodiment of the present invention.
[0060] An embodiment of the present invention provides an industrial Internet of Things firewall self-expansion method, which is characterized by comprising:
[0061] The device identification module scans the IP addresses and open ports in the industrial Internet of Things, identifies the device type, obtains the connection relationship between devices, and builds a device list and adjacency matrix;
[0062] The data analysis module outputs a number of device features based on the device list and the adjacency matrix, wherein the device features include basic attribute features, performance parameter features, usage status features, fault maintenance features, and external environment features;
[0063] The data analysis module outputs an information gain value for the device feature and generates a device data set for the device feature corresponding to the information gain value that meets a preset standard, so as to divide the device data set into a training set and a test set at a preset ratio of 0.6:0.4;
[0064] The security policy matching module inputs the training set into a random forest model, and the random forest model outputs a matching score for the security policies in the database by constructing a decision tree;
[0065] The security policy matching module determines, based on the maximum matching score value, to select the security policy corresponding to the maximum matching score value as the optimal security policy for matching, or selects the preliminary security policy as the optimal security policy for matching;
[0066] The security policy determination module inputs the test set into the random forest model to output the accuracy, precision, recall and F1 value under the condition that the security policy corresponding to the maximum matching score is selected for matching, so as to determine whether the security policy meets the preset standard;
[0067] The preliminary security policy setting module determines and sets the setting mode of the preliminary security policy based on the security value for any device under the condition that the preliminary security policy is selected for matching;
[0068] The automatic deployment module uses an automatic deployment script to add the optimal security policy to the firewall device.
[0069] Specifically, the device identification module of the embodiment of the present invention uses network scanning tools such as Nmap and ZMap to scan IP addresses and open ports in the industrial network to identify device types and form a device list.
[0070] Specifically, accuracy is the ratio of the number of samples correctly predicted by the model to the total number of samples; precision refers to the ratio of samples predicted by the model to truly positive examples; recall refers to the ratio of all samples that are actually positive examples that are correctly predicted by the model to be positive examples; F1 value is the harmonic mean of precision and recall, which is used to balance between the two.
[0071] Specifically, the basic attribute characteristics of the devices in the industrial Internet of Things in the embodiments of the present invention include but are not limited to the device model, manufacturer and serial number; the performance parameter characteristics include but are not limited to the number of CPU cores, main frequency, RAM size, hard disk or solid state drive capacity, and the network connection speed of the device; the usage status characteristics include but are not limited to the continuous operation time of the device, the CPU, memory and disk occupancy of the device, and the temperature of the device; the fault maintenance characteristics include but are not limited to the type of faults that have occurred, the time of occurrence and the repair method, the maintenance time, maintenance content and maintenance results, and the replacement of key components in the equipment; the external environment characteristics include but are not limited to the temperature, humidity and electromagnetic interference of the environment in which the device is located.
[0072] Specifically, the present invention constructs a device list and an adjacency matrix based on new device types in the industrial Internet of Things and the connection types between each device, so as to better understand and analyze the network structure; outputs device features based on the device list and the adjacency matrix to output information gain values based on the device features, and generates a device data set based on the device features corresponding to the information gain values that meet preset standards, screens the device features, and selects features that have a large impact on security policy matching to improve the matching accuracy of the security policy; divides the device data set into a training set and a test set, and outputs a security value based on the device data set, the training set is used for a random forest model to output a matching score, and determines based on the maximum matching score to select a security policy corresponding to the maximum matching score or selects a preliminary security policy as the optimal security policy for matching, thereby improving the matching accuracy of the model and improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0073] In the embodiment of the present invention, the process of the device identification module generating the device list and the adjacency matrix includes:
[0074] Scan IP addresses and open ports in the industrial Internet of Things, identify device types, and obtain connection relationships between devices;
[0075] Let the device list be D, and set,
[0076] ,
[0077] Where n is the total number of devices in the industrial Internet of Things;
[0078] The adjacency matrix is recorded as A, and its i-th row and j-th column element is shown in the following formula:
[0079] ,
[0080] Among them, D i Represents the i-th network device in the Industrial Internet of Things.
[0081] Specifically, the calculation formula of the information gain value is:
[0082] ,
[0083] Among them, H(D) is the collective entropy of the data set, P i is the proportion of security policy i in the data set, c is the total number of security policies in the data set, H(D|A) is the conditional entropy of input feature A to the data set, n is the number of values of feature A, |D i | is the input feature A, and the corresponding security policy is D i The number of data samples, IG(A) is the information entropy corresponding to the input feature A.
[0084] Specifically, the present invention screens device features that have a great impact on security policy matching results based on the comparison results of information gain values and preset information gain values, forms device data values with device features corresponding to information gain values that meet preset standards, and divides them according to preset proportions to construct multiple decision trees. Each decision tree is trained using randomly extracted features and samples, thereby ensuring the generalization ability of the model, improving the matching accuracy of the model, and improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0085] See also Figure 3 As shown, it is a flow chart of determining the optimal security strategy according to an embodiment of the present invention.
[0086] Specifically, the security policy matching module determines the optimal security policy based on the maximum matching score, wherein:
[0087] If the maximum value of the matching score is less than a preset standard value of 85, the preliminary security strategy is selected as the optimal security strategy for matching;
[0088] If the maximum value of the matching score is greater than or equal to the preset standard value 85, the security policy corresponding to the maximum value of the matching score is selected as the optimal security policy for matching.
[0089] Specifically, the present invention determines the optimal security policy based on the maximum value of the matching score. If the maximum value of the matching score is less than the preset standard value, it means that the security policies in the existing security policy library are insufficient to deal with network intrusions, and it is necessary to enable the preliminary security policies for deployment, thus overcoming the problem that the existing security policies are insufficient to deal with network intrusions, thereby improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0090] See also Figure 4 As shown, it is a flow chart of a method for determining a setting method of a preliminary security policy according to an embodiment of the present invention.
[0091] Specifically, the preliminary security policy setting module determines the setting mode of the preliminary security policy based on the security value, wherein:
[0092] If the safety value is less than the first preset safety value of 60, the first setting method is used to determine the preliminary safety strategy;
[0093] If the safety value is greater than or equal to the first preset safety value of 60 and less than the second preset safety value of 80, the second setting method is used to determine the preliminary safety strategy;
[0094] If the safety value is greater than or equal to the second preset safety value 80, the preliminary safety policy is determined by adopting a third setting method.
[0095] Specifically, the preliminary security policy setting module sets the preliminary security policy in the third setting mode, wherein:
[0096] If the damage degree of the historical data is greater than or equal to 40% of the preset data damage degree, the number of traps is determined to be a first number of 15;
[0097] If the damage degree of the historical data is less than 40% of the preset data damage degree, the number of traps is determined to be a second number of 10.
[0098] Specifically, the setting contents of the trap in the third setting mode have nothing to do with the real data.
[0099] Specifically, the preliminary security policy setting module determines the trap setting content in the second setting mode, wherein:
[0100] If the intrusion data level is greater than or equal to the preset intrusion data level, determining that the proportion of real data in the content setting of the trap is the first proportion of 10%;
[0101] If the intrusion data level is lower than the preset intrusion data level, determining that the proportion of real data in the content setting of the trap is the second proportion of 5%;
[0102] Among them, under the second setting mode, the number of traps is the first number 15.
[0103] Specifically, the preset intrusion data level is determined according to the historical intrusion process.
[0104] Specifically, the first setting method includes a first layer of traps set in the third setting method and a second layer of traps set in the second setting method.
[0105] Specifically, the present invention grades the degree of network intrusion based on the security value, thereby determining the setting method of the preliminary security policy, and adopts different setting methods for each level of network intrusion, thereby maximizing the efficiency of firewall use while ensuring security, thereby improving the flexibility and self-scalability of the industrial Internet of Things firewall.
[0106] Specifically, the security policy determination module determines whether the optimal security policy matched by the random forest model meets the preset standard based on the test set, wherein:
[0107] If the accuracy rate, the precision rate, the recall rate and the F1 value are respectively greater than or equal to a preset accuracy rate of 90%, a preset precision rate of 90%, a preset recall rate of 85% and a preset F1 value of 85%, it is determined that the optimal security strategy matched by the random forest model meets the preset standard;
[0108] If any one of the accuracy rate, the precision rate, the recall rate and the F1 value is less than the corresponding preset value, it is determined that the optimal security policy matched by the random forest model does not meet the preset standard.
[0109] Specifically, the security policy determination module increases the number of decision trees to be constructed based on the accuracy difference, precision difference, recall difference and / or F1 value difference when the optimal security policy does not meet the preset standard, and the increase in the number of decision trees to be constructed is different based on each difference.
[0110] Specifically, if the accuracy difference is greater than the preset accuracy difference of 2%, the first accuracy correction coefficient of 1.08 is used to increase the number of decision trees to be constructed;
[0111] If the accuracy difference is less than or equal to the preset accuracy difference of 2%, the second accuracy correction coefficient of 1.05 is used to increase the number of decision trees to be constructed;
[0112] If the accuracy difference is greater than the preset accuracy difference of 1.5%, the number of decision trees constructed is increased by using a first accuracy correction coefficient of 1.1;
[0113] If the accuracy difference is less than or equal to the preset accuracy difference of 1.5%, the second accuracy correction coefficient of 1.06 is used to increase the number of decision trees to be constructed;
[0114] If the recall rate difference is greater than the preset recall rate difference of 2%, the first recall rate correction coefficient of 1.03 is used to increase the number of decision trees to be constructed;
[0115] If the recall rate difference is less than or equal to the preset recall rate difference of 2%, the second recall rate correction coefficient of 1.01 is used to increase the number of decision trees to be constructed;
[0116] If the F1 value difference is greater than the preset F1 value difference of 1.8%, the first F1 value correction coefficient of 1.07 is used to increase the number of decision trees constructed;
[0117] If the F1 value difference is less than or equal to the preset F1 value difference of 1.8%, the second F1 value correction coefficient of 1.04 is used to increase the number of decision trees constructed;
[0118] If two, three or four parameters are less than the corresponding preset values at the same time, the largest correction coefficient is selected to correct the number of decision trees to be constructed.
[0119] Specifically, the present invention determines whether the security strategy corresponding to the maximum matching score meets the preset standards as the optimal security strategy based on accuracy, precision, recall and F1 value, and optimizes the number of decision trees to be constructed based on each difference, overcoming the problem that a single indicator cannot fully reflect the performance of the model, thereby improving the accuracy of the judgment of the model simulation results.
[0120] See also Figure 2 As shown, it is a structural block diagram of the industrial Internet of Things firewall self-expansion system according to an embodiment of the present invention.
[0121] Specifically, an embodiment of the present invention further provides an industrial Internet of Things firewall self-expansion system, including:
[0122] A device identification module, used to construct a device list and an adjacency matrix and output device features based on the device list and the adjacency matrix;
[0123] A data analysis module, connected to the device identification module, for generating a device data set based on the device features, dividing the device data set into a training set and a test set, and outputting a safety value based on the device data set;
[0124] A security policy matching module, which is connected to the data analysis module, and is used to output a matching score based on the training set, and to determine, based on the maximum matching score, to select a security policy corresponding to the maximum matching score as the optimal security policy for matching, or to select a preliminary security policy as the optimal security policy for matching;
[0125] A security policy determination module is connected to the security policy matching module, and inputs the test set into the random forest model to output the accuracy, precision, recall and F1 value under the condition that the security policy corresponding to the maximum matching score is selected for matching, so as to determine whether the security policy meets the preset standard, and adjusts the security policy if it does not meet the preset standard;
[0126] A preliminary security policy setting module, which is connected to the security policy matching module and is used to determine a setting mode of the preliminary security policy based on the security value and perform preliminary security policy setting;
[0127] The automated deployment module is connected to the security policy matching module and is used to add the optimal security policy that meets the preset standards to the firewall device using an automated deployment script.
[0128] Specifically, the present invention uses automated deployment scripts to add matched security policies to firewall devices, reducing manual intervention and errors. After deployment, based on real-time traffic and threat intelligence, an optimization algorithm is used to dynamically adjust security policies and resource allocation to improve system security.
[0129] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A self-expansion method for an industrial Internet of Things firewall, characterized in that: include: The device identification module scans the IP addresses and open ports in the industrial Internet of Things, identifies the device type, obtains the connection relationship between devices, and builds a device list and adjacency matrix; The data analysis module outputs a number of device features based on the device list and the adjacency matrix, wherein the device features include basic attribute features, performance parameter features, usage status features, fault maintenance features, and external environment features; The data analysis module outputs information gain values for the device features and generates a device data set for the device features corresponding to the information gain values that meet preset standards, so as to divide the device data set into a training set and a test set in a preset ratio; The security policy matching module inputs the training set into a random forest model, and the random forest model outputs a matching score for the security policies in the database by constructing a decision tree; The security policy matching module determines, based on the maximum matching score value, to select the security policy corresponding to the maximum matching score value as the optimal security policy for matching, or selects the preliminary security policy as the optimal security policy for matching; The security policy determination module inputs the test set into the random forest model to output the accuracy, precision, recall and F1 value under the condition that the security policy corresponding to the maximum matching score is selected for matching, so as to determine whether the security policy meets the preset standard; The preliminary security policy setting module determines and sets the setting mode of the preliminary security policy based on the security value for any device under the condition that the preliminary security policy is selected for matching; The automated deployment module uses an automated deployment script to add the optimal security policy to the firewall device; The calculation formula of the information gain value is: ; ; ; Among them, H(D) is the collective entropy of the data set, P i is the proportion of security policy i in the data set, c is the total number of security policies in the data set, H(D|A) is the conditional entropy of input feature A to the data set, n is the number of values of feature A, |D i |The input feature A corresponds to security policy D i The number of data samples, IG(A) is the information entropy corresponding to the input feature A.
2. The industrial Internet of Things firewall self-expansion method according to claim 1 is characterized in that: The security policy matching module determines the optimal security policy based on the maximum matching score, wherein: If the maximum value of the matching score is less than a preset standard value, the preliminary security strategy is selected as the optimal security strategy for matching; If the maximum value of the matching score is greater than or equal to the preset standard value, the security policy corresponding to the maximum value of the matching score is selected as the optimal security policy for matching.
3. The industrial Internet of Things firewall self-expansion method according to claim 2 is characterized in that: The preliminary security policy setting module determines a setting mode of the preliminary security policy based on the security value, wherein: If the safety value is less than the first preset safety value, the first setting method is used to determine the preliminary safety strategy; If the safety value is greater than or equal to the first preset safety value and less than the second preset safety value, the second setting method is used to determine the preliminary safety strategy; If the security value is greater than or equal to the second preset security value, a third setting method is used to determine the preliminary security policy.
4. The industrial Internet of Things firewall self-expansion method according to claim 3 is characterized in that: The preliminary security policy setting module sets the preliminary security policy in the third setting mode, wherein: If the historical data damage degree is greater than or equal to the preset data damage degree, determining the number of traps to be the first number; If the damage degree of the historical data is less than the preset data damage degree, the number of traps is determined to be a second number.
5. The industrial Internet of Things firewall self-expansion method according to claim 4 is characterized in that: The preliminary security policy setting module determines the trap setting content in the second setting mode, wherein: If the intrusion data level is greater than or equal to the preset intrusion data level, determining that the proportion of real data in the content setting of the trap is the first proportion; If the intrusion data level is lower than the preset intrusion data level, determining that the proportion of real data in the content setting of the trap is the second proportion; Among them, the number of traps in the second setting mode is the first number.
6. The industrial Internet of Things firewall self-expansion method according to claim 5 is characterized in that: The first setting method includes a first layer of traps set in the third setting method and a second layer of traps set in the second setting method.
7. The industrial Internet of Things firewall self-expansion method according to claim 1, characterized in that: The security policy determination module determines whether the optimal security policy matched by the random forest model meets the preset standard based on the test set, wherein: If the accuracy rate, the precision rate, the recall rate and the F1 value are respectively greater than or equal to the preset accuracy rate, the preset precision rate, the preset recall rate and the preset F1 value, it is determined that the optimal security strategy matched by the random forest model meets the preset standard; If any one of the accuracy rate, the precision rate, the recall rate and the F1 value is less than the corresponding preset value, it is determined that the optimal security policy matched by the random forest model does not meet the preset standard.
8. The industrial Internet of Things firewall self-expansion method according to claim 7, characterized in that: The security policy determination module increases the number of decision trees to be constructed based on the accuracy difference, precision difference, recall difference and / or F1 value difference when the optimal security policy does not meet the preset standard, and the increase in the number of decision trees to be constructed is different based on each difference.
9. An industrial Internet of Things firewall self-expansion system using the method described in any one of claims 1 to 8, characterized in that: include: A device identification module, used to construct a device list and an adjacency matrix and output device features based on the device list and the adjacency matrix; A data analysis module, connected to the device identification module, for generating a device data set based on the device features, dividing the device data set into a training set and a test set, and outputting a safety value based on the device data set; A security policy matching module, which is connected to the data analysis module, and is used to output a matching score based on the training set, and to determine, based on the maximum matching score, to select a security policy corresponding to the maximum matching score as the optimal security policy for matching, or to select a preliminary security policy as the optimal security policy for matching; A security policy determination module is connected to the security policy matching module, and inputs the test set into the random forest model to output the accuracy, precision, recall and F1 value under the condition that the security policy corresponding to the maximum matching score is selected for matching, so as to determine whether the security policy meets the preset standard, and adjusts the security policy if it does not meet the preset standard; A preliminary security policy setting module, which is connected to the security policy matching module and is used to determine a setting mode of the preliminary security policy based on the security value and perform preliminary security policy setting; The automated deployment module is connected to the security policy matching module and is used to add the optimal security policy that meets the preset standards to the firewall device using an automated deployment script.
