Node traffic scheduling method, device and equipment of content distribution network and medium

By constructing a directed network of traffic units, intermediate units, and node units, the problem of coarse-grained CDN node scheduling is solved, enabling precise traffic allocation and rapid policy updates, and improving node control accuracy and resource hit rate.

CN119276786AActive Publication Date: 2025-01-07BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411793601.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-01-07
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

Traditional CDNs have a coarse node scheduling granularity, making it difficult to accurately control small nodes with low bandwidth, low storage capacity, and poor stability, and the scheduling strategy has poor timeliness.

Method used

A directed network of traffic units, intermediate units, and node units is constructed. By solving the problem, the traffic allocation ratio coefficient is determined, and a scheduling strategy is generated to achieve accurate traffic allocation and rapid strategy updates.

Benefits of technology

It improves the accuracy of node control, reduces the number of edges, enables fast solution and strategy update, can respond to quality anomalies at the second level, and improves resource hit rate and real-time performance of scheduling strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276786A_ABST
    Figure CN119276786A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of content distribution networks, and discloses a node traffic scheduling method, device and equipment for a content distribution network and a medium, and the method comprises the steps: constructing at least one traffic unit for each domain name; arranging a plurality of middle units; the intermediate unit corresponds to a plurality of flow units; establishing an edge between the traffic unit and the corresponding intermediate unit, and establishing an edge between the intermediate unit and a node unit used for scheduling the traffic of at least part of the domain name to construct a directed network; solving the directed network, and determining a flow distribution proportionality coefficient between the flow unit and at least part of the node units; and generating a scheduling strategy comprising the flow distribution proportionality coefficient between each flow unit and the corresponding node unit. According to the invention, the appropriate flow distribution proportionality coefficient can be configured as required, the node line control precision is greatly improved, and rapid switching of quality abnormity perception is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of content distribution networks, and in particular to a method, device, equipment and medium for scheduling node traffic in a content distribution network. Background Art

[0002] With the explosion of traffic, traditional CDN (Content Delivery Network) faces huge cost pressure. Currently, there is a kind of node resource in the market that has low bandwidth, low storage, poor stability, but low cost and is closer to user distribution. Effective use of these resources can effectively reduce bandwidth costs while ensuring user access quality.

[0003] Due to the traditional DNS (Domain Name System) scheduling, which is restricted by the number of DNS IPs and the effectiveness time of local DNS, if small nodes with low bandwidth, low storage capacity and poor stability are directly scheduled, the scheduling granularity is relatively coarse and it is difficult to achieve precise line control. Summary of the invention

[0004] In view of this, the present disclosure provides a method, apparatus, device and medium for node traffic scheduling in a content distribution network to solve the problem of coarse traffic scheduling granularity.

[0005] In a first aspect, the present disclosure provides a method for node traffic scheduling in a content distribution network, comprising: Construct at least one traffic unit for each domain name; A plurality of intermediate units are provided; the intermediate units correspond to a plurality of the flow units; Building edges between the traffic units and the corresponding intermediate units, and building edges between the intermediate units and node units for scheduling traffic of at least part of the domain names, to construct a directed network; Solving the directed network to determine a flow distribution ratio coefficient between the flow unit and at least part of the node units; A scheduling strategy including a flow distribution ratio coefficient between each of the flow units and the corresponding node units is generated; the scheduling strategy is used to schedule the flow of the domain name according to the flow distribution ratio coefficient.

[0006] In a second aspect, the present disclosure provides a node traffic scheduling method for a content distribution network, comprising: Get the access request initiated by the client; A node for responding to the access request is determined according to a scheduling policy; the scheduling policy is generated based on the method of the first aspect or any corresponding implementation method thereof.

[0007] In a third aspect, the present disclosure provides a node traffic scheduling device for a content distribution network, including: A flow unit module, used to construct at least one flow unit for each domain name; An intermediate unit module, used to set a plurality of intermediate units; the intermediate unit corresponds to a plurality of the flow units; A network construction module, used to build edges between the traffic units and the corresponding intermediate units, and to build edges between the intermediate units and node units used to schedule traffic of at least part of the domain names, so as to construct a directed network; A processing module, configured to solve the directed network and determine a flow distribution ratio coefficient between the flow unit and at least part of the node units; The strategy generation module is used to generate a scheduling strategy including a flow distribution ratio coefficient between each of the flow units and the corresponding node units; the scheduling strategy is used to schedule the flow of the domain name according to the flow distribution ratio coefficient.

[0008] In a fourth aspect, the present disclosure provides a node traffic scheduling device for a content distribution network, comprising: An acquisition module is used to obtain the access request initiated by the client; A scheduling module is used to determine a node for responding to the access request according to a scheduling strategy; the scheduling strategy is generated based on the method of the first aspect or any corresponding implementation method thereof.

[0009] In a fifth aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the node traffic scheduling method of the content distribution network of the first aspect, the second aspect or any corresponding embodiment thereof by executing the computer instructions.

[0010] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the node traffic scheduling method for a content distribution network of the first aspect, the second aspect or any corresponding embodiment thereof.

[0011] The present invention constructs a directed network from the flow unit to the node unit by setting the flow unit corresponding to the domain name and the node unit corresponding to the node. By solving the directed network, the appropriate flow distribution ratio coefficient can be configured as needed to distribute the flow of multiple flow units to the corresponding multiple nodes, and the node line control accuracy is greatly improved; and, by setting a small number of intermediate units between the flow unit and the node unit, the number of edges of the directed network can be reduced, and a fast solution can be achieved, and the scheduling strategy can be quickly updated, which is conducive to the fast switching of quality anomaly perception. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0013] Figure 1 is a flow chart of a method for scheduling node traffic in a content distribution network according to an embodiment of the present disclosure; Figure 2 is a structural schematic diagram of a directed network according to an embodiment of the present disclosure; Figure 3 is a flow chart of another method for node traffic scheduling of a content distribution network according to an embodiment of the present disclosure; Figure 4 is another structural schematic diagram of a directed network according to an embodiment of the present disclosure; Figure 5 is a switching schematic diagram of a small node state machine according to an embodiment of the present disclosure; Figure 6 is another structural diagram of a directed network according to an embodiment of the present disclosure; Figure 7 is a flow chart of a method for scheduling node traffic in a content distribution network according to another embodiment of the present disclosure; Figure 8 is a timing diagram of traffic scheduling according to an embodiment of the present disclosure; Fig. 9 is a schematic diagram of different scheduling processes for accessing cold and hot resources according to an embodiment of the present disclosure; Fig.10 is a structural block diagram of a node traffic scheduling device for a content distribution network according to an embodiment of the present disclosure; Fig.11 is a structural block diagram of another node traffic scheduling device of a content distribution network according to an embodiment of the present disclosure; Fig.12It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0014] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0015] According to an embodiment of the present disclosure, an embodiment of a method for node traffic scheduling in a content distribution network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0016] In this embodiment, a method for node traffic scheduling of a content distribution network is provided, which can be applied to a policy center of a CDN. The policy center can be specifically deployed on a central node. Figure 1 is a flow chart of a method for scheduling node traffic in a content distribution network according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps.

