CN116938820A - Traffic scheduling method, equipment and medium - Google Patents

Traffic scheduling method, equipment and medium Download PDF

Info

Publication number
CN116938820A
CN116938820A CN202310950908.8A CN202310950908A CN116938820A CN 116938820 A CN116938820 A CN 116938820A CN 202310950908 A CN202310950908 A CN 202310950908A CN 116938820 A CN116938820 A CN 116938820A
Authority
CN
China
Prior art keywords
flow
determining
channel
time
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310950908.8A
Other languages
Chinese (zh)
Inventor
许小东
吴炎斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN202310950908.8A priority Critical patent/CN116938820A/en
Publication of CN116938820A publication Critical patent/CN116938820A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1403Architecture for metering, charging or billing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/74Admission control; Resource allocation measures in reaction to resource unavailability
    • H04L47/746Reaction triggered by a failure

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a flow scheduling method, equipment and medium, comprising the following steps: acquiring real-time flow data of real-time audio and video application in a current period; if the real-time flow data reach the scheduling threshold value of the current period, determining the first flow channel as a target flow channel, otherwise, determining the second flow channel as the target flow channel; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode; and transmitting the channel information of the target flow channel to the real-time audio and video application so that the real-time audio and video application can transmit real-time audio and video data based on the target flow channel. In this way, the flow rate use cost can be reduced.

Description

