Traffic-based distributed denial of service attack detection method, device and medium

By calculating the weight coefficient of the real-time and historical traffic data of the target business, the problem of insufficient timeliness of DDoS attack judgment in the existing technology is solved, and more accurate attack judgment is achieved.

CN115865493BActive Publication Date: 2024-10-22NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211524298.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2024-10-22
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

Existing DDoS attack judgment technology relies on a single threshold setting, which is not timely enough and cannot accurately determine whether it is under a DDoS attack.

Method used

By obtaining the real-time traffic data and historical benchmark traffic data of the target business, calculate the weight coefficient, and determine whether there is a DDoS attack based on the weight coefficient and threshold.

Benefits of technology

It improves the accuracy and timeliness of DDoS attack judgment, provides a more accurate basis for judgment, and reduces false positives and missed detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865493B_ABST
    Figure CN115865493B_ABST
Patent Text Reader

Abstract

The present application discloses a distributed denial of service attack detection method, device and medium based on traffic, the method comprising: obtaining real-time traffic data of a target business in a corresponding time window in a current statistical period; obtaining historical benchmark traffic data of a target business in a corresponding time window in a historical statistical period; determining a weight coefficient in a corresponding time window in the current statistical period according to the real-time traffic data and the historical benchmark traffic data; determining a detection result for a distributed denial of service attack based on the weight coefficient and a corresponding weight coefficient threshold. The present application obtains a weight coefficient in a corresponding time window in the current statistical period by comparing the real-time traffic data with the historical benchmark traffic data in the corresponding time window, and determines whether a DDoS attack has occurred based on a comparison of the weight coefficient with the weight coefficient threshold, which can improve the timeliness of the historical benchmark traffic data, provide an accurate basis for judgment, and thus improve the accuracy of DDoS attack judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer network technology, and in particular to a flow-based distributed denial of service attack detection method, device and medium. Background Art

[0002] Distributed Denial of Service (DDoS) is an increasingly common network attack method. Attackers use botnets composed of computers distributed in different locations to launch a large amount of attack messages to the target server in a short period of time, causing network congestion, which makes the server unable to respond to normal business access traffic.

[0003] The most common DDoS detection technology is the threshold comparison method. The threshold comparison method is implemented by the operation and maintenance personnel setting thresholds for various types of message statistics. The DDoS detection system compares the real-time statistics with the pre-set thresholds. If the threshold is exceeded, it is considered to be under attack. However, a single threshold setting is not timely enough and cannot accurately determine whether it is under DDoS attack. Summary of the invention

[0004] The embodiments of the present application provide a traffic-based distributed denial of service attack detection method, device and medium, which can improve the timeliness of historical benchmark traffic data to provide accurate judgment basis, thereby improving the accuracy of DDoS attack judgment.

[0005] On the one hand, an embodiment of the present application provides a traffic-based distributed denial of service attack detection method, the method comprising:

[0006] Obtain the real-time traffic data of the target business in the corresponding time window within the current statistical period;

[0007] Obtaining historical benchmark traffic data of the target service in a corresponding time window within a historical statistical period;

[0008] Determine the weight coefficient in the corresponding time window within the current statistical period according to the real-time traffic data and the historical benchmark traffic data;

[0009] A detection result for the distributed denial of service attack is determined based on the weight coefficient and a corresponding weight coefficient threshold.

[0010] In some embodiments, the obtaining of historical benchmark traffic data of the target service in a corresponding time window within a historical statistical period includes:

[0011] Obtain historical traffic statistics of the target service within a target historical period;

[0012] A plurality of historical benchmark flow data are generated according to the historical flow statistical data.

[0013] In some embodiments, the plurality of historical benchmark flow data include first historical benchmark flow data, second historical benchmark flow data, and third historical benchmark flow data;

[0014] In the same time window, the value of the first historical benchmark flow data is smaller than the value of the second historical benchmark flow data, and the value of the second historical benchmark flow data is smaller than the value of the third historical benchmark flow data.

[0015] In some embodiments, the generating a plurality of historical benchmark traffic data according to the historical traffic statistical data includes:

[0016] Dividing the target historical period into a plurality of historical statistical periods, and dividing each of the historical statistical periods into a plurality of time windows;

[0017] For each of the time windows, obtain historical traffic statistics data in the same time window in the multiple historical statistical periods to obtain a historical traffic statistics data set in the same time window;

[0018] Determine the value of the first historical benchmark flow data in each time window according to the historical flow statistics data set in the same time window;

[0019] According to the value of the first historical reference flow data in each time window, the value of the second historical reference flow data and the value of the third historical reference flow data in each time window are determined.

[0020] In some embodiments, determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window includes:

[0021] For each of the time windows, the value of the first historical reference flow data in each of the time windows is determined according to the average value of the historical flow statistics data set in the same time window.

[0022] In some embodiments, determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window includes:

[0023] For each of the time windows, curve fitting is performed on the historical traffic statistics data set in the same time window to determine the value of the first historical benchmark traffic data in each of the time windows.

[0024] In some embodiments, determining the value of the second historical reference flow data and the value of the third historical reference flow data in each time window according to the value of the first historical reference flow data in each time window includes:

[0025] Determine the value of the second historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the first multiple;

[0026] Determine the value of the third historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the second multiple;

[0027] The first multiple is smaller than the second multiple, and both the first multiple and the second multiple are greater than 1.

[0028] In some embodiments, determining the weight coefficient in the corresponding time window in the current statistical period according to the real-time traffic data and the historical benchmark traffic data includes:

[0029] Determine the weight of each sampling time point in the corresponding time window in the current statistical period according to the real-time traffic data corresponding to each sampling time point in the current statistical period and the value of each of the historical benchmark traffic data in the corresponding time window to which each sampling time point in the current statistical period belongs;

[0030] According to the weight of each sampling time point in the corresponding time window in the current statistical period, a weight coefficient of each sampling time point in the corresponding time window in the current statistical period is determined.

[0031] In some embodiments, determining the weight coefficient of each sampling time point in the corresponding time window in the current statistical period according to the weight of each sampling time point in the corresponding time window in the current statistical period includes:

[0032] According to the sum of the weights of N sampling time points in the corresponding time window in the current statistical period, the weight coefficient of the target sampling time point in the corresponding time window in the current statistical period is determined, the N sampling time points include the target sampling time point and N-1 adjacent sampling time points before the target sampling time point, N is a natural number greater than 1; the target sampling time point is any sampling time point in the current statistical period.

[0033] In some embodiments, determining the detection result for the distributed denial of service attack based on the weight coefficient and the corresponding weight coefficient threshold includes:

[0034] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period reaches the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period; or

[0035] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period does not reach the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business has not been attacked by the distributed denial of service at the target sampling time point within the current detection period.

[0036] In some embodiments, the method further includes: if it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period, generating a warning message.

[0037] In some embodiments, the historical traffic statistics data does not include DDoS attack traffic.

[0038] On the other hand, an embodiment of the present application provides a traffic-based distributed denial of service attack detection device, the device comprising:

[0039] The first acquisition unit is used to acquire the real-time traffic data of the target service in the corresponding time window in the current statistical period;

[0040] A second acquisition unit is used to acquire the historical benchmark traffic data of the target service in a corresponding time window within a historical statistical period;

[0041] A determination unit, configured to determine a weight coefficient in a corresponding time window within a current statistical period according to the real-time traffic data and the historical benchmark traffic data;

[0042] A detection unit is used to determine a detection result for the distributed denial of service attack based on the weight coefficient and a corresponding weight coefficient threshold.

[0043] In some embodiments, the second acquiring unit is used to:

[0044] Obtain historical traffic statistics of the target service within a target historical period;

[0045] A plurality of historical benchmark flow data are generated according to the historical flow statistical data.

[0046] In some embodiments, the plurality of historical benchmark flow data include first historical benchmark flow data, second historical benchmark flow data, and third historical benchmark flow data;

[0047] In the same time window, the value of the first historical benchmark flow data is smaller than the value of the second historical benchmark flow data, and the value of the second historical benchmark flow data is smaller than the value of the third historical benchmark flow data.

[0048] In some embodiments, when the second acquisition unit generates a plurality of historical benchmark traffic data according to the historical traffic statistical data, it is used to:

[0049] Dividing the target historical period into a plurality of historical statistical periods, and dividing each of the historical statistical periods into a plurality of time windows;

[0050] For each of the time windows, obtain historical traffic statistics data in the same time window in the multiple historical statistical periods to obtain a historical traffic statistics data set in the same time window;

[0051] Determine the value of the first historical benchmark flow data in each time window according to the historical flow statistics data set in the same time window;

[0052] According to the value of the first historical reference flow data in each time window, the value of the second historical reference flow data and the value of the third historical reference flow data in each time window are determined.

[0053] In some embodiments, when determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window, the second acquisition unit is used to:

[0054] For each of the time windows, the value of the first historical reference flow data in each of the time windows is determined according to the average value of the historical flow statistics data set in the same time window.

[0055] In some embodiments, when determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window, the second acquisition unit is used to:

[0056] For each of the time windows, curve fitting is performed on the historical traffic statistics data set in the same time window to determine the value of the first historical benchmark traffic data in each of the time windows.

[0057] In some embodiments, when the second acquisition unit determines the value of the second historical reference flow data and the value of the third historical reference flow data in each time window according to the value of the first historical reference flow data in each time window, it is used to:

[0058] Determine the value of the second historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the first multiple;

[0059] Determine the value of the third historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the second multiple;

[0060] The first multiple is smaller than the second multiple, and both the first multiple and the second multiple are greater than 1.

[0061] In some embodiments, the determining unit is configured to:

[0062] Determine the weight of each sampling time point in the corresponding time window in the current statistical period according to the real-time traffic data corresponding to each sampling time point in the current statistical period and the value of each of the historical benchmark traffic data in the corresponding time window to which each sampling time point in the current statistical period belongs;

[0063] According to the weight of each sampling time point in the corresponding time window in the current statistical period, a weight coefficient of each sampling time point in the corresponding time window in the current statistical period is determined.

[0064] In some embodiments, when the determination unit determines the weight coefficient of each sampling time point in the corresponding time window in the current statistical period according to the weight of each sampling time point in the corresponding time window in the current statistical period, it is used to:

[0065] According to the sum of the weights of N sampling time points in the corresponding time window in the current statistical period, the weight coefficient of the target sampling time point in the corresponding time window in the current statistical period is determined, the N sampling time points include the target sampling time point and N-1 adjacent sampling time points before the target sampling time point, N is a natural number greater than 1; the target sampling time point is any sampling time point in the current statistical period.

[0066] In some embodiments, the detection unit is used to:

[0067] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period reaches the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period; or

[0068] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period does not reach the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business has not been attacked by the distributed denial of service at the target sampling time point within the current detection period.

[0069] In some embodiments, the apparatus further comprises:

[0070] The early warning unit is configured to generate an early warning message if it is determined that the detection result of the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period.

[0071] In some embodiments, the historical traffic statistics data does not include DDoS attack traffic.

[0072] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for loading by a processor to execute the traffic-based distributed denial of service attack detection method as described in any of the above embodiments.

[0073] On the other hand, an embodiment of the present application provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor calls the computer program stored in the memory to execute the traffic-based distributed denial of service attack detection method as described in any of the above embodiments.

[0074] On the other hand, an embodiment of the present application provides a computer program product, including computer instructions, which, when executed by a processor, implement the traffic-based distributed denial of service attack detection method as described in any of the above embodiments.

[0075] The embodiment of the present application obtains the real-time traffic data of the target business in the corresponding time window in the current statistical period; obtains the historical benchmark traffic data of the target business in the corresponding time window in the historical statistical period; determines the weight coefficient in the corresponding time window in the current statistical period according to the real-time traffic data and the historical benchmark traffic data; and determines the detection result for the distributed denial of service attack based on the weight coefficient and the corresponding weight coefficient threshold. The embodiment of the present application obtains the weight coefficient in the corresponding time window in the current statistical period by comparing the real-time traffic data with the historical benchmark traffic data in the corresponding time window, and judges whether a DDoS attack occurs based on the comparison of the weight coefficient with the weight coefficient threshold, which can improve the timeliness of the historical benchmark traffic data, provide an accurate basis for judgment, and thus improve the accuracy of DDoS attack judgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 A flow chart of a flow-based distributed denial of service attack detection method provided in an embodiment of the present application.