[0017] Step S101: construct at least one traffic unit for each domain name.

[0018] In this embodiment, in order to schedule the traffic of each domain name in the CDN, a corresponding traffic unit is constructed for each domain name. For a domain name, one traffic unit can be constructed for it, or multiple traffic units can be constructed for it, which can be determined based on actual conditions.

[0019] Specifically, the traffic of the domain name can be allocated based on how many paths can be used to construct a corresponding number of traffic units for the domain name.

[0020] Step S102, setting a plurality of intermediate units; the intermediate units correspond to a plurality of flow units.

[0021] Since CDN has more domain names, the number of traffic units constructed is more. If modeling is directly performed between the traffic unit and the node, the complexity is high. In this embodiment, a layer of intermediate units is added to the traffic unit to reduce the number of edges in modeling.

[0022] Specifically, corresponding intermediate units are set for multiple flow units, and multiple intermediate units need to be set, and each flow unit corresponds to a unique intermediate unit.

[0023] Among them, each traffic unit has corresponding attributes, and an intermediate unit can be set for traffic units with at least some of the same attributes, so that one intermediate unit corresponds to multiple traffic units. When establishing edges with nodes later, a smaller number of intermediate units can be used to establish edges with nodes, and the number of edges is smaller.

[0024] For example, the attributes of a flow unit include the region to which it belongs, which region may be, for example, a province, etc. An intermediate unit may be set for multiple flow units belonging to the same region. It is understood that the attributes of the intermediate unit also include the region, and the region is the same as the region of the corresponding flow unit.

[0025] Step S103: Building edges between the traffic units and the corresponding intermediate units, and building edges between the intermediate units and the node units for scheduling the traffic of at least part of the domain names, so as to construct a directed network.

[0026] In this embodiment, the nodes used for traffic scheduling in the CDN can also be determined, and corresponding node units can be constructed for these nodes, that is, the node units correspond to the nodes of the CDN; for example, a unique node unit can be constructed for each node. After determining each traffic unit, intermediate unit and node unit, the corresponding network, that is, a directed network, can be constructed.

[0027] Specifically, according to the corresponding relationship between the flow unit and the intermediate unit, an edge can be established between the flow unit and the corresponding intermediate unit (that is, an edge for connecting the two units is established); and an edge is also established between the intermediate unit and the node unit, thereby generating a three-layer directed network, the first layer of which includes multiple flow units, the second layer includes multiple intermediate units, and the third layer includes multiple node units.

[0028] Among them, the intermediate unit can establish an edge with each node unit. Since the intermediate unit corresponds to the traffic unit of some domain names, if the node corresponding to a node unit can schedule the traffic of the domain name corresponding to the intermediate unit, an edge can be established between the node unit and the intermediate unit.

[0029] Figure 2 A structural diagram of a directed network is shown in FIG. Figure 2As shown, there are five flow units, namely flow unit 1-1 to flow unit 1-5, and four node units, namely node unit 3-1 to node unit 3-4; and intermediate unit 2-1 is set for flow units 1-1, 1-2, and 1-3, and intermediate unit 2-2 is set for flow units 1-4 and 1-5. Among them, node units 3-1 and 3-2 can schedule the flow from intermediate unit 2-1, and edges can be built between node units 3-1 and 3-2 and intermediate unit 2-1; if node units 3-3 and 3-4 can schedule the flow from intermediate unit 2-1 and intermediate unit 2-2, edges can be built between node units 3-1 and 3-2 and intermediate units 2-1 and intermediate units 2-2. In addition, in order to facilitate the subsequent network solution, the directed network is also provided with a starting source point and an ending sink point.

[0030] It can be understood that the directed network is a network model used to determine the scheduling strategy, in which the node unit is a model of the corresponding CDN node; similarly, the traffic unit and the intermediate unit are also a model and do not represent a real physical machine.

[0031] Step S104, solving the directed network to determine the flow distribution ratio coefficient between the flow unit and at least part of the node units.

[0032] In this embodiment, a directed network is a physical model for traffic scheduling; after the directed network is generated, the directed network can be solved to determine the traffic that should be transmitted between each traffic unit and the corresponding node, thereby determining the traffic distribution ratio coefficient between the traffic unit and the corresponding node unit.

[0033] like Figure 2 As shown, if the traffic unit 1-1 corresponds to 10G of traffic; if after solving the directed network, it is determined that allocating 6G of traffic to the node unit 3-1 and the remaining 4G of traffic to the node unit 3-2 is an optimal allocation strategy, then the traffic allocation ratio coefficient between the traffic unit 1-1 and the node unit 3-1 can be set to 0.6, and the traffic allocation ratio coefficient between the traffic unit 1-1 and the node unit 3-2 can be set to 0.4.

[0034] Step S105, generating a scheduling strategy including a flow distribution ratio coefficient between each flow unit and a corresponding node unit; the scheduling strategy is used to schedule the flow of the domain name according to the flow distribution ratio coefficient.

[0035] In this embodiment, after determining the flow distribution ratio coefficient between each flow unit and the corresponding node unit, a corresponding scheduling strategy can be generated, and the scheduling strategy includes the flow distribution ratio coefficient between each flow unit and the corresponding node unit. When the flow of a domain name is subsequently scheduled, the flow of the domain name can be scheduled according to the corresponding flow distribution ratio coefficient.

[0036] For example, still taking the above example, if the traffic distribution ratio coefficients between the traffic unit 1-1 and the node unit 3-1 and the node unit 3-2 are 0.6 and 0.4 respectively; then when the traffic is subsequently scheduled for the domain name corresponding to the traffic unit 1-1, if the domain name has only one traffic unit 1-1, 60% of the traffic of the domain name will be allocated to the physical node corresponding to the node unit 3-1, and 40% of the traffic will be allocated to the physical node corresponding to the node unit 3-2, thereby realizing traffic scheduling.

