Abnormal traffic detection method and device, electronic equipment and storage medium

By obtaining the distribution information and characteristic entropy value of cloud host traffic, and using the decision tree model to detect abnormal traffic, the problem of low cloud host traffic detection efficiency is solved, and more efficient and accurate security threat identification and response are achieved.

CN118802270APending Publication Date: 2024-10-18CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410174481.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing cloud host traffic detection efficiency is low, traditional security protection technology cannot adapt to the cloud computing environment, and cannot effectively identify and isolate network threats, resulting in high security risks.

Method used

By obtaining the distribution information of cloud host traffic, the traffic characteristics and feature entropy values ​​are determined, and the decision tree model is used to detect abnormal traffic and generate alarm information to identify security events.

Benefits of technology

It improves the efficiency and accuracy of cloud host traffic detection, can more effectively identify and respond to abnormal traffic, and enhances the security of cloud hosts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802270A_ABST
    Figure CN118802270A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and provides an abnormal traffic detection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring distribution information of cloud host traffic based on traffic information of the cloud host traffic; determining at least one traffic feature of the cloud host traffic based on the distribution information, and determining a feature entropy of the traffic feature; and inputting the at least one feature entropy value into a traffic detection model, and obtaining abnormal traffic output by the traffic detection model. According to the method, the flow characteristics and the characteristic entropy value of the cloud host are obtained through the distribution information, and the flow characteristics of the cloud host are accurately extracted; according to the feature entropy and the traffic detection model, the abnormal traffic is identified, and the abnormal traffic identification efficiency is improved while the abnormal traffic identification accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an abnormal traffic detection method, device, electronic device and storage medium. Background Art

[0002] In the cloud era, businesses are moving to the cloud one after another. If security risks are ignored and not avoided in time when moving to the cloud, it will bring greater security risks. Cloud hosts have become an important target of attacks: due to the convenience, reliability and low cost of cloud hosts, more and more attackers use cloud hosts as springboards or control terminals to launch network attacks. Cloud resources are used to launch DDOS attacks, implant website backdoors and other addresses that survive for a long time and are very active. With the advent of cloud computing, massive businesses have had a huge impact on the traffic model of data centers. The cloud platform is not visible inside, and users cannot control the traffic and applications on the virtual machines; there is a lack of threat isolation mechanism between virtual machines. Once network threats enter the cloud platform, they can spread wantonly.

[0003] The existing security protection technology for cloud hosts is to detect the traffic of cloud hosts. The existing defects of traffic detection for cloud hosts are: (1) The security boundary of cloud hosts is blurred: With the rise of cloud computing, a large number of businesses choose to go to the cloud, and the security of cloud hosts has gradually come into view. Cloud hosts blur the traditional security boundaries. At the same time, the existing security protection technology using feature libraries occupies a large amount of system resources. Therefore, traditional security products are not suitable for existing traffic detection technology. (2) Existing security protection technology plays a key role in traditional IT architecture. However, with the development of cloud computing and the popularization of virtualization technology, traditional security solutions cannot adapt to new architectures and cannot access virtualized environments; they operate independently or users often only deploy a single defense point, and the various defense points cannot be well linked.

[0004] In summary, the traffic detection efficiency of existing cloud hosts is low. Summary of the invention

[0005] The embodiments of the present application provide an abnormal traffic detection method, device, electronic device and storage medium to solve the technical problem of low traffic detection efficiency of a cloud host.

[0006] In a first aspect, the present application provides an abnormal traffic detection method, comprising:

[0007] Based on the traffic information of the cloud host traffic, obtaining distribution information of the cloud host traffic, wherein the distribution information represents a distribution state of the cloud host traffic;

[0008] Based on the distribution information, determining at least one traffic feature of the cloud host traffic, and determining a feature entropy value of the traffic feature;

[0009] At least one of the characteristic entropy values ​​is input into a traffic detection model to obtain abnormal traffic output by the traffic detection model. The traffic detection model is obtained by training sample characteristic entropy values ​​and abnormal traffic labels of the sample characteristic entropy values ​​based on a decision tree model.