[0077] Figure 2 A schematic diagram of a first application scenario of a traffic-based distributed denial of service attack detection method provided in an embodiment of the present application.

[0078] Figure 3 A schematic diagram of a second application scenario of the traffic-based distributed denial of service attack detection method provided in an embodiment of the present application.

[0079] Figure 4 A schematic diagram of a third application scenario of the flow-based distributed denial of service attack detection method provided in an embodiment of the present application.

[0080] Figure 5 A schematic diagram of the structure of a traffic-based distributed denial of service attack detection device provided in an embodiment of the present application.

[0081] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0082] Figure 7 A schematic diagram of a storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] 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 only 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 this application.

[0084] The embodiments of the present application provide a method, device and medium for detecting distributed denial of service attacks based on traffic. Specifically, the method for detecting distributed denial of service attacks based on traffic of the embodiments of the present application can be performed by a computer device, wherein the computer device can be a terminal or a server or other device. The terminal can be a smart phone, a tablet computer, a laptop computer, a smart TV, a smart speaker, a wearable smart device, a smart car terminal or other devices, and the terminal can also include a client, which can be a video client, a browser client, an instant messaging client or a small program, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The embodiments of the present application can be applied to application scenarios such as network security.

[0085] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.

[0086] Each embodiment of the present application provides a flow-based distributed denial of service attack detection method, which can be executed by a terminal or a server, or by a terminal and a server together; the embodiments of the present application illustrate the flow-based distributed denial of service attack detection method executed by a server as an example.

[0087] See also Figures 1 to 4 , Figure 1 A flow chart of a distributed denial of service attack detection method based on traffic provided in an embodiment of the present application, Figures 2 to 4 A schematic diagram of an application scenario of a traffic-based distributed denial of service attack detection method provided in an embodiment of the present application. The method may include the following steps 110 to 140:

[0088] Step 110: Acquire real-time traffic data of the target service in a corresponding time window within the current statistical period.

[0089] For example, the target service may be any task involved in an Internet Data Center (IDC) computer room, and the target service may have a unique Internet Protocol (IP) address.

[0090] For example, the current statistical period can be any one of an hour, a day, a week, a month, a quarter, or a year. For example, the current statistical period is set to one day (24 hours), and the 24 hours of a day are divided into several time windows, such as a day is divided into 24 time windows, and the duration of each time window is 1 hour. For example, 00:00-01:00 corresponds to the first time window, 01:00-02:00 corresponds to the second time window, and so on, 07:00-08:00 corresponds to the eighth time window, 08:00-09:00 corresponds to the ninth time window, 09:00-10:00 corresponds to the tenth time window, 23:00-00:00 corresponds to the 24th time window, and so on.

[0091] For example, real-time traffic data is the traffic data collected in real time at each sampling time point in the current statistical period. For example, since the network traffic of most target services changes over time, in order to timely detect whether a DDoS attack has occurred, the current statistical period can be divided into multiple detection periods, and the units of the multiple detection periods can be in seconds, such as each detection period is one of 10 seconds, 15 seconds, 20 seconds, 25 seconds, 30 seconds, etc. The corresponding time window to which each sampling time point in the current statistical period belongs can be determined according to the current time period to which each sampling time point in the current statistical period belongs.

[0092] For example, if the detection cycle is 20 seconds, and the current time period to which the N sampling time points in the current detection cycle belong is from 9:30:20 a.m. to 9:30:40 a.m., then based on the current time period to which the N sampling time points in the current detection cycle belong, it is determined that the corresponding time window to which each sampling time point in the current detection cycle belongs is the 10th time window.

[0093] For example, the real-time traffic data may include multiple process components, and the traffic components may include but are not limited to bit rate (Bytes Per Second, BPS), packet forwarding rate (Packet Per Second, PPS), User Datagram Protocol (User Datagram Protocol, UDP) traffic, Internet Control Message Protocol (Internet Control Message Protocol, ICMP) traffic, Synchronize Sequence Numbers (Synchronize Sequence Numbers, SYN) traffic, Acknowledge character (Acknowledge character, ACK) traffic, Hypertext Transfer Protocol (HyperText Transfer Protocol, HTTP) request traffic, Hypertext Transfer Protocol response traffic, Domain Name System (Domain Name System, DNS) traffic, etc.

[0094] Step 120: Obtain historical benchmark traffic data of the target service in a corresponding time window within a historical statistical period.

[0095] For example, the historical benchmark traffic data may include several historical benchmark traffic data.

[0096] The most common DDoS judgment technology at present is the threshold comparison method. The implementation method of the threshold comparison method is that the operation and maintenance personnel set thresholds for various types of message statistics. The DDoS detection system compares the real-time statistics with the pre-set thresholds. If the threshold is exceeded, it is considered to be under attack. However, a single threshold setting is not timely enough and cannot accurately determine whether it is under DDoS attack. Among them, for various types of services, the type and size of the messages in the network traffic data usually change over time, so higher requirements are placed on the setting of thresholds. If the threshold is set too high, some attack traffic will not be identified, resulting in an increase in the system's missed detection rate. If the threshold is set too low, it will increase false alarms. Therefore, a single threshold setting has not been able to solve the problem of accurately and effectively reporting DDoS attacks. In addition, the effective threshold set at a certain moment will become an invalid threshold as time passes, and a single threshold setting cannot track the traffic trend changes presented by the service IP over time. Therefore, several historical benchmark traffic data can be set as the threshold of the above threshold comparison method to provide an accurate basis for judging DDoS attacks.

[0097] In some embodiments, the obtaining of historical benchmark traffic data of the target service in a corresponding time window within a historical statistical period includes:

[0098] Obtain historical traffic statistics of the target service within a target historical period;

[0099] A plurality of historical benchmark flow data are generated according to the historical flow statistical data.

[0100] For example, since network traffic usually shows periodic changes within a day according to the user's surfing habits, for example, 10 am and 8 pm every day are usually the peak access times for website services. Therefore, the embodiment of the present application can divide the 24 hours of a day into several time windows, such as dividing a day into 24 time windows, each time window lasting 1 hour. Each time window generates several historical benchmark traffic data based on the historical traffic statistics data of the target business in the target historical period.