[0037] Optionally, after the scheduling strategy is generated, the scheduling strategy can be sent to a scheduler of the CDN, instructing the scheduler to perform traffic scheduling according to the scheduling strategy. Specifically, the scheduler can be deployed in an edge scheduling center of the CDN.

[0038] For example, after the CDN policy center determines the current scheduling strategy through modeling, it can send the scheduling strategy to the CDN edge scheduling center, so that the scheduler of the edge scheduling center can perform traffic scheduling based on the obtained scheduling strategy. The scheduler and the policy center can interact in real time based on the heartbeat mechanism, so that the scheduler can perform scheduling based on the latest scheduling strategy.

[0039] Traditional DNS scheduling is limited by the number of IPs, so the weight ratio of domain names is limited, and the scheduling granularity is coarse, which is not suitable for small nodes with low bandwidth, low storage capacity, and poor stability. For example, it is difficult to achieve a ratio of 1:99. In this embodiment, a corresponding traffic unit is constructed for the domain name, and a corresponding node unit is constructed for the node. By solving the directed network, the appropriate traffic distribution ratio coefficient can be configured as needed, the node control line accuracy is greatly improved, and the bandwidth control line can be upgraded from the original GB (gigabyte, i.e., gigabyte) level to the MB (megabyte) level.

[0040] Moreover, in traditional DNS scheduling, since the local DNS has a TTL cache time, i.e., the survival time (Time ToLive), which is generally at the minute level, such as 2 minutes, 3 minutes, etc.; when the policy changes, it needs to wait until the cache time has passed, resulting in poor timeliness. In this embodiment, the policy center can update the scheduling policy in real time, and by setting the intermediate unit, the number of edges in the directed network can be reduced, which can achieve fast solution, and the scheduling policy can also be quickly updated when the node quality is abnormal, so that the quality abnormality perception switching can be compressed from minutes to seconds.

[0041] The node traffic scheduling method of the content distribution network provided in this embodiment constructs a directed network from the traffic unit to the node unit by setting the traffic unit corresponding to the domain name and the node unit corresponding to the node. By solving the directed network, the appropriate traffic distribution ratio coefficient can be configured as needed to distribute the traffic of multiple traffic units to the corresponding multiple nodes, and the node line control accuracy is greatly improved; and, by setting a small number of intermediate units between the traffic unit and the node unit, the number of edges of the directed network can be reduced, and a fast solution can be achieved, and the scheduling strategy can be quickly updated, which is conducive to the fast switching of quality anomaly perception.

[0042] In this embodiment, another method for node traffic scheduling of a content distribution network is provided, which can be applied to a policy center of a CDN. The policy center can be specifically deployed on a central node. Figure 3 is a flow chart of a method for scheduling node traffic in a content distribution network according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps.

[0043] Step S301: construct at least one traffic unit for each domain name.

[0044] Specifically, the above step S301 "constructing at least one traffic unit for each domain name" includes the following steps S3011.

[0045] Step S3011, constructing at least one traffic unit for the domain name according to at least one region and at least one operator corresponding to the domain name; wherein, in the case of constructing multiple traffic units for the domain name, the region and operator corresponding to one traffic unit of the domain name are not exactly the same as the region and operator corresponding to another traffic unit of the domain name.

[0046] In this embodiment, the attributes of a domain name may specifically include a region and an operator, and a domain name may correspond to one region and one operator, or may correspond to multiple regions and multiple operators. Based on the region and operator corresponding to the domain name, a corresponding traffic unit may be constructed for the domain name. Accordingly, the attributes of the traffic unit constructed for the domain name also include the region and the operator.

[0047] If a domain name corresponds to one region and one operator, only one traffic unit needs to be set for the domain name. If a domain name corresponds to multiple regions and / or multiple operators, multiple traffic units can be constructed for the domain name, and the region and operator corresponding to a certain traffic unit of the domain name are not exactly the same as the region and operator corresponding to another arbitrary traffic unit of the domain name, that is, at least one of the regions and operators corresponding to the two is different. It can be understood that different traffic units of a domain name have different attributes.

[0048] Specifically, if a domain name corresponds to m regions and n operators, a total of m×n traffic units can be constructed for the domain name; m and n are both positive integers.

[0049] Step S302, setting a plurality of intermediate units; the intermediate units correspond to a plurality of flow units.

[0050] Specifically, the above step S302 “setting multiple intermediate units” includes step S3021.

[0051] Step S3021, setting a plurality of intermediate units corresponding to different regions, or setting a plurality of intermediate units corresponding to different regions and operators.

[0052] In this embodiment, the attributes of the flow unit include region and operator. When setting the intermediate unit, the intermediate unit can be set based on the dimension of region only, that is, corresponding intermediate units are set for flow units in different regions respectively, thereby generating multiple intermediate units. In this case, different intermediate units correspond to different regions, that is, the attributes of the intermediate unit can only include region.

[0053] Alternatively, based on the two dimensions of region and operator, corresponding intermediate units can be set for traffic units of different regions and different operators. In this case, different intermediate units correspond to different regions or different operators, that is, the attributes of the intermediate units include not only the region but also the operator.

[0054] Figure 4 Another structural diagram of a directed network is shown. For ease of description, Figure 4 The information related to the operator is not shown. Figure 4As shown, if the domain name a.com corresponds to region 1 and region 3, two traffic units can be set for the domain name a.com, namely "a.com_region 1" and "a.com_region 3"; it can be understood that if the domain name a.com specifically corresponds to operator 1 and operator 2 in region 1, then traffic units such as "a.com_region 1_operator 1" and "a.com_region 1_operator 2" can be specifically constructed, which will not be described in detail here. Similarly, if the domain name b.com corresponds to region 1 and the domain name c.com corresponds to region 2, the traffic unit "b.com_region 1" can be constructed for the domain name b.com, and the traffic unit "c.com_region 2" can be constructed for the domain name c.com.

[0055] Furthermore, corresponding intermediate units can be set according to the regional attributes of the flow unit, such as Figure 4 As shown in Figure 1, you can set the intermediate units corresponding to area 1, area 2, and area 3. For details, see Figure 4 shown.

[0056] Step S303, grouping at least some of the small nodes belonging to the same region and the same operator to form a virtual node including at least some of the small nodes; the small nodes are nodes whose performance is lower than a preset value; In this embodiment, the node with performance lower than the preset value in the CDN is called a small node. The performance can be bandwidth, storage capacity, stability, etc. For example, a node with low bandwidth, low storage capacity, and poor stability can be called a small node. If a node unit is directly set for each small node, due to the poor performance of the small node, not only is it easy to have anomalies, but the hit rate of resources is also low. In this embodiment, multiple small nodes are taken as a whole and called a virtual node, and the virtual node represents multiple small nodes.

