Flow computing power allocation method, device, electronic device and storage medium

By dynamically adjusting the computing power allocation model according to the time period and characteristics of traffic requests in the information recommendation or search system, the problems of computing power redundancy and low resource utilization caused by uneven traffic distribution are solved, and more efficient resource utilization and computing power allocation that is more in line with the traffic distribution characteristics are achieved.

CN114371930BActive Publication Date: 2025-06-10BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111552457.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-06-10
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The prior art problems of computing power redundancy and low resource utilization due to uneven traffic distribution in information recommendation or search systems.

Method used

When receiving the traffic request, it determines the time period at which the current time is in, and obtains the traffic characteristics of the traffic request, obtains the model parameters corresponding to the time period, and inputs the traffic characteristics into the traffic computing power allocation model with the model parameters, obtains the queue length, processing model and link, and processes the traffic request based on these parameters.

Benefits of technology

A more efficient resource utilization rate is achieved, computing power redundancy is avoided, and computing power distribution is more in line with the traffic distribution characteristics of the corresponding time period.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114371930B_ABST
    Figure CN114371930B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a traffic computing power allocation method, apparatus, electronic device, and storage medium. The method includes: when receiving a traffic request, determining the time period in which the current time when the traffic request is received is located, and obtaining the traffic characteristics of the traffic request; obtaining model parameters corresponding to the time period, where the model parameters are network parameters of a traffic computing power allocation model; inputting the traffic characteristics into the traffic computing power allocation model with the model parameters to obtain the queue length, processing model, and link corresponding to the traffic characteristics, where the queue length, processing model, and link are used to characterize traffic computing power, the processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model, and the queue length includes the length of a rough queue and / or a fine queue; and processing the traffic request according to the queue length, the processing model, and the link. Embodiments of the present application can improve resource utilization and avoid computing power redundancy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of Internet technologies, and particularly to a method, apparatus, electronic device, and storage medium for traffic computing power allocation. Background Art

[0002] In information recommendation or search systems, to cope with the extremely large online traffic pressure and huge candidate sets, the entire retrieval process is generally designed as a funnel-shaped cascaded architecture with a gradually decreasing candidate set, mainly including stages such as recall, rough ranking, fine ranking, and mechanism.

[0003] In mainstream search, recommendation, and other systems, generally, for each piece of traffic, an equal computing power allocation method is adopted to process traffic requests, which leads to problems such as computing power redundancy and low resource utilization rate due to uneven traffic distribution. Summary of the Invention

[0004] Embodiments of the present application provide a method, apparatus, electronic device, and storage medium for traffic computing power allocation, which helps to improve resource utilization rate and avoid computing power redundancy.

[0005] To solve the above problems, in a first aspect, embodiments of the present application provide a method for traffic computing power allocation, including:

[0006] When receiving a traffic request, determining the time period in which the current time when the traffic request is received is located, and obtaining the traffic characteristics of the traffic request;

[0007] Obtaining model parameters corresponding to the time period, where the model parameters are network parameters of a traffic computing power allocation model;

[0008] Inputting the traffic characteristics into a traffic computing power allocation model with the model parameters to obtain the queue length, processing model, and link corresponding to the traffic characteristics, where the queue length, processing model, and link are used to characterize traffic computing power, the processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model, and the queue length includes the length of a rough queue and / or a fine queue;

[0009] Processing the traffic request according to the queue length, the processing model, and the link.

[0010] In a second aspect, embodiments of the present application provide a traffic computing power allocation apparatus, including:

[0011] A traffic information acquisition module, configured to determine the time period in which the current time when the traffic request is received is located, and obtain the traffic characteristics of the traffic request when receiving the traffic request;

[0012] A model parameter acquisition module, configured to acquire model parameters corresponding to the time period, where the model parameters are network parameters of a traffic computing power allocation model;

[0013] A traffic computing power allocation module, configured to input the traffic feature into a traffic computing power allocation model with the model parameters to obtain a queue length, a processing model, and a link corresponding to the traffic feature, where the queue length, the processing model, and the link are used to characterize traffic computing power, the processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model, and the queue length includes the length of a rough queue and / or a fine queue;

[0014] A request processing module, configured to process the traffic request according to the queue length, the processing model, and the link.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the traffic computing power allocation method described in the embodiment of the present application is implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the traffic computing power allocation method disclosed in the embodiment of the present application are implemented.

[0017] The traffic computing power allocation method, device, electronic device, and storage medium provided by the embodiments of the present application determine the time period in which the current time when the traffic request is received is located when receiving the traffic request, acquire the traffic feature of the traffic request, acquire the model parameters corresponding to the time period, input the traffic feature into a traffic computing power allocation model with the model parameters to obtain a queue length, a processing model, and a link corresponding to the traffic feature, and process the traffic request according to the queue length, the processing model, and the link. Since the model parameters corresponding to the time period are used to process the traffic feature, different queue lengths, processing models, and links can be obtained for different traffic features and different time periods, that is, different computing power allocations are obtained, making the computing power allocation more in line with the traffic distribution characteristics of the corresponding time period, thereby improving resource utilization and avoiding computing power redundancy. Description of the Drawings

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0019] Figure 1It is a flowchart of the traffic computing power allocation method according to the first embodiment of the present application;