[0101] For example, the target historical period may be any one of the historical periods such as the most recent day, the most recent week, the most recent month, the most recent quarter, or the most recent year in the past.

[0102] In some embodiments, the historical traffic statistics data does not include DDoS attack traffic.

[0103] For example, in order to provide a more accurate basis for judgment, the historical traffic statistics data used to determine the historical benchmark traffic data may all be normal network traffic, that is, the historical traffic statistics data do not include DDoS attack traffic.

[0104] In some embodiments, the plurality of historical benchmark flow data include first historical benchmark flow data, second historical benchmark flow data, and third historical benchmark flow data;

[0105] In the same time window, the value of the first historical benchmark flow data is smaller than the value of the second historical benchmark flow data, and the value of the second historical benchmark flow data is smaller than the value of the third historical benchmark flow data.

[0106] In some embodiments, the generating a plurality of historical benchmark traffic data according to the historical traffic statistical data includes:

[0107] Dividing the target historical period into a plurality of historical statistical periods, and dividing each of the historical statistical periods into a plurality of time windows;

[0108] For each of the time windows, obtain historical traffic statistics data in the same time window in the multiple historical statistical periods to obtain a historical traffic statistics data set in the same time window;

[0109] Determine the value of the first historical benchmark flow data in each time window according to the historical flow statistics data set in the same time window;

[0110] According to the value of the first historical reference flow data in each time window, the value of the second historical reference flow data and the value of the third historical reference flow data in each time window are determined.

[0111] For example, Figure 2As shown, several historical benchmark traffic data include first historical benchmark traffic data, second historical benchmark traffic data and third historical benchmark traffic data. The black reference line at the bottom of the figure is the first historical benchmark traffic data calculated based on historical traffic statistics; the dark gray reference line in the middle is the second historical benchmark traffic data generated by shifting upward based on the first historical benchmark traffic data; the light gray reference line at the top is the third historical benchmark traffic data generated by shifting upward based on the first historical benchmark traffic data. Among them, the number of historical benchmark traffic data can be configured according to different response methods, and the first historical benchmark traffic data, the second historical benchmark traffic data and the third historical benchmark traffic data set here are only described as an implementation method.

[0112] In some embodiments, determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window includes:

[0113] For each of the time windows, the value of the first historical reference flow data in each of the time windows is determined according to the average value of the historical flow statistics data set in the same time window.

[0114] For example, for each time window, the value of the first historical benchmark traffic data in each time window can be determined according to the average value of the historical traffic statistics data set in the same time window. For example, if the target historical period is the most recent week in the past and the historical statistics cycle is 1 day, then there are 7 historical statistics cycles in the target historical period; for example, each historical statistics cycle is divided into 24 time windows. For example, for the value of the first historical benchmark traffic data in the 8th time window, the value of the first historical benchmark traffic data in the 8th time window can be determined by calculating the average value of the historical traffic statistics data set based on the historical traffic statistics data set composed of the historical traffic statistics data in each 8th time window in the 7 historical statistics cycles in the target historical period.

[0115] In some embodiments, determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window includes:

[0116] For each of the time windows, curve fitting is performed on the historical traffic statistics data set in the same time window to determine the value of the first historical benchmark traffic data in each of the time windows.

[0117] For example, if the target historical period is the most recent week in the past and the historical statistical cycle is 1 day, then there are 7 historical statistical cycles in the target historical period; for example, each historical statistical cycle is divided into 24 time windows. For example, for the value of the first historical benchmark traffic data in the 8th time window, a curve fitting can be performed based on the historical traffic statistical data set composed of the historical traffic statistical data in each 8th time window in the 7 historical statistical cycles in the target historical period, so as to predict the expected value of the 8th time window as the value of the first historical benchmark traffic data in the 8th time window.

[0118] In some embodiments, determining the value of the second historical reference flow data and the value of the third historical reference flow data in each time window according to the value of the first historical reference flow data in each time window includes:

[0119] Determine the value of the second historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the first multiple;

[0120] Determine the value of the third historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the second multiple;

[0121] The first multiple is smaller than the second multiple, and both the first multiple and the second multiple are greater than 1.

[0122] For example, the value of the second historical benchmark flow data and the value of the third historical benchmark flow data in the corresponding time window can be determined based on the upward offset of the value of the first historical benchmark flow data in each time window. For example, the first multiple is 1.5 times, and the second multiple is 2 times. Then, based on the product of the value of the first historical benchmark flow data in each time window and the first multiple, it is determined that the value of the second historical benchmark flow data in each time window is 1.5 times the value of the first historical benchmark flow data. Based on the product of the value of the first historical benchmark flow data in each time window and the second multiple, it is determined that the value of the third historical benchmark flow data in each time window is twice the value of the first historical benchmark flow data.

[0123] Due to the real-time calculation and continuous updating of the historical benchmark traffic data, it is possible to ensure that the judgment basis of the embodiment of the present application changes with business changes, and will not have the defect of insufficient timeliness like single historical benchmark traffic data.

[0124] Since the network traffic of most services varies with time, it shows obvious periodic changes in a 24-hour cycle. Therefore, the setting of the historical benchmark traffic data of the time window divided in the embodiment of the present application can effectively fit the characteristics of periodic changes and provide accurate judgment basis.

[0125] Step 130: Determine a weight coefficient in a corresponding time window within a current statistical period according to the real-time traffic data and the historical benchmark traffic data.

[0126] In some embodiments, determining the weight coefficient in the corresponding time window in the current statistical period according to the real-time traffic data and the historical benchmark traffic data includes:

[0127] Determine the weight of each sampling time point in the corresponding time window in the current statistical period according to the real-time traffic data corresponding to each sampling time point in the current statistical period and the value of each of the historical benchmark traffic data in the corresponding time window to which each sampling time point in the current statistical period belongs;

[0128] According to the weight of each sampling time point in the corresponding time window in the current statistical period, a weight coefficient of each sampling time point in the corresponding time window in the current statistical period is determined.

[0129] For example, the real-time traffic data x at each sampling time point is compared with the values ​​of the historical benchmark traffic data in the time window to which each sampling time point belongs. The values ​​corresponding to the points falling in different value intervals represent different weights. The weight of each sampling time point in the corresponding time window in the current statistical period can be expressed as formula f(x, t):