[0010] In one embodiment, the traffic characteristics include at least one of the cloud host Internet behavior statistics, the east-west and north-south traffic distribution of the cloud host, the protocol and port distribution in the cloud host traffic, the cloud host malicious file upload statistics, the cloud host illegal external IP distribution statistics and the cloud host illegal IP access distribution statistics.

[0011] In one embodiment, the traffic information includes numerical information and category information, the category information includes at least source IP, destination IP, source port, destination port and protocol, and the numerical information includes at least the number and byte count of data packets;

[0012] The obtaining of distribution information of the cloud host traffic based on the traffic information of the cloud host traffic includes:

[0013] Convert each of the categorical information into at least one of the numerical information;

[0014] Alternatively, the categorical information is combined to obtain combined categorical information, and the combined categorical information is converted into at least one of the numerical information;

[0015] The numerical information is classified and counted to obtain the distribution information, wherein the distribution information includes characteristic events of the cloud host traffic and the characteristic quantity of each characteristic event, wherein the characteristic event characterizes the characteristics of the cloud host traffic distribution, and the characteristic quantity is the number of times the characteristic event occurs.

[0016] In one embodiment, determining at least one traffic characteristic of the cloud host traffic based on the distribution information includes:

[0017] Determining the distribution characteristics of the cloud host traffic based on the characteristic quantity of each characteristic event in the distribution information;

[0018] Based on the distribution characteristics of the same type, the flow characteristics are determined.

[0019] In one embodiment, determining the characteristic entropy value based on the distribution information includes:

[0020] Determining a distribution probability of the characteristic event based on the characteristic quantity of the characteristic event in the distribution information;

[0021] The characteristic entropy value is determined based on a distribution probability set of each of the traffic characteristics, wherein the distribution probability set includes a plurality of the distribution probabilities of the traffic characteristics.

[0022] In one embodiment, the flow detection model is obtained based on the following steps:

[0023] Acquire the sample feature entropy value and an abnormal traffic label corresponding to the sample feature entropy value, label the sample feature entropy value based on the abnormal traffic label, and obtain the sample feature entropy value carrying the label;

[0024] According to a preset ratio, the characteristic entropy values ​​of the sample carrying the label are divided into a training set and a test set;

[0025] The decision tree model is trained based on the training set, and the trained decision tree model is tested based on the test set to obtain the traffic detection model.

[0026] In one embodiment, after obtaining the abnormal traffic output by the traffic detection model, the method further includes:

[0027] Based on the abnormal traffic, generate alarm information;

[0028] The alarm information is aggregated, and based on the aggregated alarm information, a security event of the cloud host is generated.

[0029] In a second aspect, the present application provides an abnormal flow detection device, comprising:

[0030] A distribution information acquisition module, used to acquire distribution information of the cloud host traffic based on the traffic information of the cloud host traffic, wherein the distribution information represents the distribution state of the cloud host traffic;

[0031] A characteristic entropy value acquisition module, used to determine at least one traffic characteristic of the cloud host traffic based on the distribution information, and determine a characteristic entropy value of the traffic characteristic;

[0032] The abnormal traffic identification module is used to input at least one of the characteristic entropy values ​​into a traffic detection model to obtain the abnormal traffic output by the traffic detection model. The traffic detection model is obtained by training the sample characteristic entropy values ​​and the abnormal traffic labels of the sample characteristic entropy values ​​based on the decision tree model.

[0033] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the abnormal traffic detection method described in the first aspect is implemented.

[0034] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the abnormal traffic detection method described in the first aspect.

[0035] The abnormal traffic detection method, device, electronic device and storage medium provided in the present application obtain the distribution information of the cloud host traffic based on the traffic information of the cloud host traffic, and the distribution information characterizes the distribution state of the cloud host traffic; based on the distribution information, determine at least one traffic feature of the cloud host traffic, and determine the characteristic entropy value of the traffic feature; input at least one of the characteristic entropy values ​​into the traffic detection model to obtain the abnormal traffic output by the traffic detection model, and the traffic detection model is obtained by training the abnormal traffic labels of the sample characteristic entropy values ​​and the sample characteristic entropy values ​​on the basis of the decision tree model. The embodiment of the present application obtains the traffic characteristics and characteristic entropy values ​​of the cloud host through the distribution information, and accurately extracts the characteristics of the cloud host traffic; identifies the abnormal traffic according to the characteristic entropy value and the traffic detection model, and improves the efficiency of identifying the abnormal traffic while improving the accuracy of identifying the abnormal traffic. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 This is one of the flow charts of the abnormal flow detection method provided in the embodiment of the present application;

