A CDN traffic detection method and system

By constructing a bipartite graph and calculating the duplicate download rate and single-IP download density, the problem of automatic discovery and quantitative attribution of CDN traffic theft gangs was solved, achieving efficient and accurate theft detection and loss assessment.

CN123122999APending Publication Date: 2026-11-17SHANGHAI QINIU INFORMATION TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611534102.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-30
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to automatically detect CDN traffic theft groups, cannot quantitatively attribute billed bandwidth, and cannot effectively identify abuse under legitimate authentication, resulting in a problem of difficult-to-control false alarms.

Method used

By obtaining request-level access logs and domain bandwidth matrices from the CDN platform, the client IP is standardized as the main unit of the IP segment. A bipartite graph is constructed and iteratively expanded to calculate the duplicate download rate and single IP download density. Combined with the number of independent paths, the fraudulent behavior is determined, and the stolen bandwidth time-series curve is reconstructed by using the real bandwidth time-series data of the victim domain.

Benefits of technology

It enables automatic detection of fraudulent credit card groups, quantitative attribution, and improves the accuracy and efficiency of detection. It can identify abuse under legitimate authentication and reduce false alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122999A_ABST
    Figure CN123122999A_ABST
Patent Text Reader

Abstract

This application discloses a CDN traffic detection method and system. The method includes: S1: acquiring request-level access logs and domain bandwidth matrix from the CDN platform side, and estimating the actual file size for each access path in the request-level access logs; S2: constructing a bipartite graph, iteratively expanding the bipartite graph based on suspicious subject seeds, listing the IP segment subject units with fraudulent behavior as a malicious IP segment set, and forming a gang subgraph with the victim domain set; S3: calculating the repeated download ratio and single IP download density of each statistical unit in the gang subgraph, and determining that the corresponding statistical unit has fraudulent behavior; S4: reconstructing the stolen bandwidth time-series curve, and performing graded alarms and loss assessment based on the stolen bandwidth time-series curve. This application provides a directly implementable, efficient, and accurate detection technology solution for traffic fraud governance on the CDN platform side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of CDN transmission technology, and in particular to a CDN traffic detection method and system. Background Technology

[0002] CDN has become an important foundational technology for network transmission. The core objective of CDN is to schedule user requests to the nearest edge node with the best service capabilities, thereby reducing access latency and improving service quality.

[0003] With the widespread deployment of CDN services, a form of bandwidth skimming targeting CDN billing has become increasingly prominent: Skimming refers to a third party misusing a customer's (hereinafter referred to as the victim) already configured and accelerated domains and bandwidth on the CDN platform to distribute large files (such as installation packages, videos, and download resources) to themselves, thereby occupying the victim's billed bandwidth for free and driving up their bills. Skimmed traffic differs fundamentally from normal CDN traffic in its microstructure—skimming is concentrated on a very small number of large file paths, served by a limited number of / 24 IP ranges, with each IP range repeatedly downloading the same file, and maintaining an abnormally stable high bandwidth throughout the day (including off-peak hours).

[0004] Regarding CDN traffic security and anomaly detection, existing technologies are developing in roughly the following three directions: Option 1: CDN Anti-Hotlinking / Access Control. Early solutions primarily focused on authentication and interception at the request admission stage. For example, a two-tiered anti-hotlinking verification mechanism using a global scheduling server and edge node servers was employed to verify the Referer, timestamp, and signature string, and to check URL uniqueness and IP range consistency during secondary requests. Later developments included encrypted download addresses and key-rotation authentication schemes. These technologies intercept illegal requests during admission and are effective against hotlinking attempts without valid credentials.

[0005] Direction Two: Anomaly Traffic / Network Intrusion Detection. As attack methods evolve, researchers are beginning to identify anomalies from the perspective of traffic behavior characteristics. For example, comparing current access traffic with historical traffic baselines to assess the risk of fraudulent activity, and then analyzing access behavior characteristics to identify and handle abnormal fraudulent traffic; at the host level, by calculating the coefficient of variation (standard deviation / mean) of host bandwidth usage, low variation is used as a criterion to indicate non-human or machine behavior, combined with time-period profiling to issue alerts for activity during atypical periods, used to detect spyware transmission in enterprise outbound traffic; Direction 3: Machine Learning Classification and Detection of CDN Distribution Fraud. For example, a machine learning model is built using content distribution features, account features, and log features to determine whether an account or distribution is fraudulent (US11552971B1). This type of solution answers the classification question of "is it fraudulent?" without analyzing the internal structure of access logs to determine "who stole from whom," nor does it quantitatively attribute billing bandwidth. Direction 4: Malicious Domain / PCDN User Identification. This type of solution relies on DNS-side or ISP-side data, such as DNS dual-engine malicious domain detection and ISP-side PCDN user identification (relying on RADIUS / DPI / uplink / downlink asymmetric traffic features), to identify malicious domains or users illegally sharing bandwidth.

[0006] While the aforementioned technologies have proven effective in their respective scenarios, they suffer from the following shortcomings when faced with a specific CDN billing fraud scenario: a third party steals a customer's configured acceleration domain and bandwidth to distribute large files for free. (1) Static list, unable to self-propagate: Blacklist and whitelist solutions can only block known malicious IPs. They lack the ability to automatically discover IP ranges that are rotated or newly added by the same group and require continuous manual maintenance.

[0007] (2) Isolated observation of single points, lack of graph association: Existing abnormal traffic detection solutions mostly rely on the comparison of behavior characteristics in a single time period with historical baselines, without utilizing the collaborative structure of multiple domains being stolen by a batch of IP segments at the same time, or a single domain being stolen by multiple IP segments. This makes it easy to miss reports and difficult to delineate the boundaries of gangs. Although general graph inference algorithms have a bipartite graph iterative extension approach, they are geared towards APT or C&C scenarios and converge based on similarity scores, without designing path independence pruning criteria for CDN theft scenarios.

[0008] (3) Authentication-based solutions do not address abuse under legitimate authentication: Anti-hotlinking and encrypted download solutions are both request-based access solutions. Thieves can repeatedly pull large files after carrying legitimate links or obtaining legitimate credentials. Such solutions cannot identify abuse behavior from the traffic structure of access logs.

[0009] (4) Lack of quantitative attribution of billing bandwidth: Existing solutions mostly stop at determining whether it is abnormal or fraudulent, and cannot answer what percentage or how many TB of the billing bandwidth of a victim domain name is stolen, let alone restore the curve of the stolen bandwidth changing over time, making it difficult to directly support graded alarms and loss assessment.

[0010] (5) False alarms are difficult to suppress: single snapshot judgment is easily affected by sudden legitimate traffic, and there is a lack of multi-day persistent verification mechanism to filter out instantaneous anomalies.

[0011] (6) Relying on additional data from the operator side or application layer: PCDN identification solutions rely on operator-side signals such as RADIUS and DPI, and cannot be directly implemented on the CDN platform side; while the CDN platform side usually only has request-level access logs and domain name minute-level bandwidth matrix.

