Internet traffic security protection method and system

By grouping the initial traffic data set and training the adaptive enhancement algorithm, and dynamically adjusting the weight threshold, the problem of poor classification effect of the Adaboost algorithm in different network environments is solved, and the robustness and adaptability of Internet traffic security protection are improved.

CN118487870BActive Publication Date: 2024-09-10GUANGZHOU DAYI INTERNET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing Adaboost algorithm pays too much attention to noise samples when detecting DDoS attacks, resulting in a decrease in classifier accuracy, and the fixed weight threshold has poor adaptability in different network environments, affecting the security protection effect of Internet traffic.

Method used

By grouping the initial traffic data set, use the thresholdless adaptive enhancement algorithm to train to obtain the group classifier and sample weight, calculate the local threshold and proportion coefficient, determine the global threshold and base classifier, and use the thresholded adaptive enhancement algorithm to perform In the final training, the weight thresholds are dynamically adjusted to adapt to different network environments.

Benefits of technology

It improves the adaptive ability and robustness of the classifier, reduces the impact of noise on the performance of the classifier, improves the Internet traffic monitoring effect and security protection performance, and enhances the migration of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118487870B
    Figure CN118487870B
Patent Text Reader

Abstract

The present application relates to a method and system for Internet traffic security protection, including: grouping an initial traffic data set with added noise samples to obtain initial group data; based on the initial group data, using a threshold-free adaptive enhancement algorithm for training to obtain a group classifier for each group of initial group data and a sample weight for the initial group data; based on the sample weight and the group classifier, calculating a local threshold for each group of initial group data with respect to the sample weight; based on the local threshold and the sample weight, calculating a proportional coefficient for each group classifier; based on the local threshold, the group classifier and the proportional coefficient, calculating a global threshold and a base classifier for the initial traffic data set; based on the initial traffic data set, the global threshold and the base classifier, using a threshold-based adaptive enhancement algorithm for training to obtain a final classifier. The present application can improve the classification effect of the classifier and further improve the Internet traffic security protection performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet traffic security, and in particular to an Internet traffic security protection method and system. Background Art

[0002] Distributed Denial of Service (DDoS) is an attack method that controls zombie hosts and continuously sends requests to the target host with the purpose of exhausting the target host's resources, making it unable to provide normal services. In recent years, it has become one of the biggest Internet threats and is difficult to detect.

[0003] The AdaBoost algorithm is an adaptive boosting algorithm that builds a strong classifier by combining multiple weak classifiers to achieve data classification. The core idea of ​​the algorithm is to determine the weight according to the difficulty of classifying each sample, and through multiple iterative training, gradually select key classification feature sets, train multiple weak classifiers, and finally weight these weak classifiers into a strong classifier. In each iteration, AdaBoost adjusts the weight of each sample based on the output estimate of the classifier in the previous step, so that the misclassified samples will receive higher weights in subsequent training, so that the algorithm can pay more attention to samples that are difficult to identify, such as noise samples.

[0004] The paper "Application of Improved Adaboost Algorithm in Application Layer DDoS Attack Detection" proposes the use of the Adaboost algorithm to detect application layer DDoS attacks, and mentions that the Adaboost algorithm pays too much attention to noise samples, which will lead to a decrease in the accuracy of the final classifier. Therefore, the concept of "weight threshold" is proposed in the paper. When the weight is greater than the weight threshold, the sample is removed from the training sample, thereby improving the accuracy of the algorithm, and finally a fixed weight threshold is given.

[0005] However, for different network environments, the corresponding weight thresholds may be different. The conventional threshold selection method is to obtain a fixed threshold based on experimental data after a large number of experiments. This weight threshold has poor adaptability, and the weight threshold obtained by the experiment has regional limitations. Using the same weight threshold in different network environments is likely to result in poor classification results of the final classifier, which is not conducive to the security protection of Internet traffic. Summary of the invention