[0038] Figure 2 This is the second flow chart of the abnormal flow detection method provided in the embodiment of the present application;

[0039] Figure 3 This is the third flow chart of the abnormal flow detection method provided in the embodiment of the present application;

[0040] Figure 4 is a schematic diagram of the structure of an abnormal flow detection device provided in an embodiment of the present application;

[0041] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] Figure 1 This is one of the flow charts of the abnormal flow detection method provided in the embodiment of the present application. Figure 1 The present application provides an abnormal traffic detection method, including:

[0044] Step 100: Based on the traffic information of the cloud host traffic, obtain the distribution information of the cloud host traffic.

[0045] The distribution information represents the distribution status of the cloud host traffic.

[0046] The execution subject of the embodiment of the present application is a network intrusion detection and response system (Network Detection and Response, NDR). NDR is a system for monitoring and detecting abnormal activities and potential security threats in computer networks. Its main function is to identify and report potential intrusion behaviors by real-time monitoring of network traffic, event logs and system activities, and take corresponding response measures.

[0047] Cloud hosts refer to virtual machine instances provided in a cloud computing environment. Cloud hosts are based on virtualization technology, which divides a physical server into multiple independent virtual machines, each of which has its own operating system, computing resources, and storage space.

[0048] The embodiments of the present application can be applied to computing cloud computer products, which rely on computing network to move computing and storage to the cloud, and provide users with new "computers" with ultra-light architecture, ultra-low power consumption, cross-system and cross-terminal services that are ready to use, data will never be lost, and configuration will never be outdated. They have the characteristics of platformization, containerization, and high APRU, and are expected to become the leader in home computing power. One account can be logged in on multiple terminals such as mobile phones, PADs, PCs, set-top boxes, thin terminals, all-in-one machines, etc., to provide customers with mobile office services such as cloud computing and storage, data security, and one-click recovery.

[0049] Cloud host traffic includes east-west traffic and north-south traffic. East-west traffic refers to the data traffic transmitted between cloud hosts. North-south traffic refers to the data traffic transmitted from cloud hosts to external networks (for example, the Internet) or from external networks to cloud hosts.

[0050] like Figure 2 ,3 As shown in the figure, the east-west traffic and north-south traffic of the cloud host are obtained through the switch. The switch imports the cloud host traffic into the NDR through traffic mirroring. The NDR obtains the traffic information of the cloud host traffic, performs statistical analysis on the traffic information, and obtains the distribution information of the cloud host traffic distribution.

[0051] Step 200: Determine at least one traffic feature of the cloud host traffic based on the distribution information, and determine a feature entropy value of the traffic feature;

[0052] Specifically, the traffic characteristics include at least one of the cloud host Internet behavior statistics, the east-west and north-south traffic distribution of the cloud host, the protocol and port distribution in the cloud host traffic, the cloud host malicious file upload statistics, the cloud host illegal external IP distribution statistics and the cloud host illegal IP access distribution statistics.

[0053] As shown in Table 1, each traffic feature corresponds to a feature entropy value. Traffic features represent the statistical characteristics of cloud host traffic in a certain aspect.

[0054] Table 1 Flow characteristics and characteristic entropy values

[0055]

[0056] According to the distribution information of each cloud host, statistics on cloud host Internet access behavior, malicious file uploads by cloud hosts, illegal external IP distribution statistics of cloud hosts, illegal IP access distribution statistics of cloud hosts, protocols and ports in cloud host traffic, east-west and north-south traffic distribution characteristics of cloud hosts are calculated, and the characteristic entropy value of each traffic feature is calculated.

[0057] Step 300: input at least one characteristic entropy value into a flow detection model to obtain abnormal flow output by the flow detection model.

