Resource allocation method and device, electronic equipment, medium and program product

By monitoring and dynamically adjusting the resource configuration of algorithm services, the problem of unbalanced resource utilization in algorithm model evaluation experiments is solved, the stability and resource utilization of experiments are improved, and more efficient resource management is achieved.

CN118916173APending Publication Date: 2024-11-08CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411096464.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the prior art, the algorithm model evaluation experiment has poor stability due to unbalanced resource utilization of cluster nodes, which affects the stability of the entire evaluation experiment.

Method used

By monitoring the resource usage data of the algorithm service, the resource configuration of the evaluation experiment is dynamically adjusted based on historical and real-time traffic data to ensure balanced resource utilization, including adjusting the number of pods based on traffic proportion and trend forecasts.

Benefits of technology

The stability and resource utilization rate of algorithm evaluation experiments are improved, resource waste is reduced, and reliability of evaluation experiments is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916173A_ABST
    Figure CN118916173A_ABST
Patent Text Reader

Abstract

The invention provides a resource allocation method and device, electronic equipment, a medium and a program product, and is applied to the technical field of computers. Determining an initial experiment Pod number required by an evaluation experiment of a target algorithm model corresponding to the first algorithm service; according to the initial experiment Pod number, resource configuration is carried out on an evaluation experiment of the target algorithm model, and the evaluation experiment is started after configuration is completed; and in the operation process of the evaluation experiment, monitoring resource use data of the first algorithm service, and adjusting resource configuration of the evaluation experiment according to the resource use data. The method can improve the stability of the whole algorithm evaluation experiment process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource configuration method, device, electronic device, medium and program product. Background Art

[0002] The video recommendation system needs to regularly use new data to retrain the old algorithm model so that new resources can be pushed to different provinces, different fields and different user groups in a timely manner. To ensure the performance and accuracy of the new version of the algorithm model, it is necessary to conduct evaluation experiments on each version of the algorithm model.

[0003] The number of queries per second (QPS) traffic in actual business scenarios will continue to change with business fluctuations, and the resource utilization of the cluster nodes that carry the Pod will also change accordingly. However, in the algorithm model evaluation experiments in related technologies, the number of containers (Pods) before and after the experiment is started is fixed, and the model evaluation experiment cycle generally lasts for a long time, which can easily lead to uneven cluster node resource utilization, causing Pod anomalies to cause the algorithm model evaluation experiment to fail, thereby affecting the stability of the entire algorithm model evaluation experiment. Summary of the invention

[0004] The embodiments of the present application provide a resource configuration method, device, electronic device, medium and program product to solve the problem of poor stability of related algorithm model evaluation experiments.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a resource configuration method, the method comprising:

[0007] Determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, where the first algorithm service is any one of the multiple algorithm services;

[0008] According to the initial experimental Pod number, resources are configured for the evaluation experiment of the target algorithm model, and the evaluation experiment is started after the configuration is completed;

[0009] During the running of the evaluation experiment, the resource usage data of the first algorithm service is monitored, and the resource configuration of the evaluation experiment is adjusted according to the resource usage data.

[0010] Optionally, determining the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period includes:

[0011] According to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, determine the total traffic usage data of all algorithm models, the traffic usage proportion of each algorithm model, and the traffic data carried by a single Pod;

[0012] According to the total traffic usage data of all the algorithm models, the traffic usage proportion of the target algorithm model and the traffic data carried by the single Pod, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model is determined.

[0013] Optionally, monitoring resource usage data of the first algorithm service and adjusting resource configuration of the evaluation experiment according to the resource usage data includes:

[0014] Monitor the resource utilization of each Pod used by the target algorithm model in the evaluation experiment;

[0015] When the resource utilization of each Pod is greater than the first threshold, the number of Pods used by the target algorithm model in the evaluation experiment is increased.

[0016] Optionally, the method further comprises:

[0017] When the resource utilization of a first Pod among the Pods used in the evaluation experiment of the target algorithm model is greater than a first threshold, and the resource utilization of a second Pod is less than a second threshold, a first alarm message is output, wherein the second threshold is less than the first threshold.

[0018] Optionally, monitoring resource usage data of the first algorithm service and adjusting resource configuration of the evaluation experiment according to the resource usage data includes:

[0019] Collecting real-time traffic usage data of the first algorithm service for a first period of time;

[0020] Based on the real-time traffic usage data and the traffic data carried by a single Pod, the target number of Pods is determined, and the number of Pods used in the evaluation experiment is adjusted to the target number of Pods, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

[0021] Optionally, determining the target number of Pods according to the real-time traffic usage data and traffic data carried by a single Pod includes:

[0022] When there is traffic peak data lasting for a second duration in the real-time traffic usage data, the target number of Pods is determined according to the traffic peak data and the traffic data carried by the single Pod, wherein the second duration is less than the first duration.

[0023] Optionally, determining the target number of Pods according to the real-time traffic usage data and traffic data carried by a single Pod includes:

[0024] In the case where there is no traffic peak data lasting for a second duration in the real-time traffic usage data, using a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target period, wherein the second duration is less than the first duration;

[0025] The target number of Pods is determined based on the traffic usage data of the first algorithm service in the future target time period and the traffic data carried by a single Pod.

[0026] Optionally, the using a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target time period includes:

[0027] At least one trend function is used to calculate the traffic usage data of the first algorithm service in the future target time period, wherein the at least one trend function includes at least one of an increasing or decreasing trend function, a seasonal trend function and a holiday trend function, the increasing or decreasing trend function is a function that characterizes the trend of the traffic usage data changing with a daily time period, the seasonal trend function is a function that characterizes the trend of the traffic usage data changing with a seasonal cycle, and the holiday trend function is a function that characterizes the trend of the traffic usage data changing with holidays.

[0028] Optionally, after monitoring the resource usage data of the first algorithm service, the method further includes:

[0029] Comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period;

[0030] When the deviation is greater than a third threshold, a second warning message is output.

[0031] Optionally, comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period includes:

[0032] Determine the traffic usage data of the first algorithm service at each time point of each day in the second historical time period, where the second historical time period is M days, and M is an integer greater than 1;

[0033] Calculate the average of the traffic usage data of the first algorithm service at the first time point in the M days of the second historical time period to obtain the average traffic usage data of the first algorithm service at the first time point in history, where the first time point is any time point of each day;

[0034] The average traffic usage data at the first time point in the history is divided by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at the first time point in the history, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period;

[0035] Determine the number of Pods corresponding to the traffic usage data of the first algorithm service at each time point in the current time period;

[0036] Determine the difference between the number of Pods corresponding to the traffic usage data of the first algorithm service at the first time point in the current time period and the number of Pods used by the first algorithm service at the first time point in history.

[0037] Optionally, the target algorithm model includes at least two algorithm models, and the method further includes:

[0038] When the evaluation experiment of the first algorithm model in the target algorithm model is completed, the number of Pods to be recycled is determined according to the traffic usage ratio of each algorithm model in the target algorithm model;

[0039] The number of Pods to be recycled is reduced for the evaluation experiment.

[0040] Optionally, the target algorithm model includes a first algorithm model and a second algorithm model;

[0041] Determining the number of initial experimental Pods required for the evaluation experiment of the target algorithm model according to the total traffic usage data of all the algorithm models, the traffic usage ratio of the target algorithm model, and the traffic data carried by the single Pod includes:

[0042] According to the total traffic usage data of all the algorithm models, the traffic usage ratio of the first algorithm model, the traffic usage ratio of the second algorithm model, and the traffic data carried by the single Pod, respectively determine the number of first experimental Pods required for the evaluation experiment of the first algorithm model and the number of second experimental Pods required for the evaluation experiment of the second algorithm model;