[0020] Figure 2 It is a schematic diagram of the traffic distribution in the takeaway scenario according to the embodiment of the present application;

[0021] Figure 3 It is a schematic diagram of the month-on-month comparison of traffic in the takeaway scenario according to the embodiment of the present application;

[0022] Figure 4 It is a flowchart of solving the model parameters of the computing power allocation model according to the embodiment of the present application;

[0023] Figure 5 It is a schematic structural diagram of the traffic computing power allocation device according to the second embodiment of the present application;

[0024] Figure 6 It is a schematic structural diagram of the electronic device according to the third embodiment of the present application. Detailed implementation manners

[0025] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0026] Embodiment 1

[0027] A traffic computing power allocation method provided in this embodiment is as Figure 1 shown. The method includes: Step 110 to Step 140.

[0028] Figure 2 It is a schematic diagram of the traffic distribution in the takeaway scenario according to the embodiment of the present application. As Figure 1 shown, in the takeaway scenario, the traffic of each day shows an obvious bimodal structure, that is, the lunch and dinner periods are the traffic peaks, and the traffic is relatively small in the remaining periods. With this traffic characteristic, using the equal computing power allocation method in the prior art, the server faces great performance pressure during peak hours, and the system traffic is relatively low during non-peak hours, resulting in a large amount of computing power redundancy and low overall resource utilization of the system. To solve this problem, the embodiments of the present application provide the following technical solutions.

[0029] Step 110, when receiving a traffic request, determine the time period in which the current time when the traffic request is received is located, and obtain the traffic characteristics of the traffic request.

[0030] Among them, the traffic request may be a recommendation request, a search request, or other requests.

[0031] Figure 3 It is a schematic diagram of the month-on-month change of traffic in the takeaway scenario in the embodiment of the present application. As Figure 3 shown, curve 1 represents the traffic of the current day, and curve 2 represents the traffic of the previous day. It can be seen from Figure 3 that the takeaway traffic fluctuates greatly within a day, with higher traffic during the lunch peak and dinner peak periods. However, the traffic change trends are the same and the traffic is similar between adjacent two days. Thus, it can be known that the computing power allocation scheme for ensuring peak availability is not applicable during non-peak periods. Therefore, different computing power allocation schemes can be used in different time periods; on the other hand, at the same moment, the traffic allocation scheme with a high target metric value is not applicable to the traffic with a low target metric value. In this way, different computing power allocation schemes can be used for traffic with different target metric values, and different target metric values can be reflected in the training process of the computing power allocation model. Therefore, according to the traffic change rule, the time of a day can be divided into multiple time periods, and the computing power allocation model is trained separately for each time period to obtain the model parameters of the computing power allocation model in each time period.

[0032] Since traffic is associated with time and the traffic distributions in different time periods are different, therefore, traffic computing power allocation models with different model parameters can be adopted for different time periods for separate processing. The time period is a time period divided according to the traffic distribution. For example, in the takeaway scenario, a day can be divided into: the lunch peak time period from 11:00 to 13:00, the dinner peak time period from 17:00 to 20:00, and the time period composed of the remaining time. Of course, it can also be divided into more refined time periods, and the specific division can be set according to requirements.

[0033] When receiving a traffic request, determine the current time when the traffic request is received, and determine the time period in which the current time is located. Obtain the traffic characteristics of the traffic request, and the traffic characteristics may include the traffic source (such as from the application home page, applet, etc.), location information, mobile phone model, and so on.

[0034] Step 120, obtain the model parameters corresponding to the time period, and the model parameters are the network parameters of the traffic computing power allocation model.

[0035] Due to the distribution characteristics of traffic in different time periods, different model parameters are used for separate processing in different time periods. After determining the time period in which the current time is located, obtain the model parameters corresponding to this time period. The network structures of the traffic computing power allocation models corresponding to different time periods are the same, but the model parameters are different.

[0036] Step 130: Input the traffic feature into the traffic computing power allocation model with the model parameters to obtain the queue length, processing model, and link corresponding to the traffic feature. The queue length, processing model, and link are used to characterize the traffic computing power. The processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model. The queue length includes the length of the rough queue and / or the fine queue.