[0006] In order to adapt to different network environments, improve the classification effect of the classifier obtained by the Adaboost algorithm, thereby realizing abnormal monitoring of traffic data and further improving the Internet traffic security protection performance, the present application provides an Internet traffic security protection method and system.

[0007] In the first aspect, the present application provides an Internet traffic security protection method, which adopts the following technical solutions:

[0008] An Internet traffic security protection method includes: grouping an initial traffic data set with added noise samples to obtain a plurality of groups and initial group data corresponding to each group;

[0009] Based on the initial grouping data, a threshold-free adaptive enhancement algorithm is used for training to obtain a group classifier for each group and a sample weight of the initial grouping data;

[0010] Based on the sample weight and the group classifier, a local threshold value for the sample weight in each group is calculated;

[0011] Based on the local threshold and the sample weight, a proportional coefficient of each group of classifiers is calculated;

[0012] Based on the local threshold, the group classifier and the proportional coefficient, a global threshold and a base classifier for the initial traffic data set are calculated;

[0013] Based on the initial traffic data set, the global threshold and the base classifier, a threshold-based adaptive enhancement algorithm is used for training to obtain a final classifier.

[0014] The beneficial effects are as follows: by grouping the initial traffic data sets obtained in different network environments, and obtaining the group classifier of each group through adaptive enhancement algorithm training, the local threshold of each group is further determined, and the global threshold for the initial traffic data set is determined according to the local threshold of each group and the proportional coefficient of the group classifier. The corresponding weight threshold can be determined for different network environments. Compared with the fixed weight threshold in the prior art, it has stronger adaptability and can screen data samples more accurately, thus having certain robustness and mobility; the base classifier determined according to the proportional coefficient, as the classifier basis of the adaptive enhancement algorithm with a threshold, can further improve the classification effect of the final classifier obtained by training the adaptive enhancement algorithm with a threshold, thereby improving the Internet traffic monitoring effect and further improving the Internet traffic security protection performance.

[0015] Optionally, the calculating, based on the sample weight and the group classifier, a local threshold value for the sample weight in each group includes:

[0016] Based on the sample weights of any group of the initial grouped data, calculating the accuracy of the group of classifiers corresponding to the initial grouped data;

[0017] Based on the accuracy, a local threshold of each group with respect to the sample weight is calculated.

[0018] The beneficial effect is that in data samples affected by noise, the data weight of the noise samples is too large and the classification of noise samples is more prone to errors, so the statistical error rate is easily affected by the noise samples. Calculating the local threshold by accuracy can reduce the impact of noise samples and improve the accuracy of obtaining the local threshold compared to calculating the weight threshold based on the error rate.

[0019] Optionally, the calculation formula for the accuracy of the group classifier is as follows:

[0020]

[0021] In the formula, is the accuracy of the group classifier; For the Sample weights of initial grouped data; is a function to determine whether the classification result of the group classifier is correct. If , ;on the contrary, .

[0022] Optionally, the calculation formula of the local threshold is as follows:

[0023]

[0024] In the formula, For the A local threshold value corresponding to the initial grouping data; For the The maximum sample weight in the initial grouping data of the group; is the accuracy of the group classifier; For the The number of samples of the initial grouped data is set.

[0025] Optionally, the calculating, based on the local threshold and the sample weight, a proportional coefficient of each group of classifiers includes:

[0026] Based on the local threshold, performing noise screening on the initial group data in each group, determining target group data, and calculating the error rate of the group classifier corresponding to each group based on the target group data;

[0027] Based on the sample weights, obtaining the information divergence of the group classifier;

[0028] Based on the error rate and the information divergence, a proportionality coefficient of the group classifier is calculated.

[0029] The beneficial effect is that the information divergence is used to evaluate whether the group classifier is affected by noise samples during the training process, and the classification effect of the group classifier can be analyzed to obtain a more accurate proportional coefficient, which is further convenient for determining the global threshold or base classifier.