[0057] Specifically, each small node is a real CDN physical node, which has attributes such as region and operator. Multiple small nodes with the same region and the same operator can be grouped together to form a corresponding virtual node. For all small nodes with the same region and the same operator, a unique virtual node can be generated, or multiple virtual nodes can be generated, which can be determined based on actual conditions.

[0058] For example, the area of ​​the small node can be further divided; for example, if the area is specifically a province, the city corresponding to each small node can be determined, and then multiple small nodes in the same city and the same operator can be grouped together to form a virtual node.

[0059] Step S304: construct a node unit corresponding to the virtual node.

[0060] In this embodiment, after the virtual nodes corresponding to the multiple small nodes are determined, the node units corresponding to these virtual nodes can be constructed, and a directed network can be constructed based on the node units of the virtual nodes.

[0061] like Figure 4 As shown, for small nodes in different regions or different operators, four virtual nodes, namely virtual nodes 1 to 4, are generated, and then corresponding node units can be generated for each virtual node to achieve modeling of the virtual nodes.

[0062] It can be understood that all node units in the directed network can be node units corresponding to virtual nodes, that is, the directed network is only used to schedule traffic for small nodes. Alternatively, some node units in the directed network correspond to virtual nodes, and other node units correspond to nodes with normal performance, such as large-capacity nodes in data centers. In this case, the directed network can be used to schedule small nodes and normal nodes.

[0063] In some optional embodiments, the method further includes the following step A1.

[0064] Step A1, set corresponding weight coefficients for each small node in the virtual node; the scheduling strategy also includes the weight coefficients of each small node in the virtual node; the scheduling strategy is also used to distribute the traffic allocated to the virtual node to the corresponding small nodes in the virtual node according to the weight coefficient.

[0065] In this embodiment, in order to achieve accurate scheduling of each small node in the virtual node, a corresponding weight coefficient is set for each small node; for example, the corresponding weight coefficient can be set based on the capacity of each small node, and the larger the capacity of the small node, the larger its weight coefficient.

[0066] When generating a scheduling strategy, the weight coefficients of each small node in the virtual node are also added to the scheduling strategy. When traffic scheduling is subsequently performed based on the scheduling strategy, the traffic allocated to the virtual node can be further scheduled to determine which small node needs to be used.

[0067] Optionally, due to the poor performance of CDN small nodes, they are prone to quality problems, such as node suspension, IP unavailability, etc. In response to the quality problems of small nodes, the state machine of each small node can be maintained to switch between node downline, suspension, normal state, etc. Figure 5 A switching diagram of a small node state machine is shown. Using the small node state machine, the status of each small node can be perceived in time, so that node abnormalities can be perceived in time and the scheduling strategy can be updated; the policy center and the scheduler can maintain high-frequency interaction in seconds to achieve timely perception of scheduling.

[0068] Step S305: Building edges between the traffic units and the corresponding intermediate units, and building edges between the intermediate units and the node units for scheduling the traffic of at least part of the domain names, so as to construct a directed network.

[0069] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0070] Step S306, solving the directed network to determine the flow distribution ratio coefficient between the flow unit and at least part of the node units.

[0071] For details, please see Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0072] In some optional implementations, the minimum cost maximum flow model may be used for solving the problem. Specifically, the method further includes step B1.

[0073] Step B1, setting corresponding attribute information for the edge between the flow unit and the intermediate unit, and the edge between the intermediate unit and the node unit; the attribute information includes the flow upper limit of the edge and the amount of resources consumed by transmitting the unit flow.

[0074] Furthermore, the above step S306 “solving the directed network” may include step C1.

[0075] Step C1, solving the directed network with the goal of maximizing the total transmission flow and minimizing the total resource consumption.

[0076] In this embodiment, the constructed directed network is a network flow graph, in which the edges between the units can be set with certain attribute information. Specifically, the attribute information set for each edge in the directed network includes the flow upper limit and the amount of resources consumed by transmitting the unit flow.

[0077] The upper limit of traffic refers to the maximum traffic that can be transmitted by the edge, which can be determined based on the actual situation. The amount of resources refers to how much resources are consumed by the edge to transmit a unit of traffic (for example, 1G of traffic), and the amount of resources can specifically be fees, etc.

[0078] After setting the attribute information of each edge, the directed network can be solved based on the solution method of the minimum cost maximum flow model, with the goal of maximizing the total traffic transmitted and minimizing the total amount of resources consumed, so as to determine how to allocate the traffic so that the directed network can transmit the maximum traffic with the minimum amount of resources. For example, a weak polynomial complexity algorithm can be used for the solution to avoid excessive complexity of the solution; other solutions can also be used, which are not limited in this embodiment.

[0079] In this embodiment, the directed network is solved with the goal of maximizing the total transmission flow and minimizing the total amount of resources consumed. This can not only achieve the solution simply and quickly, but also avoid falling into the local optimum of the greedy algorithm.

[0080] Optionally, the above step S305 of “building an edge between the intermediate unit and the node unit for scheduling traffic of at least part of the domain name” may specifically include step D1.

[0081] Step D1, establish a first edge and a second edge between the intermediate unit and the node unit; the attribute information of the first edge includes a first flow upper limit of the first edge and a first amount of resources consumed by transmitting unit flow, and the attribute information of the second edge includes a second flow upper limit of the second edge and a second amount of resources consumed by transmitting unit flow.

[0082] Among them, the first traffic upper limit and the first resource amount are real values ​​determined based on the actual situation between the intermediate unit and the node unit; the second traffic upper limit matches the traffic size transmitted between the intermediate unit and the node unit in the last cycle of generating the scheduling strategy; the second resource amount is less than the first resource amount and less than the preset minimum resource amount threshold.

[0083] A directed network can be constructed by establishing an edge between the intermediate unit and the node unit. In this embodiment, at least two edges, namely the first edge and the second edge, are established between the intermediate unit and the node unit. By setting appropriate attribute information for the first edge and the second edge, traffic scheduling can be achieved while preventing node policy jitter.

[0084] Specifically, when establishing the first edge between the intermediate unit and the node unit, normal attribute information can be set for the first edge in the same manner as establishing a single edge, that is, the first traffic upper limit and the first resource amount of the first edge are both normal real values; for example, the first traffic upper limit can be set based on the actual traffic upper limit between the intermediate unit and the node unit, and the first resource amount can be set based on the actual cost between the intermediate unit and the node unit.