[0012] Therefore, there is an urgent need for a CDN traffic detection method and system that can automatically detect fraudulent groups and quantitatively attribute billing bandwidth. Summary of the Invention

[0013] This application provides a CDN traffic detection method to address the technical problems existing in the prior art, including the following steps: S1: Obtain the CDN platform-side request-level access logs and domain name bandwidth matrix, normalize the client IP into IP segment main units, and for each access path in the request-level access logs, take the maximum value among the maximum number of bytes sent under status code 200 response, the total length of resources declared in Content-Range, and the end position of the request Range as the estimated file size of the path, and extract the traffic characteristic data of the statistical unit consisting of the domain name and the normalized IP segment main unit; S2: Filter the statistical units to determine the set of statistical units to be judged; S3: Based on the file size estimation result, calculate the duplicate download rate and single IP download density of each statistical unit in the set of statistical units to be judged. When the duplicate download rate and the single IP download density both exceed their set thresholds, and the number of independent paths of the statistical unit is lower than the set threshold, it is determined that the corresponding statistical unit has fraudulent behavior, and the statistical unit is scored for risk level. The main IP segments in the statistical units that are determined to have fraudulent behavior are summarized into a malicious IP segment set, and the domain names in them are summarized into a victim domain name set. S4: Calculate the share of bytes belonging to the malicious IP segment set in the total service bytes of the victim domain name within the window, multiply the share of bytes by the actual bandwidth time-series data of the victim domain name to restore the stolen bandwidth time-series curve, and perform graded alarms and loss assessment based on the stolen bandwidth time-series curve.

[0014] Furthermore, step S2 specifically includes: Obtain seeds from suspicious entities; A bipartite graph is constructed using IP segment main units and victim domain names. The bipartite graph is iteratively expanded based on suspicious subject seeds. Path independence pruning filtering and whitelist filtering are performed during the iterative expansion process. After iterative convergence, the main units of IP segments that exhibit fraudulent behavior are listed as the malicious IP segment set, and together with the victim domain set, they form a gang subgraph. The statistical units composed of domain names and main units of IP segments in the gang subgraph are used as the statistical unit set to be judged.

[0015] Furthermore, the estimated file size for each access path mentioned in step S1 is calculated as follows:

[0016] in: Estimated file size for path p: The maximum number of bytes sent in response to a status code 200 for path p; The total length of the resource declared for the Content-Range; This is the requested end position of the Range.

[0017] Furthermore, the suspicious subject seed mentioned in step S2 is determined based on the idle bandwidth stability seed, wherein the idle bandwidth stability seed determination needs to meet the following condition for J consecutive days:

[0018] in: This represents the ratio of off-peak bandwidth during the early morning hours to the total daily bandwidth. This represents the ratio of off-peak bandwidth during the night to the total daily bandwidth. The peak bandwidth of the day, coefficient of variation The standard deviation of bandwidth for the day: This is the threshold for the percentage of off-peak hours. Peak bandwidth threshold, The threshold for the coefficient of variation. The number of consecutive days to determine.

[0019] Further, the bipartite graph iterative expansion described in step S2 includes: S21, Computation Operator A collection of malicious IP segments The resulting set of victim domain names was obtained through filtering.

[0020] S22, Computation Operator From the set of victim domain names The newly added malicious IP ranges were obtained through filtering:

[0021] S23. Iteratively update the set of malicious IP ranges, using the following formula:

[0022] S24. Convergence Decision: When the number of newly added IP segments in this round is less than or equal to the early termination threshold. Or the number of iterations has reached the maximum number of iterations. Stop iterating when the time is right, and obtain the gang subgraph; in: The whitelist exclusion set includes both whitelisted domain names and whitelisted IP range main units. IP range For domain name Service bytes; For byte thresholds; For domain name Number of independent paths; IP range Number of independent paths: The threshold for pruning independent paths; For iteration rounds.

[0023] Furthermore, in step S3, the calculation method for the repeated download rate is as follows:

[0024] The method for calculating download density per IP address is as follows:

[0025] in, The total number of bytes actually served by the statistical unit. This estimates the sum of file sizes for each path within the statistical unit. This is the number of unique client IPs within the statistical unit.

[0026] Furthermore, step S4 specifically includes: S41. Calculate the share of the victim domain name in the total service bytes within the window that belongs to the malicious IP segment set. ; in, This is a collection of malicious IP ranges. IP range For domain name byte service For domain name Total service bytes within the window: S42. Multiply the byte share by the actual bandwidth timing data of the corresponding victim domain name to reconstruct the stolen bandwidth timing curve. For domain name At any moment The actual bandwidth; S43. Execute graded alarms and loss assessments based on the timing curve of the stolen bandwidth.

[0027] Furthermore, after step S3 and before step S4, a multi-day persistence verification step is also included; Get A collection of victim domain names captured on individual day snapshots. The final set of warnings is obtained according to the following formula. :

[0028] in: Let m be the intersection of the sets of m independent daily snapshots of the victim domains. The number of snapshots that were determined to have involved fraudulent transactions. The threshold for the number of times (domain name, IP segment main unit) co-occurs; The domain names and IP ranges specified in the formula conditions are retained as the final alarm targets, while false alarms caused by instantaneous traffic anomalies are filtered out.

[0029] Furthermore, it also includes the step of re-injecting malicious IP addresses: The set of malicious IP segments obtained from the iterative convergence in step S2 is fed back as seeds for suspicious entities to be detected the next day, forming an online iteratively growing detector.

[0030] Furthermore, the risk level scoring of the statistical unit includes: in addition to the values ​​of the repeated download rate and the single IP download density, the scoring is also combined with the IP segment concentration, the number and distribution of independent user agents, and the operator and geographical province distribution of the client IP of the statistical unit, and the statistical unit is divided into low risk, medium risk and high risk levels according to any one of the decision rules, scoring cards or tree models.

[0031] Furthermore, it also includes a snapshot window sampling step: taking the access log of a fixed duration window as input, wherein the snapshot window is one or more of the following: a short window at a fixed peak time of the day, a time period window of multiple representative time periods within a day, or a sliding window that slides throughout the day with a fixed step size.

