Resource scheduling method and device, electronic equipment and storage medium
By acquiring and analyzing resource consumption information from online live streaming platforms, the total resource consumption of accounts can be predicted and idle resources can be allocated, thus solving the problem of resource waste during off-peak periods in online live streaming and achieving efficient utilization and rational scheduling of resources.
Patent Information
- Application Number
- CN202310074206.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-01-13
AI Technical Summary
There is a problem of idle and wasted technical resources during off-peak periods in online live streaming.
By acquiring resource consumption information from business platforms and accounts, the total resource consumption of accounts in the next time period is predicted, and idle resources are allocated to accounts in the next time period based on this, taking into account the peak and off-peak characteristics of live streaming business and the degree of resource idleness.
提高了闲置资源的利用率,减少了资源浪费,提高了资源调度的合理性和准确性。
Smart Images

Figure CN116248614B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of Internet, and particularly relates to a resource scheduling method and device, electronic equipment, storage medium and program product. BACKGROUND
[0002] With the development of new media technology, network live broadcast has become a mainstream form in the Internet industry. Network live broadcast often provides related technical facilities by a live broadcast platform, and anchors perform live broadcast on the live broadcast platform through the network. In the live broadcast process of the anchors, technical resources provided by the live broadcast platform need to be consumed, such as server live broadcast transcoding resources and CDN bandwidth (Content Delivery Network).
[0003] Similar to most businesses, live broadcast business also has its own peak period and off-peak period, and the technical resources consumed by live broadcast will also be different in different time periods. However, the billing of technical resources is based on the highest peak usage per day, so there will be many idle resources of technical resources in the off-peak period less than the highest peak usage, which is easy to cause waste of resources. SUMMARY
[0004] The present disclosure provides a resource scheduling method, device, electronic equipment, storage medium and program product to at least solve the problem that there are many idle resources of technical resources in the off-peak period in the related art, which causes waste of resources. The technical solutions of the present disclosure are as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a resource scheduling method is provided, comprising:
[0006] In response to a resource scheduling request for a plurality of accounts, first resource consumption information of a business platform and second resource consumption information of the plurality of accounts in a current time period are obtained; the first resource consumption information is used to determine the resource idle degree of the business platform in a plurality of time periods in the current time period, and the second resource consumption information is used to determine the resource consumption amount of each account in a plurality of time periods in the current time period;
[0007] According to the first resource consumption information of the business platform and the second resource consumption information of each account, the total resource consumption amount of each account in a next time period of the current time period is predicted;
[0008] Based on the total resource consumption amount of each account, idle resources of the business platform are allocated to each account in the next time period.
[0009] In an example embodiment, the predicting the total resource consumption of each account in a next time period of the current time period according to the first resource consumption information of the business platform and the second resource consumption information of each account comprises:
[0010] determining amplification coefficients corresponding to a plurality of time periods in the current time period according to the first resource consumption information of the business platform; the amplification coefficients are used to represent the degree of resource idleness of the business platform in each time period;
[0011] determining resource consumption amounts of each account in each time period in the plurality of time periods according to the second resource consumption information of each account respectively;
[0012] for each account, obtaining the total resource consumption of the account in the current time period based on the resource consumption amount of the account in each time period and the amplification coefficient corresponding to each time period, as the total resource consumption of the account in a next time period of the current time period.
[0013] In an example embodiment, the determining amplification coefficients corresponding to a plurality of time periods in the current time period according to the first resource consumption information of the business platform comprises:
[0014] determining resource consumption amounts of each time period and a target resource consumption amount in the resource consumption amounts of each time period according to the first resource consumption information of the business platform; the target resource consumption amount is greater than other resource consumption amounts in the resource consumption amounts of each time period;
[0015] obtaining the amplification coefficient corresponding to each time period based on the resource consumption amount of each time period and the target resource consumption amount.
[0016] In an example embodiment, the obtaining the amplification coefficient corresponding to each time period based on the resource consumption amount of each time period and the target resource consumption amount comprises:
[0017] for each time period, obtaining a ratio between the resource consumption amount of the time period and the target resource consumption amount as the amplification coefficient corresponding to the time period.
[0018] In an example embodiment, the obtaining the total resource consumption of the account in the current time period based on the resource consumption amount of the account in each time period and the amplification coefficient corresponding to each time period comprises:
[0019] obtaining the total resource consumption of the account in each time period based on the resource consumption of the account in each time period and the amplification factor corresponding to each time period;
[0020] summing the total resource consumption of each time period to obtain the total resource consumption of the account in the current time period.
[0021] In an example embodiment, the obtaining the total resource consumption of the account in each time period based on the resource consumption of the account in each time period and the amplification factor corresponding to each time period comprises:
[0022] determining the control parameter of each time period based on the resource usage demand of each time period; the control parameter is used to control the resource consumption of the business platform in each time period within the resource consumption in the resource usage peak period;
[0023] obtaining the total resource consumption of the account in each time period based on the resource consumption of the account in each time period, the amplification factor corresponding to each time period, and the control parameter of each time period.
[0024] In an example embodiment, the obtaining the total resource consumption of the account in each time period based on the resource consumption of the account in each time period, the amplification factor corresponding to each time period, and the control parameter of each time period comprises:
[0025] multiplying the amplification factor corresponding to each time period, the control parameter, and the resource consumption of the account in each time period to obtain the total resource consumption of the account in each time period.
[0026] In an example embodiment, the allocating the idle resources of the business platform to the accounts in the next time period based on the total resource consumption of the accounts comprises:
[0027] determining the priority of the accounts to obtain resources based on the total resource consumption of the accounts; wherein the priority of the accounts to obtain resources is negatively correlated with the total resource consumption;
[0028] allocating the idle resources of the business platform to the accounts in the next time period based on the priority of the accounts to obtain resources.
[0029] According to a second aspect of the embodiments of the present disclosure, a resource scheduling device is provided, comprising:
[0030] an information obtaining unit configured to obtain, in response to a resource scheduling request for a plurality of accounts, first resource consumption information of a service platform and second resource consumption information of the plurality of accounts in a current time period; the first resource consumption information is used to determine resource idle degrees of the service platform in a plurality of time periods in the current time period, and the second resource consumption information is used to determine resource consumption amounts of each account in the plurality of time periods in the current time period;
[0031] a prediction unit configured to predict, according to the first resource consumption information of the service platform and the second resource consumption information of each account, a total resource consumption amount of each account in a next time period of the current time period;
[0032] a resource allocation unit configured to allocate idle resources of the service platform to each account in the next time period based on the total resource consumption amount of each account.
[0033] In an example embodiment, the prediction unit comprises:
[0034] a coefficient determining sub-unit configured to determine, according to the first resource consumption information of the service platform, amplification coefficients corresponding to the plurality of time periods in the current time period; the amplification coefficients are used to represent resource idle degrees of the service platform in each time period;
[0035] a consumption amount determining sub-unit configured to determine, according to the second resource consumption information of each account, a resource consumption amount of each account in each time period in the plurality of time periods;
[0036] a total amount determining sub-unit configured to, for each account, obtain, based on the resource consumption amount of the account in each time period and the amplification coefficient corresponding to each time period, a total resource consumption amount of the account in the current time period, as a total resource consumption amount of the account in a next time period of the current time period.
[0037] In an example embodiment, the coefficient determining sub-unit is further configured to determine, according to the first resource consumption information of the service platform, resource consumption amounts of each time period and a target resource consumption amount in the resource consumption amounts of each time period; the target resource consumption amount is greater than other resource consumption amounts in the resource consumption amounts of each time period; and obtain, based on the resource consumption amounts of each time period and the target resource consumption amount, the amplification coefficient corresponding to each time period.
[0038] In an example embodiment, the coefficient determining subunit is further configured to perform, for each time period, obtaining a ratio between the resource consumption amount of the time period and the target resource consumption amount as an amplification coefficient corresponding to the time period.
[0039] In an example embodiment, the total amount determining subunit is further configured to perform, based on the resource consumption amount of the account in each time period and the amplification coefficient corresponding to the time period, obtaining a total resource consumption amount of the account in each time period; and performing summation processing on the total resource consumption amount of each time period to obtain a total resource consumption amount of the account in the current time period.
[0040] In an example embodiment, the total amount determining subunit is further configured to perform, based on the resource usage demand of each time period, determining a control parameter of each time period; the control parameter is used to control the resource consumption amount of the service platform in each time period to be within the resource consumption amount of the resource usage peak period; and based on the resource consumption amount of the account in each time period, the amplification coefficient corresponding to the time period, and the control parameter of each time period, obtaining a total resource consumption amount of the account in each time period.
[0041] In an example embodiment, the total amount determining subunit is further configured to perform, for each time period, multiplying the amplification coefficient corresponding to the time period, the control parameter, and the resource consumption amount of the account in the time period to obtain a total resource consumption amount of the account in the time period.
[0042] In an example embodiment, the resource allocation unit is further configured to perform, based on the total resource consumption amount of each account, determining a priority of each account to obtain resources; and based on the priority of each account to obtain resources, allocating the idle resources of the service platform to each account in the next time period; wherein the priority of obtaining resources is in a negative correlation with the total resource consumption amount.
[0043] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising:
[0044] a processor;
[0045] a memory for storing instructions executable by the processor;
[0046] wherein the processor is configured to execute the instructions to implement the method according to any one of the preceding aspects.
[0047] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which includes instructions executable by a processor of an electronic device, so that the electronic device can perform the method according to any one of the preceding aspects.
[0048] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, which includes instructions executable by a processor of an electronic device, so that the electronic device can perform the method according to any one of the preceding aspects.
[0049] The embodiments of the present disclosure provide at least the following beneficial effects:
[0050] In response to a resource scheduling request for multiple accounts, after obtaining first resource consumption information that can be used to determine the resource idle degree of multiple time periods in a current time period, and second resource consumption information that can be used to determine the resource consumption amount of each account in the multiple time periods in the current time period, the total resource consumption amount of each account in a next time period of the current time period is predicted based on the first resource consumption information and the second resource consumption information, and the idle resources of the service platform in the next time period are allocated to each account based on the total resource consumption amount of each account. This method uses the total resource consumption amount of each account in the current time period to allocate idle resources of the service platform, which can improve the utilization rate of idle resources and reduce resource waste. At the same time, when determining the total resource consumption amount of each account, the peak and valley characteristics of the live streaming service and the different resource idle degrees of each time period are considered, and the first resource consumption information used to determine the resource idle degree of each time period is combined to determine the total resource consumption amount of each account, which can improve the accuracy of the determined total resource consumption amount, thereby improving the rationality of the scheduling of idle resources of the service platform.
[0051] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0052] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure and do not limit the present disclosure.
[0053] Figure 1 is an application environment diagram of a resource scheduling method according to an exemplary embodiment.
[0054] Figure 2 is a flowchart of a resource scheduling method according to an exemplary embodiment.
[0055] Figure 3is a flowchart of a resource scheduling method according to another exemplary embodiment.
[0056] Figure 4 is a resource usage waveform comparison chart of a business platform before and after utilizing idle resources of the business platform according to an exemplary embodiment.
[0057] Figure 5 is a structural block diagram of a resource scheduling device according to an exemplary embodiment.
[0058] Figure 6 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0059] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings.
[0060] It should be noted that the implementations described in the following exemplary embodiments do not represent all the implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0061] It should be noted that the terms "first", "second", and the like in the specification and claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties.
[0062] The resource scheduling method provided by the embodiments of the present disclosure can be applied in an application environment as shown in Figure 1 . Wherein, the terminal 102 communicates with the server 104 through the network, and the server 104 can be a server carrying a business platform, which can record the resource consumption of each account using the business platform, and the total resource consumption of the business platform. Wherein, the terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0063] In the application scenario of the present disclosure, the server 104 can record the resource consumption data of each account and the resource consumption data of the business platform in real time. The terminal 102 can obtain, in response to a resource scheduling request for multiple accounts, the resource consumption data of the business platform in a current time period from the server 104 as first resource consumption information, and obtain the resource consumption data of each account as second resource consumption information. According to the first resource consumption information and the second resource consumption information of each account, the total resource consumption of each account in a next time period of the current time period is predicted. Finally, the idle resources of the business platform can be allocated to each account in the next time period based on the total resource consumption of each account, which can improve the utilization rate of idle resources and reduce the waste of resources.
[0064] Figure 2 is a flowchart of a resource scheduling method according to an exemplary embodiment. As shown in Figure 2 , the method is applied to the terminal 102 in Figure 1 for example, and includes the following steps:
[0065] In step S210, in response to a resource scheduling request for multiple accounts, first resource consumption information of a business platform in a current time period and second resource consumption information of multiple accounts are obtained. The first resource consumption information is used to determine the idle degree of resources of the business platform in multiple time periods in the current time period, and the second resource consumption information is used to determine the resource consumption amount of each account in multiple time periods in the current time period.
[0066] Wherein, the account refers to an account for live streaming on the business platform.
[0067] Wherein, the current time period can include one time period, or multiple time periods. One time period can be one day, i.e. from 0 o'clock to 24 o'clock, or one week, one month, which can be determined according to actual conditions. If the current time period includes multiple time periods, the total resource consumption of each account in each time period is calculated, and finally the idle resources are allocated to each account based on the total resource consumption of each account in each time period according to a preset allocation method. For ease of explanation, the following content is described by taking the current time period as one time period as an example.
[0068] Wherein, the resource in the resource consumption information refers to technical resources provided by the business platform, which can be CDN bandwidth (Content Delivery Network) resources, or live streaming transcoding resources.
[0069] Specifically, taking one day as an example for a time period, the terminal 102 obtains the first resource consumption information of the service platform and the second resource consumption information of each account within one or more days from the server 104 in response to the resource scheduling request for multiple accounts, so as to predict the total resource consumption of each account in the next time period of the current time period according to the first resource consumption information that can be used to determine the resource idle degree of multiple time periods in the current time period, and the second resource consumption information that can be used to determine the resource consumption of each account in multiple time periods in the current time period.
[0070] In step S220, the total resource consumption of each account in the next time period of the current time period is predicted according to the first resource consumption information of the service platform and the second resource consumption information of each account.
[0071] In a specific implementation, since the total resource consumption of each account is the basis for the idle resource allocation of the service platform to each account in the next time period, in order to ensure the rationality of the allocation, in addition to the resource consumption of each account itself, the resource idle condition of the service platform also needs to be considered when determining the total resource consumption of each account, and the resource consumption of each account in different time periods is different, and the resource idle degree of the service platform in different time periods is also different, therefore, in the process of predicting the total resource consumption of each account in the next time period of the current time period, the resource consumption of each account in each time period in the current time period needs to be determined on the basis of the resource consumption of each account in each time period in the current time period, and the first resource consumption information that can be used to determine the resource idle degree of the service platform in different time periods is combined to determine the total resource consumption of each account in the current time period, which corresponds to the total resource consumption of each account in the next time period.
[0072] In step S230, the idle resource of the service platform is allocated to each account in the next time period based on the total resource consumption of each account.
[0073] In a specific implementation, based on the total resource consumption of each account, the priority of each account to obtain resources can be determined, and the idle resource allocation can be performed on each account in the order from high to low priority. Specifically, the allocation method can be: allocating resources to accounts with high priority, not allocating resources to accounts with low priority, or allocating more resources to accounts with high priority and less resources to accounts with low priority, which is not limited in the present application and can be determined according to actual needs.
[0074] In the resource scheduling method, in response to the resource scheduling request for the plurality of accounts, after obtaining the first resource consumption information that can be used to determine the resource idle degree of the plurality of time periods in the current time period, and the second resource consumption information that can be used to determine the resource consumption amount of each account in the plurality of time periods in the current time period, the total resource consumption amount of each account in the next time period of the current time period is predicted based on the first resource consumption information and the second resource consumption information, and the idle resources of the service platform in the next time period are allocated to each account based on the total resource consumption amount of each account. The method uses the total resource consumption amount of each account in the current time period to allocate the idle resources of the service platform, which can improve the utilization rate of the idle resources and reduce the waste of resources. Meanwhile, when determining the total resource consumption amount of each account, the peak and valley characteristics of the live streaming service and the different resource idle degrees of each time period are considered, and the first resource consumption information used to determine the resource idle degree of each time period is combined to determine the total resource consumption amount of each account, which can improve the accuracy of the determined total resource consumption amount and thus improve the rationality of the idle resource scheduling of the service platform.
[0075] In an exemplary embodiment, in step S220, the total resource consumption amount of each account in the next time period of the current time period is predicted according to the first resource consumption information of the service platform and the second resource consumption information of each account, which can be achieved by the following steps:
[0076] In step S221, the amplification coefficient corresponding to each time period in the current time period is determined according to the first resource consumption information of the service platform; the amplification coefficient is used to represent the resource idle degree of the service platform in each time period.
[0077] The amplification coefficient is negatively correlated with the resource idle degree, and the smaller the amplification coefficient is, the higher the resource idle degree is. Each time period can have a corresponding amplification coefficient, and the time period can be a minute or an hour, which is not limited in the present disclosure.
[0078] In a specific implementation, the current time period can be divided into a plurality of time periods according to the preset time length of each time period, for example, taking one day as the current time period, and setting the time length of each time period as 6 hours, the current time period can be divided into 0-6 o'clock, 6-12 o'clock, 12-18 o'clock, 18-24 o'clock, etc. The resource consumption amount of each time period and the target resource consumption amount in the current time period are determined from the first resource consumption information of the service platform. The amplification coefficient corresponding to each time period is determined according to the resource consumption amount of each time period and the target resource consumption amount in the current time period.
[0079] In step S222, the resource consumption amount of each account in each time period is determined according to the second resource consumption information of each account.
[0080] In specific implementation, the resource consumption amount of the account in each time period can be the average value or the median value of the resource consumption amount of the account in the time period. Since the resource consumption mode of the account in a time period is mostly continuous consumption, i.e., the resource is consumed at multiple time points in the time period, the resource consumption amount of each account at all time points in each time period can be determined according to the second resource consumption information of each account, and then the average value or the median value of the resource consumption amount at each time point in each time period is calculated as the resource consumption amount of each time period.
[0081] In step S223, for each account, the total resource consumption amount of the account in the current time period is obtained based on the resource consumption amount of the account in each time period and the amplification coefficient corresponding to each time period, which corresponds to the total resource consumption amount of the account in the next time period of the current time period.
[0082] The total resource consumption amount is used to represent the consumption degree of the account to the resources of the service platform.
[0083] In specific implementation, since the live broadcast service has peak and off-peak periods, the resources consumed by the same anchor in different time periods are different, and the idle condition of the resources of the service platform is also different in different time periods, so the total resource consumption amount of the same account in different time periods needs to be treated differently. When determining the total resource consumption amount of the account in the current time period, the total resource consumption amount of the account in each time period can be first determined based on the resource consumption amount of the account in each time period and the amplification coefficient corresponding to each time period, and then the total resource consumption amount of the account in the current time period is obtained based on the total resource consumption amount of each time period.
[0084] In this embodiment, when determining the total resource consumption amount of each account, the total resource consumption amount of each account in different time periods is treated differently, the amplification coefficient is combined to determine the total resource consumption amount of each account, considering the peak and off-peak characteristics of the live broadcast service and the different idle degrees of the resources in each time period, which can improve the accuracy of the determined total resource consumption amount, thereby improving the rationality of the idle resource scheduling of the service platform.
[0085] In an exemplary embodiment, in step S221, the amplification coefficients corresponding to the multiple time periods in the current time period can be determined according to the first resource consumption information of the service platform, which can be implemented by the following steps:
[0086] In step S221A, according to the first resource consumption information of the service platform, the resource consumption amount of each time period and the target resource consumption amount in the resource consumption amount of each time period are determined; the target resource consumption amount is greater than other resource consumption amounts in the resource consumption amount of each time period;
[0087] In step S221B, based on the resource consumption amount of each time period and the target resource consumption amount, the amplification coefficient corresponding to each time period is obtained.
[0088] In a specific implementation, since the amplification coefficient is used to represent the resource idle degree of each time period, and the resource idle degree is determined relative to the resource consumption peak period, therefore, the determination of the amplification coefficient can be determined by the resource consumption amount of each time period in the current time period and the resource consumption amount of the resource consumption peak period.
[0089] More specifically, according to the first resource consumption information of the service platform, the resource consumption amount of each time point in each time period can be determined first, and for any time period, the average or median value of the resource consumption amount of each time point in the time period is taken as the resource consumption amount of the time period. Further, according to the numerical value of the resource consumption amount, the target resource consumption amount, i.e. the target resource consumption amount, is determined from the resource consumption amount of each time period, as the resource consumption amount of the resource consumption peak period. Finally, based on the resource consumption amount of each time period and the target resource consumption amount, the amplification coefficient corresponding to each time period is obtained.
[0090] Further, in an embodiment, the implementation manner of step S221B can be: for each time period, the ratio between the resource consumption amount of the time period and the target resource consumption amount is obtained as the amplification coefficient corresponding to the time period.
[0091] In the above embodiment, by calculating the ratio between the resource consumption amount of each time period and the target resource consumption amount in the resource consumption amount of each time period as the amplification coefficient corresponding to each time period, the resource idle situation of each time period relative to the resource consumption peak period is represented by the amplification coefficient, so that the total resource consumption amount of each account using the idle resources of each time period can be determined according to the amplification coefficient subsequently.
[0092] In an exemplary embodiment, in the above step S223, based on the resource consumption amount of each account in each time period and the amplification coefficient corresponding to each time period, the total resource consumption amount of the account in the current time period is obtained, which can be implemented by the following steps:
[0093] In step S223A, based on the resource consumption amount of each account in each time period and the amplification coefficient corresponding to each time period, the total resource consumption amount of the account in each time period is obtained.
[0094] Step S223B, summing up the resource consumption amount of each time period to obtain the total resource consumption amount of the account in the current time period.
[0095] In a specific implementation, for each time period, the resource consumption amount of the account in the time period is multiplied by the amplification factor corresponding to the time period to obtain the total resource consumption amount of the account in the time period, and the total resource consumption amounts of the account in each time period are further added to obtain the total resource consumption amount of the account in the current time period.
[0096] In this embodiment, considering the influence of the peak and off-peak periods of the live streaming service on resource consumption, the total resource consumption amount of each time period is first calculated, and then the total resource consumption amount of the account in the entire current time period is determined based on the total resource consumption amounts of the time periods. This method of separately calculating the total resource consumption amounts of different time periods can improve the accuracy of the determined total resource consumption amount.
[0097] In an exemplary embodiment, the implementation manner of obtaining the total resource consumption amount of the account in each time period based on the resource consumption amount of the account in each time period and the amplification factor corresponding to each time period in step S223A further includes:
[0098] Based on the resource usage demand of each time period, control parameters of the time periods are determined; the control parameters are used to control the resource consumption amount of the service platform in each time period to be within the resource consumption amount of the resource usage peak period.
[0099] Based on the resource consumption amount of the account in each time period, the amplification factor corresponding to each time period, and the control parameters of each time period, the total resource consumption amount of the account in each time period is obtained.
[0100] The control parameters are used to control the resource consumption amount of the service platform in each time period to be within the resource consumption amount of the peak period.
[0101] It can be understood that in addition to the live streaming service, the service platform can also have some other services, that is, the resources of each time period can also be provided to other services in addition to the accounts, and therefore, when determining the total resource consumption amount of the account in each time period, the resource usage demand of other services in each time period also needs to be considered to avoid the idle resources of a time period being simultaneously used by other services and accounts to form a new resource consumption peak when the resource usage demand of other services is not considered.
[0102] In a specific implementation, the control parameter of each time period can be determined based on the resource usage demand of other services in each time period. Specifically, the control parameter of each time period can be determined according to a positive correlation between the control parameter and the resource usage demand of other services, that is, the greater the resource usage demand of other services in a time period, the greater the control parameter corresponding to the time period.
[0103] For example, there are four time periods: 0-t1, t1-t2, t2-t3, and t3-t4. It is known that some resources need to be reserved for other services in the time period t1-t2, so the traffic in the time period t1-t2 needs to be controlled not to rise too much. The control parameter A can be set as follows: 0-t1, t2-t3, and t3-t4 have no resource usage demand of other services, so the control parameter can be set to be small, for example, all set to 1. The time period t1-t2 has resource usage demand of other services, so the control parameter needs to be adjusted accordingly, for example, set to 10.
[0104]
[0105] After determining the service usage demand of each time period, the total resource consumption of the account in each time period can be obtained based on the resource consumption of the account in each time period, the amplification coefficient corresponding to each time period, and the control parameter of each time period.
[0106] Further, in an example embodiment, the implementation of obtaining the total resource consumption of the account in each time period based on the resource consumption of the account in each time period, the amplification coefficient corresponding to each time period, and the control parameter of each time period can be that, for each time period, the amplification coefficient corresponding to the time period, the control parameter, and the resource consumption of the account in the time period are multiplied to obtain the total resource consumption of the account in the time period.
[0107] In the above embodiment, considering that other services also have resource usage demand in each time period, the disclosure provides that the control parameter of each time period is determined based on the resource usage demand in each time period, and the resource consumption in each time period is controlled within the resource consumption in the peak period through the control parameter, so as to avoid that, when the resource usage demand of other services is not considered, the idle resources of a time period are simultaneously used by other services and the account, forming a new resource consumption peak.
[0108] In an example embodiment, in the step S230, based on the total resource consumption of each account, the idle resources of the service platform are allocated to each account in the next time period, including:
[0109] In step S231, based on the total resource consumption of each account, the priority of each account to obtain resources is determined.
[0110] In step S232, the idle resources of the service platform are allocated to the accounts according to the priority of the accounts to obtain resources in the next time period.
[0111] In a specific implementation, the priority of the accounts to obtain resources can be determined based on the total resource consumption of the accounts, with the condition that the total resource consumption is negatively correlated with the priority, that is, the higher the total resource consumption of an account, the lower the priority of the account to obtain resources, and vice versa. After the priority of the accounts to obtain resources is determined, the idle resources of the service platform can be allocated to the accounts in descending order of the priority.
[0112] For example, if the total resource consumption of account A is higher than that of account B, it can be determined that the priority of account B to obtain resources is higher than that of account A, and if the idle resources of the service platform in the next time period can only meet the demand of one account, account B can obtain the resources first.
[0113] In this embodiment, the priority of the accounts to obtain resources is determined based on the total resource consumption of the accounts, and then the resources are allocated to the accounts according to the priority, which can control the resource consumption in each time period to be less than that in the peak time period, and effectively schedule the idle resources of the service platform.
[0114] In one embodiment, as shown in FIG. 4, which is a flowchart of a resource scheduling method according to another embodiment, the method includes the following steps: Figure 3
[0115] In step S310, first resource consumption information of the service platform and second resource consumption information of a plurality of accounts in a current time period are obtained.
[0116] In step S320, the resource consumption in each time period and the maximum resource consumption in the resource consumption in each time period are determined according to the first resource consumption information of the service platform.
[0117] In step S330, for each time period, a ratio between the resource consumption in the time period and a target resource consumption is obtained as an amplification coefficient corresponding to the time period. The amplification coefficient is used to represent the idle degree of resources in each time period.
[0118] In step S340, the resource consumption of each account in each time period of the plurality of time periods is determined according to the second resource consumption information of each account.
[0119] In step S350, the control parameters of each time period are determined based on the resource usage demand of each time period.
[0120] Step S360: For each account, based on the account's resource consumption in each time period, the amplification factor corresponding to each time period, and the control parameters of each time period, obtain the total resource consumption of the account in each time period.
[0121] Step S370: Sum the total resource consumption for each time period to obtain the total resource consumption of the account in the current time period.
[0122] Step S380: Determine the priority of each account in obtaining resources based on the total resource consumption of each account;
[0123] Step S390: Based on the priority of each account in obtaining resources, allocate idle resources of the business platform to each account in the next time period.
[0124] The resource scheduling method provided in this embodiment uses the total resource consumption of each account within the current time period to allocate idle resources on the business platform. This can improve the utilization rate of idle resources and reduce resource waste. At the same time, when determining the total resource consumption of each account, the peak and off-peak characteristics of the live streaming business and the different levels of resource idleness in each time period are taken into consideration. The total resource consumption of each account in different time periods is treated differently, and the total resource consumption of each account is determined by combining an amplification factor. This can improve the accuracy of the determined total resource consumption, thereby improving the rationality of the scheduling of idle resources on the business platform.
[0125] In an exemplary embodiment, specific examples will be described below in conjunction with the accompanying drawings to facilitate understanding of the embodiments of this disclosure by those skilled in the art.
[0126] refer to Figure 4 This is a waveform comparison of resource usage on a service platform before and after utilizing its idle resources, as illustrated in one embodiment. Figure 4 (a) is a waveform diagram of resource usage of the business platform before utilizing idle resources. Figure 4 (b) is a waveform diagram of resource usage for account M. Figure 4 (c) is a waveform diagram of resource usage for account N. Figure 4 (d) is a waveform diagram of resource usage on the business platform after the anchor account N uses idle resources.
[0127] The figure uses the current time period as an example, which includes four time periods: 0-t1, t1-t2, t2-t3, and t3-t4. Let the resource consumption of the business platform in each time period be C(i), where i represents the time period, and the target resource consumption be Cmax. From the figure, we can see that C(1) = a1, C(2) = a2, C(3) = a3, C(4) = a4, and Cmax = a3. Then, the amplification coefficient r for each time period can be calculated as follows:
[0128] r(1)=C(1) / C max=a1 / a3, r(2)=C(2) / C max=a2 / a3,
[0129] r(3)=C(3) / C max=a3 / a3, r(4)=C(4) / C max=a4 / a3.
[0130] The control parameters for each time period are as follows:
[0131]
[0132] The resource usage waveform of account M in the figure shows that the resource consumption of account M in each time period is as follows: b1, b2, b3, b4. Therefore, the total resource consumption of account M is:
[0133]
[0134] The resource usage waveform of account N in the figure shows that the resource consumption of account N in each time period is c1, c2, c3, and c4, respectively. Therefore, the total resource consumption of account N is:
[0135]
[0136] Assuming that the total resource consumption of account M is higher than that of account N, then account M will have a lower priority in obtaining resources than account N. If the idle resources of the business platform can only satisfy one account, then account N will have priority in obtaining resources. By overlaying the resource usage waveform of account N with the resource usage waveform of the business platform, it can be seen that the idle resources of the business platform are utilized by account N to varying degrees in different time periods, but only a small increase in cost is added. This confirms the effectiveness of the method proposed in this disclosure.
[0137] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0138] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.
[0139] Based on the same inventive concept, this disclosure also provides a resource scheduling apparatus for implementing the resource scheduling method described above.
[0140] Figure 5 This is a structural block diagram illustrating a resource scheduling apparatus according to an exemplary embodiment. (Refer to...) Figure 5 The device includes: an information acquisition unit 510, a prediction unit 520, and a resource allocation unit 530, wherein,
[0141] The information acquisition unit 510 is configured to respond to resource scheduling requests for multiple accounts by acquiring first resource consumption information of the business platform and second resource consumption information of multiple accounts within the current time period; the first resource consumption information is used to determine the resource idleness of the business platform in multiple time periods within the current time period, and the second resource consumption information is used to determine the resource consumption of each account in multiple time periods within the current time period.
[0142] The prediction unit 520 is configured to predict the total resource consumption of each account in the next time period of the current time period based on the first resource consumption information of the business platform and the second resource consumption information of each account.
[0143] Resource allocation unit 530 is configured to allocate idle resources of the business platform to each account in the next time period based on the total resource consumption of each account.
[0144] In one exemplary embodiment, the prediction unit 520 includes:
[0145] The coefficient determination subunit 521 is configured to determine the amplification coefficients corresponding to multiple time periods within the current time period based on the first resource consumption information of the business platform; the amplification coefficients are used to characterize the resource idleness of the business platform in each time period.
[0146] The consumption determination subunit 522 is configured to perform the following: determine the resource consumption of each account in each time period of multiple time periods based on the second resource consumption information of each account.
[0147] The total resource consumption determination subunit 523 is configured to perform the following operation for each account: based on the account's resource consumption in each time period and the amplification factor corresponding to each time period, the total resource consumption of the account in the current time period is obtained, which is then used as the total resource consumption of the account in the next time period.
[0148] In an exemplary embodiment, the coefficient determining subunit 521 is further configured to perform the following: determining the resource consumption amount for each time period and the target resource consumption amount in the resource consumption amount for each time period based on the first resource consumption information of the business platform; the target resource consumption amount is greater than the other resource consumption amounts in the resource consumption amount for each time period; and obtaining the amplification coefficient corresponding to each time period based on the resource consumption amount for each time period and the target resource consumption amount.
[0149] In an exemplary embodiment, the coefficient determination subunit 521 is further configured to perform, for each time period, the acquisition of the ratio between the resource consumption of the time period and the target resource consumption, as the amplification coefficient corresponding to the time period.
[0150] In an exemplary embodiment, the total amount determination subunit 523 is further configured to perform the following: based on the resource consumption of the account in each time period and the amplification factor corresponding to each time period, obtain the total resource consumption of the account in each time period; and sum the total resource consumption of each time period to obtain the total resource consumption of the account in the current time period.
[0151] In an exemplary embodiment, the total amount determination subunit 523 is further configured to perform the determination of control parameters for each time period based on the resource usage requirements for each time period; the control parameters are used to control the resource consumption of the business platform in each time period within the resource consumption during peak resource usage periods; and the total resource consumption of the account in each time period is obtained based on the account's resource consumption in each time period, the amplification coefficient corresponding to each time period, and the control parameters for each time period.
[0152] In an exemplary embodiment, the total amount determination subunit 523 is further configured to perform a multiplication process for each time period, multiplying the amplification factor and control parameters corresponding to the time period with the resource consumption of the account in the time period, to obtain the total resource consumption of the account in the time period.
[0153] In an exemplary embodiment, the resource allocation unit 530 is further configured to perform the following: determine the priority of each account in obtaining resources based on the total resource consumption of each account; and allocate idle resources of the business platform to each account in the next time period based on the priority of each account in obtaining resources; wherein the priority of obtaining resources is negatively correlated with the total resource consumption.
[0154] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0155] Figure 6This is a block diagram illustrating an electronic device 600 for implementing a resource scheduling method according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0156] Reference Figure 6 The electronic device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.
[0157] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0158] Memory 604 is configured to store various types of data to support the operation of electronic device 600. Examples of such data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, optical disk, or graphene storage.
[0159] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.
[0160] Multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0161] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0162] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0163] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 can detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or its components, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0164] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0165] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0166] In one exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0167] In one exemplary embodiment, a computer program product is also provided, which includes instructions that can be executed by a processor 620 of an electronic device 600 to perform the above-described method.
[0168] It should be noted that the above-mentioned apparatus, electronic equipment, computer-readable storage medium, computer program product, etc., may also include other implementation methods according to the description of the method embodiments. For specific implementation methods, please refer to the description of the relevant method embodiments, which will not be elaborated here.
[0169] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0170] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A resource scheduling method, characterized in that, include: In response to resource scheduling requests for multiple accounts, obtain the first resource consumption information of the business platform and the second resource consumption information of the multiple accounts within the current time period; The first resource consumption information is used to determine the resource idleness of the business platform in multiple time periods within the current time period; Based on the first resource consumption information of the business platform, the resource consumption of each time period within the current time period and the target resource consumption among the resource consumption of each time period are determined; for each time period, the ratio of the resource consumption of that time period to the target resource consumption is obtained to obtain the amplification coefficient corresponding to that time period; the target resource consumption is greater than the other resource consumption among the resource consumption of each time period; the amplification coefficient is used to characterize the resource idleness of the business platform in each time period; Based on the second resource consumption information of each account, determine the resource consumption of each account in each of the plurality of time periods; For each account, based on the account's resource consumption in each time period and the amplification factor corresponding to each time period, the total resource consumption of the account in the current time period is obtained, which is then used as the total resource consumption of the account in the next time period. Based on the total resource consumption of each account, the idle resources of the business platform will be allocated to each account in the next time period.
2. The method according to claim 1, characterized in that, The process of obtaining the total resource consumption of the account in the current time period based on the account's resource consumption in each time period and the amplification factor corresponding to each time period includes: Based on the resource consumption of the account in each time period and the amplification factor corresponding to each time period, the total resource consumption of the account in each time period is obtained; The total resource consumption for each time period is summed to obtain the total resource consumption of the account within the current time period.
3. The method according to claim 2, characterized in that, The process of obtaining the total resource consumption of the account in each time period based on the account's resource consumption in each time period and the amplification factor corresponding to each time period includes: Based on the resource usage requirements for each time period, control parameters for each time period are determined; the control parameters are used to control the resource consumption of the business platform in each time period within the resource consumption during peak resource usage periods. Based on the account's resource consumption in each time period, the amplification factor corresponding to each time period, and the control parameters of each time period, the total resource consumption of the account in each time period is obtained.
4. The method according to claim 3, characterized in that, The process of obtaining the total resource consumption of the account in each time period based on the account's resource consumption in each time period, the amplification factor corresponding to each time period, and the control parameters of each time period includes: For each time period, the amplification factor and control parameters corresponding to that time period are multiplied by the resource consumption of the account in that time period to obtain the total resource consumption of the account in that time period.
5. The method according to claim 1, characterized in that, The allocation of idle resources of the business platform to each account in the next time period based on the total resource consumption of each account includes: Based on the total resource consumption of each account, the priority of each account in obtaining resources is determined; wherein, the priority in obtaining resources is negatively correlated with the total resource consumption. Based on the priority of each account in obtaining resources, the idle resources of the business platform are allocated to each account in the next time period.
6. The method according to claim 1, characterized in that, The step of determining the resource consumption of each time period within the current time period based on the first resource consumption information of the business platform includes: For each time period within the current time period, the resource consumption at each time point within that time period is determined based on the first resource consumption information of the business platform. The average or median value of resource consumption at each time point within the time period is determined as the resource consumption for that time period.
7. A resource scheduling device, characterized in that, include: The information acquisition unit is configured to respond to resource scheduling requests for multiple accounts by acquiring first resource consumption information of the business platform and second resource consumption information of the multiple accounts within the current time period; the first resource consumption information is used to determine the resource idleness of the business platform in multiple time periods within the current time period. The prediction unit is configured to: determine the resource consumption of each time period within the current time period and the target resource consumption among the resource consumption of each time period based on the first resource consumption information of the business platform; for each time period, obtain the ratio of the resource consumption of that time period to the target resource consumption to obtain the amplification coefficient corresponding to that time period; the target resource consumption is greater than the other resource consumption among the resource consumption of each time period; the amplification coefficient is used to characterize the resource idleness of the business platform in each time period; and determine the resource consumption of each account in each of the multiple time periods based on the second resource consumption information of each account. For each account, based on the account's resource consumption in each time period and the amplification factor corresponding to each time period, the total resource consumption of the account in the current time period is obtained, which is then used as the total resource consumption of the account in the next time period. The resource allocation unit is configured to allocate idle resources of the business platform to each account in the next time period based on the total resource consumption of each account.
8. The apparatus according to claim 7, characterized in that, The prediction unit is further configured to perform an operation based on the resource consumption of the account in each time period and the amplification factor corresponding to each time period to obtain the total resource consumption of the account in each time period. The total resource consumption for each time period is summed to obtain the total resource consumption of the account within the current time period.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the resource scheduling method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the resource scheduling method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Resource scheduling method and device, readable storage medium and equipment
CN111930479A
Data processing method, computer equipment and readable storage medium
CN113434294A