[0085] Since the scheduling strategy can be generated multiple times in real time, multiple cycles for generating the scheduling strategy can be divided based on this, for example, every period of time is regarded as a cycle; when establishing the second edge between the intermediate unit and the node unit, the traffic size transmitted between the intermediate unit and the node unit in the previous cycle of generating the scheduling strategy can be determined, and the second traffic upper limit of the second edge can be set based on the traffic size; for example, the second traffic upper limit is less than or equal to the traffic size. In addition, a smaller second resource amount is set for the second edge, that is, the second resource amount is less than the first resource amount, and less than the preset minimum resource amount threshold. Among them, the minimum resource amount threshold can be, for example, the minimum value of the resource amounts of all edges.

[0086] By establishing the first edge and the second edge between the intermediate unit and the node unit, when solving the directed network, since the second resource amount of the second edge is smaller, the second traffic upper limit traffic will be allocated to the second edge first, so that in the current cycle, the second traffic upper limit traffic will also be allocated between the intermediate unit and the node unit, which is consistent with the previous cycle. In this way, the traffic is preferentially fixed on the node allocated in the previous cycle, which can effectively prevent node strategy jitter.

[0087] Figure 6 Another structural diagram of a directed network is shown in Figure 4 As shown in Figure 2, there are improvements based on the directed network. Figure 6 As shown in the figure, if in the previous cycle, the 5G traffic transmitted by the traffic unit "a.com_region 1" was allocated to virtual node 1; then in the current cycle, in addition to establishing the first edge between the intermediate unit corresponding to the traffic unit "a.com_region 1" and the node unit corresponding to virtual node 1, a second edge with a second traffic upper limit of 5G and a smaller second resource amount is established, and a new scheduling strategy is formed. When scheduling based on the new scheduling strategy, the 5G traffic of the traffic unit "a.com_region 1" will be allocated to virtual node 1 again, which effectively avoids node jitter.

[0088] In addition, optionally, the above step S305 "constructing a directed network" may specifically include step D2.

[0089] Step D2, setting a sink of the directed network; building edges between each node unit and the sink, and building multiple edges between the node unit and the sink; each edge between the node unit and the sink corresponds to a different amount of resources, and the sum of the flow limits corresponding to all the edges between the node unit and the sink is the flow limit between the node unit and the sink.

[0090] As described above, a directed network is provided with a sink, and corresponding edges are also built between each node unit and the sink. In this embodiment, multiple edges are built between the node unit and the sink, and each edge corresponds to a certain flow limit, so that the sum of the flow limits corresponding to all edges is the flow limit between the corresponding node unit and the sink; and each edge is set with different resource amounts, that is, the same node unit reaches the sink based on different edges, and the amount of resources consumed is high or low.

[0091] Among them, for different node units, the amount of resources set for one edge of one node unit is the same as the amount of resources set for one edge of another node unit, that is, the amounts of resources set for three edges of different node units are the same.

[0092] like Figure 6As shown in the figure, the node unit corresponding to each virtual node has three edges with the sink, and the flow limit of each edge can be set to 1 / 3 of the capacity limit between the corresponding node unit and the sink; and the resource amount of the three edges increases in sequence. Since each node unit has an edge with low resource amount and an edge with high resource amount, Figure 6 When solving the directed network shown in the figure, each node unit is preferentially allocated a portion of the traffic (for example, 1 / 3 of the traffic), so as to ensure the balance of use among the nodes.

[0093] Step S307, generating a scheduling strategy including a flow distribution ratio coefficient between each flow unit and a corresponding node unit; the scheduling strategy is used to schedule the flow of the domain name according to the flow distribution ratio coefficient.

[0094] For details, please see Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.

[0095] The node traffic scheduling method for the content distribution network provided in this embodiment greatly improves the node line control accuracy and is conducive to the rapid switching of quality anomaly perception. Taking multiple small nodes as a virtual node and using virtual nodes for traffic scheduling can not only deal with the situation of small node quality anomalies, but also improve the overall resource hit rate. Establishing the first edge and the second edge between the intermediate unit and the node unit can prevent node policy jitter; establishing multiple edges between the node unit and the sink, and the amount of resources on each edge increases successively, can ensure the balance of use between nodes.

[0096] In this embodiment, a method for node traffic scheduling of a content distribution network is provided, which can be applied to a scheduler of a CDN. The scheduler can be specifically deployed in an edge scheduling center of the CDN. Figure 7 is a flow chart of a method for scheduling node traffic in a content distribution network according to an embodiment of the present disclosure, such as Figure 7 As shown, the process includes the following steps.

[0097] Step S701: obtaining an access request initiated by a client.

[0098] Step S702: determine a node for responding to the access request according to a scheduling policy.

[0099] In this embodiment, the scheduler and the policy center can interact in real time based on a heartbeat mechanism, etc., so as to obtain the scheduling policy generated by the policy center in real time. The scheduling policy is generated based on the method provided in the above embodiment, which will not be described in detail here.

[0100] If the scheduler obtains the access request initiated by the client, it means that the access request needs to be scheduled. At this time, the scheduler can determine the node for responding to the access request based on the scheduling strategy, and thus can instruct the node to respond to the access request to return the corresponding resources to the client. It can be understood that the node can be a physical node of the CDN.

[0101] Figure 8 A timing diagram for traffic scheduling is shown. Figure 8 As shown, the policy center can determine each traffic unit, intermediate unit and node unit based on node information and domain name information, and build edges to construct a directed network; and, based on log data, the traffic size corresponding to each traffic unit can be determined to solve the directed network and generate the optimal scheduling strategy; the scheduling strategy can be updated in a timely manner based on the quality data of each node.

[0102] The scheduler at the edge of the CDN can maintain high-frequency interaction with the policy center at the second level, obtain the latest scheduling strategy in a timely manner, and use the latest scheduling strategy as the local strategy.

[0103] When a client initiates an access request, after receiving the access request, the server of the access node can determine whether the domain name accessed by the access request has the 302 function (i.e., redirection function) enabled. If the domain name does not have 302 enabled, the server directly responds to the access request without the need for the scheduler to schedule. On the contrary, if the domain name has 302 enabled, the server forwards the access request to the scheduler; after receiving the access request, the scheduler makes a policy decision on traffic scheduling based on the locally stored policy (i.e., the scheduling policy generated by the policy center), thereby determining the corresponding physical node, which responds to the access request.