[0032] Furthermore, the byte share is calculated using a weighted average based on the billing caliber, with higher weights assigned to byte shares near the effective billing time of the billing rules; and / or, the byte share is... This invention also discloses a CDN traffic detection system applied to the aforementioned CDN traffic detection method, comprising a data preprocessing unit, a gang subgraph unit, a judgment unit, and a processing unit, wherein: The data preprocessing unit is used to obtain the CDN platform's request-level access logs and domain name bandwidth matrix, normalize the client IP into IP segment main units, and for each access path in the request-level access log, take the maximum value among the maximum number of bytes sent under status code 200 response, the total length of resources declared in Content-Range, and the end position of the request Range as the estimated file size of the path, and extract the traffic characteristic data of the statistical unit consisting of domain name and normalized IP segment main units; The gang subgraph unit is used to filter the statistical units and determine the set of statistical units to be judged; the judgment unit is used to calculate the duplicate download rate and single IP download density of each statistical unit in the set of statistical units to be judged based on the file size estimation result. When the duplicate download rate and the single IP download density both exceed their set thresholds, and the number of independent paths of the statistical unit is lower than the set threshold, it is determined that the corresponding statistical unit has fraudulent behavior, and the statistical unit is given a risk level score. The main IP segments of the statistical units that are determined to have fraudulent behavior are summarized into a malicious IP segment set, and the domain names in them are summarized into a victim domain name set. The processing unit calculates the share of bytes belonging to the malicious IP segment set in the total service bytes of the victim domain name within the window, multiplies the share of bytes by the actual bandwidth time-series data of the victim domain name, restores the stolen bandwidth time-series curve, and performs graded alarms and loss assessment based on the stolen bandwidth time-series curve.

[0033] The bandwidth theft time-series curve is combined with the content delivery network billing unit price to convert it into an amount loss curve.

[0034] Therefore, this application organically combines structured quantitative discrimination, gang association discovery, and billing bandwidth quantitative attribution, making up for the shortcomings of existing technologies such as authentication schemes being unable to identify abuse under legitimate authentication, anomaly detection schemes lacking graph association and quantitative attribution, and list-based schemes being static and unable to self-propagate. It provides a directly implementable, efficient, and accurate detection method and system for traffic fraud governance on the CDN platform side.

[0035] In practical applications, the system and the units described in this application can be deployed on a single target server or each unit can be deployed independently on different target servers. In particular, as needed, to provide more powerful computing capabilities, the modules can also be deployed on cluster target servers.

[0036] To provide a clearer and more comprehensive understanding of this application, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of the CDN traffic detection process according to an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the CDN traffic detection system according to an embodiment of this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0039] The technical solution of this application is a CDN traffic detection method, including the following steps: S1: Obtain the CDN platform-side request-level access logs and domain name bandwidth matrix, normalize the client IP into IP segment main units, and for each access path in the request-level access logs, take the maximum value among the maximum number of bytes sent under status code 200 response, the total length of resources declared in Content-Range, and the end position of the request Range as the estimated file size of the path, and extract the traffic characteristic data of the statistical unit consisting of the domain name and the normalized IP segment main unit; S2: Filter the statistical units to determine the set of statistical units to be judged; S3: Based on the file size estimation result, calculate the duplicate download rate and single IP download density of each statistical unit in the set of statistical units to be judged. When the duplicate download rate and the single IP download density both exceed their set thresholds, and the number of independent paths of the statistical unit is lower than the set threshold, it is determined that the corresponding statistical unit has fraudulent behavior, and the statistical unit is scored for risk level. The main IP segments in the statistical units that are determined to have fraudulent behavior are summarized into a malicious IP segment set, and the domain names in them are summarized into a victim domain name set. S4: Calculate the share of bytes belonging to the malicious IP segment set in the total service bytes of the victim domain name within the window, multiply the share of bytes by the actual bandwidth time-series data of the victim domain name to restore the stolen bandwidth time-series curve, and perform graded alarms and loss assessment based on the stolen bandwidth time-series curve.

[0040] Please see Figure 1 , Figure 1 This is a schematic diagram of the CDN traffic detection process according to an embodiment of this application. The technical solution of this application will be described below in conjunction with various preferred embodiments.

[0041] S1: Obtain the CDN platform's request-level access logs and domain name bandwidth matrix, normalize the client IP into IP segment main units, and for each access path in the request-level access logs, take the maximum value among the maximum number of bytes sent under status code 200 response, the total length of resources declared in Content-Range, and the end position of the request Range as the estimated file size of the path, and extract the traffic characteristic data of the statistical unit consisting of the domain name and the normalized IP segment main unit.

[0042] The client IPs in all access logs, after normalization (IPv4→ / 24, IPv6→ / 112), are the complete set, including IP ranges for normal access and malicious IP ranges identified later. Among them, the malicious IP ranges are the main IP ranges that are judged to have committed fraudulent activities after the bipartite graph iterative expansion and filtering, and are a subset of the main IP ranges.

[0043] Obtain the CDN platform's request-level access logs and domain bandwidth matrix. The request-level access logs include fields such as domain name, client IP, bytes_sent, URL (access path), status code, Range / Content-Range request headers, user agent (UA), CDN vendor identifier, and date partition. The domain bandwidth matrix is ​​a minute-level bandwidth matrix, representing bandwidth data for 288 5-minute slots per day. This step relies solely on existing data from the CDN platform and does not require additional data such as DPI deep packet inspection or RADIUS from the carrier side.

[0044] In this step, request-level access logs and minute-level bandwidth matrices are integrated, and each client IP address is normalized into a unified malicious entity unit. Specifically, IPv4 addresses are merged into / 24 (C segment), and IPv6 addresses are merged into / 112. This includes: S11. For IPv4 addresses, merge the client IPs into C-segment IP segments with the / 24 prefix. That is, take the first 24 bits (the first three bytes) of the IPv4 address as the main unit identifier of the IP segment. For example, if the client IP is 192.168.1.100, it will be normalized to 192.168.1.0 / 24.

[0045] S12. For IPv6 addresses, merge client IPs into IP segments with the / 112 prefix. That is, take the first 112 bits of the IPv6 address as the main unit identifier of the IP segment.

[0046] The reason for using / 24 (IPv4) and / 112 (IPv6) as the normalization granularity is that fraudsters typically control multiple IP addresses within the same network segment. Using / 24 or / 112 as the aggregation granularity can aggregate scattered malicious IPs into analyzable actor units. This granularity is also a commonly used aggregation scale in CDN platform log analysis. This / 24-C segment is the atomic unit of actors that runs throughout the entire system.

[0047] As an alternative, the IP segment body unit can also use other prefix lengths, or be aggregated at the AS number (Autonomous System Number) and the address segment's parent organization. Wider CIDR (Classless Inter-Domain Routing) address blocks are all expanded into their constituent / 24 (IPv4) or / 112 (IPv6) atomic units before participating in the iteration.

[0048] Estimate the actual file size for each access path in the request-level access log. Because range requests (segmented requests) are widely used in CDN scenarios, the bytes_sent of a single request only reflects the number of bytes transmitted in that instance, and does not equal the actual file size; furthermore, a 200 status code response may indicate a complete file or, due to the range request, a partial file.

[0049] As a preferred implementation, this application uses the largest of the three factors to estimate the actual file size of each path. The calculation method is as follows:

[0050] in: Estimated file size for path p: For path Maximum number of bytes sent in a status code 200 response; The total length of the resource declared for the Content-Range; This is the requested end position of the Range.

[0051] The improved technical solution proposed in this application, which takes the largest of the three values, shows that: the maximum number of bytes sent in a 200 response may reflect the complete file size (when Range is not used); the total length of the Content-Range declaration directly gives the resource size; and the end position of the Range reflects the maximum offset of the client request (usually near the end of the file). Taking the maximum value of the three values ​​can most closely estimate the true file size, avoiding the underestimation of the file size due to Range segmented requests.

