Method for creating computing power container, computing power platform, electronic device and storage medium
By using affinity task cache in cloud technology to determine the appropriate resource pool and create computing power containers, the problem of computing power fragmentation in dynamic task scenarios is solved, and efficient utilization of resources and stable operation of tasks is achieved.
Patent Information
- Application Number
- CN202110397131.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-13
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-04-13
AI Technical Summary
The existing technology is difficult to effectively reduce the fragmentation of computing power in dynamic task scenarios, resulting in unbalanced resource allocation and unable to meet the users' dynamic task needs.
Obtain the target task through affinity task cache, and determine the appropriate resource pool in the task resource pool in multiple time periods according to the task time period, create a computing power container, thereby regularizing the computing power resource pool from the time dimension and avoiding resources Fragmentation.
It realizes the reduction of computing power fragmentation from the time dimension, improves the utilization rate of computing power resources, ensures that tasks run in a suitable resource pool, and avoids resource shortage and accumulation problems.
Smart Images

Figure CN113703936B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of cloud technology, and in particular to the field of big data processing of cloud technology, and more specifically, to a method for creating a computing power container, a computing power platform, an electronic device, and a storage medium. Background Art
[0002] To date, the industry's main technical solutions for "reducing computing power fragmentation" are: after users submit AI training, in order to meet user needs from a resource perspective, a saturation-first algorithm is usually used, that is, to reduce computing power fragmentation from a resource perspective and prioritize the allocation of fragmented computing power devices; however, the saturation-first algorithm is effective for resource scenarios of static production delivery in terms of resource allocation, while for task-based dynamic scenarios, even if the user's needs are met according to the saturation-first packaging, fragmentation will still occur.
[0003] Therefore, in view of diversified resource allocation scenarios, the field urgently needs a more efficient method for creating computing power containers. Summary of the invention
[0004] The embodiments of the present application provide a method for creating a computing power container, a computing power platform, an electronic device, and a storage medium, which can regularize the computing power resource pool from the dimension of time, avoid the computing power resource pool from being broken up in time granularity, and reduce computing power fragmentation.
[0005] On the one hand, an embodiment of the present application provides a method for creating a computing power container, which is applied to a computing power platform; comprising:
[0006] Get the target task through the affinity task cache;
[0007] By using the affinity task cache, according to the time period of the target task, a first resource pool corresponding to the target task is determined from N affinity task resource pools corresponding to N time periods respectively; N>1;
[0008] A computing power container is created for the target task in the first resource pool.
[0009] On the other hand, an embodiment of the present application provides a computing power platform, including:
[0010] An acquisition unit, used to acquire a target task through an affinity task cache;
[0011] A determination unit, configured to determine, through the affinity task cache, a first resource pool corresponding to the target task from N affinity task resource pools corresponding to N time periods respectively according to the time period of the target task; N>1;
[0012] A creation unit is used to create a computing power container for the target task in the first resource pool.
[0013] On the other hand, an embodiment of the present application provides an electronic device, including:
[0014] a processor adapted to execute a computer program;
[0015] A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method of the first aspect or the method of the second aspect is implemented.
[0016] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are read and executed by a processor of a computer device, the computer device executes the method of the first aspect or the method of the second aspect.
[0017] In the method for creating a computing power container provided in the present application, a target task is obtained through an affinity task cache; through the affinity task cache, a first resource pool corresponding to the target task is determined from N affinity task resource pools corresponding to N time periods according to the time period of the target task; N>1; and a computing power container is created for the target task in the first resource pool.
[0018] In other words, the present application determines the affinity task resource pool corresponding to the target task, that is, the first resource pool, through the affinity task cache, and creates a computing power container for the target task in the first resource pool; on the one hand, since the N affinity task resource pools correspond to N time periods respectively, the computing power resource pool can be regularized from the time dimension; on the other hand, by using the affinity task cache to determine the first resource pool corresponding to the target task in the N affinity task resource pools according to the time period of the target task, the target task can be run in the corresponding affinity task resource pool, avoiding computing power fragmentation caused by excessive differences in the running time of multiple tasks, thereby reducing computing power fragmentation from the time dimension.
[0019] In addition, reducing computing power fragmentation from a time dimension is conducive to the overall activation of computing power resources, and can avoid the situation where the total computing power resources of the computing power platform are sufficient at a certain moment, but the computing power resources of a certain task resource pool cannot meet the user's task requirements.
[0020] In short, the method for creating a computing power container provided in this application can regularize the computing power resource pool from the time dimension, thereby reducing the fragmentation of computing power from the time dimension. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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 will be briefly introduced below. Obviously, the drawings described below are 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 work.
[0022] Figure 1 This is an example of the system framework provided in the embodiments of the present application.
[0023] Figure 2 It is a schematic flowchart of the method for creating a computing power container provided in an embodiment of the present application.
[0024] Figure 3 It is another schematic flowchart of the method for creating a computing power container provided in an embodiment of the present application.
[0025] Figure 4 It is another schematic flowchart of the method for creating a computing power container provided in an embodiment of the present application.
[0026] Figure 5 It is a schematic block diagram of the computing power platform provided in an embodiment of the present application.
[0027] Figure 6 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] 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 only 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.
[0029] The solution provided in this application may involve artificial intelligence technology.
[0030] Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0031] It should be understood that artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0032] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0033] The embodiments of the present application may also involve machine learning (ML) in artificial intelligence technology. ML is a multi-disciplinary cross-discipline involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching.
[0034] In addition, the solution provided in this application may involve cloud technology, especially cloud technology big data processing; specifically, it may involve computing power resource pooling technology in cloud technology.
[0035] Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing refers to the delivery and use model of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0036] With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model from a conceptual perspective.
[0037] Big data refers to a collection of data that cannot be captured, managed, and processed by conventional software tools within a certain time frame. It is a massive, high-growth, and diverse information asset that requires new processing models to have stronger decision-making power, insight discovery, and process optimization capabilities. With the advent of the cloud era, big data has also attracted more and more attention. Big data requires special technologies to effectively process large amounts of data within a tolerable time frame. Technologies applicable to big data include large-scale parallel processing databases, data mining, distributed file systems, distributed databases, cloud computing platforms, the Internet, and scalable storage systems.
[0038] Computing resource pooling technology uses software technology to achieve unified management of hardware resources, transforming computing resources from hardware definition to software definition, and realizing flexible scheduling of computing resources. Through computing resource pooling technology, users can efficiently schedule and use chip resources in the data center, improve computing power utilization, and reduce fragmentation and computing power costs.
[0039] Figure 1 It is an example of the system framework 100 provided in an embodiment of the present application.
[0040] like Figure 1 As shown, the system framework 100 may include a task submission module 110, a task container list module 160, a computing resource pool 101, and a data center 150. Among them, the computing resource pool 101 includes an affinity task cache 120, an affinity task resource pool 1 to an affinity task resource pool N, and a shared cache resource pool 140. The computing resource pool 101 and the data center 150 can be connected via a network to receive or send messages. It should be noted that this application does not limit the number of affinity task resource pools.
[0041] The task submission module 110 may be used to obtain a user's request and submit the task in the request to the computing resource pool 101. Optionally, the task may be any task that requires computing, for example, a training task.
[0042] On the one hand, the affinity task cache 120 can communicate with the affinity task resource pool 1 to the affinity task resource pool N. Specifically, the affinity task cache 120 determines the affinity task resource pool i corresponding to the task submitted by the task submission module 110 in the affinity task resource pool 1 to the affinity task resource pool N, and sends the task to the affinity task resource pool i so that the affinity task resource pool i performs calculation. On the other hand, the affinity task cache 120 can also be used to send the remaining resources of the affinity task resource pool 1 to the affinity task resource pool N and the shared cache resource pool 140 to the data center 150 so that the data center 150 can dynamically adjust the resources of the affinity task resource pool 1 to the affinity task resource pool N and the shared cache resource pool 140.
[0043] Affinity task resource pool 1 to affinity task resource pool N can be used to create a computing power container for the task and returned to the task container list module 160 , which feeds back the result to the user.
[0044] On the one hand, the data center 150 obtains configuration instructions for initialization and sends the initialization policy of affinity task resource pool 1 to affinity task resource pool N to the affinity task cache 120; on the other hand, it can also be used to dynamically adjust the resources of affinity task resource pool 1 to affinity task resource pool N and the shared cache resource pool 140.
[0045] It should be noted that the system framework 100 is the execution body of the method for creating a computing power container provided in the embodiment of the present application, and the system framework 100 can also be called a computing power platform. Among them, the computing power resource pool 101 is used to provide computing power containers for tasks, and the computing power resource pool 101 can be any device or equipment with data processing capabilities, including but not limited to graphics processing units (Graphic Processing Units, GPU), central processing units (Central Processing Unit, CPU), neural network processors (Neural Network Processing Unit, NPU), tensor processors (Tensor Processing Unit, TPU), accelerated processors (Accelerated Processing Unit, APU). The data center 150 can be any network device with data calculation, transmission, and storage capabilities, such as a server.
[0046] Figure 2 It is a schematic flowchart of a method 200 for creating a computing power container provided in an embodiment of the present application.
[0047] It should be noted that the method 200 provided in the present application is applicable to the system framework 100, such as any computing power platform with data processing capabilities. Optionally, the computing power platform includes a computing power resource pool, which includes but is not limited to a graphics processing unit (Graphic Processing Units, GPU), a central processing unit (Central Processing Unit, CPU), a neural network processor (Neural Network Processing Unit, NPU), a tensor processor (TensorProcessing Unit, TPU), and an accelerated processor (Accelerated Processing Unit, APU). Optionally, the computing power resource pool includes an affinity task cache, N affinity task resource pools, and a shared cache resource pool. Optionally, the computing power platform may also include a data center. Of course, the computing power platform may also be a cloud computing power platform, which is not specifically limited in the present application.
[0048] like Figure 2 As shown, the method 200 may include:
[0049] S201: Obtain the target task through the affinity task cache;
[0050] S202: Determine, through the affinity task cache, a first resource pool corresponding to the target task from N affinity task resource pools corresponding to N time periods respectively according to the time period of the target task; N>1;
[0051] S203: Create a computing power container for the target task in the first resource pool.
[0052] In an embodiment of the present application, N affinity task resource pools correspond to N time periods respectively. This is equivalent to introducing a time characteristic for a conventional resource pool. In other words, the affinity task resource pool involved in the present application may also be referred to as a time affinity task resource pool, that is, the affinity task resource pool is used to process tasks within a certain threshold range. Correspondingly, the affinity task cache involved in the present application refers to a cache of the affinity task resource pool corresponding to the target task that can be determined from the N affinity task resource pools using the time period of the target task.
[0053] In other words, the present application determines the affinity task resource pool corresponding to the target task, that is, the first resource pool, through the affinity task cache; on the one hand, since the N affinity task resource pools correspond to N time periods respectively, the computing power resource pool can be regularized from the time dimension; on the other hand, the first resource pool corresponding to the target task is determined in the N affinity task resource pools according to the time period of the target task through the affinity task cache, so that the target task can be run in the corresponding affinity task resource pool, avoiding the computing power fragmentation caused by the large difference in the running time of multiple tasks, thereby reducing the computing power fragmentation from the time dimension.
[0054] In addition, reducing computing power fragmentation from a time dimension is conducive to the overall activation of computing power resources, and can avoid the situation where the total computing power resources of the computing power platform are sufficient at a certain moment, but the computing power resources of a certain task resource pool cannot meet the user's task requirements.
[0055] It should be noted that the number of N affinity task resource pools is greater than 1, and the specific number is not limited in this application. In addition, each of the N time periods can be a time period with a start time and an end time, or a time period without a start time and an end time. Correspondingly, the time period of the target task can be a time period with a start time and an end time, or a time period without a start time and an end time, and this application does not make specific limitations on this. In short, this application aims to regularize the computing power resource pool from the time dimension, thereby reducing the computing power fragmentation of the resource pool in the computing power platform from the time dimension based on the time information of the task.
[0056] In one implementation, the computing power platform obtains an instruction to create a computing power container for a target task. Based on the instruction, the computing power platform determines the first resource pool corresponding to the target task in N affinity task resource pools according to the time period of the target task through the affinity task cache, and creates a computing power container for the target task in the first resource pool.
[0057] In some embodiments of the present application, the time period of the target task includes an estimated running time period of the target task; S202 may include:
[0058] Through the affinity task cache, among the N time periods, the affinity task resource pool corresponding to the time period whose difference with the estimated running time period is less than the first threshold is determined as the first resource pool. Optionally, the affinity task cache stores the N time periods corresponding to the N affinity task resource pools.
[0059] In one implementation, the estimated running time period of the target task may be a target time period having a start time and an end time, and the target task is estimated to run within the target time period. At this time, each of the N time periods may also be a time period having a start time and an end time; in one implementation, the computing power platform may determine, among the N time periods, a time period whose difference from the end time or start time of the estimated running time period of the target task is less than a first threshold, and determine its corresponding affinity task resource pool as the first resource pool. Of course, in other implementations of the present application, the computing power platform may also determine, among the N time periods, the time period into which the estimated running time of the target task is entered, and determine its corresponding affinity task resource pool as the first resource pool; the embodiments of the present application do not specifically limit this.
[0060] In another implementation, the estimated running time period of the target task may also be a running time period without a start time and an end time. In this case, each of the N time periods may also be a time period without a start time and an end time; based on this, among the N time periods, a time period whose estimated running time period of the target task is less than a first threshold is determined, and the affinity task resource pool corresponding to the time period is determined as the first resource pool.
[0061] It should be noted that the first threshold may be set in advance or input by a user, and the present application does not impose any restrictions on the setting value of the first threshold, for example, 0.1h.
[0062] In some embodiments of the present application, S203 may include:
[0063] Determine whether the resources of the first resource pool meet the resources required by the target task; if the resources of the first resource pool meet the resources required by the target task, create a computing power container in the first resource pool; if the resources of the first resource pool cannot meet the resources required by the target task, obtain a second resource from the shared cache resource pool through the affinity task cache; create a computing power container for the target task based on the resources of the first resource pool and the second resource. In one implementation, if the resources of the first task resource pool cannot meet the resources required by the target task, allocate the second resource in the shared cache resource pool to the first task resource pool through the task cache; and then create a computing power container for the target task in the first task resource pool based on the resources of the first task resource pool and the second resource obtained from the shared cache resource pool.
[0064] In other words, the computing power platform determines whether the resources of the first resource pool meet the resources required by the target task; if the resources of the first resource pool meet the resources required by the target task, a computing power container is created for the target task in the first resource pool, and a container list of task containers is returned; if the resources of the first resource pool cannot meet the resources required by the target task, a second resource is obtained from the shared cache resource pool through the affinity task cache; a computing power container is created for the target task based on the resources of the first resource pool and the second resource, and a container list of task containers is returned. Task containers can also be called computing power containers. As a computing unit, computing power containers can perform various computing tasks, including data preprocessing, training of machine learning models, and inference of unlabeled data using existing models; accordingly, the container list of task containers can be the calculation results of the task container for the target task, such as a trained model or a calculated value, etc. After the computing power platform creates a computing power container for the target task, it can run the target task through the computing power container and return the running result, i.e., the container list of the task container, after the running is completed.
[0065] It should be noted that the second resource may be greater than or equal to the resource required by the first resource pool, and this application does not impose any specific restrictions on this.
[0066] In some embodiments of the present application, the method 200 may further include:
[0067] If task accumulation occurs in the first resource pool, a task accumulation notification is reported to the data center through the affinity task cache; in response to the task accumulation notification, a new allocation strategy of resources of n affinity task resource pools and a shared cache resource pool is sent to the affinity task cache through the data center; the n affinity task resource pools correspond to n time periods respectively, and the N time periods are different from the n time periods; n>1; based on the new allocation strategy, resources are reallocated to the n affinity task resource pools and the shared cache resource pool through the affinity task cache.
[0068] Here, N may be equal to n or may not be equal to n, and this application does not make any specific limitation on this.
[0069] In one implementation, the n time periods include time periods obtained by dividing the N time periods. For example, the n time periods include time periods obtained by dividing a time period corresponding to a first resource pool in the N time periods.
[0070] In other words, if there is a need to create a computing power container for multiple tasks in the first resource pool, that is, when tasks are piled up in the first resource pool, it means that after the data center divides the computing power resource pool into N affinity task resource pools based on the time period, the tasks of the affinity task resource pool corresponding to a certain time period are concentrated or piled up, that is, the tasks of the certain time period are concentrated or piled up. At this time, the affinity task cache can report the task accumulation notification to the data center so that the data center can re-divide the time period or re-divide the concentrated time period, and re-send the allocation strategy of the affinity task resource pool corresponding to each time period after the re-division or splitting to the affinity task cache. Correspondingly, the affinity task cache receives new allocation strategies for n affinity task resource pools and shared cache resource pools from the data center, and the affinity task cache can be used to reallocate resources for the n affinity task resource pools and shared cache resource pools based on the new allocation strategy. It should be noted that the resources involved in the embodiment of the present application can be in units of computing power, and the present application does not limit its specific implementation method. For example, the maximum number of hash collisions that can be done per second can be called computing power, and the unit is recorded as hash / s. For example, MH / s is million hashes per second, and TH / s is trillion hashes per second.
[0071] When task accumulation occurs in the first resource pool, the task accumulation notification is reported to the data center through the affinity task cache, and the new allocation strategy of the n affinity task resource pools and the shared cache resource pool corresponding to the n re-divided or split time periods sent by the data center is received through the affinity task cache. Based on the new allocation strategy, resources are reallocated to the n affinity task resource pools and the shared cache resource pool, thereby ensuring smooth allocation of different affinity task resource pools in time granularity and reducing the probability of fragmentation of computing power resources in the time dimension.
[0072] It should be noted that the new allocation strategy can be the new percentage of the resources of the n affinity task resource pools in the total resources of the computing power platform (i.e., the computing power resource pool), or the new percentage of the resources of the n affinity task resource pools in the total resources of the original affinity task resource pool, or it can be directly the allocation amount of the resources of the n affinity task resource pools. In other words, the new allocation strategy aims to allocate or clarify the resources of the n affinity task resource pools, and the present application does not limit the specific implementation method of the new allocation strategy. It should be noted that since the data center originally divided the computing power resource pool based on N time periods, after task accumulation occurred, the computing power resource pool was re-divided based on n time periods or a computing power affinity task resource pool was split, so the n time periods after re-division or splitting are different from the original N time periods.
[0073] In some embodiments of the present application, the method 200 may further include:
[0074] The remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform are periodically sent to the data center through the affinity task cache; the adjustment policy sent by the data center is received through the affinity task cache; based on the adjustment policy, the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform are adjusted through the affinity task cache.
[0075] In other words, first, the computing power platform periodically sends the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform to the data center through the affinity task cache, so that the computing power platform determines the adjustment strategy based on the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform through the data center; then, the computing power platform sends the adjustment strategy to the affinity task cache through the data center; accordingly, after the computing power platform receives the adjustment strategy sent by the data center through the affinity task cache, based on the adjustment strategy, the computing power platform adjusts the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool through the affinity task cache. For example, after the computing power platform receives the adjustment policy through the affinity task cache, based on the adjustment policy, it releases excess resources from the remaining resources of N affinity task resource pools to the shared cache resource pool; for example, after the computing power platform receives the adjustment policy through the affinity task cache, based on the adjustment policy, it obtains resources from the shared cache resource pool and fills them into the insufficient affinity task resource pool among the remaining resources in the N affinity task resource pools.
[0076] On the one hand, the computing power platform periodically sends the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform to the data center through the affinity task cache, and can regularly report the resource scheduling status of each affinity task resource pool to the data center, providing a data basis for the data center to adjust the remaining resources of each affinity task resource pool; on the other hand, the computing power platform receives the adjustment strategy sent by the data center through the affinity task cache, and based on the adjustment strategy, adjusts the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform, which can activate the resource flow of each affinity task resource pool in the computing power platform and avoid the situation where the resources of a certain affinity task resource pool or some affinity task resource pools are not scheduled or blocked for a long time; further, it is conducive to the rapid iteration of tasks.
[0077] It should be noted that the adjustment strategy can be the new percentage of the resources of the N affinity task resource pools in the total resources of a certain affinity task resource pool, or the new percentage of the resources of the N affinity task resource pools in the total resources of the computing power platform, or directly the adjustment amount of the resources of the N affinity task resource pools. In other words, the adjustment strategy aims to reallocate or adjust the adjustment amount of the resources of the N affinity task resource pools, and this application does not limit the specific implementation method of the adjustment strategy.
[0078] In some embodiments of the present application, before S201, the method 200 may further include:
[0079] The data center uses the initialization data to obtain an initialization strategy; the affinity task cache receives the initialization strategy sent by the data center; based on the initialization strategy, the N affinity task resource pools and the shared cache resource pool are initialized through the affinity task cache.
[0080] In other words, after the computing power platform obtains the initialization strategy through the data center, it receives the initialization strategy of N affinity task resource pools and shared cache resource pools sent by the data center through the affinity task cache, and allocates resources to the N affinity task resource pools and the shared cache resource pool of the computing power platform based on the initialization strategy through the affinity task cache.
[0081] In some implementations, the initialization data may be the running data of the historical tasks, such as the running time of the historical tasks. The computing power platform may determine the amount of tasks corresponding to each of the N time periods through the running time of the historical tasks, and then determine the initialization strategy based on the amount of tasks corresponding to each of the N time periods. The initialization strategy may be the percentage of the resources of the N affinity task resource pools and the shared cache resource pool in the total resources of the computing power platform (i.e., the computing power resource pool), or it may be directly the allocation of the resources of the N affinity task resource pools and the shared cache resource pool. In other words, the initialization strategy is intended to clarify the allocation of the resources of the N affinity task resource pools and the shared cache resource pool. This application does not limit the specific implementation of the initialization data and the initialization strategy. For ease of understanding, the following is an example of the initialization data in this application, taking the initialization strategy including the proportion of the resources of the N affinity task resource pools and the shared cache resource pool in the total resources of the computing power platform as an example.
[0082] If the total resources of the computing power platform (i.e., the computing power resource pool) are M, and the percentage ratio of the total resources of all affinity task resource pools and the resources of the shared cache resource pool is A:B, then the total resources of all affinity task resource pools are M*A, and the resources of the shared cache resource pool are M*B. The data center can also determine the proportion of resources required by tasks in each time period in the total resources required by all tasks based on the data of tasks in multiple time periods, and determine it as the resource proportion of the affinity task resource pool in the corresponding time period. For example, taking 3 time periods as an example, each of the 3 time periods includes a task, then the calculated percentages of the 3 affinity task resource pools corresponding to the 3 time periods are shown in Table 1:
[0083] Table 1
[0084]
[0085] As shown in Table 1, after the computing power platform receives the percentage A of all affinity task resource pools as shown in Table 1 sent by the data center, it determines the resources of each affinity task resource pool according to the total resources M*A of all affinity task resource pools and the percentage of each affinity task resource pool, that is, the resources of the three affinity task resource pools are: M*A*X, M*A*Y, and M*A*Z respectively.
[0086] In some implementations, before the data center uses the initialization data to obtain the initialization strategy, the data center obtains a configuration instruction for instructing initialization; in response to the configuration instruction, the data center uses the initialization data to obtain the initialization strategy.
[0087] Figure 3 It is a schematic flowchart of a method 300 for creating a computing power container provided in an embodiment of the present application.
[0088] It should be understood that the method 300 can be executed by the affinity task cache and data center in the computing power platform, and the computing power platform can be any computing power platform with data processing capabilities. Optionally, the computing power platform includes a computing power resource pool and a data center. The computing power resource pool includes an affinity task cache, and the affinity task cache includes but is not limited to a graphics processing unit (Graphic Processing Units, GPU), a central processing unit (Central Processing Unit, CPU), a neural network processor (Neural Network Processing Unit, NPU), a tensor processor (Tensor Processing Unit, TPU), and an accelerated processor (Accelerated Processing Unit, APU). The data center can be any network device with data calculation, transmission, and storage capabilities. For example, a server.
[0089] like Figure 3 As shown, the method 300 may include:
[0090] S301: The computing power platform obtains a configuration instruction for instructing initialization through the data center. The configuration instruction is used to instruct the data center to initialize the N affinity task resource pools and the shared cache resource pool. For example, the configuration instruction is used to instruct the data center to send an initialization policy to the affinity task cache. Optionally, Figure 1 As shown, the configuration instruction may be an instruction input by a user.
[0091] S302: The computing power platform sends an initialization strategy to the affinity task cache through the data center.
[0092] S303: The computing power platform receives the initialization policy sent by the data center through the affinity task cache, and initializes N affinity task resource pools and the shared cache resource pool of the computing power platform based on the initialization policy.
[0093] In some implementations, the initialization data may be the operating data of historical tasks, such as the running time of historical tasks. The computing power platform may determine the amount of tasks corresponding to each of the N time periods through the running time of the historical tasks, and then determine the initialization strategy based on the amount of tasks corresponding to each of the N time periods. The initialization strategy may be the percentage of the resources of the N affinity task resource pools in the total resources of the computing power platform (i.e., the computing power resource pool), or it may be directly the allocated amount of resources of the N affinity task resource pools. In other words, the initialization strategy aims to clarify the allocated amount of resources of the N affinity task resource pools. This application does not limit the specific implementation of the initialization data and the initialization strategy.
[0094] In some embodiments of the present application, the S202 may further include:
[0095] Through the affinity task cache, the first sub-resource pool corresponding to the target task is determined in the N1 sub-resource pools in the first resource pool based on the computer room of the target task; the N1 sub-resource pools correspond to N1 computer rooms respectively, and the N1 computer rooms include the computer room of the target task; N1>1; a computing power container is created for the target task in the first sub-resource pool in the first resource pool.
[0096] In other words, by caching affinity tasks in N1 sub-resource pools corresponding to the N1 computer rooms in the first resource pool, the sub-resource pool corresponding to the computer room matching the target task is determined as the first sub-resource pool.
[0097] By determining the first sub-resource pool corresponding to the computer room of the target task in the N1 sub-resource pools in the first resource pool, it is equivalent to considering the computer room affinity of the task on the basis of considering the time affinity of the task. It can not only regulate the computing power resource pool in the time dimension and reduce the computing power fragmentation, but also regulate the affinity task resource pool in the computer room dimension while reducing the computing power fragmentation, which can accelerate the processing efficiency of the task. In other words, on the one hand, the present application considers the time characteristics of the task, that is, the time affinity of the task, by dividing the computing power resource pool in the time dimension; on the other hand, the computer room characteristics of the task, that is, the computer room affinity of the task, are considered by dividing the affinity task resource pool in the computer room dimension; based on this, while reducing the computing power fragmentation, the affinity task resource pool can be regulated in the computer room dimension, which can accelerate the processing efficiency of the task.
[0098] In some embodiments of the present application, the S202 may further include:
[0099] Through the affinity task cache, a second sub-resource pool corresponding to the target task is determined in the N2 sub-resource pools in the first resource pool based on the network adopted by the target task; the N2 sub-resource pools respectively correspond to N2 networks, and the N2 networks include the network adopted by the target task; N2>1; a computing power container is created for the target task in the second sub-resource pool in the first resource pool.
[0100] In other words, through affinity task caching, among the N2 sub-resource pools in the first resource pool corresponding to the N2 networks respectively, the sub-resource pool corresponding to the network matching the network adopted by the target task is determined as the second sub-resource pool.
[0101] By determining the second sub-resource pool corresponding to the network used by the target task in the N2 sub-resource pools in the first resource pool, it is equivalent to considering the network affinity of the task on the basis of considering the time affinity of the task. It can not only regulate the computing power resource pool in the time dimension and reduce the computing power fragmentation, but also regulate the affinity task resource pool in the network dimension while reducing the computing power fragmentation, which can accelerate the processing efficiency of the task. In other words, on the one hand, the present application considers the time characteristics of the task, that is, the time affinity of the task, by dividing the computing power resource pool in the time dimension; on the other hand, the network characteristics of the task, that is, the network affinity of the task, are considered by dividing the affinity task resource pool in the network dimension; based on this, while reducing the computing power fragmentation, the affinity task resource pool can be regulated in the network dimension, which can accelerate the processing efficiency of the task.
[0102] Figure 4 It is a schematic flowchart of a method 400 for creating a computing power container provided in an embodiment of the present application.
[0103] It should be understood that the method 400 is applicable to the system framework 100, such as any computing power platform with data processing capabilities. Optionally, the computing power platform includes a computing power resource pool, which includes but is not limited to a graphics processing unit (Graphic Processing Units, GPU), a central processing unit (Central Processing Unit, CPU), a neural network processor (Neural Network Processing Unit, NPU), a tensor processor (Tensor Processing Unit, TPU), and an accelerated processor (Accelerated Processing Unit, APU). Optionally, the computing power resource pool includes an affinity task cache, N affinity task resource pools, and a shared cache resource pool. Optionally, the computing power platform may also include a data center. Of course, the computing power platform may also be a cloud computing power platform, which is not specifically limited in this application.
[0104] like Figure 4 As shown, the method 400 may include:
[0105] S401: Obtain a target task through an affinity task cache.
[0106] In one implementation, the computing power platform obtains an instruction to create a computing power container for a target task through an affinity task cache, and the instruction is used to request to create a computing power container for the target task. Optionally, the instruction includes an estimated runtime of the target task.
[0107] S402: Determine, through the affinity task cache, a first resource pool corresponding to the target task from N affinity task resource pools corresponding to N time periods respectively according to the time period of the target task; N>1.
[0108] Specifically, through the affinity task cache, among the N time periods, the affinity task resource pool corresponding to the time period whose difference with the estimated running time period is less than the first threshold is determined as the first resource pool.
[0109] In one implementation, the estimated running time period of the target task may be a target time period having a start time and an end time, and the target task is estimated to run within the target time period. At this time, each of the N time periods may also be a time period having a start time and an end time; in one implementation, the computing power platform may determine, among the N time periods, a time period whose difference from the end time or start time of the estimated running time period of the target task is less than a first threshold, and determine its corresponding affinity task resource pool as the first resource pool. Of course, in other implementations of the present application, the computing power platform may also determine, among the N time periods, the time period into which the estimated running time of the target task is entered, and determine its corresponding affinity task resource pool as the first resource pool; the embodiments of the present application do not specifically limit this.
[0110] In another implementation, the estimated running time period of the target task may also be a running time period without a start time and an end time. In this case, each of the N time periods may also be a time period without a start time and an end time; based on this, among the N time periods, a time period whose estimated running time period of the target task is less than a first threshold is determined, and the affinity task resource pool corresponding to the time period is determined as the first resource pool.
[0111] S403: Do the resources in the first resource pool meet the resources required by the target task?
[0112] If the resources in the first resource pool meet the resources required by the target task, a computing power container is created for the target task in the first resource pool. If the resources in the first resource pool cannot meet the resources required by the target task, a second resource is obtained from the shared cache resource pool through the affinity task cache; a computing power container is created for the target task based on the resources in the first resource pool and the second resource.
[0113] S404: Acquire a second resource from the shared cache resource pool through affinity task cache.
[0114] If the resources in the first resource pool cannot meet the resources required by the target task, the second resource is obtained from the shared cache resource pool through the affinity task cache. It should be noted that the second resource can be greater than or equal to the resources required by the first resource pool, and this application does not make specific restrictions on this.
[0115] S405: Create a computing power container for the target task.
[0116] The computing power platform creates a computing power container for the target task in the first resource pool, or the computing power platform may create a computing power container for the target task based on the resources of the first resource pool and the second resource.
[0117] S406: Dynamically adjust the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool.
[0118] Specifically, first, the computing power platform periodically sends the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform to the data center through the affinity task cache, so that the computing power platform determines the adjustment strategy based on the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform through the data center; then, the computing power platform sends the adjustment strategy to the affinity task cache through the data center; accordingly, after the computing power platform receives the adjustment policy sent by the data center through the affinity task cache, based on the adjustment strategy, the computing power platform adjusts the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool through the affinity task cache. For example, after the computing power platform receives the adjustment policy through the affinity task cache, based on the adjustment policy, it releases excess resources from the remaining resources of N affinity task resource pools to the shared cache resource pool; for example, after the computing power platform receives the adjustment policy through the affinity task cache, based on the adjustment policy, it obtains resources from the shared cache resource pool and fills them into the insufficient affinity task resource pool among the remaining resources in the N affinity task resource pools.
[0119] On the one hand, the computing power platform periodically sends the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform to the data center through the affinity task cache, and can regularly report the resource scheduling status of each affinity task resource pool to the data center, providing a data basis for the data center to adjust the remaining resources of each affinity task resource pool; on the other hand, the computing power platform receives the adjustment strategy sent by the data center through the affinity task cache, and based on the adjustment strategy, adjusts the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform, which can activate the resource flow of each affinity task resource pool in the computing power platform and avoid the situation where the resources of a certain affinity task resource pool or some affinity task resource pools are not scheduled or blocked for a long time; further, it is conducive to the rapid iteration of tasks.
[0120] It should be noted that the adjustment strategy can be the new percentage of the resources of the N affinity task resource pools in the total resources of a certain affinity task resource pool, or the new percentage of the resources of the N affinity task resource pools in the total resources of the computing power platform, or directly the adjustment amount of the resources of the N affinity task resource pools. In other words, the adjustment strategy aims to reallocate or adjust the adjustment amount of the resources of the N affinity task resource pools, and this application does not limit the specific implementation method of the adjustment strategy.
[0121] S407: Initialization of N affinity task resource pools and a shared cache resource pool.
[0122] Specifically, the data center uses the initialization data to obtain the initialization strategy; the affinity task cache receives the initialization strategy sent by the data center; based on the initialization strategy, the N affinity task resource pools and the shared cache resource pool are initialized through the affinity task cache.
[0123] In other words,
[0124] After the computing power platform obtains the initialization strategy through the data center, it receives the initialization strategy of the resources of N affinity task resource pools sent by the data center through the affinity task cache, and allocates resources to the N affinity task resource pools and the shared cache resource pool of the computing power platform based on the initialization strategy through the affinity task cache.
[0125] In some implementations, the initialization data may be the operating data of historical tasks, such as the running time of historical tasks. The computing power platform may determine the amount of tasks corresponding to each of the N time periods through the running time of the historical tasks, and then determine the initialization strategy based on the amount of tasks corresponding to each of the N time periods. The initialization strategy may be the percentage of the resources of the N affinity task resource pools in the total resources of the computing power platform (i.e., the computing power resource pool), or it may be directly the allocated amount of resources of the N affinity task resource pools. In other words, the initialization strategy aims to clarify the allocated amount of resources of the N affinity task resource pools. This application does not limit the specific implementation of the initialization data and the initialization strategy.
[0126] It should be noted that the drawings provided in the embodiments of the present application are only examples and should not be construed as limiting the present application. Figure 4 The S401, S402 and S405 shown can be used to replace Figure 2 S201, S202, and S203 are shown.
[0127] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.
[0128] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0129] The above describes the method provided in the embodiment of the present application, and the following describes the computing power platform provided in the embodiment of the present application.
[0130] Figure 5 It is a schematic block diagram of the computing power platform 500 provided in an embodiment of the present application.
[0131] like Figure 5 As shown, the computing power platform 500 includes:
[0132] An acquisition unit 501 is used to acquire a target task through an affinity task cache;
[0133] A determining unit 502 is configured to determine, through the affinity task cache, a first resource pool corresponding to the target task from N affinity task resource pools corresponding to N time periods respectively according to the time period of the target task; N>1;
[0134] The creation unit 503 is used to create a computing power container for the target task in the first resource pool.
[0135] In some embodiments of the present application, the determining unit 502 is specifically configured to:
[0136] Through the affinity task cache, among the N time periods, the affinity task resource pool corresponding to the time period whose difference with the estimated running time period is less than the first threshold is determined as the first resource pool. Optionally, the affinity task cache stores the N time periods corresponding to the N affinity task resource pools.
[0137] In some embodiments of the present application, the creating unit 503 is specifically used to:
[0138] Determining whether the resources in the first resource pool meet the resources required by the target task;
[0139] If the resources in the first resource pool meet the resources required by the target task, create a computing power container for the target task in the first resource pool;
[0140] If the resources of the first resource pool cannot meet the resources required by the target task, the second resource is obtained from the shared cache resource pool in the computing power platform through the affinity task cache; and a computing power container is created for the target task based on the resources of the first resource pool and the second resource.
[0141] In some embodiments of the present application, the determining unit 502 may also be used to:
[0142] If tasks are accumulated in the first resource pool, a task accumulation notification is reported to the data center in the computing power platform through the affinity task cache;
[0143] In response to the task accumulation notification, a new allocation strategy of n affinity task resource pools and a shared cache resource pool of a computing power platform is sent to the affinity task cache through the data center; the n affinity task resource pools correspond to n time periods respectively, and the N time periods are different from the n time periods; n>1;
[0144] Based on the new allocation strategy, resources are reallocated to the n affinity task resource pools and the shared cache resource pool through the affinity task cache.
[0145] In some embodiments of the present application, the n time periods include time periods obtained by dividing the N time periods.
[0146] In some embodiments of the present application, the determining unit 502 may also be used to:
[0147] The remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform are periodically sent to the data center through the affinity task cache;
[0148] Receiving the adjustment policy sent by the data center through the affinity task cache;
[0149] Based on the adjustment strategy, the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform are adjusted through the affinity task cache.
[0150] In some embodiments of the present application, the determining unit 502 may also be used to:
[0151] Obtaining an initialization strategy using initialization data through a data center;
[0152] Receiving the initialization policy sent by the data center through the affinity task cache;
[0153] Based on the initialization strategy, the N affinity task resource pools and the shared cache resource pool of the computing power platform are initialized through the affinity task cache.
[0154] In some embodiments of the present application, before the data center uses the initialization data to obtain the initialization strategy, the determining unit 502 may also be used to:
[0155] Obtaining, through the data center, a configuration instruction for instructing initialization;
[0156] In response to the configuration instruction, the initialization strategy is obtained by the data center using the initialization data.
[0157] In some embodiments of the present application, the determining unit 502 may also be specifically configured to:
[0158] Through the affinity task cache, based on the computer room of the target task, a first sub-resource pool corresponding to the target task is determined in the N1 sub-resource pools in the first resource pool; the N1 sub-resource pools correspond to N1 computer rooms respectively, and the N1 computer rooms include the computer room of the target task; N1>1;
[0159] A computing power container is created for the target task in the first sub-resource pool in the first resource pool.
[0160] In some embodiments of the present application, the determining unit 502 may also be specifically configured to:
[0161] Through the affinity task cache, a second sub-resource pool corresponding to the target task is determined in the N2 sub-resource pools in the first resource pool based on the network used by the target task; the N2 sub-resource pools correspond to N2 networks respectively, and the N2 networks include the network used by the target task; N2>1;
[0162] A computing power container is created for the target task in the second sub-resource pool in the first resource pool.
[0163] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, no further description is given here. Specifically, the computing power platform 500 may correspond to the corresponding main computing power platform for executing the method 200, method 300, and method 400 of the embodiment of the present application, and the aforementioned and other operations and / or functions of each module in the computing power platform 500 are respectively for implementing Figures 2 to 4 For the sake of brevity, the corresponding processes in each method are not repeated here.
[0164] It should also be understood that the various units in the computing power platform 500 involved in the embodiment of the present application can be separately or all combined into one or several other units to constitute, or some (some) of the units can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units are implemented by one unit. In other embodiments of the present application, the computing power platform 500 may also include other units. In practical applications, these functions can also be implemented by other units, and can be implemented by multiple units in collaboration. According to another embodiment of the present application, the computing power platform 500 involved in the embodiment of the present application can be constructed by running a computer program (including program code) capable of executing each step involved in the corresponding method on a general computing device of a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM), to construct the computing power platform 500 involved in the embodiment of the present application, and to implement the method of creating a computing power container in the embodiment of the present application. Among them, the computer program can be recorded on, for example, a computer-readable storage medium, and loaded into an electronic device through the computer-readable storage medium and run therein to implement the corresponding method of the embodiment of the present application.
[0165] In other words, the units mentioned above can be implemented in hardware form, can be implemented in software form, or can be implemented in the form of a combination of software and hardware. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form of the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software combination in the decoding processor can be executed. Optionally, the software can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in combination with its hardware.
[0166] Figure 6 It is a schematic structural diagram of an electronic device 600 provided in an embodiment of the present application.
[0167] like Figure 6 As shown, the electronic device 600 at least includes a processor 610 and a computer-readable storage medium 620. The processor 610 and the computer-readable storage medium 620 may be connected via a bus or other means. The computer-readable storage medium 620 is used to store a computer program 621, which includes computer instructions, and the processor 610 is used to execute the computer instructions stored in the computer-readable storage medium 620. The processor 610 is the computing core and control core of the electronic device 600, which is suitable for implementing one or more computer instructions, and is specifically suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding function.
[0168] As an example, the processor 610 may also be referred to as a central processing unit (CPU). The processor 610 may include, but is not limited to, a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
[0169] As an example, the computer-readable storage medium 620 may be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium located away from the aforementioned processor 610. Specifically, the computer-readable storage medium 620 includes, but is not limited to: a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0170] In one implementation, the electronic device 600 may be Figure 5 The computing platform 500 shown in the figure has computer instructions stored in the computer-readable storage medium 620; the processor 610 loads and executes the computer instructions stored in the computer-readable storage medium 620 to implement Figures 2 to 4 The corresponding steps in the method embodiment shown; in the specific implementation, the computer instructions in the computer-readable storage medium 620 are loaded by the processor 610 and execute the corresponding steps. To avoid repetition, they are not repeated here.
[0171] According to another aspect of the present application, an embodiment of the present application further provides a computer-readable storage medium (Memory), which is a memory device in the electronic device 600 for storing programs and data. For example, a computer-readable storage medium 620. It can be understood that the computer-readable storage medium 620 here can include both the built-in storage medium in the electronic device 600 and the extended storage medium supported by the electronic device 600. The computer-readable storage medium provides a storage space, which stores the operating system of the electronic device 600. In addition, one or more computer instructions suitable for being loaded and executed by the processor 610 are also stored in the storage space, and these computer instructions can be one or more computer programs 621 (including program codes).
[0172] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. For example, computer program 621. At this time, the electronic device 600 may be a computer, the processor 610 reads the computer instructions from the computer-readable storage medium 620, and the processor 610 executes the computer instructions, so that the computer executes the method for creating a computing power container provided in the above-mentioned various optional methods.
[0173] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process of the embodiment of the present application is run in whole or in part or the function of the embodiment of the present application is implemented. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0174] Those of ordinary skill in the art will appreciate that the units and process steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0175] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for creating a computing power container, characterized in that: The method is applied to a computing power platform; include: Get the target task through the affinity task cache; Determine, by the affinity task cache, a first resource pool corresponding to the target task from N affinity task resource pools corresponding to N time periods respectively according to the time period of the target task; N>1; Creating a computing power container for the target task in the first resource pool; If tasks are accumulated in the first resource pool, a task accumulation notification is reported to the data center in the computing power platform through the affinity task cache; In response to the task accumulation notification, a new allocation strategy of n affinity task resource pools and a shared cache resource pool of a computing power platform is sent to the affinity task cache through the data center; the n affinity task resource pools correspond to n time periods respectively, and the N time periods are different from the n time periods; n>1; Based on the new allocation strategy, resources are reallocated to the n affinity task resource pools and the shared cache resource pool through the affinity task cache.
2. The method according to claim 1, characterized in that The time period of the target task includes the estimated running time period of the target task; The step of determining the first resource pool corresponding to the target task from N affinity task resource pools corresponding to N time periods respectively through the affinity task cache according to the time period of the target task includes: Through the affinity task cache, the affinity task resource pool corresponding to the time period whose difference with the estimated running time period is less than a first threshold among the N time periods is determined as the first resource pool.
3. The method according to claim 1, characterized in that The creating a computing power container for the target task in the first resource pool includes: Determining whether the resources in the first resource pool meet the resources required by the target task; If the resources in the first resource pool meet the resources required by the target task, creating a computing power container for the target task in the first resource pool; If the resources in the first resource pool cannot meet the resources required by the target task, obtain the second resource from the shared cache resource pool in the computing power platform through the affinity task cache; and create a computing power container for the target task based on the resources in the first resource pool and the second resource.
4. The method according to claim 1, characterized in that: The n time periods include time periods obtained by dividing the N time periods.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform are periodically sent to the data center through the affinity task cache; Receiving, through the affinity task cache, an adjustment policy sent by the data center; Based on the adjustment strategy, the remaining resources of the N affinity task resource pools and the remaining resources of the shared cache resource pool in the computing power platform are adjusted through the affinity task cache.
6. The method according to any one of claims 1 to 4, characterized in that Before acquiring the target task through the affinity task cache, the method further includes: Obtaining an initialization strategy using initialization data through a data center; Receiving the initialization policy sent by the data center through the affinity task cache; Based on the initialization strategy, the N affinity task resource pools and the shared cache resource pool of the computing power platform are initialized through the affinity task cache.
7. The method according to claim 6, characterized in that Before obtaining the initialization strategy by using the initialization data through the data center, the method further includes: Obtaining, through the data center, a configuration instruction for instructing initialization; In response to the configuration instruction, the initialization strategy is obtained by the data center using the initialization data.
8. The method according to any one of claims 1 to 4, characterized in that The creating a computing power container for the target task in the first resource pool includes: Determine, through the affinity task cache, a first sub-resource pool corresponding to the target task in N1 sub-resource pools in the first resource pool based on the computer room of the target task; the N1 sub-resource pools correspond to N1 computer rooms respectively, and the N1 computer rooms include the computer room of the target task; N1>1; A computing power container is created for the target task in the first sub-resource pool in the first resource pool.
9. The method according to any one of claims 1 to 4, characterized in that The creating a computing power container for the target task in the first resource pool includes: Determine, through the affinity task cache, a second sub-resource pool corresponding to the target task in N2 sub-resource pools in the first resource pool based on the network used by the target task; the N2 sub-resource pools correspond to N2 networks respectively, and the N2 networks include the network used by the target task; N2>1; A computing power container is created for the target task in the second sub-resource pool in the first resource pool.
10. A computing power platform, characterized in that: include: An acquisition unit, used to acquire a target task through an affinity task cache; A determination unit, configured to determine, through the affinity task cache, a first resource pool corresponding to the target task from N affinity task resource pools corresponding to N time periods respectively according to the time period of the target task; N>1; A creating unit, configured to create a computing power container for the target task in the first resource pool; The determining unit is further configured to: If tasks are accumulated in the first resource pool, a task accumulation notification is reported to the data center in the computing power platform through the affinity task cache; In response to the task accumulation notification, a new allocation strategy of n affinity task resource pools and a shared cache resource pool of a computing power platform is sent to the affinity task cache through the data center; the n affinity task resource pools correspond to n time periods respectively, and the N time periods are different from the n time periods; n>1; Based on the new allocation strategy, resources are reallocated to the n affinity task resource pools and the shared cache resource pool through the affinity task cache.
11. An electronic device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 9.