[0104] The node traffic scheduling method of the content distribution network provided in this embodiment is that the scheduler performs traffic scheduling based on the scheduling policy generated by the policy center, which can achieve precise line control; and the scheduler and the policy center can interact with each other in seconds, and can obtain the latest scheduling policy in time, and can compress the quality anomaly perception switching from minutes to seconds.

[0105] In some optional implementations, the above step S702 "determining a node for responding to the access request according to a scheduling policy" may specifically include the following steps E1 to E2.

[0106] Step E1, determining the target node unit for responding to the access request according to the corresponding traffic distribution ratio coefficient in the scheduling strategy.

[0107] Step E2: When the target node unit corresponds to a virtual node, a target small node for responding to the access request is selected according to the weight coefficients of each small node in the target node unit.

[0108] In this embodiment, when the scheduler performs traffic scheduling, it first schedules the current access request based on the traffic allocation ratio coefficient between the traffic unit and the node unit to determine the node unit for responding to the access request, that is, the target node unit.

[0109] For example, if the current scheduling strategy is based on Figure 4 As determined by the directed network shown, when the scheduler receives an access request for accessing the domain name a.com, if the access request corresponds to area 3, the scheduler can determine based on the current scheduling policy that the node corresponding to virtual node 3 or virtual node 4 can be used to respond to the access request. If the traffic unit of "a.com_area 3" and the traffic distribution ratio coefficients between virtual node 3 and virtual node 4 are 0.2 and 0.8 respectively, the access request has a 20% probability of being distributed to virtual node 3 and an 80% probability of being distributed to virtual node 4. If it is finally determined that the access request is distributed to virtual node 3, the node unit corresponding to virtual node 3 is the target node unit.

[0110] If the target node unit corresponds to a virtual node, since the virtual node includes multiple real small nodes, it is necessary to further determine which small node responds. Specifically, the small node used to respond to the access request, i.e., the target small node, can be selected based on the weight coefficient of each small node in the target node unit. Among them, the principle of selecting the target small node based on the weight coefficient is similar to the principle of determining the target node unit based on the traffic distribution ratio coefficient, and will not be repeated here.

[0111] Optionally, the above step E1 of "determining the target node unit for responding to the access request according to the corresponding traffic allocation ratio coefficient in the scheduling strategy" may include the following steps E11 to E12.

[0112] Step E11, when the access request is for accessing cold resources, determine the hash value of the access request; perform consistent hashing according to the hash value and the corresponding traffic distribution ratio coefficient in the scheduling strategy, and determine the target node unit for responding to the access request.

[0113] Step E12: When the access request is for accessing hot resources, a polling method is adopted to determine the target node unit for responding to the access request according to the corresponding flow distribution ratio coefficient in the scheduling strategy.

[0114] Similarly, the above step E2 "selecting a target small node for responding to the access request according to the weight coefficient of each small node in the target node unit" may include the following steps E21 to E22.

[0115] Step E21, when the access request is for accessing cold resources, determine the hash value of the access request; perform consistent hashing based on the hash value and the weight coefficient of each small node in the target node unit to determine the target small node for responding to the access request.

[0116] Step E22, when the access request is for accessing hot resources, a polling method is adopted to select a target small node for responding to the access request according to the weight coefficient of each small node in the target node unit.

[0117] In this embodiment, the resource accessed by the access request may be a cold resource with a low access frequency, or a hot resource with a high access frequency; wherein, the cold resources and hot resources may be divided based on actual needs, which is not limited here.

[0118] If the access request is for accessing cold resources, a consistent hash method is used to determine the appropriate physical machine so that the same physical machine is used as much as possible when accessing the same resource, which can also improve the hit rate of the physical machine. If the access request is for accessing hot resources, a polling method is used to determine the appropriate physical machine to avoid problems such as overheating of a node and scheduling deviation, and the node water level can be better controlled.

[0119] Fig. 9 Figure 2 shows different scheduling processes for accessing hot and cold resources. Fig. 9 As shown, if the access request is used to access cold resources, the hash value of the access request can be determined. For example, the hash value can be determined based on the resource address accessed by the access request. When determining the virtual node for the response, a consistent hash process can be performed based on the hash value and the corresponding traffic allocation ratio coefficient in the scheduling strategy to determine the node unit corresponding to the corresponding virtual node; for example, a hash ring can be established based on the traffic allocation ratio coefficient, and the corresponding target node unit can be determined by which position in the hash ring the hash value hits. The detailed process of consistent hash processing is not described in detail in this embodiment.

[0120] Among them, whether it is necessary to use a virtual node can be determined based on the hash value. If the virtual node is not needed, the large-capacity node at the edge can be used directly to respond. It can be understood that determining whether to use a virtual node is not a necessary step.

[0121] After determining the target node unit, if the target node unit is a virtual node, it is necessary to further perform consistent hash processing based on the hash value and the weight coefficients of each small node in the virtual node to determine the corresponding target small node, that is, the physical machine where the target small node is located responds.

[0122] Similarly, if the access request is for accessing hot resources, the consistent hashing method is not used, but the polling method is used to select the appropriate target node unit and the corresponding target small node. Fig. 9 As shown, a WRR (Weighted Round Robin) method may be specifically adopted, which will not be described in detail here.

[0123] In addition, optionally, the “selecting a target small node for responding to the access request” in the above step E2 or step E22 may further include: Step E23, determine whether the physical machine where the target small node is located has multiple lines.

[0124] Step E24: When there are multiple lines, one of the lines is selected in a round-robin manner as the line for responding to the access request.

[0125] In this embodiment, since some physical machines in the CDN can be equipped with multiple network cards, each network card is equipped with a corresponding public IP, which corresponds to a line. Therefore, after determining the target small node, it is necessary to continue to determine whether the physical machine where the target small node is located has multiple lines, that is, to determine whether the physical machine has multiple network cards.

[0126] like Fig. 9 As shown in the figure, if the physical machine has only one line, the only line of the physical machine can be directly selected, and the response is based on the public IP of the physical machine. If the physical machine has multiple lines, a polling method can be used (regardless of cold resources or hot resources) to select one of the lines as the line for responding to the access request to ensure the balance of each line.

[0127] Among them, for small nodes that need to be scheduled, a backup server 302 can be deployed for them. When the network card bandwidth of the physical machine where the small node is located is full, the access request 302 can be sent to the large-capacity node at the edge according to a certain preset ratio to reduce the probability of node explosion.

[0128] In this embodiment, the scheduler uses consistent hashing and polling to schedule cold and hot resources respectively, which can ensure the hit rate of the physical machine and achieve balance among the physical machines to prevent hot spot resources from overwhelming the nodes.