[0058] The traffic detection model is obtained by training the sample feature entropy value and the abnormal traffic label of the sample feature entropy value based on the decision tree model.

[0059] The traffic detection model is a decision tree model, specifically a gradient boosting decision tree (GBDT) model. The GBDT model continuously optimizes the model's prediction ability by iteratively training a weighted version of the decision tree. The GBDT model predicts the target variable through multiple weighted decision trees. In each round of iteration, GBDT trains a new decision tree and updates the sample weights and residuals based on the previous model training results.

[0060] The traffic detection model is used to predict abnormal traffic of the cloud host. All the characteristic entropy values ​​obtained above are input into the traffic detection model, and the traffic detection model automatically identifies abnormal traffic.

[0061] The abnormal traffic detection method provided in the embodiment of the present application obtains the distribution information of the cloud host traffic based on the traffic information of the cloud host traffic, and the distribution information characterizes the distribution state of the cloud host traffic; based on the distribution information, at least one traffic feature of the cloud host traffic is determined, and the characteristic entropy value of the traffic feature is determined; at least one characteristic entropy value is input into the traffic detection model to obtain the abnormal traffic output by the traffic detection model, and the traffic detection model is obtained by training the abnormal traffic labels of the sample characteristic entropy value and the sample characteristic entropy value on the basis of the decision tree model. The embodiment of the present application obtains the traffic characteristics and characteristic entropy values ​​of the cloud host through the distribution information, and accurately extracts the characteristics of the cloud host traffic; according to the characteristic entropy value and the traffic detection model, the abnormal traffic is identified, and the efficiency of identifying abnormal traffic is improved while improving the accuracy of identifying abnormal traffic.

[0062] In one embodiment, the traffic information includes numerical information and category information, the category information includes at least source IP, destination IP, source port, destination port and protocol, and the numerical information includes at least the number and byte count of data packets;

[0063] Based on the traffic information of the cloud host traffic, obtain the distribution information of the cloud host traffic, including:

[0064] Step 110: convert each categorical information into at least one numerical information; or combine the categorical information to obtain combined categorical information, and convert the combined categorical information into at least one numerical information;

[0065] Step 120: Classify and count the numerical information to obtain distribution information, where the distribution information includes characteristic events of cloud host traffic and the characteristic quantity of each characteristic event. The characteristic event represents the characteristics of the cloud host traffic distribution, and the characteristic quantity is the number of times the characteristic event occurs.

[0066] Source IP is the IP address of the device that sends data packets in network communication. Destination IP is the IP address of the target device that receives data packets. Source port is the port number used by the device that sends data packets in network communication, which is used to identify different applications or services running on the device. Destination port is the port number used by the device that receives data packets in network communication. Protocol is a rule or standard used to control and manage data transmission in network communication. It defines the format, transmission method, error detection and other details of data, so that different devices can recognize each other and exchange data effectively. The number of packets refers to the number of packets transmitted in network communication. The number of bytes indicates the storage space occupied by data or the bandwidth occupied during transmission.

[0067] Categorical information refers to a type of feature in a data set, which is represented as discrete, finite values ​​or categories. Categorical information is usually used to describe the type, state, attribute, etc. of things. Numerical features refer to a type of feature in a data set, which is represented as continuous numerical values. Numerical features are usually used to represent quantities, measurements, or measurement results.

[0068] Convert the categorical information in the traffic information into at least one numerical information. Convert the categorical information into numerical features through the categorical gradient boosting algorithm (Categorical Boosting, CatBoost). Use a calculated value to replace the categorical information. Use the average value of each categorical feature as the standard for node classification. Specifically, the formula for converting categorical information into numerical features is:

[0069]

[0070]

[0071] in, is the smoothed estimate of the k-th category information in the ith sample, is the actual calculated value of the j-th category information in the ith sample, Y j is the actual calculated value of the target variable corresponding to the j-th categorical information, a is the smoothing parameter used to control the degree of smoothing, and p is the prior value used to smooth the low-frequency categorical information.

[0072] Optionally, the categorical information is combined to obtain combined categorical information. The combined categorical information is converted into at least one numerical information according to the above method.