[0052] The estimated file size is the basis for subsequent calculations of the repeated download rate and single-IP download density, and its accuracy directly affects the reliability of fraud detection.

[0053] The traffic characteristic data in this step is extracted based on IP normalization and file size estimation results, according to statistical units composed of domain names and normalized IP segment main units. Specifically, for each statistical unit (domain name, IP segment main unit), the following characteristics are aggregated and calculated: the actual total service bytes W, the number of requests, and the number of unique client IPs for that statistical unit. The data includes the number of independent user agents (UAs), the number of independent paths (n_path), the sum of estimated file sizes (S) for each path in this unit, the top-N largest paths and their byte percentages, etc.

[0054] Wherein, the actual total service bytes W is the sum of bytes_sent of all requests within the detection window of this statistical unit; the sum of estimated file sizes S for each path is the sum of s_p of all different access paths involved in this statistical unit; and the number of independent client IPs... This represents the number of deduplicated client IPs within this statistical unit; the number of unique paths, n_path, represents the number of deduplicated access paths within this statistical unit.

[0055] Therefore, this application only utilizes the existing access logs and bandwidth matrix on the CDN platform to complete the data foundation construction, without the need for additional data sources; IP segment normalization aggregates scattered IPs into analyzable actor units; the file size estimation by taking the largest of the three overcomes the problem of difficulty in determining the file size under Range segmented requests, and provides a reliable benchmark for subsequent structured quantitative discrimination.

[0056] S2: Filter the statistical units to determine the set of statistical units to be judged. Specifically, this includes obtaining suspicious subject seeds, constructing a bipartite graph with IP segment subject units and victim domain names, iteratively expanding the bipartite graph based on suspicious subject seeds, performing path independence pruning filtering and whitelist filtering during the iterative expansion process, and listing the IP segment subject units with fraudulent behavior as the malicious IP segment set after iterative convergence. This set of IP segments and the victim domain name set together form a gang subgraph. The statistical units composed of domain names and IP segment subject units in the gang subgraph are used as the set of statistical units to be judged.

[0057] This step is the core step in automatically identifying credit card fraud gangs from a small number of suspicious entities. Its specific technical solutions include obtaining suspicious entity seeds, constructing and iteratively expanding a bipartite graph, pruning and filtering, and convergence determination. Specifically: Suspicious subject seed acquisition: Obtain the seed of the suspected subject, which serves as the starting point for the iterative expansion of the bipartite graph. The seed of the suspected subject can be derived from one or more of the following: 1. Idle Bandwidth Stability Seed Determination: Based on a domain name minute-level bandwidth matrix, domain names and their corresponding IP ranges that maintain a high proportion during idle hours and exhibit abnormally stable bandwidth curves throughout the day are identified as seeds. This determination requires meeting the following conditions for J consecutive days:

[0058] in: This refers to the percentage of bandwidth available during the off-peak hours (e.g., 00:00-06:00) compared to the total daily bandwidth. This represents the percentage of bandwidth available during off-peak hours (e.g., 11:00 PM - 12:00 AM) relative to the total daily bandwidth. The peak bandwidth of the day, coefficient of variation The standard deviation of bandwidth for the day: This is the threshold for the percentage of off-peak hours. Peak bandwidth threshold, This is the threshold for the coefficient of variation (e.g., 0.10 to 0.20). The number of consecutive days for determination (3 days).

[0059] The criterion means that the bandwidth share during the off-peak hours in the early morning and at night is higher than the threshold (indicating continuous high load 24 / 7, which does not conform to the normal circadian rhythm of human access), the daily bandwidth peak is sufficiently large (excluding small-volume noise), and the daily bandwidth coefficient of variation does not exceed the threshold (indicating that the bandwidth curve is abnormally stable, consistent with the characteristics of automated machine downloads). Domains and their corresponding IP ranges that meet this condition for J consecutive days are judged as off-peak stability seeds. This is a typical statistical signature of a 7x24 download farm. It should be noted that the above coefficient of variation uses the daily bandwidth peak value x_max rather than the daily bandwidth average as the denominator. The coefficient of variation with the average as the denominator only reflects the dispersion of the bandwidth sequence; while with the peak value as the denominator, the coefficient also reflects "whether the daily bandwidth continuously runs close to the daily peak value", which can directly characterize the morphological characteristics of a constant high load 24 / 7 in the case of fraudulent downloads. This is the substantial difference in the criterion construction between the criterion of this application and the existing technology that uses standard deviation / mean to determine machine behavior.

[0060] 2. Domains with sudden bandwidth increases extracted from customer complaint work orders: Extract the daily bandwidth data of the domains of complaining customers from customer complaint work orders, mark the domains with sudden bandwidth increases (abnormal peak-to-valley ratio) as seeds for triggering complaints, and retrieve the corresponding IP ranges.

[0061] 3. Historical malicious IP set: A set of malicious IP ranges that have been confirmed in previous detections, which are used directly as seeds.

[0062] 4. Manual intelligence: Suspicious IP ranges or domains manually marked by security operations personnel.

[0063] 5. Third-party threat list: A list of malicious IP ranges obtained from third-party threat intelligence platforms.

[0064] After obtaining the seed, any wider CIDR address block is expanded into its constituent / 24 (IPv4) or / 112 (IPv6) atomic units to ensure that the seed granularity is consistent with the IP segment body unit.

[0065] Bipartite graph construction and iterative expansion: A bipartite graph is constructed using IP segment entities and victim domains. This bipartite graph contains two types of nodes: one type is the IP segment entity (potential malicious actors), and the other type is the victim domain (domains that have been stolen and accelerated). The edges between the two types of nodes represent access traffic from a certain IP segment entity to a certain victim domain, and the weight of the edge is the number of bytes served by that IP segment to that domain.

[0066] The bipartite graph iterative expansion based on the suspected subject seed includes the following sub-steps: S21. Calculate operator D(B): The set of victim domain names is obtained by filtering the current set of malicious IP segments B. The operator formula is as follows:

[0067] Where: D(B) is the set of victim domains found starting from the malicious IP segment set B; d is the domain name; X is the whitelist exclusion set, which includes both whitelist domain names and whitelist IP segment main units (such as legitimate large customers or trusted domain names, filtered at each hop); k is the IP segment main unit; w_{k,d} is the number of bytes served by IP segment k for domain name d within the window; A byte threshold (e.g., 0.1 GB) is used to filter low-bandwidth noise. This represents the number of unique paths to domain d within the window. The path independence pruning threshold is set (e.g., 5 to 10). This operator means that for each IP segment k in the current malicious IP segment set B, find the domain name d it accesses, and retain only those domain names whose service bytes exceed the byte threshold, whose number of independent paths is less than the path independence threshold, and which are not in the whitelist exclusion set; these constitute the victim domain name set.