[0037] Input the traffic feature into the traffic computing power allocation model with the model parameters. Process the traffic feature through the traffic computing power allocation model with the model parameters to obtain the queue length, processing model number, and link number corresponding to the traffic feature. Then, obtain the corresponding processing model based on the processing model number and determine the corresponding link based on the link number. Among them, the queue length, processing model, and link corresponding to the traffic feature are used to characterize the traffic computing power. Different traffic corresponds to different queue lengths, processing models, and links. That is, different traffic can use different processing models. For example, high-value traffic uses a processing model with a complex model structure, and low-value traffic uses a processing model with a simple model structure. Then, the processing model used by high-value traffic has a higher computing power than the processing model used by low-value traffic. The processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model. The mechanism model can be used to adjust the sorting result. The link is the processing method used in the process of processing traffic requests, such as reordering, calling a remote server, etc.

[0038] In an embodiment of the present application, the traffic computing power allocation model includes a queue length prediction model, a processing model prediction model, and a link prediction model.

[0039] Inputting the traffic feature into the traffic computing power allocation model with the model parameters to obtain the queue length, processing model, and link corresponding to the traffic feature includes: Inputting the traffic feature into the traffic computing power allocation model with the model parameters, determining the queue length corresponding to the traffic feature through the queue length prediction model, determining the processing model corresponding to the traffic feature through the processing model prediction model, and determining the link corresponding to the traffic feature through the link prediction model.

[0040] The traffic computing power allocation model includes three prediction models, namely a queue length prediction model, a processing model prediction model, and a link prediction model. The queue length prediction model is used to predict the queue length corresponding to the traffic feature. The processing model prediction model is used to predict the processing model number corresponding to the traffic feature. The link prediction model is used to predict the link number corresponding to the traffic feature. The structures of the queue length prediction model, the processing model prediction model, and the link prediction model are similar and are respectively composed of a regression model and a step function. For example, the queue length prediction model is expressed as: The specific available function descriptions are defined as follows:

[0041]

[0042] Among them, f represents the queue length prediction model, u represents the regression model, and v represents the step function. is the traffic feature vector. is the model parameter, y ∈ R, 0 < y < 1, and the parameters can be solved by an evolutionary algorithm. v is a step function that maps continuous values to discrete values, corresponding to different queue lengths. queueLen is an integer representing the queue length truncation value.

[0043] The processing model prediction model can be expressed as: Among them, modelQuota represents the processing model number, and g represents the processing model prediction model. represents the model parameter of the processing model prediction model. is the traffic feature vector. The structure of the processing model prediction model is similar to that of the queue length prediction model, and it is also composed of a regression model and a step function.

[0044] The link prediction model can be expressed as: Among them, chainQuota represents the link number, and μ represents the link prediction model. represents the model parameter of the link prediction model. is the traffic feature vector. The structure of the link prediction model is similar to that of the queue length prediction model, and it is also composed of a regression model and a step function.

[0045] The model parameters of the queue length prediction model The model parameters of the processing model prediction model and the model parameters of the link prediction model can be solved using an evolutionary algorithm.

[0046] When performing traffic computing power allocation for traffic characteristics, the traffic characteristics are input into the traffic computing power allocation model, that is, the traffic characteristics are respectively input into the queue length prediction model, the processing model prediction model, and the link prediction model. Through the queue length prediction model, the traffic characteristics are processed to obtain the queue length corresponding to the traffic characteristics. Through the processing model prediction model, the traffic characteristics are processed to obtain the processing model number corresponding to the traffic characteristics. Through the link prediction model, the traffic characteristics are processed to obtain the link number corresponding to the traffic characteristics. A processing model corresponds to a processing model number, and the processing model number is used to distinguish different processing models; a link corresponds to a link number, and the link number is used to distinguish different links.

[0047] By using a queue length prediction model, a processing model prediction model, and a link prediction model to process traffic characteristics respectively, the optimal queue length, processing model, and link can be obtained to maximize resource utilization and avoid computing power redundancy.

[0048] Step 140: Process the traffic request according to the queue length, the processing model, and the link.

[0049] After determining the queue length, processing model, and link corresponding to the traffic characteristics, the queue length, processing model, and link can be used to process the traffic request to obtain a processing result. For example, when the traffic request is a recommendation request, after truncating the recalled data according to the queue length, the refined ranking model is used to score and rank the remaining data, and finally re-ranked through a certain link to obtain the final processing result.

[0050] The embodiment of the present application is a full-link optimization scheme, which can dynamically allocate the queue length, processing model, link, etc. in each stage of the full link at the same time, greatly reducing the computing power loss caused by adapting to peak periods or poor-quality traffic. It is a general elastic computing power modeling method that can perform elastic actions such as "elastic queue", "elastic link", and "elastic processing model" at the same time, and can perform more personalized computing power allocation for traffic.