[0073] The numerical information is classified and counted to obtain distribution information. The distribution information includes characteristic events of cloud host traffic and the characteristic quantity of each characteristic event. The characteristic event represents the characteristics of cloud host traffic distribution, and the characteristic quantity is the number of times the characteristic event occurs.

[0074] The embodiments of the present application improve the utilization efficiency of categorical information by converting categorical information into numerical information. By combining categorical information and utilizing the connections between categorical information, the information dimension of the categorical information is greatly enriched, and known and unknown network threats can be more comprehensively detected and prevented.

[0075] Based on the above embodiment, at least one traffic feature of the cloud host traffic is determined based on the distribution information, including:

[0076] Step 210: Determine the distribution characteristics of the cloud host traffic based on the characteristic quantity of each characteristic event in the distribution information;

[0077] Step 220: Determine traffic characteristics based on the same type of distribution characteristics.

[0078] For example, the converted source port, destination port, protocol and other information are classified and counted to obtain distribution information, and the protocol distribution feature events, port distribution feature events, and feature quantity of protocol distribution feature events and feature quantity of port distribution feature events in the cloud host traffic are obtained. The traffic features determined based on the protocol distribution feature events, port distribution feature events, feature quantity of protocol distribution feature events and feature quantity of port distribution feature events are the protocol and port distribution in the cloud host traffic.

[0079] The embodiment of the present invention determines traffic characteristics based on characteristic events and characteristic quantities of characteristic events, which is beneficial to improving the efficiency of traffic characteristic analysis.

[0080] Based on the above embodiment, determining the characteristic entropy value based on the distribution information includes:

[0081] Step 220: determining the distribution probability of the characteristic event based on the characteristic quantity of the characteristic event in the distribution information;

[0082] Step 230: Determine a characteristic entropy value based on a distribution probability set of each traffic feature, where the distribution probability set includes multiple distribution probabilities of the traffic feature.

[0083] For the number of all characteristic events of the same traffic feature, the distribution probability of the characteristic event is determined. For example, the distribution probability of characteristic event A in traffic feature B is the ratio of the number of characteristic event A to the number of all characteristic events of traffic feature B.

[0084] The characteristic events of the same type are characteristic events of the same traffic characteristics. Based on the distribution probability of characteristic events of the same traffic characteristics, the characteristic entropy value is determined. The calculation formula of the characteristic entropy value is:

[0085]

[0086] Among them, x i is a characteristic event, p(x i ) is the distribution probability of characteristic events, n is the number of characteristic events of the same type, H(X) is the characteristic entropy value of traffic characteristics, p(x i )logp(x i ) is the information entropy value of the characteristic event.

[0087] For characteristic events with small distribution probability, the larger the information entropy value is. For events with greater probability of occurrence, the smaller the information entropy value is. Sum all the information entropy values ​​of the same traffic feature to get the characteristic entropy value of the traffic feature.

[0088] The embodiment of the present application determines the characteristic entropy value based on the distribution probability, which is helpful to improve the efficiency of traffic characteristic analysis.

[0089] In one embodiment, the traffic detection model is obtained based on the following steps:

[0090] Step 300: Obtain the sample feature entropy value and the abnormal traffic label corresponding to the sample feature entropy value, label the sample feature entropy value based on the abnormal traffic label, and obtain the sample feature entropy value carrying the label;

[0091] Step 400: Divide the characteristic entropy values ​​of the samples carrying labels into a training set and a test set according to a preset ratio;

[0092] Step 500: Train the decision tree model based on the training set, and test the trained decision tree model based on the test set to obtain a traffic detection model.

[0093] Obtain multiple historical cloud host traffics, and determine the sample traffic characteristics, the sample feature entropy values ​​of the sample traffic characteristics, and the abnormal traffic labels based on the historical traffic information of the historical cloud host traffics. Identify the sample feature entropy values ​​based on the abnormal traffic labels to obtain the sample feature entropy values ​​carrying the labels. According to the preset ratio, divide the sample feature entropy values ​​carrying the labels into training samples and test samples. For example, there are 500 training samples corresponding to the sample feature entropy values. The 500 training samples are divided into training sets and test sets according to the preset ratio of 6:4. Train the decision tree model based on the training set, and test the trained decision tree model based on the test set. When the output error of the tested decision tree model is less than the set value, it is determined that the model training is completed and the traffic detection model is obtained.