Traffic scheduling method, equipment and medium
Technical Field
The present application relates to the field of traffic scheduling technologies, and in particular, to a traffic scheduling method, device, and medium.
Background
At present, in Real-time audio and video applications, namely video live broadcast and voice application products, two RTC (Real-time audio and video) charging modes are usually two, namely bandwidth peak charging and call duration charging, the two modes are good and bad respectively, the RTC charging mode is suitable for the peak charging mode when the monthly usage distribution is uniform, and the RTC charging mode is more cost-effective when the RTC charging mode is used discontinuously and the RTC charging mode is used in a scene with small usage. However, when the service continuous call duration is large but the distribution is extremely uneven, it is difficult to select a mode with lower cost, resulting in higher final traffic usage cost. In summary, in the process of implementing the present application, the inventor at least discovers that the flow scheduling scheme in the prior art causes a problem of high flow usage cost.
Disclosure of Invention
In view of the above, the present application aims to provide a traffic scheduling method, a device and a medium, which can reduce traffic usage cost. The specific scheme is as follows:
in a first aspect, the present application discloses a traffic scheduling method, the method including a first traffic channel and a second traffic channel, including:
acquiring real-time flow data of real-time audio and video application in a current period;
if the real-time flow data reach the scheduling threshold value of the current period, determining the first flow channel as a target flow channel, otherwise, determining the second flow channel as the target flow channel; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode;
and transmitting the channel information of the target flow channel to the real-time audio and video application so that the real-time audio and video application can transmit real-time audio and video data based on the target flow channel.
Optionally, the method further comprises:
acquiring flow data of a first period; wherein the flow data varies with time;
determining a flow rate increase based on the first period of flow data;
determining second flow data based on the flow rate increase rate and the first period of flow data;
and obtaining the scheduling threshold of the current period based on the second flow data.
Optionally, the acquiring the flow data of the first period includes:
acquiring the code rate of each user at each time point in the first period;
and calculating the bandwidth of each time point based on the code rate of all users at each time point in the first period to obtain the flow data of the first period.
Optionally, the obtaining the scheduling threshold of the current period based on the second traffic data includes:
determining a plurality of candidate thresholds, and calculating the cost corresponding to each candidate threshold based on the second flow data;
and determining the lowest cost from the costs corresponding to the candidate thresholds, and determining the candidate threshold corresponding to the lowest cost as the scheduling threshold of the current period.
Optionally, the determining a plurality of candidate thresholds includes:
acquiring the highest peak value of the second flow data;
and reducing the highest peak value by adopting a preset step length to obtain a peak value reduction result until the highest peak value reduction result is zero, and taking the highest peak value and each peak value reduction result as the plurality of candidate threshold values.
Optionally, the calculating the cost corresponding to each candidate threshold based on the second traffic data includes:
generating a flow data curve based on the second flow data;
determining a threshold line based on any candidate threshold; the threshold straight line is a straight line with time variation and the bandwidth constant is a candidate threshold value;
determining the area of a closed graph surrounded by the threshold straight line and the flow data curve;
determining a target time length based on the area, and determining a first cost corresponding to a time length charging mode based on the target time length;
determining the highest peak value smaller than or equal to the candidate threshold value in the flow data curve to obtain a target peak value, and determining a second cost corresponding to a peak charging mode based on the target peak value;
and determining the sum of the first cost and the second cost as the cost corresponding to the candidate threshold.
Optionally, the determining the target duration based on the area includes:
determining the average code rate corresponding to each closed graph based on the code rates of all users in the time period corresponding to each closed graph;
determining the corresponding duration of each closed graph based on the area of each closed graph and the corresponding average code rate;
and determining the sum of the time durations corresponding to all the closed graphs as a target time duration.
Optionally, the method further comprises:
monitoring the status of the first and second flow channels;
and if any one of the first flow channel and the second flow channel fails, determining the non-failure channel in the first flow channel and the second flow channel as a target flow channel.
In a second aspect, the present application discloses a traffic scheduling device, including:
the real-time flow acquisition module is used for acquiring real-time flow data of the real-time audio and video application in the current period;
the flow channel determining module is used for determining a first flow channel as a target flow channel if the real-time flow data reach the scheduling threshold value of the current period, or determining a second flow channel as the target flow channel if the real-time flow data reach the scheduling threshold value of the current period; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode;
and the channel information issuing module is used for issuing the channel information of the target flow channel to the real-time audio and video application so that the real-time audio and video application can transmit real-time audio and video data based on the target flow channel.
In a third aspect, the application discloses an electronic device comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the foregoing traffic scheduling method.
In a fourth aspect, the present application discloses a computer readable storage medium storing a computer program, where the computer program when executed by a processor implements the foregoing traffic scheduling method.
It can be seen that, in the present period, the present application obtains real-time traffic data of a real-time audio/video application, if the real-time traffic data reaches a scheduling threshold of the present period, a first traffic channel is determined as a target traffic channel, otherwise, a second traffic channel is determined as a target traffic channel, the first traffic channel is a channel corresponding to a duration charging mode, the second traffic channel is a channel corresponding to a peak charging mode, and then channel information of the target traffic channel is issued to the real-time audio/video application, so that the real-time audio/video application transmits real-time audio/video data based on the target traffic channel. That is, the application acquires the real-time flow data of the real-time audio/video application, when the real-time flow data reaches the scheduling threshold, the flow of the real-time audio/video application is scheduled to the channel corresponding to the time length charging mode, otherwise, the flow of the real-time audio/video application is scheduled to the channel corresponding to the time length peak charging mode, thus combining the advantages of the two flow channels and reducing the flow use cost.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system framework to which the traffic scheduling scheme provided by the present application is applicable;
FIG. 2 is a flow chart of a flow scheduling method provided by the application;
FIG. 3 is a schematic diagram of a specific code rate according to the present application;
FIG. 4 is a flowchart of a specific flow scheduling method according to the present application;
FIG. 5 is a schematic diagram of a month flow curve according to the present application;
FIG. 6 is a graph showing a daily flow rate curve according to the present application;
FIG. 7 is a schematic diagram of a specific daily bandwidth curve versus threshold for the present application;
FIG. 8 is a schematic view of a specific cost curve according to the present application
FIG. 9 is a schematic diagram illustrating a specific scheduling threshold determination according to the present application;
FIG. 10 is a schematic diagram of a traffic scheduling according to the present application;
FIG. 11 is a schematic diagram of a specific flow scheduling according to the present application;
FIG. 12 is a schematic diagram of another specific flow scheduling according to the present application;
fig. 13 is a schematic structural diagram of a flow dispatching device provided by the present application;
fig. 14 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
At present, in real-time audio and video applications, two types of RTC charging modes are usually two types, namely bandwidth peak charging and call duration charging, the two types are good and bad, the RTC charging mode is suitable for the peak charging mode when the month usage distribution is relatively uniform, and the time duration charging is more cost-effective when the RTC charging mode is used discontinuously and used in a scene with small usage. However, when the service continuous call duration is large but the distribution is extremely uneven, it is difficult to select a mode with lower cost, resulting in higher final traffic usage cost. In summary, in the process of implementing the present application, the inventor at least discovers that the flow scheduling scheme in the prior art causes a problem of high flow usage cost. Therefore, the application provides a flow scheduling scheme which can reduce the flow use cost.
In the flow scheduling scheme of the present application, the system framework adopted may specifically be shown in fig. 1, and may specifically include: the system comprises a background server and a plurality of user terminals which are in communication connection with the background server. The user side includes, but is not limited to, a tablet computer, a notebook computer, a smart phone, a personal computer (personal computer, PC), but is not limited herein, and is provided with a real-time audio/video application, and performs live broadcast or voice communication through the real-time audio/video application.
In the application, the step of executing the flow scheduling method by the background server comprises the following steps: acquiring real-time flow data of real-time audio and video application in a current period; if the real-time flow data reach the scheduling threshold value of the current period, determining the first flow channel as a target flow channel, otherwise, determining the second flow channel as the target flow channel; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode; and transmitting the channel information of the target flow channel to the real-time audio and video application so that the real-time audio and video application can transmit real-time audio and video data based on the target flow channel.
Referring to fig. 2, an embodiment of the present application discloses a traffic scheduling method, where the method includes a first traffic channel and a second traffic channel, and includes:
step S11: and acquiring real-time flow data of the real-time audio and video application in the current period.
In a specific embodiment, the code rate of each user can be obtained at regular time in the current period; and calculating real-time flow data of the real-time audio and video application based on the code rates of all users. And, the real-time traffic data can be updated based on a preset event, wherein the preset event can be an on-air event, an off-air event, etc., and the real-time traffic data calculated at a fixed time is updated based on the preset event, so that the real-time traffic data during two adjacent fixed time calculations is ensured to be closer to real data. Namely, the whole network statistics data is updated regularly, the event statistics is carried out, the increment before the arrival of the whole network statistics task is made up, and the whole network statistics task and the event statistics are combined to obtain data closer to the real flow.
It should be noted that the code rate: the number of bits transmitted per unit time, the code rates of video and audio are different, as shown in fig. 3, and fig. 3 is a schematic diagram of a specific code rate according to an embodiment of the present application. In addition, the code rate is affected without the resolution used by the user and the network type (4G, 5G, wiFi). Therefore, in traffic data statistics, the code rates of different users need to be acquired. The cycle may be one month or one day. The period in the present application may be determined according to the charging period of the flow provider, for example, the charging period of the flow provider is one month, and the period in the present application is one month.
Step S12: if the real-time flow data reach the scheduling threshold value of the current period, determining the first flow channel as a target flow channel, otherwise, determining the second flow channel as the target flow channel; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode.
In particular embodiments, the scheduling threshold for the current period may be predetermined, for example, determined at the end of the last historical period, i.e., the last period. And, a scheduling threshold for the current period may be determined based on traffic data for the last historical period. Specifically, the flow data of the current period may be predicted based on the flow data of the recent historical period, and the scheduling threshold of the current period may be obtained based on the predicted flow data and a preset cost calculation model. When the real-time flow data is obtained, comparing the real-time flow data with a scheduling threshold, wherein the real-time flow data reaches the scheduling threshold of the current period, determining a channel corresponding to a time length charging mode as a target flow channel, otherwise, determining a channel corresponding to a peak charging mode as the target flow channel. It will be appreciated that the traffic data, i.e. the bandwidth at each point in the cycle, is such that the real-time traffic data reaches the scheduling threshold of the current cycle, i.e. the real-time bandwidth reaches the scheduling threshold of the current cycle.
That is, in the embodiment of the application, the characteristics of two time length charging modes can be combined, the flow channels of the two charging modes are simultaneously accessed to carry out flow scheduling, the flow is scheduled to the peak charging mode at ordinary times, the burr flow in the peak time is scheduled to the time length charging mode, the respective advantages of the two flow channels are fully played after the flow scheduling, and finally, the effects of peak clipping and use cost reduction are achieved.
Step S13: and transmitting the channel information of the target flow channel to the real-time audio and video application so that the real-time audio and video application can transmit real-time audio and video data based on the target flow channel.
In a specific embodiment, the channel information is a channel type, and the real-time audio and video application transmits real-time audio and video data based on a channel corresponding to the channel type.
In one embodiment, after the real-time audio/video application obtains the channel information, if the real-time audio/video data is currently transmitted based on the channel corresponding to the channel type, the channel is not switched, and if the real-time audio/video data is not currently transmitted based on the channel corresponding to the channel type, the channel is switched to the channel corresponding to the channel type.
In another embodiment, before step S13, it may also be determined whether the real-time audio/video application is currently transmitting real-time audio/video data based on the target traffic channel, if not, step S13 is triggered, otherwise, step S13 is not executed, so that the real-time audio/video application does not switch channels.
In addition, the embodiment of the application can monitor the states of the first flow channel and the second flow channel; and if any one of the first flow channel and the second flow channel fails, determining the non-failure channel in the first flow channel and the second flow channel as a target flow channel. Therefore, the states of the two channels are used as scheduling factors, and when one channel fails, the other channel can be completely cut, so that the robustness of the whole system is enhanced, and the accident occurrence cost is reduced.
It can be seen that, in the embodiment of the present application, real-time traffic data of a real-time audio/video application is obtained in a current period, if the real-time traffic data reaches a scheduling threshold of the current period, a first traffic channel is determined as a target traffic channel, otherwise, a second traffic channel is determined as a target traffic channel, the first traffic channel is a channel corresponding to a duration charging mode, the second traffic channel is a channel corresponding to a peak charging mode, and then channel information of the target traffic channel is issued to the real-time audio/video application, so that the real-time audio/video application transmits real-time audio/video data based on the target traffic channel. That is, the application acquires the real-time flow data of the real-time audio/video application, when the real-time flow data reaches the scheduling threshold, the flow of the real-time audio/video application is scheduled to the channel corresponding to the time length charging mode, otherwise, the flow of the real-time audio/video application is scheduled to the channel corresponding to the time length peak charging mode, thus combining the advantages of the two flow channels and reducing the flow use cost.
Referring to fig. 4, a specific traffic scheduling method disclosed in the embodiment of the present application includes:
step S21: acquiring flow data of a first period; wherein the flow data varies with time.
In a specific embodiment, the code rate of each user at each time point in the first period may be obtained; and calculating the bandwidth of each time point based on the code rate of all users at each time point in the first period to obtain the flow data of the first period. Wherein the first period may be a recent history period, the calculation formula of the flow data is s=t (W), S is the flow data, T is the time sequence, W is the bandwidth, and w=Σ 1-n (B) B is the user code rate, n is the number of users.
It can be understood that the flow data can be drawn into a flow curve, the flow curve is a flow periodic rule curve obtained by collecting statistics through a technical means in the operation process, and the influence factors are mainly as follows: new users grow speed, holiday activity, peak monthly, peak daily. For example, referring to fig. 5, fig. 5 shows a month flow curve according to an embodiment of the present application, where the horizontal axis is time and the vertical axis is bandwidth. Referring to fig. 6, fig. 6 shows a daily flow curve according to an embodiment of the present application, where the horizontal axis is time and the vertical axis is bandwidth. It can be observed from the flow curve that there is a peak on one day per month that is significantly higher than on the other day, and a peak on the other day. The flow in the low peak period is less than 1/10 of the flow in the peak period. The peak period of the daily flow is characterized by large peak value and short duration. And the latest history period is the last period of the current period.
Step S22: a flow rate increase is determined based on the flow data for the first period.
In particular embodiments, the flow rate increase rate may be determined based on flow data for a first period and flow data for a second period, where the second period is a period immediately preceding the first period. The formula adopted is R=F (Sn: sn-1), R is the flow rate increase rate, sn is the flow rate data of the first period, sn-1 is the flow rate data of the second period, F is the flow rate increase rate calculation function, and can be: f (Sn: sn-1) = (Sn-Sn-1)/t, t being time.
Step S23: second traffic data is determined based on the traffic growth rate and the first period of traffic data.
In a specific embodiment, a product of the flow rate increase rate and the flow data of the first period may be determined, and the second flow data may be obtained based on the product and the variable parameter summation. The second flow data is the predicted flow data of the current period, wherein the adopted formula is S (predicted flow data) =sn×r+β, β being a variable parameter.
Step S24: and obtaining the scheduling threshold of the current period based on the second flow data.
In one embodiment, the scheduling threshold of the current period may be obtained based on the second traffic data and a preset cost calculation model.
In a specific embodiment, step S24 may specifically include the following steps:
step 240: a plurality of candidate thresholds are determined, and a cost corresponding to each candidate threshold is calculated based on the second traffic data. Specifically, the cost corresponding to each candidate threshold may be calculated based on the second traffic data and a preset cost calculation model.
In one embodiment, a highest peak of the second flow data may be obtained; and reducing the highest peak value by adopting a preset step length to obtain a peak value reduction result until the highest peak value reduction result is zero, and taking the highest peak value and each peak value reduction result as the plurality of candidate threshold values.
Further, a flow data curve may be generated based on the second flow data; determining a threshold line based on any candidate threshold; the threshold straight line is a straight line with time variation and the bandwidth constant is a candidate threshold value; determining the area of a closed graph surrounded by the threshold straight line and the flow data curve; determining a target time length based on the area, and determining a first cost corresponding to a time length charging mode based on the target time length; determining the highest peak value smaller than or equal to the candidate threshold value in the flow data curve to obtain a target peak value, and determining a second cost corresponding to a peak charging mode based on the target peak value; and determining the sum of the first cost and the second cost as the cost corresponding to the candidate threshold.
Wherein, the determining the target duration based on the area may specifically include, in an embodiment: determining the average code rate corresponding to each closed graph based on the code rates of all users in the time period corresponding to each closed graph; determining the corresponding duration of each closed graph based on the area of each closed graph and the corresponding average code rate; and determining the sum of the time durations corresponding to all the closed graphs as a target time duration. The ratio of the area of any closed figure to the average code rate is the duration corresponding to the area of the closed figure.
It can be appreciated that the preset cost calculation model is: total cost = target peak-peak billing unit price + target duration-duration billing unit price. The target peak value is the highest peak value smaller than or equal to the scheduling threshold value in the flow data curve, and the target time length is the time length obtained by converting the area of a closed graph surrounded by the straight line of the threshold value corresponding to the scheduling threshold value and the flow data curve. Specifically, the ratio of the area of each closed graph to the corresponding code rate is determined, and then all the ratios are summed to obtain the target duration.
That is, in the preset cost calculation model, the flow peak charging mode does not need to be converted, the basic unit is Mbps in the historical flow statistics, and if the period is a month, the cost can be calculated only by acquiring the flow peak value in the month. The duration charging mode needs to convert the flow and the duration. By reducing the flow peak, the area of the reduced portion is converted into a time length. For example, referring to fig. 7, fig. 7 is a schematic diagram of a specific daily flow curve and a threshold straight line, where the straight line is a threshold straight line, when the bandwidth reaches the threshold, the flow is scheduled to a channel corresponding to the duration billing mode, and the area formed by the flow curve and the threshold straight line is divided by the code rate, so that the total cost of the duration billing after scheduling can be obtained. The cost calculation model is preset, and then the unit price of the two charging modes is combined, and flow data of any month is input, so that a cost curve can be obtained, and referring to fig. 8, fig. 8 is a specific cost curve schematic diagram disclosed in the embodiment of the application. An optimal threshold range can be obtained through the cost curve, and a threshold point with the lowest cost is provided, and the threshold point is used as the scheduling basis of the two charging modes, so that the lowest total cost can be obtained.
Step 241: and determining the lowest cost from the costs corresponding to the candidate thresholds, and determining the candidate threshold corresponding to the lowest cost as the scheduling threshold of the current period.
Step S25: and acquiring real-time flow data of the real-time audio and video application in the current period.
Step S26: if the real-time flow data reach the scheduling threshold value of the current period, determining the first flow channel as a target flow channel, otherwise, determining the second flow channel as the target flow channel; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode.
Step S27: and transmitting the channel information of the target flow channel to the real-time audio and video application so that the real-time audio and video application can transmit real-time audio and video data based on the target flow channel.
For the specific implementation process of the above steps S25 to S27, reference may be made to the disclosure of the foregoing embodiment, and no further description is given here.
Therefore, the embodiment of the application acquires the flow data of the recent historical period, further determines the flow increase rate, and predicts the flow data of the current period based on the flow increase rate and the flow data of the recent historical period; and obtaining the scheduling threshold of the current period based on the predicted flow data and a preset cost calculation model. Therefore, the current flow data is predicted based on the historical flow data to calculate the scheduling threshold of the current period, and the threshold is calculated relative to the real-time flow, so that the processing is easier, and the low-cost effect can be guaranteed.
The flow scheduling scheme of the application is elaborated by taking the period as one month, the flow curve of the month is predicted by combining the historical flow curve and the service growth rate, and the flow curve of the month is input into a cost preset cost calculation model to calculate the optimal threshold value of flow scheduling. The method specifically comprises the following steps:
first, a flow curve of the last month is obtained, and a flow rate increase rate is calculated. Then, the flow rate curve of the previous month is fitted to the flow rate increase rate, and the flow rate curve of the present month is estimated. And finally, inputting the estimated flow curve of the month into a preset cost calculation model, and calculating to obtain the scheduling threshold value when the cost is the lowest. It should be noted that if the flow curve is not estimated by the above scheme, but the cost is calculated by the real-time flow of the present month, the optimal threshold value of the schedule may be changed, the process is complicated, and the cost effect cannot be guaranteed. In contrast, by means of flow prediction, the optimal threshold point of flow scheduling can be predicted in advance, and from the view of a cost curve, the scheduling threshold within a given range can reach the effect of being very close to the minimum total cost. The specific process of calculating the scheduling threshold is as follows: obtaining the highest peak value of the predicted flow curve, calculating the C=peak value, and calculating the current cost, wherein the C=peak value indicates that no scheduling of the flow has occurred yet; reducing the value of C by adopting a fixed step length, converting the switched area into a duration by a formula, and then calculating the current cost; when c=0, it indicates that the peak billing traffic is all switched to duration billing. And C with the minimum cost is selected as a scheduling threshold according to the costs corresponding to all C. Referring to fig. 9, fig. 9 is a schematic diagram illustrating a specific scheduling threshold determination according to an embodiment of the present application.
Further, based on the scheduling threshold and in combination with the real-time traffic, traffic scheduling is performed. It can be understood that the embodiment of the application obtains the flow curve of the last month and calculates the flow increase rate. Fitting the flow curve of the previous month with the flow increase rate, and presuming the flow curve of the current month. And finally, inputting the estimated flow curve of the month into a preset cost calculation model, and calculating to obtain the scheduling threshold value when the cost is the lowest. And carrying out traffic scheduling based on the scheduling threshold and combining the real-time traffic. Fig. 10 is a schematic diagram of flow scheduling according to an embodiment of the present application. Wherein, based on the scheduling threshold and in combination with the real-time traffic, the traffic scheduling specifically comprises: obtaining the optimal scheduling threshold of the current month, wherein the threshold is effective for the current month. And automatically calculating the optimal threshold value of the next month on the last day of each month. Then, when a user opens (the song room plays wheat and live broadcast), current real-time flow data are obtained, and whether scheduling is performed or not is judged through a scheduling threshold value. Finally, issuing the scheduled RTC type, and the user App terminal acquires the RTC type issued by the background to play. As shown in fig. 11, fig. 11 is a schematic diagram of a specific traffic scheduling according to an embodiment of the present application.
Further, referring to fig. 12, fig. 12 is a schematic diagram of another specific traffic scheduling disclosed in an embodiment of the present application. And predicting the current month flow according to the current month flow data and the flow rate increase rate of the last month and then calculating the current month scheduling threshold. If some client versions do not support the scheme, filtering is performed, and various fault-tolerant mechanisms are provided, for example, real-time traffic data cannot be acquired, scheduling is performed based on historical traffic data, or a forced switching to a duration charging mode in a peak time period is performed. In the application, the flow data can be counted in real time by combining the timing task and the event.
In this way, a cost model is built based on different charging modes, flow data is used as input, and the optimal scheduling threshold values of the two charging modes are obtained; finally, real-time flow monitoring and automatic flow scheduling are carried out, so that the effects of reducing flow peaks and reducing flow use cost are achieved. In addition, the flow channels with various charging modes are introduced, so that disaster tolerance capability of real-time audio and video application is improved, the state of the flow channel can be included in a scheduling factor, when one channel fails, the flow is scheduled to the other channel, and huge loss caused by the failure of the single flow channel can be reduced.
Referring to fig. 13, an embodiment of the present application discloses a traffic scheduling device, including:
the real-time flow acquisition module 11 is used for acquiring real-time flow data of the real-time audio/video application in the current period;
a flow channel determining module 12, configured to determine a first flow channel as a target flow channel if the real-time flow data reaches the scheduling threshold of the current period, and determine a second flow channel as a target flow channel if the real-time flow data reaches the scheduling threshold of the current period; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode;
and the channel information issuing module 13 is used for issuing the channel information of the target flow channel to the real-time audio/video application so that the real-time audio/video application can transmit real-time audio/video data based on the target flow channel.
It can be seen that, in the embodiment of the present application, real-time traffic data of a real-time audio/video application is obtained in a current period, if the real-time traffic data reaches a scheduling threshold of the current period, a first traffic channel is determined as a target traffic channel, otherwise, a second traffic channel is determined as a target traffic channel, the first traffic channel is a channel corresponding to a duration charging mode, the second traffic channel is a channel corresponding to a peak charging mode, and then channel information of the target traffic channel is issued to the real-time audio/video application, so that the real-time audio/video application transmits real-time audio/video data based on the target traffic channel. That is, the embodiment of the application acquires the real-time flow data of the real-time audio/video application, when the real-time flow data reaches the scheduling threshold, the flow of the real-time audio/video application is scheduled to the channel corresponding to the time length charging mode, otherwise, the flow of the real-time audio/video application is scheduled to the channel corresponding to the time length peak charging mode, so that the advantages of the two flow channels can be combined, and the flow use cost can be reduced.
Further, the device further comprises:
the first flow acquisition module is used for acquiring flow data of a first period; wherein the flow data varies with time;
a flow rate increase rate acquisition module configured to determine a flow rate increase rate based on the flow data of the first period;
a second flow acquisition module for determining second flow data based on the flow rate increase rate and the first period of flow data;
and the scheduling threshold acquisition module is used for acquiring the scheduling threshold of the current period based on the second flow data.
The first flow obtaining module specifically comprises:
the user code rate acquisition sub-module is used for acquiring the code rate of each user at each time point in the first period;
and the bandwidth acquisition sub-module is used for calculating the bandwidth of each time point based on the code rate of all users at each time point in the first period to obtain the flow data of the first period.
Further, the scheduling threshold obtaining module specifically includes:
a candidate threshold determination submodule for determining a plurality of candidate thresholds;
a cost calculation sub-module, configured to calculate a cost corresponding to each candidate threshold based on the second traffic data;
and the scheduling threshold determining submodule is used for determining the lowest cost from the costs corresponding to the candidate thresholds and determining the candidate threshold corresponding to the lowest cost as the scheduling threshold of the current period.
The candidate threshold determining submodule is specifically used for acquiring the highest peak value of the second flow data; and reducing the highest peak value by adopting a preset step length to obtain a peak value reduction result until the highest peak value reduction result is zero, and taking the highest peak value and each peak value reduction result as the plurality of candidate threshold values.
Correspondingly, the cost calculation submodule specifically comprises:
a flow data curve generation unit for generating a flow data curve based on the second flow data;
a threshold straight line determination unit configured to determine a threshold straight line based on any one of the candidate threshold values; the threshold straight line is a straight line with time variation and the bandwidth constant is a candidate threshold value;
the area determining unit is used for determining the area of a closed graph surrounded by the threshold straight line and the flow data curve;
a time length determining unit for determining a target time length based on the area;
the first cost determining unit is used for determining a first cost corresponding to the duration charging mode based on the target duration;
a target peak value determining unit, configured to determine a highest peak value less than or equal to the candidate threshold value in the flow data curve to obtain a target peak value;
a second cost determining unit, configured to determine a second cost corresponding to a peak charging mode based on the target peak value;
and the total cost determining unit is used for determining the sum of the first cost and the second cost as the cost corresponding to the candidate threshold value.
The time length determining unit is specifically used for determining the average code rate corresponding to each closed graph based on the code rates of all users in the time period corresponding to each closed graph; determining the corresponding duration of each closed graph based on the area of each closed graph and the corresponding average code rate; and determining the sum of the time durations corresponding to all the closed graphs as a target time duration.
In addition, the device further comprises:
the state monitoring module is used for monitoring states of the first flow channel and the second flow channel;
correspondingly, the flow channel determining module 12 is further configured to determine a non-faulty channel of the first flow channel and the second flow channel as a target flow channel if the status monitoring module monitors that any one of the first flow channel and the second flow channel is faulty.
Further, the embodiment of the application also provides electronic equipment. Fig. 14 is a block diagram of an electronic device 20, according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 14 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, which is loaded and executed by the processor 21 to implement relevant steps in the traffic scheduling method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be a server.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, data 223, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and the computer program 222 to implement the operation and processing of the data 223 in the memory 22 by the processor 21, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the flow scheduling method performed by the electronic device 20 as disclosed in any of the previous embodiments.
Further, the embodiment of the application also discloses a storage medium, wherein the storage medium stores a computer program, and when the computer program is loaded and executed by a processor, the steps of the flow scheduling method disclosed in any one of the previous embodiments are realized.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing describes in detail a flow scheduling method, apparatus and medium provided by the present application, and specific examples are applied herein to illustrate the principles and embodiments of the present application, where the foregoing examples are only for helping to understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method of traffic scheduling, the method comprising a first traffic channel and a second traffic channel, comprising:
acquiring real-time flow data of real-time audio and video application in a current period;
if the real-time flow data reach the scheduling threshold value of the current period, determining the first flow channel as a target flow channel, otherwise, determining the second flow channel as the target flow channel; the first flow channel is a channel corresponding to a time length charging mode, and the second flow channel is a channel corresponding to a peak charging mode;
and transmitting the channel information of the target flow channel to the real-time audio and video application so that the real-time audio and video application can transmit real-time audio and video data based on the target flow channel.
2. The traffic scheduling method of claim 1, further comprising:
acquiring flow data of a first period; wherein the flow data varies with time;
determining a flow rate increase based on the first period of flow data;
determining second flow data based on the flow rate increase rate and the first period of flow data;
and obtaining the scheduling threshold of the current period based on the second flow data.
3. The traffic scheduling method according to claim 1, wherein the acquiring the traffic data of the first period includes:
acquiring the code rate of each user at each time point in the first period;
and calculating the bandwidth of each time point based on the code rate of all users at each time point in the first period to obtain the flow data of the first period.
4. The traffic scheduling method according to claim 2, wherein the obtaining the scheduling threshold of the current period based on the second traffic data includes:
determining a plurality of candidate thresholds, and calculating the cost corresponding to each candidate threshold based on the second flow data;
and determining the lowest cost from the costs corresponding to the candidate thresholds, and determining the candidate threshold corresponding to the lowest cost as the scheduling threshold of the current period.
5. The traffic scheduling method of claim 4, wherein the determining a plurality of candidate thresholds comprises:
acquiring the highest peak value of the second flow data;
and reducing the highest peak value by adopting a preset step length to obtain a peak value reduction result until the highest peak value reduction result is zero, and taking the highest peak value and each peak value reduction result as the plurality of candidate threshold values.
6. The traffic scheduling method according to claim 4, wherein calculating the cost corresponding to each candidate threshold based on the second traffic data comprises:
generating a flow data curve based on the second flow data;
determining a threshold line based on any candidate threshold; the threshold straight line is a straight line with time variation and the bandwidth constant is a candidate threshold value;
determining the area of a closed graph surrounded by the threshold straight line and the flow data curve;
determining a target time length based on the area, and determining a first cost corresponding to a time length charging mode based on the target time length;
determining the highest peak value smaller than or equal to the candidate threshold value in the flow data curve to obtain a target peak value, and determining a second cost corresponding to a peak charging mode based on the target peak value;
and determining the sum of the first cost and the second cost as the cost corresponding to the candidate threshold.
7. The traffic scheduling method according to claim 6, wherein the determining a target time length based on the area includes:
determining the average code rate corresponding to each closed graph based on the code rates of all users in the time period corresponding to each closed graph;
determining the corresponding duration of each closed graph based on the area of each closed graph and the corresponding average code rate;
and determining the sum of the time durations corresponding to all the closed graphs as a target time duration.
8. The traffic scheduling method according to any one of claims 1 to 7, characterized by further comprising:
monitoring the status of the first and second flow channels;
and if any one of the first flow channel and the second flow channel fails, determining the non-failure channel in the first flow channel and the second flow channel as a target flow channel.
9. An electronic device comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor configured to execute the computer program to implement the traffic scheduling method according to any one of claims 1 to 8.
10. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the traffic scheduling method according to any one of claims 1 to 8.
CN202310950908.8A 2023-07-31 2023-07-31 Traffic scheduling method, equipment and medium Pending CN116938820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310950908.8A CN116938820A (en) 2023-07-31 2023-07-31 Traffic scheduling method, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310950908.8A CN116938820A (en) 2023-07-31 2023-07-31 Traffic scheduling method, equipment and medium