[0051] The traffic computing power allocation method provided by the embodiment of the present application, when receiving a traffic request, determines the time period in which the current time when the traffic request is received is located, obtains the traffic characteristics of the traffic request, obtains the model parameters corresponding to the time period, inputs the traffic characteristics into the traffic computing power allocation model with the model parameters, and obtains the queue length, processing model, and link corresponding to the traffic characteristics. According to the queue length, processing model, and link, the traffic request is processed. Since the model parameters corresponding to the time period are used to process the traffic characteristics, different queue lengths, processing models, and links can be obtained for different traffic characteristics and different time periods, that is, different computing power allocations are obtained, making the computing power allocation more in line with the traffic distribution characteristics of the corresponding time period, thereby improving resource utilization and avoiding computing power redundancy.

[0052] Based on the above technical solution, it further includes: obtaining the historical traffic requests of the time period, and obtaining the historical traffic characteristics of the historical traffic requests; based on the historical traffic characteristics, training the traffic computing power allocation model by using an evolutionary algorithm to obtain the model parameters corresponding to the time period.

[0053] When the time period is a certain time period of a day, the historical traffic requests obtained for the time period are the historical traffic requests for the corresponding time period in a day in history. Replay the historical traffic requests for the time period to train the traffic computing power allocation model, that is, obtain the historical traffic characteristics of each historical traffic request, process the historical traffic characteristics using the traffic computing power allocation model, and perform simulation processing on the historical traffic requests based on the processing results. Based on the simulation results, use an evolutionary algorithm to train the traffic computing power allocation model to obtain model parameters corresponding to the time period. The model parameters corresponding to other time periods in a day are trained in the same way, that is, obtain the historical traffic requests for the corresponding time period, and obtain the historical traffic characteristics of each historical traffic request. Based on the historical traffic characteristics, use an evolutionary algorithm to train the traffic computing power allocation model to obtain model parameters corresponding to the time period.

[0054] By training the traffic computing power allocation model using an evolutionary algorithm based on the historical traffic characteristics of historical traffic requests, the training speed can be increased, and the solving speed of model parameters can be improved.

[0055] On the basis of the above technical solution, training the traffic computing power allocation model using an evolutionary algorithm based on the historical traffic characteristics to obtain model parameters corresponding to the time period includes: initializing the model parameters of the traffic computing power allocation model to obtain multiple initial model parameters; respectively processing the historical traffic characteristics using the traffic computing power allocation model with multiple initial model parameters to determine the objective function values corresponding to each initial model parameter; performing parameter evolution processing on the multiple initial model parameters according to the objective function values corresponding to each initial model parameter to obtain multiple evolved model parameters; performing iterative processing based on the multiple evolved model parameters until the objective function value converges to obtain the multiple evolved model parameters of the last generation; determining the model parameters corresponding to the time period according to the multiple evolved model parameters of the last generation.

[0056] Perform multiple random initializations on the model parameters of the traffic computing power allocation model. Each random initialization yields a set of initial model parameters. Thus, through multiple random initializations, multiple sets of initial model parameters can be obtained. Respectively process the historical traffic characteristics through the traffic computing power allocation model with each set of initial model parameters, and determine the objective function value corresponding to each set of initial model parameters based on the processing results. A certain number or a certain proportion of the initial model parameters with the highest objective function values can be selected from the multiple sets of initial model parameters, and parameter evolution processing is performed based on the selected multiple sets of initial model parameters to obtain multiple sets of evolved model parameters. For each set of evolved model parameters, perform the above operations of processing the historical traffic characteristics to determine the corresponding objective function value and performing parameter evolution processing until the objective function value converges, obtaining multiple sets of evolved model parameters of the last generation. The set of evolved model parameters with the highest objective function value among the multiple sets of evolved model parameters of the last generation can be determined as the model parameters corresponding to the time period. Alternatively, the mean value of the multiple sets of evolved model parameters of the last generation can also be calculated and determined as the model parameters corresponding to the time period.

[0057] By randomly initializing multiple sets of initial model parameters and solving the optimal model parameters of the traffic computing power allocation model through parameter evolution, the speed of parameter solving can be improved, and the model training efficiency can be enhanced.

[0058] Based on the above technical solution, the step of respectively processing the historical traffic characteristics through the traffic computing power allocation model with multiple sets of the initial model parameters and determining the objective function value corresponding to each set of the initial model parameters includes: respectively inputting the historical traffic characteristics into the traffic computing power allocation model with the multiple sets of initial model parameters to obtain the queue length, processing model, and link corresponding to the historical traffic characteristics under each set of initial model parameters; performing offline simulation on the historical traffic characteristics according to the queue length, processing model, and link corresponding to the historical traffic characteristics to determine the target index value and computing power value corresponding to the historical traffic characteristics under each set of initial model parameters; respectively determining the objective function value corresponding to each set of initial model parameters according to the target index value and computing power value.

[0059] Among them, the target index value is used to represent the target index of the traffic. For example, the target index can be value, user experience, etc. The value can be, for example, the income of the merchant, etc.

[0060] The historical traffic characteristics are respectively input into the traffic computing power models with each set of initial model parameters, and the historical traffic characteristics are processed by the traffic computing power models with each set of initial model parameters to obtain the queue length, processing model, and link corresponding to the historical traffic characteristics under each set of initial model parameters; under each set of initial model parameters, the queue length, processing model, and link corresponding to the historical traffic characteristics are used to perform offline simulation on the historical traffic characteristics, and based on the simulation results, the target index value and computing power value corresponding to the historical traffic characteristics under each set of initial model parameters are determined. The objective function is a function of the target index and computing power. Therefore, based on the target index value and computing power value, the objective function value corresponding to each set of initial model parameters can be determined.

[0061] In the prior art, different traffic is not distinguished, and equal computing power is used for processing, resulting in a large amount of computing power wasted on traffic with a low target index value, while there is insufficient computing power on traffic with a high target index value. In the process of training the traffic computing power allocation model in the embodiments of the present application, the obtained target index values for different historical traffic requests are also different. Therefore, the trained computing power allocation model can perform dynamic computing power allocation for traffic with different target index values, which can avoid the problem of wasting a large amount of computing power on traffic with a low target index value and insufficient computing power on traffic with a high target index value caused by equal allocation in the prior art.

[0062] On the basis of the above technical solution, according to the target index value and computing power value, the objective function value corresponding to each set of initial model parameters is respectively determined, including: according to the target index value and computing power value, the objective function value corresponding to each set of initial model parameters is respectively determined according to the following formula:

[0063]

[0064] where Reward represents the objective function value, i represents the i-th historical traffic characteristic, V i is the target index value corresponding to the i-th historical traffic characteristic, Cost i is the computing power value corresponding to the i-th historical traffic characteristic, C is the target computing power value, and λ is a constant. The target computing power value is a pre-set computing power value, which can be the maximum computing power capacity of the system.

[0065] In the formula of the above objective function, a penalty is imposed on the traffic whose computing power value exceeds the target computing power value, so that the second term of the objective function value is negative, thereby making the objective function value smaller, which can ensure that the overall computing power does not exceed the maximum system constraint.

[0066] Based on the above technical solution, parameter evolution processing is performed on the multiple sets of initial model parameters according to the objective function values corresponding to each set of the initial model parameters, to obtain multiple sets of evolved model parameters, including: selecting a preset proportion or a preset number of initial model parameters from the multiple sets of initial model parameters according to the objective function values corresponding to each set of the initial model parameters; determining the mean and variance of the selected initial model parameters; and performing multiple samplings of the model parameters respectively under the mean and variance to obtain multiple sets of evolved model parameters.

[0067] According to the objective function values corresponding to each set of initial model parameters, select a preset proportion or a preset number of sets of initial model parameters with the highest objective function values from the multiple sets of initial model parameters, calculate the mean and variance of the selected sets of initial model parameters, and perform multiple samplings of the model parameters under the mean and variance. For each sampling of the model parameters, a set of evolved model parameters will be obtained, so as to obtain multiple sets of evolved model parameters. The mean and variance of each set of evolved model parameters are the same as the mean and variance of the selected sets of initial model parameters. During the parameter evolution process, the mean and variance of the evolved model parameters are respectively the same as the mean and variance of the initial model parameters with better objective function values, which can improve the training efficiency.

[0068] Based on the above technical solution, determining the model parameters corresponding to the time period according to the multiple sets of evolved model parameters of the last generation, including: selecting a set of evolved model parameters with the highest objective function value from the multiple sets of evolved model parameters of the last generation, and determining the selected evolved model parameters as the model parameters corresponding to the time period.

[0069] Determine a set of evolved model parameters with the highest objective function value among the multiple sets of evolved model parameters of the last generation as the model parameters corresponding to the time period, so that the objective function value of this set of model parameters is the highest, and a more accurate computing power allocation model can be determined, making the computing power allocation more accurate.

[0070] Figure 4 It is a flowchart of solving the model parameters of the computing power allocation model in the embodiments of the present application. As Figure 4 shown, the process of solving the model parameters of the computing power allocation model includes:

[0071] Step 410, parameter initialization.

[0072] Initialize the model parameters of the computing power allocation model to obtain multiple sets of initial model parameters.

[0073] Step 420, objective function evaluation.

[0074] The objective function evaluation includes offline simulation and calculation of the objective function value. Specifically, the historical traffic characteristics in the required time period are processed through a traffic computing power allocation model with multiple sets of initial model parameters, and the objective function value corresponding to each set of model parameters is determined.

[0075] In this process, based on the selection criteria of high-quality samples, the direction of parameter evolution is determined. That is, through offline simulation, a preset number or preset proportion of model parameters with higher objective function values are selected as the direction of model parameter evolution, so that the mean and variance of the evolved model parameters are equal to the mean and variance of the preset number or preset proportion of model parameters with higher objective function values.

[0076] Step 430, model parameter selection.

[0077] Select a preset proportion or preset number of sets of model parameters from the initial multiple sets of model parameters or the evolved multiple sets of model parameters.

[0078] Step 440, parameter evolution.

[0079] Calculate the mean and variance of the selected preset proportion or preset number of sets of model parameters.

[0080] Step 450, parameter sampling.

[0081] Under the calculated mean and variance, perform multiple samplings of model parameters to obtain multiple sets of evolved model parameters.

[0082] Step 460, determine whether the objective function value converges. If not, execute step 420; if so, execute step 470.

[0083] Step 470, determine the model parameters corresponding to the time period from the multiple sets of evolved model parameters of the last generation.

[0084] Based on the evolutionary algorithm, the embodiments of the present application replay the traffic of the previous day in history, and implement models with different traffic usage complexities, different links with different complexities, and different queue allocations at different time periods and different target metric values on the entire link, thereby reducing the computing power loss caused by adapting to peak periods or poor-quality traffic and improving resource utilization.

[0085] Embodiment 2

[0086] A traffic computing power allocation device provided in this embodiment, as Figure 5 shown, the traffic computing power allocation device 500 includes:

[0087] A traffic information acquisition module 510, configured to determine the time period in which the current time when the traffic request is received is located when receiving a traffic request, and acquire the traffic characteristics of the traffic request;

[0088] A model parameter acquisition module 520, configured to acquire model parameters corresponding to the time period, where the model parameters are network parameters of a traffic computing power allocation model;

[0089] A traffic computing power allocation module 530, configured to input the traffic characteristics into a traffic computing power allocation model with the model parameters, and obtain a queue length, a processing model, and a link corresponding to the traffic characteristics, where the queue length, the processing model, and the link are used to characterize traffic computing power, the processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model, and the queue length includes the length of a rough queue and / or a fine queue;

[0090] A request processing module 540, configured to process the traffic request according to the queue length, the processing model, and the link.

[0091] Optionally, the traffic computing power allocation model includes a queue length prediction model, a processing model prediction model, and a link prediction model;

[0092] Specifically, the traffic computing power allocation module is configured to:

[0093] Input the traffic characteristics into a traffic computing power allocation model with the model parameters, determine the queue length corresponding to the traffic characteristics through the queue length prediction model, determine the processing model corresponding to the traffic characteristics through the processing model prediction model, and determine the link corresponding to the traffic characteristics through the link prediction model.

[0094] Optionally, the device further includes:

[0095] A historical traffic information acquisition module, configured to acquire historical traffic requests in the time period, and acquire historical traffic characteristics of the historical traffic requests;

[0096] A model parameter solving module, configured to train a traffic computing power allocation model based on the historical traffic characteristics by using an evolutionary algorithm, and obtain model parameters corresponding to the time period.

[0097] Optionally, the model parameter solving module includes:

[0098] A parameter initialization unit, configured to initialize model parameters of the traffic computing power allocation model to obtain multiple sets of initial model parameters;

[0099] A target function value determination unit, configured to process the historical traffic characteristics through a traffic computing power allocation model with multiple sets of the initial model parameters respectively, and determine a target function value corresponding to each set of the initial model parameters;

[0100] A parameter evolution unit, configured to perform parameter evolution processing on the multiple sets of initial model parameters according to the objective function values corresponding to each set of the initial model parameters, so as to obtain multiple sets of evolved model parameters;

[0101] An iteration control unit, configured to perform iteration processing based on the multiple sets of evolved model parameters until the objective function value converges, so as to obtain multiple sets of evolved model parameters of the last generation;

[0102] A model parameter determination unit, configured to determine the model parameters corresponding to the time period according to the multiple sets of evolved model parameters of the last generation.

[0103] Optionally, the objective function value determination unit includes:

[0104] A historical traffic computing power allocation subunit, configured to respectively input the historical traffic characteristics into a traffic computing power allocation model having the multiple sets of initial model parameters, so as to obtain the queue length, processing model, and link corresponding to the historical traffic characteristics under each set of initial model parameters;

[0105] An offline simulation subunit, configured to perform offline simulation on the historical traffic characteristics according to the queue length, processing model, and link corresponding to the historical traffic characteristics, so as to determine the target index value and computing power value corresponding to the historical traffic characteristics under each set of initial model parameters;

[0106] An objective function value determination subunit, configured to respectively determine the objective function value corresponding to each set of initial model parameters according to the target index value and computing power value.

[0107] Optionally, the objective function value determination subunit is specifically configured to:

[0108] According to the target index value and computing power value, respectively determine the objective function value corresponding to each set of initial model parameters according to the following formula:

[0109]

[0110] wherein, Reward represents the objective function value, i represents the i-th historical traffic characteristic, V i is the target index value corresponding to the i-th historical traffic characteristic, Cost i is the computing power value corresponding to the i-th historical traffic characteristic, and C is the target computing power value.