[0094] The embodiment of the present application obtains abnormal traffic based on a decision tree model, improves the detection efficiency of abnormal traffic, and realizes rapid prediction.

[0095] In one embodiment, after obtaining the abnormal traffic output by the traffic detection model, the method further includes:

[0096] Step 400: Generate alarm information based on abnormal traffic;

[0097] Step 500: Aggregate the alarm information, and generate a security event of the cloud host based on the aggregated alarm information.

[0098] like Figure 2As shown in the figure, for abnormal traffic, alarm information is generated. NDR sends the alarm information to the Security Operations Center (SOC) platform. The SOC platform aggregates the alarm information. When the number of alarm information reaches the set value, safe time is generated. For malicious IP or domain name, disposal instructions are issued, and the IP or domain name is automatically disposed of with one click by linking the secure Domain Name System (DNS) and the egress router / switch.

[0099] Furthermore, based on threat intelligence capabilities, NDR uses an intelligent analysis engine to perform detection and analysis such as characteristic value detection and behavior analysis of cloud computer traffic, abnormal traffic modeling, and attack behavior modeling.

[0100] Furthermore, NDR sends the cloud host traffic identification results and alarm information to the content security management platform. The content security management platform provides intelligent review of rich media messages (including text, pictures, etc.) for cloud computer services, and manages illegal content such as pornography, gambling, and drugs.

[0101] Furthermore, by embedding security scripts in NDR, the analysis and disposal process of typical attack scenarios can be solidified.

[0102] The embodiment of the present application generates security events by aggregating alarm information, which is beneficial to the centralized processing of security risks.

[0103] The abnormal flow detection device provided in the embodiment of the present application is described below. The abnormal flow detection device described below and the abnormal flow detection method described above can be referred to each other. Figure 4 , Figure 4 Schematic diagram of the structure of an abnormal flow detection device provided in an embodiment of the present application. An abnormal flow detection device includes:

[0104] The distribution information acquisition module 401 is used to acquire the distribution information of the cloud host traffic based on the traffic information of the cloud host traffic, wherein the distribution information represents the distribution state of the cloud host traffic;

[0105] A characteristic entropy value acquisition module 402 is used to determine at least one traffic characteristic of the cloud host traffic based on the distribution information, and determine a characteristic entropy value of the traffic characteristic;

[0106] The abnormal traffic identification module 403 is used to input at least one of the characteristic entropy values ​​into the traffic detection model to obtain the abnormal traffic output by the traffic detection model. The traffic detection model is obtained by training the sample characteristic entropy values ​​and the abnormal traffic labels of the sample characteristic entropy values ​​based on the decision tree model.

[0107] The abnormal traffic detection device provided in the embodiment of the present application obtains the distribution information of the cloud host traffic based on the traffic information of the cloud host traffic, and the distribution information characterizes the distribution state of the cloud host traffic; based on the distribution information, at least one traffic feature of the cloud host traffic is determined, and the characteristic entropy value of the traffic feature is determined; at least one characteristic entropy value is input into the traffic detection model to obtain the abnormal traffic output by the traffic detection model, and the traffic detection model is obtained by training the abnormal traffic labels of the sample characteristic entropy value and the sample characteristic entropy value on the basis of the decision tree model. The embodiment of the present application obtains the traffic characteristics and characteristic entropy values ​​of the cloud host through the distribution information, and accurately extracts the characteristics of the cloud host traffic; according to the characteristic entropy value and the traffic detection model, the abnormal traffic is identified, and the efficiency of identifying abnormal traffic is improved while improving the accuracy of identifying abnormal traffic.

[0108] In one embodiment, the traffic characteristics include at least one of the cloud host Internet behavior statistics, the east-west and north-south traffic distribution of the cloud host, the protocol and port distribution in the cloud host traffic, the cloud host malicious file upload statistics, the cloud host illegal external IP distribution statistics and the cloud host illegal IP access distribution statistics.