[0068] S22. Calculate operator K(F): The set of newly added malicious IP ranges is obtained by filtering the set of victim domains F. The operator formula is as follows:

[0069] Where: K(F) is the set of newly added malicious IP segments found starting from the set of victim domains F; This represents the number of independent paths for IP segment k within the window. The meaning of this operator is: for each domain d in the current victim domain set F, enumerate all IP segments k that access them, and only retain IP segments whose service bytes exceed the byte threshold, whose number of independent paths is less than the path independence threshold, and which are not in the whitelist exclusion set, thus forming a new set of malicious IP segments.

[0070] S23. Iteratively update the set of malicious IP segments: In each iteration, newly added malicious IP segments are merged into the current set. The update formula is as follows:

[0071] in: Let be the set of malicious IP segments in the t-th iteration; Let t be the set of malicious IP segments in the (t+1)th iteration; t is the iteration number, starting from 0. Let be the initial seed set. The formula means that in round t, the current malicious IP segment set is used first. The victim domains are found through operator D, and then the newly added malicious IP segments are found through operator K using these victim domains. The newly added IP segments are merged into the original set to obtain the next set.

[0072] An incremental merging strategy is adopted during the iteration process: each round only queries new subjects that have not been processed and appends them to the global cache, and then recalculates the aggregation on the full cache. This ensures that the results are based on the cumulative full set and that each subject is only queried once, reducing query overhead.

[0073] In each hop of the iterative expansion (i.e., each application of operators D and K), path independence pruning filtering and whitelist filtering are performed: Path independence pruning filtering: requires the number of independent paths n_path of the subject (domain name or IP range) to be less than a threshold. The underlying principle is that fraudulent activity is characterized by repeated downloads of a very small number of large files, resulting in a low number of independent paths for both malicious IP ranges and victim domains. In contrast, legitimate large clients or popular domains typically access numerous different paths, leading to a higher number of independent paths. By using an independent path threshold for pruning, it effectively prevents explosive spread during iterative expansion, ensuring the expansion converges stably within the fraudulent subgraph and avoiding its spread to normal network traffic. This pruning criterion differs from general graph inference (convergence based on similarity scores) by directly utilizing the structured characteristics of CDN fraudulent scenarios.

[0074] Whitelist filtering: Maintain a whitelist exclusion set X, which includes known legitimate large customers, trusted domains, etc. Exclude entities belonging to the whitelist in each hop's operators D and K to avoid misjudging normal large customers as malicious entities or victimized domains.

[0075] S24. Convergence Criterion: Iteration stops when any of the following conditions are met: Condition 1: The number of newly added IP ranges in this round is less than or equal to the early termination threshold. , that is | ) \ | <= This indicates that there are very few new malicious IP ranges, and the gang's structure is basically stable; Condition 2: The number of iterations reaches the maximum number of iterations T_max (e.g., 20) to prevent iterations from going on indefinitely.

[0076] After the iteration stops, the malicious IP segment set B and the victim domain set F at this time are used to form a gang subgraph. This gang subgraph is the fraudulent gang automatically expanded from the seed, which includes all IP segment main units in the malicious IP segment set, all domains in the victim domain set, and the access relationships between them.

[0077] Step S2 automatically expands from a single-digit seed IP range to identify large-scale malicious IP ranges and victim domain groups, eliminating the need for manual investigation; path independence pruning ensures that the iteration converges within a finite number of rounds, keeping query costs under control and preventing explosive spread; whitelist filtering prevents misjudgment of legitimate large customers; incremental caching strategy ensures that each entity is queried only once, reducing computational overhead.

[0078] This application also includes a malicious IP set refeeding step: the malicious IP segment set obtained by the iterative convergence in step S2 is refeeded as a seed for suspicious subjects to be detected on the next day, forming an online iteratively growing detector.

[0079] Specifically, after the daily detection is completed, the final confirmed set of malicious IP ranges (after multiple days of persistence verification) is stored in the seed database, and loaded directly as the initial seed during the next day's detection. This is part of the process. In this way, the malicious IP ranges discovered yesterday can be used as seeds to continue expanding today, discovering more associated malicious IP ranges and victim domains, allowing the detector's coverage to continuously grow over time.

[0080] The use of a refeedback method overcomes the shortcomings of static blacklists and whitelists that require manual maintenance, enabling the system to have self-diffusion and growth capabilities. As the running time increases, the seed bank is continuously enriched, and the detection coverage and recall rate continue to improve.

[0081] S3: Based on the file size estimation result, calculate the duplicate download rate and single IP download density of each statistical unit in the set of statistical units to be judged. When the duplicate download rate and the single IP download density both exceed their set thresholds, and the number of independent paths of the statistical unit is lower than the set threshold, it is determined that the corresponding statistical unit has fraudulent behavior, and the statistical unit is given a risk level score. The main IP segments in the statistical units that are determined to have fraudulent behavior are summarized into a malicious IP segment set, and the domain names in them are summarized into a victim domain name set.

[0082] Step S3 is the step of quantitative identification and risk scoring of fraudulent features, which determines whether fraudulent behavior exists and gives a risk level. Specifically, it includes calculation of repeated download rate, calculation of single IP download density, identification of fraudulent behavior, and risk level scoring.

[0083] Repeat download rate calculation: Based on the file size estimation results from step S1, the duplicate download rate of each statistical unit in the gang subgraph is calculated. The formula for calculating the duplicate download rate is:

[0084] r is the repeated download rate; W is the total number of bytes actually served by the statistical unit (domain name, IP segment main unit) within the detection window, which is the sum of bytes_sent of all requests in this unit; S is the sum of the estimated file sizes of each path under this statistical unit, which is the sum of s_p of all different access paths involved in this unit.

[0085] The duplicate download ratio *r* represents the ratio of the actual served bytes to the actual file size, i.e., the number of times the same content is downloaded repeatedly. For example, if a statistical unit involves a file path estimated to be 100MB, but the actual served total bytes are 1000MB, then the duplicate download ratio *r* = 10, meaning that the file was downloaded an average of 10 times. The larger *r* is, the more frequently the same large file is repeatedly downloaded, and the greater the suspicion of data theft.

[0086] Single IP download density calculation: Calculate the download density per IP address for each statistical unit in the gang subgraph. The formula for calculating the download density per IP address is:

[0087] in: W represents the download density per IP address; S represents the total number of bytes actually served by the statistical unit; and S represents the sum of the estimated file sizes for each path under this statistical unit. This represents the number of unique client IPs within this statistical unit, i.e., the number of client IPs after deduplication.

[0088] Download density per IP This represents the average number of times each unique client IP address downloads the content repeatedly. For example, if a statistical unit has 5 unique client IP addresses and the repeated download rate r = 10, then the download density per IP address is... =2 means that each IP address downloaded the file twice on average. The larger the value, the more concentrated the repeated downloading behavior of each IP is, which is more consistent with the characteristics of a hacker controlling a small number of IPs to repeatedly download the same file.

[0089] Repeat download rate r and download density per IP Combining these two aspects allows us to characterize fraudulent activities from both the total volume and individual IP perspectives: a high r indicates severe overall duplicate downloads. A high value indicates that each individual IP address is repeatedly downloading data; if both are high, it strongly suggests fraudulent activity.

[0090] Determination of fraudulent credit card use: When a statistical unit meets all three of the following conditions, it is determined that the corresponding statistical unit has engaged in fraudulent transactions: Condition 1: The repeated download rate r exceeds its set threshold. Examples include 5 to 10, i.e., r > ; Condition 2: Download density per IP address Exceeding its set threshold (For example, judging it as high risk) >=5, risk of being hit >=1.1), that is > ; Condition 3: The number of independent paths n_path in the statistical unit is lower than a set threshold. (Examples include 5 to 10), i.e., n_path < .

[0091] The simultaneous fulfillment of these three conditions means that: the same file is repeatedly downloaded within the statistical unit as a whole (high r), and each individual IP address is also repeatedly downloading the file ( The high number of visits, coupled with the concentration of access on a very small number of paths (low n_path), perfectly matches the characteristics of third-party domain theft and large file distribution fraud.

[0092] Risk level rating: Statistical units identified as having engaged in fraudulent activities are assigned a risk level score. The risk level is divided into three categories: low risk, medium risk, and high risk. In addition to the values ​​of duplicate download rate and download density per IP address, the score also incorporates the following auxiliary characteristics: 1. IP Segment Concentration: The degree of concentration of traffic distribution among client IPs within a statistical unit; the higher the concentration, the higher the risk. 2. User Agent (UA) scarcity: The number and distribution of unique UAs within a statistical unit. The fewer the types of UAs and the more concentrated they are among a few download tools, the higher the risk. 3. ISP / Province Distribution Characteristics: The distribution of client IPs by ISP (Internet Service Provider) and geographical province within the statistical unit. The more concentrated the distribution is in a few ISPs or provinces, the more it conforms to the characteristics of gang-related crimes, and the higher the risk.

[0093] Risk levels can be determined using any of the following methods: decision rules (such as if-then rules based on thresholds for each feature), interpretable scorecards (weighted scores for each feature, then graded by score range), or tree models (such as decision trees or random forests). For example, when the number of independent paths is small and... When r >= 5, it can be directly judged as high risk; when r and If the risk level just exceeds the threshold and the auxiliary features are not significant, it is judged as low risk.

[0094] As a preferred option, the threshold for the duplicate download rate can be set according to the business type (such as download, video-on-demand, live streaming, etc.) and the domain size. Single IP download density threshold Independent path number threshold Byte threshold Implement differentiated configurations based on tiers. For example, download-related services naturally have a higher rate of repeated downloads, so the configuration can be appropriately increased. Threshold; for smaller domains with smaller user bases, the threshold can be appropriately lowered. Thresholds are used to avoid false negatives.

[0095] This step uses file size estimation as a basis to directly characterize the essence of fraudulent activity by repeatedly pulling the same large file based on the repeated download rate and single IP download density. It can identify abuse under legitimate authentication without changing the authentication chain; multi-dimensional risk scoring provides independent and interpretable evidence of fraudulent activity; threshold tier configuration adapts to different business scenarios and improves the accuracy of judgment.

[0096] Furthermore, to suppress false alarms from a single snapshot, the detection results of multiple independent day snapshots are cross-validated, significantly reducing the false alarm rate. Alarms are only issued for continuous fraudulent activity, avoiding misclassification of sudden, legitimate large-volume downloads (such as new product releases or popular content launches) as fraudulent activity. Specifically, this includes: Get A collection of victim domain names captured on individual day snapshots. The final set of warnings is obtained according to the following formula. :

[0097] in: In this embodiment, the intersection of m independent daily snapshot sets of victimized domain names is considered. Specifically, it consists of m independent day snapshots, statistical units. The number of snapshots identified as having engaged in fraudulent activity in step S3. The threshold for the number of times (domain name, IP segment main unit) co-occurs.

[0098] The domain names and IP ranges specified in the formula conditions are retained as the final alarm targets, while false alarms caused by instantaneous traffic anomalies are filtered out.

[0099] The meaning of this formula is that the domains in the final alarm set must simultaneously meet two conditions: (1) they are all identified as victim domains in m independent day snapshots (taking the intersection); (2) there exists at least one IP segment k such that the number of times the statistical unit (domain d, IP segment k) co-occurs across snapshots reaches a threshold. These two conditions ensure the continuity of fraudulent activity from the domain name and statistical unit perspectives, respectively, and filter out false alarms caused by sudden legitimate traffic spikes or single-day anomalies.

[0100] S4: Calculate the share of bytes belonging to the malicious IP segment set in the total service bytes of the victim domain name within the window, multiply the share of bytes by the actual bandwidth time-series data of the victim domain name to restore the stolen bandwidth time-series curve, and perform graded alarms and loss assessment based on the stolen bandwidth time-series curve.

[0101] This step transforms the detection results into actionable alarms and loss assessment outputs. Specifically, it includes: S41. Calculate the share of the victim domain name in the total service bytes within the window that belongs to the malicious IP segment set:

[0102] in, This is a collection of malicious IP ranges. IP range For domain name byte service For domain name Total service bytes within the window: Bandwidth percentage This indicates what percentage of the total service bytes of domain d come from the malicious IP segment set, i.e., the share of bandwidth that was stolen. The value ranges from 0 to 1. The closer it is to 1, the more likely that the bandwidth of the domain name has been stolen.

[0103] S42. Multiply the byte share by the actual bandwidth timing data of the corresponding victim domain name to reconstruct the stolen bandwidth timing curve. For domain name At any moment The actual bandwidth.

[0104] This formula implies that the bandwidth share of malicious IP segments remains relatively stable throughout the day (compared to the bandwidth calculated within the window). If consistent, then the actual bandwidth time-series curve of domain name d will be calculated according to... By scaling the graph, you can obtain a curve showing how the stolen bandwidth changes over time. This curve visually displays the distribution of stolen bandwidth throughout the day, including the amount of stolen bandwidth during peak and off-peak hours.

[0105] As an optional alternative, bandwidth share The calculation can be weighted according to the billing standard (such as the billing point time under the 95 billing rule), that is, giving higher weight to the effective billing time under the 95 billing rule, so that the bandwidth share more accurately reflects the share of fraudulent use in the billed bandwidth. The time-series curve of the stolen bandwidth can also be further converted into a monetary loss curve, that is, combining the CDN billing unit price (yuan / Mbps / month or yuan / GB) to convert the stolen bandwidth into the corresponding monetary loss.

[0106] S43. Execute tiered alarms and loss assessments based on the stolen bandwidth timing curve, specifically including: 1. Loss Assessment: Based on the time-series curve of the stolen bandwidth, calculate the total amount of stolen bandwidth of the victim domain within the statistical period (such as the 95% peak of stolen bandwidth, the average daily stolen bandwidth, the total monthly stolen bandwidth, etc.), and further convert it into monetary loss.

[0107] 2. Tiered Alarms: Based on the amount of bandwidth or monetary loss stolen, tiered alarms are triggered according to preset thresholds. For example, a low-level alarm is triggered when the stolen bandwidth exceeds the first threshold (notifying operations personnel to pay attention); a medium-level alarm is triggered when it exceeds the second threshold (notifying the customer and initiating an investigation); and a high-level alarm is triggered when it exceeds the third threshold (emergency measures, such as restricting access from malicious IP ranges). Alarm methods can include in-site notifications, emails, SMS messages, and support tickets.

[0108] 3. Results Archiving: The judgment results (set of malicious IP segments, set of victim domains, risk level, percentage of bandwidth stolen, time-series curve of stolen bandwidth, etc.) are archived and written into the time-series database for subsequent querying, feature characterization and fraud risk assessment, tracing and reuse, etc.

[0109] The detection employs a snapshot window sampling strategy, taking access logs from a fixed-duration window as input. The snapshot window can take one or more of the following forms: 1. Short windows during fixed daily peak times: For example, access logs are retrieved in 30-minute windows during fixed peak times such as morning, noon, and night. Traffic is highest during peak times, and fraudulent activity is most evident, while the short window controls the amount of data queried.

[0110] 2. Multiple time period windows: Select multiple representative time periods (such as peak, off-peak, and idle times) within a day, and take one window for each period to fully cover the traffic characteristics of different time periods.

[0111] 3. Sliding window: A window is slid across the entire day with a fixed step size to achieve near real-time detection, but the computational cost is relatively high.

[0112] As an alternative, the window length and number of snapshots can be configured and adjusted based on alarm sensitivity and query cost. A longer window provides more data but increases query cost; more snapshots result in more comprehensive detection but also higher computational overhead. In engineering practice, a balance must be struck between detection effectiveness and computational cost.

[0113] The technical benefits of snapshot window sampling: While ensuring that the characteristics of fraudulent transactions are observable, it significantly reduces the amount of data that needs to be processed, lowers query costs, and makes detection feasible in the context of massive logs on CDN platforms.

[0114] Based on the above embodiments, this application also provides a CDN traffic detection system, including a data preprocessing unit, a gang subgraph unit, a judgment unit, and a processing unit, wherein: The data preprocessing unit is used to obtain the CDN platform's request-level access logs and domain name bandwidth matrix, normalize the client IP into IP segment main units, and for each access path in the request-level access log, take the maximum value among the maximum number of bytes sent under status code 200 response, the total length of resources declared in Content-Range, and the end position of the request Range as the estimated file size of the path, and extract the traffic characteristic data of the statistical unit consisting of domain name and normalized IP segment main units; The gang subgraph unit is used to obtain suspicious subject seeds. A bipartite graph is constructed with IP segment subject units and victim domain names. The bipartite graph is iteratively expanded based on the suspicious subject seeds. During the iterative expansion process, path independence pruning filtering and whitelist filtering are performed. After the iteration converges, the IP segment subject units with fraudulent behavior are listed as the malicious IP segment set, and together with the victim domain name set, they form a gang subgraph. The statistical unit composed of domain names and IP segment subject units in the gang subgraph is used as the statistical unit set to be judged. The judgment unit is used to calculate the duplicate download rate and single IP download density of each statistical unit in the set of statistical units to be judged based on the file size estimation result. When the duplicate download rate and the single IP download density both exceed their set thresholds, and the number of independent paths of the statistical unit is lower than the set threshold, it is determined that the corresponding statistical unit has fraudulent behavior, and the statistical unit is given a risk level score. The main IP segments in the statistical units that are determined to have fraudulent behavior are summarized into a malicious IP segment set, and the domain names in them are summarized into a victim domain name set. The processing unit calculates the share of bytes belonging to the malicious IP segment set in the total service bytes of the victim domain name within the window, multiplies the share of bytes by the actual bandwidth time-series data of the victim domain name, restores the stolen bandwidth time-series curve, and performs graded alarms and loss assessment based on the stolen bandwidth time-series curve.

[0115] In summary, the CDN traffic detection method and system of this application, relying solely on CDN platform-side request-level access logs and domain name minute-level bandwidth matrix, achieves effective detection of CDN billing fraud through the following technical means: (1) By normalizing the IP segment and estimating the file size by taking the largest of the three, a reliable data foundation was constructed, which aggregated scattered IPs into analyzable actor units and overcame the problem of difficulty in determining the file size under Range segmentation requests; (2) By iteratively expanding the bipartite graph of IP segments and domain names with path independence pruning and whitelist filtering, the boundary of the fraud gang is automatically discovered from a small number of seeds. At the same time, the path independence number pruning is used to prevent the spread explosion, which takes into account both recall rate and computational efficiency. (3) By using structured quantitative discrimination based on the repeated download rate and single IP download density estimated by file size, the essence of the fraudulent activity of repeatedly pulling the same large file can be directly characterized, and the abuse under legitimate authentication can be identified without changing the authentication link; (4) By calculating the bandwidth ratio and restoring the time-series curve of the stolen bandwidth, the billing bandwidth of the victim domain name can be accurately quantitatively attributed, directly supporting hierarchical alarms and loss assessment, and answering the question of how much bandwidth was stolen. (5) By using multi-day persistent verification and malicious IP set backflow, false alarms from a single snapshot are suppressed and an online growth detector is formed, overcoming the shortcomings of static blacklists and whitelists that require manual maintenance.

[0116] This application embodiment also provides a storage medium storing a computer program, which is executed by a processor to perform the CDN traffic detection method as described above.

[0117] This application also provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the CDN traffic detection method described above.

[0118] It should be noted that those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, which may include, but is not limited to, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.

[0119] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A CDN traffic detection method, characterized in that, Includes the following steps: S1: Obtain the CDN platform-side request-level access logs and domain name bandwidth matrix, normalize the client IP into IP segment main units, and for each access path in the request-level access logs, take the maximum value among the maximum number of bytes sent under status code 200 response, the total length of resources declared in Content-Range, and the end position of the request Range as the estimated file size of the path, and extract the traffic characteristic data of the statistical unit consisting of the domain name and the normalized IP segment main unit; S2: Filter the statistical units to determine the set of statistical units to be judged; S3: Based on the file size estimation result, calculate the duplicate download rate and single IP download density of each statistical unit in the set of statistical units to be judged. When the duplicate download rate and the single IP download density both exceed their set thresholds, and the number of independent paths of the statistical unit is lower than the set threshold, it is determined that the corresponding statistical unit has fraudulent behavior, and the statistical unit is scored for risk level. The main IP segments in the statistical units that are determined to have fraudulent behavior are summarized into a malicious IP segment set, and the domain names in them are summarized into a victim domain name set. S4: Calculate the share of bytes belonging to the malicious IP segment set in the total service bytes of the victim domain name within the window, multiply the share of bytes by the actual bandwidth time-series data of the victim domain name to restore the stolen bandwidth time-series curve, and perform graded alarms and loss assessment based on the stolen bandwidth time-series curve.

2. The CDN traffic detection method according to claim 1, characterized in that, Step S2 specifically includes: Obtain seeds from suspicious entities; A bipartite graph is constructed using IP segment main units and victim domain names. The bipartite graph is iteratively expanded based on suspicious subject seeds. Path independence pruning filtering and whitelist filtering are performed during the iterative expansion process. After iterative convergence, the main units of IP segments that exhibit fraudulent behavior are listed as the malicious IP segment set, and together with the victim domain set, they form a gang subgraph. The statistical units composed of domain names and main units of IP segments in the gang subgraph are used as the statistical unit set to be judged.

3. The CDN traffic detection method according to claim 1, characterized in that, The estimated file size for each access path mentioned in step S1 is calculated as follows: ; in: Estimated file size for path p: The maximum number of bytes sent in response to a status code 200 for path p; The total length of the resource declared for the Content-Range; This is the requested end position of the Range.

4. The CDN traffic detection method according to claim 1, characterized in that, The suspicious subject seed mentioned in step S2 is determined based on the idle bandwidth stability seed, wherein the idle bandwidth stability seed determination needs to meet the following condition for J consecutive days: ; in: This represents the ratio of off-peak bandwidth during the early morning hours to the total daily bandwidth. This represents the ratio of off-peak bandwidth during the night to the total daily bandwidth. The peak bandwidth of the day, coefficient of variation The standard deviation of bandwidth for the day: This is the threshold for the percentage of off-peak hours. Peak bandwidth threshold, The threshold for the coefficient of variation. The number of consecutive days to determine.

5. The CDN traffic detection method according to claim 1, characterized in that, The bipartite graph iterative expansion in step S2 includes: S21, Computation Operator A collection of malicious IP segments The resulting set of victim domain names was obtained through filtering. ; S22, Computation Operator From the set of victim domain names The newly added malicious IP ranges were obtained through filtering: ; S23. Iteratively update the set of malicious IP ranges, using the following formula: ; S24. Convergence Decision: When the number of newly added IP segments in this round is less than or equal to the early termination threshold. Or the number of iterations has reached the maximum number of iterations. Stop iterating when the time is right, and obtain the gang subgraph; in: The whitelist exclusion set includes both whitelisted domain names and whitelisted IP range main units. IP range For domain name Service bytes; For byte threshold; For domain name Number of independent paths; IP range Number of independent paths: The threshold for pruning independent paths; For iteration rounds.

6. The CDN traffic detection method according to claim 1, characterized in that, In step S3, the calculation method for the repeated download rate is as follows: ; The method for calculating download density per IP address is as follows: ; in, The total number of bytes actually served by the statistical unit. This estimates the sum of file sizes for each path within the statistical unit. This is the number of unique client IPs within the statistical unit.

7. The CDN traffic detection method according to claim 1, characterized in that, Step S4 specifically includes: S41. Calculate the share of the victim domain name in the total service bytes within the window that belongs to the malicious IP segment set. ; in, This is a collection of malicious IP ranges. IP range For domain name byte service For domain name Total service bytes within the window: S42. Multiply the byte share by the actual bandwidth timing data of the corresponding victim domain name to reconstruct the stolen bandwidth timing curve. For domain name At any moment The actual bandwidth; S43. Execute graded alarms and loss assessments based on the timing curve of the stolen bandwidth.

8. The CDN traffic detection method according to claim 1, characterized in that, After step S3 and before step S4, a multi-day persistence verification step is also included. Get A collection of victim domain names captured on individual day snapshots. The final set of warnings is obtained according to the following formula. : ; in: Let m be the intersection of the sets of m independent daily snapshots of the victim domains. The number of snapshots that were determined to have involved fraudulent transactions. The threshold for the number of times (domain name, IP segment main unit) co-occurs; The domain names and IP ranges specified in the formula conditions are retained as the final alarm targets, while false alarms caused by instantaneous traffic anomalies are filtered out.

9. The CDN traffic detection method according to claim 1, characterized in that, It also includes the process of backfeeding malicious IP addresses: The set of malicious IP segments obtained from the iterative convergence in step S2 is fed back as seeds for suspicious entities to be detected the next day, forming an online iteratively growing detector.

10. The CDN traffic detection method according to claim 1, characterized in that, The risk level scoring of the statistical unit includes: in addition to the values ​​of the repeated download rate and the single IP download density, the scoring also includes the IP segment concentration, the number and distribution of independent user agents, and the operator and geographical province distribution of the client IP of the statistical unit. The statistical unit is divided into low-risk, medium-risk and high-risk levels according to any one of the decision rules, scoring cards or tree models.

11. The CDN traffic detection method according to claim 1, characterized in that, It also includes a snapshot window sampling step: taking the access log of a fixed duration window as input, wherein the snapshot window is one or more of the following: a short window at a fixed peak time of the day, a time period window of multiple representative time periods within a day, or a sliding window that slides throughout the day with a fixed step size.

12. The CDN traffic detection method according to claim 1, characterized in that, The byte share is calculated using a weighted average based on the billing caliber, with higher weights assigned near the effective billing time of the billing rule; and / or, the aforementioned...

13. A CDN traffic detection system, applied to the CDN traffic detection method according to any one of claims 1-12, characterized in that, It includes a data preprocessing unit, a group subgraph unit, a decision unit, and a processing unit, wherein: The data preprocessing unit is used to obtain the CDN platform's request-level access logs and domain name bandwidth matrix, normalize the client IP into IP segment main units, and for each access path in the request-level access log, take the maximum value among the maximum number of bytes sent under status code 200 response, the total length of resources declared in Content-Range, and the end position of the request Range as the estimated file size of the path, and extract the traffic characteristic data of the statistical unit consisting of domain name and normalized IP segment main units; The gang subgraph unit is used to filter the statistical units and determine the set of statistical units to be judged; the judgment unit is used to calculate the duplicate download rate and single IP download density of each statistical unit in the set of statistical units to be judged based on the file size estimation result. When the duplicate download rate and the single IP download density both exceed their set thresholds, and the number of independent paths of the statistical unit is lower than the set threshold, it is determined that the corresponding statistical unit has fraudulent behavior, and the statistical unit is given a risk level score. The main IP segments of the statistical units that are determined to have fraudulent behavior are summarized into a malicious IP segment set, and the domain names in them are summarized into a victim domain name set. The processing unit is used to calculate the share of bytes belonging to the malicious IP segment set in the total service bytes of the victim domain name within the window, multiply the share of bytes by the actual bandwidth time-series data of the victim domain name to restore the stolen bandwidth time-series curve, and perform graded alarms and loss assessment based on the stolen bandwidth time-series curve. The bandwidth theft time-series curve is combined with the content delivery network billing unit price to convert it into an amount loss curve.

Citation Information

Patent Citations

  • Detection of fraudulent use of content delivery network served byte streams

    US11552971B1