Traffic scheduling method and device, electronic equipment and storage medium
By predicting future traffic changes and scheduling CDN traffic at the target time, the problem of excessive traffic utilization caused by incomplete scheduling in existing technologies is solved, thus improving scheduling efficiency and effectiveness.
Patent Information
- Application Number
- CN202410734960.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-06-07
AI Technical Summary
Existing CDN traffic scheduling methods are prone to traffic utilization exceeding limits before scheduling is completed when data exceeds a set threshold. Furthermore, when scheduling is insufficient, multiple scheduling operations are required, resulting in low scheduling efficiency.
By acquiring traffic change data from network nodes, we can predict traffic changes in future time periods and, under preset conditions, determine the target time for traffic scheduling. This proactive, automatic scheduling avoids exceeding traffic utilization limits and optimizes the scheduling process.
It enables scheduling to be completed before traffic utilization exceeds the limit, avoiding multiple scheduling operations and improving scheduling efficiency and effectiveness.
Smart Images

Figure CN118802756B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer network technology, and specifically relates to a traffic scheduling method, device, electronic device and storage medium. Background Technology
[0002] To reduce the expansion costs of the Content Delivery Network (CDN) for broadband TV services of telecom operators in various regions, it is necessary to improve the utilization rate of the CDN for broadband TV services of telecom operators in various regions. In order to improve the utilization rate of the CDN for broadband TV services of telecom operators in various regions, it is necessary to rationally schedule CDN traffic.
[0003] The relevant scheduling methods generally involve scheduling when the current data exceeds a set threshold. However, this scheduling method is prone to causing traffic utilization to exceed the limit before the scheduling is completed. In addition, multiple scheduling operations are required when the scheduling is insufficient, resulting in low scheduling efficiency and poor final scheduling effect. Summary of the Invention
[0004] This application provides a traffic scheduling method, apparatus, electronic device, and storage medium, which can solve the problem that related scheduling methods perform scheduling when the current data exceeds a set threshold, resulting in poor scheduling performance.
[0005] In a first aspect, embodiments of this application provide a traffic scheduling method, the method comprising: acquiring first traffic change data of a network node corresponding to a preset time period, and predicting second traffic change data of the network node corresponding to a future time period based on the first traffic change data; when the second traffic change data meets preset scheduling triggering conditions, determining, based on the second traffic change data and the first traffic change data, the traffic to be dispatched out of the network node at multiple times within the future time period and the traffic to be dispatched in at the current time; determining, based on the traffic to be dispatched out at multiple times within the future time period, a target time of the network node; the target time being the time with the largest traffic to be dispatched out in the determined target time period, the future time period including the target time period; performing traffic scheduling based on the traffic to be dispatched in and the target traffic to be dispatched out of each network node; the target traffic to be dispatched out being determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
[0006] Secondly, embodiments of this application provide a traffic scheduling device, the device comprising: a prediction module, configured to acquire first traffic change data of a network node corresponding to a preset time period, and predict second traffic change data of the network node corresponding to a future time period based on the first traffic change data; a first determination module, configured to determine, based on the second traffic change data and the first traffic change data, the traffic to be dispatched out and the traffic to be dispatched in at the current time of a network node at multiple times within the future time period, provided that the second traffic change data meets a preset scheduling trigger condition; a second determination module, configured to determine a target time of the network node based on the traffic to be dispatched out at multiple times within the future time period; the target time is the time with the largest traffic to be dispatched out in the determined target time period, and the future time period includes the target time period; and a scheduling module, configured to perform traffic scheduling based on the traffic to be dispatched in and the target traffic to be dispatched out of each network node; the target traffic to be dispatched out is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
[0007] Thirdly, embodiments of this application provide an electronic device comprising: a processor; and a memory arranged to store computer-executable instructions configured to be executed by the processor, the executable instructions including instructions for performing the traffic scheduling method as described in the first aspect.
[0008] Fourthly, embodiments of this application provide a storage medium for storing computer-executable instructions that cause a computer to perform the traffic scheduling method as described in the first aspect.
[0009] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the traffic scheduling method as described in the first aspect.
[0010] In a sixth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the traffic scheduling method as described in the first aspect.
[0011] In this embodiment, by acquiring first traffic change data of network nodes within a preset time period, and predicting second traffic change data of network nodes within a future time period based on the first traffic change data, and then, when the second traffic change data meets preset scheduling triggering conditions, determining the outgoing traffic and incoming traffic of network nodes at multiple moments within the future time period based on the second traffic change data and the first traffic change data, and determining the target time of network nodes based on the outgoing traffic at multiple moments within the future time period; the target time is the moment with the largest outgoing traffic within the determined target time period, and the future time period includes the target time period. Subsequently, based on the incoming traffic and target outgoing traffic of each network node... Traffic scheduling is performed based on the target traffic volume. The target traffic volume to be dispatched is determined based on the second traffic volume change data corresponding to the target time and the first traffic volume change data corresponding to the current time. Compared with related scheduling methods, which perform scheduling when the current data exceeds a set threshold, this solution predicts whether traffic scheduling is needed in future periods at the current time and performs automatic scheduling in advance. It can complete the scheduling before the traffic utilization rate exceeds the limit, solving the problem of traffic utilization exceeding the limit before the scheduling is completed. Furthermore, traffic scheduling is performed based on the target traffic volume to be dispatched at the time with the largest traffic volume in the target period, avoiding the need for multiple scheduling in a short period of time due to insufficient traffic volume, thus improving the scheduling efficiency and ultimately achieving better scheduling results. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating a traffic scheduling method provided in an embodiment of this application;
[0013] Figure 2 This is a schematic diagram of a process for determining a target time according to an embodiment of this application;
[0014] Figure 3 This is a flowchart illustrating another traffic scheduling method provided in an embodiment of this application;
[0015] Figure 4 This is a schematic diagram of the structure of a traffic scheduling device provided in an embodiment of this application;
[0016] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] 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 some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0019] The traffic scheduling method, apparatus, electronic device, and storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0020] Figure 1 This illustration shows a traffic scheduling method provided by an embodiment of the present invention. The method can be executed by an electronic device, which may include a server and / or a terminal device, wherein the terminal device may be, for example, a vehicle-mounted terminal or a mobile terminal. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:
[0021] S102: Obtain the first traffic change data of the network node in a preset time period, and based on the first traffic change data, predict the second traffic change data of the network node in a future time period.
[0022] Specifically, the first traffic change data, the second traffic change data, and the traffic change data below are all traffic data that change over time. This traffic data can include CDN traffic, switch traffic, and metropolitan area network traffic.
[0023] The preset time period refers to a pre-defined time period that has already occurred. It can be a statistical period with a preset number of events, including the current moment. The future time period can be a statistical period with a preset number of events after the current moment. The statistical period can be set to a month, a week, a day, etc., without specific limitations here.
[0024] Time series prediction models can be used to predict the second flow changes of network nodes in future periods, such as the Prophet prediction model and models modified from the Prophet model.
[0025] In practical applications, it can be periodically determined whether to perform traffic scheduling. For example, at 5:00 AM on April 30, 2023 (i.e., the current time is 5:00 AM on April 30, 2023), it can be determined whether to perform traffic scheduling: First traffic change data for the network node during a preset time period from 5:00 AM on April 1, 2023 to 5:00 AM on April 30, 2023 is obtained. Based on this first traffic change data, second traffic change data for the network node during a future time period from 5:01 AM on April 30, 2023 to 5:00 AM on May 30, 2023 is predicted. Then, it is determined whether the second traffic change data meets preset scheduling trigger conditions; if it does, traffic scheduling is triggered; otherwise, traffic scheduling is not performed. It should be emphasized that the settings for the preset time period, future time period, and current time in the above example are merely illustrative and do not constitute a limitation.
[0026] S104: If the second traffic change data meets the preset scheduling triggering conditions, based on the second traffic change data and the first traffic change data, determine the traffic to be dispatched out and the traffic to be dispatched in at the current time for multiple moments in the future time period.
[0027] The scheduling triggering conditions may include:
[0028] CDN traffic exceeds CDN traffic scheduling limit;
[0029] The switch traffic exceeds the switch traffic scheduling limit.
[0030] Among them, the CDN traffic scheduling line and the switch traffic scheduling line are preset for the region where the network node is located.
[0031] Traffic scheduling is triggered when the second traffic change data meets one or more of the preset scheduling trigger conditions. In practical applications, there are generally multiple times in the predicted future time period when the second traffic change data meets the preset scheduling trigger conditions (hereinafter referred to as future scheduling times), and the traffic to be dispatched at these future scheduling times is determined.
[0032] Specifically, the outgoing traffic can include CDN outgoing traffic, switch outgoing traffic, and the maximum outgoing traffic of the metropolitan area network (MAN). The CDN outgoing traffic at each future scheduling time is equal to the difference between the CDN traffic at that future scheduling time and the CDN traffic corresponding to the preset security line of the region where the network node is located; the switch outgoing traffic at each future scheduling time is equal to the difference between the switch traffic at that future scheduling time and the switch outgoing traffic corresponding to the preset security line of the region where the network node is located; the maximum outgoing traffic of the MAN is equal to the product of the MAN inbound capacity and the preset security line of the region where the network node is located (i.e., the traffic that the MAN can safely carry) and the inbound traffic of that region at that future scheduling time.
[0033] Similarly, the incoming traffic at the current moment can include CDN incoming traffic, switch incoming traffic, and the maximum incoming traffic of the metropolitan area network (MAN). CDN and switch incoming traffic are calculated based on the difference between the current CDN traffic and the current switch traffic and their preset security threshold traffic, respectively. The maximum incoming traffic of the MAN is equal to the difference between the MAN outbound capacity multiplied by the preset security threshold of the region where the network node is located and the current outbound traffic of that region. The theoretical upper limit that the MAN can carry is its construction capacity. Regarding the generation of the aforementioned inbound traffic, for example, a user in region A accessing a server in region A does not experience inter-regional traffic. However, when a user in region A is redirected to a server in region B, traffic needs to be transferred (downloaded) from region A to region B when accessing the server in region B. This increases the inbound traffic for the MAN.
[0034] S106: Based on the outgoing traffic at multiple times within a future time period, determine the target time for network nodes; the target time is the time with the largest outgoing traffic within the determined target time period, and the future time period includes the target time period.
[0035] S108: Traffic scheduling is performed based on the incoming traffic and the target outgoing traffic of each network node; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
[0036] Among them, the target outgoing traffic can be the outgoing traffic of a network node at the current moment.
[0037] Based on the required outbound traffic at multiple points in the future time period (future scheduling points), the point with the largest required outbound traffic in the target time period is determined, which is the target point for the network node. Since this embodiment involves advance scheduling—that is, scheduling future data at the current time—after obtaining the target point, the target required outbound traffic for the network node is determined based on the second traffic change data corresponding to the target point and the first traffic change data corresponding to the current time. Specifically, the target required outbound traffic is calculated based on the traffic utilization rate at the current time and the ratio of the change in traffic utilization rate at the target point. The traffic utilization rate at the current time is the ratio of the current traffic to the built-in capacity.
[0038] Traffic scheduling is performed based on the incoming traffic and outgoing traffic of each network node. Specifically, since low network node traffic utilization indicates low network node load, in order to ensure that the load of each network node is even, after obtaining the incoming traffic and outgoing traffic of each network node at the current moment, these data are sorted. Network nodes with outgoing traffic are sorted from largest to smallest outgoing traffic, and network nodes with incoming traffic are sorted from smallest to largest traffic utilization. Traffic is preferentially transferred from network nodes with larger outgoing traffic to network nodes with lower traffic utilization. After the scheduling of a network node is completed, the data values are recalculated, re-sorted, and then the scheduling continues.
[0039] After a scheduling operation is completed, the scheduling results are transmitted to the client for display. These results include scheduling configuration, scheduling records, scheduling process animation, traffic statistics for each node, and real-time monitoring data of relevant indicators.
[0040] The traffic scheduling method provided in this embodiment of the invention obtains first traffic change data of network nodes corresponding to a preset time period, and predicts second traffic change data of network nodes corresponding to a future time period based on the first traffic change data. Then, when the second traffic change data meets a preset scheduling trigger condition, the method determines the traffic to be dispatched out of the network node at multiple times in the future time period and the traffic to be dispatched in at the current time based on the second traffic change data and the first traffic change data. Based on the traffic to be dispatched out at multiple times in the future time period, the method determines the target time of the network node. The target time is the time with the largest traffic to be dispatched out in the determined target time period. The future time period includes the target time period. Then, based on the traffic to be dispatched in and the target traffic to be dispatched in of each network node, the method determines the target time. Traffic scheduling is performed by retrieving traffic from the target time. The target traffic to be retrieving is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time. Compared with related scheduling methods, which perform scheduling when the current data exceeds a set threshold, this solution predicts whether traffic scheduling is needed in future time periods at the current time and performs automatic scheduling in advance. It can complete the scheduling before the traffic utilization rate exceeds the limit, solving the problem of traffic utilization exceeding the limit before the scheduling is completed. Furthermore, traffic scheduling is performed based on the target traffic to be retrieving at the time with the largest traffic demand in the target time period, avoiding the need for multiple scheduling in a short period of time due to insufficient traffic scheduling, thus improving the scheduling efficiency and ultimately achieving better scheduling results.
[0041] In one implementation, determining the target time (i.e., S106) of the network node based on the outgoing traffic at multiple times within a future time period can be specifically executed as follows: Step A1:
[0042] Step A1: Based on the outgoing traffic at multiple times within a future time period, determine the target time period and the target time within the target time period for the network node through an iterative peak query algorithm; the iterative peak query algorithm includes a preset basic scheduling duration and a preset buffer scheduling duration.
[0043] The preset base scheduling duration is used to determine the initial time range of the target time, and can be set to 2 hours, etc.; the preset buffer scheduling duration is used to determine whether there is a higher demand for outgoing traffic, and can be set to 30 minutes, etc. No specific duration limits are set for the preset base scheduling duration and the preset buffer scheduling duration here.
[0044] In this embodiment, by using a preset basic scheduling duration and a preset buffer scheduling duration together, the time when the traffic needs to be dispatched out the most in the target time period is determined, so as to avoid multiple scheduling that may be triggered when the traffic is constantly rising and exceeds the limit.
[0045] In one implementation, see Figure 2 The above-mentioned method, based on the outgoing traffic at multiple times within a future time period, uses an iterative peak query algorithm to determine the target time period of the network node and the target time within the target time period (i.e., step A1). Specifically, this can be executed by looping steps a1 to a4 until the first outgoing traffic is not less than the second outgoing traffic, or the first time period equals the future time period. Then, step a5 is executed, setting the time corresponding to the first outgoing traffic as the target time and the first time period as the target time period.
[0046] Step a1: Based on the outgoing traffic corresponding to the first time period, determine the first outgoing traffic and the first time corresponding to the first outgoing traffic; wherein, the first time period is the time period corresponding to the start time of the future time period plus the preset basic scheduling duration, and the first outgoing traffic is the largest outgoing traffic among the outgoing traffic corresponding to the first time period.
[0047] Continuing with the example above, if the current time is 5:00 AM on April 30, 2023, and the future time period is from 5:01 AM on April 30, 2023 to 5:00 AM on May 30, 2023, then the starting time can be 5:01 AM on April 30, 2023. Correspondingly, the first time period can be from 5:01 AM on April 30, 2023 to 7:01 AM on April 30, 2023. It should be emphasized that the settings for the starting time and the first time period in the above example are merely illustrative and do not constitute a limitation.
[0048] Step a2: Based on the required outgoing traffic corresponding to the second time period, determine the second required outgoing traffic and the second time period corresponding to the second required outgoing traffic; wherein, the second time period is the time period corresponding to the first time period plus the preset buffer scheduling duration, and the second required outgoing traffic is the largest required outgoing traffic among the required outgoing traffic corresponding to the second time period.
[0049] Step a3: Determine whether the first required outgoing traffic is not less than the second required outgoing traffic, or whether the first time period is equal to the future time period.
[0050] If not, in step a4, the second time period is taken as the first time period, and the second outgoing traffic is taken as the first outgoing traffic.
[0051] Since traffic switching after scheduling is a relatively long process, it's not a matter of immediately switching 100% of the scheduled traffic after execution; users need to switch channels for the actual switching to occur. Furthermore, the predicted data (secondary traffic change data corresponding to future time periods) is more susceptible to interference factors the closer it is to the end of the future time period, resulting in lower accuracy. In this embodiment, to improve prediction accuracy, an iterative peak query algorithm is used to determine the target time starting from the beginning of the future time period. This ensures the target time is as close as possible to the start of the future time period, guaranteeing that traffic is switched before exceeding limits without causing excessively large prediction errors that could lead to incorrect scheduling or excessive deviations in the scheduled value. Simultaneously, by using a preset basic scheduling duration and a preset buffer scheduling duration, the time with the highest required traffic within the target time period is determined, reducing the number of scheduling operations if the traffic trend is still increasing.
[0052] Because the scheduling process itself has a certain delay, in order to reflect the impact of the current scheduling process in the future, scheduling compensation is obtained by modeling the scheduling situation to replenish the next predicted scheduling cycle. This is also to prevent over-scheduling due to scheduling delays. After the traffic scheduling based on the incoming traffic and outgoing traffic of each network node (i.e., S108), scheduling compensation is also performed. In one implementation, scheduling compensation can be performed by executing the following steps S110 to S112:
[0053] S110: Based on the historical scheduling information of each network node's location, the least squares method is used to fill in the data points and train a scheduling traffic change model.
[0054] Among them, the scheduling traffic change model is used to output the scheduling traffic change information corresponding to the time when scheduling is triggered; the historical scheduling information is the scheduling traffic change data triggered at different times.
[0055] In practical applications, since the process of traffic switching within the same region is basically the same at the same time, the scheduling traffic change data (historical scheduling information) triggered at different times in different regions is sampled and statistically analyzed through live network sampling. The scheduling traffic change data can be the actual incoming or remaining value at each statistical analysis point in time after the traffic is switched in or out.
[0056] S112: Based on the scheduling traffic change information corresponding to the current moment, determine the scheduling compensation data, and perform scheduling compensation on the predicted traffic change data after the current moment based on the scheduling compensation data.
[0057] The scheduling traffic change information at the current moment is predicted by the scheduling traffic change model.
[0058] Since the overall scheduling trend of traffic scheduling is the same, the difference in the specific traffic value of scheduling will only affect the curve value range. In this embodiment, by using the least squares method to supplement data points, the trend of the scheduling process (scheduled traffic change information) can be described more accurately as a whole. As a result, the prediction of the training scheduling traffic change model is more accurate. Consequently, the scheduling compensation data predicted by the scheduling traffic change model is more accurate, and the final scheduling compensation is also more accurate.
[0059] Since prediction models (such as the Prophet model) generally model the entire system globally, assigning equal weights to all data, changes in local data may not significantly impact the overall system. For data far removed from the prediction time (the predicted future period includes multiple prediction times), this might only represent temporary fluctuations that subsequently return to normal, making a normal prediction result reasonable. However, if this occurs closer to the prediction time, maintaining the original prediction would fail to accurately reflect current data changes. To address this, this solution calculates abrupt changes as compensation and then combines the compensation with the traffic change data predicted by the pre-trained target prediction model, thereby improving prediction accuracy. This solution employs two methods: the first is a moving weighted average compensation method.
[0060] In one implementation, predicting the second traffic change data (i.e., S102) of network nodes in a future time period based on the first traffic change data can be specifically performed as follows: steps B1 to B4:
[0061] Step B1: Based on the pre-trained target prediction model, predict the third traffic change data of network nodes in the preset time period.
[0062] The target prediction model is trained based on historical traffic change data to obtain the pre-trained target prediction model.
[0063] Step B2: Obtain the error value based on the difference between the third flow change data and the first flow change data corresponding to each moment in the preset time period.
[0064] The error value x is obtained by comparing the actual value at the time of occurrence with the predicted value.t .
[0065] Step B3: By performing a moving weighted average on the error values, the target error value for each time point in the future time period is obtained.
[0066] By employing a moving weighted average method, higher weights are assigned to error values (abrupt changes) at times close to the prediction time. That is, using the following formula (1), y1 is obtained from y0, y2 from y1, y3 from y2, and so on, until y is obtained. t , which serves as the target error value for that prediction time:
[0067] y t =(1-α)y t-1 +αx t (1)
[0068] Here, α is the moving weighted average parameter, which can be preset based on experience.
[0069] Step B4: Based on the target error value at each time point and the corresponding fourth flow change data at each time point, determine the second flow change data.
[0070] The fourth traffic change data is the traffic change data of network nodes in future time periods, which is predicted by a pre-trained target prediction model.
[0071] In this implementation, by using the moving weighted average method, higher weights are given to the error values of times close to the prediction time, thereby making the predicted second flow change data corresponding to the future time period (including multiple prediction times) more accurate.
[0072] The second method is model learning compensation:
[0073] Based on the pre-trained target prediction model, the third traffic change data corresponding to the network node in the preset time period is predicted; according to the difference between the third traffic change data and the first traffic change data at each moment in the preset time period, a curve that changes with time is obtained. This part of the data is then fed into a new prophet model. The new prophet model includes a piecewise logistic regression model. The piecewise logistic regression model is constructed by the following formula (2) and is used to predict traffic change data. The new prophet model also makes a new prediction of the change situation. The two prediction results are superimposed, thereby improving the situation that a large amount of data prediction cannot effectively perceive short-term large fluctuations.
[0074] Specifically, the corresponding formula (2) for the piecewise logistic regression model is as follows:
[0075]
[0076] Where k represents the growth rate, δ represents the change in the growth rate, m represents the offset, γ represents the change in the offset, and C(t) is the upper limit of the network node traffic.
[0077] Both the moving weighted average compensation method and the model learning compensation method mentioned above can achieve good compensation and thus improve the prediction effect. Different methods can be adopted according to different needs and usage scenarios: The moving weighted average compensation method mainly involves mathematical calculations, has high execution efficiency, and requires less sample data, but its accuracy is slightly lower than that of the model learning compensation method. Therefore, it is mainly used in scenarios with a small number of samples or high running efficiency requirements. The model learning compensation method requires the use of a new Prophet model again, has relatively high accuracy, but requires more sample data and has a large amount of computation. It is mainly used in scenarios with sufficient sample data and higher accuracy requirements.
[0078] In one implementation, the aforementioned second flow change data is obtained based on a target prediction model; the target prediction model includes a first prediction model, which is constructed by multiplying a Fourier series with a preset number of terms by a preset special event effect intensity parameter, and the first prediction model is used to predict the flow change data corresponding to the special event.
[0079] The target prediction model can be a model modified from the Prophet model. Special events can be holidays or activities, etc.
[0080] Since historical traffic flow data exhibits significant changes during special events such as holidays and activities, in addition to daily and weekly cycles, the prediction model used in the Prohet model to predict traffic flow changes during these special events uses a daily indicator function. This results in the predicted value remaining the same throughout the day. However, the impact of major holidays and events is concentrated within a short period. Therefore, this solution adjusts the prediction model in the Prohet model to predict traffic flow changes during special events. A Fourier series with a preset number of terms of 10 can be used to represent the impact of holidays and other special events. The corresponding formulas (3) and (4) are as follows:
[0081]
[0082] h(t)=Z(t)K (4)
[0083] The period T can be set to 365.25, and date conditions can be set so that the impact of holidays only takes effect on special dates. The constant c is the offset compensation for the traffic.
[0084] Specifically, the target prediction model can be a fusion model formed by the first prediction model, the second prediction model and the third prediction model mentioned above. The formula (5) corresponding to the fusion model is as follows:
[0085] y(t)=g(t)+s(t)+h(t)+∈ t (5)
[0086] Wherein, g(t) corresponds to the second prediction model, which includes a piecewise logistic regression model constructed by the above formula (2) and a piecewise linear model constructed by the following formula (6), representing the trend of time series changes in non-periodic areas; s(t) corresponds to the third prediction model, which is constructed by the following formula (7), and the third prediction model is used to predict periodic flow change data, generally in units of weeks or years; h(t) corresponds to the first prediction model, which is constructed by the above formulas (3) and (4); ∈t is the error term or the residual term, representing the fluctuations not predicted by the model, which follows a Gaussian distribution.
[0087] The formula (6) corresponding to the piecewise linear model of the second prediction model is as follows:
[0088] g(t)=(k+a(t) T δ)t+(m+a(t) T γ) (6)
[0089] The formula (7) corresponding to the third prediction model is as follows:
[0090]
[0091] The flexibility can be changed by adjusting the number of terms N; P represents the period, and the parameter can be expressed as β = [a1, b1, ..., a N b N ] T ,β~Normal(0,σ 2 It is controlled by the seasonality prior scale.
[0092] In this embodiment, the second traffic change data corresponding to network nodes in future time periods is predicted based on the target prediction model. Subsequent traffic scheduling is then performed based on this prediction. Compared to manual estimation and advance scheduling, this improves the accuracy of scheduling and reduces labor costs. Furthermore, a target prediction model including a first prediction model is adopted. This first prediction model is constructed by multiplying a Fourier series with a preset number of terms by a preset special event effect strength parameter. Therefore, traffic data changes corresponding to special events such as major holidays and activities only have an impact on the day of the event and only for a specific period of that day, without affecting other times. This improves the accuracy of predicting the second traffic change data corresponding to future time periods.
[0093] Figure 3 This is a flowchart illustrating another traffic scheduling method provided in an embodiment of this application. Figure 3 As shown, the method includes:
[0094] Step 302: Obtain the first traffic change data of the network node during the preset time period.
[0095] Step 304: Based on the pre-trained target prediction model, predict the third traffic change data corresponding to the network node in the preset time period; the target prediction model includes a first prediction model, which is constructed by multiplying a preset number of Fourier series by a preset special event effect intensity parameter, and the first prediction model is used to predict the traffic change data corresponding to the special event.
[0096] Step 306: Obtain the error value based on the difference between the third flow change data and the first flow change data corresponding to each moment of the preset time period.
[0097] Step 308: Obtain the target error value for each time point in the future time period by performing a moving weighted average on the error values.
[0098] Step 310: Based on the target error value at each time point and the corresponding fourth traffic change data at each time point, determine the second traffic change data corresponding to the network node in the future time period; the fourth traffic change data is the traffic change data corresponding to the network node in the future time period, which is predicted by the pre-trained target prediction model.
[0099] Step 312: If the second traffic change data meets the preset scheduling triggering conditions, based on the second traffic change data and the first traffic change data, determine the traffic to be dispatched out and the traffic to be dispatched in at the current time for multiple moments in the future time period.
[0100] Step 314: Based on the outgoing traffic at multiple times within the future time period, determine the target time period and the target time within the target time period through an iterative peak query algorithm; the iterative peak query algorithm includes a preset basic scheduling duration and a preset buffer scheduling duration; the target time is the time with the largest outgoing traffic within the determined target time period, and the future time period includes the target time period.
[0101] Step 316: Perform traffic scheduling based on the incoming traffic and the target outgoing traffic of each network node; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
[0102] This embodiment acquires first traffic change data of network nodes within a preset time period, and predicts second traffic change data of network nodes within a future time period based on the first traffic change data. Then, when the second traffic change data meets preset scheduling trigger conditions, it determines the outgoing traffic and incoming traffic of the network node at multiple moments within the future time period and at the current moment, based on the second and first traffic change data. Based on the outgoing traffic at multiple moments within the future time period, it determines the target time of the network node; the target time is the moment with the largest outgoing traffic within the determined target time period. The future time period includes the target time period. Subsequently, based on the incoming traffic and target outgoing traffic of each network node, [further steps are taken]. Traffic scheduling; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time. Compared with related scheduling methods, which perform scheduling when the current data exceeds a set threshold, this scheme predicts whether traffic scheduling is needed in future periods at the current time and performs automatic scheduling in advance. It can complete scheduling before the traffic utilization rate exceeds the limit, solving the problem of traffic utilization exceeding the limit before scheduling is completed. Furthermore, traffic scheduling is performed based on the target outgoing traffic corresponding to the time with the largest outgoing traffic in the target period, avoiding the need for multiple scheduling in a short period of time due to insufficient traffic scheduling, improving scheduling efficiency, and ultimately achieving better scheduling results.
[0103] Corresponding to the traffic scheduling method provided in the above embodiments, based on the same technical concept, the present invention also provides a traffic scheduling device. Figure 4 This is a schematic diagram of a traffic scheduling device according to an embodiment of the present invention, which is used to perform... Figures 1 to 3 The described traffic scheduling method, such as Figure 4 As shown, the traffic scheduling device includes: a prediction module 410, a first determination module 420, a second determination module 430, and a scheduling module 440.
[0104] The prediction module 410 is used to acquire the first traffic change data of the network node in a preset time period, and predict the second traffic change data of the network node in a future time period based on the first traffic change data.
[0105] The first determining module 420 is used to determine, based on the second traffic change data and the first traffic change data, the traffic to be dispatched out and the traffic to be dispatched in at the current time in multiple moments in the future period, when the second traffic change data meets the preset scheduling triggering conditions.
[0106] The second determining module 430 is used to determine the target time of the network node based on the outgoing traffic at multiple times within a future time period; the target time is the time with the largest outgoing traffic in the determined target time period, and the future time period includes the target time period.
[0107] The scheduling module 440 is used to schedule traffic based on the incoming traffic and the target outgoing traffic of each network node; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
[0108] In one implementation, the second determining module 430 is specifically used for:
[0109] Based on the outgoing traffic at multiple times within a future time period, the target time period and the target time within the target time period are determined by an iterative peak query algorithm. The iterative peak query algorithm includes a preset basic scheduling duration and a preset buffer scheduling duration.
[0110] In one implementation, the second determining module 430 is specifically used for:
[0111] Repeat the following steps until the first required outgoing traffic is not less than the second required outgoing traffic, or the first time period equals the future time period. Then, take the time corresponding to the first required outgoing traffic as the target time and the first time period as the target time period:
[0112] Based on the outgoing traffic corresponding to the first time period, the first outgoing traffic and the first time corresponding to the first outgoing traffic are determined; wherein, the first time period is the time period corresponding to the start time of the future time period plus the preset basic scheduling duration, and the first outgoing traffic is the largest outgoing traffic among the outgoing traffic corresponding to the first time period;
[0113] Based on the outgoing traffic corresponding to the second time period, the second outgoing traffic and the second time period corresponding to the second outgoing traffic are determined; wherein, the second time period is the first time period plus the time period corresponding to the preset buffer scheduling duration, and the second outgoing traffic is the largest outgoing traffic among the outgoing traffic corresponding to the second time period;
[0114] Determine whether the first required outgoing traffic is not less than the second required outgoing traffic, or whether the first time period is equal to the future time period;
[0115] If not, then the second time period will be treated as the first time period, and the second outgoing traffic will be treated as the first outgoing traffic.
[0116] In one implementation, the traffic scheduling device includes, as well as:
[0117] The scheduling compensation module 450 is used to train a scheduling traffic change model by supplementing data points using the least squares method based on the historical scheduling information of the regions where each network node is located. The scheduling traffic change model is used to output the scheduling traffic change information corresponding to the time when scheduling is triggered. The historical scheduling information is the scheduling traffic change data triggered at different times.
[0118] Based on the scheduling traffic change information corresponding to the current moment, scheduling compensation data is determined, and scheduling compensation is performed on the predicted traffic change data after the current moment based on the scheduling compensation data; the scheduling traffic change information corresponding to the current moment is predicted by the scheduling traffic change model.
[0119] In one implementation, the prediction module 410 is specifically used for:
[0120] Based on a pre-trained target prediction model, the third traffic change data of network nodes in a preset time period is predicted.
[0121] The error value is obtained by comparing the third flow change data and the first flow change data at each moment in the preset time period.
[0122] By applying a moving weighted average to the error values, the target error value for each time point in the future period can be obtained.
[0123] Based on the target error value at each time step and the corresponding fourth traffic change data at each time step, the second traffic change data is determined; the fourth traffic change data is the traffic change data of the network node in the future time period, which is predicted by the pre-trained target prediction model.
[0124] In one implementation, the aforementioned second flow change data is obtained based on a target prediction model; the target prediction model includes a first prediction model, which is constructed by multiplying a Fourier series with a preset number of terms by a preset special event effect intensity parameter, and the first prediction model is used to predict the flow change data corresponding to the special event.
[0125] In this embodiment, first traffic change data of network nodes corresponding to a preset time period is obtained, and second traffic change data of network nodes corresponding to a future time period is predicted based on the first traffic change data. Then, when the second traffic change data meets a preset scheduling trigger condition, the outgoing traffic and incoming traffic of network nodes at multiple times in the future time period and at the current time are determined based on the second traffic change data and the first traffic change data. Based on the outgoing traffic at multiple times in the future time period, the target time of the network node is determined. The target time is the time with the largest outgoing traffic in the determined target time period. The future time period includes the target time period. Then, based on the incoming traffic and target outgoing traffic of each network node, the scheduling process proceeds... Traffic scheduling is implemented; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time. Compared with related scheduling methods, which perform scheduling when the current data exceeds a set threshold, this scheme predicts whether traffic scheduling is needed in future periods at the current time and performs automatic scheduling in advance. It can complete scheduling before the traffic utilization rate exceeds the limit, solving the problem of traffic utilization exceeding the limit before scheduling is completed. Furthermore, traffic scheduling is performed based on the target outgoing traffic corresponding to the time with the largest outgoing traffic in the target period, avoiding the need for multiple scheduling in a short period of time due to insufficient traffic scheduling, improving scheduling efficiency, and ultimately achieving better scheduling results.
[0126] Those skilled in the art will understand that the above-described traffic scheduling device can be used to implement the traffic scheduling method described above, and the detailed description therein should be similar to the method description above. To avoid repetition, it will not be repeated here.
[0127] Based on the same technical concept, embodiments of this application also provide an electronic device for performing the above-described traffic scheduling method. Figure 5 This is a schematic diagram of the structure of an electronic device to implement various embodiments of this application. The electronic device can vary significantly due to differences in configuration or performance, and may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540. The processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call a computer program stored in the memory 530 and executable on the processor 510 to perform the following steps:
[0128] Obtain the first traffic change data of the network node in a preset time period, and based on the first traffic change data, predict the second traffic change data of the network node in a future time period;
[0129] If the second traffic change data meets the preset scheduling triggering conditions, based on the second traffic change data and the first traffic change data, determine the traffic that the network node needs to send out at multiple times in the future period and the traffic to be sent in at the current time.
[0130] Based on the outgoing traffic at multiple points within a future time period, the target time for network nodes is determined; the target time is the time with the largest outgoing traffic within the determined target time period, and the future time period includes the target time period;
[0131] Traffic scheduling is performed based on the incoming traffic and the target outgoing traffic of each network node; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
[0132] In this embodiment, first traffic change data of network nodes corresponding to a preset time period is obtained, and second traffic change data of network nodes corresponding to a future time period is predicted based on the first traffic change data. Then, when the second traffic change data meets a preset scheduling trigger condition, the outgoing traffic and incoming traffic of network nodes at multiple times in the future time period and at the current time are determined based on the second traffic change data and the first traffic change data. Based on the outgoing traffic at multiple times in the future time period, the target time of the network node is determined. The target time is the time with the largest outgoing traffic in the determined target time period. The future time period includes the target time period. Then, based on the incoming traffic and target outgoing traffic of each network node, the scheduling process proceeds... Traffic scheduling is implemented; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time. Compared with related scheduling methods, which perform scheduling when the current data exceeds a set threshold, this scheme predicts whether traffic scheduling is needed in future periods at the current time and performs automatic scheduling in advance. It can complete scheduling before the traffic utilization rate exceeds the limit, solving the problem of traffic utilization exceeding the limit before scheduling is completed. Furthermore, traffic scheduling is performed based on the target outgoing traffic corresponding to the time with the largest outgoing traffic in the target period, avoiding the need for multiple scheduling in a short period of time due to insufficient traffic scheduling, improving scheduling efficiency, and ultimately achieving better scheduling results.
[0133] The specific execution steps can be found in the various steps of the above-described traffic scheduling method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0134] It should be noted that the electronic devices in the embodiments of this application include: servers, terminals, or other devices besides terminals.
[0135] The above electronic device structure does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or arrange them differently. For example, an input unit may include a Graphics Processing Unit (GPU) and a microphone, and a display unit may use a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar display panels. User input units include at least one of a touch panel and other input devices. A touch panel is also called a touchscreen. Other input devices may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be elaborated further here.
[0136] Memory can be used to store software programs and various data. Memory can primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area can store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, memory can include volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).
[0137] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly handles operations related to the operating system, user interface, and applications, while the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor.
[0138] This application also provides a storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they implement the various processes of the above-described traffic scheduling method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0139] The processor is the processor in the electronic device described in the above embodiments. The storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0140] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described traffic scheduling method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0141] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0142] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the various processes of the above-described traffic scheduling method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0143] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include multitasking and parallel processing according to the functions involved, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0145] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A traffic scheduling method, characterized in that, The method includes: Obtain first traffic change data of a network node in a preset time period, and based on the first traffic change data, predict second traffic change data of the network node in a future time period; If the second traffic change data meets the preset scheduling triggering conditions, based on the second traffic change data and the first traffic change data, determine the traffic to be dispatched out and the traffic to be dispatched in at the current time for the network node at multiple times in the future time period. The following steps are executed repeatedly until the first required outgoing traffic is not less than the second required outgoing traffic, or the first time period is equal to the future time period. Then, the time corresponding to the first required outgoing traffic is taken as the target time of the network node, and the first time period is taken as the target time period. The target time is the time with the largest required outgoing traffic within the determined target time period, and the future time period includes the target time period. Based on the outgoing traffic corresponding to the first time period, the first outgoing traffic and the first time corresponding to the first outgoing traffic are determined; wherein, the first time period is the time period corresponding to the start time of the future time period plus the preset basic scheduling duration, and the first outgoing traffic is the largest outgoing traffic among the outgoing traffic corresponding to the first time period. Based on the outgoing traffic corresponding to the second time period, the second outgoing traffic and the second time period corresponding to the second outgoing traffic are determined; wherein, the second time period is the first time period plus the time period corresponding to the preset buffer scheduling duration, and the second outgoing traffic is the largest outgoing traffic among the outgoing traffic corresponding to the second time period; Determine whether the first required outgoing traffic is not less than the second required outgoing traffic, or whether the first time period is equal to the future time period; If not, the second time period is taken as the first time period, and the second outgoing traffic is taken as the first outgoing traffic; wherein, the target time period of the network node and the target time within the target time period are determined by an iterative peak query algorithm; the iterative peak query algorithm includes the preset basic scheduling duration and the preset buffer scheduling duration; Traffic scheduling is performed based on the incoming traffic and the target outgoing traffic of each network node; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
2. The method according to claim 1, characterized in that, The method further includes: Based on the historical scheduling information of the regions where each network node is located, the least squares method is used to fill in data points and train a scheduling traffic change model. The scheduling traffic change model is used to output the scheduling traffic change information corresponding to the time when scheduling is triggered. The historical scheduling information is the scheduling traffic change data triggered at different times. Based on the scheduling traffic change information corresponding to the current moment, scheduling compensation data is determined, and scheduling compensation is performed on the predicted traffic change data after the current moment based on the scheduling compensation data; the scheduling traffic change information corresponding to the current moment is predicted by the scheduling traffic change model.
3. The method according to claim 1, characterized in that, The step of predicting the second traffic change data for the network node in a future time period based on the first traffic change data includes: Based on a pre-trained target prediction model, the third traffic change data of the network node corresponding to the preset time period is predicted; The error value is obtained based on the difference between the third flow change data and the first flow change data corresponding to each moment of the preset time period; The target error value for each time point in the future time period is obtained by performing a moving weighted average on the error values. Based on the target error value at each time point and the fourth traffic change data corresponding to each time point, the second traffic change data is determined; the fourth traffic change data is the traffic change data of the network node in the future time period, which is predicted by the pre-trained target prediction model.
4. The method according to claim 1, characterized in that, The second flow change data is obtained based on the target prediction model; the target prediction model includes a first prediction model, which is constructed by multiplying a Fourier series with a preset number of terms by a preset special event effect intensity parameter, and the first prediction model is used to predict the flow change data corresponding to the special event.
5. A flow scheduling device, characterized in that, The device includes: The prediction module is used to acquire first traffic change data of a network node in a preset time period, and based on the first traffic change data, predict second traffic change data of the network node in a future time period. The first determining module is used to determine, based on the second traffic change data and the first traffic change data, the traffic to be dispatched out and the traffic to be dispatched in at the current time of the network node at multiple times in the future time period, when the second traffic change data meets the preset scheduling triggering conditions. The second determining module is used to repeatedly execute the following steps until the first required outgoing traffic is not less than the second required outgoing traffic, or the first time period is equal to the future time period, then the time corresponding to the first required outgoing traffic is taken as the target time of the network node, and the first time period is taken as the target time period; the target time is the time with the largest required outgoing traffic in the determined target time period, and the future time period includes the target time period: Based on the outgoing traffic corresponding to the first time period, the first outgoing traffic and the first time corresponding to the first outgoing traffic are determined; wherein, the first time period is the time period corresponding to the start time of the future time period plus the preset basic scheduling duration, and the first outgoing traffic is the largest outgoing traffic among the outgoing traffic corresponding to the first time period. Based on the outgoing traffic corresponding to the second time period, the second outgoing traffic and the second time period corresponding to the second outgoing traffic are determined; wherein, the second time period is the first time period plus the time period corresponding to the preset buffer scheduling duration, and the second outgoing traffic is the largest outgoing traffic among the outgoing traffic corresponding to the second time period; Determine whether the first required outgoing traffic is not less than the second required outgoing traffic, or whether the first time period is equal to the future time period; If not, the second time period is taken as the first time period, and the second outgoing traffic is taken as the first outgoing traffic; wherein, the target time period of the network node and the target time within the target time period are determined by an iterative peak query algorithm; the iterative peak query algorithm includes the preset basic scheduling duration and the preset buffer scheduling duration; The scheduling module is used to perform traffic scheduling based on the incoming traffic and the target outgoing traffic of each network node; the target outgoing traffic is determined based on the second traffic change data corresponding to the target time and the first traffic change data corresponding to the current time.
6. An electronic device, characterized in that, include: processor; as well as A memory configured to store computer-executable instructions configured to be executed by the processor, the executable instructions including instructions for performing the traffic scheduling method as described in any one of claims 1-4.
7. A storage medium, characterized in that, The storage medium is used to store computer-executable instructions that cause a computer to perform the traffic scheduling method as described in any one of claims 1-4.
8. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the traffic scheduling method as described in any one of claims 1-4.
Citation Information
Patent Citations
Scheduling method, device and equipment of content distribution network and storage medium
CN116070380A