[0111] Optionally, the parameter initialization unit is specifically configured to:

[0112] According to the objective function values corresponding to each set of the initial model parameters, select a preset proportion or a preset number of initial model parameters from the multiple sets of initial model parameters;

[0113] Determine the mean and variance of the selected initial model parameters;

[0114] Under the mean and variance, perform multiple samplings of the model parameters respectively to obtain multiple sets of evolved model parameters.

[0115] Optionally, the model parameter determination unit is specifically configured to:

[0116] Select a set of evolved model parameters with the highest objective function value from the multiple sets of evolved model parameters of the last generation, and determine the selected evolved model parameters as the model parameters corresponding to the time period.

[0117] The traffic computing power allocation device provided by the embodiments of the present application is used to implement the steps of the traffic computing power allocation method described in Embodiment 1 of the present application. For the specific implementation manners of the modules of the device, refer to the corresponding steps and will not be elaborated here.

[0118] The traffic computing power allocation device provided by the embodiments of the present application, when receiving a traffic request, determines the time period in which the current time when the traffic request is received is located, obtains the traffic characteristics of the traffic request, obtains the model parameters corresponding to the time period, inputs the traffic characteristics into the traffic computing power allocation model with the model parameters, and obtains the queue length, processing model, and link corresponding to the traffic characteristics. According to the queue length, processing model, and link, the traffic request is processed. Since the model parameters corresponding to the time period are used to process the traffic characteristics, different queue lengths, processing models, and links can be obtained for different traffic characteristics and different time periods, that is, different computing power allocations are obtained, making the computing power allocation more in line with the traffic distribution characteristics of the corresponding time period, thereby improving resource utilization and avoiding computing power redundancy.

[0119] Embodiment 3

[0120] The embodiments of the present application also provide an electronic device, as Figure 6 shown. The electronic device 600 may include one or more processors 610 and one or more memories 620 connected to the processor 610. The electronic device 600 may also include an input interface 630 and an output interface 640 for communicating with another device or system. The program code executed by the processor 610 may be stored in the memory 620.

[0121] The processor 610 in the electronic device 600 calls the program code stored in the memory 620 to execute the traffic computing power allocation method in the above embodiments.

[0122] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps of the traffic computing power allocation method described in Embodiment 1 of the present application.

[0123] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the corresponding descriptions in the method embodiments.

[0124] The above has introduced in detail a traffic computing power allocation method, device, electronic device, and storage medium provided by the embodiments of the present application. Specific examples are used herein to elaborate on the principles and implementation manners of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application. At the same time, for those of ordinary skill in the art, based on the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.

[0125] Through the description of the above implementation manners, those skilled in the art can clearly understand that each implementation manner can be realized by means of software plus a necessary general hardware platform, and of course, it can also be realized by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

Claims

1. A traffic computing power allocation method, characterized in that, it includes: When receiving a traffic request, determine the time period in which the current time when the traffic request is received is located, and obtain the traffic characteristics of the traffic request; Obtain the model parameters corresponding to the time period, and the model parameters are the network parameters of the traffic computing power allocation model; Input the traffic characteristics into the traffic computing power allocation model with the model parameters to obtain the queue length, processing model, and link corresponding to the traffic characteristics. The queue length, processing model, and link are used to characterize the traffic computing power. The processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model. The queue length includes the length of the rough queue and / or the fine queue; Process the traffic request according to the queue length, the processing model, and the link; The method further includes: Obtain the historical traffic requests of the time period, and obtain the historical traffic characteristics of the historical traffic requests; based on the historical traffic characteristics, train the traffic computing power allocation model using an evolutionary algorithm to obtain the model parameters corresponding to the time period; The training of the traffic computing power allocation model using an evolutionary algorithm based on the historical traffic characteristics to obtain the model parameters corresponding to the time period includes: initializing the model parameters of the traffic computing power allocation model to obtain multiple sets of initial model parameters; respectively process the historical traffic characteristics through the traffic computing power allocation model with multiple sets of the initial model parameters, and determine the objective function value corresponding to each set of the initial model parameters; according to the objective function value corresponding to each set of the initial model parameters, perform parameter evolution processing on the multiple sets of initial model parameters to obtain multiple sets of evolved model parameters; perform iterative processing based on the multiple sets of evolved model parameters until the objective function value converges, and obtain the multiple sets of evolved model parameters of the last generation; according to the multiple sets of evolved model parameters of the last generation, determine the model parameters corresponding to the time period; The process of respectively processing the historical traffic characteristics through the traffic computing power allocation model with multiple sets of the initial model parameters to determine the objective function value corresponding to each set of the initial model parameters includes: respectively input the historical traffic characteristics into the traffic computing power allocation model with multiple sets of the initial model parameters to obtain the queue length, processing model, and link corresponding to the historical traffic characteristics under each set of the initial model parameters; according to the queue length, processing model, and link corresponding to the historical traffic characteristics, perform offline simulation on the historical traffic characteristics to determine the target index value and computing power value corresponding to the historical traffic characteristics under each set of the initial model parameters; according to the target index value and computing power value, respectively determine the objective function value corresponding to each set of the initial model parameters.

