Network port security protection method, device, electronic device and storage medium
By acquiring and analyzing the color data of network interface devices in real time, combined with data fusion technology and historical behavior data, real-time identification and network blocking of unauthorized device connections are achieved, solving the difficulty in identifying physical device replacement or unauthorized use in the existing technology. connection issues and reduce security risks.
Patent Information
- Application Number
- CN202410910767.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Existing network port security protection methods are difficult to identify unauthorized connections of physical devices in real time, resulting in security risks.
By acquiring the color data of the device surface at the network interface in real time, using color recognition algorithms to extract color feature parameters, matching them with the pre-established device color feature library, calculating the color difference value, triggering a warning when the color difference exceeds the threshold, and eliminating the environment through data fusion technology For false alarms caused by factors, the illegal score is calculated based on the historical behavior data of the device, and a network blocking command is executed when the threshold is exceeded.
It optimizes the false alarm rate, improves device identification accuracy, reduces security risks caused by illegal device connections, and can identify physical device replacement or unauthorized connections in real time.
Smart Images

Figure CN118473825B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of security protection technology, and in particular to a network port security protection method, device, electronic equipment and storage medium. Background Art
[0002] The network port is an interface used to connect computers, network devices and other external devices. It is an important component of computer hardware. The network port will connect to many external devices, such as routers, switches, printers, cameras, storage devices, etc. When unauthorized users or malicious attackers use these external devices to illegally access, invade or attack the network system, they can be blocked by blocking the network port.
[0003] The existing security protection method is to establish a network traffic monitoring mechanism, monitor network traffic and port activities in real time, promptly detect abnormal behavior or potential threats, and block network ports based on the monitoring results. However, the inventors found that the existing methods often ignore the monitoring of external device hardware, making it difficult to promptly detect illegal devices connecting to network ports with normal network traffic, resulting in the inability to identify unauthorized connections to physical devices, which poses a greater security risk. Summary of the invention
[0004] The present invention provides a network port security protection method, device, electronic equipment and storage medium, which solve the problem that it is difficult to find that illegal physical devices are connected to the network port.
[0005] According to one aspect of the present invention, the present invention provides a network port security protection method, including: acquiring color data of the device surface at the network interface in real time, extracting color feature parameters from the color data using a color recognition algorithm, matching the color feature parameters with legal color feature parameters, and calculating color difference values; wherein the legal color feature parameters are authorized color feature parameters of authorized and authenticated devices stored in a pre-established device color feature library; when the color difference value exceeds a set color difference threshold, a warning is triggered, and environmental factors that cause false warnings are eliminated through data fusion technology; if it is detected that the same device triggers warnings multiple times within a preset time interval, an illegal score is calculated based on the number of warning triggering times and the device's historical behavior data, and when the illegal score exceeds the preset score threshold, a network blocking command is executed; wherein the historical behavior data includes connection frequency, data traffic, and abnormal events.
[0006] Furthermore, the color data of the surface of the device at the network interface is acquired in real time, and the color characteristic parameters are extracted from the color data using a color recognition algorithm. Specifically, the color data is acquired by monitoring the surface color characteristics of the device at the network interface in the image using spectral analysis technology; the color data is denoised and normalized by data preprocessing technology to obtain standardized data; and the color characteristic parameters are extracted from the standardized data using a principal component analysis algorithm.
[0007] Furthermore, the color feature parameters are matched with legal color feature parameters to calculate the color difference value, specifically: the device color feature library is pre-established, wherein the fields of the device color feature library include device ID, device type, registration time and legal color feature parameters; the color feature parameters are matched with the legal color feature parameters, and the distance between the color feature parameters and all the legal color feature parameters is calculated using the Euclidean distance formula to match the authorized color feature parameters with the smallest distance; the color difference between the authorized color feature parameters with the smallest distance and the color feature parameters is calculated to obtain the color difference value.
[0008] Furthermore, the data fusion technology is used to eliminate false warnings caused by environmental factors, specifically: the recorded information of the device and the historical behavior data are correlated and analyzed using data fusion technology, and a multi-dimensional feature vector is constructed; the environmental parameters when the warning is triggered are obtained, wherein the environmental parameters include temperature, humidity and light intensity, the environmental parameters are added to the multi-dimensional feature vector, and the multi-dimensional feature vector is input into the abnormal behavior recognition model; if the abnormal behavior recognition model determines that it is normal, the triggered warning is marked as a false alarm.
[0009] Furthermore, if it is detected that the same device triggers warnings multiple times within a preset time interval, an illegal score is calculated based on the number of triggered warnings and the historical behavior data of the device. When the illegal score exceeds the preset score threshold, a network blocking command is executed, specifically: warning information of multiple triggered warnings by the same device is obtained from the abnormal device log database, wherein the warning information includes the device ID, trigger time and trigger event; the historical behavior data is obtained from the database according to the device ID; a weighted average algorithm is used to calculate the illegal score based on the number of triggered warnings and the historical behavior data, and the illegal score is compared with the score threshold. If the illegal score exceeds the score threshold, a network blocking command is generated to block the network connection.
[0010] Furthermore, after the blocking command is executed, the method also includes: obtaining blocking information of the blocked device, wherein the blocking information includes device ID, IP address, blocking time, forming a blocked device list, and synchronizing the blocked device list to all monitoring terminals.
[0011] Furthermore, the method also includes: when the illegal score does not exceed the score threshold, a time series analysis algorithm is used to predict the trend of the illegal score; if the predicted illegal score shows an increasing trend and the predicted highest illegal score exceeds the score threshold, a network blocking command is generated.
[0012] According to another aspect of the present invention, a network port security protection device is provided, comprising: an extraction module, the extraction module is used to obtain color data of the device surface at the network interface in real time, use a color recognition algorithm to extract color feature parameters from the color data, and match the color feature parameters with legal color feature parameters, and calculate color difference values; wherein the legal color feature parameters are authorized color feature parameters of authorized and authenticated devices stored in a pre-established device color feature library; a warning module, the warning module is used to trigger a warning when the color difference value exceeds a set color difference threshold, and eliminate environmental factors that generate false warnings through data fusion technology; an execution module, the execution module is used to calculate an illegal score based on the number of warning triggering times and the device's historical behavior data when detecting that the same device triggers a warning multiple times within a preset time interval, and when the illegal score exceeds the preset score threshold, a network blocking command is executed; wherein the historical behavior data includes connection frequency, data traffic, and abnormal events.
[0013] According to another aspect of the present invention, there is provided an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor;
[0014] Among them, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any network port security protection method in the embodiments of the present invention.
[0015] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any network port security protection method in the embodiments of the present invention.
[0016] The technology according to the present invention optimizes the false alarm rate and improves the device recognition accuracy by adopting a multiple-trigger warning mechanism and correcting the color distortion caused by color environment changes. The device color authorization recognition solves the problem of difficulty in real-time identification of physical device replacement or unauthorized connection in traditional network security detection, and reduces the security risks brought by illegal device connection.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.
[0019] Figure 1 is a flow chart of a network port security protection method according to an embodiment of the present invention;
[0020] Figure 2 is a flow chart of step S3 of the network port security protection method according to an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of a network port security protection device for implementing an embodiment of the present invention;
[0022] Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0023] In the figure, 100, network port security protection device; 11, extraction module; 12, warning module; 13, execution module; 200, electronic device; 201, computing unit; 202, ROM; 203, RAM; 204, bus; 205, I / O interface; 206, input unit; 207, output unit; 208, storage unit; 209, communication unit. DETAILED DESCRIPTION
[0024] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present invention. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0025] like Figure 1As shown, an embodiment of the present invention discloses a network port security protection method, including: S1, real-time acquisition of color data of the device surface at the network interface, using a color recognition algorithm to extract color feature parameters from the color data, and matching the color feature parameters with legal color feature parameters to calculate color difference values; wherein the legal color feature parameters are authorized color feature parameters of authorized and authenticated devices stored in a pre-established device color feature library; S2, when the color difference value exceeds a set color difference threshold, a warning is triggered, and environmental factors that cause false warnings are eliminated through data fusion technology; S3, if it is detected that the same device triggers warnings multiple times within a preset time interval, an illegal score is calculated based on the number of warning triggering times and the device's historical behavior data, and when the illegal score exceeds the preset score threshold, a network blocking command is executed; wherein the historical behavior data includes connection frequency, data traffic, and abnormal events.
[0026] The network port security protection method of the present application obtains the color data of the surface of the device at the network interface, extracts the color feature parameters, and matches them with the authorized color feature parameters of the pre-established device color feature library. After matching the most similar authorized color feature parameters, the color difference value between the color feature parameters and the authorized color feature parameters is calculated. The color difference value is used to determine whether the device is authorized to connect. When the color difference exceeds the set judgment threshold, the device information that triggers the warning will be recorded, and the false alarms that may be caused by environmental changes will be eliminated through data fusion technology. If the same device triggers the warning multiple times, the illegal score is calculated based on the number of device trigger warnings and the device's historical behavior data, and the network blocking command is executed when the illegal score exceeds the score threshold. By adopting a multiple trigger warning mechanism and correcting the color distortion caused by color environment changes, the false alarm rate is optimized and the device recognition accuracy is improved. The device color recognition solves the problem of difficulty in real-time identification of physical device replacement or unauthorized connection in traditional network security detection, and reduces the security risks caused by illegal device connections.
[0027] In an optional embodiment of the present invention, step S1 is specifically as follows: using spectral analysis technology to obtain color data from the surface color features of the device at the network interface in the monitoring image; denoising and normalizing the color data through data preprocessing technology to obtain standardized data; using a principal component analysis algorithm to extract color feature parameters from the standardized data, the legal color feature parameters are authorized color feature parameters of the authorized authentication device, the color feature parameters are matched with the legal color feature parameters, and the Euclidean distance formula is used to calculate the distance between the color feature parameters and all legal color feature parameters, and the legal color feature parameters with the smallest distance are matched, and then the legal color feature parameters with the smallest distance are used to calculate the color difference with the color feature parameters to obtain the color difference value.
[0028] Specifically, a spectrophotometer is used to perform spectral analysis on the surface color of the device connected to the network port, and the intensity of reflected light of different wavelengths on the surface of the device is collected to obtain a set of reflectance data, such as [0.2, 0.3, 0.4, ..., 0.8]. Then, the collected color data is preprocessed, the median filter algorithm is used to remove noise, and the data is scaled to the [0, 1] interval through the minimum-maximum normalization method to obtain standardized data. Next, the principal component analysis (PCA) algorithm is used to extract features from the standardized data to obtain color feature parameters.
[0029] Specifically, you can use MySQL database to create a device color feature library, the table structure is: device ID (primary key), device type, color feature parameters (such as RGB value), registration time and other fields. The above RGB value is a standard method of representing color by combining the values of red, green and blue. Through the role-based access control mechanism, different administrators are assigned corresponding permissions. For example, the super administrator has all permissions, and the ordinary administrator only has the permission to query and add new devices. The corresponding SQL statement is:
[0030] GRANTSELECT,INSERTONdevice_color_db.*TO'admin'@'localhost', the above SQL statement means granting the user the permission to perform query and insert operations on all tables in the database on the local host. When a new device surface color feature parameter is collected, such as [0.8, 0.1, 0.2], it is first normalized to obtain a normalized color feature vector, such as [0.72, 0.09, 0.18]. Then, the Euclidean distance formula is used to calculate the distance between the vector and the color feature parameters of all records in the feature library, and the record with the smallest distance is found. If the minimum distance is less than the threshold of 0.1, it is determined to be a legitimate device, and the device detailed information of the record is obtained, such as the device type is "printer", the model is "HPLaserJetProM403dn", and the serial number is "CN12345678". At the same time, the status of the device is updated to "online". If the minimum distance is greater than or equal to 0.1, it is determined to be an illegal device, triggering the alarm mechanism and recording the device's IP address, port number and other connection information. In order to enhance the security of the system, sensitive fields (such as color feature parameters) in the device color feature library can be AES encrypted and stored, and the encryption key can be updated regularly. In the device registration and authentication process, a certificate-based two-way authentication mechanism is adopted to ensure that only devices with legal certificates can access the system. In addition, the support vector machine algorithm is introduced to automatically classify the devices in the feature library according to the color feature parameters, and obtain the cluster centers of different device types, such as the cluster center of the printer is [0.65, 0.20, 0.15], and the cluster center of the switch is [0.30, 0.55, 0.15]. When a new device is connected, the distance from its color feature vector to each cluster center is calculated. The cluster with the smallest distance is the predicted type of the device, which can be used as an auxiliary reference for device identification.
[0031] Specifically, a color image of the device surface is collected in real time through a high-definition camera, and its RGB color value is extracted, such as [255, 128, 64], and normalized to obtain a standardized color feature vector, such as [1.0, 0.5, 0.25]. Then, the legal color feature parameters of the corresponding device type are read from the device color feature library, such as the standard color feature vector of a printer is [0.9, 0.6, 0.3]. The color difference value between the real-time color feature vector and the standard color feature vector is calculated using the CIE 1976 color difference formula, as follows:
[0032] ΔE=sqrt((L2-L1) 2 +(a2-a1) 2 +(b2-b1) 2) Where L represents brightness, a represents red-green hue, and b represents yellow-blue hue. Substituting the real-time vector [1.0, 0.5, 0.25] and the standard vector [0.9, 0.6, 0.3] into the formula, we get the color difference value ΔE=0.18. CIE 1976 refers to a color space and color difference formula proposed by the International Commission on Illumination in 1976, also known as the CIELAB color space and color difference formula.
[0033] In an optional embodiment of the present invention, a high-definition camera is used to capture a color image of the device surface to obtain a set of RGB color values, such as:
[0034] [(255,0,0),(0,255,0),(0,0,255),...]. Then, the collected color data is preprocessed, and the outliers and missing values are removed by using data cleaning technology. The RGB values are scaled to the interval [0,1] by the min-max normalization method to obtain a standardized color feature data set. Next, the standardized color feature data set is randomly divided into a training set and a test set with a ratio of 8:2, and a color recognition model is constructed using the support vector machine algorithm. During the model training process, the kernel function type, penalty coefficient C, and kernel function parameter γ of the support vector machine algorithm are optimized by the grid search method, such as trying different combinations: linear, rbf, poly,
[0035] Among them, linear, rbf, and poly are kernel function options used in the support vector machine algorithm, C takes the value of [0.1, 1, 10], and γ takes the value of [0.01, 0.1, 1]. The parameter combination with the highest accuracy on the test set is selected as the optimal model. If the accuracy of the optimal model is less than 90%, the training samples are expanded and the model is retrained through data enhancement techniques such as image rotation, flipping, and cropping. The trained SVM model is used to predict the newly collected device surface color feature data to obtain the color feature parameters of the device, such as [0.8, 0.1, 0.2]. Finally, the extracted color feature parameters are matched with the legal color feature parameters in the pre-stored device feature library, and the Euclidean distance is calculated. If the distance is less than the threshold value of 0.1, it is judged as the same type of device, otherwise it is identified as an unknown device.
[0036] In an optional embodiment of the present invention, the first k principal components of the color feature parameters are selected as the color feature vector of the device, for example, [0.5, 0.3, 0.2]. In the device color feature library, each device type and model corresponds to a legal color feature parameter and color feature vector, such as the feature vector of router A is [0.6, 0.2, 0.1], and the feature vector of switch B is [0.4, 0.4, 0.3]. By calculating the Euclidean distance between the color feature vector of the device to be identified and the feature vectors of each device in the library, the device with the smallest distance is found as the identification result. If the minimum distance is greater than a preset threshold, such as 0.3, the alarm mechanism is triggered. According to the identified device model, the corresponding driver and configuration parameters are obtained from the device configuration library, such as the IP address of router A is 192.168.0.1, the subnet mask is 255.255.255.0, and the device configuration is automatically completed. Finally, the identification and configuration results are recorded in the system log file, including timestamp, device ID, device type, configuration parameters and other information, and the results are returned to the upper-layer application to achieve plug-and-play of the device.
[0037] like Figure 2 As shown, in an optional embodiment of the present invention, step S3 is specifically as follows: S31, when the color difference value exceeds the set color difference threshold, a warning is triggered; S32, the recorded information and historical behavior data of the device are correlated and analyzed using data fusion technology, and a multi-dimensional feature vector is constructed, wherein the recorded information includes device ID, device type, connection time and color difference value, and the historical behavior data includes connection frequency, connection duration and data flow; S33, the environmental parameters when the warning is triggered are obtained, wherein the environmental parameters include temperature, humidity and light intensity, and the environmental parameters are added to the multi-dimensional feature vector; S34, the multi-dimensional feature vector is input into the abnormal behavior recognition model, wherein the abnormal behavior recognition model is based on the behavioral characteristics of normal devices and abnormal devices in the historical data, and is trained using the support vector machine algorithm; S35, if the abnormal behavior recognition model is determined to be normal, the triggered warning is marked as a false alarm.
[0038] Specifically, the color difference threshold is set to 0.2, then 0.18<0.2. After the color difference value ΔE=0.18 is obtained, the device is determined to be a legal device and the device status is updated to "normal". If the color difference value is greater than or equal to 0.2, such as the color feature vector of an illegal printer is detected to be [0.7, 0.4, 0.2], and the color difference value ΔE=0.28≥0.2 is calculated, the abnormal warning mechanism is triggered. Generate an abnormal event record, the content is as follows:
[0039] {"eventType":"colorAbnormal","eventTime":"2023-05-2014:30:25","deviceId":"printer-001","deviceType":"printer","colorVector":[0.7,0.4,0.2],"deltaE":0.28}, the above content is: a color abnormality event occurred on the printer device at 14:30:25 on May 20, 2023. The RGB value of the abnormal color is [0.7, 0.4, 0.2], and the delta E value between the abnormal color and the standard color is 0.28. According to the severity of the abnormal event, the relevant responsible person is notified by email, SMS, etc., such as sending an email to the network administrator, with the content: Warning: Illegal printer access detected! Device ID: printer-001 Access time: 2023-05-2014:30:25 Color difference value: 0.28 Please handle as soon as possible! At the same time, the abnormal event records are inserted into the abnormal log collection of the MongoDB database, and the Spark big data analysis platform is called to perform real-time statistics and analysis on abnormal events, generate abnormal event reports, such as statistics on the number of abnormal events per day, the distribution of abnormal equipment types, etc., and display the analysis results through visual charts. In order to improve the accuracy of anomaly detection, the support vector machine algorithm is introduced to train the historical abnormal event data to obtain the optimal decision boundary, that is, the color difference threshold. When a new device is connected, its color feature vector is input into the support vector machine model for prediction. If it is predicted to be abnormal, a warning is triggered. In addition, knowledge graph technology can be used to associate abnormal events with equipment type, color features, time and other information to form an abnormal event knowledge base, which is convenient for operation and maintenance personnel to quickly query and locate problems.
[0040] Specifically, the color characteristics of the device surface can be calculated in real time by the color difference calculation module. For example, the value of the legal device color in the Lab color space should be L=50, a=10, b=20, and the device color characteristic value collected by the color difference calculation module is L=52, a=12, b=22. Then the actual color difference value ΔE*ab is calculated by the CIE76 color difference formula:
[0041] ΔE*ab=((L2-L1) 2 +(a2-a1)+(b2-b1) 2 ) 0.5≈46, the color difference threshold set in the configuration file is 5, and the color difference value 46 calculated in real time exceeds the threshold range. At this time, the system will trigger the abnormal device warning mechanism. After the device information collection module is triggered, detailed information includes device model, serial number, etc. For example, the device model found is "X123" and the serial number is "SN456789". The collected location information shows that the device is under the third-layer switch of the network topology and is connected to the 24th port; the physical location is located in Room 305, Building 2 of the company. This information is obtained through the network management system and the asset management system. The connection time information shows that the device was connected to the network at 14:32:07 on March 15, 2023. This information is extracted from the network connection log. After encapsulating the above information into an abnormal device information object, the warning information automatically generated by the warning information generation module may be: "Warning level: medium; description information: abnormal device color is detected, which may be an unauthorized replacement or damaged device; recommended disposal method: please conduct an on-site inspection immediately and verify the device status". This warning message was then sent to the head of the IT department. At the same time, the introduced anomaly detection algorithms, such as the clustering-based anomaly detection algorithm, analyzed the color difference data of the equipment in the past month and found a growth trend, predicting that more equipment may have color anomalies in the next week. Through the integrated GIS geographic information system, the location information of the abnormal equipment is marked as a red warning icon on the map and displayed on the third floor plan of Building 2, helping the operation and maintenance personnel to quickly locate Room 305.
[0042] Specifically, the printer record information that triggers the warning is read from the abnormal device log database, such as the device ID is "printer001", the connection time is "2023-05-2014:30:25", and the color difference value is 6.5. According to the device ID "printer001", the connection behavior data of the printer in the past month is obtained from the device connection history database, with an average of 5 connections per day, an average connection time of 30 minutes, and a data flow peak of 50MB / min. Using data fusion technology, the printer's record information and historical behavior data are correlated and analyzed to construct a multi-dimensional feature vector, such as ["printer", 5, 30, 50, 6.5]. Through the environmental monitoring system, the environmental parameters when the warning is triggered are obtained, such as temperature 25°C, humidity 60%, and light intensity 500lux. These parameters are added to the feature vector to form a more comprehensive device behavior description, such as ["printer", 5, 30, 50, 6.5, 25, 60%, 500]. The feature vector is input into the pre-trained abnormal behavior recognition model. The model uses the support vector machine algorithm and is trained based on the behavioral characteristics of normal and abnormal devices in historical data. The decision function of the model is: f(x)=sign(∑αiyiK(x,xi)+b), where x is the input feature vector, xi is the training sample feature vector, yi is the label of the training sample (normal is 1, abnormal is -1), αi is the Lagrange multiplier, K(x,xi) is the kernel function, and b is the bias term. Substituting the printer's feature vector into the decision function, we get f(x)=-1, indicating that the printer's behavior is abnormal. If the abnormal behavior recognition model determines that it is normal, the triggered warning will be marked as a false alarm.
[0043] According to the type and severity of the anomaly, intelligent early warning information is generated to optimize the recognition model. In order to adapt to the ever-changing network environment and device behavior patterns, an incremental learning mechanism is introduced to regularly extract samples from the normal device behavior library and the abnormal device behavior library, and incremental training is performed on the recognition model to continuously improve the generalization ability of the model. At the same time, the security event correlation analysis technology is integrated to collect security event information from different sources such as network device logs, host logs, and application logs. Using methods such as time series analysis and causal analysis, potential complex attack behaviors such as APT (advanced persistent threat) attacks are discovered. For example, through correlation analysis, it was found that when the printer connection was abnormal, a large amount of sensitive data on a server was read. It is likely that an internal person used the printer as a springboard to steal company secrets. By timely discovering and handling such complex attack behaviors, the overall security defense capability of the system is effectively improved.
[0044] In an optional embodiment of the present invention, step S4 is specifically as follows: obtaining warning information of the same device that triggers warnings multiple times from the abnormal device log database, the warning information includes the device ID, trigger time and trigger event, obtaining historical behavior data from the database according to the device ID, the historical behavior data includes connection frequency, data flow and abnormal events, using a weighted average algorithm, calculating the illegal score according to the number of trigger warnings and the historical behavior data, comparing the illegal score with the score threshold, and if the illegal score exceeds the score threshold, generating a network blocking command to block the network connection. If the illegal score does not exceed the score threshold, a time series analysis algorithm is used to predict the trend of the illegal score, and if the predicted illegal score shows an increasing trend and the predicted illegal score exceeds the score threshold, a network blocking command is generated.
[0045] Specifically, it was detected that the device with device ID 12345 triggered three warnings in a short period of time. The triggering time was 08:00, 08:05 and 08:10, and the triggering events were high traffic anomalies, port scanning and multiple login failures, with anomaly scores of 70, 80 and 90 respectively. These records come from the abnormal device log database. Based on the device ID, the historical behavior data of the device is extracted from the device behavior database. Historical data shows that the device usually connects 10 times per hour, with an average data traffic of 500MB, and two abnormal event records in the past month. The illegal score of the device is calculated based on the following weights Wi and the scores of each factor Scorei, connection frequency score Score1: 20 (normal frequency), weight W1: 2; data traffic score Score2: 40 (normal traffic), weight W2: 3; abnormal event score Score3: 70 (recent frequent anomalies), weight W3: 5; calculation of illegal score:
[0046] Score=(W1*Score1+W2*Score2+W3*Score3) / (W1+W2+W3)Score=(2*20+3*40+5*70) / (2+3+5)Score=(4+12+35) / 1Score=51, the preset score threshold is 60. Since the calculated illegal score is 51, which is lower than the score threshold, the device will not be blocked temporarily. However, the ARIMA model is further used to analyze the risk value of the device every day in the past week. Monday is 45, Tuesday is 47, Wednesday is 50, Thursday is 55, Friday is 58, Saturday is 61, and Sunday is 65. The ARIMA model predicts the trend of the next three days: next Monday is 68, next Tuesday is 71, and next Wednesday is 74. According to the time series analysis, the risk value shows a trend of increasing from low risk to high risk. Although the current score does not exceed the score threshold, the forecast shows that the risk value will continue to increase. Considering the results of the trend analysis, if the threshold is set to take into account future risks, it is decided to lower the threshold to 50. At this time, the current illegal score of 51 exceeds the new score threshold of 50, and the system generates a network blocking command to disconnect the network connection of the device with device ID 12345. After the blocking command is executed, the relevant records in the device behavior database and the abnormal device log database are updated, the device is marked as blocked, and the scoring threshold and weight parameters are dynamically adjusted according to the latest analysis results. For example, the weight of the connection frequency will be increased because frequent connections indicate automated malicious activities.
[0047] In an optional embodiment of the present invention, after the blocking command is executed, the blocking information of the blocked device is obtained, the blocking information includes the device ID, IP address, and blocking time, a list of blocked devices is formed, the list of blocked devices is synchronized to all monitoring terminals, the color recognition algorithm and color difference threshold are adjusted, and the false alarm rate and device recognition accuracy are optimized.
[0048] Specifically, the information of blocked devices is obtained from the execution result of the network blocking command, such as the device ID of the printer "printer001", the IP address "192.168.1.105", the blocking time "2023-05-2015:30:00", etc., to form a list of blocked devices. The list is synchronized to all monitoring terminals through the RESTAPI interface in JSON format. After receiving the update request, the monitoring terminal merges the newly added device information into the blocked device collection of the local MongoDB database. According to the characteristic parameters of the blocked devices, such as the color difference value of 6.5 and the connection frequency of 10 times / hour, the relevant parameters in the color recognition algorithm are adjusted, such as adjusting the weight coefficient in the color difference calculation formula from [0.3, 0.3, 0.4] to [0.4, 0.2, 0.4] to increase the weight of the color difference value. Adopting the adaptive threshold optimization algorithm, the color difference discrimination threshold is dynamically adjusted according to the color difference distribution of normal and abnormal devices in historical data, such as the color difference mean of normal devices is 2.5, the standard deviation is 0.8, and the color difference mean of abnormal devices is 7.5, the standard deviation is 1.2. Adaptive threshold calculation formula is used: Threshold = μ0 + k * σ0, where μ0 is the color difference mean of normal devices, σ0 is the standard deviation of color difference of normal devices, and k is the adjustment factor. According to the historical data setting, the color difference discrimination threshold is adjusted from a fixed value of 5.0 to an adaptive threshold of 4.2, while ensuring a 90% recognition rate of abnormal devices, and reducing the false alarm rate of normal devices to less than 5%.
[0049] Through 50% cross validation, the performance of the adjusted color recognition algorithm and color difference discrimination threshold was evaluated. The results showed that the accuracy of abnormal device recognition increased from the original 85% to 93%, and the false alarm rate of normal equipment decreased from the original 10% to 3%, with significant performance improvement. The optimized algorithm model and threshold configuration are packaged and sent to all monitoring terminals through the configuration management system. After receiving the update package, the monitoring terminal automatically updates the algorithm model and threshold to ensure that each monitoring terminal uses the latest and optimal algorithm and configuration. Continuously collect device recognition results and feedback information from the monitoring terminal, such as collecting 100 device recognition records per day, including device ID, color features, color difference values, recognition results, etc., and regularly optimize the algorithm and threshold, such as performing full optimization once a week and incremental optimization once a day to form a dynamic update mechanism.
[0050] like Figure 3 As shown, the network port security protection device 100 may include:
[0051] Extraction module 11, the extraction module 11 is used to obtain color data of the device surface at the network interface in real time, extract color feature parameters from the color data using a color recognition algorithm, match the color feature parameters with legal color feature parameters, and calculate the color difference value; wherein the legal color feature parameters are authorized color feature parameters of authorized authentication devices stored in a pre-established device color feature library;
[0052] Warning module 12, which is used to trigger a warning when the color difference value exceeds a set color difference threshold, and eliminate false warnings caused by environmental factors through data fusion technology;
[0053] Execution module 13 and execution module 14 are used to calculate an illegal score based on the number of warnings triggered and the historical behavior data of the device when detecting that the same device triggers warnings multiple times within a preset time interval. When the illegal score exceeds a preset score threshold, a network blocking command is executed; wherein the historical behavior data includes connection frequency, data traffic, and abnormal events.
[0054] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present invention, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0055] In the technical solution of the present invention, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0056] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.
[0057] Figure 4 A schematic block diagram of an example electronic device 200 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0058] like Figure 4As shown, the device 200 includes a computing unit 201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 202 or a computer program loaded from a storage unit 208 into a random access memory (RAM) 203. In the RAM 203, various programs and data required for the operation of the device 200 can also be stored. The computing unit 201, the ROM 202, and the RAM 203 are connected to each other via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0059] A number of components in the device 200 are connected to the I / O interface 205, including: an input unit 206, such as a keyboard, a mouse, etc.; an output unit 207, such as various types of displays, speakers, etc.; a storage unit 208, such as a disk, an optical disk, etc.; and a communication unit 209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 209 allows the device 200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0060] The computing unit 201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 201 performs the various methods and processes described above, such as a hairnet security protection method. For example, in some embodiments, a hairnet security protection method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 200 via the ROM 202 and / or the communication unit 209. When the computer program is loaded into the RAM 203 and executed by the computing unit 201, one or more steps of a hairnet security protection method described above may be executed. Alternatively, in other embodiments, the computing unit 201 may be configured to execute a network port security protection method in any other appropriate manner (eg, by means of firmware).
[0061] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0062] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0063] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0064] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0065] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0066] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0067] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.
[0068] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A network port security protection method, characterized in that: include: Acquire the color data of the device surface at the network interface in real time, extract the color characteristic parameters from the color data using a color recognition algorithm, and match the color characteristic parameters with the legal color characteristic parameters to calculate the color difference value; wherein the legal color characteristic parameters are the authorized color characteristic parameters of the authorized authentication device stored in a pre-established device color characteristic library; When the color difference value exceeds the set color difference threshold, a warning is triggered, and the environmental factors that cause false warnings are eliminated through data fusion technology; If it is detected that the same device triggers warnings multiple times within a preset time interval, an illegal score is calculated based on the number of triggered warnings and the device's historical behavior data. When the illegal score exceeds a preset score threshold, a network blocking command is executed; wherein the historical behavior data includes connection frequency, data traffic, and abnormal events.
2. The method according to claim 1, characterized in that The real-time acquisition of color data of the device surface at the network interface and the extraction of color feature parameters from the color data using a color recognition algorithm are specifically as follows: Using spectral analysis technology to obtain the color data from the surface color features of the device at the network interface in the monitoring image; De-noising and normalizing the color data by using data preprocessing technology to obtain standardized data; A principal component analysis algorithm is used to extract color feature parameters from the standardized data.
3. The method according to claim 1, characterized in that The color characteristic parameters are matched with the legal color characteristic parameters to calculate the color difference value, specifically: Pre-establishing the device color feature library, wherein the fields of the device color feature library include device ID, device type, registration time and legal color feature parameters; Matching the color feature parameter with the legal color feature parameter, using the Euclidean distance formula to calculate the distance between the color feature parameter and all the legal color feature parameters, and matching the authorized color feature parameter with the smallest distance; The color difference between the authorized color characteristic parameter with the smallest distance and the color characteristic parameter is calculated to obtain a color difference value.
4. The method according to claim 1, characterized in that: The method of eliminating false warnings caused by environmental factors by using data fusion technology is as follows: Adopting data fusion technology to correlate and analyze the recorded information of the device and the historical behavior data, and constructing a multi-dimensional feature vector; Obtain environmental parameters when a warning is triggered, wherein the environmental parameters include temperature, humidity, and light intensity, add the environmental parameters to the multidimensional feature vector, and input the multidimensional feature vector into an abnormal behavior recognition model; if the abnormal behavior recognition model determines that it is normal, mark the triggered warning as a false alarm.
5. The method according to claim 1, characterized in that If it is detected that the same device triggers warnings multiple times within a preset time interval, an illegal score is calculated based on the number of warnings triggered and the historical behavior data of the device. When the illegal score exceeds a preset score threshold, a network blocking command is executed, specifically: Acquire warning information of multiple warnings triggered by the same device from the abnormal device log database, wherein the warning information includes the device ID, the triggering time and the triggering event; Acquire the historical behavior data from a database according to the device ID; A weighted average algorithm is used to calculate the illegal score according to the number of warning triggering times and the historical behavior data, and the illegal score is compared with the score threshold. If the illegal score exceeds the score threshold, a network blocking command is generated to block the network connection.
6. The method according to claim 5, characterized in that After the blocking command execution step, the method further includes: Obtain blocking information of blocked devices, wherein the blocking information includes device ID, IP address, and blocking time, form a blocked device list, and synchronize the blocked device list to all monitoring terminals.
7. The method according to claim 1, characterized in that The method further comprises: When the illegal score does not exceed the score threshold, a time series analysis algorithm is used to predict the trend of the illegal score. If the predicted illegal score shows an increasing trend and the predicted highest illegal score exceeds the score threshold, a network blocking command is generated.
8. A network port security protection device, characterized in that: include: An extraction module, the extraction module is used to obtain color data of the device surface at the network interface in real time, extract color feature parameters from the color data using a color recognition algorithm, match the color feature parameters with legal color feature parameters, and calculate color difference values; wherein the legal color feature parameters are authorized color feature parameters of authorized authentication devices stored in a pre-established device color feature library; A warning module, wherein the warning module is used to trigger a warning when the color difference value exceeds a set color difference threshold, and eliminate false warnings caused by environmental factors through data fusion technology; An execution module is used to detect that the same device triggers warnings multiple times within a preset time interval, calculate an illegal score based on the number of triggered warnings and the device's historical behavior data, and execute a network blocking command when the illegal score exceeds a preset score threshold; wherein the historical behavior data includes connection frequency, data traffic, and abnormal events.
9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Fault monitoring method, device and system
CN110309033A
System and method for judging abnormal equipment in high-concurrency service in real time and storage medium
CN112073407A
Low-rate denial-of-service attack detection method based on Gramian angular field
CN114070609A
DOS attack detection method based on spectral physical characteristics in photoelectric fusion network
CN116260613A
Work meeting interaction digital information monitoring system based on Internet of Things
CN117061569A