[0109] In one embodiment, the traffic information includes numerical information and category information, the category information includes at least source IP, destination IP, source port, destination port and protocol, the numerical information includes at least the number of data packets and the number of bytes, and the distribution information acquisition module 401 is used to: convert each category information into at least one numerical information; or, combine the category information to obtain combined category information, and convert the combined category information into at least one numerical information; classify and count the numerical information to obtain distribution information, the distribution information includes characteristic events of cloud host traffic and the characteristic quantity of each characteristic event, the characteristic event characterizes the characteristics of the cloud host traffic distribution, and the characteristic quantity is the number of times the characteristic event occurs.

[0110] In one embodiment, the characteristic entropy value acquisition module 402 is used to: determine the distribution characteristics of the cloud host traffic based on the characteristic quantity of each characteristic event in the distribution information; and determine the traffic characteristics based on the distribution characteristics of the same type.

[0111] In one embodiment, the characteristic entropy value acquisition module 402 is used to: determine the characteristic entropy value based on the distribution information, including: determining the distribution probability of the characteristic event based on the characteristic number of the characteristic event in the distribution information; determine the characteristic entropy value based on the distribution probability set of each traffic feature, and the distribution probability set includes multiple distribution probabilities of the traffic feature.

[0112] In one embodiment, the traffic detection model is obtained based on the following steps: obtaining sample feature entropy values ​​and abnormal traffic labels corresponding to the sample feature entropy values, identifying the sample feature entropy values ​​based on the abnormal traffic labels, and obtaining sample feature entropy values ​​carrying the labels; dividing the sample feature entropy values ​​carrying the labels into a training set and a test set according to a preset ratio; training a decision tree model based on the training set, and testing the trained decision tree model based on the test set to obtain a traffic detection model.

[0113] In one embodiment, the abnormal traffic identification module 403 is further used to: generate alarm information based on the abnormal traffic; aggregate the alarm information, and generate a security event of the cloud host based on the aggregated alarm information.

[0114] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute an abnormal traffic detection method, for example, including:

[0115] Based on the traffic information of the cloud host traffic, the distribution information of the cloud host traffic is obtained, and the distribution information characterizes the distribution state of the cloud host traffic; based on the distribution information, at least one traffic feature of the cloud host traffic is determined, and a characteristic entropy value of the traffic feature is determined; at least one characteristic entropy value is input into a traffic detection model to obtain abnormal traffic output by the traffic detection model, and the traffic detection model is obtained by training sample characteristic entropy values ​​and abnormal traffic labels of the sample characteristic entropy values ​​on the basis of a decision tree model.

[0116] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0117] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the abnormal traffic detection method provided in the above embodiments, for example, including:

[0118] Based on the traffic information of the cloud host traffic, the distribution information of the cloud host traffic is obtained, and the distribution information characterizes the distribution state of the cloud host traffic; based on the distribution information, at least one traffic feature of the cloud host traffic is determined, and a characteristic entropy value of the traffic feature is determined; at least one characteristic entropy value is input into a traffic detection model to obtain abnormal traffic output by the traffic detection model, and the traffic detection model is obtained by training sample characteristic entropy values ​​and abnormal traffic labels of the sample characteristic entropy values ​​on the basis of a decision tree model.

[0119] On the other hand, an embodiment of the present application further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores a computer program, wherein the computer program is used to enable a processor to execute the abnormal traffic detection method provided in the above embodiments, for example, including:

[0120] Based on the traffic information of the cloud host traffic, the distribution information of the cloud host traffic is obtained, and the distribution information characterizes the distribution state of the cloud host traffic; based on the distribution information, at least one traffic feature of the cloud host traffic is determined, and a characteristic entropy value of the traffic feature is determined; at least one characteristic entropy value is input into a traffic detection model to obtain abnormal traffic output by the traffic detection model, and the traffic detection model is obtained by training sample characteristic entropy values ​​and abnormal traffic labels of the sample characteristic entropy values ​​on the basis of a decision tree model.