[0030] Optionally, obtaining the information divergence of the group classifier based on the sample weight includes:

[0031] Dividing the sample weights into weight categories, the weight categories including a first weight category, a second weight category and a third weight category, any sample weight in the first weight category is greater than any sample weight in the second weight category, and any sample weight in the second weight category is greater than any sample weight in the third weight category;

[0032] Performing Gaussian fitting on the sample weights whose weight category belongs to the first weight category to obtain a first Gaussian fitting function;

[0033] Obtaining a noise sample weight of the noise sample, performing Gaussian fitting on the noise sample weight, and obtaining a second Gaussian fitting function;

[0034] Based on the first Gaussian fitting function and the second Gaussian fitting function, an information divergence of the group of classifiers is determined.

[0035] Optionally, the calculation formula of the proportionality coefficient of the group classifier is as follows:

[0036]

[0037] In the formula, is the proportional coefficient of the group classifier of the jth group; For the The error rate of the group classifier for the group; To adjust the parameters; For the The information divergence of the group classifier of a group.

[0038] Optionally, the calculating, based on the local threshold, the group classifier and the proportional coefficient, a global threshold and a base classifier for the initial traffic data set includes:

[0039] Based on the local threshold and the proportional coefficient, the local threshold is weightedly added to obtain a global threshold for the initial traffic data set.

[0040] Based on the group classifier and the proportional coefficient, weighted addition is performed on the group classifier to obtain a base classifier for the initial traffic data set.

[0041] Optionally, the calculation formula of the global threshold is as follows:

[0042]

[0043] In the formula, is the global threshold; For the The local threshold of the group, For the The scaling factor of the group classifier for the group, is the number of groups;

[0044] The calculation formula of the base classifier is as follows:

[0045]

[0046] In the formula, is the base classifier; For the The group classifier for the group, For the The scaling factor of the group classifier for the group, is the number of groups.

[0047] In the second aspect, the present application provides an Internet traffic security protection system, which adopts the following technical solutions:

[0048] An Internet traffic security protection system, characterized in that it includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned Internet traffic security protection method is implemented.

[0049] The beneficial effect is: the above-mentioned Internet traffic security protection method is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.

[0050] This application has the following technical effects:

[0051] 1. This application can dynamically adjust the global threshold according to different network environments, improve the adaptability and robustness of the final classifier, and reduce the limitations of the traditional fixed threshold method.

[0052] 2. By adding noise samples to the initial traffic data set, grouping the initial traffic data set, and calculating the classification accuracy and local threshold of the group classifier, the noise samples can be effectively removed and the impact of noise on the classifier performance can be reduced.

[0053] 3. By using the AdaBoost algorithm with a threshold for training, the present application can obtain a final classifier that is as unaffected by noise as possible, thereby improving the accuracy of the final classifier.

[0054] 4. Since the threshold selection method of the present application no longer relies on specific experimental data, but is obtained through the algorithm's own learning, the algorithm's portability is enhanced, enabling it to work effectively in different network environments.

[0055] 5. By comprehensively considering the performance of each group of classifiers and the degree of influence of noise, this application provides a global threshold to guide the AdaBoost algorithm to train a classifier that is as unaffected by noise as possible.

[0056] 6. The present application also provides a base classifier, which is obtained by weighted addition of multiple group classifiers according to proportional coefficients, and is used for subsequent training of the AdaBoost algorithm with a threshold. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-restrictive manner, and the same or corresponding numbers represent the same or corresponding parts.

[0058] Figure 1 It is a flow chart of an Internet traffic security protection method according to an embodiment of the present application.

[0059] Figure 2 It is a flow chart of steps S201-S202 in an Internet traffic security protection method according to an embodiment of the present application.

[0060] Figure 3 It is a flow chart of steps S301-S303 in an Internet traffic security protection method according to an embodiment of the present application.

[0061] Figure 4 It is a flow chart of steps S401-S404 in an Internet traffic security protection method according to an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0063] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0064] The present application discloses a method for protecting Internet traffic security. Figure 1 ,include:

[0065] S101 . Grouping an initial traffic data set with noise samples added thereto to obtain a plurality of groups and initial group data corresponding to each group.

[0066] Get the initial traffic dataset , There is some original noise in the initial traffic data set, but the amount of the original noise is small and cannot be located. In order to enhance the characteristic performance of the noise in the algorithm, this embodiment adds some noise samples to the initial traffic data set.

[0067] It can be explained that in the above traffic data set, The input features or independent variables representing the data can be scalars, vectors, matrices, or even higher-dimensional tensors, depending on the complexity of the problem. In supervised learning problems, It usually represents a description or feature set of a sample, such as the pixel value of an image, the word frequency vector of a text document, etc.

[0068] Represents the true label of the data. In the classification problem, Usually , or other discrete values. Represents two categories, including "positive class" and "negative class", used to represent The true category label.

[0069] Specifically, add noise samples with wrong labels or difficult to classify to the initial traffic dataset, that is, set The original data in the initial traffic data set is replaced by random noise samples. Set to 1000 to divide the entire initial traffic data set into groups, each containing the same amount of initial group data, here .

[0070] S102 : Based on the initial grouping data, a threshold-free adaptive boosting algorithm is used for training to obtain a group classifier for each group and a sample weight of the initial grouping data.

[0071] According to the initial grouping data, the threshold-free AdaBoost algorithm is used for training. The AdaBoost algorithm can build a strong classifier by superimposing several weak learners trained in multiple rounds.

[0072] In this embodiment, The group data is traversed. For the Group data, use the threshold-free AdaBoost algorithm to train a group classifier At the same time, during the training process, the AdaBoost algorithm adjusts the sample weights according to the error rate of the previous group classifier. ,in Indicates the first Initial group data.

[0073] At this point, the AdaBoost algorithm can be used to train the group classifier corresponding to each group, and assign corresponding sample weights to each initial group data.

[0074] S103: Based on the sample weight and the group classifier, a local threshold value of the sample weight in each group is calculated.

[0075] Since the initial group data of each group has a greater weight, the initial group data is more likely to be noise. Therefore, in order to obtain a more accurate error rate, a weight threshold within a group needs to be set to eliminate the noise.

[0076] This embodiment selects the maximum value of the sample weight of the initial group data in the group as the benchmark, and sets the local threshold of each group according to the accuracy of the group classifier. Figure 2 , including:

[0077] S201, based on the sample weight of any group of initial grouped data, calculating the accuracy of the group classifier corresponding to the initial grouped data;

[0078] S202: Based on the accuracy, calculate and obtain a local threshold value of each group with respect to the sample weight.

[0079] The local threshold within each group is calculated by the accuracy of the group classifier, mainly referring to the following principles: the higher the accuracy of the group classifier, the greater the weight of the samples correctly classified in the group classifier and the greater the number, then the noise content in the part of the data with large sample weights in the initial group data of the group is smaller, so the fewer initial group data corresponding to the large sample weights that should be deleted, that is, the higher the local threshold; on the contrary, the lower the accuracy, the higher the noise content in the initial group data with large sample weights, so the more initial group data with large sample weights that should be deleted, that is, the lower the local threshold.

[0080] In the traditional AdaBoost algorithm, the general method for judging the performance of the classifier is to calculate the error rate of the classifier. Specifically, the calculation formula of the error rate is:

[0081]

[0082] in For the The weight of the initial grouped data, is the number of samples in the group. Is a function to determine whether the classification result of the classifier is correct. If , ;on the contrary, That is, the error rate is the sum of the weights of samples that are misclassified by the classifier.

[0083] However, in the data samples affected by noise, the data weight of the noise samples is too large and the classification of noise samples is more prone to errors. Obviously, the statistical error rate here is easily affected by noise. The degree of noise influence on the correctly classified samples is small, so this embodiment proposes a corresponding accuracy rate , which is used to judge the classification performance of the group classifier.