[0130]

[0131] Among them, the value of the first historical benchmark flow data corresponding to a certain sampling time point t is expressed as a t , the value of the second historical benchmark flow data is expressed as b t , the value of the third historical benchmark flow data is expressed as c t .

[0132] After determining the weight f(x, t) of each sampling time point in the corresponding time window in the current statistical period, the weight coefficient of each sampling time point in the corresponding time window in the current statistical period can be determined according to the weight of each sampling time point in the corresponding time window in the current statistical period.

[0133] In some embodiments, determining the weight coefficient of each sampling time point in the corresponding time window in the current statistical period according to the weight of each sampling time point in the corresponding time window in the current statistical period includes:

[0134] According to the sum of the weights of N sampling time points in the corresponding time window in the current statistical period, the weight coefficient of the target sampling time point in the corresponding time window in the current statistical period is determined, the N sampling time points include the target sampling time point and N-1 adjacent sampling time points before the target sampling time point, N is a natural number greater than 1; the target sampling time point is any sampling time point in the current statistical period.

[0135] In some embodiments, the method further comprises:

[0136] Dividing the current statistical period into multiple detection periods;

[0137] Determine the value of N according to the ratio of each detection period to the sampling period;

[0138] According to the current time period to which the sampling time point belongs, the corresponding time window to which the sampling time point belongs is determined.

[0139] For example, the current statistical period can be any one of an hour, a day, a week, a month, a quarter, a year, etc. For example, the current statistical period is set to one day (24 hours), and the 24 hours in a day are divided into several time windows, such as dividing a day into 24 time windows, and the duration of each time window is 1 hour.

[0140] For example, real-time traffic data is the traffic data collected in real time at each sampling time point in the current statistical period. For example, since the network traffic of most target services changes over time, in order to detect whether a DDoS attack is timely, the current statistical period can be divided into multiple detection periods, and the units of the multiple detection periods can be in seconds, for example, each detection period is one of 20 seconds, 25 seconds, 30 seconds, etc. The corresponding time window to which each sampling time point in the current statistical period belongs can be determined based on the current time period to which each sampling time point in the current statistical period belongs. Then, the weight coefficient of the target sampling time point is determined based on the sum of the weights of the N sampling time points in each detection period.

[0141] For example, after determining the weight f(x, t) of each sampling time point in the corresponding time window in the current statistical period, the weights of the N sampling time points in the corresponding time window in the current statistical period are accumulated to obtain the weight coefficient sum of the target sampling time point in the corresponding time window in the current statistical period. now :

[0142]

[0143] Among them, t now represents the target sampling time point, t now-period Indicates the adjacent sampling time point before the target sampling time point in the detection period. If the weight coefficient sum of the target sampling time point in the corresponding time window in the current statistical period now Reach a certain weight coefficient threshold sum threshold , it is considered that the target is under DDoS attack at the sampling time point in the current detection cycle.

[0144] Since the weight coefficient of the target sampling time point is determined by the sum of the weights of the N sampling time points in each detection cycle, the traffic "spike" caused by network noise can be effectively smoothed without affecting the judgment of normal DDoS attacks. In addition, the weight accumulation model of the embodiment of the present application has made some simplifications in some processes to be close to computer operations, thereby improving the computing efficiency of the computer.

[0145] Step 140: Determine a detection result for the distributed denial of service attack based on the weight coefficient and a corresponding weight coefficient threshold.

[0146] In some embodiments, determining the detection result for the distributed denial of service attack based on the weight coefficient and the corresponding weight coefficient threshold includes:

[0147] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period reaches the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period; or

[0148] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period does not reach the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business has not been attacked by the distributed denial of service at the target sampling time point within the current detection period.

[0149] For example, Figure 3 As shown, for example, if the sampling period is 5 seconds and the detection period is 20 seconds, then N is 4, that is, there are 4 sampling time points in each detection period. threshold is 3. For example, Figure 3The current time period from the first sampling time point to the fifth sampling time point in the data is 00:00:00 to 00:00:25, and the corresponding time window from the first sampling time point to the fifth sampling time point is determined to be the first time window. For example, the weight of the first sampling time point is f(x,5), the weight of the second sampling time point is f(x,10), the weight of the third sampling time point is f(x,15), the weight of the fourth sampling time point is f(x,20), and so on, the weight of each sampling time point can be determined.

[0150] For example, refer to Figure 3 , when calculating the weight coefficient of the 4th sampling time point, sum 20 =f(x,5)+f(x,10)+f(x,15)+f(x,20)=0+0.5+0.8+1=2.3<sum threshold , it is considered that there is no DDoS attack at the 4th sampling time point. When calculating the weight coefficient at the 5th sampling time point, sum 25 =f(x,10)+f(x,15)+f(x,20)+f(x,25)=0.5+0.8+1+1=3.3>sum threshold , it is considered that the network is under DDoS attack at the 5th sampling time point.

[0151] like Figure 4 As shown in the figure, network traffic usually has a short-term surge in traffic during transmission, and then falls back. It appears as a "spurt" in the traffic trend chart. The cause of these "spurts" may be a short-term congestion of a node in the network or network noise, rather than DDoS attack traffic. In this case, a single threshold setting cannot effectively distinguish it from DDoS attack traffic.

[0152] For example, Figure 4 As shown, for example, if the sampling period is 5 seconds and the detection period is 20 seconds, then N is 4, that is, there are 4 sampling time points in each detection period. threshold is 3. The corresponding time windows from the 1st sampling time point to the 11th sampling time point are all the 1st time window. For example, the weight of the first sampling time point is f(x,5), the weight of the second sampling time point is f(x,10), the weight of the third sampling time point is f(x,15), the weight of the fourth sampling time point is f(x,20), and so on. The weight of each sampling time point can be determined.

[0153] For example, refer to Figure 4 In the embodiment of the present application, when calculating the weight coefficient of the 7th sampling time point, sum35 =f(x,20)+f(x,25)+f(x,30)+f(x,35)=0+0+0+1=1<sum threshold , it is considered that there is no DDoS attack at the 7th sampling time point. When calculating the weight coefficient at the 8th sampling time point, sum 40 =f(x,25)+f(x,30)+f(x,35)+f(x,40)=0+0+1+0=1<sum threshold , it is considered that there is no DDoS attack at the 8th sampling time point. When calculating the weight coefficient at the 9th sampling time point, sum 45 =f(x,30)+f(x,35)+f(x,40)+f(x,45)=

[0154] 0+1+0+0=1<sum threshold , it is considered that there is no DDoS attack at the 9th sampling time point. When calculating the weight coefficient at the 10th sampling time point, sum 50 =f(x,35)+f(x,40)+f(x,45)+f(x,50)=1+0+0+0=1<sum threshold , it is considered that there is no DDoS attack at the 10th sampling time point. Figure 4 The traffic "spurt" situation is simulated. During the DDos detection process, from the weight coefficients of the 7th sampling time point to the 10th sampling time point, it can be seen that the weight coefficient of no sampling time point exceeds the weight coefficient threshold sum threshold Therefore, the embodiments of the present application can effectively avoid the misjudgment of DDoS attack caused by traffic noise.

[0155] In some embodiments, the method further includes: if it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period, generating a warning message.

[0156] For example, if it is determined that the target service is under DDoS attack at the target sampling time point in the current detection cycle, an early warning message is generated, and the early warning information is used to warn the target service that the target service is under DDoS attack at the target sampling time point in the current detection cycle. For example, the early warning information can also be visualized, such as displaying the target service information and the target sampling time point corresponding to the warning information on the display screen, so that relevant personnel can perform data analysis, check business risks, etc., so that relevant personnel can take effective measures to prevent DDoS attacks and quickly restore the normal operation of the target service in a timely manner.

[0157] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0158] The embodiment of the present application obtains the real-time traffic data of the target business in the corresponding time window in the current statistical period; obtains the historical benchmark traffic data of the target business in the corresponding time window in the historical statistical period; determines the weight coefficient in the corresponding time window in the current statistical period according to the real-time traffic data and the historical benchmark traffic data; and determines the detection result for the distributed denial of service attack based on the weight coefficient and the corresponding weight coefficient threshold. The embodiment of the present application obtains the weight coefficient in the corresponding time window in the current statistical period by comparing the real-time traffic data with the historical benchmark traffic data in the corresponding time window, and judges whether a DDoS attack occurs based on the comparison of the weight coefficient with the weight coefficient threshold, which can improve the timeliness of the historical benchmark traffic data, provide an accurate basis for judgment, and thus improve the accuracy of DDoS attack judgment.

[0159] In order to better implement the traffic-based distributed denial of service attack detection method of the embodiment of the present application, the embodiment of the present application also provides a traffic-based distributed denial of service attack detection device. Figure 5 , Figure 5 A schematic diagram of the structure of a flow-based distributed denial of service attack detection device provided in an embodiment of the present application. The flow-based distributed denial of service attack detection device 200 may include:

[0160] The first acquisition unit 210 is used to acquire the real-time traffic data of the target service in the corresponding time window in the current statistical period;

[0161] The second acquisition unit 220 is used to acquire the historical benchmark traffic data of the target service in the corresponding time window within the historical statistical period;

[0162] A determination unit 230, configured to determine a weight coefficient in a corresponding time window within a current statistical period according to the real-time traffic data and the historical benchmark traffic data;

[0163] The detection unit 240 is used to determine a detection result for the distributed denial of service attack based on the weight coefficient and the corresponding weight coefficient threshold.

[0164] In some embodiments, the second acquiring unit 220 is specifically configured to:

[0165] Obtain historical traffic statistics of the target service within a target historical period;

[0166] A plurality of historical benchmark flow data are generated according to the historical flow statistical data.

[0167] In some embodiments, the several historical baseline flow data include first historical baseline flow data, second historical baseline flow data and third historical baseline flow data; in the same time window, the value of the first historical baseline flow data is smaller than the value of the second historical baseline flow data, and the value of the second historical baseline flow data is smaller than the value of the third historical baseline flow data.

[0168] In some embodiments, the second acquisition unit 220 generates a plurality of historical benchmark traffic data according to the historical traffic statistical data, which can be used to:

[0169] Dividing the target historical period into a plurality of historical statistical periods, and dividing each of the historical statistical periods into a plurality of time windows;

[0170] For each of the time windows, obtain historical traffic statistics data in the same time window in the multiple historical statistical periods to obtain a historical traffic statistics data set in the same time window;

[0171] Determine the value of the first historical benchmark flow data in each time window according to the historical flow statistics data set in the same time window;

[0172] According to the value of the first historical reference flow data in each time window, the value of the second historical reference flow data and the value of the third historical reference flow data in each time window are determined.

[0173] In some embodiments, when determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window, the second acquisition unit 220 may be used to:

[0174] For each of the time windows, the value of the first historical reference flow data in each of the time windows is determined according to the average value of the historical flow statistics data set in the same time window.

[0175] In some embodiments, when determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window, the second acquisition unit 220 may be used to:

[0176] For each of the time windows, curve fitting is performed on the historical traffic statistics data set in the same time window to determine the value of the first historical benchmark traffic data in each of the time windows.

[0177] In some embodiments, when the second acquisition unit 220 determines the value of the second historical reference flow data and the value of the third historical reference flow data in each time window according to the value of the first historical reference flow data in each time window, it can be used to:

[0178] Determine the value of the second historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the first multiple;

[0179] Determine the value of the third historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the second multiple;

[0180] The first multiple is smaller than the second multiple, and both the first multiple and the second multiple are greater than 1.

[0181] In some embodiments, the determining unit 230 is specifically configured to:

[0182] Determine the weight of each sampling time point in the corresponding time window in the current statistical period according to the real-time traffic data corresponding to each sampling time point in the current statistical period and the value of each of the historical benchmark traffic data in the corresponding time window to which each sampling time point in the current statistical period belongs;

[0183] According to the weight of each sampling time point in the corresponding time window in the current statistical period, a weight coefficient of each sampling time point in the corresponding time window in the current statistical period is determined.

[0184] In some embodiments, the determining unit 230

[0185] When determining the weight coefficient of each sampling time point in the corresponding time window in the current statistical period according to the weight of each sampling time point in the corresponding time window in the current statistical period, it can be used to:

[0186] According to the sum of the weights of N sampling time points in the corresponding time window in the current statistical period, the weight coefficient of the target sampling time point in the corresponding time window in the current statistical period is determined, the N sampling time points include the target sampling time point and N-1 adjacent sampling time points before the target sampling time point, N is a natural number greater than 1; the target sampling time point is any sampling time point in the current statistical period.

[0187] In some embodiments, the detection unit 240 is specifically used to:

[0188] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period reaches the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period; or

[0189] If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period does not reach the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business has not been attacked by the distributed denial of service at the target sampling time point within the current detection period.

[0190] In some embodiments, the traffic-based distributed denial of service attack detection device 200 further includes:

[0191] The early warning unit is configured to generate an early warning message if it is determined that the detection result of the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current detection period.

[0192] In some embodiments, the historical traffic statistics data does not include DDoS attack traffic.

[0193] Each unit in the above-mentioned traffic-based distributed denial of service attack detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned units can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above-mentioned units.

[0194] The flow-based distributed denial of service attack detection device 200 can be integrated in a terminal or server that has a storage device and a processor and has computing capabilities, or the flow-based distributed denial of service attack detection device 200 is the terminal or server.

[0195] Optionally, the present application further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0196] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a terminal, and the terminal may be an intelligent vehicle-mounted terminal. Figure 6As shown, the computer device 300 may include: a communication interface 301, a memory 302, a processor 303 and a communication bus 304. The communication interface 301, the memory 302, and the processor 303 communicate with each other through the communication bus 304. The communication interface 301 is used for the computer device 300 to communicate data with external devices. The memory 302 can be used to store software programs and modules, and the processor 303 runs the software programs and modules stored in the memory 302, such as the software programs of the corresponding operations in the aforementioned method embodiments.

[0197] Optionally, the processor 303 may call the software program and module stored in the memory 302 to perform the following operations:

[0198] Obtain real-time traffic data of the target business in the corresponding time window in the current statistical period; obtain historical benchmark traffic data of the target business in the corresponding time window in the historical statistical period; determine the weight coefficient in the corresponding time window in the current statistical period based on the real-time traffic data and the historical benchmark traffic data; determine the detection result for the distributed denial of service attack based on the weight coefficient and the corresponding weight coefficient threshold.

[0199] The present application also provides a computer-readable storage medium for storing a computer program. The computer-readable storage medium can be applied to a computer device, and the computer program enables the computer device to execute the corresponding process in the flow-based distributed denial of service attack detection method in the embodiment of the present application, which will not be described in detail for the sake of brevity.

[0200] Schematic diagram of a storage medium provided in an embodiment of the present application. Figure 7 As shown, a program product 400 for implementing the above method according to an exemplary embodiment of the present application is described, which can adopt a portable compact disk read-only memory (CDROM) and include program code, and can be run on a computer device, such as a mobile phone. However, the program product of the present application is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0201] The present application also provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the corresponding process in the traffic-based distributed denial of service attack detection method in the embodiment of the present application, which will not be described here for the sake of brevity.

[0202] The present application also provides a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the corresponding process in the traffic-based distributed denial of service attack detection method in the present application, which will not be repeated here for the sake of brevity.

[0203] It should be understood that the processor of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0204] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0205] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0206] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0207] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0208] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0209] In addition, each functional unit in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0210] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. 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. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer or a server) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0211] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A traffic-based distributed denial of service attack detection method, characterized in that: The method comprises: Obtain the real-time traffic data of the target business in the corresponding time window within the current statistical period; Obtaining historical benchmark traffic data of the target business in a corresponding time window within a historical statistical period, including: obtaining historical traffic statistical data of the target business in a target historical period; generating a plurality of historical benchmark traffic data according to the historical traffic statistical data; the plurality of historical benchmark traffic data include first historical benchmark traffic data, second historical benchmark traffic data and third historical benchmark traffic data; in the same time window, the value of the first historical benchmark traffic data is less than the value of the second historical benchmark traffic data, and the value of the second historical benchmark traffic data is less than the value of the third historical benchmark traffic data; Determining the weight coefficient of the corresponding time window in the current statistical period according to the real-time traffic data and the historical benchmark traffic data, including: determining the weight of each sampling time point in the corresponding time window in the current statistical period according to the real-time traffic data corresponding to each sampling time point in the current statistical period and the value of each of the historical benchmark traffic data in the corresponding time window to which each sampling time point in the current statistical period belongs; determining the weight coefficient of each sampling time point in the corresponding time window in the current statistical period according to the weight of each sampling time point in the corresponding time window in the current statistical period; A detection result for the distributed denial of service attack is determined based on the weight coefficient and a corresponding weight coefficient threshold.

2. The method for detecting distributed denial of service attacks based on traffic according to claim 1, characterized in that: The generating of a plurality of historical benchmark flow data according to the historical flow statistical data comprises: Dividing the target historical period into a plurality of historical statistical periods, and dividing each of the historical statistical periods into a plurality of time windows; For each of the time windows, obtain historical traffic statistics data in the same time window in the multiple historical statistical periods to obtain a historical traffic statistics data set in the same time window; Determine the value of the first historical benchmark flow data in each time window according to the historical flow statistics data set in the same time window; According to the value of the first historical reference flow data in each time window, the value of the second historical reference flow data and the value of the third historical reference flow data in each time window are determined.

3. The method for detecting distributed denial of service attacks based on traffic according to claim 2, characterized in that: Determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window includes: For each of the time windows, the value of the first historical reference flow data in each of the time windows is determined according to the average value of the historical flow statistics data set in the same time window.

4. The method for detecting distributed denial of service attacks based on traffic according to claim 2, characterized in that: Determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window includes: For each of the time windows, curve fitting is performed on the historical traffic statistics data set in the same time window to determine the value of the first historical benchmark traffic data in each of the time windows.

5. The method for detecting distributed denial of service attacks based on traffic according to claim 2, characterized in that: Determining the value of the second historical reference flow data and the value of the third historical reference flow data in each time window according to the value of the first historical reference flow data in each time window includes: Determine the value of the second historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the first multiple; Determine the value of the third historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the second multiple; The first multiple is smaller than the second multiple, and both the first multiple and the second multiple are greater than 1.