[0121] The non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.

[0122] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting abnormal traffic, characterized in that: include: Based on the traffic information of the cloud host traffic, obtaining distribution information of the cloud host traffic, wherein the distribution information represents a distribution state of the cloud host traffic; Based on the distribution information, determining at least one traffic feature of the cloud host traffic, and determining a feature entropy value of the traffic feature; At least one of the characteristic entropy values ​​is input into a traffic detection model to obtain abnormal traffic output by the traffic detection model. The traffic detection model is obtained by training sample characteristic entropy values ​​and abnormal traffic labels of the sample characteristic entropy values ​​based on a decision tree model.

2. The abnormal flow detection method according to claim 1, characterized in that: The traffic characteristics include at least one of the cloud host Internet behavior statistics, the east-west and north-south traffic distribution of the cloud host, the protocol and port distribution in the cloud host traffic, the cloud host malicious file upload statistics, the cloud host illegal external IP distribution statistics and the cloud host illegal IP access distribution statistics.

3. The abnormal flow detection method according to claim 1, characterized in that: The traffic information includes numerical information and category information, the category information includes at least source IP, destination IP, source port, destination port and protocol, and the numerical information includes at least the number and byte count of data packets; The obtaining of distribution information of the cloud host traffic based on the traffic information of the cloud host traffic includes: Convert each of the categorical information into at least one of the numerical information; Alternatively, the categorical information is combined to obtain combined categorical information, and the combined categorical information is converted into at least one of the numerical information; The numerical information is classified and counted to obtain the distribution information, wherein the distribution information includes characteristic events of the cloud host traffic and the characteristic quantity of each characteristic event, wherein the characteristic event characterizes the characteristics of the cloud host traffic distribution, and the characteristic quantity is the number of times the characteristic event occurs.

4. The abnormal flow detection method according to claim 3, characterized in that: The determining, based on the distribution information, at least one traffic characteristic of the cloud host traffic includes: Determining the distribution characteristics of the cloud host traffic based on the characteristic quantity of each characteristic event in the distribution information; Based on the distribution characteristics of the same type, the flow characteristics are determined.

5. The abnormal flow detection method according to claim 3, characterized in that: Determining the characteristic entropy value based on the distribution information includes: Determining a distribution probability of the characteristic event based on the characteristic quantity of the characteristic event in the distribution information; The characteristic entropy value is determined based on a distribution probability set of each of the traffic characteristics, wherein the distribution probability set includes a plurality of the distribution probabilities of the traffic characteristics.

6. The abnormal flow detection method according to claim 1, characterized in that: The flow detection model is obtained based on the following steps: Acquire the sample feature entropy value and an abnormal traffic label corresponding to the sample feature entropy value, label the sample feature entropy value based on the abnormal traffic label, and obtain the sample feature entropy value carrying the label; According to a preset ratio, the characteristic entropy values ​​of the sample carrying the label are divided into a training set and a test set; The decision tree model is trained based on the training set, and the trained decision tree model is tested based on the test set to obtain the traffic detection model.

7. The abnormal flow detection method according to claim 1, characterized in that: After obtaining the abnormal traffic output by the traffic detection model, the method further includes: Based on the abnormal traffic, generate alarm information; The alarm information is aggregated, and based on the aggregated alarm information, a security event of the cloud host is generated.

8. An abnormal flow detection device, characterized in that: include: A distribution information acquisition module, used to acquire distribution information of the cloud host traffic based on the traffic information of the cloud host traffic, wherein the distribution information represents the distribution state of the cloud host traffic; A characteristic entropy value acquisition module, used to determine at least one traffic characteristic of the cloud host traffic based on the distribution information, and determine a characteristic entropy value of the traffic characteristic; The abnormal traffic identification module is used to input at least one of the characteristic entropy values ​​into a traffic detection model to obtain the abnormal traffic output by the traffic detection model. The traffic detection model is obtained by training the sample characteristic entropy values ​​and the abnormal traffic labels of the sample characteristic entropy values ​​based on the decision tree model.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the abnormal traffic detection method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the abnormal traffic detection method according to any one of claims 1 to 7 is implemented.