[0043] The maximum number of experimental Pods between the first number of experimental Pods and the second number of experimental Pods is determined as the initial number of experimental Pods.

[0044] In a second aspect, an embodiment of the present application further provides a resource configuration device, the resource configuration device comprising:

[0045] A first determination module is used to determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, wherein the first algorithm service is any one of the multiple algorithm services;

[0046] A first configuration module is used to configure resources for the evaluation experiment of the target algorithm model according to the initial experimental Pod number, and start the evaluation experiment after the configuration is completed;

[0047] The first adjustment module is used to monitor the resource usage data of the first algorithm service during the running of the evaluation experiment, and adjust the resource configuration of the evaluation experiment according to the resource usage data.

[0048] Optionally, the first determining module includes:

[0049] A first determination unit is used to determine the total traffic usage data of all algorithm models, the traffic usage proportion of each algorithm model, and the traffic data carried by a single Pod according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period;

[0050] The second determination unit is used to determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model based on the total traffic usage data of all the algorithm models, the traffic usage proportion of the target algorithm model and the traffic data carried by the single Pod.

[0051] Optionally, the first adjustment module includes:

[0052] A first monitoring unit, used to monitor the resource utilization of each Pod used by the target algorithm model in the evaluation experiment;

[0053] The first processing unit is used to increase the number of Pods used by the target algorithm model in the evaluation experiment when the resource utilization rate of each Pod is greater than a first threshold.

[0054] Optionally, the device further comprises:

[0055] The first output module is used to output a first alarm message when, among the Pods used in the evaluation experiment of the target algorithm model, there is a first Pod whose resource utilization is greater than a first threshold, and there is a second Pod whose resource utilization is less than a second threshold, wherein the second threshold is less than the first threshold.

[0056] Optionally, the first adjustment module includes:

[0057] A first collection unit, configured to collect real-time traffic usage data of the first algorithm service for a first duration;

[0058] The third determination unit is used to determine the target number of Pods based on the real-time traffic usage data and the traffic data carried by a single Pod, and adjust the number of Pods used in the evaluation experiment to the target number of Pods, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

[0059] Optionally, the third determining unit includes:

[0060] The first determination subunit is used to determine the target number of Pods according to the traffic peak data and the traffic data carried by the single Pod when there is traffic peak data lasting for a second duration in the real-time traffic usage data, wherein the second duration is less than the first duration.

[0061] Optionally, the third determining unit includes:

[0062] A first prediction subunit is used to predict the traffic usage data of the first algorithm service in a future target time period by using a time prediction algorithm when there is no traffic peak data lasting for a second time period in the real-time traffic usage data, wherein the second time period is less than the first time period;

[0063] The second determination subunit is used to determine the target number of Pods according to the traffic usage data of the first algorithm service in the future target time period and the traffic data carried by a single Pod.

[0064] Optionally, the first prediction subunit is specifically configured to:

[0065] At least one trend function is used to calculate the traffic usage data of the first algorithm service in the future target time period, wherein the at least one trend function includes at least one of an increasing or decreasing trend function, a seasonal trend function and a holiday trend function, the increasing or decreasing trend function is a function that characterizes the trend of the traffic usage data changing with a daily time period, the seasonal trend function is a function that characterizes the trend of the traffic usage data changing with a seasonal cycle, and the holiday trend function is a function that characterizes the trend of the traffic usage data changing with holidays.

[0066] Optionally, the device further comprises:

[0067] A first comparison module, used to compare the deviation between the traffic usage data of the first algorithm service in the second historical time period and the traffic usage data of the first algorithm service in the current time period;

[0068] The first output module is used to output second alarm information when the deviation is greater than a third threshold.

[0069] Optionally, the first comparison module includes:

[0070] a fourth determining unit, configured to determine traffic usage data of the first algorithm service at each time point of each day in the second historical time period, where the second historical time period is M days, and M is an integer greater than 1;

[0071] A first calculation unit is used to average the traffic usage data of the first algorithm service at a first time point in M ​​days of the second historical time period to obtain the average traffic usage data of the first algorithm service at the first time point in history, where the first time point is any time point of each day;

[0072] A second calculation unit is used to divide the average traffic usage data at the first time point in the history by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at the first time point in the history, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period;

[0073] A fifth determining unit, configured to determine the number of Pods corresponding to the traffic usage data of the first algorithm service at each time point in the current time period;

[0074] The sixth determination unit is used to determine the difference between the number of Pods corresponding to the traffic usage data of the first algorithm service at the first time point in the current time period and the number of Pods used by the first algorithm service at the first time point in history.

[0075] Optionally, the target algorithm model includes at least two algorithm models, and the device further includes:

[0076] A second determination module is used to determine the number of Pods to be recycled according to the traffic usage ratio of each algorithm model in the target algorithm model when the evaluation experiment of the first algorithm model in the target algorithm model is completed;

[0077] The first processing module is used to reduce the number of Pods to be recycled in the evaluation experiment.

[0078] Optionally, the target algorithm model includes a first algorithm model and a second algorithm model;

[0079] The first determining module includes:

[0080] A seventh determination unit, used to determine the number of first experimental Pods required for the evaluation experiment of the first algorithm model and the number of second experimental Pods required for the evaluation experiment of the second algorithm model according to the total traffic usage data of all the algorithm models, the traffic usage proportion of the first algorithm model, the traffic usage proportion of the second algorithm model, and the traffic data carried by the single Pod;

[0081] An eighth determining unit is used to determine the maximum number of experimental Pods between the first number of experimental Pods and the second number of experimental Pods as the initial number of experimental Pods.

[0082] In a third aspect, an embodiment of the present application further provides an electronic device, including a transceiver and a processor, wherein the processor is configured to:

[0083] Determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, where the first algorithm service is any one of the multiple algorithm services;

[0084] According to the initial experimental Pod number, resources are configured for the evaluation experiment of the target algorithm model, and the evaluation experiment is started after the configuration is completed;

[0085] During the running of the evaluation experiment, the resource usage data of the first algorithm service is monitored, and the resource configuration of the evaluation experiment is adjusted according to the resource usage data.

[0086] Optionally, the processor is specifically configured to:

[0087] According to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, determine the total traffic usage data of all algorithm models, the traffic usage proportion of each algorithm model, and the traffic data carried by a single Pod;

[0088] According to the total traffic usage data of all the algorithm models, the traffic usage proportion of the target algorithm model and the traffic data carried by the single Pod, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model is determined.

[0089] Optionally, the processor is specifically configured to:

[0090] Monitor the resource utilization of each Pod used by the target algorithm model in the evaluation experiment;

[0091] When the resource utilization of each Pod is greater than the first threshold, the number of Pods used by the target algorithm model in the evaluation experiment is increased.

[0092] Optionally, the transceiver is used for:

[0093] When the resource utilization of a first Pod among the Pods used in the evaluation experiment of the target algorithm model is greater than a first threshold, and the resource utilization of a second Pod is less than a second threshold, a first alarm message is output, wherein the second threshold is less than the first threshold.

[0094] Optionally, the processor is specifically configured to:

[0095] Collecting real-time traffic usage data of the first algorithm service for a first period of time;

[0096] Based on the real-time traffic usage data and the traffic data carried by a single Pod, the target number of Pods is determined, and the number of Pods used in the evaluation experiment is adjusted to the target number of Pods, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

[0097] Optionally, the processor is specifically configured to:

[0098] When there is traffic peak data lasting for a second duration in the real-time traffic usage data, the target number of Pods is determined according to the traffic peak data and the traffic data carried by the single Pod, wherein the second duration is less than the first duration.

[0099] Optionally, the processor is specifically configured to:

[0100] In the case where there is no traffic peak data lasting for a second duration in the real-time traffic usage data, using a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target period, wherein the second duration is less than the first duration;

[0101] The target number of Pods is determined based on the traffic usage data of the first algorithm service in the future target time period and the traffic data carried by a single Pod.

[0102] Optionally, the processor is specifically configured to:

[0103] At least one trend function is used to calculate the traffic usage data of the first algorithm service in the future target time period, wherein the at least one trend function includes at least one of an increasing or decreasing trend function, a seasonal trend function and a holiday trend function, the increasing or decreasing trend function is a function that characterizes the trend of the traffic usage data changing with a daily time period, the seasonal trend function is a function that characterizes the trend of the traffic usage data changing with a seasonal cycle, and the holiday trend function is a function that characterizes the trend of the traffic usage data changing with holidays.

[0104] Optionally, the transceiver is further used for:

[0105] Comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period;

[0106] When the deviation is greater than a third threshold, a second warning message is output.

[0107] Optionally, the processor is specifically configured to:

[0108] Determine the traffic usage data of the first algorithm service at each time point of each day in the second historical time period, where the second historical time period is M days, and M is an integer greater than 1;

[0109] Calculate the average of the traffic usage data of the first algorithm service at the first time point in the M days of the second historical time period to obtain the average traffic usage data of the first algorithm service at the first time point in history, where the first time point is any time point of each day;

[0110] The average traffic usage data at the first time point in the history is divided by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at the first time point in the history, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period;

[0111] Determine the number of Pods corresponding to the traffic usage data of the first algorithm service at each time point in the current time period;

[0112] Determine the difference between the number of Pods corresponding to the traffic usage data of the first algorithm service at the first time point in the current time period and the number of Pods used by the first algorithm service at the first time point in history.

[0113] Optionally, the target algorithm model includes at least two algorithm models, and the processor is further configured to:

[0114] When the evaluation experiment of the first algorithm model in the target algorithm model is completed, the number of Pods to be recycled is determined according to the traffic usage ratio of each algorithm model in the target algorithm model;

[0115] The number of Pods to be recycled is reduced for the evaluation experiment.

[0116] Optionally, the target algorithm model includes a first algorithm model and a second algorithm model;

[0117] The processor is specifically used for:

[0118] According to the total traffic usage data of all the algorithm models, the traffic usage ratio of the first algorithm model, the traffic usage ratio of the second algorithm model, and the traffic data carried by the single Pod, respectively determine the number of first experimental Pods required for the evaluation experiment of the first algorithm model and the number of second experimental Pods required for the evaluation experiment of the second algorithm model;

[0119] The maximum number of experimental Pods between the first number of experimental Pods and the second number of experimental Pods is determined as the initial number of experimental Pods.

[0120] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned resource configuration method when executed by the processor.

[0121] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned resource configuration method are implemented.

[0122] In a sixth aspect, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the resource configuration method as described in the first aspect.

[0123] The resource configuration method of the embodiment of the present application includes determining the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period; performing resource configuration for the evaluation experiment of the target algorithm model according to the initial number of experimental Pods, and starting the evaluation experiment after the configuration is completed; during the operation of the evaluation experiment, monitoring the resource usage data of the first algorithm service, and adjusting the resource configuration of the evaluation experiment according to the resource usage data. In this method, in the preparation stage of the evaluation experiment, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model of the first algorithm service is determined according to the historical traffic usage data and the number of Pods to start the evaluation experiment, and in the operation stage of the evaluation experiment, the resource configuration of the evaluation experiment is dynamically adjusted according to the resource usage data of the first algorithm service, thereby improving the stability of the entire algorithm evaluation experiment process. BRIEF DESCRIPTION OF THE DRAWINGS

[0124] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0125] Figure 1 is a flow chart of a resource configuration method provided in an embodiment of the present application;

[0126] Figure 2 It is a schematic diagram of traffic usage data and the number of Pods for all algorithm models corresponding to multiple algorithm services provided in an embodiment of the present application in the first historical period;

[0127] Figure 3 It is a schematic diagram of the trend of user video traffic usage data changing with daily time periods provided by an embodiment of the present application;

[0128] Figure 4 It is a schematic diagram of the trend of user video traffic usage data changing with seasonal cycles provided by an embodiment of the present application;

[0129] Figure 5 It is a schematic diagram of the trend of user video traffic usage data changing with holidays provided by an embodiment of the present application;

[0130] Figure 6 This is a schematic diagram of traffic usage data prediction provided by the embodiment of the present application

[0131] Figure 7 is a flow chart of an algorithm model evaluation experiment provided in an embodiment of the present application;

[0132] Figure 8 is a structural diagram of a resource configuration device provided in an embodiment of the present application;

[0133] Fig. 9 It is a structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0134] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0135] This application embodiment provides a resource configuration method, see Figure 1 , Figure 1 is a flow chart of a resource configuration method provided in an embodiment of the present application, such as Figure 1 As shown, the following steps are included:

[0136] Step 101: Determine the initial number of experimental Pods required for an evaluation experiment of a target algorithm model corresponding to a first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to a plurality of algorithm services in a first historical period, wherein the first algorithm service is any one of the plurality of algorithm services;

[0137] In this step, the algorithm service is a carrier that provides an operating environment for the algorithm model. One algorithm service can carry multiple algorithm models. Figure 2 In the experimental preparation stage, the traffic usage data and the number of Pods of each of the multiple algorithm services in the first historical period are collected, where the first historical period can be one week or one month; the traffic data can be understood as QPS traffic; Pod is the smallest deployable unit in Kubernetes, which can contain one or more tightly coupled containers that run together and share the same resources and network environment. Specifically, the traffic usage data and the number of Pods corresponding to the daily traffic steady-state time period of each of the multiple algorithm services in the first historical period (generally speaking, the steady-state time period is basically the same every day, assuming it is the X1 to X2 time period) can be collected.

[0138] Use a cyclic scanning method for the experiment configuration table (for example, a scanning cycle of 5 minutes can be used) to query the evaluation experiments that need to be started within the current historical hour, insert the evaluation experiment configuration that needs to be started into the task table and label it to avoid repeated startup of the same experimental task. Among multiple algorithm services, taking the first algorithm service as an example, the target algorithm model is the algorithm model that needs to start the evaluation experiment carried by the first algorithm service. Based on the historical data collected above, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model to be started can be calculated.

[0139] Step 102: According to the initial experimental Pod number, resources are configured for the evaluation experiment of the target algorithm model, and the evaluation experiment is started after the configuration is completed;

[0140] In this step, appropriate resources are allocated to the evaluation experiment of the target algorithm model based on the initial number of experimental Pods to ensure the smooth start of the experiment.

[0141] Step 103: During the running of the evaluation experiment, monitor the resource usage data of the first algorithm service, and adjust the resource configuration of the evaluation experiment according to the resource usage data.

[0142] In this step, during the experiment running phase, the resource usage data of the first algorithm service is monitored in real time, such as the CPU utilization, memory consumption, network bandwidth usage, etc. The performance bottleneck and resource requirements of the first algorithm service are analyzed based on the monitored resource usage data. If the original resources are not enough, more Pods need to be started to allocate more resources to the evaluation experiment of the target algorithm model to ensure the smooth progress of the experiment.

[0143] In one implementation, the initial number of experimental Pods required for the target algorithm model that needs to start the evaluation experiment in the first algorithm service is determined based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period. In the experiment preparation stage, according to the initial number of experimental Pods, the target algorithm model is initially configured for the experiment to start the evaluation experiment. Then, in the experiment operation stage, the number of Pods required during the evaluation experiment operation is re-determined according to the resource usage data of the first algorithm service to dynamically adjust the resource configuration of the evaluation experiment, thereby improving the stability of the algorithm evaluation experiment process.

[0144] Optionally, determining the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period includes:

[0145] According to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, determine the total traffic usage data of all algorithm models, the traffic usage proportion of each algorithm model, and the traffic data carried by a single Pod;

[0146] According to the total traffic usage data of all the algorithm models, the traffic usage proportion of the target algorithm model and the traffic data carried by the single Pod, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model is determined.

[0147] In one implementation, first, based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period, specifically, the traffic usage data and the number of Pods corresponding to each algorithm service in the daily traffic steady-state time period of the first historical period (generally speaking, the steady-state time period is basically the same every day, assuming it is the X1 to X2 time period) can be used to calculate the single Pod QPS load corresponding to each algorithm service. Then, based on the single Pod QPS load corresponding to each algorithm service, the average single Pod QPS load corresponding to multiple algorithm services (i.e., the "traffic data carried by a single Pod") can be calculated. For details, see the following calculation formula (1):

[0148] Traffic data carried by a single Pod = (QPS1 / PodNum1+QPS N / PodNum N ) / N(1);

[0149] Where N represents the number of algorithm services.

[0150] Then, based on the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, the total traffic usage data of all algorithm models and the traffic usage proportion of the target algorithm model are determined.

[0151] Finally, based on the total traffic usage data of all algorithm models, the traffic usage ratio of the target algorithm model, and the traffic data carried by a single Pod, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model is determined. For details, please refer to the following calculation formula (2):

[0152] Initial experimental Pod number = QPS 总 × Target algorithm model QPS ratio / traffic data carried by a single Pod (2).

[0153] Compared with the algorithm evaluation experiment in the related art, in which the initial number of experimental Pods is determined manually based on empirical values, the initial number of experimental Pods is determined based on historical monitoring data in this implementation, so that the determined initial number of experimental Pods is more scientific and accurate.

[0154] Optionally, the target algorithm model includes a first algorithm model and a second algorithm model;

[0155] Determining the number of initial experimental Pods required for the evaluation experiment of the target algorithm model according to the total traffic usage data of all the algorithm models, the traffic usage ratio of the target algorithm model, and the traffic data carried by the single Pod includes:

[0156] According to the total traffic usage data of all the algorithm models, the traffic usage ratio of the first algorithm model, the traffic usage ratio of the second algorithm model, and the traffic data carried by the single Pod, respectively determine the number of first experimental Pods required for the evaluation experiment of the first algorithm model and the number of second experimental Pods required for the evaluation experiment of the second algorithm model;

[0157] The maximum number of experimental Pods between the first number of experimental Pods and the second number of experimental Pods is determined as the initial number of experimental Pods.

[0158] In one embodiment, the target algorithm model is an algorithm model that needs to start an evaluation experiment in the first algorithm service. When the target algorithm model includes the first algorithm model and the second algorithm model, the evaluation experiment carried on the first algorithm service includes the evaluation experiment of the first algorithm model and the evaluation experiment of the second algorithm model. If the number of first experiment Pods required for the evaluation experiment of the first algorithm model is calculated to be 5 based on the total traffic usage data of all algorithm models, the traffic usage ratio of the first algorithm model, and the traffic data carried by a single Pod; the number of first experiment Pods required for the evaluation experiment of the second algorithm model is calculated to be 3 based on the total traffic usage data of all algorithm models, the traffic usage ratio of the second algorithm model, and the traffic data carried by a single Pod, then the 5 Pods that need to be started initially by the first algorithm service are determined to simultaneously meet the resource configuration requirements of the evaluation experiments of the first algorithm model and the second algorithm model, without the need to start 5 Pods based on the evaluation experiment of the first algorithm model alone and 3 Pods based on the evaluation experiment of the second algorithm model alone.

[0159] In this implementation, some Pods of different algorithm models on the same algorithm service can be shared, thereby reducing the waste of resources.

[0160] Next, this application has different solutions for different traffic size settings to adjust the resource allocation of the evaluation experiment during operation:

[0161] Optionally, monitoring resource usage data of the first algorithm service and adjusting resource configuration of the evaluation experiment according to the resource usage data includes:

[0162] Monitor the resource utilization of each Pod used by the target algorithm model in the evaluation experiment;

[0163] When the resource utilization of each Pod is greater than the first threshold, the number of Pods used by the target algorithm model in the evaluation experiment is increased.

[0164] In one implementation, for a low-traffic scenario, the resource utilization of each Pod carried by the target algorithm model is monitored, that is, the resource utilization of each Pod started by the first algorithm service is monitored. Generally, the resource utilization of each Pod can be reflected by the CPU utilization of the Pod. When the resource utilization of all Pods is greater than the first threshold, the number of Pods used by the target algorithm model in the evaluation experiment is increased. The increased number of Pods can be obtained by the following calculation formula (3):

[0165] The number of Pods after increase = the current number of Pods × (1 + coefficient) (3)

[0166] The coefficient can be set as needed, and can generally be set to 0.2 based on empirical values.

[0167] In this implementation, when the number of Pods carried by the target algorithm model is greater than the first threshold, it means that the current resource configuration can no longer meet the operating requirements of the evaluation experiment. By increasing the number of Pods of the evaluation experiment, the stability of the evaluation experiment can be maintained and the smooth progress of the evaluation experiment can be ensured.

[0168] Optionally, the method further comprises:

[0169] When the resource utilization of a first Pod among the Pods used in the evaluation experiment of the target algorithm model is greater than a first threshold, and the resource utilization of a second Pod is less than a second threshold, a first alarm message is output, wherein the second threshold is less than the first threshold.

[0170] In one implementation, for low-traffic scenarios, among the Pods used in the evaluation experiment of the target algorithm model, if the resource utilization of several Pods is too high and the resource utilization of several Pods is too low, it may be caused by uneven cluster load. In this case, capacity expansion is not performed, and the first alarm information is output for the operator to check and solve the relevant problems in a timely manner.

[0171] Optionally, monitoring resource usage data of the first algorithm service and adjusting resource configuration of the evaluation experiment according to the resource usage data includes:

[0172] Collecting real-time traffic usage data of the first algorithm service for a first period of time;

[0173] Based on the real-time traffic usage data and the traffic data carried by a single Pod, the target number of Pods is determined, and the number of Pods used in the evaluation experiment is adjusted to the target number of Pods, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

[0174] In one implementation, for a high-traffic scenario, real-time traffic usage data of a first algorithm service is collected continuously for a first duration. For example, 15 seconds may be used as a collection point, and real-time traffic usage data of the first algorithm service may be collected continuously for 1 hour. It should be noted that when the real-time traffic usage data corresponding to a certain collection point is less than a certain threshold, it is considered that the collection point has no business bearer, and the real-time traffic usage data collected by the collection point is determined to be abnormal data. When the real-time traffic usage data collected continuously for the first duration is subsequently used, the real-time traffic usage data corresponding to the collection point needs to be removed.

[0175] Then, the target number of Pods required at the next time point is determined based on the real-time traffic usage data collected for the first period of time and the traffic data carried by a single Pod, and the current number of Pods is increased or decreased based on the target number of Pods.