[0084] Similar to the error rate, the accuracy For group classifier The sum of the sample weights of the initial grouped data with correct classification results. Specifically, the accuracy calculation formula is:

[0085]

[0086] Unlike the error rate, if , ;on the contrary, .

[0087] After calculating the accuracy of each group classifier, the local threshold of each group is determined according to the accuracy. Specifically, for the initial grouping data of the jth group, the calculation formula of its local threshold is:

[0088]

[0089] in For the The largest sample weight in the initial grouping data; is the accuracy of the group classifier; For the The number of samples of the initial grouping data. From the above calculation formula, we can know that the local threshold The accuracy of the group classifier In this way, a local threshold adjusted based on the current classification effect can be obtained to guide classification decisions.

[0090] S104: Based on the local threshold and the sample weight, a proportional coefficient of each group classifier is calculated.

[0091] After determining the local threshold, the proportional coefficient of each group classifier can be calculated based on the local threshold of each group and the sample weight of the initial group data. Figure 3 , specifically including:

[0092] S301, based on the local threshold, perform noise screening on the initial group data in each group, determine the target group data, and calculate the error rate of the group classifier corresponding to each group based on the target group data;

[0093] S302, obtaining information divergence of the group classifier based on the sample weight;

[0094] S303: Based on the error rate and information divergence, a proportional coefficient of the group classifier is calculated.

[0095] Since the sample weight of the noise in the group is too large, it will cause a greater impact of noise when calculating the error rate of the group classifier. In order to reduce this impact, when the sample weight of the initial grouping data is greater than the local threshold When , the initial group data is removed from the initial traffic data set, that is, the weight of the initial group data is set to 0. Specifically, the sample weights of the initial group data in the group are traversed and processed as follows:

[0096]

[0097] That is, the initial grouping data whose sample weight is greater than or equal to the local threshold can be deleted.

[0098] So far, this embodiment has obtained the local threshold value of each group of initial group data. And the group classifier corresponding to each group , and screen the initial grouping data in the group according to the local threshold, preliminarily eliminate the sample points that may be noise, and obtain the target grouping data.

[0099] From the above description, it can be seen that the calculation formula of the error rate of the group classifier of the group where the target group data is located is:

[0100]

[0101] Furthermore, the information divergence of the group classifier is calculated based on the sample weights of the initial group data within the group. Figure 4 , including:

[0102] S401, dividing the sample weights into weight categories, where the weight categories include a first weight category, a second weight category, and a third weight category, where any sample weight in the first weight category is greater than any sample weight in the second weight category, and any sample weight in the second weight category is greater than any sample weight in the third weight category;

[0103] S402, performing Gaussian fitting on the sample weights whose weight category belongs to the first weight category to obtain a first Gaussian fitting function;

[0104] S403, obtaining a noise sample weight of the noise sample, performing Gaussian fitting on the noise sample weight, and obtaining a second Gaussian fitting function;

[0105] S404: Determine the information divergence of the group classifier based on the first Gaussian fitting function and the second Gaussian fitting function.

[0106] In this embodiment, the sample weights of all data in the initial traffic data set are Sorting is done into three categories: the first weight category, the second weight category, and the third weight category, where any sample weight in the first weight category is greater than any sample weight in the second weight category, and any sample weight in the second weight category is greater than any sample weight in the third weight category. The sample weights are divided into three categories mainly to analyze and understand the distribution of sample weights during the AdaBoost algorithm training process, as well as the degree of influence of noise samples on classifier performance. These three categories represent different ranges of sample weights, and their meanings are as follows:

[0107] First weight category: This category contains the initial grouping data with the largest sample weights. These initial grouping data are considered the most difficult to classify in the AdaBoost algorithm and are most likely to be misclassified. Since the AdaBoost algorithm adjusts the sample weights according to the error rate of the previous classifier, these initial grouping data with the largest sample weights are likely to be noise samples or samples that are easily misclassified.

[0108] Second weight category: This category contains the initial grouped data with medium sample weights, which are neither particularly difficult nor easy in classifier training. They have moderate weights and may represent most of the samples in the initial traffic dataset.

[0109] The third weight category: This category contains the initial grouped data with the smallest sample weight. These samples are usually considered to be easier to classify during classifier training or have been well classified in previous iterations.

[0110] In order to analyze and understand the distribution of sample weights during the AdaBoost algorithm training process. Through Gaussian fitting, the distribution of sample weights can be represented by a mathematical Gaussian function, and then the aggregation degree and distribution characteristics of sample weights can be quantified. Therefore, the initial grouping data whose sample weights belong to the first weight category is obtained, and the corresponding sample weights are Gaussian fitted to obtain the first Gaussian fitting function :

[0111]

[0112] in, is the difference between the maximum and minimum sample weights in the first weight category, is the mean of all sample weights in the first weight category, is the standard deviation of the sample weights in the first weight category, .

[0113] Refers to the natural exponential function, that is, the base of the natural logarithm The natural exponential function is a mathematical function used to calculate In this embodiment, The function is used in the probability density function of the Gaussian distribution, which describes the random variable At the distance mean Standard Deviation Specifically, The input of the function is , this is a A quadratic function whose value determines the probability density of the Gaussian distribution.

[0114] when Close to the mean hour, is close to 0, so Close to 0, The output of the function is close to 1, which means that the probability density is high near the mean. Far from the mean , Increase, Become more negative, The output of the function decreases rapidly, resulting in a decrease in probability density.

[0115] At the same time, obtain the sample weights corresponding to the noise samples added to the initial traffic data set, perform Gaussian fitting, and determine the second Gaussian fitting function :

[0116]

[0117] Similarly, is the difference between the maximum and minimum sample weights corresponding to the noise samples, is the mean of the sample weights corresponding to the noise samples, is the standard deviation of the sample weights corresponding to the noise samples.

[0118] According to the first Gaussian fitting function and the second Gaussian fitting function, the information divergence of the group classifier can be calculated, which is called KL divergence in this embodiment.

[0119] In the AdaBoost algorithm, there is a mechanism to increase the sample weights of the wrong initial grouping data, which may cause the sample weights of the noise samples to gradually increase, thus affecting the performance of the model. Whether the training process is affected by noise samples, this embodiment uses KL divergence to measure the closeness between the initial group data distribution in the first weight category and the noise sample distribution. Specifically, the KL divergence formula is:

[0120]

[0121] express and If the KL divergence between The smaller the divergence value, the closer the initial grouping data distribution in the first weight category is to the noise sample distribution, which may mean that the group classifier The greater the impact of noise samples during training. On the contrary, if A larger divergence value indicates that the group classifier is less affected by noise samples.

[0122] So far, this embodiment has obtained the error rate and information divergence of the group classifier, and the proportional coefficient of the group classifier can be calculated based on the error rate and information divergence. In the subsequent process of this embodiment, the local thresholds of all groups are weighted and added to obtain a balanced global threshold; similarly, each group classifier is weighted and added to obtain a base classifier for the subsequent training of the AdaBoost algorithm with threshold. Therefore, the proportional coefficient of each group classifier is Determines the say of this group of classifiers in the final decision.

[0123] In the traditional AdaBoost algorithm, the proportional coefficient calculation formula for each group classifier is:

[0124]

[0125] In the formula, is the error rate of this group of classifiers. According to the above explanation, the error rate here is For group classifier After local threshold processing, the error rate on the target group data of suspected noise samples is eliminated.

[0126] In addition, since each group classifier is trained by the noisy and threshold-free AdaBoost algorithm, it is necessary to consider the degree to which each group classifier is affected by noise. If the group classifier is more affected by noise, the proportional coefficient of its constituent base classifier should be smaller. On the contrary, the proportional coefficient of the group classifier is larger. Therefore, the proportional coefficient formula of each group classifier is as follows:

[0127]

[0128] In the formula, For the The scaling factor of the group classifier for the group; For the The error rate of the group classifier for the group; To adjust the parameters; For the The information divergence of the group classifier of a group.

[0129] In this formula, The input of the function is ,in It is The information divergence of the group classifier is a non-negative number. The property of the function is that when the input is negative, the output will be a positive number, and the smaller the input (i.e. The larger the value is), the larger the output is.

[0130] Therefore, in this context, The function is to ensure that the KL divergence is proportional to the coefficient The effect of is positive and increases with the increase of KL divergence. This means that if the KL divergence of a group classifier is large, indicating that it is less affected by noise, then The function will make This item accounts for a large proportion in the proportional coefficient, making the overall proportional coefficient Larger, so in the final integrated learning, this group classifier will have a larger weight.

[0131] S105 . Based on the local threshold, the group classifier and the proportional coefficient, a global threshold and a base classifier for the initial traffic data set are calculated.

[0132] Among them, based on the local threshold and the proportional coefficient, the local threshold is weightedly added to obtain the global threshold for the initial traffic data set.

[0133] The calculation formula of the global threshold is as follows:

[0134]

[0135] In the formula, is the global threshold; For the The local threshold of the group, For the The scaling factor of the group classifier for the group, is the number of groups;

[0136] Wherein, based on the group classifier and the proportional coefficient, the group classifier is weightedly added to obtain a base classifier for the initial traffic data set.

[0137] Similarly, the base classifier The calculation formula of the base classifier is as follows:

[0138]

[0139] In the formula, is the base classifier; For the group classifier for groups, For the The scaling factor of the group classifier for the group, is the number of groups.

[0140] S106: Based on the initial traffic data set, the global threshold and the base classifier, a thresholded adaptive enhancement algorithm is used for training to obtain a final classifier.

[0141] At this point, the application has obtained the global threshold and base classifier. First, the sample weights of the initial traffic data set are updated by the global threshold, and the sample weights of the initial grouped data whose sample weights are greater than or equal to the global threshold are reset to 0. The specific update method is:

[0142]

[0143] In the formula, It means in During the iteration process New sample weights for the initial grouped data; It refers to In the iteration The current sample weight of the initial grouped data; For group classifier The proportionality coefficient of is the normalization coefficient, ensuring that the sum of all sample weights is 1; is the global threshold.

[0144] In this formula, The input of the function is ,because The property of the function is that when the input is negative, the output will be a positive number, and the smaller the input (i.e. The larger the value is), the larger the output is.

[0145] Therefore, in this embodiment, The function is to ensure Weighting the samples The impact is positive, and with This means that if the prediction of a sample data is opposite to the true label (i.e. ),So The function will increase the sample weight of this sample data, so that more attention will be paid to this sample data in subsequent iterations.

[0146] The base classifier As the initial classifier of the AdaBoost algorithm, the global threshold is used as the threshold of the AdaBoost algorithm. On this basis, the AdaBoost algorithm with a threshold is trained to obtain multiple classifiers and classifier weights. These classifiers are weighted and integrated into a strong classifier, which is the final classifier obtained in this embodiment.

[0147] The final classifier is used to perform anomaly monitoring on the acquired traffic monitoring data to obtain anomaly monitoring results, and the anomaly monitoring results are marked as risk data, thereby completing the security protection of Internet traffic.

[0148] It is worth mentioning that, for different network environments, this method can quickly determine the corresponding global threshold and base classifier, so that the final classifier can be trained using the thresholded AdaBoost algorithm, which improves the adaptability and robustness of the final classifier and reduces the limitations of the traditional fixed threshold method.

[0149] An embodiment of the present application also discloses an Internet traffic security protection system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an Internet traffic security protection method according to the present application is implemented.