6. The method for detecting distributed denial of service attacks based on traffic according to claim 1, characterized in that: The determining, according to the weight of each sampling time point in the corresponding time window in the current statistical period, a weight coefficient of each sampling time point in the corresponding time window in the current statistical period includes: According to the sum of the weights of N sampling time points in the corresponding time window in the current statistical period, the weight coefficient of the target sampling time point in the corresponding time window in the current statistical period is determined, the N sampling time points include the target sampling time point and N-1 adjacent sampling time points before the target sampling time point, N is a natural number greater than 1; the target sampling time point is any sampling time point in the current statistical period.

7. The method for detecting distributed denial of service attacks based on traffic according to claim 6, characterized in that: The determining the detection result for the distributed denial of service attack based on the weight coefficient and the corresponding weight coefficient threshold comprises: If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period reaches the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current statistical period; or If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period does not reach the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business has not been attacked by the distributed denial of service at the target sampling time point within the current statistical period.

8. The method for detecting distributed denial of service attacks based on traffic according to claim 7, characterized in that: The method further comprises: If it is determined that the detection result of the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point in the current statistical period, a warning message is generated.

9. The method for detecting distributed denial of service attacks based on traffic according to claim 1, characterized in that: The historical traffic statistics do not include DDoS attack traffic.

10. A flow-based distributed denial of service attack detection device, characterized in that: The device comprises: The first acquisition unit is used to acquire the real-time traffic data of the target service in the corresponding time window in the current statistical period; The second acquisition unit is used to acquire the historical benchmark traffic data of the target business in the corresponding time window within the historical statistical period, including: acquiring the historical traffic statistical data of the target business in the target historical period; generating a plurality of historical benchmark traffic data according to the historical traffic statistical data; the plurality of historical benchmark traffic data include first historical benchmark traffic data, second historical benchmark traffic data and third historical benchmark traffic data; in the same time window, the value of the first historical benchmark traffic data is less than the value of the second historical benchmark traffic data, and the value of the second historical benchmark traffic data is less than the value of the third historical benchmark traffic data; A determination unit, used to determine the weight coefficient in the corresponding time window in the current statistical period according to the real-time traffic data and the historical benchmark traffic data, including: determining the weight of each sampling time point in the corresponding time window in the current statistical period according to the real-time traffic data corresponding to each sampling time point in the current statistical period and the value of each of the historical benchmark traffic data in the corresponding time window to which each sampling time point in the current statistical period belongs; determining the weight coefficient of each sampling time point in the corresponding time window in the current statistical period according to the weight of each sampling time point in the corresponding time window in the current statistical period; A detection unit is used to determine a detection result for the distributed denial of service attack based on the weight coefficient and a corresponding weight coefficient threshold.

11. The distributed denial of service attack detection device based on flow as claimed in claim 10, characterized in that: When the second acquisition unit generates a plurality of historical reference flow data according to the historical flow statistical data, it is used to: Dividing the target historical period into a plurality of historical statistical periods, and dividing each of the historical statistical periods into a plurality of time windows; For each of the time windows, obtain historical traffic statistics data in the same time window in the multiple historical statistical periods to obtain a historical traffic statistics data set in the same time window; Determine the value of the first historical benchmark flow data in each time window according to the historical flow statistics data set in the same time window; According to the value of the first historical reference flow data in each time window, the value of the second historical reference flow data and the value of the third historical reference flow data in each time window are determined.

12. The distributed denial of service attack detection device based on flow as claimed in claim 11, characterized in that: When determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window, the second acquisition unit is used to: For each of the time windows, the value of the first historical reference flow data in each of the time windows is determined according to the average value of the historical flow statistics data set in the same time window.

13. The distributed denial of service attack detection device based on flow as claimed in claim 11, characterized in that: When determining the value of the first historical reference flow data in each time window according to the historical flow statistics data set in the same time window, the second acquisition unit is used to: For each of the time windows, curve fitting is performed on the historical traffic statistics data set in the same time window to determine the value of the first historical benchmark traffic data in each of the time windows.

14. The distributed denial of service attack detection device based on flow as claimed in claim 11, characterized in that: When the second acquisition unit determines the value of the second historical reference flow data and the value of the third historical reference flow data in each time window according to the value of the first historical reference flow data in each time window, it is used to: Determine the value of the second historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the first multiple; Determine the value of the third historical benchmark flow data in each time window according to the product of the value of the first historical benchmark flow data in each time window and the second multiple; The first multiple is smaller than the second multiple, and both the first multiple and the second multiple are greater than 1.

15. The distributed denial of service attack detection device based on flow as claimed in claim 10, characterized in that: The determining unit, when determining the weight coefficient of each sampling time point in the corresponding time window in the current statistical period according to the weight of each sampling time point in the corresponding time window in the current statistical period, is used to: Determine a weight coefficient of a target sampling time point in a corresponding time window in the current statistical period according to the sum of weights of N sampling time points in a corresponding time window in the current statistical period, wherein the N sampling time points include the target sampling time point and N-1 adjacent sampling time points before the target sampling time point, and N is a natural number greater than 1; The target sampling time point is any sampling time point in the current statistical period.

16. The distributed denial of service attack detection device based on flow as claimed in claim 15, characterized in that: The detection unit is used for: If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period reaches the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current statistical period; or If the weight coefficient of the target sampling time point in the corresponding time window within the current statistical period does not reach the weight coefficient threshold, it is determined that the detection result for the distributed denial of service attack is that the target business has not been attacked by the distributed denial of service at the target sampling time point within the current statistical period.

17. The distributed denial of service attack detection device based on flow as claimed in claim 16, characterized in that: The device also includes: The early warning unit is configured to generate an early warning message if it is determined that the detection result of the distributed denial of service attack is that the target business is attacked by the distributed denial of service at the target sampling time point within the current statistical period.

18. The distributed denial of service attack detection device based on flow as claimed in claim 10, characterized in that: The historical traffic statistics do not include DDoS attack traffic.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the traffic-based distributed denial of service attack detection method according to any one of claims 1-9.

20. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the traffic-based distributed denial of service attack detection method according to any one of claims 1 to 9 by calling the computer program stored in the memory.

21. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by the processor, the traffic-based distributed denial of service attack detection method described in any one of claims 1-9 is implemented.