2. The method according to claim 1, characterized in that, the traffic computing power allocation model includes a queue length prediction model, a processing model prediction model, and a link prediction model; Inputting the traffic characteristics into the traffic computing power allocation model with the model parameters to obtain the queue length, processing model, and link corresponding to the traffic characteristics includes: Input the traffic characteristics into the traffic computing power allocation model with the model parameters, determine the queue length corresponding to the traffic characteristics through the queue length prediction model, determine the processing model corresponding to the traffic characteristics through the processing model prediction model, and determine the link corresponding to the traffic characteristics through the link prediction model.

3. The method according to claim 1, wherein, determine the objective function value corresponding to each set of initial model parameters according to the target metric value and the computing power value, including: determine the objective function value corresponding to each set of initial model parameters according to the target metric value and the computing power value according to the following formula: Among them, Re represents the objective function value, i represents the i-th historical traffic feature, is the objective index value corresponding to the i-th historical traffic feature, is the computing power value corresponding to the i-th historical traffic feature, and C is the target computing power value.

4. The method according to claim 1, wherein, perform parameter evolution processing on the multiple sets of initial model parameters according to the objective function value corresponding to each set of the initial model parameters to obtain multiple sets of evolved model parameters, including: select a preset proportion or a preset number of initial model parameters from the multiple sets of initial model parameters according to the objective function value corresponding to each set of the initial model parameters; determine the mean and variance of the selected initial model parameters; perform multiple samplings of model parameters respectively under the mean and variance to obtain multiple sets of evolved model parameters.

5. The method according to claim 1, wherein, determine the model parameters corresponding to the time period according to the multiple sets of evolved model parameters of the last generation, including: select a set of evolved model parameters with the highest objective function value from the multiple sets of evolved model parameters of the last generation, and determine the selected evolved model parameters as the model parameters corresponding to the time period.

6. A traffic computing power allocation device, wherein, comprising: a traffic information acquisition module, configured to determine the time period in which the current time when the traffic request is received is located when receiving a traffic request, and acquire the traffic characteristics of the traffic request; a model parameter acquisition module, configured to acquire the model parameters corresponding to the time period, and the model parameters are the network parameters of the traffic computing power allocation model; a traffic computing power allocation module, configured to input the traffic characteristics into the traffic computing power allocation model with the model parameters to obtain the queue length, processing model, and link corresponding to the traffic characteristics, where the queue length, processing model, and link are used to characterize traffic computing power, and the processing model includes at least one of a rough ranking model, a fine ranking model, and a mechanism model, and the queue length includes the length of the rough queue and / or the fine queue; a request processing module, configured to process the traffic request according to the queue length, the processing model, and the link; the model parameter acquisition module is further configured to acquire the historical traffic requests of the time period, and acquire the historical traffic characteristics of the historical traffic requests; train the traffic computing power allocation model by using an evolutionary algorithm based on the historical traffic characteristics to obtain the model parameters corresponding to the time period; Based on the historical traffic characteristics, an evolutionary algorithm is used to train the traffic computing power allocation model to obtain the model parameters corresponding to the time period, including: initializing the model parameters of the traffic computing power allocation model to obtain multiple sets of initial model parameters; respectively processing the historical traffic characteristics through the traffic computing power allocation model with multiple sets of the initial model parameters to determine the objective function values corresponding to each set of the initial model parameters; performing parameter evolution processing on the multiple sets of initial model parameters according to the objective function values corresponding to each set of the initial model parameters to obtain multiple sets of evolved model parameters; performing iterative processing based on the multiple sets of evolved model parameters until the objective function value converges to obtain the multiple sets of evolved model parameters of the last generation; determining the model parameters corresponding to the time period according to the multiple sets of evolved model parameters of the last generation; The step of respectively processing the historical traffic characteristics through the traffic computing power allocation model with multiple sets of the initial model parameters to determine the objective function values corresponding to each set of the initial model parameters includes: respectively inputting the historical traffic characteristics into the traffic computing power allocation model with the multiple sets of initial model parameters to obtain the queue length, processing model, and link corresponding to the historical traffic characteristics under each set of initial model parameters; performing offline simulation on the historical traffic characteristics according to the queue length, processing model, and link corresponding to the historical traffic characteristics to determine the target index values and computing power values corresponding to the historical traffic characteristics under each set of initial model parameters; determining the objective function values corresponding to each set of the initial model parameters according to the target index values and computing power values.

7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the computer program, the traffic computing power allocation method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by the processor, the steps of the traffic computing power allocation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Network object processing method and device, electronic equipment and readable storage medium

    CN113630334A