[0129] In this embodiment, a node traffic scheduling device for a content distribution network is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0130] This embodiment provides a node traffic scheduling device for a content distribution network, which can be applied to a policy center, such as Fig.10 As shown, including: The flow unit module 1001 is used to construct at least one flow unit for each domain name; The intermediate unit module 1002 is used to set a plurality of intermediate units; the intermediate units correspond to the plurality of flow units; A network construction module 1003, configured to construct an edge between the traffic unit and the corresponding intermediate unit, and to construct an edge between the intermediate unit and a node unit for scheduling traffic of at least part of the domain name, so as to construct a directed network; The processing module 1004 is used to solve the directed network and determine the flow distribution ratio coefficient between the flow unit and at least part of the node units; The strategy generation module 1005 is used to generate a scheduling strategy including a traffic distribution ratio coefficient between each of the traffic units and the corresponding node units; the scheduling strategy is used to schedule the traffic of the domain name according to the traffic distribution ratio coefficient.

[0131] In some optional embodiments, the device further includes a node unit module, which is used to: At least some small nodes belonging to the same region and the same operator are grouped together to form a virtual node including the at least some small nodes; the small nodes are nodes whose performance is lower than a preset value; A node unit corresponding to the virtual node is constructed.

[0132] In some optional implementations, the processing module 1004 is further configured to: A corresponding weight coefficient is set for each small node in the virtual node; the scheduling strategy also includes the weight coefficient of each small node in the virtual node; the scheduling strategy is also used to distribute the traffic allocated to the virtual node to the corresponding small node in the virtual node according to the weight coefficient.

[0133] In some optional implementations, the flow unit module 1001 constructs at least one flow unit for each domain name, including: According to at least one region and at least one operator corresponding to the domain name, at least one traffic unit is constructed for the domain name; wherein, in the case where multiple traffic units are constructed for the domain name, the region and the operator corresponding to one traffic unit of the domain name are not completely the same as the region and the operator corresponding to another traffic unit of the domain name; The intermediate unit module 1002 is provided with a plurality of intermediate units, including: Set up multiple intermediate units corresponding to different areas; or set up multiple intermediate units corresponding to different areas and operators.

[0134] In some optional implementations, the network construction module 1003 is further configured to: For the edge between the flow unit and the intermediate unit, and the edge between the intermediate unit and the node unit, respectively, corresponding attribute information is set; the attribute information includes the flow upper limit of the edge and the amount of resources consumed by transmitting the unit flow; The processing module 1004 solves the directed network, including: The directed network is solved with the goal of maximizing the total transmission flow and minimizing the total amount of resources consumed.

[0135] In some optional implementations, the network construction module 1003 establishes an edge between the intermediate unit and a node unit for scheduling traffic of at least part of the domain name, including: A first edge and a second edge are established between the intermediate unit and the node unit; the attribute information of the first edge includes a first flow upper limit of the first edge and a first resource amount consumed by transmitting a unit flow, and the attribute information of the second edge includes a second flow upper limit of the second edge and a second resource amount consumed by transmitting a unit flow; Among them, the first traffic upper limit and the first resource amount are real values ​​determined based on the actual situation between the intermediate unit and the node unit; the second traffic upper limit matches the traffic size transmitted between the intermediate unit and the node unit in the last cycle of generating the scheduling strategy; the second resource amount is less than the first resource amount and less than the preset minimum resource amount threshold.

[0136] In some optional implementations, the network construction module 1003 constructs a directed network including: Setting a sink of the directed network; An edge is built between each of the node units and the sink, and multiple edges are built between the node unit and the sink; each edge between the node unit and the sink corresponds to a different amount of resources, and the sum of the flow limits corresponding to all the edges between the node unit and the sink is the flow limit between the node unit and the sink.

[0137] In some optional implementations, the device further includes a sending module, configured to: send the scheduling strategy to a scheduler, and instruct the scheduler to perform traffic scheduling according to the scheduling strategy.

[0138] This embodiment provides a node traffic scheduling device for a content distribution network, which can be applied to a scheduler, such as Fig.11As shown, including: The acquisition module 1101 is used to acquire the access request initiated by the client; The scheduling module 1102 is used to determine a node for responding to the access request according to a scheduling policy; the scheduling policy is generated based on the method provided in any of the above embodiments.

[0139] In some optional implementations, the scheduling module 1102 determines the node for responding to the access request according to the scheduling policy, including: Determine the target node unit for responding to the access request according to the corresponding traffic allocation ratio coefficient in the scheduling strategy; In the case where the target node unit corresponds to a virtual node, a target small node for responding to the access request is selected according to the weight coefficients of each small node in the target node unit.

[0140] In some optional implementations, the scheduling module 1102 determines the target node unit for responding to the access request according to the corresponding traffic allocation ratio coefficient in the scheduling strategy, including: In the case where the access request is for accessing cold resources, determining a hash value of the access request; performing consistent hashing according to the hash value and a corresponding traffic allocation ratio coefficient in the scheduling strategy to determine a target node unit for responding to the access request; In the case where the access request is for accessing a hot resource, a target node unit for responding to the access request is determined in a polling manner according to a corresponding flow distribution ratio coefficient in a scheduling strategy; and / or, The scheduling module 1102 selects a target small node for responding to the access request according to the weight coefficient of each small node in the target node unit, including: In the case where the access request is for accessing a cold resource, determining a hash value of the access request; performing consistent hashing according to the hash value and the weight coefficients of each small node in the target node unit to determine a target small node for responding to the access request; In the case where the access request is for accessing hot resources, a polling method is adopted to select a target small node for responding to the access request according to the weight coefficient of each small node in the target node unit.

[0141] In some optional implementations, the scheduling module 1102 selects a target small node for responding to the access request, including: Determine whether there are multiple lines on the physical machine where the target small node is located; In the case where there are multiple lines, one of the lines is selected in a polling manner as the line for responding to the access request.

[0142] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0143] The node traffic scheduling device of the content distribution network in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0144] The present disclosure also provides a computer device having the above Fig.10 or Fig.11 A node traffic scheduling device for a content distribution network is shown.

[0145] See also Fig.12 , Fig.12 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Fig.12 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.12 A processor 10 is taken as an example.