[0150] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0151] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0152] Although this specification has shown and described a plurality of embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein may be adopted.

[0153] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for protecting Internet traffic security, characterized in that: include: The initial traffic data set with added noise samples is grouped to obtain a plurality of groups and initial group data corresponding to each group; Based on the initial grouping data, a threshold-free adaptive enhancement algorithm is used for training to obtain a group classifier for each group and a sample weight of the initial grouping data; Based on the sample weights of any group of the initial grouped data, calculating the accuracy of the group of classifiers corresponding to the initial grouped data; Based on the accuracy rate, a local threshold of each group with respect to the sample weight is calculated; Based on the local threshold and the sample weight, a proportional coefficient of each group of classifiers is calculated; Based on the local threshold, the group classifier and the proportional coefficient, a global threshold and a base classifier for the initial traffic data set are calculated; Based on the initial traffic data set, the global threshold and the base classifier, a threshold-based adaptive enhancement algorithm is used for training to obtain a final classifier, so as to perform abnormal monitoring on the acquired Internet traffic data based on the final classifier.

2. The method according to claim 1, characterized in that The calculation formula for the accuracy of the group classifier is as follows: In the formula, is the accuracy of the group classifier; For the Sample weights of initial grouped data; is a function to determine whether the classification result of the group classifier is correct. If , ;on the contrary, .

3. The method according to claim 2, characterized in that The calculation formula of the local threshold is as follows: In the formula, For the A local threshold value corresponding to the initial grouping data; For the The maximum sample weight in the initial grouping data of the group; is the accuracy of the group classifier; For the The number of samples of the initial grouped data is set.

4. The method according to claim 3, characterized in that The calculating, based on the local threshold and the sample weight, a proportional coefficient of each group of classifiers comprises: Based on the local threshold, performing noise screening on the initial group data in each group, determining target group data, and calculating the error rate of the group classifier corresponding to each group based on the target group data; Based on the sample weights, obtaining the information divergence of the group classifier; Based on the error rate and the information divergence, a proportionality coefficient of the group classifier is calculated.

5. The method according to claim 4, characterized in that The obtaining the information divergence of the group classifier based on the sample weights includes: Dividing the sample weights into weight categories, the weight categories including a first weight category, a second weight category and a third weight category, any sample weight in the first weight category is greater than any sample weight in the second weight category, and any sample weight in the second weight category is greater than any sample weight in the third weight category; Performing Gaussian fitting on the sample weights whose weight category belongs to the first weight category to obtain a first Gaussian fitting function; Obtaining a noise sample weight of the noise sample, performing Gaussian fitting on the noise sample weight, and obtaining a second Gaussian fitting function; Based on the first Gaussian fitting function and the second Gaussian fitting function, an information divergence of the group of classifiers is determined.

6. The method according to claim 5, characterized in that The calculation formula of the proportionality coefficient of the group classifier is as follows: In the formula, For the The scaling factor of the group classifier for the group; For the The error rate of the group classifier for the group; To adjust the parameters; For the The information divergence of the group classifier of a group.

7. The method according to any one of claims 1 to 6, characterized in that: The step of calculating a global threshold and a base classifier for the initial traffic data set based on the local threshold, the group classifier and the proportional coefficient includes: Based on the local threshold and the proportional coefficient, weighted addition is performed on the local threshold to obtain a global threshold for the initial traffic data set; Based on the group classifier and the proportional coefficient, weighted addition is performed on the group classifier to obtain a base classifier for the initial traffic data set.

8. The method according to claim 7, characterized in that The calculation formula of the global threshold is as follows: In the formula, is the global threshold; For the The local threshold of the group, For the The scaling factor of the group classifier for the group, is the number of groups; The calculation formula of the base classifier is as follows: In the formula, is the base classifier; For the The group classifier for the group, For the The scaling factor of the group classifier for the group, is the number of groups.

9. An Internet traffic security protection system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the Internet traffic security protection method according to any one of claims 1-8 is implemented.