Method, device, equipment and medium for managing resource allocation in recommendation scenarios
By mapping multiple processing resources to a unified general resource and managing resource allocation based on general resources, the problems of complex and insufficient flexibility in resource allocation in the existing technology are solved, and more effective and flexible resource management and allocation are achieved.
Patent Information
- Application Number
- CN202310933387.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2043-07-27
AI Technical Summary
The prior art is complex in managing the coordinated operations of multiple processing resources, making it difficult to achieve more efficient and flexible resource allocation, especially when resource requirements fluctuate during task execution.
By mapping multiple types of processing resources to a unified general resource and managing resource allocation in units of general resources, receiving resource configuration from users to determine the consumption speed of general resources, and performing target tasks with matching general resources.
It realizes more effective and flexible resource management in the recommended scenario, reduces the complexity of resource allocation, avoids resource waste and insufficient resources, and improves resource utilization efficiency.
Smart Images

Figure CN116954909B_ABST
Abstract
Description
Technical Field
[0001] Exemplary implementations of the present disclosure generally relate to resource management, and more particularly to methods, apparatuses, devices, and computer-readable storage media for managing resource allocation in a recommendation scenario. Background Art
[0002] With the development of network technology, a variety of technical solutions for remote resource management have been developed. At this time, various processing resources can be located far away from the user's client device, and the user can call the remote processing resources via the network to perform various tasks of his own. However, the task execution process may involve multiple processing resources, and the coordinated operation of managing multiple processing resources involves complex processes. At this time, it is expected that the multiple processing resources that may be involved in the task execution process can be managed in a more effective and flexible manner. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for managing resource allocation in a recommendation scenario is provided. In the method, a target number of general resources are allocated to a user from a plurality of processing resources, the plurality of processing resources include computing resources, temporary storage resources, and persistent storage resources, and the general resources indicate at least any one of the plurality of processing resources. A resource configuration for specifying the use of the general resources to perform a target task of the user is received from the user, the resource configuration indicating a consumption rate of the general resources when performing the target task. The target task is performed using at least a portion of the general resources that match the resource configuration.
[0004] In a second aspect of the present disclosure, a device for managing resource allocation in a recommendation scenario is provided. The device includes: an allocation module configured to allocate a target number of general resources to a user from a plurality of processing resources, the plurality of processing resources including computing resources, temporary storage resources, and persistent storage resources, and the general resources indicate at least any one of the plurality of processing resources; a receiving module configured to receive from a user a resource configuration for specifying the use of the general resources to perform a target task of the user, the resource configuration indicating a consumption speed of the general resources when performing the target task; and an execution module configured to use at least a portion of the general resources that match the resource configuration to perform the target task.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method according to the first aspect of the present disclosure.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method according to the first aspect of the present disclosure.
[0007] It should be understood that the content described in this content section is not intended to limit the key features or important features of the implementation of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar figure labels represent the same or similar elements, wherein:
[0009] Figure 1 A block diagram showing a method of invoking a resource in a remote processing device according to an exemplary implementation of the present disclosure is shown;
[0010] Figure 2 A block diagram for managing resource allocation in a recommendation scenario according to some implementations of the present disclosure is shown;
[0011] Figure 3 A block diagram for applying for a general resource according to some implementations of the present disclosure is shown;
[0012] Figure 4 A block diagram for determining a predicted quantity of a common resource according to some implementations of the present disclosure is shown;
[0013] Figure 5 A block diagram for specifying resource configuration according to some implementations of the present disclosure is shown;
[0014] Figure 6 A block diagram for specifying resource configuration for a data management task according to some implementations of the present disclosure is shown;
[0015] Figure 7 A block diagram for specifying resource configuration for a feature engineering task according to some implementations of the present disclosure is shown;
[0016] Figure 8 A block diagram for specifying resource configuration for a model training task according to some implementations of the present disclosure is shown;
[0017] Fig. 9 A block diagram for presenting the status of a general resource according to some implementations of the present disclosure is shown;
[0018] Fig.10A block diagram for monitoring general resource consumption of an application according to some implementations of the present disclosure is shown;
[0019] Fig.11 A block diagram for counting general resource consumption according to some implementations of the present disclosure is shown;
[0020] Fig.12 A block diagram for changing resource configuration according to some implementations of the present disclosure is shown;
[0021] Fig.13 A flowchart of a method for managing resource allocation in a recommendation scenario according to some implementations of the present disclosure is shown;
[0022] Fig.14 A block diagram showing an apparatus for managing resource allocation in a recommendation scenario according to some implementations of the present disclosure; and
[0023] Fig.15 A block diagram of a device capable of implementing multiple implementations of the present disclosure is shown. DETAILED DESCRIPTION
[0024] The implementation of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be interpreted as being limited to the implementations described herein. On the contrary, these implementations are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and implementations of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0025] In the description of the implementation methods of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "an implementation" or "the implementation" should be understood as "at least one implementation". The term "some implementations" should be understood as "at least some implementations". The following may also include other explicit and implicit definitions. As used herein, the term "model" can represent the association relationship between various data. For example, the above-mentioned association relationship can be obtained based on a variety of technical solutions currently known and / or to be developed in the future.
[0026] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0027] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0028] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0029] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0030] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0031] The term "in response to" as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of executing a subsequent action executed in response to the event or condition is not necessarily strongly related to the time when the event occurs or the condition is satisfied. For example, in some cases, the subsequent action may be executed immediately when the event occurs or the condition is satisfied; while in other cases, the subsequent action may be executed some time after the event occurs or the condition is satisfied.
[0032] Example Environment
[0033] With the development of network technology, a variety of technical solutions for remote resource management have been developed. Figure 1 Describes the environment of remote resource calls. Figure 1 A block diagram 100 of an environment for remote resource invocation according to an exemplary implementation of the present disclosure is shown. Figure 1 As shown, the resource pool 110 may include one or more processing devices 140, and each processing device 140 may provide multiple types of processing resources, such as computing resources 112, temporary storage resources 114 (e.g., storage space located in an internal memory of a computing device), and persistent storage resources 116 (e.g., storage space located in an external storage device of the computing device such as a hard disk).
[0034] The user 120 can call various processing resources in the remote resource pool 110 to execute the target task 130. Before executing the target task 130, the user 120 needs to apply to the management system of the resource pool 110 in advance. With permission, the user 120 can use the requested processing resources to execute the target task 130. At present, a technical solution for managing resource allocation with time as the unit of measurement has been proposed. For example, the user 120 can apply to use a certain resource / certain resources within a predetermined time length, for example, can apply to use the processing resources in a processing device of a certain model. However, this solution cannot take into account the fluctuation of the number of processing resources required by the user, which may lead to waste of resources or insufficient resources.
[0035] At present, a technical solution for managing resource allocation based on the number of consumed resources has also been proposed. However, it is difficult for users to control the number of consumed resources, and the management system may stop providing services to users due to excessive consumption of resources, etc. Furthermore, different types of target tasks may require the use of different types and numbers of processing resources. At this time, users have to consider many factors when applying for processing resources, and then determine the corresponding resource application method. At this time, it is expected that a variety of processing resources that may be involved in the execution of tasks can be managed in a more effective and flexible way.
[0036] Summary of managing resource allocation
[0037] In order to at least partially address the deficiencies in the prior art, according to an exemplary implementation of the present disclosure, a method for managing resource allocation in a recommended scenario is proposed. In summary, multiple types of processing resources can be mapped to a unified general resource, and the allocation of multiple types of resources can be managed with the general resource as a unit. Figure 2 Describes an overview of an exemplary implementation according to the present disclosure, Figure 2 A block diagram 200 for managing resource allocation in a recommended scenario according to some implementations of the present disclosure is shown. Figure 2 As shown, processing resources 210 may include multiple types: computing resources 112, temporary storage resources 114, and persistent storage resources 116. Specifically, computing resources 112 may further include: computing resources based on general-purpose processors (e.g., central processing units CPUs), and computing resources based on special-purpose processors (e.g., graphics processors GPUs).
[0038] According to an example implementation of the present disclosure, multiple types of processing resources 210 may be mapped to a unified format of a general resource 220. At this time, when an application from a user 120 is detected, the general resource 220 of the requested quantity (e.g., expressed as a target quantity) may be allocated to the user 120 from the multiple processing resources. Here, the multiple processing resources may include computing resources 112, temporary storage resources 114, and persistent storage resources 116, and the general resource indicates at least any one of the multiple processing resources. In other words, when allocating processing resources to the user 120, it is not necessary to explicitly indicate which processing resource is allocated to the user, but the resource allocation may be managed using the general resource 220 as a unified unit of measurement.
[0039] Further, a resource configuration 230 may be received from the user 120, and the resource configuration 230 may specify a resource configuration 230 for executing a target task 240 of the user 120 using the general resources 220, and the resource configuration 230 may indicate a consumption speed of the general resources when executing the target task. Then, the target task 240 may be executed using at least a portion of the general resources 230 that match the resource configuration 230.
[0040] Using the example implementation of the present disclosure, when executing the target task 240, the user 120 does not have to consider the quantity of various types of processing resources required for different types of target tasks 240 separately, but can manage resource requests and allocations in a unified manner, and then execute the target task 240 according to the specified resource configuration 230 without having to understand many details of the target task 240.
[0041] Detailed process for managing resource allocation
[0042] An overview of managing resource configuration has been described, and below, more details of managing resource allocation in a recommended scenario are described with reference to the accompanying drawings. According to an example implementation of the present disclosure, a technical solution for managing resource allocation can be implemented in a remote resource management system. For example, a variety of pages can be provided in the remote resource management system to recommend a suitable resource allocation management method to the user. Using the example implementation of the present disclosure, the user does not have to care about the details of the task to be performed, nor does he have to define his own resource application technical solution based on the details. In this way, it is possible to directly apply for resources according to the recommendation of the remote resource management system and use the applied resources to perform processing tasks.
[0043] According to an exemplary implementation of the present disclosure, in a remote resource management system, an application for a general resource from a user may be received, and then a target amount of general resources may be allocated to the user. Figure 3A block diagram 300 for applying for a general resource according to some implementations of the present disclosure is shown. Figure 3 As shown, user 120 can Figure 3 The application page 310 shown is used to submit a request to the management system of the remote processing resource. Figure 3 As shown, user 120 can adjust the number of requested universal resources via control 320. Further, a service area (e.g., a geographic area) and a validity period can be set. According to an example implementation of the present disclosure, credits can be used to represent the number of universal resources, and the more credits a user has, the more overall number of processing resources a user can use. Credits can be obtained in a variety of ways, for example, a user can purchase, redeem, or otherwise apply for universal resources.
[0044] It should be understood that Figure 3 Only the outline of the application page is schematically shown. Alternatively and / or additionally, the application page 310 may include more or fewer items. Further, the basic unit of the application resource package may be defined based on the processing power required by the user. For example, for a small user, the basic unit of the points indicated by the basic control 320 may be "1 universal resource"; for a large user, the basic unit of the points indicated by the basic control 320 may be "10,000 universal resources", and so on. In this way, users of different sizes can be facilitated to obtain resources in quantities that meet their own needs.
[0045] According to an example implementation of the present disclosure, general resources can be represented by the number of processing resources that can be used within a predetermined time unit. For example, for computing resources, the processing power of a certain standard model of computing unit (e.g., CPU or GPU) in a predetermined time period can be used as a unit of measurement (e.g., expressed as 1PU / hour). For another example, for temporary storage resources, the storage capacity of a temporary memory that occupies 1T of capacity within a predetermined time period can be used as a unit of measurement (e.g., expressed as 1TMem / hour). For another example, for persistent storage resources, the storage capacity of a persistent memory that occupies 1T of capacity within a predetermined time period can be used as a unit of measurement (e.g., expressed as 1THd / hour).
[0046] According to an example implementation of the present disclosure, a mapping relationship between each processing resource and a general resource can be determined, so as to measure various types of processing resources in a unified manner. Specifically, the above mapping relationship can be determined based on the consumption when using various processing resources. For example, the mapping relationship can be determined based on factors such as the power consumption during the operation of the processing device, the wear and tear of the processing device, etc. Assuming that the general resource is represented by 1GU / hour, the mapping relationship between the general resource and the computing resource, the temporary storage resource, and the persistent storage resource can be determined respectively (for example, expressed as a ratio).
[0047] According to an example implementation of the present disclosure, the mapping relationship between various processing resources and general resources can be expressed as:
[0048]
[0049] In Formula 1, R1 represents the mapping relationship between computing resources and general resources, R2 represents the mapping relationship between temporary storage resources and general resources, and R3 represents the mapping relationship between persistent storage resources and general resources. Assuming that the consumption when using computing resources is the largest, the consumption when using temporary processing resources is in the middle, and the consumption when using persistent storage resources is the lowest, the order of each mapping relationship can be determined based on the above relationship. For example, the mapping relationship can meet the following conditions: R1>R2>R3. For example, R1, R2, and R3 can be expressed as 0.1, 0.05, and 0.02, respectively, that is, the computing power of the standard model processing unit in 1 hour will be mapped to 0.1 general resources, the storage capacity of the 1T temporary storage unit in 1 hour will be mapped to 0.05 general resources, and the storage capacity of the 1T persistent storage unit in 1 hour will be mapped to 0.02 general resources.
[0050] Assuming that user 120 has applied for 1 general resource, the user can use the standard computing unit for a time length of 1 / 0.1=10 hours, can use 1T temporary storage resources for a time length of 1 / 0.05=20 hours, and can use 1T persistent storage resources for a time length of 1 / 0.02=50 hours. It should be understood that although the above shows the time length when the user only uses a single type of processing resource, alternatively and / or additionally, different types of processing resources can be used simultaneously or successively in time, and the sum of the various processing resources used does not exceed 1 general resource.
[0051] It should be understood that the above mapping relationship is only schematic, and alternatively and / or additionally, the mapping relationship can be determined in other ways. For example, the positions of the numerator and denominator in Formula 1 can be exchanged, and the mapping relationship obtained at this time will be inversely proportional to Formula 1. For another example, when the consumption involved in various processing resources is different, each mapping relationship can have different specific values. Using the example implementation of the present disclosure, the quantity of different processing resources can be measured separately in a simple and effective way, thereby facilitating the management of resource allocation in a unified manner.
[0052] The mapping relationship between various processing resources and general resources has been described. Hereinafter, how to call general resources to perform a target task will be described in detail. According to an example implementation of the present disclosure, in order to perform a target task, a predicted number of general resources to be consumed by performing the target task may be first determined. Further, when it is determined that the predicted number is not higher than the target number of general resources that have been allocated to the user, the general resources may be called to perform the target task.
[0053] It should be understood that the target task usually does not consume all the general resources that have been allocated to the user 120. At this time, at least a portion of the general resources that match the resource configuration can be determined, and then the at least a portion of the general resources can be used to perform the target task. In this way, it can be ensured that the user only uses the processing resources that have been allocated to himself, and does not occupy other unallocated resources in the resource pool, thereby interfering with the use experience of other users.
[0054] Figure 4 A block diagram 400 for determining a predicted quantity of a common resource according to some implementations of the present disclosure is shown. Figure 4 As shown, in order to determine the predicted number 420 of general resources to be consumed for executing the target task 240, the target task 240 can be parsed to determine the predicted number of each processing resource in the plurality of processing resources to be consumed for executing the target task 240. Specifically, for the computing resources 112, it is assumed that the target task 240 needs to occupy 2 standard processing units and the time length is 10 hours; for the temporary storage resources 114, it is assumed that the target task 240 needs to occupy 4TMem and the time length is 10 hours; for the persistent storage resources 116, it is assumed that the target task 240 needs to occupy 100THd and the time length is 10 hours.
[0055] At this time, the predicted number of general resources to be consumed by executing the target task 420 can be determined based on the predicted number of each processing resource and the mapping relationship between the general resources and each processing resource. For example, the predicted number for each processing resource can be determined based on the mapping relationship described above, and then the predicted number of all general resources required 420 can be determined. Figure 4 As shown, for the computing resources 112, the temporary storage resources 114, and the persistent storage resources 116, the predicted quantities 412, 414, and 416 may be determined based on the following formula 2, respectively:
[0056] E1=2*10*0.1=2
[0057] E2=4*10*0.05=2
[0058] E3=100*10*0.02=20
[0059] Formula 2
[0060] In the above formula, E1 represents the predicted number 412 for computing resources 112, E2 represents the predicted number 414 for temporary storage resources 114, and E3 represents the predicted number 416 for temporary storage resources 116. Further, the predicted number 420 of all required general resources can be determined based on the sum of the predicted numbers 412, 414, and 416. That is, in the 10 hours of processing the target task, 2+2+20=24 general resources need to be consumed (an average of 2.4 general resources per hour). Using the example implementation of the present disclosure, multiple types of processing resources can be managed in a simpler and more efficient manner, thereby reducing the complexity of resource allocation.
[0061] According to an example implementation of the present disclosure, if it is determined that the predicted quantity 420 is not higher than the target quantity of the general resources that have been allocated to the user, the user may be allowed to use the allocated general resources to execute the target task 240. Specifically, at least a portion of general resources that match the resource configuration may be determined from the general resources, so as to call the at least a portion of the general resources to execute the target task 240. For example, each processing resource may be selected from a plurality of processing resources according to the consumption speed of the general resources indicated by the resource configuration.
[0062] See also Figure 5 Describes more details about resource configuration. Figure 5 A block diagram 500 for specifying resource configuration according to some implementations of the present disclosure is shown. Figure 5 As shown, in the designated page 510, the user can specify the resource configuration. For example, the following can be recommended to the user: Figure 5 The multiple predefined resource configurations shown consume common resources at a rate from small to large. The user can select from the multiple recommended resource configurations based on interaction 520 to specify the consumption rate of the common resources when executing the target task using the common resources.
[0063] like Figure 5As shown, the XS mode can specify that the target task is executed at a speed of consuming 1 general resource per hour, the S mode can specify that the target task is executed at a speed of consuming 2 general resources per hour, the M mode can specify that the target task is executed at a speed of consuming 4 general resources per hour, ..., the 2XL mode can specify that the target task is executed at a speed of consuming 32 general resources per hour, etc. In this way, it is possible to select the desired resource configuration according to the speed requirement for executing the target task, thereby introducing a more flexible and customizable factor in the resource allocation process.
[0064] According to an example implementation of the present disclosure, if it is determined that the predicted quantity is higher than the target quantity, a message indicating that the general resources are insufficient may be provided to the user. For example, the message may be provided in an alert page to remind the user that the currently available general resources are insufficient and to suggest that the user apply for additional general resources. By using the example implementation of the present disclosure, it is possible to avoid the situation where insufficient resources occur during the execution of the target task, making it difficult to perform subsequent processing and thus affecting the user's ability to obtain the desired result.
[0065] In the event that it has been determined that the predicted number 420 is not higher than the target number of general resources that have been allocated to the user, various processing resources may be selected for performing the target task at a speed specified by the user. Figure 4 The predicted quantities 412, 414 and 416 shown can select idle resources from the resource pool to perform the target task. At this time, the quantity of various processing resources provided in each hour can be determined according to the consumption ratio of various resources. Further, the selected processing resources can be used to perform the target task.
[0066] In the above example, 2.4 general resources will be consumed per hour. Assuming that the user specifies M mode or other modes with higher speed, the target task can be executed at the expected speed. If the user specifies XS mode or S mode, the speed of providing various processing resources will be lower than the expected speed. In this way, the speed of executing the target task can be limited to a certain extent, thereby avoiding the exhaustion or long-term idleness of various processing resources in the resource pool due to the imbalance of task execution. In this way, it is easy to balance the workload of the resource pool and reduce the occurrence of unbalanced states such as peaks and troughs.
[0067] According to an exemplary implementation of the present disclosure, in addition to Figure 5 In the case of specifying a single resource configuration as shown, the user may be allowed to specify a range of resource configurations. Alternatively and / or additionally, the user may be allowed to specify resource configurations based on the type of target task, or resource configurations may be automatically recommended based on the type of target task. Figure 6 Describes the scope of the setting in more detail. Figure 6 A block diagram 600 for specifying resource configuration for a data management task is shown in accordance with some implementations of the present disclosure.
[0068] like Figure 6 As shown, in dialog boxes 620 and 630, the user can specify resource configuration of data management type tasks. Specifically, data management type tasks can be further subdivided into archiving tasks, statistical verification tasks, pre-processing tasks, etc. Pre-processing tasks can be further subdivided into batch tasks based on batch processing, and streaming tasks based on streaming processing. Resource configuration of different types of data management tasks can be specified in dialog boxes 620 and 630, respectively.
[0069] For example, you can specify that the archiving task is performed using the "saving first (e.g., giving priority to saving resources)" mode, and the minimum and maximum resource consumption speeds are M and 4XL respectively; you can specify that the statistical verification task is performed using the "speed first (e.g., giving priority to the speed of obtaining results)" mode, and the minimum and maximum resource consumption speeds are M and 2XL respectively; and you can specify that the batch preprocessing task is performed using the "saving first" mode, and the minimum and maximum resource consumption speeds are M and 4XL respectively. Further, you can specify that the streaming batch processing task is performed using the "saving first" mode, and the resource consumption speed is M.
[0070] In the context of the present disclosure, the target task may further include a feature engineering task, a model training task, a model reasoning task, and the like. Figure 7 A block diagram 700 for specifying resource configuration for a feature engineering task according to some implementations of the present disclosure is shown. Feature engineering refers to the process of converting raw data into features that can better express the essence of the problem, so that applying these features to the prediction model can improve the model prediction accuracy for unseen data. Figure 7 As shown, the "saving priority" mode can be specified in the configuration page 710, and the minimum and maximum values of the resource consumption speed are M and 2XL respectively.
[0071] Figure 8 A block diagram 800 for specifying resource configuration for a model training task according to some implementations of the present disclosure is shown. Figure 8 As shown, the model training process can be specified in the configuration page 810. For the batch training stage, the "saving priority" mode can be specified, and the resource consumption rate of each node involved in the training process is set to L. At this time, the consumption rate of general resources is 16 / hour. For the streaming training stage, the "saving priority" mode can be specified, and the resource consumption rate of each node involved in the training process is set to L. At this time, the consumption rate of general resources is 16 / hour.
[0072] Alternatively and / or additionally, the target task can be divided into an offline task and an online task according to the real-time requirements of the target task. For example, since offline tasks usually do not require real-time feedback, a lower speed range can be set for offline tasks, thereby achieving the purpose of saving general resources. For another example, a higher speed range can be set for online tasks so that more general resources can be called to execute online tasks, thereby increasing the speed of outputting results.
[0073] By using the example implementation of the present disclosure, users can customize the mode and speed of resource configuration according to their own needs, thereby facilitating a more flexible and effective resource management and allocation process.
[0074] According to an example implementation of the present disclosure, after various resources have been provided to perform the target task, the target number of general resources allocated to the user can be updated based on the number of general resources that have been used to perform the target task (that is, the number of at least a portion of the general resources determined above). In other words, the used portion needs to be deducted from the available general resources that have been allocated to the user.
[0075] Continuing with the above example, assuming that the user has applied for 120 general resources in advance and 24 general resources are consumed when executing the target task, the current number of general resources available to the user at this time can be updated to: 120-24=96. According to an example implementation of the present disclosure, the current number of available general resources can be updated at predetermined time intervals. For example, in the above example, 2.4 general resources can be deducted from the current number every hour. For another example, the current number of available general resources can be updated in real time. Assuming that another task of a subsequent user occupies 20 general resources, the current number of general resources available to the user at this time can be further updated to: 96-20=76.
[0076] By using the example implementation of the present disclosure, the number of currently available general resources of the user can be updated in real time according to the usage status of the general resources. In this way, it is convenient to manage various processing resources in the resource pool in a more effective way, thereby meeting the needs of different users.
[0077] According to an example implementation of the present disclosure, the status data of the general resources can be provided to the user so that the user can fully understand the status of the general resources applied by the user. The status data includes at least one of the following: the total amount of the general resources, the used part of the general resources, the unused part of the general resources, the cumulative consumption of the general resources, the daily consumption of the general resources, etc.
[0078] Fig. 9A block diagram 900 for presenting the status of a general resource according to some implementations of the present disclosure is shown. The general resources requested by the user each time can be regarded as a resource package, and Fig. 9 As shown, the status data of each resource package can be presented in the status page 910. Specifically, the resource package ID can represent a unique identifier of the universal resource for each application. The status can indicate whether the resources in the resource package have been effective or invalid. The consumed / total amount can represent the ratio between the used part of the resource package and the total amount of all resources, for example, the ratio can be expressed as a percentage; for another example, the ratio can be directly expressed as a fraction (such as, 24 / 120), where 24 represents the resources that have been consumed and 120 represents the total resources allocated at the time of application.
[0079] According to an example implementation of the present disclosure, a general resource may have a predetermined validity period (e.g., 1 year, half a year, 1 month, etc.). At this time, the status data may further include: an application time, used to indicate the time when the user submits the application; and an expiration time, used to indicate the time when the general resource expires. Further, the interval between the current time and the allocation time when the general resource is allocated can be determined, and the interval can be presented in the countdown field, that is, how long after which the general resource will expire. According to an example implementation of the present disclosure, it can be determined whether the countdown meets a predetermined condition (e.g., the countdown is less than or equal to 14 days, or other time interval). When the predetermined condition is met, a message indicating that the general resource is about to expire can be provided.
[0080] exist Fig. 9 In the example, the resource package with ID "1100" will expire in 10 days. Since 10<14, a message that the resource package is about to expire can be provided to the user. For example, the user can be prompted by bold, highlight, flash, sending a message, etc. After receiving the prompt, the user can give priority to using the resources that are about to expire to perform the target task, can reset the resource configuration to increase the resource consumption rate, and so on. Furthermore, areas where resources can be called can be provided, such as different geographical areas. In this way, it is convenient for users to manage their own general resources in a timely manner and avoid affecting the normal operation of users due to resource expiration.
[0081] According to an example implementation of the present disclosure, when it is determined that the general resources allocated to the user have reached a predetermined validity period, the unused portion of the general resources allocated to the user is recycled. Using the example implementation of the present disclosure, resources in the resource pool that have not been called for a long time can be continuously detected and recycled. In this way, it is convenient to improve the management efficiency of various processing resources in the resource pool, thereby enabling other users to obtain available processing resources in the resource pool in a timely manner.
[0082] According to an example implementation of the present disclosure, a user is allowed to customize a monitoring strategy, and various alarm situations are handled in a timely manner according to the monitoring strategy. For example, the monitoring strategy may include, but is not limited to: the unused portion of the general resource reaches a predetermined amount, the proportion of the unused portion of the general resource reaches a predetermined proportion, and the consumption rate of the general resource exceeds a predetermined threshold, etc.
[0083] Fig.10 A block diagram 1000 for monitoring general resource consumption of an application according to some implementations of the present disclosure is shown. Fig.10 As shown, the monitoring policy can be presented in the monitoring page 1010. The monitoring page 1010 can present information of multiple monitoring policies that have been set. For example, the rule name can represent the rule that the user has set; the monitoring application can represent the application where the target task is located; the monitoring cycle can represent the predetermined time interval for performing the monitoring action; the used / alarm value can represent the relationship between the number of common resources used by the current application and the alarm value set by the user; and the operation can represent the operation performed for the current monitoring policy. It should be understood that Fig.10 Examples of various monitoring strategies are only schematically shown. Alternatively and / or additionally, the user may set more or fewer strategies according to his / her own needs, so as to fully grasp the status of his / her own resources and target tasks.
[0084] According to an example implementation of the present disclosure, more details about resource consumption may be provided. Fig.11 A block diagram 1100 for counting general resource consumption according to some implementations of the present disclosure is shown. Fig.11 As shown, in the statistics page 1110, statistical information of daily resource consumption can be provided. Alternatively and / or additionally, cumulative resource consumption can be further provided. In this way, it is convenient for users to understand resource consumption in different historical time periods, and then it is convenient for users to apply for additional resources in time when resources are insufficient.
[0085] According to an example implementation of the present disclosure, the status of each target task can be provided to the user. The status of the target task includes at least one of the following: category, service type, change item, change content, change status, operation time, operator, etc. of the target task. Fig.12 A block diagram 1200 for changing resource configuration according to some implementations of the present disclosure is shown. Fig.12 As shown, the status of each target task can be provided in the management page. Specifically, the application name can indicate the name of the application where the executed target task is located, the module can indicate which module the target task is called by, and so on.
[0086] According to an example implementation of the present disclosure, the state of each target task is allowed to be changed by the user. Specifically, in response to receiving a request from the user, the state of the target task can be updated. Fig.12 , the change item may indicate the item that the user desires to modify, the change content may indicate the original setting and the destination setting of the change item, the status may indicate whether the current change is successful, the time may indicate the time when the change is started, and the change person may indicate the person who triggers the change operation.
[0087] By using the example implementation of the present disclosure, users can view and adjust the various states of their respective target tasks in real time, and can adjust the states in a timely manner when necessary, so as to execute the target tasks in a manner that better matches the user's expectations. Furthermore, the remote resource management system can conveniently understand the latest state of each target task, so as to adjust the configuration strategy of the resource pool accordingly with finer granularity.
[0088] The technical solution for managing resource allocation has been described above. Using the example implementation of the present disclosure, users do not need to care about the specific details of each task to be performed, nor do they need to determine the type and quantity of processing resources that each task needs to consume one by one. Instead, they can manage the computing resources, temporary storage resources, and persistent storage resources that may need to be consumed in a unified manner. Further, using the example implementation of the present disclosure, the corresponding resources are deducted from the resource package only after the common resources in the applied resource package have been consumed. In this way, the resources in the resource package will not be consumed if they are not consumed. In this way, it is convenient for users to consume various resources flexibly.
[0089] Furthermore, after converting the usage of different types of processing resources into unified general resources, it can be ensured that users can make the most of the resources they apply for. In other words, there is no situation where various storage resources have been exhausted but there are still a lot of computing resources. In this way, it can be avoided that users cannot continue to use remote resources or need to reapply for exhausted resources.
[0090] Example Process
[0091] Fig.13A flow chart of a method 1300 for managing resource allocation in a recommendation scenario according to some implementations of the present disclosure is shown. At box 1310, a target number of general resources are allocated to a user from a plurality of processing resources, the plurality of processing resources including computing resources, temporary storage resources, and persistent storage resources, and the general resources indicate at least any one of the plurality of processing resources. At box 1320, a resource configuration is received from the user for specifying the use of the general resources to perform a target task of the user, the resource configuration indicating a consumption rate of the general resources when performing the target task. At box 1330, the target task is performed using at least a portion of the general resources that match the resource configuration.
[0092] According to an example implementation of the present disclosure, executing a target task includes: determining a predicted number of general resources that will be consumed to execute the target task; in response to determining that the predicted number is not higher than the target number, determining at least a portion of the general resources that match the resource configuration; and calling at least a portion of the general resources to execute the target task.
[0093] According to an example implementation of the present disclosure, determining the predicted number of general resources that will be consumed to execute a target task includes: parsing the target task to determine the predicted number of each processing resource among a plurality of processing resources that will be consumed to execute the target task; and determining the predicted number of general resources that will be consumed to execute the target task based on the predicted number of each processing resource and a mapping relationship between each processing resource and the general resources.
[0094] According to an example implementation of the present disclosure, calling at least a portion of general resources to execute a target task includes: selecting individual processing resources from a plurality of processing resources according to a consumption rate of the general resources indicated by a resource configuration; and executing the target task using the selected individual processing resources.
[0095] According to an example implementation of the present disclosure, the method 1300 further includes: updating the target quantity based on the quantity of at least a portion of the common resources.
[0096] According to an example implementation of the present disclosure, the general resource is represented by the amount of processing resources that can be used within a predetermined time unit.
[0097] According to an example implementation of the present disclosure, the method 1300 further includes: providing status data of general resources to the user, the status data including at least any one of the following: the total amount of general resources, the used portion of general resources, the unused portion of general resources, the cumulative consumption of general resources, and the daily consumption of general resources.
[0098] According to an example implementation of the present disclosure, the method 1300 further includes: providing an alert message to a user in response to detecting at least any one of the following: the unused portion of the general resources reaches a predetermined number, the proportion of the unused portion of the general resources reaches a predetermined proportion, and the consumption rate of the general resources exceeds a predetermined threshold.
[0099] According to an example implementation of the present disclosure, the general resource of method 1300 has a predetermined validity period, and the method 1300 further includes: determining the interval between the current time and the allocation time when the general resource is allocated; and in response to determining that the interval exceeds the validity period, reclaiming the unused portion of the general resource allocated to the user.
[0100] According to an example implementation of the present disclosure, a general resource has a predetermined validity period, and the method further includes: determining an interval between a current time and an allocation time at which the general resource is allocated; and in response to determining that a difference between the interval and the validity period satisfies a predetermined condition, providing a message indicating that the general resource is about to expire.
[0101] According to an example implementation of the present disclosure, the method 1300 further includes: providing a status of the target task, the status of the target task including at least any one of the following: category of the target task, service type, change item, change content, change status, operation time, and operator.
[0102] According to an example implementation of the present disclosure, the method 1300 further includes: in response to receiving a request from a user, updating the status of the target task, wherein the category of the target task includes at least any one of the following: an offline task, an online task.
[0103] According to an example implementation of the present disclosure, the method 1300 is implemented in a remote resource management system, and allocating universal resources to users includes: in the remote resource management system, in response to receiving an application for universal resources from a user, allocating a number of universal resources to the user.
[0104] According to an example implementation of the present disclosure, the method 1300 further includes: in response to determining that the predicted quantity is higher than the target quantity, providing a message to the user indicating that the general resource is insufficient.
[0105] Example devices and equipment
[0106] Fig.14A block diagram of an apparatus 1400 for managing resource allocation in a recommendation scenario according to some implementations of the present disclosure is shown. The apparatus 1400 includes: an allocation module 1410, configured to allocate a target number of general resources to a user from a plurality of processing resources, the plurality of processing resources including computing resources, temporary storage resources, and persistent storage resources, and the general resources indicate at least any one of the plurality of processing resources; a receiving module 1420, configured to receive from a user a resource configuration for specifying the use of general resources to perform a target task of the user, the resource configuration indicating a consumption speed of the general resources when performing the target task; and an execution module 1430, configured to use at least a portion of the general resources that match the resource configuration to perform the target task.
[0107] According to an example implementation of the present disclosure, the execution module 1430 includes: a prediction module, configured to determine a predicted number of general resources that will be consumed to execute a target task; a determination module, configured to determine at least a portion of the general resources that match the resource configuration in response to determining that the predicted number is not higher than the target number; and a calling module, configured to call at least a portion of the general resources to execute the target task.
[0108] According to an example implementation of the present disclosure, a determination module includes: a parsing module configured to parse a target task to determine a predicted quantity of each processing resource among a plurality of processing resources to be consumed for executing the target task; and a predicted quantity determination module configured to determine the predicted quantity of general resources to be consumed for executing the target task based on the predicted quantity of each processing resource and a mapping relationship between each processing resource and general resources.
[0109] According to an example implementation of the present disclosure, the calling module includes: a selection module configured to select individual processing resources from multiple processing resources according to the consumption rate of the general resources indicated by the resource configuration; and a utilization module configured to utilize the selected individual processing resources to perform the target task.
[0110] According to an exemplary implementation of the present disclosure, the apparatus 1400 further includes: an updating module configured to update the target quantity based on the quantity of at least a portion of the common resources.
[0111] According to an example implementation of the present disclosure, the general resource is represented by the amount of processing resources that can be used within a predetermined time unit.
[0112] According to an example implementation of the present disclosure, the device 1400 further includes: a providing module, configured to provide status data of general resources to the user, the status data including at least any one of the following: the total amount of general resources, the used portion of the general resources, the unused portion of the general resources, the cumulative consumption of the general resources, and the daily consumption of the general resources.
[0113] According to an example implementation of the present disclosure, the device 1400 further includes: an alarm module, configured to provide an alarm message to a user in response to detecting at least any one of the following: the unused portion of the general resources reaches a predetermined number, the proportion of the unused portion of the general resources reaches a predetermined proportion, and the consumption rate of the general resources exceeds a predetermined threshold.
[0114] According to an example implementation of the present disclosure, the general resource has a predetermined validity period, and the device further includes: an interval determination module, configured to determine the interval between the current time and the allocation time when the general resource is allocated; and a recycling module, configured to reclaim an unused portion of the general resource allocated to the user in response to determining that the interval exceeds the validity period.
[0115] According to an example implementation of the present disclosure, the general resource has a predetermined validity period, and the device further includes: an interval determination module, configured to determine the interval between the current time and the allocation time to which the general resource is allocated; and a reminder module, configured to provide a message indicating that the general resource is about to expire in response to determining that the difference between the interval and the validity period meets a predetermined condition.
[0116] According to an example implementation of the present disclosure, the device 1400 further includes: a status providing module, configured to provide the status of the target task, the status of the target task including at least any one of the following: category of the target task, service type, change item, change content, change status, operation time, and operator.
[0117] According to an example implementation of the present disclosure, the device 1400 further includes: a task status update module, configured to update the status of a target task in response to receiving a request from a user, wherein the category of the target task includes at least any one of the following: an offline task, an online task.
[0118] According to an example implementation of the present disclosure, the device 1400 is implemented in a remote resource management system, and the allocation module includes: a remote allocation module configured to allocate a number of general resources to a user in the remote resource management system in response to receiving an application for general resources from the user.
[0119] According to an example implementation of the present disclosure, the apparatus 1400 further includes: a reminder module configured to provide a message indicating that the general resource is insufficient to the user in response to determining that the predicted quantity is higher than the target quantity.
[0120] Fig.15 1 shows a block diagram of a device 1500 capable of implementing multiple implementations of the present disclosure. It should be understood that Fig.15 The computing device 1500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the implementations described herein. Fig.15 The computing device 1500 shown may be used to implement the methods described above.
[0121] like Fig.15 As shown, computing device 1500 is in the form of a general-purpose computing device. Components of computing device 1500 may include, but are not limited to, one or more processors or processing units 1510, memory 1520, storage device 1530, one or more communication units 1540, one or more input devices 1550, and one or more output devices 1560. Processing unit 1510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in memory 1520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to increase the parallel processing capabilities of computing device 1500.
[0122] The computing device 1500 typically includes a plurality of computer storage media. Such media may be any available media accessible to the computing device 1500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1520 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the computing device 1500.
[0123] The computing device 1500 may further include additional removable / non-removable, volatile / non-volatile storage media. Fig.15As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. Memory 1520 may include a computer program product 1525 having one or more program modules that are configured to perform various methods or actions of various implementations of the present disclosure.
[0124] The communication unit 1540 enables communication with other computing devices via a communication medium. Additionally, the functions of the components of the computing device 1500 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 1500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0125] Input device 1550 may be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 1560 may be one or more output devices, such as a display, speaker, printer, etc. Computing device 1500 may also communicate with one or more external devices (not shown) as needed, such as storage devices, display devices, etc., through communication unit 1540, with one or more devices that allow a user to interact with computing device 1500, or with any device that allows computing device 1500 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0126] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, the computer program product is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0127] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0128] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0129] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0130] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0131] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A method for managing resource allocation in a recommendation scenario, comprising: allocating a target number of general-purpose resources to a user from a plurality of processing resources, the plurality of processing resources comprising computing resources, temporary storage resources, and persistent storage resources, and the general-purpose resource indicating at least any one of the plurality of processing resources; receiving from the user a resource configuration for specifying the use of the general resource to execute the user's target task, the resource configuration indicating a consumption rate of the general resource when executing the target task; as well as Utilizing at least a portion of the general resources that match the consumption speed indicated by the resource configuration to execute the target task includes: Determine the predicted amount of common resources that will be consumed to perform the target task, including: Parse the target task to determine which of the plurality of processing resources is used The predicted amount of each processing resource that will be consumed in executing the target task; and Determining the predicted number of general resources to be consumed in executing the target task based on the predicted number of each processing resource and the ratio between the number of each processing resource and the number of general resources; In response to determining that the predicted quantity is not greater than the target quantity, determining the at least a portion of the general-purpose resources that match a consumption rate indicated by the resource configuration; and Calling at least a portion of the general resources to execute the target task.
2. The method according to claim 1, wherein calling the at least a portion of the general resources to perform the target task comprises: selecting the respective processing resource from the plurality of processing resources in accordance with the consumption rate of the general purpose resource indicated by the resource configuration; as well as The target task is executed by using the selected processing resources.
3. The method according to claim 1, further comprising: The target quantity is updated based on the quantity of the at least a portion of the general purpose resources. The method according to claim 1 , wherein the general resource is represented by the amount of processing resources that can be used within a predetermined time unit.
5. The method according to claim 1, further comprising: The status data of the universal resource is provided to the user, wherein the status data includes at least any one of the following: the total amount of the universal resource, the used portion of the universal resource, the unused portion of the universal resource, the cumulative consumption of the universal resource, and the daily consumption of the universal resource.
6. The method according to claim 1, further comprising: In response to detecting at least any one of the following: the unused portion of the common resource reaches a predetermined amount, the proportion of the unused portion of the common resource reaches a predetermined proportion, and the consumption speed of the common resource exceeds a predetermined threshold, an alert message is provided to the user.
7. The method according to claim 1, wherein the generic resource has a predetermined validity period, and the method further comprises: determining an interval between a current time and an allocation time at which the general resource is allocated; as well as In response to determining that the interval exceeds the validity period, an unused portion of the general purpose resource allocated to the user is reclaimed.
8. The method according to claim 1, wherein the generic resource has a predetermined validity period, and the method further comprises: determining an interval between a current time and an allocation time at which the general resource is allocated; as well as In response to determining that a difference between the interval and the validity period satisfies a predetermined condition, a message is provided indicating that the generic resource is about to expire.
9. The method according to claim 1, further comprising: The status of the target task is provided, and the status of the target task includes at least any one of the following: the category, service type, change item, change content, change status, operation time, and operator of the target task.
10. The method according to claim 1, further comprising: In response to receiving a request from the user, the state of the target task is updated, wherein the state of the target task includes a category of the target task, and the category of the target task includes at least one of the following: an offline task and an online task.
11. The method according to claim 1, wherein the method is implemented in a remote resource management system, and allocating the general resource to the user comprises: In the remote resource management system, in response to receiving an application for the general resource from the user, the general resource in the quantity is allocated to the user.
12. The method according to claim 1, further comprising: In response to determining that the predicted amount is higher than the target amount, a message is provided to the user indicating that the generic resource is insufficient.
13. An apparatus for managing resource allocation in a recommendation scenario, comprising: an allocation module configured to allocate a target number of general resources to a user from a plurality of processing resources, the plurality of processing resources comprising computing resources, temporary storage resources, and persistent storage resources, and the general resource indicating at least any one of the plurality of processing resources; A receiving module configured to receive from the user a resource configuration for specifying the use of the general resource to execute the user's target task, wherein the resource configuration indicates a consumption speed of the general resource when executing the target task; An execution module is configured to execute the target task by utilizing at least a portion of the general resources that match the consumption speed indicated by the resource configuration, and the execution module includes: A prediction module is configured to determine a predicted amount of general resources to be consumed in executing the target task, the prediction module comprising: a parsing module configured to parse the target task to determine a predicted number of each of the plurality of processing resources to be consumed for executing the target task; and a predicted quantity determination module, configured to determine the predicted quantity of general resources to be consumed in executing the target task based on the predicted quantity of each processing resource and the ratio between the quantity of each processing resource and the quantity of the general resources; a determining module configured to, in response to determining that the predicted quantity is not higher than the target quantity, determine the at least a portion of the general resources that match the consumption speed indicated by the resource configuration; and The calling module is configured to call at least a part of the general resources to execute the target task.
14. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.
15. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Unified management method and device for computing resources, computer equipment and storage medium
CN112698952A