[0146] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0147] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0148] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0149] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0150] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0151] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0152] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0153] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for node traffic scheduling in a content distribution network, characterized in that: The method comprises: Construct at least one traffic unit for each domain name; A plurality of intermediate units are provided; the intermediate units correspond to a plurality of the flow units; Building edges between the traffic units and the corresponding intermediate units, and building edges between the intermediate units and node units for scheduling traffic of at least part of the domain names, to construct a directed network; Solving the directed network to determine a flow distribution ratio coefficient between the flow unit and at least part of the node units; A scheduling strategy including a flow distribution ratio coefficient between each of the flow units and the corresponding node units is generated; the scheduling strategy is used to schedule the flow of the domain name according to the flow distribution ratio coefficient.

2. The method according to claim 1, characterized in that Also includes: Taking at least some small nodes belonging to the same region and the same operator as a group, forming a virtual node including the at least some small nodes; The small node is a node whose performance is lower than a preset value; A node unit corresponding to the virtual node is constructed.

3. The method according to claim 2, characterized in that Also includes: A corresponding weight coefficient is set for each small node in the virtual node; the scheduling strategy also includes the weight coefficient of each small node in the virtual node; the scheduling strategy is also used to distribute the traffic allocated to the virtual node to the corresponding small node in the virtual node according to the weight coefficient.

4. The method according to any one of claims 1 to 3, characterized in that The step of constructing at least one flow unit for each domain name includes: According to at least one region and at least one operator corresponding to the domain name, at least one traffic unit is constructed for the domain name; wherein, in the case where multiple traffic units are constructed for the domain name, the region and the operator corresponding to one traffic unit of the domain name are not completely the same as the region and the operator corresponding to another traffic unit of the domain name; The multiple intermediate units are provided, including: Set up multiple intermediate units corresponding to different areas; or set up multiple intermediate units corresponding to different areas and operators.

5. The method according to claim 1, characterized in that Also includes: Setting corresponding attribute information for the edge between the flow unit and the intermediate unit, and the edge between the intermediate unit and the node unit respectively; The attribute information includes the flow limit of the edge and the amount of resources consumed by transmitting a unit flow; The solving the directed network includes: The directed network is solved with the goal of maximizing the total transmission flow and minimizing the total amount of resources consumed.

6. The method according to claim 5, characterized in that The step of establishing an edge between the intermediate unit and a node unit for scheduling traffic of at least part of the domain name includes: A first edge and a second edge are established between the intermediate unit and the node unit; the attribute information of the first edge includes a first flow upper limit of the first edge and a first resource amount consumed by transmitting a unit flow, and the attribute information of the second edge includes a second flow upper limit of the second edge and a second resource amount consumed by transmitting a unit flow; Among them, the first traffic upper limit and the first resource amount are real values ​​determined based on the actual situation between the intermediate unit and the node unit; the second traffic upper limit matches the traffic size transmitted between the intermediate unit and the node unit in the last cycle of generating the scheduling strategy; the second resource amount is less than the first resource amount and less than the preset minimum resource amount threshold.

7. The method according to claim 5, characterized in that The construction of the directed network comprises: Setting a sink of the directed network; An edge is built between each of the node units and the sink, and multiple edges are built between the node unit and the sink; each edge between the node unit and the sink corresponds to a different amount of resources, and the sum of the flow limits corresponding to all the edges between the node unit and the sink is the flow limit between the node unit and the sink.

8. The method according to claim 1, characterized in that Also includes: The scheduling strategy is sent to the scheduler, instructing the scheduler to perform traffic scheduling according to the scheduling strategy.

9. A method for node traffic scheduling in a content distribution network, characterized in that: The method comprises: Get the access request initiated by the client; A node for responding to the access request is determined according to a scheduling policy; the scheduling policy is generated based on the method described in any one of claims 1 to 8.

10. The method according to claim 9, characterized in that The determining, according to the scheduling policy, a node for responding to the access request comprises: Determine the target node unit for responding to the access request according to the corresponding traffic allocation ratio coefficient in the scheduling strategy; In the case where the target node unit corresponds to a virtual node, a target small node for responding to the access request is selected according to the weight coefficients of each small node in the target node unit.

11. The method according to claim 10, characterized in that The step of determining the target node unit for responding to the access request according to the corresponding traffic distribution ratio coefficient in the scheduling strategy includes: In the case where the access request is for accessing cold resources, determining a hash value of the access request; performing consistent hashing according to the hash value and a corresponding traffic allocation ratio coefficient in the scheduling strategy to determine a target node unit for responding to the access request; In the case where the access request is for accessing a hot resource, a target node unit for responding to the access request is determined in a polling manner according to a corresponding flow distribution ratio coefficient in a scheduling strategy; and / or, The step of selecting a target small node for responding to the access request according to the weight coefficients of each small node in the target node unit includes: In the case where the access request is for accessing a cold resource, determining a hash value of the access request; performing consistent hashing according to the hash value and the weight coefficients of each small node in the target node unit to determine a target small node for responding to the access request; In the case where the access request is for accessing hot resources, a polling method is adopted to select a target small node for responding to the access request according to the weight coefficient of each small node in the target node unit.

12. The method according to claim 10, characterized in that The selecting a target small node for responding to the access request includes: Determine whether there are multiple lines on the physical machine where the target small node is located; In the case where there are multiple lines, one of the lines is selected in a polling manner as the line for responding to the access request.

13. A node traffic scheduling device for a content distribution network, characterized in that: The device comprises: A flow unit module, used to construct at least one flow unit for each domain name; An intermediate unit module, used to set a plurality of intermediate units; the intermediate unit corresponds to a plurality of the flow units; A network construction module, used to build edges between the traffic units and the corresponding intermediate units, and to build edges between the intermediate units and node units used to schedule traffic of at least part of the domain names, so as to construct a directed network; A processing module, configured to solve the directed network and determine a flow distribution ratio coefficient between the flow unit and at least part of the node units; The strategy generation module is used to generate a scheduling strategy including a flow distribution ratio coefficient between each of the flow units and the corresponding node units; the scheduling strategy is used to schedule the flow of the domain name according to the flow distribution ratio coefficient.

14. A node traffic scheduling device for a content distribution network, characterized in that: The device comprises: An acquisition module is used to obtain the access request initiated by the client; A scheduling module, used to determine a node for responding to the access request according to a scheduling strategy; the scheduling strategy is generated based on the method described in any one of claims 1 to 8.

15. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 12 by executing the computer instructions.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • CDN cloud platform and flow scheduling method thereof

    CN104994123A

  • Method for accessing Internet by intranet terminal, device and system thereof

    CN111988292A

  • Method, device and system for processing access request in content distribution system

    CN112311826A

  • Content distribution network-based content resource acquisition method and device, and storage medium

    CN116389773A

  • CDN switching method, device and system, server and storage medium

    CN117835343A