Alarm data compression method, device, equipment and storage medium
Through the combination of the twin neural network and the alarm filtering list, the target group of alarm data is determined and compressed, which solves the problems of large data volume and insufficient variant alarm capabilities in the existing technology, and achieves efficient alarm data compression.
Patent Information
- Application Number
- CN202411018380.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-26
AI Technical Summary
When the existing technology compresses alarm data using clustering and preset rules, the amount of training data is large, the capability of variant alarms is insufficient, and the scope of adaptation is limited.
The twin neural network is used in conjunction with the pre-created alarm filtering list to determine the target alarm group of the alarm data to be compressed by obtaining the characteristics of the alarm data to be compressed and the similarity of historical alarm data, and performs compression based on the similarity.
It achieves accurate compression of alarm data, has strong generalization ability, adapts to variant alarms, does not require a large amount of training data, and solves the problems of large amount of training data and limited adaptation range in the existing technology.
Smart Images

Figure CN118555186B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for compressing alarm data. Background Art
[0002] With the development of informatization, many portals and business systems have been under continuous attacks. Security devices have been fulfilling the duties of "bodyguards", protecting these portals and business systems, and recording attacks and reporting them to operation and maintenance personnel in the form of logs. However, since many attacks are repeated attacks of the same type and the attack frequency is very high, the operation and maintenance personnel are burdened with heavy workloads, and the massive alarm logs also make it easy for operation and maintenance personnel to ignore important alarms.
[0003] At present, alarm data can be compressed by clustering or preset rules to reduce the burden on operation and maintenance personnel. When compressing alarm data by clustering, a large amount of data is needed to train the clustering model, and the ability to respond to variant alarms is insufficient; when compressing alarm data by preset rules, compression rules need to be set based on human experience, and the scope of application is limited. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, apparatus, device and storage medium for compressing alarm data to solve the problems in related technologies of requiring a large amount of training data and insufficient capability for variant alarms when compressing alarm data by clustering and preset rules, as well as the problem of limited adaptability.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for compressing alarm data, the method comprising:
[0006] Obtaining a first feature of the alarm data to be compressed;
[0007] According to the first feature of the alarm data to be compressed and the pre-created first alarm screening list, a target alarm group corresponding to the alarm data to be compressed is determined; the first alarm screening list includes the first feature of the first historical alarm data and the corresponding relationship with the first alarm group; the first alarm group is obtained by grouping the first historical alarm data according to the first feature of the first historical alarm data;
[0008] According to the pre-trained twin neural network, obtaining the second feature of the alarm data to be compressed and the similarity with the second feature of any historical alarm data in the target alarm group; the first feature is different from the second feature;
[0009] The to-be-compressed alarm data is compressed according to the similarity.
[0010] In a second aspect, an embodiment of the present disclosure provides a device for compressing alarm data, the device comprising:
[0011] A first acquisition module, used to acquire a first feature of the alarm data to be compressed;
[0012] A determination module, configured to determine a target alarm group corresponding to the alarm data to be compressed according to a first feature of the alarm data to be compressed and a pre-created first alarm screening list; the first alarm screening list includes a first feature of the first historical alarm data and a corresponding relationship with the first alarm group; the first alarm group is obtained by grouping the first historical alarm data according to the first feature of the first historical alarm data;
[0013] A second acquisition module is used to acquire, according to a pre-trained twin neural network, a second feature of the alarm data to be compressed and a similarity with a second feature of any historical alarm data in the target alarm group; the first feature is different from the second feature;
[0014] A compression module is used to compress the alarm data to be compressed according to the similarity.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the steps of the method described in the first aspect above.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0018] At least one of the above technical solutions provided by the embodiments of the present invention can achieve the following technical effects:
[0019] In an embodiment of the present invention, the first feature of the alarm data to be compressed is first obtained, and the target alarm group corresponding to the alarm data to be compressed is determined based on the first feature of the alarm data to be compressed and a pre-created first alarm filter list. Then, based on the pre-trained twin neural network, the similarity between the second feature of the alarm data to be compressed and the second feature of any alarm data in the target alarm group is obtained, and the alarm data to be compressed is compressed based on the similarity.
[0020] In an embodiment of the present invention, the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature of the alarm data to be compressed, and then the similarity between the alarm data to be compressed and any historical alarm data in the target alarm group can be obtained through a pre-trained twin neural network, so as to further compress the alarm data to be compressed based on the similarity. Since the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature, and then the alarm data to be compressed can be compressed based on the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group, the alarm data to be compressed can be divided into alarm groups with a high degree of similarity thereto, and the compression of the alarm data to be compressed can be achieved more accurately. Moreover, since the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group can be better predicted through the twin neural network, variant alarms can be well dealt with, and a strong generalization ability is provided, and a large amount of training data is not required, so that the problems of the prior art can be effectively solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate one or more embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
[0022] Figure 1 One of the flow charts of a method for compressing alarm data provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of a process flow of word vectorization processing provided for one embodiment of the present invention;
[0024] Figure 3 A schematic diagram of a training process of a twin neural network provided for one embodiment of the present invention;
[0025] Figure 4 A second flow chart of a method for compressing alarm data provided by an embodiment of the present invention;
[0026] Figure 5 A schematic diagram of the module composition of an alarm data compression device 500 provided in one embodiment of the present invention;
[0027] Figure 6 A schematic diagram of the hardware structure of an alarm data compression device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the technical parties in this technical field better understand the technical aspects of one or more embodiments of the present disclosure, and to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0030] See also Figure 1 , Figure 1 One of the flow charts of the method for compressing alarm data provided by one embodiment of the present invention is as follows: Figure 1 As shown, the method comprises the following steps:
[0031] Step 102: Obtain the first feature of the alarm data to be compressed.
[0032] Step 104: Determine the target alarm group corresponding to the alarm data to be compressed based on the first feature of the alarm data to be compressed and the first alarm filtering list created in advance; the first alarm filtering list includes the first feature of the first historical alarm data and the corresponding relationship with the first alarm group; the first alarm group is obtained by grouping the first historical alarm data based on the first feature of the first historical alarm data.
[0033] Step 106: According to the pre-trained twin neural network, obtain the second feature of the alarm data to be compressed and its similarity with the second feature of any historical alarm data in the target alarm group; the first feature is different from the second feature.
[0034] Step 108: compress the alarm data to be compressed according to the similarity.
[0035] In the embodiment of the present invention, after the alarm data to be compressed is obtained, the first feature of the alarm data to be compressed may be obtained.
[0036] In an example, the first feature may include at least one of the following: alarm time, alarm source IP, alarm destination IP, and alarm destination port.
[0037] After the first feature of the alarm data to be compressed is obtained, the target alarm group corresponding to the alarm data to be compressed can be determined according to the first feature of the alarm data to be compressed and a pre-created first alarm screening list.
[0038] The first alarm screening list includes the first feature of the first historical alarm data and the corresponding relationship with the first alarm group, and the first alarm group is obtained by grouping the first historical alarm data according to the first feature of the first historical alarm data.
[0039] In one example, the first filter list may be as shown in Table 1:
[0040] Table 1
[0041]
[0042] In an example, the first filtering list may further include an index value of any first historical alarm data to identify the first historical alarm data in the first filtering list, for example, as shown in the following Table 2:
[0043] Table 2
[0044]
[0045] In an example, the first filtering list may further include an identifier of any first historical alarm data in its corresponding first alarm group. To distinguish it from a “group”, the identifier of any first historical alarm data in its corresponding first alarm group is called a “class label”. The first filtering list may be as shown in Table 3 below:
[0046] Table 3
[0047]
[0048] In one example, the first filter list may further include a second feature of any first historical alarm data, wherein the second feature may be a request header, and the second feature is different from the first feature. In this example, the second feature of any first historical alarm data may be vectorized to obtain data that is convenient for subsequent processing.
[0049] When performing word vectorization processing on the second feature of any first historical alarm data, word2vec can be selected as the word vectorization model. First, the request header field can be segmented using word segmentation technology (such as regular expression), and then the word list is obtained and word vectorization is performed one by one based on the word2vec technology. Finally, an average operation is performed on the vectors of all the words, and the result is stored in the "Request Header" field of the first filter list.
[0050] In one example, the first filter list may be as shown in Table 4:
[0051] Table 4
[0052]
[0053] Of course, in one example, the first filter list may include the index shown in Table 2, the class tag shown in Table 3, and the request header shown in Table 4. In this case, the first filter list may be as shown in Table 5:
[0054] Table 5
[0055]
[0056] In the embodiment of the present invention, after the first alarm screening list is created, the target alarm group corresponding to the alarm data to be compressed can be determined according to the first feature of the alarm data to be compressed and the pre-created first alarm screening list.
[0057] After obtaining the alarm data to be compressed, the request header of the alarm data to be compressed may be subjected to word vectorization processing to obtain request header features.
[0058] In an example, the acquired alarm data to be compressed may be as shown in Table 6:
[0059] Table 6
[0060]
[0061] By performing the above word vectorization processing on the request header data in Table 6, we can obtain the data shown in Table 7:
[0062] Table 7
[0063]
[0064] According to the first feature of the alarm data to be compressed shown in Table 7, namely time, source IP, destination IP and target port, and the pre-created first alarm filter list shown in Table 5, the target alarm group corresponding to the alarm data to be compressed shown in Table 7 is determined.
[0065] In an embodiment of the present invention, when the first feature of the alarm data to be compressed successfully matches the first feature of any historical alarm data in the first alarm filtering list, the first alarm group corresponding to the successfully matched first historical alarm data can be determined as the target alarm group corresponding to the alarm data to be compressed; and when the first feature of the alarm data to be compressed fails to match the first features of all historical alarm data in the first alarm filtering list, a new first alarm group can be created in the first alarm filtering list, and the created new first alarm group can be determined as the target alarm group corresponding to the alarm data to be compressed.
[0066] In one example, the alarm data to be compressed shown in Table 7 can be compared with the first alarm filter list shown in Table 5. After data comparison, it can be determined that the first two rows of data in Table 7, i.e., data with indexes 1 and 2, can successfully match the first feature of the data with group label 1 in the first alarm filter list shown in Table 5. At this time, the first alarm group with group label 1 can be determined as the target alarm group corresponding to the first two rows of data shown in Table 7; while the third row of data in Table 7, i.e., data with index 3, fails to match the first feature of all data in the first alarm filter list shown in Table 5. At this time, a new first alarm group can be created in the first alarm filter list shown in Table 5, and the created new first alarm group can be determined as the target alarm group corresponding to the third row of alarm data to be compressed shown in Table 7. Then the new first alarm filter list shown in Table 8 can be obtained:
[0067] Table 8
[0068]
[0069] At this time, the first alarm group with the group label 3 can be determined as the target alarm group corresponding to the third row of data shown in Table 7.
[0070] After determining the target alarm group corresponding to the alarm data to be compressed, the similarity between the second feature of the alarm data to be compressed and the second feature of any historical alarm data in the target alarm group can be obtained based on the pre-trained twin neural network.
[0071] In an embodiment of the present invention, a twin neural network may be pre-trained. In one embodiment, the training process of the twin neural network may be: first, obtain second historical alarm data, wherein the second historical alarm data may be the same as, or different from, or partially the same as the first historical alarm data, and the embodiment of the present invention does not impose any limitation on this.
[0072] In an example, the acquired second historical alarm data may be as shown in Table 9:
[0073] Table 9
[0074]
[0075] Among them, the attack list in Table 9 is the attack target of the acquired second historical alarm data. Taking the first row of data in Table 9, that is, the data with an index value of 1 as an example, the value of the attack list is [A, B, C], indicating that this second historical alarm data is the alarm data of attack targets A, B, and C.
[0076] After obtaining the second historical alarm data, the second historical alarm data may be grouped according to the first feature of the second historical alarm data to obtain a second alarm group corresponding to any second historical alarm data. After obtaining the second alarm group corresponding to any second historical alarm data, a second alarm filter list may be created, wherein the second alarm filter list may include the first feature of the second historical alarm data and the corresponding relationship between the second alarm group.
[0077] In an example, taking the second historical alarm data shown in Table 9 as an example, the second historical alarm data can be grouped according to the first feature of the second historical alarm data shown in Table 9 to obtain three second alarm groups corresponding to the second historical alarm data, and create a second alarm filter list as shown in Table 10:
[0078] Table 10
[0079]
[0080] Then, the second feature of the second historical alarm data in the second alarm screening list may be subjected to word vectorization processing. When the vectorization processing is performed, for example Figure 2 As shown, the request header field can be segmented by word segmentation technology (such as regular expression) first, and then the word list can be used to vectorize the obtained request header field words one by one using word2vec technology, and finally an average operation is performed on the vectors of all the words, and the result is stored in the "Request Header" field of the second alarm filter list.
[0081] In an example, after word vectorization processing is performed on the second feature of the second historical alarm data in Table 10, that is, the request header feature, a second alarm screening list as shown in Table 11 can be obtained:
[0082] Table 11
[0083]
[0084] The second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data can be used as training samples to train the constructed twin neural network to obtain a pre-trained twin neural network.
[0085] In one embodiment, when the second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data are used as training samples, the second historical alarm data in the same second alarm group can be combined in pairs according to Table 11 to obtain a new data set, and a similarity label is constructed according to the IoU (intersection over union) of the attack targets in the "attack list" of the two data, and a five-tuple data set (index_A, index_B, feature_A, Feature_B, Similarity), Index_A can be the index of the second historical alarm data A in the second alarm screening list; Index_B can be the index of the second historical alarm data B in the second alarm screening list, wherein the second historical alarm data A and the second historical alarm data B belong to the same second alarm group, for example, the second historical alarm data with index values of 1 and 2 in Table 11; "Feature_A" and "Feature_B" can be the second features of the second historical alarm data A and the second historical alarm data B; "Similarity" is a label added after this operation; the newly constructed five-tuple data set can be shown in Table 12:
[0086] Table 12
[0087]
[0088] In one embodiment of the present invention, the twin neural network may include two multi-layer perceptrons for feature transformation and a regression output network for regression calculation. When the second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data are used as training samples to train the constructed twin neural network, the second features of any two second historical alarm data in the same second alarm group can be transformed by the two multi-layer perceptrons of the twin neural network to obtain a first transformed feature and a second transformed feature. Then, the absolute value of the difference between the first transformed feature and the second transformed feature can be obtained, and the absolute value of the difference can be regressed through the regression output network of the twin neural network to obtain a regression calculated value. The twin neural network can be trained based on the regression calculated value and the difference in the similarity of the attack targets of any two second historical alarm data.
[0089] In an embodiment of the present invention, the loss function used for the entire twin neural network may be an MSE (Mean Square Error) loss function, and the optimizer may use an SGD (Stochastic Gradient Descent) loss function, which has two inputs, namely "input_1" and "input_2", and the dimensions of the inputs are both 100. "input_1" is transformed into a 640-dimensional vector I164 through two fully connected layers "dense_1_1" and "dense_1_2"; "input_2" is also transformed into a 640-dimensional vector I264 through the same operation. Then, I164 and I264 are subtracted and the absolute value is taken to obtain a 640-dimensional vector I64. Then, I64 is input into the fully connected layer dense_out layer to obtain a new 640-dimensional vector d64, and finally d64 is input into the prediction layer prediction layer to obtain a similarity value. The two inputs of this twin neural network are the "Feature_A" and "Feature_B" fields in Table 12, and the output is the predicted "Similarity" field in Table 12. The difference between the predicted value and the true value is used to update the weight of the twin neural network.
[0090] In one example, the "Feature_A" and "Feature_B" fields in the above-constructed quintuple and their corresponding index values can be used as input. At this time, the output can be the predicted "Similarity" field in Table 12 and the two index values corresponding to the input. Then, the weight of the twin neural network can be updated according to the difference between the predicted value and the true value.
[0091] In an embodiment of the present invention, after completing the training of the twin neural network, the twin neural network can be saved, for example, it can be saved by model persistence, so as to facilitate the subsequent prediction of the similarity between the second feature of the alarm data to be compressed and the second feature of any historical alarm data in the corresponding alarm group.
[0092] Of course, for the above-mentioned word vectorization processing, the word vectorization model can also be persisted to facilitate the subsequent word vectorization processing of the second feature of the compressed alarm data.
[0093] From the above content, it can be seen that in one embodiment, the training process of the twin neural network can be as follows: Figure 3 As shown, the training process can be Figure 3The batch loading module, log aggregation module, feature extraction module, data set construction module, twin neural network module and model preservation module are shown to complete. Among them, the batch loading module can be used to batch load the second historical alarm data, and input these data into the log aggregation module to provide data support for it. Specifically, it can support the subsequent generation of the second alarm screening list based on these second historical alarm data, and the index in the table can be determined according to the order in which the historical alarm data appears.
[0094] The log aggregation module can group the loaded historical data according to the historical alarm data provided by the aforementioned batch loading module by setting the specified fields and preset time windows. For example, if there is a seven-tuple alarm data (source IP, destination IP, time, attack list, source port, destination port, request header), it can be aggregated by setting the preset time window to 24H (hours) and specifying the aggregation fields as: source IP, destination IP, destination port, so that the alarm logs with the same time window and the same specified fields are grouped together. By grouping, the amount of data can be reduced when constructing the data set in pairs in the subsequent training. This allows the subsequent twin neural network to ensure accuracy while accelerating the fitting of the model and reducing training time.
[0095] The feature extraction module can be used to vectorize the "request header" field based on the grouped data after the log aggregation module. Word segmentation technology can also be used as needed. The function of word vectorization is to convert text type (string) data into digital type (floating point) data. It is an upstream task for machine learning or deep learning tasks based on text types. Word vectorization is to convert data into data that can be "digested" by machine learning or deep learning models. There are many word vectorization technologies, such as one-hot encoding, bag of words model, TF-IDF, and word embedding model based on deep learning.
[0096] The dataset construction module can be used to construct the dataset required by the twin neural network. It mainly performs labeling (similarity labeling) on the data grouped by the log aggregation module.
[0097] The twin neural network module can be used to train the twin neural network with the constructed data set based on the constructed data set. The twin neural network here can be in a broad sense, that is, the two sub-networks can have the same structure or different structures, and the weights can be shared or not. The specific network structure used and whether the weights are shared depends on the business scenario. The twin neural network is composed of two sub-neural networks, which operate on the features generated by the two sub-networks and finally obtain the similarity of the two inputs. Its advantage is that the twin neural network can learn the difference rules of the input data, so that it has higher generalization ability than the rules in the rule base and can have stronger robustness. The specific working process of this module is to input the training data combined in pairs into the two sub-networks, and fit the twin neural network according to the label value (similarity) and the loss function until the preset accuracy or the maximum training generation is reached.
[0098] The model saving module can be used to save the trained feature extraction module and twin neural network module for loading the model during subsequent online model deployment.
[0099] After completing the training of the twin neural network, the second feature of the alarm data to be compressed and its similarity with the second feature of any historical alarm data in the target alarm group can be obtained based on the trained twin neural network. When obtaining, the second feature of the alarm data to be compressed, the second feature of any alarm data in the target alarm group and its index value in the first alarm screening list can be used as input and input into the pre-trained twin neural network to obtain the similarity of the twin neural network output.
[0100] In an example, among the alarm data to be compressed shown in Table 7, the data with indexes 1 and 2 are in the first alarm screening list shown in Table 8. Therefore, the prediction matrix of the two alarm data can be obtained by combining the two pieces of data and the first historical alarm data of the same group in Table 8 in pairs, wherein the prediction matrix can be a triple (feature_N, feature_F, index_F) data, feature_N can be the second feature of the alarm data N to be compressed in Table 7, that is, the request header feature, feature_F can be the second feature in the first alarm screening list shown in Table 8, and index_F can be the index of the first historical alarm data of the same group in the first alarm screening list, so as to be used to find its group label (equivalent to the feature at the same position in the two lists), as shown in Tables 13 and 14: (Table 13 is a comparison between the data with index 1 in Table 7 and the data in Table 8; Table 14 is a comparison between the data with index 2 in Table 7 and the data in Table 8):
[0101] Table 13
[0102]
[0103] Table 14
[0104]
[0105] After constructing the prediction matrix in the above triple form, the prediction matrix can be input into the trained twin neural network model to obtain a similarity list of this prediction matrix.
[0106] In an example, Table 13 and Table 14 are input into the trained twin neural network model, and the similarity lists shown in Table 15 and Table 16 can be obtained respectively, wherein the similarity list is a binary group (similarity, index_F), "similarity" is the similarity prediction result obtained by the twin neural network according to the second feature of the alarm data to be compressed in the above prediction matrix and the second feature of the first historical alarm data in the same group; and "index_F" is the index of the first historical alarm data in the same group as the alarm data to be compressed N in the first alarm screening list. Table 15 and Table 16 are as follows:
[0107] Table 15
[0108]
[0109] Table 16
[0110]
[0111] In the embodiment of the present invention, after obtaining the similarity between the second feature of the alarm data to be compressed and the second feature of any historical alarm data in the target alarm group, the alarm data to be compressed may be compressed according to the obtained similarity.
[0112] In an embodiment of the present invention, the first alarm group may include at least one alarm class. The second characteristics of the first historical alarm data belonging to different alarm classes in the same first alarm group are different. Therefore, during compression, it is necessary to determine the first alarm group corresponding to the alarm data to be compressed, as well as the specific alarm class in the alarm group.
[0113] In one embodiment of the invention, when compressing the alarm data to be compressed, when the maximum similarity value in the obtained similarity is greater than the preset similarity threshold, the alarm data to be compressed can be determined as the alarm data in the target alarm group, and the alarm class to which the first historical alarm data corresponding to the maximum similarity value belongs can be determined as the alarm class to which the alarm data to be compressed belongs, so as to achieve compression of the alarm data to be compressed; and when the maximum similarity value in the similarity is not greater than the preset similarity threshold, the alarm data to be compressed is determined as the alarm data in the target alarm group, and according to the second feature of the alarm data to be compressed, a new alarm class is determined in the target alarm group, and the new alarm class is determined as the alarm class to which the alarm data to be compressed belongs, so as to achieve compression of the alarm data to be compressed.
[0114] In an example, after obtaining the similarity lists shown in Table 13 and Table 14, the row of data with the highest similarity can be selected respectively, such as the highest similarity value 1 in Table 13 and the highest similarity value 0.8 in Table 14.
[0115] In another example, when selecting the data with the highest similarity, its corresponding index value in the similarity list can be obtained and expressed as (similarity, index). For example, (1, 1) in Table 13 and (0.8, 2) in Table 14 can be obtained.
[0116] Then, it can be determined whether the maximum similarity value is greater than the preset similarity threshold. If it is greater than, it means that the alarm data to be compressed has a high similarity with the first alarm data of a certain alarm class in the same group. At this time, the alarm data to be compressed can be classified as the alarm class to which the first alarm data of this class in the target alarm group belongs, so as to achieve compression of the alarm data to be compressed; if it is not greater than the preset similarity threshold, it means that the alarm data to be compressed is significantly different from the first alarm data of all alarm classes in the same group, and it is a new attack. At this time, the alarm data to be compressed will not be classified into any existing alarm class of the first alarm group, but according to the second feature of the alarm data to be compressed, a new alarm class is created in the target alarm group of the first alarm filtering list shown in Table 8, and the alarm data to be compressed is classified into the newly created alarm class, so as to achieve compression of the alarm data to be compressed.
[0117] In one example, the preset similarity threshold may be 0.9, and the maximum similarity in Table 13 is 1, which is greater than the threshold. The index corresponding to the maximum similarity value is 1, and the group label "1" of the data with index 1 in the first alarm screening list shown in Table 8 can be grouped and compressed for the alarm data to be compressed, and further, the alarm data to be compressed can be classified into the group label "1_1".
[0118] Correspondingly, the maximum similarity in Table 12 is 0.8, which is less than the preset similarity threshold. The index corresponding to the maximum similarity is 2. Then the group label of the data with index 2 corresponding to the similarity is 1. A new alarm class label is generated based on its group label, and the first alarm filter list is updated.
[0119] After determining the alarm group and the alarm class corresponding to the alarm data to be compressed, the group label and the class label corresponding to the alarm data to be compressed may be output.
[0120] As can be seen from the above, in one embodiment of the invention, the compression process of the alarm data to be compressed can be as follows: Figure 4As shown. Specifically, the word vectorization model and the pre-trained twin neural network model can be loaded through the model loading module to realize the subsequent second feature extraction and similarity value prediction. Then, the alarm data to be compressed generated by the security device can be accessed through the real-time log data acquisition module to provide data support for subsequent processing. The word segmentation technology is first used through the feature extraction module to segment the second feature of the compressed alarm data, such as the request header field, and then the word list obtained after the segmentation is word vectorized, and the vectorized word matrix is summed to obtain a vector of size 1*n. Then, it can be determined whether the incoming alarm data to be compressed is in the pre-constructed first alarm filtering list. When judging, it can be determined based on the specified field, such as the first feature of the alarm data to be compressed, whether there is matching historical alarm data in the first alarm filtering list. If so, the prediction matrix can be constructed directly. If not, a new first alarm group is added to the filtering list based on the first feature of the alarm data to be compressed. Among them, the prediction matrix construction module can be used to construct the prediction matrix in the above embodiment. Then, the trained twin neural network model can be used through the twin neural network module to perform similarity regression on the constructed prediction matrix, and finally a similarity list of the alarm data to be compressed and other data in the same group is obtained, and the alarm clustering module is used to select the data with the highest similarity, and it is determined whether the highest similarity is greater than the threshold. According to the judgment result, the alarm group and alarm class corresponding to the alarm data to be compressed are determined, and the corresponding group label and class label data are output.
[0121] In an embodiment of the present invention, the first feature of the alarm data to be compressed is first obtained, and the target alarm group corresponding to the alarm data to be compressed is determined based on the first feature of the alarm data to be compressed and a pre-created first alarm filter list. Then, based on the pre-trained twin neural network, the similarity between the second feature of the alarm data to be compressed and the second feature of any alarm data in the target alarm group is obtained, and the alarm data to be compressed is compressed based on the similarity.
[0122] In an embodiment of the present invention, the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature of the alarm data to be compressed, and then the similarity between the alarm data to be compressed and any historical alarm data in the target alarm group can be obtained through a pre-trained twin neural network, so as to further compress the alarm data to be compressed based on the similarity. Since the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature, and then the alarm data to be compressed can be compressed based on the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group, the alarm data to be compressed can be divided into alarm groups with a high degree of similarity thereto, and the compression of the alarm data to be compressed can be achieved more accurately. Moreover, since the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group can be better predicted through the twin neural network, variant alarms can be well dealt with, and a strong generalization ability is provided, and a large amount of training data is not required, so that the problems of the prior art can be effectively solved.
[0123] Corresponding to the above-mentioned alarm data compression method, an embodiment of the present invention further provides an alarm data compression device, which is applied to an encryption device. Figure 5 A schematic diagram of the module composition of the alarm data compression device 500 provided in an embodiment of the present invention is shown in FIG. Figure 5 As shown, the alarm data compression device 500 includes:
[0124] A first acquisition module 501 is used to acquire a first feature of the alarm data to be compressed;
[0125] The determination module 502 is used to determine the target alarm group corresponding to the alarm data to be compressed according to the first feature of the alarm data to be compressed and the first alarm screening list created in advance; the first alarm screening list includes the first feature of the first historical alarm data and the corresponding relationship with the first alarm group; the first alarm group is obtained by grouping the first historical alarm data according to the first feature of the first historical alarm data;
[0126] A second acquisition module 503 is used to acquire, according to a pre-trained twin neural network, the second feature of the alarm data to be compressed and the similarity with the second feature of any historical alarm data in the target alarm group; the first feature is different from the second feature;
[0127] The compression module 504 is used to compress the alarm data to be compressed according to the similarity.
[0128] Optionally, the determining module 502 is used to:
[0129] When the first feature of the alarm data to be compressed successfully matches the first feature of any historical alarm data in the first alarm screening list, the first alarm group corresponding to the successfully matched first historical alarm data is determined as the target alarm group corresponding to the alarm data to be compressed;
[0130] When the first feature of the alarm data to be compressed fails to match the first features of all historical alarm data in the first alarm filtering list, a new first alarm group is created in the first alarm filtering list, and the created new first alarm group is determined as the target alarm group corresponding to the alarm data to be compressed.
[0131] Optionally, the second acquisition module 503 is used to:
[0132] Obtain the second historical alarm data;
[0133] According to the first feature of the second historical alarm data, the second historical alarm data is grouped to obtain a second alarm group corresponding to any second historical alarm data;
[0134] The second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data are used as training samples to train the constructed twin neural network to obtain the pre-trained twin neural network.
[0135] Optionally, the twin neural network includes two multi-layer perceptrons for feature transformation and a regression output network for regression calculation;
[0136] The second acquisition module 503 is used for:
[0137] By using the two multi-layer perceptrons of the twin neural network, feature transformation is performed on the second features of any two second historical alarm data in the same second alarm group to obtain a first transformed feature and a second transformed feature;
[0138] Obtaining an absolute value of a difference between the first transformed feature and the second transformed feature;
[0139] Performing regression calculation on the absolute value of the difference through the regression output network of the twin neural network to obtain a regression calculation value;
[0140] The twin neural network is trained according to the regression calculation value and the difference in similarity between the attack targets of any two second historical alarm data.
[0141] Optionally, the second acquisition module 503 is used to:
[0142] After obtaining the second alarm group corresponding to any of the second historical alarm data, creating a second alarm screening list; the second alarm screening list includes the first feature of the second historical alarm data and the corresponding relationship with the second alarm group;
[0143] Obtaining an index value of any second historical alarm data in the second alarm screening list;
[0144] The second features of any two second historical alarm data in the same second alarm group, the index values of any two second historical alarm data in the second alarm screening list, and the similarity of attack targets in any two second historical alarm data are used as training samples.
[0145] Optionally, the first alarm screening list includes an index value of any first historical alarm data in the first alarm screening list;
[0146] The second acquisition module 503 is used for:
[0147] The second feature of the alarm data to be compressed, the second feature of any alarm data in the target alarm group and its index value in the first alarm screening list are taken as input and input into a pre-trained twin neural network to obtain the similarity of the output of the twin neural network.
[0148] Optionally, the first alarm group includes at least one alarm class, and the second characteristics of the first historical alarm data belonging to different alarm classes in the same first alarm group are different;
[0149] The compression module 504 is used to:
[0150] When the maximum similarity value among the similarities is greater than a preset similarity threshold, the alarm data to be compressed is determined as the alarm data in the target alarm group, and the alarm class to which the first historical alarm data corresponding to the maximum similarity value belongs is determined as the alarm class to which the alarm data to be compressed belongs;
[0151] When the maximum similarity value among the similarities is not greater than the preset similarity threshold, the alarm data to be compressed is determined as the alarm data in the target alarm group, and according to the second feature of the alarm data to be compressed, a new alarm class is determined in the target alarm group, and the new alarm class is determined as the alarm class to which the alarm data to be compressed belongs.
[0152] Optionally, the first feature includes at least one of the following: alarm time, alarm source IP, alarm destination IP, alarm destination port; the second feature includes: request header.
[0153] In an embodiment of the present invention, the first feature of the alarm data to be compressed is first obtained, and the target alarm group corresponding to the alarm data to be compressed is determined based on the first feature of the alarm data to be compressed and a pre-created first alarm filter list. Then, based on the pre-trained twin neural network, the similarity between the second feature of the alarm data to be compressed and the second feature of any alarm data in the target alarm group is obtained, and the alarm data to be compressed is compressed based on the similarity.
[0154] In an embodiment of the present invention, the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature of the alarm data to be compressed, and then the similarity between the alarm data to be compressed and any historical alarm data in the target alarm group can be obtained through a pre-trained twin neural network, so as to further compress the alarm data to be compressed based on the similarity. Since the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature, and then the alarm data to be compressed can be compressed based on the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group, the alarm data to be compressed can be divided into alarm groups with a high degree of similarity thereto, and the compression of the alarm data to be compressed can be achieved more accurately. Moreover, since the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group can be better predicted through the twin neural network, variant alarms can be well dealt with, and a strong generalization ability is provided, and a large amount of training data is not required, so that the problems of the prior art can be effectively solved.
[0155] Corresponding to the above-mentioned alarm data compression method, the embodiment of the present invention further provides an alarm data compression device, Figure 6 A schematic diagram of the hardware structure of an alarm data compression device provided by an embodiment of the present invention.
[0156] The alarm data compression device may be the terminal device or server provided in the above embodiment for compressing alarm data.
[0157] The compression device of the alarm data may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and a memory 602, and the memory 602 may store one or more storage applications or data. Among them, the memory 602 may be a short-term storage or a persistent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the compression device of the alarm data. Furthermore, the processor 601 may be configured to communicate with the memory 602, and execute a series of computer executable instructions in the memory 602 on the compression device of the alarm data. The compression device of the alarm data may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input and output interfaces 605, and one or more keyboards 606.
[0158] Specifically in this embodiment, the compression device for alarm data includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the compression device for alarm data, and is configured to be executed by one or more processors to perform the above embodiments.
[0159] In an embodiment of the present invention, the first feature of the alarm data to be compressed is first obtained, and the target alarm group corresponding to the alarm data to be compressed is determined based on the first feature of the alarm data to be compressed and a pre-created first alarm filter list. Then, based on the pre-trained twin neural network, the similarity between the second feature of the alarm data to be compressed and the second feature of any alarm data in the target alarm group is obtained, and the alarm data to be compressed is compressed based on the similarity.
[0160] In an embodiment of the present invention, the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature of the alarm data to be compressed, and then the similarity between the alarm data to be compressed and any historical alarm data in the target alarm group can be obtained through a pre-trained twin neural network, so as to further compress the alarm data to be compressed based on the similarity. Since the target alarm group corresponding to the alarm data to be compressed can be determined based on the first feature, and then the alarm data to be compressed can be compressed based on the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group, the alarm data to be compressed can be divided into alarm groups with a high degree of similarity thereto, and the compression of the alarm data to be compressed can be achieved more accurately. Moreover, since the similarity between the alarm data to be compressed and the historical alarm data in the target alarm group can be better predicted through the twin neural network, variant alarms can be well dealt with, and a strong generalization ability is provided, and a large amount of training data is not required, so that the problems of the prior art can be effectively solved.
[0161] Another embodiment of the present disclosure further provides a computer-readable storage medium, where the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the above process when executed by a processor.
[0162] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned alarm data compression method embodiment and achieve the same effect and function, which will not be repeated here.
[0163] Another embodiment of the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above process is implemented.
[0164] The computer program product in the embodiment of the present disclosure can implement each process of the above-mentioned alarm data compression method embodiment and achieve the same effect and function, which will not be repeated here.
[0165] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0166] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0167] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0168] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0169] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0170] It should be understood by those skilled in the art that one or more embodiments of the present disclosure may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0171] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0172] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0174] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0175] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0176] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0177] The above description is only an embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. A method for compressing alarm data, characterized in that: The method comprises: Obtaining a first feature of the alarm data to be compressed; According to the first feature of the alarm data to be compressed and the pre-created first alarm screening list, a target alarm group corresponding to the alarm data to be compressed is determined; the first alarm screening list includes the first feature of the first historical alarm data and the corresponding relationship with the first alarm group; the first alarm group is obtained by grouping the first historical alarm data according to the first feature of the first historical alarm data; According to the pre-trained twin neural network, obtaining the second feature of the alarm data to be compressed and the similarity with the second feature of any historical alarm data in the target alarm group; the first feature is different from the second feature; compressing the alarm data to be compressed according to the similarity; The training process of the pre-trained twin neural network includes the following steps: Obtain the second historical alarm data; According to the first feature of the second historical alarm data, the second historical alarm data is grouped to obtain a second alarm group corresponding to any second historical alarm data; Using the second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data as training samples, training the constructed twin neural network to obtain the pre-trained twin neural network; The twin neural network includes two multi-layer perceptrons for feature transformation and a regression output network for regression calculation. The second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data are used as training samples to train the constructed twin neural network, including: By using the two multi-layer perceptrons of the twin neural network, feature transformation is performed on the second features of any two second historical alarm data in the same second alarm group to obtain a first transformed feature and a second transformed feature; Obtaining an absolute value of a difference between the first transformed feature and the second transformed feature; Performing regression calculation on the absolute value of the difference through the regression output network of the twin neural network to obtain a regression calculation value; Training the twin neural network according to the regression calculation value and the difference between the similarities of the attack targets of any two second historical alarm data; The first alarm group includes at least one alarm class, and the second features of the first historical alarm data belonging to different alarm classes in the same first alarm group are different; and compressing the alarm data to be compressed according to the similarity includes: When the maximum similarity value among the similarities is greater than a preset similarity threshold, the alarm data to be compressed is determined as the alarm data in the target alarm group, and the alarm class to which the first historical alarm data corresponding to the maximum similarity value belongs is determined as the alarm class to which the alarm data to be compressed belongs; When the maximum similarity value among the similarities is not greater than the preset similarity threshold, the alarm data to be compressed is determined as the alarm data in the target alarm group, and according to the second feature of the alarm data to be compressed, a new alarm class is determined in the target alarm group, and the new alarm class is determined as the alarm class to which the alarm data to be compressed belongs.
2. The method according to claim 1, characterized in that The determining, according to the first feature of the alarm data to be compressed and a pre-created first alarm screening list, a target alarm group corresponding to the alarm data to be compressed includes: When the first feature of the alarm data to be compressed successfully matches the first feature of any historical alarm data in the first alarm screening list, the first alarm group corresponding to the successfully matched first historical alarm data is determined as the target alarm group corresponding to the alarm data to be compressed; When the first feature of the alarm data to be compressed fails to match the first features of all historical alarm data in the first alarm filtering list, a new first alarm group is created in the first alarm filtering list, and the created new first alarm group is determined as the target alarm group corresponding to the alarm data to be compressed.
3. The method according to claim 1, characterized in that The taking the second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data as training samples includes: After obtaining the second alarm group corresponding to any of the second historical alarm data, creating a second alarm screening list; the second alarm screening list includes the first feature of the second historical alarm data and the corresponding relationship with the second alarm group; Obtaining an index value of any second historical alarm data in the second alarm screening list; The second features of any two second historical alarm data in the same second alarm group, the index values of any two second historical alarm data in the second alarm screening list, and the similarity of attack targets in any two second historical alarm data are used as training samples.
4. The method according to claim 3, characterized in that The first alarm screening list includes an index value of any first historical alarm data in the first alarm screening list; the second feature of the alarm data to be compressed is obtained according to the pre-trained twin neural network, and the similarity with the second feature of any historical alarm data in the target alarm group includes: The second feature of the alarm data to be compressed, the second feature of any alarm data in the target alarm group and its index value in the first alarm screening list are taken as input and input into a pre-trained twin neural network to obtain the similarity of the output of the twin neural network.
5. The method according to any one of claims 1 to 4, characterized in that: The first feature includes at least one of the following: alarm time, alarm source IP, alarm destination IP, alarm destination port; the second feature includes: request header.
6. A device for compressing alarm data, characterized in that: The device comprises: A first acquisition module, used to acquire a first feature of the alarm data to be compressed; A determination module, configured to determine a target alarm group corresponding to the alarm data to be compressed according to a first feature of the alarm data to be compressed and a pre-created first alarm screening list; the first alarm screening list includes a first feature of the first historical alarm data and a corresponding relationship with the first alarm group; the first alarm group is obtained by grouping the first historical alarm data according to the first feature of the first historical alarm data; A second acquisition module is used to acquire, according to a pre-trained twin neural network, a second feature of the alarm data to be compressed and a similarity with a second feature of any historical alarm data in the target alarm group; the first feature is different from the second feature; A compression module, used for compressing the alarm data to be compressed according to the similarity; The second acquisition module is used for: Obtain the second historical alarm data; According to the first feature of the second historical alarm data, the second historical alarm data is grouped to obtain a second alarm group corresponding to any second historical alarm data; Using the second features of any two second historical alarm data in the same second alarm group and the similarity of the attack targets of any two second historical alarm data as training samples, training the constructed twin neural network to obtain the pre-trained twin neural network; The twin neural network includes two multi-layer perceptrons for feature transformation and a regression output network for regression calculation; the second acquisition module is used to: By using the two multi-layer perceptrons of the twin neural network, feature transformation is performed on the second features of any two second historical alarm data in the same second alarm group to obtain a first transformed feature and a second transformed feature; Obtaining an absolute value of a difference between the first transformed feature and the second transformed feature; Performing regression calculation on the absolute value of the difference through the regression output network of the twin neural network to obtain a regression calculation value; Training the twin neural network according to the regression calculation value and the difference between the similarities of the attack targets of any two second historical alarm data; The first alarm group includes at least one alarm class, and the second characteristics of the first historical alarm data belonging to different alarm classes in the same first alarm group are different; the compression module is used to: When the maximum similarity value among the similarities is greater than a preset similarity threshold, the alarm data to be compressed is determined as the alarm data in the target alarm group, and the alarm class to which the first historical alarm data corresponding to the maximum similarity value belongs is determined as the alarm class to which the alarm data to be compressed belongs; When the maximum similarity value among the similarities is not greater than the preset similarity threshold, the alarm data to be compressed is determined as the alarm data in the target alarm group, and according to the second feature of the alarm data to be compressed, a new alarm class is determined in the target alarm group, and the new alarm class is determined as the alarm class to which the alarm data to be compressed belongs.
7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 5 when executed by the processor.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer program product, characterized in that The computer program product comprises a computer program, which implements the steps of the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Alarm information decision-making method and device, computer equipment and storage medium
CN110752942A
Alarm compression method and device, equipment and storage medium
CN114422322A
Alarm data association method and device, storage medium and equipment
CN115664931A
Alarm and root cause positioning method, model training method, device, equipment and medium
CN117149486A
Alarm processing method and device, equipment and storage medium
CN117278379A