[0176] In this implementation, the target number of Pods of the target algorithm model at the next time point is predicted based on the real-time traffic usage data of the first algorithm service and the traffic data carried by a single Pod, so that the number of Pods required for the evaluation experiment can be adjusted in time, thereby further maintaining the stability of the evaluation experiment.

[0177] Optionally, determining the target number of Pods according to the real-time traffic usage data and traffic data carried by a single Pod includes:

[0178] When there is traffic peak data lasting for a second duration in the real-time traffic usage data, the target number of Pods is determined according to the traffic peak data and the traffic data carried by the single Pod, wherein the second duration is less than the first duration.

[0179] In one embodiment, during a collection period of a first duration (e.g., one hour), if there is traffic peak data that lasts for a second duration (e.g., one minute), the quotient obtained by dividing the traffic peak data by the traffic data carried by a single Pod is directly used as the target number of Pods at the next time point, and the current number of Pods is increased or decreased based on the target number of Pods, thereby facilitating maximizing the satisfaction of the resource requirements of the evaluation experiment at the next time point.

[0180] Optionally, determining the target number of Pods according to the real-time traffic usage data and traffic data carried by a single Pod includes:

[0181] In the case where there is no traffic peak data lasting for a second duration in the real-time traffic usage data, using a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target period, wherein the second duration is less than the first duration;

[0182] The target number of Pods is determined based on the traffic usage data of the first algorithm service in the future target time period and the traffic data carried by a single Pod.

[0183] In one embodiment, within a collection period of a first duration (e.g., one hour), if there is no traffic peak data that lasts for a second duration (e.g., one minute), then the traffic usage data of the first algorithm service in the future target time period can be predicted using a time prediction algorithm based on the real-time traffic usage data corresponding to the first duration. Then, the quotient obtained by dividing the predicted traffic usage data of the first algorithm service in the future target time period by the traffic data carried by a single Pod is used as the target number of Pods required by the target algorithm model in the future target time period. In this embodiment, using a time prediction algorithm to predict the target number of Pods required by the target algorithm model in the future target time period is conducive to improving the accuracy and reliability of the prediction results.

[0184] Optionally, the using a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target time period includes:

[0185] At least one trend function is used to calculate the traffic usage data of the first algorithm service in the future target time period, wherein the at least one trend function includes at least one of an increasing or decreasing trend function, a seasonal trend function and a holiday trend function, the increasing or decreasing trend function is a function that characterizes the trend of the traffic usage data changing with a daily time period, the seasonal trend function is a function that characterizes the trend of the traffic usage data changing with a seasonal cycle, and the holiday trend function is a function that characterizes the trend of the traffic usage data changing with holidays.

[0186] In one implementation, the time prediction algorithm (Prophet) y(t) can be expressed by the following expression (4):

[0187] y(t)=g(t)+s(t)+h(t)+εt (4)

[0188] Among them, g(t) represents the increasing and decreasing trend function, s(t) represents the seasonal trend function, h(t) represents the holiday trend function, and st represents the noise with Gaussian distribution characteristics. Since the algorithm model mentioned in this application is mainly an algorithm model for video recommendation, the environment for the evaluation experiment of this algorithm model is relatively fixed and is less affected by external factors. The time period of users watching programs is very periodic, so the overall traffic usage data has a time series characteristic, that is, the traffic usage data will change with the time point, season, and month, but the most basic change cycle is in days.

[0189] Among them, the increase and decrease trend function g(t) represents how the entire time series increases and decreases, as well as the expected increase and decrease in the future. The increase and decrease trend function g(t) can be expressed by the following expression (5):

[0190]

[0191] See also Figure 3 , Figure 3 This is a diagram showing the trend of user video traffic usage data changing with daily time periods. Figure 3 It can be seen that the trend of traffic usage data is quite obvious, with obvious periodic changes. The traffic usage data after midnight every day has a clear downward trend, indicating that fewer people watch videos during this time period. The traffic usage data during the day, noon and evening shows a clear upward trend, indicating that more people watch videos during this time period.

[0192] The seasonal trend function s(t) uses Fourier technology to represent the periodic properties. The seasonal trend function s(t) can be expressed by the following expression (6):

[0193]

[0194] See also Figure 4 , Figure 4 This is a diagram of the seasonal changes in traffic usage data on a weekly basis. It can be seen that the traffic usage data has a clear upward trend from Sunday to Monday, the traffic usage data from Monday to Friday tends to be stable, and the traffic usage data fluctuates greatly on weekends. The number of people watching videos will increase on weekends.

[0195] The holiday trend function h(t) can be expressed by the following expression (7):

[0196]

[0197] Among them, k i Indicates the magnitude of the impact of holidays on normal data, i represents holidays, D i Indicates the window length. Figure 5 , Figure 5 This is a diagram showing the trend of traffic usage data changing with holidays. Figure 5 It can be seen that there is an obvious upward trend in traffic usage data from January to March, May, July, August and October, because there are national traditional holidays such as the Spring Festival, May Day, Winter and Summer Vacations and National Day during this period, and the traffic usage data before and after the holiday windows fluctuate significantly. In order to better fit the data, the model significantly enhances the influence of seasonal factors by detecting known mutation points.

[0198] See also Figure 6 The time prediction algorithm (Prophet) model fits and predicts the above function to obtain the following Figure 6 Schematic diagram of traffic usage data forecast.

[0199] In this implementation, the time prediction algorithm can identify the daily increase or decrease trend, seasonal change trend and holiday change trend of traffic usage data, so as to more accurately predict the changes in traffic usage data in future time periods.

[0200] Optionally, after monitoring the resource usage data of the first algorithm service, the method further includes:

[0201] Comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period;

[0202] When the deviation is greater than a third threshold, a second warning message is output.

[0203] In one implementation, for high-traffic scenarios, in addition to the strategy described in the above embodiment of increasing or decreasing the current number of Pods by real-time prediction of the target Pod at the next time point, a strategy of issuing alarms through real-time traffic usage data is also included. These two strategies can be switched during the evaluation experiment according to actual needs.

[0204] Collect the traffic usage data of the first algorithm service at the corresponding time point every day in the second historical time period, and compare and analyze it with the traffic usage data of the first algorithm service in the current time period. If the deviation between the two is greater than the third threshold, output the second alarm information so that the administrator can deal with related problems in time.

[0205] Optionally, comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period includes:

[0206] Determine the traffic usage data of the first algorithm service at each time point of each day in the second historical time period, where the second historical time period is M days, and M is an integer greater than 1;

[0207] Calculate the average of the traffic usage data of the first algorithm service at the first time point in the M days of the second historical time period to obtain the average traffic usage data of the first algorithm service at the first time point in history, where the first time point is any time point of each day;

[0208] The average traffic usage data at the first time point in the history is divided by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at the first time point in the history, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period;

[0209] Determine the number of Pods corresponding to the traffic usage data of the first algorithm service at each time point in the current time period;

[0210] Determine the difference between the number of Pods corresponding to the traffic usage data of the first algorithm service at the first time point in the current time period and the number of Pods used by the first algorithm service at the first time point in history.

[0211] In one implementation, exemplarily, the traffic usage data of the first algorithm service at 1:30, 2:00, and 2:30 every day in the past 7 days are collected, and then the average traffic usage data of the first algorithm service at 1:30 in history is calculated based on the traffic data at 1:30 every day in the 7 days, and the average traffic usage data of the first algorithm service at 1:30 in history is divided by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at 1:30 in history, and the number of Pods corresponding to the traffic usage data of the first algorithm service at the current 1:30 is determined, and based on the difference between the number of Pods used by the first algorithm service at 1:30 in history and the number of Pods corresponding to the traffic usage data of the first algorithm service at the current 1:30, it is determined whether to output the second alarm information. The processing process of the traffic usage data at 2 o'clock and 2:30 is the same as the aforementioned processing process, which will not be repeated here.

[0212] In this implementation, by comparing the number of Pods used in the evaluation experiment history with the number of Pods currently used, abnormal resource usage can be discovered in a timely manner, and outputting alarm information can help operators quickly resolve abnormal usage.

[0213] Optionally, the target algorithm model includes at least two algorithm models, and the method further includes:

[0214] When the evaluation experiment of the first algorithm model in the target algorithm model is completed, the number of Pods to be recycled is determined according to the traffic usage ratio of each algorithm model in the target algorithm model;

[0215] The number of Pods to be recycled is reduced for the evaluation experiment.

[0216] In one implementation, the target algorithm model includes at least two algorithm models. Even if the first algorithm service carries at least two algorithm models, if the experiment with the first algorithm model ends, it is necessary to scale down the Pods of the first algorithm service accordingly to recycle resources. Specifically, based on the traffic usage ratio of each algorithm model in the target algorithm model and the traffic usage ratio of the first algorithm model, determine the number of Pods that need to be recycled based on stopping the first algorithm model. Then, the number of Pods corresponding to the first algorithm service is reduced according to the number of Pods that need to be recycled to recycle the corresponding resources. This implementation method is conducive to reducing waste of resources.

[0217] See also Figure 7 , Figure 7 A flowchart of the algorithm model evaluation experiment provided in the embodiment of the present application.

[0218] 1. Before the experiment, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service is determined based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

[0219] 2. After the experiment starts, during the running of the experiment, different strategies can be used to adjust the resource allocation of the evaluation experiment for different traffic scenarios. Specifically:

[0220] For low-traffic scenarios, you can monitor the CPU utilization of each Pod used in the target algorithm model evaluation experiment in real time. When the CPU utilization of all Pods is greater than the first threshold, increase the current number of Pods. If the CPU utilization of some Pods is too high or too low, do not expand the capacity and issue an abnormal alarm.

[0221] For high-traffic scenarios, two strategies can be included: real-time prediction alarm and real-time prediction expansion and contraction. These two strategies can be dynamically configured and switched according to actual needs.

[0222] (1) Real-time prediction and expansion strategy: The real-time traffic usage data of the first algorithm service is collected for a first time period. During the collection period of the first time period (for example, one hour), if there is traffic peak data that lasts for a second time period (for example, one minute), the quotient obtained by dividing the traffic peak data by the traffic data carried by a single Pod is directly used as the target number of Pods at the next time point; during the collection period of the first time period (for example, one hour). If there is no traffic peak data that lasts for a second time period (for example, one minute), the traffic usage data of the first algorithm service in the future target time period can be predicted based on the real-time traffic usage data corresponding to the first time period using a time prediction algorithm. Then, the quotient obtained by dividing the traffic usage data of the first algorithm service in the future target time period obtained according to the prediction by the traffic data carried by a single Pod is used as the target number of Pods required by the target algorithm model in the future target time period. Then, the current number of Pods is expanded or reduced based on the obtained target number of Pods.

[0223] (2) Real-time prediction alarm strategy: Collect the traffic usage data of the first algorithm service at the corresponding time point every day in the second historical time period, and compare and analyze it with the traffic usage data of the first algorithm service in the current time period. If the deviation between the two is greater than the third threshold, output the second alarm information.

[0224] 3. After the experiment is over, if there is an experiment of the first algorithm model in the target algorithm model carried by the first algorithm service that has ended, it is necessary to reduce the capacity of the corresponding Pod of the first algorithm service to recycle resources.

[0225] The resource configuration method of the embodiment of the present application dynamically configures the resources of the evaluation experiment based on time prediction, rule judgment and alarm notification, in view of the periodic and bursty characteristics of the video recommendation business volume, combining historical resource usage data, real-time monitoring resource usage data, and Pod resource utilization indicators, thereby improving the stability and reliability of the entire algorithm evaluation experiment.

[0226] See also Figure 8 , Figure 8 is a structural diagram of a resource configuration device provided in an embodiment of the present application. Figure 8 As shown, the resource configuration device 800 includes:

[0227] A first determination module is used to determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, wherein the first algorithm service is any one of the multiple algorithm services;

[0228] A first configuration module is used to configure resources for the evaluation experiment of the target algorithm model according to the initial experimental Pod number, and start the evaluation experiment after the configuration is completed;

[0229] The first adjustment module is used to monitor the resource usage data of the first algorithm service during the running of the evaluation experiment, and adjust the resource configuration of the evaluation experiment according to the resource usage data.

[0230] Optionally, the first determining module includes:

[0231] A first determination unit is used to determine the total traffic usage data of all algorithm models, the traffic usage proportion of each algorithm model, and the traffic data carried by a single Pod according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period;

[0232] The second determination unit is used to determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model based on the total traffic usage data of all the algorithm models, the traffic usage proportion of the target algorithm model and the traffic data carried by the single Pod.

[0233] Optionally, the first adjustment module includes:

[0234] A first monitoring unit, used to monitor the resource utilization of each Pod used by the target algorithm model in the evaluation experiment;

[0235] The first processing unit is used to increase the number of Pods used by the target algorithm model in the evaluation experiment when the resource utilization rate of each Pod is greater than a first threshold.

[0236] Optionally, the device further comprises:

[0237] The first output module is used to output a first alarm message when, among the Pods used in the evaluation experiment of the target algorithm model, there is a first Pod whose resource utilization is greater than a first threshold, and there is a second Pod whose resource utilization is less than a second threshold, wherein the second threshold is less than the first threshold.

[0238] Optionally, the first adjustment module includes:

[0239] A first collection unit, configured to collect real-time traffic usage data of the first algorithm service for a first duration;

[0240] The third determination unit is used to determine the target number of Pods based on the real-time traffic usage data and the traffic data carried by a single Pod, and adjust the number of Pods used in the evaluation experiment to the target number of Pods, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

[0241] Optionally, the third determining unit includes:

[0242] The first determination subunit is used to determine the target number of Pods according to the traffic peak data and the traffic data carried by the single Pod when there is traffic peak data lasting for a second duration in the real-time traffic usage data, wherein the second duration is less than the first duration.

[0243] Optionally, the third determining unit includes:

[0244] A first prediction subunit is used to predict the traffic usage data of the first algorithm service in a future target time period by using a time prediction algorithm when there is no traffic peak data lasting for a second time period in the real-time traffic usage data, wherein the second time period is less than the first time period;

[0245] The second determination subunit is used to determine the target number of Pods according to the traffic usage data of the first algorithm service in the future target time period and the traffic data carried by a single Pod.

[0246] Optionally, the first prediction subunit is specifically configured to:

[0247] At least one trend function is used to calculate the traffic usage data of the first algorithm service in the future target time period, wherein the at least one trend function includes at least one of an increasing or decreasing trend function, a seasonal trend function and a holiday trend function, the increasing or decreasing trend function is a function that characterizes the trend of the traffic usage data changing with a daily time period, the seasonal trend function is a function that characterizes the trend of the traffic usage data changing with a seasonal cycle, and the holiday trend function is a function that characterizes the trend of the traffic usage data changing with holidays.

[0248] Optionally, the device further comprises:

[0249] A first comparison module, used to compare the deviation between the traffic usage data of the first algorithm service in the second historical time period and the traffic usage data of the first algorithm service in the current time period;

[0250] The first output module is used to output second alarm information when the deviation is greater than a third threshold.

[0251] Optionally, the first comparison module includes:

[0252] a fourth determining unit, configured to determine traffic usage data of the first algorithm service at each time point of each day in the second historical time period, where the second historical time period is M days, and M is an integer greater than 1;

[0253] A first calculation unit is used to average the traffic usage data of the first algorithm service at a first time point in M ​​days of the second historical time period to obtain the average traffic usage data of the first algorithm service at the first time point in history, where the first time point is any time point of each day;

[0254] A second calculation unit is used to divide the average traffic usage data at the first time point in the history by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at the first time point in the history, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period;

[0255] A fifth determining unit, configured to determine the number of Pods corresponding to the traffic usage data of the first algorithm service at each time point in the current time period;

[0256] The sixth determination unit is used to determine the difference between the number of Pods corresponding to the traffic usage data of the first algorithm service at the first time point in the current time period and the number of Pods used by the first algorithm service at the first time point in history.

[0257] Optionally, the target algorithm model includes at least two algorithm models, and the device further includes:

[0258] A second determination module is used to determine the number of Pods to be recycled according to the traffic usage ratio of each algorithm model in the target algorithm model when the evaluation experiment of the first algorithm model in the target algorithm model is completed;

[0259] The first processing module is used to reduce the number of Pods to be recycled in the evaluation experiment.

[0260] Optionally, the target algorithm model includes a first algorithm model and a second algorithm model;

[0261] The first determining module includes:

[0262] A seventh determination unit, used to determine the number of first experimental Pods required for the evaluation experiment of the first algorithm model and the number of second experimental Pods required for the evaluation experiment of the second algorithm model according to the total traffic usage data of all the algorithm models, the traffic usage proportion of the first algorithm model, the traffic usage proportion of the second algorithm model, and the traffic data carried by the single Pod;

[0263] An eighth determining unit is used to determine the maximum number of experimental Pods between the first number of experimental Pods and the second number of experimental Pods as the initial number of experimental Pods.

[0264] It should be noted that this embodiment is Figure 1 The specific implementation of the corresponding device side embodiment can be found in Figure 1 To avoid repeated description, the relevant description of the embodiment shown in is not repeated in this embodiment, and the same beneficial effects can be achieved.

[0265] The present application also provides an electronic device. Since the principle of solving the problem by the electronic device is similar to the resource configuration method in the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated. Fig. 9 As shown, the electronic device of the embodiment of the present application includes: a processor 900, which is used to read the program in the memory 920 and execute the following process:

[0266] Determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, where the first algorithm service is any one of the multiple algorithm services;

[0267] According to the initial experimental Pod number, resources are configured for the evaluation experiment of the target algorithm model, and the evaluation experiment is started after the configuration is completed;

[0268] During the running of the evaluation experiment, the resource usage data of the first algorithm service is monitored, and the resource configuration of the evaluation experiment is adjusted according to the resource usage data.

[0269] Optionally, the processor 900 is configured to read a program in the memory 920 and perform the following process:

[0270] According to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, determine the total traffic usage data of all algorithm models, the traffic usage proportion of each algorithm model, and the traffic data carried by a single Pod;

[0271] According to the total traffic usage data of all the algorithm models, the traffic usage proportion of the target algorithm model and the traffic data carried by the single Pod, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model is determined.

[0272] Optionally, the processor 900 is configured to read a program in the memory 920 and perform the following process:

[0273] Monitor the resource utilization of each Pod used by the target algorithm model in the evaluation experiment;

[0274] When the resource utilization of each Pod is greater than the first threshold, the number of Pods used by the target algorithm model in the evaluation experiment is increased.

[0275] Optionally, the processor 900 is configured to read a program in the memory 920 and execute the following process: through the transceiver 910:

[0276] When the resource utilization of a first Pod among the Pods used in the evaluation experiment of the target algorithm model is greater than a first threshold, and the resource utilization of a second Pod is less than a second threshold, a first alarm message is output, wherein the second threshold is less than the first threshold.

[0277] Among them, Fig. 9 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 900 and memory represented by memory 920. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 910 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. The processor 900 is responsible for managing the bus architecture and general processing, and the memory 920 may store data used by the processor 900 when performing operations.

[0278] Optionally, the processor 900 is configured to read a program in the memory 920 and perform the following process:

[0279] Collecting real-time traffic usage data of the first algorithm service for a first period of time;

[0280] Based on the real-time traffic usage data and the traffic data carried by a single Pod, the target number of Pods is determined, and the number of Pods used in the evaluation experiment is adjusted to the target number of Pods, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

[0281] Optionally, the processor 900 is configured to read a program in the memory 920 and perform the following process:

[0282] When there is traffic peak data lasting for a second duration in the real-time traffic usage data, the target number of Pods is determined according to the traffic peak data and the traffic data carried by the single Pod, wherein the second duration is less than the first duration.

[0283] Optionally, the processor 900 is configured to read a program in the memory 920 and execute the following process: when there is no traffic peak data lasting for a second duration in the real-time traffic usage data, using a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target time period, wherein the second duration is less than the first duration;

[0284] The target number of Pods is determined based on the traffic usage data of the first algorithm service in the future target time period and the traffic data carried by a single Pod.

[0285] Optionally, the processor 900 is configured to read a program in the memory 920 and perform the following process:

[0286] At least one trend function is used to calculate the traffic usage data of the first algorithm service in the future target time period, wherein the at least one trend function includes at least one of an increasing or decreasing trend function, a seasonal trend function and a holiday trend function, the increasing or decreasing trend function is a function that characterizes the trend of the traffic usage data changing with a daily time period, the seasonal trend function is a function that characterizes the trend of the traffic usage data changing with a seasonal cycle, and the holiday trend function is a function that characterizes the trend of the traffic usage data changing with holidays.

[0287] Optionally, the processor 900 is configured to read a program in the memory 920 and execute the following process: through the transceiver 910:

[0288] Comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period;

[0289] When the deviation is greater than a third threshold, a second warning message is output.

[0290] Optionally, the processor 900 is configured to read a program in the memory 920 and perform the following process:

[0291] Determine the traffic usage data of the first algorithm service at each time point of each day in the second historical time period, where the second historical time period is M days, and M is an integer greater than 1;

[0292] Calculate the average of the traffic usage data of the first algorithm service at the first time point in the M days of the second historical time period to obtain the average traffic usage data of the first algorithm service at the first time point in history, where the first time point is any time point of each day;

[0293] The average traffic usage data at the first time point in the history is divided by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at the first time point in the history, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period;

[0294] Determine the number of Pods corresponding to the traffic usage data of the first algorithm service at each time point in the current time period;

[0295] Determine the difference between the number of Pods corresponding to the traffic usage data of the first algorithm service at the first time point in the current time period and the number of Pods used by the first algorithm service at the first time point in history.

[0296] Optionally, the target algorithm model includes at least two algorithm models, and the processor 900 is used to read the program in the memory 920 and perform the following process:

[0297] When the evaluation experiment of the first algorithm model in the target algorithm model is completed, the number of Pods to be recycled is determined according to the traffic usage ratio of each algorithm model in the target algorithm model;

[0298] The number of Pods to be recycled is reduced for the evaluation experiment.

[0299] Optionally, the target algorithm model includes a first algorithm model and a second algorithm model;

[0300] The processor 900 is used to read the program in the memory 920 and execute the following process:

[0301] According to the total traffic usage data of all the algorithm models, the traffic usage ratio of the first algorithm model, the traffic usage ratio of the second algorithm model, and the traffic data carried by the single Pod, respectively determine the number of first experimental Pods required for the evaluation experiment of the first algorithm model and the number of second experimental Pods required for the evaluation experiment of the second algorithm model;

[0302] The maximum number of experimental Pods between the first number of experimental Pods and the second number of experimental Pods is determined as the initial number of experimental Pods.

[0303] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned resource configuration method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0304] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0305] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0306] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0307] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A resource allocation method, It is characterized in that The method comprises: Determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, where the first algorithm service is any one of the multiple algorithm services; According to the initial experimental Pod number, resources are configured for the evaluation experiment of the target algorithm model, and the evaluation experiment is started after the configuration is completed; During the running of the evaluation experiment, the resource usage data of the first algorithm service is monitored, and the resource configuration of the evaluation experiment is adjusted according to the resource usage data.

2. The resource allocation method according to claim 1, It is characterized in that The determining, according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, the number of initial experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service comprises: According to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, determine the total traffic usage data of all algorithm models, the traffic usage proportion of each algorithm model, and the traffic data carried by a single Pod; According to the total traffic usage data of all the algorithm models, the traffic usage proportion of the target algorithm model and the traffic data carried by the single Pod, the initial number of experimental Pods required for the evaluation experiment of the target algorithm model is determined.

3. The resource allocation method according to claim 1, It is characterized in that The monitoring of the resource usage data of the first algorithm service and adjusting the resource configuration of the evaluation experiment according to the resource usage data includes: Monitor the resource utilization of each Pod used by the target algorithm model in the evaluation experiment; When the resource utilization of each Pod is greater than the first threshold, the number of Pods used by the target algorithm model in the evaluation experiment is increased.

4. The resource allocation method according to claim 3, It is characterized in that The method further comprises: When the resource utilization of a first Pod among the Pods used in the evaluation experiment of the target algorithm model is greater than a first threshold, and the resource utilization of a second Pod is less than a second threshold, a first alarm message is output, wherein the second threshold is less than the first threshold.

5. The resource allocation method according to claim 1, It is characterized in that The monitoring of the resource usage data of the first algorithm service and adjusting the resource configuration of the evaluation experiment according to the resource usage data includes: Collecting real-time traffic usage data of the first algorithm service for a first period of time; Based on the real-time traffic usage data and the traffic data carried by a single Pod, the target number of Pods is determined, and the number of Pods used in the evaluation experiment is adjusted to the target number of Pods, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period.

6. The resource allocation method according to claim 5, It is characterized in that The determining the target number of Pods according to the real-time traffic usage data and the traffic data carried by a single Pod includes: When there is traffic peak data lasting for a second duration in the real-time traffic usage data, the target number of Pods is determined according to the traffic peak data and the traffic data carried by the single Pod, wherein the second duration is less than the first duration.

7. The resource allocation method according to claim 5, It is characterized in that The determining the target number of Pods according to the real-time traffic usage data and the traffic data carried by a single Pod includes: In the case where there is no traffic peak data lasting for a second duration in the real-time traffic usage data, using a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target period, wherein the second duration is less than the first duration; The target number of Pods is determined based on the traffic usage data of the first algorithm service in the future target time period and the traffic data carried by a single Pod.

8. The resource allocation method according to claim 7, It is characterized in that The using of a time prediction algorithm to predict the traffic usage data of the first algorithm service in a future target period includes: At least one trend function is used to calculate the traffic usage data of the first algorithm service in the future target time period, wherein the at least one trend function includes at least one of an increasing or decreasing trend function, a seasonal trend function and a holiday trend function, the increasing or decreasing trend function is a function that characterizes the trend of the traffic usage data changing with a daily time period, the seasonal trend function is a function that characterizes the trend of the traffic usage data changing with a seasonal cycle, and the holiday trend function is a function that characterizes the trend of the traffic usage data changing with holidays.

9. The resource allocation method according to claim 1, It is characterized in that After monitoring the resource usage data of the first algorithm service, the method further includes: Comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period; When the deviation is greater than a third threshold, a second warning message is output.

10. The resource allocation method according to claim 9, It is characterized in that The comparing the traffic usage data of the first algorithm service in the second historical time period with the deviation between the traffic usage data of the first algorithm service in the current time period includes: Determine the traffic usage data of the first algorithm service at each time point of each day in the second historical time period, where the second historical time period is M days, and M is an integer greater than 1; Calculate the average of the traffic usage data of the first algorithm service at the first time point in the M days of the second historical time period to obtain the average traffic usage data of the first algorithm service at the first time point in history, where the first time point is any time point of each day; The average traffic usage data at the first time point in the history is divided by the traffic data carried by a single Pod to obtain the number of Pods used by the first algorithm service at the first time point in the history, wherein the traffic data carried by the single Pod is calculated based on the traffic usage data and the number of Pods of all algorithm models corresponding to multiple algorithm services in the first historical period; Determine the number of Pods corresponding to the traffic usage data of the first algorithm service at each time point in the current time period; Determine the difference between the number of Pods corresponding to the traffic usage data of the first algorithm service at the first time point in the current time period and the number of Pods used by the first algorithm service at the first time point in history.

11. The resource allocation method according to claim 1, It is characterized in that The target algorithm model includes at least two algorithm models, and the method further includes: When the evaluation experiment of the first algorithm model in the target algorithm model is completed, the number of Pods to be recycled is determined according to the traffic usage ratio of each algorithm model in the target algorithm model; The number of Pods to be recycled is reduced for the evaluation experiment.

12. The resource allocation method according to claim 2, It is characterized in that The target algorithm model includes a first algorithm model and a second algorithm model; Determining the number of initial experimental Pods required for the evaluation experiment of the target algorithm model according to the total traffic usage data of all the algorithm models, the traffic usage ratio of the target algorithm model, and the traffic data carried by the single Pod includes: According to the total traffic usage data of all the algorithm models, the traffic usage ratio of the first algorithm model, the traffic usage ratio of the second algorithm model, and the traffic data carried by the single Pod, respectively determine the number of first experimental Pods required for the evaluation experiment of the first algorithm model and the number of second experimental Pods required for the evaluation experiment of the second algorithm model; The maximum number of experimental Pods between the first number of experimental Pods and the second number of experimental Pods is determined as the initial number of experimental Pods.

13. A resource allocation device, It is characterized in that The device comprises: A first determination module is used to determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, wherein the first algorithm service is any one of the multiple algorithm services; A first configuration module is used to configure resources for the evaluation experiment of the target algorithm model according to the initial experimental Pod number, and start the evaluation experiment after the configuration is completed; The first adjustment module is used to monitor the resource usage data of the first algorithm service during the running of the evaluation experiment, and adjust the resource configuration of the evaluation experiment according to the resource usage data.

14. An electronic device, It is characterized in that The electronic device comprises a transceiver and a processor, wherein the processor is configured to: Determine the initial number of experimental Pods required for the evaluation experiment of the target algorithm model corresponding to the first algorithm service according to the traffic usage data and the number of Pods of all algorithm models corresponding to the multiple algorithm services in the first historical period, where the first algorithm service is any one of the multiple algorithm services; According to the initial experimental Pod number, resources are configured for the evaluation experiment of the target algorithm model, and the evaluation experiment is started after the configuration is completed; During the running of the evaluation experiment, the resource usage data of the first algorithm service is monitored, and the resource configuration of the evaluation experiment is adjusted according to the resource usage data.

15. An electronic device, It is characterized in that The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the resource configuration method according to any one of claims 1 to 12 when executed by the processor.

16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the resource configuration method according to any one of claims 1 to 12 are implemented.

17. A computer program product, It is characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the resource configuration method according to any one of claims 1 to 12.