Abnormal data identification method and device, equipment, storage medium and product
By using the preset random forest classifier in the data security management and control platform, abnormal data is identified based on the value proportion and weight value of data characteristics, which solves the inefficiency and reliability problems caused by manual setting of thresholds in the existing technology, and achieves More efficient identification of abnormal data.
Patent Information
- Application Number
- CN202410195245.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2024-10-22
AI Technical Summary
In the existing technology, interface anomaly detection in data security management and control platforms relies on manually setting thresholds, which has problems such as high subjectivity and false alarms or missed alarms, resulting in low efficiency in identifying abnormal data.
Use a preset random forest classifier to build a model based on the value proportion and weight value of data features to identify whether the traffic data of the data interface is abnormal, and dynamically adjust the weight value to improve identification accuracy.
Identifying abnormal data through the value and weight value of data features improves the identification efficiency of abnormal data, reduces false alarms and missed alarms, and enhances the reliability of detection.
Smart Images

Figure CN118820971A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an abnormal data identification method, device, equipment, storage medium and computer program product. Background Art
[0002] With the advent of the era of massive data, the interface access traffic of the data security control platform has increased dramatically. How to promptly detect interface anomalies and troubleshoot and handle them to ensure the normal operation of the interface and even the normal operation of the data security control platform has become a top priority. At present, abnormal data flow identification is achieved by artificial experience, that is, fixed thresholds are set for each indicator of the interface in the data security control platform, and by comparing the real-time indicator value and its corresponding threshold value, it is judged whether there is an abnormality in the interface. However, the thresholds set by artificial experience are highly subjective and cannot guarantee the reliability of interface anomaly detection. In addition, in the actual operation process, the indicator values of each interface of the data security control platform are changing in real time. Using fixed thresholds for anomaly detection is prone to false alarms or missed alarms. Summary of the invention
[0003] The main purpose of the present invention is to provide an abnormal data identification method, device, equipment, storage medium and computer program product, aiming to solve the technical problem of low efficiency of abnormal data identification in the prior art.
[0004] To achieve the above object, the present invention provides a method for identifying abnormal data, the method comprising the following steps:
[0005] Get the traffic data of each data interface;
[0006] The traffic data is input into a preset random forest classifier to obtain a data recognition result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data.
[0007] Optionally, before the step of inputting the traffic data into a preset random forest classifier to obtain a data recognition result output by the preset random forest classifier, the step further includes:
[0008] Cluster the sample data and obtain the clustering results;
[0009] Performing feature extraction on the sample data to obtain sample data features involved in the sample data;
[0010] Determine the value proportion of the sample data feature;
[0011] Determine the weight value of each sample data feature according to the value proportion and the clustering result;
[0012] A preset random forest classifier is constructed based on the sample data and the weight values.
[0013] Optionally, the step of determining the value proportion of the sample data feature includes:
[0014] Determine the number and data flow of data streams including the characteristics of the sample data according to the sample data;
[0015] Determine the interface value of each data interface corresponding to the sample data feature;
[0016] The value proportion of the sample data feature is determined according to the number of data flows, the data traffic and the interface value.
[0017] Optionally, the step of determining the weight value of each sample data feature according to the value proportion and the clustering result includes:
[0018] Determine a weighted sample according to the sample data and sample data characteristics;
[0019] Determine a clustering ratio of sample data features based on the clustering result, the weight sample, and the sample data;
[0020] The weight value of the sample data feature is determined according to the clustering ratio and the value proportion.
[0021] Optionally, the step of constructing a preset random forest classifier based on the sample data and the weight value includes:
[0022] Determine a data set according to the sample data;
[0023] Dividing the data set based on sample data characteristics to obtain data subsets;
[0024] Determine the Gini index between the sample data feature and the feature value according to the data subset and the weight value;
[0025] A preset random forest classifier is constructed based on the Gini index and the sample data.
[0026] Optionally, after the step of inputting the traffic data into a preset random forest classifier to obtain a data recognition result output by the preset random forest classifier, the method further includes:
[0027] When the data identification result is data anomaly, determining data features involved in the traffic data;
[0028] Determine the value proportion corresponding to the data feature;
[0029] Security control is performed based on the value ratio.
[0030] In addition, to achieve the above-mentioned purpose, the present invention also provides an abnormal data identification device, the device comprising:
[0031] An acquisition module is used to acquire the flow data of each data interface;
[0032] An identification module is used to input the traffic data into a preset random forest classifier to obtain a data identification result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data.
[0033] In addition, to achieve the above-mentioned purpose, the present invention also proposes an abnormal data identification device, which includes: a memory, a processor, and an abnormal data identification program stored in the memory and executable on the processor, wherein the abnormal data identification program is configured to implement the steps of the abnormal data identification method described above.
[0034] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which an abnormal data identification program is stored, and when the abnormal data identification program is executed by a processor, the steps of the abnormal data identification method described above are implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer program product, which includes an abnormal data identification program, and when the abnormal data identification program is executed by a processor, the steps of the abnormal data identification method described above are implemented.
[0036] The present invention obtains the flow data of each data interface; inputs the flow data into a preset random forest classifier to obtain a data recognition result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data. Since the present invention constructs a preset random forest classifier based on the value proportion and weight value of each data feature in the sample data, and identifies whether the flow data of each data interface is abnormal based on the preset random forest classifier, compared to the existing method of identifying abnormal data by setting various indicator thresholds, the above method of the present invention can identify abnormal data based on the value and weight of the data, thereby improving the efficiency of identifying abnormal data. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a structural diagram of an abnormal data identification device in a hardware operating environment involved in an embodiment of the present invention;
[0038] Figure 2 This is a flow chart of a first embodiment of the abnormal data identification method of the present invention;
[0039] Figure 3 This is a flow chart of a second embodiment of the abnormal data identification method of the present invention;
[0040] Figure 4 It is a structural block diagram of the first embodiment of the abnormal data identification device of the present invention.
[0041] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] 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.
[0043] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the structure of an abnormal data identification device in a hardware operating environment involved in an embodiment of the present invention.
[0044] like Figure 1 As shown, the abnormal data identification device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (RandomAccess Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0045] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the abnormal data identification device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0046] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and an abnormal data identification program.
[0047] exist Figure 1 In the abnormal data identification device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the abnormal data identification device of the present invention can be set in the abnormal data identification device, and the abnormal data identification device calls the abnormal data identification program stored in the memory 1005 through the processor 1001, and executes the abnormal data identification method provided by the embodiment of the present invention.
[0048] Based on the above abnormal data identification device, an embodiment of the present invention provides an abnormal data identification method, referring to Figure 2 , Figure 2 Schematic diagram of the process of the first embodiment of the abnormal data identification method of the present invention.
[0049] In this embodiment, the abnormal data identification method includes the following steps:
[0050] Step S10: Obtain the flow data of each data interface.
[0051] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a mobile phone, a tablet computer, a personal computer, etc., or an electronic device or a data security management device that can realize the above functions. The data security management device is taken as an example to illustrate this embodiment and the following embodiments.
[0052] It should be noted that the data security control device includes multiple data interfaces. This step will obtain all traffic data of each data interface in the data security control device within the abnormal data identification monitoring interval. The traffic data includes multiple features, such as domain name (host), path (path), parameter (parameter), specified fields in the message header (such as user agent field User-Agent), etc. The feature extraction method can adopt the existing solution, and this embodiment is not limited here.
[0053] Step S20: Input the traffic data into a preset random forest classifier to obtain a data recognition result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data.
[0054] It should be noted that the preset random forest classifier can be a data anomaly recognition model constructed according to the value proportion and weight value of each data feature in the sample data. Among them, the value proportion can be the value proportion of the feature for the data security control device, and the weight value is determined based on the characteristics of the data itself and the characteristics of the data security control device. In other words, for any feature, its weight for the abnormal data flow recognition result is not only determined according to the characteristics of all data containing the feature, but also determined by considering the control value of the feature for the data security control device. In this way, the weight value of each feature can be dynamically changed as the number of interfaces connected to the data security control device and the data transmitted by the interface change, and then the result of the final abnormal data flow recognition is affected by the change of the weight value, thereby ensuring the accuracy of the abnormal data flow recognition result. At the same time, the control strategy of the data security control device is also adjusted according to the abnormal data flow recognition result. Therefore, the dynamic change of the weight value will also affect the control strategy of the entire data security management device, thereby ensuring the control effect of the data security management platform.
[0055] Furthermore, in order to achieve data control while ensuring the normal flow of data to the greatest extent, after obtaining the data identification result, the control of the data flow can also consider the value of the feature to the data security management device, so that when the data flow is abnormal, it can be graded according to the value of the feature in the data. Therefore, after the step S20, it also includes: when the data identification result is data abnormality, determining the data features involved in the flow data;
[0056] Determine the value proportion corresponding to the data feature;
[0057] Security control is performed based on the value ratio.
[0058] It should be noted that the security control based on the value ratio can be to compare the value ratio with a preset threshold. If the value ratio is less than the preset threshold, the connection of the interface can be disconnected and a warning can be issued to the security personnel. If the value ratio is greater than or equal to the preset threshold, the interface needs to be security controlled. At this time, the uplink data of the interface will be stopped, and the downlink data will be diverted (such as to a honeypot, etc.), and the data connection between the data security management device and the other party will be realized through diversion.
[0059] In the specific implementation, for an interface, if the data flow identification result is normal, no adjustment is made. If the abnormal data flow identification result is abnormal, the following process is performed: determine all the features involved in the interface data flow, determine the value proportion k of each feature AIf the maximum value of all value proportions does not exceed the preset threshold, it is considered that although the data flow is abnormal, the value of the data flow to the entire data security management and control device is low. At this time, the connection of the interface can be disconnected and an early warning can be issued to the security personnel. The preset threshold is an empirical value and can be set in advance. If the maximum value of all value proportions exceeds the preset threshold, security control of the interface is required. At this time, the uplink data of the interface will be stopped, and the downlink data will be diverted (such as to a honeypot, etc.). The data connection between the data security management device and the other party is realized through diversion, and an early warning is issued to the security personnel. After manual confirmation, the flow of data will be restored.
[0060] This embodiment not only takes into account the data recognition results of the data, but also, in the event of anomalies, performs hierarchical processing based on the value of the features in the data, thereby achieving data control while ensuring the normal flow of data to the greatest extent.
[0061] This embodiment obtains the flow data of each data interface; the flow data is input into a preset random forest classifier to obtain the data identification result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data. Since this embodiment constructs a preset random forest classifier based on the value proportion and weight value of each data feature in the sample data, and identifies whether the flow data of each data interface is abnormal based on the preset random forest classifier, compared with the existing method of identifying abnormal data by setting various indicator thresholds, the above method of this embodiment can identify abnormal data based on the value and weight of the data, thereby improving the efficiency of identifying abnormal data.
[0062] refer to Figure 3 , Figure 3 Schematic diagram of the flow chart of the second embodiment of the abnormal data identification method of the present invention.
[0063] Based on the first embodiment above, in this embodiment, before step S10, the following steps are further included:
[0064] Step S001: cluster the sample data to obtain clustering results.
[0065] It should be noted that the clustering of the sample data to obtain the clustering result can be to perform k-means clustering on the sample data to finally obtain a category set C = (C1, C2, ..., C K ), K is used to represent the number of categories in the clustering results, and C1 is the first category in the clustering results.
[0066] Step S002: extracting features from the sample data to obtain sample data features involved in the sample data.
[0067] It should be noted that the sample data features include domain name (host), path (path), parameter (parameter), specified fields in the message header (such as user agent field User-Agent), etc. The feature extraction method can adopt the existing scheme, and this embodiment is not limited here. The sample data is traffic data that has been labeled as "normal" or "abnormal", and the sample data also includes multiple features. The features of all sample data will cover all features that may be involved in the data interface. In this way, the preset random forest classifier trained by the sample data can obtain the weight values corresponding to all possible features.
[0068] Step S003: Determine the value proportion of the sample data feature.
[0069] It should be noted that the value ratio of the sample data feature can be determined by, for any feature of the sample data features, determining the number of abnormal sample data and the total number of sample data containing the feature. For any sample data feature, its value ratio can be the number of abnormal sample data containing the feature / the total number of sample data.
[0070] Furthermore, the importance of data received or sent by different data interfaces is different. Therefore, in order to accurately determine the value proportion of the sample data feature, the step S003 may include: determining the number and data flow of data streams including the sample data feature according to the sample data;
[0071] Determine the interface value of each data interface corresponding to the sample data feature;
[0072] The value proportion of the sample data feature is determined according to the number of data flows, the data traffic and the interface value.
[0073] It should be noted that this embodiment will determine the weight value of each feature for the abnormal data flow identification result (i.e., data identification result) based on the value of each feature to the data security management device. For ease of description, any feature A is used as an example. The number of data flows n A (1) may be the number of data flows including feature A received by each data interface during the monitoring period. The data flow may include the number of data flows including feature A received by each data interface during the monitoring period. A (b), where b is the interface identifier, n A(b) is the total amount of data flow through interface b in the time window (i.e., monitoring period). This value indicates the amount of data involved in feature A in a time window for data security management and control equipment. The larger the amount, the higher the value of feature A. The interface value of each data interface can be the value of the device connected to the data interface, which is a pre-configured value based on factors such as the type of device connected to the data interface.
[0074] In a specific implementation, the data status of all data interfaces of the data security management and control device in the monitoring period is obtained, wherein the monitoring period (time window) is a preset value, such as one minute, one second, etc. For example, the data flow of each data interface in the last minute can be obtained as sample data. However, in actual applications, there is a situation where there happens to be no data flow in the time window, but the interface has been connected (such as access to another platform through the interface, but there is no data flow in the time window). For such an interface, the traffic data in the closest time window to the current one will be obtained. This embodiment determines the weight value of each feature for the abnormal data flow identification result based on the value of each feature to the data security management and control device. For ease of description, take any feature A as an example. Parse the sample data to determine the number n of data flows containing feature A A (1), the number n here A (1) is, as long as there is feature A in the data flow of a data interface, the number is increased by one, that is, n A (1) describes the number of interfaces involved in feature A. The larger the value, the more interfaces are involved in the data security control device, indicating that the value of feature A is higher. Determine the data flow n of each interface involved in feature A A (b), where b is the interface identifier, n A (b) is the total amount of data flow through interface b in the time window. This value indicates the amount of data involved in feature A in a time window for data security control equipment. The larger the amount, the higher the value of feature A. Determine the value k of each interface A (b), where b is the interface identifier, k A (b) represents the value of the other party device connected to interface b. During the initial configuration, each other party device will set the importance and configure the value according to the type of the other party device. This value not only involves the importance of the other party device, but also the importance of the data to be processed (including storage) in the future in the other party device. Therefore, this value determines the security level of the entire other party device. The more important the data, the greater the value, and the higher the security level. The higher the security level, the more attention it pays to data security, the better the security environment, and the greater the difficulty of being attacked. Relatively speaking, the possibility of data flow anomalies will be reduced. The value ratio of feature A to data security control equipment is calculated using the following formula using the above data:
[0075]
[0076] Among them, n A (3) is the total number of interfaces of data security control equipment, j is used to represent the number of interfaces involving feature A, and its value accounts for k A It represents the importance of feature A in all interface data flows involved in the data security management device. The greater the importance, the more data containing feature A in the data involved in the data security management device. The more important it is to the data security management platform, the greater its value.
[0077] Step S004: Determine the weight value of each sample data feature according to the value proportion and the clustering result.
[0078] It should be noted that the weight value of each sample data feature determined according to the value proportion and the clustering result can be determined according to the clustering result. The proportion of the number of data streams containing feature A in the clustering result, and the weight value of feature A is determined according to the proportion and the value proportion, and the weight value of feature A is equal to the proportion of the number of data streams containing feature A in the clustering result multiplied by the value proportion of feature A.
[0079] Furthermore, this embodiment does not obtain weights based on clustering results, but determines weights based on the distribution of data containing feature A in each cluster. Here, it can be ensured that the weights are determined based on the overall distribution of all sample data, rather than just one class, and the integrity of the data is taken into consideration. Therefore, the step S004 may include: determining weight samples based on the sample data and sample data features;
[0080] Determine a clustering ratio of sample data features based on the clustering result, the weight sample, and the sample data;
[0081] The weight value of the sample data feature is determined according to the clustering ratio and the value proportion.
[0082] It should be noted that, still taking feature A as an example, the weighted sample determined according to the sample data and the sample data feature can be the total number D of sample data containing feature A in all sample data. A , and use the sample containing feature A as the weighted sample. The clustering ratio of the sample data feature determined based on the clustering result, the weighted sample and the sample data may be: determining the class obtained by k-means clustering to which each weighted sample belongs. Each weighted sample will only belong to one class, but different weighted samples will belong to different classes.
[0083] For example, all weighted samples involve X classes, 1≤X≤K. For each of the X classes (such as class x):
[0084] (1) Determine the distance between each data in class x and the center of class x:
[0085] When performing k-means clustering, a class center is generated. This step calculates the distance between each data in the class and the class center.
[0086] Among them, u is the data identifier in class x, s u is the u-th data in class x, s X is the center of class x.
[0087] (2) Determine the distance between each weighted sample in class x and the center of class x
[0088] Among them, v is the weighted sample data identifier in class x.
[0089] (3) Determine the distance between the data marked as "abnormal" in each weighted sample data in class x and the center of class x Determine the distance between the data labeled as "normal" in each weighted sample data in class x and the center of class x
[0090] Among them, a is the data identifier of "abnormal" in the weighted sample data, and b is the data identifier of "normal" in the weighted sample data.
[0091] (4) Calculate the ratio of class x, i.e., the clustering ratio, using the above data and the following formula:
[0092]
[0093] Among them, M x The clustering ratio used to characterize the characteristics of sample data. For all The mean of For all The variance of For all The variance of .
[0094] The weight value of the sample data feature determined according to the clustering ratio and the value proportion may be determined by the following formula: A :
[0095]
[0096] Among them, W AThe weight value used to represent the result of feature A for abnormal data flow recognition, avgM x Used to characterize all M x The mean value, maxM x Used to characterize all M x The maximum value, minM x Used to characterize all M x The minimum value of .
[0097] In this embodiment, when calculating the weight value W A When considering the data itself, we also consider the value of the features for data security management. A The weight value of each feature can be changed dynamically as the number of interfaces connected to the data security management and control equipment and the data transmitted by the interfaces change. The change in weight value can then affect the final result of abnormal data flow identification, ensuring the accuracy of the abnormal data flow identification result.
[0098] Step S005: constructing a preset random forest classifier based on the sample data and the weight value.
[0099] It should be noted that the construction of the preset random forest classifier based on the sample data and the weight value may be: constructing a tree for each class, so that all classes constitute a random forest, specifically:
[0100] 1) Randomly select N samples with replacement from the sample data to form a data set D.
[0101] 2) If each sample has M features, when each node of the decision tree needs to be split, m features are randomly selected from these M features to meet the condition m <M。
[0102] 3) For any selected feature A,
[0103] (1) The data set D is divided into two subsets D1 and D2 according to whether it takes eigenvalue a, where eigenvalue a is a random value.
[0104] in, D2=D-D1.
[0105] (2) The Gini index between feature A and feature value a is calculated using the following formula:
[0106]
[0107] Among them, Gini(D,A) is used to characterize the Gini index between feature A and feature value a. k is the class identifier, K is the total number of classes after k-means clustering, C k is the total number of samples in class k.
[0108] Here W A That is the weight value of feature A. Since the weight value is determined based on the characteristics of the data itself and the characteristics of the data security management and control equipment, the damping coefficient here also takes into account the dual characteristics of the data dimension and platform dimension of each feature, which improves the damping coefficient and the current data situation and value situation of the data security management and control equipment. It is more appropriate to ensure that the constructed random forest is better fit with the data security management and control equipment.
[0109] (3) Select A and a corresponding to the smallest Gini(D,A) as the split feature and split point, and as the tree nodes, and split D into two child nodes according to the split feature and split point.
[0110] 4) Repeat 2) and 3) until the Gini index is less than the preset threshold, and it is considered that no further splitting is possible.
[0111] 5) Repeat 1) to 4) for a preset number of times to complete the construction of the random forest. The constructed random forest is a classifier - the preset random forest classifier. The recognition result of the input data can be obtained through the preset random forest classifier.
[0112] This embodiment clusters the sample data to obtain clustering results; performs feature extraction on the sample data to obtain sample data features involved in the sample data; determines the value proportion of the sample data features; determines the weight value of each sample data feature based on the value proportion and the clustering result; and constructs a preset random forest classifier based on the sample data and the weight value. This embodiment determines the weight value of each feature for the abnormal data flow identification result through sample data, and then constructs a preset random forest classifier based on the weight value. Finally, the current data interface data flow is identified based on the preset random forest classifier, and the security control policy of the data security control device is adjusted according to the identification result. This makes the control policy of the data security control device no longer based on the manually configured threshold, but is controlled based on the identification result of the abnormal data flow in the data interface, which improves the degree of automation of the control and improves the accuracy of the control.
[0113] Reference Figure 4 , Figure 4 It is a structural block diagram of the first embodiment of the abnormal data identification device of the present invention.
[0114] like Figure 4 As shown, the abnormal data identification device proposed in the embodiment of the present invention includes:
[0115] The acquisition module 10 is used to acquire the flow data of each data interface;
[0116] The identification module 20 is used to input the traffic data into a preset random forest classifier to obtain a data identification result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data.
[0117] This embodiment obtains the flow data of each data interface; the flow data is input into a preset random forest classifier to obtain the data identification result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data. Since this embodiment constructs a preset random forest classifier based on the value proportion and weight value of each data feature in the sample data, and identifies whether the flow data of each data interface is abnormal based on the preset random forest classifier, compared with the existing method of identifying abnormal data by setting various indicator thresholds, the above method of this embodiment can identify abnormal data based on the value and weight of the data, thereby improving the efficiency of identifying abnormal data.
[0118] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0119] In addition, for technical details not fully described in this embodiment, reference can be made to the abnormal data identification method provided in any embodiment of the present invention, and will not be repeated here.
[0120] Based on the above-mentioned first embodiment of the abnormal data identification device of the present invention, a second embodiment of the abnormal data identification device of the present invention is proposed.
[0121] In this embodiment, the acquisition module 10 is also used to cluster the sample data to obtain a clustering result;
[0122] Performing feature extraction on the sample data to obtain sample data features involved in the sample data;
[0123] Determine the value proportion of the sample data feature;
[0124] Determine the weight value of each sample data feature according to the value proportion and the clustering result;
[0125] A preset random forest classifier is constructed based on the sample data and the weight values.
[0126] Furthermore, the acquisition module 10 is further used to determine the number and data flow of data streams including the characteristics of the sample data according to the sample data;
[0127] Determine the interface value of each data interface corresponding to the sample data feature;
[0128] The value proportion of the sample data feature is determined according to the number of data flows, the data traffic and the interface value.
[0129] Furthermore, the acquisition module 10 is also used to determine the weighted sample according to the sample data and the sample data characteristics;
[0130] Determine a clustering ratio of sample data features based on the clustering result, the weight sample, and the sample data;
[0131] The weight value of the sample data feature is determined according to the clustering ratio and the value proportion.
[0132] Furthermore, the acquisition module 10 is further used to determine a data set according to the sample data;
[0133] Dividing the data set based on sample data characteristics to obtain data subsets;
[0134] Determine the Gini index between the sample data feature and the feature value according to the data subset and the weight value;
[0135] A preset random forest classifier is constructed based on the Gini index and the sample data.
[0136] Furthermore, the identification module 20 is further configured to determine data features involved in the traffic data when the data identification result is data anomaly;
[0137] Determine the value proportion corresponding to the data feature;
[0138] Security control is performed based on the value ratio.
[0139] Other embodiments or specific implementations of the abnormal data identification device of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.
[0140] In addition, an embodiment of the present invention further provides a storage medium, on which an abnormal data identification program is stored. When the abnormal data identification program is executed by a processor, the steps of the abnormal data identification method described above are implemented.
[0141] In addition, an embodiment of the present invention further provides a computer program product, including an abnormal data identification program, which implements the steps of the abnormal data identification method described above when executed by a processor.
[0142] The specific implementation of the computer program product of the present invention is basically the same as the above-mentioned embodiments of the abnormal data identification method, and will not be repeated here.
[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0144] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0146] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for identifying abnormal data, characterized in that: The abnormal data identification method comprises the following steps: Get the traffic data of each data interface; The traffic data is input into a preset random forest classifier to obtain a data recognition result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data.
2. The abnormal data identification method according to claim 1, characterized in that: Before the step of inputting the traffic data into a preset random forest classifier to obtain a data recognition result output by the preset random forest classifier, the step further includes: Cluster the sample data and obtain the clustering results; Performing feature extraction on the sample data to obtain sample data features involved in the sample data; Determine the value proportion of the sample data feature; Determine the weight value of each sample data feature according to the value proportion and the clustering result; A preset random forest classifier is constructed based on the sample data and the weight values.
3. The abnormal data identification method according to claim 2, characterized in that: The step of determining the value proportion of the sample data feature includes: Determine the number and data flow of data streams including the characteristics of the sample data according to the sample data; Determine the interface value of each data interface corresponding to the sample data feature; The value proportion of the sample data feature is determined according to the number of data flows, the data traffic and the interface value.
4. The abnormal data identification method according to claim 2, characterized in that: The step of determining the weight value of each sample data feature according to the value proportion and the clustering result includes: Determine a weighted sample according to the sample data and sample data characteristics; Determine a clustering ratio of sample data features based on the clustering result, the weight sample, and the sample data; The weight value of the sample data feature is determined according to the clustering ratio and the value proportion.
5. The abnormal data identification method according to claim 2, characterized in that: The step of constructing a preset random forest classifier based on the sample data and the weight value includes: Determine a data set according to the sample data; Dividing the data set based on sample data characteristics to obtain data subsets; Determine the Gini index between the sample data feature and the feature value according to the data subset and the weight value; A preset random forest classifier is constructed based on the Gini index and the sample data.
6. The abnormal data identification method according to any one of claims 1 to 5, characterized in that: After the step of inputting the traffic data into a preset random forest classifier to obtain the data recognition result output by the preset random forest classifier, the method further includes: When the data identification result is data anomaly, determining data features involved in the traffic data; Determine the value proportion corresponding to the data feature; Security control is performed based on the value ratio.
7. An abnormal data identification device, characterized in that: The abnormal data identification device comprises: An acquisition module is used to acquire the flow data of each data interface; An identification module is used to input the traffic data into a preset random forest classifier to obtain a data identification result output by the preset random forest classifier, wherein the preset random forest classifier is constructed based on the value proportion and weight value of each data feature in the sample data.
8. An abnormal data identification device, characterized in that: The device comprises: a memory, a processor, and an abnormal data identification program stored in the memory and executable on the processor, wherein the abnormal data identification program is configured to implement the steps of the abnormal data identification method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores an abnormal data identification program, and when the abnormal data identification program is executed by the processor, the steps of the abnormal data identification method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises an abnormal data identification program, and when the abnormal data identification program is executed by a processor, the steps of the abnormal data identification method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Network traffic anomaly detection method based on joint feature selection
CN113505826A
Random forest model training method and device, and abnormal traffic detection method and device
CN114553591A
Power transmission line deteriorated insulator identification method based on innovative random forest algorithm
CN114743118A
Application programming interface importance assessment method and related equipment
CN117234871A
Outlier detection model verification method and apparatus, and computer device and storage medium
WO2020155752A1