Publications (1)

Publication Number Publication Date
CN116938820A true CN116938820A (en) 2023-10-24

Family

ID=88375303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310950908.8A Pending CN116938820A (en) 2023-07-31 2023-07-31 Traffic scheduling method, equipment and medium

Country Status (1)

Country Link
CN (1) CN116938820A (en)

Similar Documents

Publication Publication Date Title
US11277273B2 (en) Computer network service providing system including self adjusting volume enforcement functionality
JP5671285B2 (en) Method and system for demand response in a distribution network
CN101223513B (en) Background network bandwidth sharing behind gateway devices
CN101605057B (en) Method and system for realizing downlink Qos of family gateway
CN105282051B (en) A kind of bandwidth adjusting method and bandwidth server
JP2014514896A (en) Queue access to shared power supply
CN101047705B (en) Report process method, server for customer agent file information and its customer terminal
CN102461144B (en) In-home unit monitoring system
CN102932280A (en) Method, device and system for realizing bandwidth control
CN114071168A (en) Mixed-flow direct-broadcast stream scheduling method and device
CN111698736A (en) Intelligent household electrical appliance network switching method and device, computer equipment and server
CN102860051B (en) A kind of service billing control method and relevant device
US20220221924A1 (en) Prioritized Usage of Devices
CN116938820A (en) Traffic scheduling method, equipment and medium
CN102111888A (en) Channel allocation method and device and system
CN115955578A (en) Live streaming scheduling method and device
Trumler et al. Self-configuration via cooperative social behavior
CN112398120A (en) Distribution network each district power consumption load distribution system
US8582435B2 (en) Wireless node
CN117792991B (en) Automatic switching method for router links and multi-link router
Gabale et al. Async: De-congestion and yield management in cellular data networks
CN116170379B (en) Transmission control method, device, equipment and computer readable storage medium
CN112911620B (en) Information processing method and device, electronic equipment and storage medium
JP2020150524A (en) Communication band calculation device, communication band calculation method and program
CN117319560B (en) Method, device, equipment and storage medium for communication between buildings

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination