Instance scheduling method and device, computing equipment cluster and storage medium
By dynamically scheduling instance resource pools in edge computing device clusters, the problem of low instance scheduling efficiency in AIGC computing tasks is solved, the utilization of GPU computing resources and user experience are improved, and more efficient computing task processing is achieved.
Patent Information
- Application Number
- CN202410465288.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the instance scheduling efficiency of AI-generated content (AIGC) computing tasks is low, resulting in reduced GPU computing resource utilization, prolonged user waiting time, and increased computing task processing time in high-concurrency scenarios.
By dynamically recycling and expanding the instance resource pool in the edge computing device cluster, the allocation and scheduling of instances are optimized based on the user's instance needs and prediction results, reducing the amount of network transmission data, reducing computing latency, and improving computing efficiency.
It improves instance scheduling efficiency, improves computing resource utilization, reduces user waiting time and idle waste of computing resources, and enhances processing capabilities during peak task periods.
Smart Images

Figure CN118626219A
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence (AI) technology, and in particular to an instance scheduling method, apparatus, computing device cluster, and computer-readable storage medium. Background Art
[0002] With the rapid development of AI technology, its application is becoming more and more extensive. One of the important application directions is artificial intelligence generated content (AIGC). AIGC refers to the use of artificial intelligence technology to automatically or semi-automatically generate various forms of content, including but not limited to text, images, audio and video, with the aim of improving content creation efficiency, automating tedious tasks and generating novel and engaging content.
[0003] The computing device cluster can generate a 3D model through AIGC technology combined with the photo information provided by the user. The 3D model can be applied to scenarios such as navigation, live broadcast, online conference or online translation. When the computing device cluster generates a 3D model, it relies on the computing power of the graphics processing unit (GPU), which means that a large amount of GPU computing resources are required. The computer device cluster can provide GPU computing resources in the form of instances. Among them, an instance is a computing unit with computing resources. Common instances include virtual machines (VM), containers or bare metal servers.
[0004] However, when performing AIGC-related computing tasks, the instance scheduling method is unreasonable. This may cause a large number of instances to be idle and wasted at the same time, reducing the utilization rate of the instances, that is, reducing the utilization rate of GPU computing resources. It is also easy for a large number of computing tasks to compete for instances in scenarios with high concurrency of computing tasks, resulting in prolonged processing time of computing tasks and prolonged waiting time for users.
[0005] Therefore, how to achieve efficient instance scheduling has become a problem that needs to be solved urgently. Summary of the invention
[0006] In order to solve the above-mentioned technical problems existing in the prior art, the present application provides an instance scheduling method, apparatus, computing device cluster and computer-readable storage medium, which improve the instance scheduling efficiency and thus improve the utilization rate of computing resources.
[0007] In a first aspect, the present application provides an instance scheduling method, which can be applied to an edge computing device cluster, the method comprising: recovering unscheduled instances from a first instance resource pool according to the number of instance requirements of the user and the control factor corresponding to the user, the control factor being used to indicate the number of recovered instances, the first instance resource pool being the user's instance resource pool; allocating instances to the first instance resource pool according to the predicted result of the number of instance requirements of the user in the future to increase the number of instances in the first instance resource pool.
[0008] By using this solution, by deploying instances to edge computing device clusters, the instances of the edge computing device clusters complete computing tasks, which can effectively reduce the amount of data transmitted over the network, reduce computing delays, and thus improve computing efficiency. After the first instance resource pool is allocated to the user, the instances in the first instance resource pool can be recycled and expanded. Specifically, the idle instances in the first instance resource pool can be recycled according to the number of instance requirements of the user and the control factors pre-configured for the user; or the first instance resource pool can be expanded according to the predicted number of instance requirements of the user in the future to increase the number of instances in the first instance resource pool. For users, instance recycling can reduce the cost of using idle instances, and instance expansion can improve the task processing capacity during the peak task time period. For cloud service providers, instance recycling can timely recycle and redistribute idle instances, which helps to achieve efficient transfer of instances between different users, reduce idle waste of computing resources, and improve the utilization rate of computing resources, so that the computing resources of the edge computing device cluster are always in an efficient scheduling state. By expanding the instance capacity, the task processing capacity of the served users during the peak task time period can also be improved.
[0009] In a second aspect, the present application also provides a computing resource scheduling device, which includes: a recycling unit and an expansion unit. The recycling unit is used to recycle unscheduled instances from a first instance resource pool according to the number of instance requirements of the user and the control factor corresponding to the user, the control factor is used to indicate the number of recycled instances, and the first instance resource pool is the user's resource pool; the expansion unit is used to allocate instances to the first instance resource pool according to the prediction result of the number of future instance requirements of the user, so as to increase the number of instances in the first instance resource pool.
[0010] In a third aspect, the present application further provides a computing device cluster, the computing device cluster includes at least one computing device, the at least one computing device includes at least one processor and at least one memory, and the at least one memory stores computer-readable instructions. The at least one processor executes the computer-readable instructions so that the computing device cluster executes the example scheduling method provided in the first aspect above.
[0011] In a fourth aspect, the present application further provides a computer-readable storage medium on which computer-readable instructions are stored. The computer-readable instructions are used to implement the example scheduling method provided in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 Schematic diagram of the user interface provided in the embodiment of the present application Figure 1 ;
[0013] Figure 2 Schematic diagram of the user interface provided in the embodiment of the present application Figure 2 ;
[0014] Figure 3 A flowchart of an example scheduling method provided in an embodiment of the present application;
[0015] Figure 4 A schematic diagram of the architecture of a computing device cluster provided in an embodiment of the present application;
[0016] Figure 5 A flowchart of another example scheduling method provided in an embodiment of the present application;
[0017] Figure 6 A schematic diagram of an example scheduling device provided in an embodiment of the present application;
[0018] Figure 7 A schematic diagram of another example scheduling device provided in an embodiment of the present application;
[0019] Figure 8 A schematic diagram of a computing device provided in an embodiment of the present application;
[0020] Fig. 9 A schematic diagram of a computing device cluster provided in an embodiment of the present application;
[0021] Fig.10 Schematic diagram of the connection method of the computing device cluster provided in the embodiment of the present application Figure 1 ;
[0022] Fig.11 Schematic diagram of the connection method of the computing device cluster provided in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0023] The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0024] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the relevant technical terms involved in the embodiments of the present application are first introduced.
[0025] Computing resources: Computing resources include resources required to perform computing operations. For example, central processing unit (CPU) or graphics processing unit (GPU) resources, storage resources (memory space), network resources, etc. In the following embodiments of this application, the computing resources mainly involved in AIGC are GPU computing resources.
[0026] Instance: A cloud service provider provides instance services. An instance is a computing unit with computing resources that can run tenant tasks. Common instances include virtual machines (VMs), containers, or bare metal servers.
[0027] Virtual Machine: A complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment. Any work that can be done in a physical computer can be done in a VM. When creating a VM in a computer, part of the hard disk and memory capacity of the physical machine needs to be used as the hard disk and memory capacity of the virtual machine. Each VM has an independent hard disk and operating system, and the VM can be operated just like a physical machine.
[0028] Central GPU node: refers to the GPU server located in the center of the network. It is usually an area where computing devices are deployed in large quantities, such as a well-known and large data center.
[0029] Edge GPU nodes: refers to GPU servers located at the edge of the network, which are generally small data centers located close to end users and can be responsible for processing locally generated data and performing computing tasks. There are fewer intermediate links between edge GPU nodes and the final access users, and end users have better responsiveness and connection speed when accessing.
[0030] Management and scheduling: refers to the process of virtualizing, organizing, coordinating and monitoring computing resources through software systems, with the aim of making the most efficient use of computing resources.
[0031] Distributed computing framework: allows multiple computing nodes to jointly process a large computing task. This framework can make the execution of computing tasks more efficient and improve the scalability of the system.
[0032] Network topology: refers to the connection relationship between each node in the network, including directed acyclic graphs, star networks, tree networks and other forms.
[0033] Traffic analysis: refers to collecting and analyzing data flows in the network to understand the operation of the network in order to make time-sharing predictions for resource management models and facilitate resource adjustments.
[0034] Serverless computing (abbreviated as serverless): It is a computing paradigm. Serverless is based on Platform-as-a-Service (PaaS) and provides a micro-architecture. Users do not need to deploy, configure or manage servers. The server services required for code running, such as elastic scaling of backend resources, can be provided by the serverless platform in the cloud, which frees developers from managing servers. Serverless platforms usually rely on dedicated schedulers to create new instances on nodes based on various factors, such as resource and performance requirements. Normally, when a function call request arrives, if there is no idle instance, the scheduler can create a new instance in a virtual machine according to the scheduling policy. After the instance is successfully created, it can be used to execute the function call request. The scheduler of the serverless platform plays an important role in maintaining resource efficiency, function density (usually represented by the number of instances running concurrently in a node) and user-oriented experience.
[0035] A virtual machine is a node where a service is executed, such as a node where FaaS is executed, or a node where SaaS is executed. Specifically, a virtual machine can be an emulator of a computer system, which can provide the functions of a physical computer by simulating a complete computer system with complete hardware system functions and running in a completely isolated environment through software. In the present application, a virtual machine may include two states, one is a deployed state, which specifically refers to an instance of the service (such as function as a service FaaS or simply referred to as function) that has been deployed on the current virtual machine, and the other is an undeployed state, which specifically refers to an instance of the service (such as function) that does not exist on the current virtual machine. Among them, an instance can be an executable environment allocated by the platform for services such as functions, which can be used to execute services such as functions, and the instance can usually exist in the form of a container. It should be noted that the above-mentioned executable environment can also be a virtual machine, and the instance can also exist in the form of a virtual machine.
[0036] The serverless platform usually includes a dedicated scheduler, such as a scheduler. When a function call request arrives at the serverless platform, the function call request can be forwarded to the scheduler by the gateway. If there is no idle instance, the scheduler can create a new instance in a virtual machine according to the scheduling policy. After the instance is successfully created, it can be used to execute the function request.
[0037] The following takes the scenario of AIGC generating a 3D model as an example for explanation.
[0038] The 3D model may be a human model, an animal model, or other types of models. The model may be a full-body model, a half-body model, a side-view model, or a head model, etc. For convenience of explanation, the present application embodiment takes the 3D model as a head model of a human as an example for explanation.
[0039] See also Figure 1 , which is a schematic diagram of the user interface provided in the embodiment of the present application Figure 1 .
[0040] The application running on the user's terminal device may have a functional module for generating a "3D avatar". After the user enters the functional module, the user can configure the generation of the "3D avatar". The user can upload at least one initial image as input data required to generate the "3D avatar". Preferably, in order to enhance the anthropomorphism of the finally generated "3D avatar", the similarity with the person in the initial image, and the aesthetics, it is generally recommended to upload multiple initial images.
[0041] When the user completes uploading the initial image and triggers the start of "3D avatar" generation, a corresponding computing task is generated, and the computing device cluster needs to allocate corresponding GPU computing resources for the computing task. The following description of this application takes the computer device cluster providing GPU computing resources in the form of an instance as an example.
[0042] When a computing device cluster uses AIGC technology to generate a "3D avatar", it includes two steps:
[0043] 1. Generate a 2D image using a 2D image generation model based on the initial image;
[0044] 2. Generate a 3D image using a 3D image generation model and multiple 2D images, and send the 3D image data back to the terminal device. After the terminal device performs corresponding image rendering, the "3D avatar" can be displayed on the screen.
[0045] Continue to see Figure 1If, during the peak period of the task, multiple users are generating "3D avatars" at the same time, resulting in high concurrency of image generation tasks, the scheduling efficiency of GPU computing resources in the relevant solution is low, which will cause the user's waiting time to be extended, reducing the user's experience. Figure 1 In high-concurrency scenarios, queues appear and the terminal device needs to wait for a certain period of time to obtain 3D image data.
[0046] See also Figure 2 , which is a schematic diagram of the user interface provided in the embodiment of the present application Figure 2 .
[0047] After the computing device completes the computing tasks related to the generation of the "3D avatar", it sends the 3D image data back to the terminal device. After the terminal device performs the corresponding image rendering, the "3D avatar" can be displayed on the screen.
[0048] The above is only one application scenario of AIGC generating 3D models. After the 3D model is generated, it can be provided to users by integrating it into applications. For example, the management system of 3D models can be integrated into applications, including but not limited to navigation applications, live broadcast applications, online conference applications, or online translation applications.
[0049] One integration method may be to integrate the 3D avatar management system into navigation applications, live broadcast applications, online conference applications, online translation applications, etc. when developing the above applications. In other words, the 3D avatar management system may be a functional module or subsystem of the application.
[0050] Another integration method may be to integrate the application in the form of a plug-in. The plug-in can interact with the application to implement the management function of the 3D avatar. The management method of the 3D avatar can also be provided to users through cloud services. For example, a navigation application, a live broadcast application, an online conference application, or an online translation application can call a cloud service to implement the management function of the virtual image.
[0051] The following examples illustrate the method when applied to navigation scenarios, live broadcast scenarios, online conference scenarios, online translation scenarios, etc.
[0052] In some possible implementations, 3D avatars can be applied to navigation scenarios, such as road-level navigation or lane-level navigation. For example, during navigation, if the 3D avatar is enabled, the icon of the current user or the user's vehicle can be switched to a 3D avatar. As the user's position moves along the navigation route, the 3D avatar displayed in the navigation application interface moves accordingly. During the movement of the 3D avatar, the 3D avatar can perform corresponding actions according to predetermined action logic, such as blinking, shaking the head, shaking, etc.
[0053] In some other possible implementations, 3D avatars or 3D models can be used in live broadcast scenarios. For example, when the anchor broadcasts live through a live broadcast application, the 3D avatar live broadcast function can be triggered. The live broadcast application can call a cloud service, which can receive the image template of the 3D avatar configured by the anchor, and obtain video data in real time through a camera, and obtain audio data in real time through a microphone, and then map the features (such as facial features, action features) extracted from multimodal data including video data and audio data to a 3D image generation algorithm. For example, the facial features extracted from the video data can be fused with the facial features extracted from the audio data, and the action features extracted from the video data can be fused with the action features extracted from the audio data, and the fused facial features or fused action features can be mapped to the 3D image generation algorithm, thereby driving the 3D image generation algorithm to generate a 3D image of the anchor, specifically generating a 3D image with similar facial features and similar action features to the anchor, so that the live broadcast application can display a 3D model or 3D avatar with similar facial features and similar action features to the anchor. Among them, when extracting features from video data, the video data can be converted into a separate frame for processing.
[0054] In some other possible implementations, 3D avatars can also be used in online conference scenarios. Users can trigger the 3D avatar generation operation, and the online conference application can call the cloud service for generating 3D avatars in response to the user's above operation. At this time, the terminal device can upload the video data and / or audio data to the computing device cluster, and the computing device cluster fuses the facial features extracted from the video data and / or the facial features extracted from the audio data, fuses the motion features extracted from the video data and / or the motion features extracted from the audio data, and maps the fused facial features or fused motion features to the 3D image generation algorithm to generate a 3D image with the facial features and motion characteristics of the participants.
[0055] In some other possible implementations, 3D avatars can also be used in online translation scenarios. Usually, online translation applications can translate the voice of the speaker in the video online, for example, translating language A into language B. To further enhance the user experience, online translation applications can call a cloud service for generating 3D avatars, and generate a "3D avatar" using AIGC technology based on the user's configuration information. When performing online translation, the speaker's motion features or facial features are extracted from the video data, and the motion features or facial features are extracted from the audio data. Then, the motion features or facial features extracted from the video data and the motion features or facial features extracted from the audio data are mapped to the "3D avatar", so that the lip shape of the "3D avatar" is the same as the lip shape of the speaker in the video when speaking language B.
[0056] The above various application scenarios are only for illustration. In actual applications, other application scenarios may also be included, such as AIGC generating videos or AIGC generating media comments, etc. This application will not go into details one by one. In the above scenarios, a large amount of GPU computing resources are required, and due to the high price of GPUs, the hardware cost of completing computing tasks is high, which puts forward higher requirements for the reasonable scheduling and reuse of computing resources. The computing device in the following embodiments of this application is a GPU node device, that is, a GPU server.
[0057] Taking the pixel specification of a 2D image generated by a computing device as 1024×1024 as an example, it generally takes about 6-10 seconds to generate a 2D image, and it generally takes longer to generate a 3D image.
[0058] At present, when the computing device processes the "3D avatar" generation task, the initial traffic data will first flow to the target computer room of the central GPU node, and then allocate GPU computing resources through the computer room. Allocating computing resources is to allocate corresponding containers for computing tasks. In related schemes, the provider of computing equipment generally allocates a fixed number of instances to the user of computing equipment. The specific number of allocated instances can be determined by pre-negotiation between the provider and the user. This fixed number of instances provides the GPU computing resources required by AIGC for the user, but this allocation method is single. When the task is in the off-peak period, many instances are idle, resulting in a large amount of computing resources being wasted, and unnecessary computing equipment usage fees will be incurred. When the task is in the peak period, multiple computing tasks are concurrent, and there will be a phenomenon of competing for containers, making it difficult to estimate the completion time of the computing task, and the overall completion time is prolonged, which prolongs the time the user waits for the completion of the computing task, reducing the user's experience.
[0059] In order to solve the above technical problems, the embodiments of the present application provide an instance scheduling method, device, computing device cluster and storage medium. In the solution provided by the present application, the edge computing device cluster is used to provide computing services, which can effectively reduce the amount of data transmitted over the network, reduce computing delays, and thus improve computing efficiency. After the first instance resource pool is allocated to the user, the unscheduled instances are recovered from the first instance resource pool according to the control factor corresponding to the user and the number of instance requirements of the user, so as to realize the recovery of the user's currently unused instances, thereby reducing the user's computing resource usage overhead. It is also possible to allocate instances to the first instance resource pool based on the predicted results of the number of future instance requirements of the user, and to achieve the expansion of the first instance resource pool to ensure that the user has sufficient computing resources to complete the computing task. Therefore, this method improves the instance scheduling efficiency, thereby improving the utilization rate of computing resources.
[0060] The following describes the invention in conjunction with specific embodiments.
[0061] An embodiment of the present application provides an instance scheduling method, which is described in detail below with reference to the accompanying drawings.
[0062] See also Figure 3 , which is a flowchart of an example scheduling method provided in an embodiment of the present application.
[0063] The method comprises the following steps:
[0064] S11: Allocate a first instance resource pool to a user, where the first instance resource pool includes multiple instances.
[0065] In the embodiment of the present application, the edge computing device cluster provides computing services based on the serverless architecture. The present application scheme is intended to enable users to achieve "pay-per-usage", that is, to pay for the computing resources used. For idle computing resources, the scheme of the present application can automatically recycle them, thereby saving costs.
[0066] In a possible implementation, the edge computing device cluster includes multiple edge computing devices, and the edge computing device may be an edge GPU node, that is, an edge GPU server.
[0067] The cloud service provider provides an instance service, and an instance is a computing unit with computing resources, which can run the computing tasks of the user. In the embodiment of the present application, the type of the instance is a container as an example for explanation.
[0068] The cloud service provider can deploy instances on the edge computing device cluster. All available instances on the edge computing device cluster form a cluster instance resource pool of the edge computing device cluster. Generally, an edge computing device cluster can provide services for one or more users. The edge computing device cluster can pre-allocate a first instance resource pool for each user. The first instance resource pool includes multiple instances. For example, the cluster instance resource pool of the edge computing device cluster includes 100 instances, and the first instance resource pool allocated to the user includes 10 instances.
[0069] In the embodiment of the present application, computing resources are deployed on edge computing devices, and the edge computing devices perform task scheduling and computing resource management, and directly calculate the return results. The user request path and response return path no longer need to pass through the central node. The internal network topology is shortened to allow the traffic forwarding path to be shorter, so that the request path of the computing task is shortened, the user's response is faster, the resource waste rate is reduced, and the delay is reduced.
[0070] The number of instances in the first instance resource pool may be determined by the cloud service provider and the user, and this embodiment of the present application does not impose any specific limitation on this.
[0071] In the related technical solutions, the number of instances in the first instance resource pool is generally maintained unchanged after being determined. If you want to change the number of instances in the first instance resource pool, the cloud service provider and the user need to jointly determine the new number of instances. This method will cause users to often only be able to determine the number of instances according to the peak period of computing tasks to ensure that the number of instances can meet the peak demand, but during the trough period of computing tasks, there will be more instances in an idle state. These idle instances not only cause idle waste of computing resources, but are still in use for users, requiring users to pay corresponding usage costs.
[0072] In the solution of the embodiment of the present application, the number of instances in the first instance resource pool allocated to the user is not fixed, but can be dynamically recycled and expanded. In the initial state, the number of instances in the first instance resource pool is a preset number. After instance recycling, the number of instances in the first instance resource pool is less than the preset number, and the number of instances that the user needs to pay for the use cost is reduced. The recycled instances can be returned to the cluster instance resource pool by the cloud service provider and allocated to other users for use.
[0073] The first instance resource pool in the embodiment of the present application indicates the number of instances and is not specifically bound to a fixed device. For example, the number of instances in the first instance resource pool is 10, and the 10 instances can be provided by any device.
[0074] After receiving the computing task, the computing device cluster can determine the number of instances required by the user and allocate instances. The number of instances required by the user at different times is different.
[0075] Taking the AIGC technology to generate "3D avatars" as an example, the computing task can be to generate "2D images" and / or generate "3D images". The more images that need to be generated, the more instances are required. For example, when the computing task is to generate 10 "2D images" and 10 "3D images", the corresponding computing resource requirements are 5 instances. When the computing task is to generate 20 "2D images" and 20 "3D images", the corresponding computing resource requirements are 10 instances.
[0076] When allocating the required instances according to the number of instances required by the user, the routing module (Router) can be used to find out whether there are idle instances in the cluster instance resource pool that can be allocated. The routing module stores the paths to each instance in the routing table, and can then access each instance through the path to query whether each instance is currently available. If so, the instance is returned for direct scheduling to complete the corresponding computing task. If not, you can wait for an idle instance to appear before scheduling the instance, or send an instance scheduling request to other edge computing device clusters or other central computing device clusters to schedule idle instances.
[0077] S12: Reclaiming unscheduled instances from the first instance resource pool according to the number of instance requirements of the user and the control factor corresponding to the user.
[0078] When the task is in the valley period, the number of computing tasks may be small, the number of instance requirements is small, and the number of instances actually scheduled during the valley period is generally less than the number of instances in the initial first instance resource pool. For example, in S11, the initial number of instances in the first instance resource pool is 10, but the number of instances allocated for use is 2. At this time, there are 8 instances in the first instance resource pool that are not scheduled, that is, they are in an idle state.
[0079] The solution of the present application can return idle instances to the cluster instance resource pool for redistribution. The user and the cloud service provider can predetermine a control factor, which is used to indicate the number of instances to be recycled.
[0080] The control factor may be a specific proportional value or a specific number, and is not specifically limited in the embodiments of the present application.
[0081] In one possible implementation, the control factor may be a proportional value, such as 50%, which indicates that 50% of all idle instances are returned to the cluster instance resource pool. When the number of instances in the first instance resource pool is initially 10 and there are 8 instances that are not scheduled, 4 instances are returned to the cluster instance resource pool. At this time, the number of instances in the first instance resource pool is adjusted to 6, including 2 scheduled instances and 4 unscheduled instances. It is understandable that when the calculated number of recovered instances is not an integer, it can be rounded up or down, and the embodiments of the present application are not specifically limited.
[0082] In a possible implementation, the control factor can be a specific number, for example, set to 3, indicating that 3 of all idle instances are returned to the cluster instance resource pool. The number of instances in the first instance resource pool is initially 10. When 8 instances are not scheduled, 3 instances are returned to the cluster instance resource pool. At this time, the number of instances in the first instance resource pool is adjusted to 7, including 2 scheduled instances and 5 unscheduled instances.
[0083] The embodiment of the present application does not impose any specific limitation on the specific configuration value of the control factor, which can be determined according to actual conditions.
[0084] In actual applications, specific trigger conditions may also be set for enabling instance recycling, including but not limited to time conditions and instance utilization conditions, which are described below.
[0085] In one possible implementation, during the task peak period, the number of computing tasks is large, the number of instance demands is large, and there is no need to recycle instances. During the task trough period, the number of computing tasks is small, the number of instance demands is small, and instance recycle can be performed. Users and cloud service providers can preset the task trough period, and recycle instances when the current moment is in the task trough period. For example, the task trough period can be set to 2 am to 5 am, and instance recycle can be performed during this time period. Furthermore, users and cloud service providers can also set the task trough period to suspend the processing of computing tasks, and recycle all instances in the first instance resource pool, that is, the control factor during the task trough period is 100%.
[0086] It can be understood that the control factor can also be configured as a variable parameter value, that is, the control factor can be related to the current time period. When the current time period is in the task trough period, the control factor can be set to a larger proportion, or even to 100%; when the current time period is in the task peak period, the control factor can be set to a smaller proportion, or even to 0.
[0087] In another possible implementation, the instance utilization rate of the user can be used as a condition for instance recycling. For example, the user and the cloud service provider can preset an instance utilization threshold. The instance utilization rate is the ratio of the number of scheduled instances to the number of instances in the first instance resource pool. When the instance utilization rate is less than the instance utilization rate threshold, the instance is recycled according to the number of instance requirements and the control factor. When the utilization rate is greater than or equal to the instance utilization rate threshold, the instance is not recycled. For example, the instance utilization rate threshold can be set to 50%, the control factor is 50%, the number of instances in the first instance resource pool is initially 10, and 2 instances are currently scheduled. The instance utilization rate is 20%, which is less than the instance utilization rate threshold, and 4 instances are recycled into the cluster instance resource pool. There are 2 scheduled instances and 4 unscheduled instances left. The instance utilization rate at this time is one-third, which is still less than 50%. Continue to recycle 2 instances into the cluster instance resource pool. At this time, there are 2 scheduled instances and 2 unscheduled instances left, and the instance utilization rate is 50%, which meets the condition of being greater than or equal to the instance utilization rate threshold, and the instance is no longer recycled.
[0088] It is understandable that in the above embodiments, multiple instance recycling is performed until the instance utilization is greater than or equal to the instance utilization threshold. In practical applications, when it is determined that the instance utilization is less than the instance utilization threshold, recycling may be performed only once or a set number of times, and it is not necessary to make the instance utilization after recycling satisfy or be greater than or equal to the instance utilization threshold.
[0089] Through the above instance recycling measures, users can reduce the cost of using idle instances, that is, reduce the cost of using computing devices. For cloud service providers, idle instances can be recycled and reallocated in a timely manner, achieving efficient transfer of instances between different users, reducing idle waste of computing resources, and improving the utilization of computing resources.
[0090] In addition, the solution of the embodiment of the present application can also enable the cloud service provider to use the same number of computing devices to provide services to a larger number of users while ensuring the utilization rate of computing resources.
[0091] Assume that the cluster instance resource pool of the edge computing device cluster includes 100 instances. If 10 instances are fixedly allocated to each user, the edge computing device cluster can only provide services for 10 users. However, after adopting the above instance recovery method, due to the staggered task peaks and task troughs of each user, for example, the task peak of user 1 may just correspond to the task trough of user 2. Through analysis, it can be found that there are always at least a certain number of instances recycled into the cluster instance resource pool throughout the day. For example, there are always 10 instances recycled, and these 10 instances can be recovered from the first instance resource pool corresponding to one or more users. Therefore, the edge computing device cluster can use these 10 instances to provide computing services for the 11th user. The above is only an illustrative distance and does not constitute a limitation on the technical effect of the present application scheme.
[0092] S13: Allocate instances to the first instance resource pool according to the prediction result of the number of instances required by the user in the future, so as to increase the number of instances in the first instance resource pool.
[0093] S12 describes the instance recycling method. After the instance is recycled, the number of instances in the first instance resource pool decreases. However, if the task peaks at this time, or the instantaneous number of computing tasks increases, or the computing tasks show a more obvious upward trend, resulting in the prediction result of the number of instance requirements, it is determined that the current number of instances in the first instance resource pool is insufficient or will be insufficient in the future. In order to avoid insufficient instances when computing tasks are highly concurrent, the present application solution can also perform asynchronous instance expansion, that is, allocate instances to the first instance resource pool from the cluster instance resource pool to increase the number of instances in the first instance resource pool.
[0094] Continuing with the example of using AIGC technology to generate "3D avatars", when the number of computing tasks for generating "2D images" and / or generating "3D images" is stable, it is considered that the number of instance requirements in the future will not increase and no capacity expansion is required. However, when the number of computing tasks for generating "2D images" and / or generating "3D images" is on an upward trend, it can be considered that the number of instance requirements in the future is on an increasing trend. In this case, advance instance capacity expansion is required to ensure that there are sufficient instances available for allocation after the number of computing tasks increases in the future, thereby ensuring the response speed of the computing tasks.
[0095] In one possible implementation, the number of instance demands can be monitored according to a preset period, and whether capacity expansion is required can be determined based on changes in the number of instance demands. The present application embodiment does not specifically limit the preset period, but in order to achieve a high concurrency of rapid response computing tasks, the preset period is generally set to be relatively short, such as 1 minute, to avoid high-concurrency computing tasks being unable to be processed for a long time. At this time, the predicted number of future instance demands is also the number of instance demands in the next 1 minute.
[0096] It is understandable that in some embodiments, after the number of instances is expanded, the number of instances in the first instance resource pool may be less than or equal to the initial number of instances in the first instance resource pool, such as 10 in the above example. In other embodiments, the user and the server may pre-set the maximum number of instances in the first instance resource pool allowed by asynchronous expansion, which may be greater than the initial number, such as 12.
[0097] By expanding the number of instances in advance, the corresponding speed can be improved.
[0098] In a possible implementation, when the number of instances is expanded, the expansion may be performed according to a fixed expansion factor. The control factor may be a specific ratio value or a specific number, which is used to indicate the number of instances to be expanded.
[0099] Taking the expansion factor as a proportional value as an example, for example, 50%, it indicates that the number of instances for each expansion is 50% of the difference between the maximum number of instances and the current number of instances. For example, at this time, the number of instances in the first instance resource pool is 4, the maximum number of instances in the first instance resource pool is 10, and the difference is 6. Then, this expansion allocates 3 instances from the cluster instance resource pool to the first instance resource pool, and the number of instances in the first instance resource pool after expansion is 7. For another example, at this time, the number of instances in the first instance resource pool is 6, the maximum number of instances in the first instance resource pool is 12, and the difference is 6. Then, this expansion allocates 3 instances from the cluster instance resource pool to the first instance resource pool, and the number of instances in the first instance resource pool after expansion is 9. It can be understood that when the calculated number of instances allocated to the first instance resource pool is not an integer, it can be rounded up or rounded down, and the embodiments of the present application are not specifically limited.
[0100] Taking the expansion factor as a quantity as an example, for example, 2, it is used to indicate that 2 instances are allocated from the cluster instance resource pool to the first instance resource pool.
[0101] It is understandable that the above steps of the embodiment of the present application are only for the convenience of explanation and do not constitute a limitation on the technical solution of the present application. For example, during the peak task time period, only the instance expansion of S14 may be performed, and the instance recycling of S13 may not be performed. During the low task time period, only the instance recycling of S13 may be performed, and the instance expansion of S14 may not be performed. S12 and S13 can be implemented by two parallel running processes respectively. In practical applications, it takes a certain amount of time to complete the recycling and expansion of the instance. In order not to affect the completion of the computing task, after confirming the number of instance requirements of the user, the instance allocation can be performed first.
[0102] In summary, by using the technical solution provided by the embodiment of the present application, by allocating computing tasks to edge nodes, the amount of data transmitted over the network can be effectively reduced, computing delays can be reduced, and computing efficiency can be improved. For cloud service providers, idle instances can be recycled and reallocated in a timely manner through instance recycling, which helps to achieve efficient transfer of instances between different users, reduces idle waste of computing resources, improves the utilization rate of computing resources, and ensures that the computing resources of the edge computing device cluster are always in an efficient scheduling state. By expanding instance capacity, the task processing capabilities of users during peak task periods can also be improved.
[0103] The following is an explanation in conjunction with a specific implementation method.
[0104] See also Figure 4 , which is a schematic diagram of the architecture of the computing device cluster provided in an embodiment of the present application.
[0105] Figure 4The architecture schematically illustrates an architecture diagram including a central computing device cluster and an edge computing device cluster.
[0106] The central cloud computer room includes the central computing equipment cluster Service1-ServiceN and the Ai controller (Manager) 2.
[0107] The edge cloud computer room includes edge computing device cluster Service1'-ServiceM' and Ai controller (Manager) 1.
[0108] M and N are both positive integers. The specific numbers of M and N are not limited in the present embodiment.
[0109] The Ai Manager of the computing device cluster can determine the number of instances required by the user based on the computing resource requirements, allocate instances to the user, and query and confirm whether there are available instances in the first instance resource pool through the routing module (Router). The routing module is used to find out whether there are idle instances in the cluster instance resource pool that can be allocated. The routing module stores the path to each instance in the routing table, and can then access each instance through the path to query whether each instance is currently available. The routing module returns the instance for direct scheduling when there are available instances. If there are no available instances, the instance can be allocated to the first instance resource pool from the central cluster instance resource pool, or instance scheduling can be requested from the adjacent computing device cluster to achieve hybrid cloud GPU management.
[0110] For example, when Ai Manager 2 determines that there are no remaining instances in the central cluster instance resource pool that can be allocated to the first instance resource pool, and there are no available instances in the first instance resource pool, Ai Manager 2 can try to schedule instances from the edge computing device cluster. For another example, when Ai Manager 1 determines that there are no remaining instances in the edge cluster instance resource pool that can be allocated to the first instance resource pool, and there are no available instances in the first instance resource pool, Ai Manager 1 can try to schedule instances from the central computing device cluster.
[0111] Ai Manager can also perform instance recovery and instance expansion for the user's first instance resource pool, as well as asynchronous fixed-time recovery of instances. Among them, asynchronous fixed-time recovery is used to return instances in the first instance resource pool that have not been configured and used for a long time to the cluster instance resource pool, and / or to recover instance resources when the current moment is in a pre-configured task low-time period. The task low-time period is a time period with a small number of tasks. The embodiment of this application does not specifically limit the task low-time period, and the task low-time period can be one or more time periods.
[0112] Ai Manager can also perform asynchronous fixed-time expansion of instances. During the task peak time period, the number of instances in the first instance resource pool is maintained at a second preset number. The second preset number can be the initial number of the first instance resource pool. When the number of instances in the first instance resource pool is less than the second preset number, instances are allocated from the cluster instance resource pool to the first instance resource pool to achieve expansion of the instance resource pool. The task peak time period is a time period with a large number of tasks. The embodiment of the present application does not specifically limit the task peak time period, and the task peak time period can be one or more time periods.
[0113] Figure 4 In the scenario shown, the computing task can be completed by a central computing device cluster or by an edge computing device cluster, which are explained below.
[0114] The central cloud computer room and edge cloud computer room are generally located in different physical locations. For example, the central cloud computer room is located in area A, and the edge cloud computer room is located in area B.
[0115] In a possible implementation, regardless of whether the user's physical location is close to area A or area B, the user's task request reaches the central cloud computer room through the central node entrance, and the Ai Manager2 in the central cloud computer room allocates and schedules the instance. When the instance of the central computing device cluster can complete the task request, the task request is provided with computing services by the central computing device cluster. If there is a high concurrency of instantaneous computing tasks, Ai Manager2 can request scheduling instances from adjacent computing device clusters. The adjacent computing device cluster can be a computing device cluster with adjacent physical locations, specifically another central computing device cluster or an edge computing device cluster, which is not limited in the embodiment of the present application. In addition, the adjacent in the embodiment of the present application is a relative concept, which is only to shorten the path length of information transmission, and is not limited to the closest computing device cluster, and the second closest computing device cluster can also be selected. It can be understood that if the instance resources of other computing device clusters need to be scheduled, the central cloud computer room needs to carry out resource transfer, that is, to send the relevant data required to complete the computing task to other computing device clusters.
[0116] Taking the AIGC technology to generate a "3D avatar" as an example, the computing task can be to generate a "2D image" and / or generate a "3D image". The computing task request carries the initial data required for the computing task, that is, the initial image information uploaded by the APP end user. When the central cloud computer room assigns part of the image generation task to Figure 4 When the instance of the edge cloud computer room shown is completed, the central cloud computer room needs to send the corresponding image information of this part of the image generation task to the edge cloud computer room.
[0117] The example recovery and scheduling scheme of this application can be applied to the above scenarios, but the above scenarios may have the problem of long computing task response time. This is because if you rely solely on the central cloud computer room, if the user's physical location is far away from area A where the central cloud computer room is located, there will be a long data transmission link when delivering the computing task and feedback of the computing results, which will lead to high network transmission delay.
[0118] Therefore, in addition to being applicable to the above scenarios, the present application solution also provides a method for preferentially using edge computing device clusters to provide computing services. In this method, the user's computing task request will flow into the computing device cluster closest to the user's current physical location. The domain name can be resolved by the domain name system (DNS) of the task request, and the domain name can be translated into an IP address that can be recognized by the computer, thereby determining the computing device cluster closest to the computing task request. Taking the user's physical location as area B as an example, the traffic entrance of the computing task request at this time is the edge node entrance. The Ai Manager1 in the edge cloud computer room allocates and schedules the instance. When the instance of the edge computing device cluster can complete the task request, the computing task is completed by the edge computing device cluster. If there is a high concurrency of instantaneous computing tasks, Ai Manager1 can request a scheduling instance from an adjacent computing device cluster. The adjacent computing device cluster can be a central computing device cluster or another edge computing device cluster, which is not limited in the embodiments of the present application. It can be understood that if the instance resources of other computing device clusters need to be scheduled, the edge cloud computer room needs to carry out resource transfer, that is, the relevant data required to complete the computing task is sent to other computing device clusters.
[0119] When computing tasks are completed by a closer cluster of edge computing devices, the data transmission links for the delivery of computing tasks and the feedback of computing results are shortened, thereby shortening network transmission delays.
[0120] In a possible implementation, the instance is used to generate a 2D image and / or a 3D image based on an initial image uploaded by a user, and when the initial image is transmitted in a computing device cluster or between different computing device clusters, and when the generated 2D image and / or 3D image is fed back, Internet Protocol version 6 (IPv6) is used. This is because considering that the application solution involves the transmission of images, the amount of data is generally larger than that of text information, and therefore the multicast support of IPv6 is utilized to send bandwidth-intensive data packet streams (such as multimedia streams) to multiple destinations at one time, thereby accelerating the speed of streaming media related streams, improving network transmission efficiency, and reducing user delays.
[0121] It is understandable that in other scenarios, only a central computing device cluster may be included, and the instance scheduling method is implemented by the central computing device cluster. In some scenarios, only an edge computing device cluster may be included, and the instance scheduling method is implemented by the edge computing device cluster.
[0122] The following takes the example of an edge computing device cluster completing a computing task to illustrate the specific implementation method of the solution of the embodiment of the present application.
[0123] See also Figure 5 , which is a flowchart of another example scheduling method provided in an embodiment of the present application.
[0124] Taking the AIGC technology to generate a "3D avatar" as an example, the method includes the following steps:
[0125] S21: Ai Manager 1 of the edge computing device cluster obtains a task request.
[0126] Ai Manager 1 obtains a task request, and in the embodiment of the present application, the task is taken as a 2D image generation task and / or a 3D image generation task. It is understandable that the type of task may also include a video generation task, etc.
[0127] In actual applications, the number of task requests is generally multiple. In the following embodiments, a task request includes both a request for a 2D image generation task and a request for a 3D image generation task as an example.
[0128] The task request can carry the image data required to generate the image, which is the initial image data uploaded by the APP user.
[0129] S22: Ai Manager 1 determines the number of instances required by the user.
[0130] When Ai Manager 1 receives a task request, it can determine the number of instance requirements based on the user's computing resource requirements. Specifically, Ai Manager 1 determines the computing resource requirements based on the number of the user's 2D image generation tasks and 3D image generation tasks, and the computing resources required for each 2D image generation task and 3D image generation task. The computing resource requirements include the CPU core number requirements, memory requirements, and display memory requirements.
[0131] For example, the number of CPU cores required to complete a 2D image generation task is a, the memory requirement is b, and the display memory requirement is c. There are x current 2D image generation tasks. The number of CPU cores required to complete all 2D image generation tasks is ax, the memory requirement is bx, and the display memory requirement is cx. Similarly, the required computing resources to complete all 3D image generation tasks can be determined.
[0132] Ai Manager 1 determines the required number of instances based on the computing resource requirements and instance specifications, wherein the instance specifications indicate the number of CPU cores, memory size, and display storage size included in a single instance.
[0133] In actual applications, the instance specifications of each instance in the first instance resource pool are generally the same to facilitate management and allocation. It is understandable that each instance in the first instance resource pool may also adopt different instance specifications, for example, some instances adopt the first instance specification, and other instances adopt the second instance specification. At this time, when determining the number of instance requirements, the most suitable instance can be matched according to the computing resource requirements and different instance specifications. For example, the first instance specification is 1 core CPU, 1G memory, 12G graphics card memory; the second instance specification is 1 core CPU, 1G memory, 8G graphics card memory; the current computing resource requirement is 1 core CPU, 1G memory, 6G graphics card memory, then the instance of the second instance specification can be matched to reduce the waste of computing resources.
[0134] In the relevant technical solution, taking the instance as a container, the size of an instance is usually set to 4 core CPUs, 8G memory, referred to as 4C8G, and 32G graphics card memory (referred to as video memory) is allocated. An instance is only used to run one computing task. If the configuration required for the computing task is only 1C1G, 3G video memory, allocating a traditional instance will result in a large amount of hardware resources being wasted. This will lead to a small number of containers actually available. When multiple computing tasks are concurrent, there will be a phenomenon of competing for containers, making it difficult to estimate the completion time of the computing task, and the overall completion time is prolonged, and the reallocation of computing resources will also result in a large amount of node computing power being wasted. Ultimately, it will take longer for the terminal device to obtain 3D model data, reducing the user experience.
[0135] Therefore, the solution of the present application utilizes CPU virtualization and memory virtualization technology to achieve flexible configuration of CPU resources and memory resources. And the computing device is GPU virtualized, a physical GPU is virtualized into multiple virtual GPU devices for use by different instances, and each instance accesses part of the GPU resources of the physical GPU. Through GPU virtualization technology, the embodiment of the present application can flexibly configure instances. For example, the instance specifications in the embodiment of the present application are configured as 1 core CPU, 1G memory, referred to as 1C1G, and 12G graphics card memory is allocated, thereby reducing the waste of computing resources.
[0136] S23: Allocate required instances from the cluster instance resource pool to the first instance resource pool.
[0137] The cloud service provider and the user predetermine that the initial value of the number of instances in the first instance resource pool is a preset number, for example, the preset number is 10. Generally, after instance recycling, the number of instances in the first instance resource pool is less than the preset number. After instance expansion, the maximum number of instances in the first instance resource pool is the preset number.
[0138] In other embodiments, the number of instances in the first resource pool after instance expansion may also be greater than the preset number, and the maximum number of instances in the first resource pool is generally predetermined by the cloud service provider and the user. In the following embodiments, the maximum number of instances in the first resource pool is taken as the preset number as an example for explanation.
[0139] Since the solution of the present application is capable of recovering and expanding instances in the first instance resource pool, the number of instances in the first instance resource pool can change dynamically, ranging from 0 to a preset number.
[0140] After Ai Manager1 determines the number of instance requirements, it allocates the required instances from the first instance resource pool through the Router module. For example, if the number of instances that need to be scheduled is 5, and the number of currently idle instances in the first instance resource pool is 6, then the number of instances in the first instance resource pool is sufficient, and the instances can be returned for direct scheduling. If the number of currently idle instances in the first instance resource pool is less than 5, instances need to be allocated from the cluster instance resource pool to the first instance resource pool for replenishment.
[0141] When supplementing instances, Ai Manager 1 can search for unscheduled instances from the cluster instance resource pool through the Router module. If the number of unscheduled instances is sufficient, a corresponding number of instances can be directly allocated to the first instance resource pool.
[0142] S24: Scheduling instances from one or more adjacent computing device clusters.
[0143] If the number of unscheduled instances in the cluster instance resource pool is insufficient, Ai Manager 1 may try to schedule instances from an adjacent computing device cluster.
[0144] For example, if the number of instances in the first instance resource pool is 6 and the number of instance requirements is 8, then 2 instances need to be allocated from the edge cluster instance resource pool to the first instance resource pool. However, the number of unscheduled instances in the current edge cluster instance resource pool is 1, then 1 instance needs to be scheduled from the adjacent computing device cluster.
[0145] It is understandable that when allocating instances to the first instance resource pool, the instances of the current edge computing device cluster are allocated first, and then the remaining instances are scheduled from one or more adjacent computing device clusters. This is because the current edge computing device cluster is the computing cluster closest to the user in terms of physical location, and the data transmission line is the shortest, so the instances of the edge computing device cluster are used first.
[0146] One or more adjacent computing device cluster scheduling instances may be adjacent edge computing device clusters, or adjacent central computing device clusters, which is not specifically limited in the embodiments of the present application.
[0147] In the embodiment of the present application, an adjacent computing device cluster is used as an example for explanation. In a possible implementation, when performing instance scheduling, Ai Manager 1 sends an instance scheduling request to the central computing device cluster, and Ai Manager 2 of the central computing device cluster determines whether there is an available instance in the central cluster instance resource pool according to the scheduling request. If so, it returns an instance scheduling result indicating successful scheduling to the edge computing device cluster, and if not, it returns an instance scheduling result indicating failed scheduling.
[0148] S25: One or more adjacent computing device clusters return instance scheduling results.
[0149] In the embodiment of the present application, the successful scheduling of an instance from a central computing device cluster is taken as an example for explanation.
[0150] The above steps illustrate the instance scheduling process. In actual applications, there may be a situation where there is an instantaneous high concurrency of task requests, that is, the number of instantaneous task requests is large, resulting in the number of instance requirements being greater than the number of instances in the first instance resource pool. The solution of the present application then allocates instances through queue buffering.
[0151] Specifically, when the number of instance requirements is greater than the number of instances in the first instance resource pool, the difference between the number of instance requirements and the number of instances in the first instance resource pool is determined as the first number, and the first number of instances cannot be allocated at present and need to be added to the queue to wait for instance allocation. When the first instance resource pool is expanded or an instance returns to an idle state after completing a computing task, so that a schedulable instance appears in the first instance resource pool, the instance scheduling task is completed in sequence starting from the head of the queue, as illustrated below.
[0152] Example 1: The number of instances required is 9, and the current number of instances in the first instance resource pool is 8. There is one instance missing, and there is a scheduling task for one instance in the queue. At this time, the first instance resource pool can be expanded, and Ai Manager1 allocates one instance to the first instance resource pool from the cluster instance resource pool of the edge computing device cluster, so that the first instance resource pool has a new callable instance. At this time, the scheduling task of the instance at the head of the queue is executed to call the newly added instance.
[0153] Example 2: The number of instance requirements is 11, and the current number of instances in the first instance resource pool is 9, so there are 2 instances missing, and there are scheduling tasks for 2 instances in the queue. At this time, the first instance resource pool can be expanded. After Ai Manager1 allocates 1 instance to the first instance resource pool from the cluster instance resource pool of the edge computing device cluster, a new callable instance is added to the first instance resource pool, and the number of instances of the first instance resource reaches the maximum value of 10 at this time, and the capacity cannot be further expanded. At this time, the scheduling task of an instance at the head of the queue is executed to call the newly added instance. There is still a scheduling task of 1 instance waiting to be executed in the queue. 10 instances can execute computing tasks in parallel. When the computing task of an instance is executed, the instance enters the first instance resource pool and waits to be called. At this time, a callable instance appears in the first instance resource pool, and the remaining instance scheduling task at the head of the queue calls the newly added instance.
[0154] S26: Ai Manager 1 sends the image data required to complete the image generation task to the central computing device cluster.
[0155] Because some image generation tasks need to be completed by scheduling instances of the central computing device cluster, the edge computing device cluster needs to forward the image data required to complete this part of the image generation task to the central computing device cluster.
[0156] S27: The central computing device cluster sends the generated image data to the edge computing device cluster.
[0157] After the instance of the central computing device cluster completes image generation, the generated image data, such as 2D image data and / or 3D image data, is sent to the edge computing device cluster, so that the edge computing device cluster provides feedback to the user. In another possible implementation, after the instance of the central computing device cluster completes image generation, it can also provide feedback directly to the user.
[0158] S28: Ai Manager 1 reclaims unscheduled instances from the first instance resource pool according to the number of instances required by the user and the control factor corresponding to the user.
[0159] In the embodiment of the present application, Ai Manager 1 recycles instance resources asynchronously, that is, the number of instances in the first instance resource pool is dynamically adjusted during the entire process of the edge computing device cluster providing computing services.
[0160] The control factor may be a specific ratio value or a specific number, which is used to indicate the number of instances to be recycled.
[0161] In a possible implementation, when the number of instance requirements is less than the number of instances in the first instance resource pool, Ai Manager1 reclaims the instances in the first instance resource pool according to the control factor corresponding to the user. That is, when there are idle instances in the first instance resource pool, Ai Manager1 can execute the instance reclaiming strategy to reduce the usage cost of the idle instances, so as to maximize the cloud service provider to reclaim and reallocate the idle instances in a timely manner, thus realizing the efficient transfer of instances between different users.
[0162] In another possible implementation, when the number of instance demands is less than the first preset number, Ai Manager 1 recycles the instances in the first instance resource pool according to the control factor corresponding to the user. The first preset number is less than the number of instances in the first instance resource pool. This implementation is equivalent to setting instance utilization conditions for enabling the control factor for instance recycling. When the number of instances that need to be scheduled is less than the first preset number, it indicates that the instance utilization at this time is low, the number of unscheduled instances is large, and the instances can be recycled.
[0163] In addition, you can also set time conditions for enabling control factors to recycle instances. For example, you can use control factors to recycle instances during low-volume periods, but not recycle instances during peak hours.
[0164] S29: Ai Manager 1 allocates instances to the first instance resource pool according to the prediction result of the number of instances required by the user in the future, so as to increase the number of instances in the first instance resource pool.
[0165] Ai Manager1 can obtain historical data of instance demand quantity according to a preset period. The historical data can form a discrete time series of instance demand quantity, which can be expressed as (T1, N1), (T2, N2), ..., (Ti, Ni), where i is a positive integer, and the sampling period of the discrete time series is a preset period, which is used to characterize the changing trend of instance demand quantity over time. In order to achieve instantaneous high concurrency of rapid response computing tasks, the preset period is generally set to be relatively short, such as 1 minute, to avoid high-concurrency computing tasks from being unable to be processed for a long time. Then Ai Manager1 obtains the prediction result of the future instance demand quantity based on the historical data of the instance demand quantity. For example, when the instance demand quantity in the discrete time series corresponding to the historical data shows an upward trend over time, the instance demand quantity representing the future gradually increases; when the instance demand quantity shows a downward trend over time, the instance demand quantity representing the future gradually decreases; when the instance demand quantity remains basically unchanged, the instance demand quantity representing the future is relatively stable and basically remains unchanged. Ai Manager1 can predict the future instance demand quantity based on the changing trend of the instance demand quantity, for example, predict the instance demand quantity one minute in the future.
[0166] In a possible implementation, Ai Manager 1 may fit the discrete time series corresponding to the instance demand quantity into a functional relationship between the instance demand quantity and time, thereby realizing the prediction of the instance demand quantity.
[0167] When the number of future instance requirements indicated by the prediction result of Ai Manager 1 is greater than the number of instances in the first instance resource pool, instances are allocated to the first instance resource pool from the cluster instance resource pool. When the number of future instance requirements indicated by the prediction result is less than or equal to the current number of instances in the first instance resource pool, it is determined that there is no current instance expansion demand.
[0168] By expanding capacity in advance, the response speed is improved, which can reduce the situation where instance scheduling tasks in the queue are waiting for instance scheduling to a certain extent, and improve the computing task processing capacity in high-concurrency computing task scenarios.
[0169] S30: Ai Manager 1 performs asynchronous fixed-time recycling and asynchronous fixed-time expansion of instance resources.
[0170] The asynchronous fixed-time recycling of instance resources is a parallel instance recycling strategy with S28 and can be executed in parallel. When performing asynchronous fixed-time recycling, Ai Manager1 recycles instances in the first instance resource pool that have not been scheduled within a preset time period, and / or recycles instance resources when the current time is within a pre-configured time period, as described in detail below.
[0171] The user and the cloud service provider can pre-configure the task valley time period, which is a time period with a small number of computing tasks. The task valley time period can be one or more time periods, which is not specifically limited in the embodiment of the present application. When Ai Manager 1 is in the task valley time period at the current moment, all instances or a fixed number of instances in the first instance resource pool are returned to the cluster instance resource pool, thereby reducing the user's computing resource usage overhead during the task valley time period.
[0172] In addition, Ai Manager 1 can also monitor in real time the duration of each instance in the first instance resource pool that is not scheduled. When there is a first instance in the first instance resource pool that is not scheduled within the preset time, the first instance is returned to the cluster instance resource pool. The embodiment of the present application does not specifically limit the preset time. In actual applications, the length of the preset time can be determined by the user and the cloud service provider, for example, set to 3 hours, 6 hours, etc.
[0173] Asynchronous fixed-time expansion of instance resources is a parallel instance expansion strategy to S29 and can be executed in parallel.
[0174] The user and the cloud service provider can pre-configure the task peak time period, which is a time period with a large number of computing tasks. The task peak time period can be one or more time periods, which is not specifically limited in the embodiment of the present application. When Ai Manager 1 determines that the current moment is in the task peak time period, it maintains the number of instances in the first instance resource pool as a second preset number.
[0175] In a possible implementation, the second preset number may be the initial number of the first instance resource pool, for example, 10. When the current number of instances in the first instance resource pool is less than the second preset number, Ai Manager 1 allocates instances from the cluster instance resource pool to the first instance resource pool to achieve capacity expansion of the instance resource pool, so that the instances in the first instance resource pool are sufficient during the task peak time period.
[0176] It is understandable that if the edge computing device cluster is configured with asynchronous fixed-time recycling and asynchronous fixed-time expansion of S29, the implementation of S28 and S29 requires that the current time is not in the business peak period or business trough period.
[0177] In addition, when Ai Manager1 performs asynchronous fixed-time recycling and asynchronous fixed-time expansion, it can also obtain the usage status of the instance and the usage status of GPU computing resources in real time, calculate the user's service profile, and reasonably calculate the required computing resources at different time ends according to the characteristics, and apply for or recycle instances in advance based on the cost.
[0178] It is understandable that the above steps of the embodiment of the present application are only for the convenience of explanation and do not constitute a limitation on the technical solution of the present application. The order of the above steps can be adjusted in actual applications. For example, the order of S28-S30 above is only for the convenience of explanation and can actually be performed in the entire computing process. For another example, when there are enough instances in the first instance resource pool, instances may not be scheduled from the central computing device cluster, that is, S24-S27 are not executed.
[0179] In summary, by using the solution provided by the embodiment of the present application, by allocating computing tasks to edge nodes, the amount of data transmitted over the network can be effectively reduced, computing delays can be reduced, and computing efficiency can be improved; by using GPU virtualization technology to flexibly configure instance specifications, the waste of computing resources can be reduced; and by reasonably expanding or recycling instances in the user's first instance resource pool, for users, the cost of using idle instances is reduced, and for cloud service providers, idle instances can be recycled and reallocated in a timely manner, achieving efficient transfer of instances between different users, reducing idle waste of computing resources, and improving the utilization of computing resources. Therefore, the solution of the present application can flexibly and efficiently schedule instances and achieve accurate management of computing resources on edge nodes.
[0180] Based on the instance scheduling method provided in the above embodiments, the embodiment of the present application further provides an instance scheduling device, which is described in detail below with reference to the accompanying drawings.
[0181] See also Figure 6 , which is a schematic diagram of an example scheduling device provided in an embodiment of the present application.
[0182] The scheduling device of the illustrated example includes an allocation unit 61 , a recovery unit 62 and a capacity expansion unit 63 .
[0183] The allocating unit 61 is used to allocate a first instance resource pool to a user. The first instance resource pool includes multiple instances.
[0184] The recovery unit 62 is used to recover unscheduled instances from the first instance resource pool according to the number of instances required by the user and the control factor corresponding to the user.
[0185] The control factor is used to indicate the number of instances to be recycled.
[0186] The capacity expansion unit 63 is used to allocate instances to the first instance resource pool according to the prediction result of the number of instances required by the user in the future, so as to increase the number of instances in the first instance resource pool.
[0187] In a possible implementation, the recycling unit 62 is specifically used to determine the number of instance requirements based on the user's computing resource requirements; when the number of instance requirements is less than the number of instances in the first instance resource pool, the instances in the first instance resource pool are recycled according to the control factor corresponding to the user.
[0188] In a possible implementation, the recycling unit 62 is specifically configured to determine the number of instance requirements according to the computing resource requirements of the user; when the number of instance requirements is less than a first preset number, recycling the instances in the first instance resource pool according to the control factor corresponding to the user, wherein the first preset number is less than the number of instances in the first instance resource pool.
[0189] In one possible implementation, taking the generation of a "3D avatar" using AIGC technology as an example, the recycling unit 62 determines the computing resource requirements based on the number of the user's 2D image generation tasks and 3D image generation tasks, and the computing resources required for each 2D image generation task and 3D image generation task; and determines the number of instance requirements based on the computing resource requirements and the specifications of the instance.
[0190] Among them, computing resource requirements include CPU core number requirements, memory requirements, and display memory requirements.
[0191] The specification of the instance indicates the number of CPU cores, memory size, and display memory size included in a single instance. In a possible implementation, the instance is a container, and the specifications of the container are: 1 core CPU, 8G memory, and 32G graphics card memory.
[0192] In one possible implementation, an instance of an edge computing device cluster is used to generate a 2D image and / or a 3D image based on an initial image uploaded by a user. The edge computing device cluster uses IPv6 to transmit the initial image, the 2D image, and / or the 3D image. In addition, if the computing task is to generate a video, the edge computing device cluster uses IPv6 to transmit the video.
[0193] See also Figure 7 , which is a schematic diagram of another example scheduling device provided in an embodiment of the present application.
[0194] Figure 7 The device shown is Figure 6 The difference is that it also includes: a buffer unit 64, an asynchronous fixed time recovery unit 65 and an asynchronous fixed time expansion unit 66.
[0195] Among them, when the instance demand quantity is greater than the instance quantity of the first instance resource pool, the buffer unit 64 determines the difference between the instance demand quantity and the instance quantity of the first instance resource pool as the first quantity; and adds the first quantity of instance scheduling tasks to the queue to wait for instance allocation.
[0196] The asynchronous fixed time recovery unit 65 is used to recover all or part of the instances in the first instance resource pool into the cluster instance resource pool when the current moment is in a pre-configured task low-time period; and when the first instance in the first instance resource pool is not scheduled within a preset time period, recover the first instance into the cluster instance resource pool.
[0197] The asynchronous fixed-time capacity expansion unit 66 is used to maintain the number of instances in the first instance resource pool to be a second preset number when the current moment is within a pre-configured task peak time period.
[0198] It can be understood that when the instance scheduling device includes an asynchronous fixed-time recovery unit 65 and an asynchronous fixed-time expansion unit 66, the recovery unit 62 recovers unscheduled instances from the first instance resource pool based on the user's instance demand quantity and the control factor corresponding to the user when the current moment is neither in the task trough time period nor in the task peak time period; the expansion unit 63 allocates instances to the first instance resource pool based on the predicted result of the user's future instance demand quantity when the current moment is neither in the task trough time period nor in the task peak time period.
[0199] Exemplarily, the allocation unit 61, the recovery unit 62, the expansion unit 63, the buffer unit 64, the asynchronous fixed-time recovery unit 65 and the asynchronous fixed-time expansion unit 66 etc. may be implemented by hardware or by software.
[0200] When implemented by software, the above units are applications running on computing devices, such as computing engines. Applications can be provided in the form of virtualization services. Virtualization services may include virtual machine (VM) services, bare metal server (BMS) services, and container services. Among them, VM services can be services that use virtualization technology to virtualize virtual machine resource pools on multiple physical hosts to provide users with VMs on demand for use. BMS services are services that virtualize BMS resource pools on multiple physical hosts to provide users with BMS on demand for use. Container services are services that virtualize container resource pools on multiple physical hosts to provide users with containers on demand for use. VM is a simulated virtual computer, that is, a logical computer. BMS is a high-performance computing service that can be elastically scalable, with computing performance that is no different from that of traditional physical machines, and has the characteristics of secure physical isolation. Containers are a kernel virtualization technology that can provide lightweight virtualization to achieve the purpose of isolating user space, processes, and resources. It should be understood that the VM service, BMS service and container service in the above-mentioned virtualization services are only specific examples. In actual applications, virtualization services can also be other lightweight or heavyweight virtualization services, which are not specifically limited here.
[0201] When implemented by hardware, the above units may include at least one computing device, such as a server, etc. Alternatively, the above units may also be devices implemented by using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc. The above PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0202] The present application also provides a computing device, which is described in detail below with reference to the accompanying drawings.
[0203] See also Figure 8 , which is a schematic diagram of a computing device provided in an embodiment of the present application.
[0204] Computing device 1000 includes a bus 1002 , a processor 1004 , a memory 1006 , and a communication interface 1008 .
[0205] The processor 1004, the memory 1006 and the communication interface 1008 communicate with each other via the bus 1002. The computing device 1000 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 1000.
[0206] The bus 1002 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. Figure 8 The bus 1002 may include a path for transmitting information between various components of the computing device 1000 (eg, the memory 1006, the processor 1004, and the communication interface 1008).
[0207] The processor 1004 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0208] The memory 1006 may include a volatile memory, such as a random access memory (RAM). The memory 1006 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0209] The memory 1006 stores executable program codes, and the processor 1004 executes the executable program codes to implement the aforementioned instance scheduling method. Specifically, the memory 1006 stores instructions for the edge node to execute the instance scheduling method.
[0210] The communication interface 1008 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1000 and other devices or a communication network.
[0211] The embodiment of the present application also provides a computing device cluster, which is described in detail below with reference to the accompanying drawings.
[0212] See also Fig. 9 , which is a schematic diagram of a computing device cluster provided in an embodiment of the present application.
[0213] The computing device cluster includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0214] like Fig. 9 As shown, the computing device cluster includes multiple computing devices 1000. The memory 1006 in the computing device 1000 in the computing device cluster may store the same edge node for executing instance scheduling instructions.
[0215] In some possible implementations, one or more computing devices 1000 in the computing device cluster may also be used to implement some instructions of the edge node for executing the instance scheduling method. In other words, a combination of one or more computing devices 1000 may jointly execute the instructions of the instance scheduling method.
[0216] Fig.10 A possible implementation is shown. Fig.10 As shown, two computing devices 1000A and 1000B are connected via a communication interface 1008. The memory in the computing device 1000A stores instructions for executing the functions of the allocation unit 61. The memory in the computing device 1000B stores instructions for executing the functions of the recovery unit 62 and the expansion unit 63. In other words, the memories 1006 of the computing devices 1000A and 1000B jointly store instructions for executing the instance scheduling method. Further, the computing device 1000A can also store instructions for the functions of the recovery unit 62 and the expansion unit 63, and the computing device 1000B can also store instructions for implementing the functions of the allocation unit 61.
[0217] Fig.10 The connection mode between the computing device clusters shown may be considered that the example scheduling method provided in this application involves more edge nodes. Therefore, the functions implemented by the allocation unit 61, the recovery unit 62 and the expansion unit 63 may be handed over to different computing devices for execution.
[0218] It should be understood that Fig.10 The functions of the computing device 1000A shown in FIG. 1000A may also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000B may also be completed by multiple computing devices 1000.
[0219] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.11 A possible implementation is shown. Fig.11 As shown, two computing devices 1000C and 1000D are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1006 in the computing device 1000C stores instructions for executing the functions of the allocation unit 61. At the same time, the memory 1006 in the computing device 1000D stores instructions for executing the functions of the recovery unit 62 and the expansion unit 63.
[0220] It should be understood that Fig.11 The functions of the computing device 1000C shown in FIG. 1000A may also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000D may also be completed by multiple computing devices 1000.
[0221] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state hard disk), etc. The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned instance scheduling method. The embodiment of the present application also provides another computer-readable storage medium. The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned instance scheduling method.
[0222] The embodiment of the present application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the above-mentioned instance scheduling method. The embodiment of the present application also provides a computer program product containing instructions. When the computer program product is run on at least one computing device, the at least one computing device executes the above-mentioned instance scheduling method.
[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. An instance scheduling method, It is characterized in that Applied to an edge computing device cluster, the method includes: Reclaiming unscheduled instances from a first instance resource pool according to the number of instance requirements of the user and a control factor corresponding to the user, wherein the control factor is used to indicate the number of reclaimed instances, and the first instance resource pool is the instance resource pool of the user; According to the prediction result of the number of instances required by the user in the future, instances are allocated to the first instance resource pool to increase the number of instances in the first instance resource pool.
2. The method according to claim 1, It is characterized in that The step of reclaiming unscheduled instances from the first instance resource pool according to the number of instance requirements of the user and the control factor corresponding to the user specifically includes: Determining the required number of instances according to the computing resource requirements of the user; When the required number of instances is less than the number of instances in the first instance resource pool, the instances in the first instance resource pool are recycled according to the control factor corresponding to the user.
3. The method according to claim 1, It is characterized in that The step of reclaiming unscheduled instances from the first instance resource pool according to the number of instance requirements of the user and the control factor corresponding to the user specifically includes: Determining the required number of instances according to the computing resource requirements of the user; When the instance demand quantity is less than a first preset quantity, instances in the first instance resource pool are recovered according to a control factor corresponding to the user, and the first preset quantity is less than the number of instances in the first instance resource pool.
4. The method according to claim 2 or 3, It is characterized in that Determining the required number of instances according to the computing resource requirements of the user specifically includes: Determine the computing resource requirement according to the number of the 2D image generation tasks and the 3D image generation tasks of the user and the computing resources required by each of the 2D image generation tasks and the 3D image generation tasks, wherein the computing resource requirement includes a CPU core number requirement, a memory requirement, and a display memory requirement; The instance requirement quantity is determined according to the computing resource requirement and instance specifications, where the instance specifications indicate the number of CPU cores, memory size, and display storage size included in a single instance.
5. The method according to claim 2 or 3, It is characterized in that When the instance requirement quantity is greater than the instance quantity of the first instance resource pool, the method further includes: Determine a difference between the required number of instances and the number of instances in the first instance resource pool as a first number; The first number of instance scheduling tasks are added to a queue to wait for instance allocation.
6. The method according to claim 1, It is characterized in that The allocating instances to the first instance resource pool according to the prediction result of the number of instance requirements of the user in the future specifically includes: Obtain historical data of the required quantity of the instance according to a preset period; Obtaining a prediction result of the future instance demand quantity based on the historical data of the instance demand quantity; When the future instance demand quantity indicated by the prediction result is greater than the number of instances in the first instance resource pool, instances are allocated to the first instance resource pool.
7. The method according to claim 1, It is characterized in that The method further comprises: When the first instance in the first instance resource pool is not scheduled within a preset time period, the first instance is recovered from the first instance resource pool.
8. A computing resource scheduling device, It is characterized in that The device comprises: a recovery unit and a capacity expansion unit; The recycling unit is used to recycle unscheduled instances from a first instance resource pool according to the number of instance requirements of the user and a control factor corresponding to the user, wherein the control factor is used to indicate the number of recycled instances, and the first instance resource pool is the resource pool of the user; The capacity expansion unit is used to allocate instances to the first instance resource pool according to the prediction result of the number of instances required by the user in the future, so as to increase the number of instances in the first instance resource pool.
9. A computing device cluster, It is characterized in that The computing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions; the at least one processor executes the computer-readable instructions so that the computing device cluster executes the example scheduling method described in any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that Computer-readable instructions are stored; the computer-readable instructions are used to implement the example scheduling method described in any one of claims 1 to 7.
