Resource scheduling method, device and equipment

By predicting user resource demands and pre-allocating initialized buffer resources, combined with the dynamic matching and recycling mechanism of the shared resource pool, the problem of resource scheduling delay in the existing technology is solved, and the effects of instant response and high resource utilization in the cloud computing environment are achieved.

CN120803668AActive Publication Date: 2025-10-17武汉启云方科技有限公司

Patent Information

Application Number
CN202511274463.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-10-17
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

The resource scheduling mechanism in the existing technology requires a long initialization process from resource allocation to availability due to its passive response mode, which makes it difficult to simultaneously meet the requirements of low-latency response and high resource utilization. Especially in the cloud computing environment, when the user task load varies significantly over time, it leads to resource waste or performance degradation.

Method used

By collecting historical user resource scheduling data to predict resource demand models, we pre-allocate initialized buffer resources to users, use buffer resources to achieve rapid response, and release buffer resources after business processing resource initialization is completed. Combined with the dynamic matching and recycling mechanism of the shared resource pool, we optimize resource utilization.

Benefits of technology

It achieves instant response and high resource utilization, reduces the delay of business processing requests, has strong adaptability, and can improve the overall resource utilization while ensuring user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803668A_ABST
    Figure CN120803668A_ABST
Patent Text Reader

Abstract

The invention provides a resource scheduling method, device and equipment. The method comprises the following steps: acquiring a plurality of historical resource scheduling data corresponding to a plurality of users; obtaining a predicted resource demand quantity of each user according to the historical resource scheduling data of each user, and pre-allocating buffer resources for each user according to the predicted resource demand quantity; when a service processing request of a target user is received, calling a target buffer resource from the buffer resources corresponding to the target user, responding to the service processing request based on the target buffer resource, and matching the service processing resource corresponding to the service processing request in a shared resource pool shared by multiple users; and when the initialization of the service processing resource is completed, taking over a service processing operation corresponding to the service processing request based on the service processing resource, and releasing the target buffer resource. According to the resource scheduling method and device, the user request response delay is reduced, resource scheduling with high real-time performance, high flexibility and high resource utilization rate can be realized, and the applicability is high.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and particularly relates to a resource scheduling method, device and equipment. BACKGROUND

[0002] In a cloud computing environment, dynamic resource allocation and elastic scaling technology are the core mechanisms for coping with fluctuations in user computing power demand. Due to the significant periodical difference in user task load (such as alternating peak and trough), the maximization of resource utilization rate is challenged: redundant resources are idle and wasted during low load, and resource supply delay may cause performance degradation or service interruption during high load. In the prior art, dynamic scheduling algorithms, load balancing strategies and containerized resource orchestration are mainly used to achieve elastic scaling, and heterogeneous resource management is used to improve hardware adaptability.

[0003] However, the resource scheduling mechanism of the prior art adopts a passive response mode, and the resource needs to undergo a long initialization process from allocation to availability, resulting in an extended response time of business requests, and it is difficult to simultaneously meet the needs of low-latency response and high resource utilization rate. SUMMARY

[0004] The present application provides a resource scheduling method, device and equipment, which can provide high flexibility and high real-time resource scheduling, can realize instant response to user business processing requests, reduce the delay of resource scheduling and business processing request response, improve resource utilization rate, and has high applicability.

[0005] In a first aspect, the present application provides a resource scheduling method, comprising: obtaining a plurality of historical resource scheduling data corresponding to a plurality of users, wherein one of the users corresponds to one of the historical resource scheduling data; obtaining a predicted resource demand of each of the users according to the historical resource scheduling data corresponding to each of the users, and pre-allocating buffer resources for each of the users according to the predicted resource demand of each of the users, to obtain a plurality of buffer resources corresponding to the plurality of users, wherein the buffer resources are available resources that have been pre-initialized and stored in a buffer resource pool and are in a state of being ready for allocation; when receiving a service processing request of a target user in the plurality of users, calling a target buffer resource from the buffer resource corresponding to the target user, responding to the service processing request based on the target buffer resource, and matching a service processing resource corresponding to the service processing request in a shared resource pool shared by the plurality of users; when the service processing resource is initialized, taking over the service processing operation corresponding to the service processing request based on the service processing resource, and releasing the target buffer resource. In the present application, the historical resource scheduling data of each user is collected to predict the resource demand model, the buffer resources that have been initialized and are ready for scheduling are pre-allocated for each user, and then when the service processing request initiated by the target user is received, the corresponding buffer resource can be immediately called to achieve fast response, and the matching and initialization process of the service processing resource in the shared resource pool is triggered, and the service processing operation is taken over after the service processing resource is initialized, and the buffer resource is released. The historical resource scheduling data can improve the accuracy of resource demand prediction, the pre-loading mechanism of the buffer resource can reduce the response delay of the service processing request, and the dynamic matching of the service processing resource and the recycling mechanism of the buffer resource can improve the overall resource utilization rate while ensuring the user experience, and the applicability is high.

[0006] In a possible implementation of the first aspect, the obtaining of the predicted resource demand of each user from the historical resource scheduling data corresponding to each user includes: obtaining target historical resource scheduling data corresponding to each user in a historical target period from the historical resource scheduling data corresponding to each user; inputting the target historical resource scheduling data corresponding to each user into a resource prediction model, and outputting predicted resource demand of each user in a future target period corresponding to the historical target period by the resource prediction model; and wherein the resource prediction model includes at least one of a machine learning model or a deep learning model. In this application, the target historical resource scheduling data of each user in the historical target period is obtained, which is input into the resource prediction model to generate the predicted resource demand of each user in the future target period corresponding to the historical target period. The model can map the historical resource usage rule and the future demand trend, improve the matching degree of the prediction result and the real scene, improve the prediction accuracy, and then optimize the timeliness and accuracy of the preloaded and preallocated buffer resources. Meanwhile, the resource prediction model is diversified and highly applicable.

[0007] In a possible implementation of the first aspect, the preallocation of buffer resources to each user according to the predicted resource demand of each user includes: preallocating service processing resources to each user according to the predicted resource demand of each user, and marking the preallocated service processing resources to each user as exclusive service processing resources of each user; initializing the exclusive service processing resources of each user, and freezing the initialized resources into resources in an initialized and standby scheduling state by a memory snapshot technology to obtain a plurality of buffer resources corresponding to the plurality of users. In this application, the exclusive service processing resources are preallocated to each user according to the predicted resource demand, and the exclusive service processing resources are initialized, and then the initialized resources are frozen into the standby scheduling state by the memory snapshot technology to obtain the plurality of buffer resources. The application can ensure the accurate matching between the predicted resource demand of the user and the preallocated buffer resources, and solidify the initialized state by the memory snapshot freezing technology, so that the buffer resources can be activated and called immediately, improve the flexibility of resource scheduling, avoid the waiting delay when the service processing request triggers the initialization in the traditional mode, and realize the seamless switching from the preallocation state of the buffer resources to the real-time scheduling state, which is highly applicable.

[0008] In a possible implementation of the first aspect, the calling of the target buffer resource from the buffer resource corresponding to the target user comprises: obtaining at least one idle buffer resource from the buffer resource corresponding to the target user as the target buffer resource, and calling the target buffer resource through an immediately available scheduling interface to respond to the service processing request through the target buffer resource; the immediately available scheduling interface comprises at least one of a memory access channel or a dedicated application programming interface (API) channel, and the buffer resource comprises at least one of a computing resource, a storage resource or a network resource. In this application, an idle resource can be selected from the buffer resource of the target user as the target buffer resource, and the target buffer resource is directly called through the immediately available interface to respond to the service processing request. By selecting an idle resource, resource preemption conflicts can be avoided, and by using the immediately available scheduling interface, resource supply can be completed in real time after the service processing request is triggered, the delay of resource scheduling is reduced, and the applicability is high.

[0009] In a possible implementation of the first aspect, the releasing of the target buffer resource comprises: determining a remaining resource amount of the buffer resource corresponding to the target user; when the remaining resource amount is less than a resource capacity threshold, supplementing the target buffer resource to the buffer resource corresponding to the target user to expand the buffer resource corresponding to the target user; and when the remaining resource amount is not less than the resource capacity threshold, releasing the target buffer resource to a state before initialization to obtain a target service processing resource corresponding to the target buffer resource, and supplementing the target service processing resource to the shared resource pool. In this application, the remaining resource amount of the buffer resource can be detected in real time, and then the resource pre-allocation can be dynamically adjusted according to the comparison result of the remaining resource amount and the resource capacity threshold. When the remaining resource amount is insufficient, the target buffer resource can be supplemented to the buffer resource of the user to maintain the remaining resource amount of the buffer resource; when the remaining resource amount is sufficient, the target buffer resource can be released to the state before initialization and recovered to the shared resource pool. Through the elastic adjustment mechanism of threshold determination, the buffer resource reserve of the target user can be preferentially guaranteed when the resource is insufficient, the quick response capability to the subsequent service processing request is ensured, the resource can be released and recovered to the shared resource pool when the resource is redundant, the long-term idling of the redundant buffer resource is avoided, the resource utilization rate of the global resource is improved, and the applicability is high.

[0010] In a possible implementation of the first aspect, after the target buffer resource is allocated based on the target buffer resource, the method further includes: determining the remaining buffer resource amount of the target user corresponding to the buffer resource except for the target buffer resource; when the remaining buffer resource amount is less than the resource capacity threshold, obtaining an idle service processing resource from the shared resource pool and completing initialization, and supplementing the initialized service processing resource to the target user corresponding to the buffer resource. In this application, the remaining buffer resource amount of the target user buffer resource except for the called target buffer resource is detected in real time, and when the remaining amount is less than the resource capacity threshold, an idle service processing resource is obtained from the shared resource pool and initialized, and then the initialized resource is supplemented to the target user's buffer resource. Through real-time detection of the remaining buffer resource amount and threshold triggering mechanism, the service processing resource in the shared resource pool can be dynamically called for buffer resource expansion when the buffer resource is short, so as to ensure the continuous supply of buffer resource, avoid the delay of subsequent service processing request response caused by insufficient buffer resource amount, and reduce the resource waste caused by redundant buffer resource pre-allocation, improve the resource utilization of global resource, and have high applicability.

[0011] In a possible implementation of the first aspect, before the buffer resource is pre-allocated to each user according to the predicted resource demand amount of each user, the method further includes: setting the resource capacity threshold according to the time period position of the historical target time period in the service processing resource pre-allocation period, wherein the historical target time period is part of the length in the service processing resource pre-allocation period; or setting the resource capacity threshold according to the resource node type included in the historical resource scheduling data, wherein the resource node type is one of the resource center node or the resource edge node; or setting the resource capacity threshold according to the historical resource configuration information included in the historical resource scheduling data, wherein the historical resource configuration information at least includes the resource type and the service processing capability of the resource; or setting the resource capacity threshold according to the user priority of each user, wherein the user priority is set by the service level of the service processing service subscribed by the user. In this application, the resource capacity threshold can be set in multiple dimensions such as time period position, resource node type, resource configuration information or user priority, which enriches the flexibility and selectivity of resource capacity threshold setting and resource dynamic pre-allocation strategy, enhances the scene adaptability of resource scheduling, and has high applicability.

[0012] In a possible implementation of the first aspect, the shared resource pool includes multiple service processing resources sorted according to different scheduling priorities; the idle service processing resource is obtained from the shared resource pool and initialized, including: an idle resource with a scheduling priority lower than a priority threshold is obtained from the multiple service processing resources and initialized; and the scheduling priority is set by at least one of user priority, task priority, and resource type priority. In this application, service processing resources sorted according to scheduling priorities such as user priority, task priority, or resource type priority can be maintained in the shared resource pool, and an idle resource with a scheduling priority lower than a set threshold is obtained to complete initialization when obtaining a service processing resource. By using the priority threshold screening mechanism, an idle resource with a low priority that has less impact on service operation can be selected for initialization, avoiding the occupation of high-priority resources to affect critical tasks or resource guarantees for high-priority users, which not only maintains the schedulability of high-priority resources to maintain the stability of core services and the resource supply preparation for high-priority users, but also activates idle resources with low priority as service processing resources to improve the resource utilization of the shared resource pool, achieving a balance between resource efficient reuse and business guarantee capability, and high applicability.

[0013] In a possible implementation of the first aspect, the service processing operation corresponding to the service processing request is taken over based on the service processing resource, including: a part of the service processing operation requested by the service processing request is processed based on the service processing resource, and after a preset transition time, all the service processing operation requested by the service processing request is processed based on the service processing resource, to realize smooth transition of the service processing operation from the target buffer resource to the service processing resource. In this application, by processing part of the operation in the service processing request based on the service processing resource, and then processing all the operations after a preset transition time, smooth transition from the target buffer resource to the service processing resource is realized, effectively avoiding the interruption or performance fluctuation of the service processing operation in the resource switching moment, maintaining service continuity, reserving smooth transition time for complete takeover of the service processing resource, and reducing the processing conflict risk caused by sudden release or preemption of resources on the basis of guaranteeing service continuity, optimizing the stability of the resource switching process, and high applicability.

[0014] In a possible implementation of the first aspect, the matching of the service processing resource corresponding to the service processing request from the shared resource pool shared by the plurality of users comprises: obtaining an identity of the target user carried in the service processing request, the identity comprising at least a user identifier and a user priority, wherein the user priority is set by a service level of a service processing service subscribed by the target user; determining a resource suitable for the target user and the service processing request from the shared resource pool shared by the plurality of users based on the identity, and initializing the resource to create the service processing resource corresponding to the service processing request. In this application, the identity of the target user carried in the service processing request is obtained, the resource suitable for the target user and the request characteristics is dynamically matched from the shared resource pool based on the identity, and the resource initialization is completed to create the exclusive service processing resource. The service level differentiated resource guarantee can be realized, the matching degree between the matched resource and the target user is ensured, and the stability of the service processing resource supply is improved. The resource initialization creation process combines the user identifier and the request characteristics, so that the generated service processing resource can have targeted processing capability, the delay from the initiation of the service processing request to the readiness of the resource is shortened while the redundant resource occupation is reduced, and the applicability is high.

[0015] In a second aspect, the application provides a resource scheduling apparatus, which comprises a module or unit for executing the resource scheduling method provided in the first aspect or any possible implementation of the first aspect.

[0016] For example, the resource scheduling apparatus comprises: a data acquisition module configured to acquire a plurality of historical resource scheduling data corresponding to a plurality of users, wherein one user corresponds to one historical resource scheduling data; a prediction allocation module configured to acquire a predicted resource demand of each user according to the historical resource scheduling data corresponding to each user, and pre-allocate buffer resources to each user according to the predicted resource demand of each user, wherein the buffer resources are available resources pre-initialized and stored in a buffer resource pool in a state of being ready for allocation; a request response module configured to, when a service processing request of a target user in the plurality of users is received, invoke a target buffer resource from the buffer resources corresponding to the target user, respond to the service processing request based on the target buffer resource, and match a service processing resource corresponding to the service processing request from a shared resource pool shared by the plurality of users; a resource switching module configured to, when the service processing resource is initialized, take over a service processing operation corresponding to the service processing request based on the service processing resource, and release the target buffer resource.

[0017] In a third aspect, the present application provides a terminal device, comprising a processor and a memory, wherein the processor is connected to the memory, the memory is configured to store program code, and the processor is configured to invoke the program code to execute the method provided in the above embodiments.

[0018] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method provided in the above embodiments.

[0019] In a fifth aspect, the present application provides a computer program product, comprising computer instructions stored in a computer readable storage medium; a processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the method provided in the above embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 is a system architecture diagram of the resource scheduling method provided by the embodiments of the present application; Figure 2 is an application scenario diagram of the resource scheduling method provided by the embodiments of the present application; Figure 3 is a flow diagram of the resource scheduling method provided by the embodiments of the present application; Figure 4 is an interaction diagram of the resource scheduling method provided by the embodiments of the present application; Figure 5 is another interaction diagram of the resource scheduling method provided by the embodiments of the present application; Figure 6 is a structure diagram of the resource scheduling device provided by the embodiments of the present application; Figure 7 is a structure diagram of the terminal device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0022] In cloud computing environments, dynamic resource pre-allocation and elastic scaling are core mechanisms for addressing fluctuations in user computing power requirements. The goal is to balance the adaptability between resource supply and dynamic load. Due to the significant periodical differences in user task loads, such as traffic surges during e-commerce promotions, periodic peaks on online education platforms, and low valley idle of computing clusters at night, traditional static resource configuration modes face serious challenges: redundant resources are idle for a long time during low load, and resource supply delays during high load can lead to service performance degradation or even interruption. In existing technical solutions, dynamic scheduling algorithms (such as real-time detection of load conditions to adaptively select scheduling strategies), load balancing strategies (such as weighted round robin, minimum connection number pre-allocation), and containerized resource orchestration platforms (such as the elastic scaling component of Kubernetes) are used to achieve on-demand resource pre-allocation. At the same time, traditional solutions often combine heterogeneous computing resource management techniques to improve hardware adaptability.

[0023] However, the limitations of existing technologies in practice have gradually emerged. First, the dynamic optimization capability of load balancing is insufficient, and most systems rely on static weights or historical mean pre-allocation strategies, making it difficult to effectively respond to sudden traffic or differences in computing characteristics of heterogeneous tasks, resulting in severe load imbalance between instances. For example, some nodes are overloaded due to handling high input / output (I / O) or compute-intensive tasks, while other nodes have low resource utilization due to unreasonable task pre-allocation. Second, there is a bottleneck in the real-time nature of resource scheduling, and the detection data collection period and decision delay make it difficult for the system to respond to instantaneous load fluctuations in a timely manner, especially under second-level traffic shocks, which may cause service degradation. In addition, the adaptability of existing mechanisms is weak, and elastic strategy parameters (such as expansion step, cooling period) usually rely on manual preset, making it difficult to dynamically adjust according to business characteristics, and local optimization under distributed architecture further weakens the global resource coordination capability. For example, when scheduling across availability zones, topology-aware algorithms may increase additional delay due to frequent cross-network partition instance migration. These problems collectively lead to a decline in overall system performance, an increase in reliability risks, and a waste of resources, highlighting the deep flaws in existing technologies in terms of dynamic, real-time, and global coordination.

[0024] The resource scheduling method provided by the embodiments of the present application can improve the accuracy of resource demand prediction by collecting historical resource scheduling data of each user, pre-allocate the initialized buffer resource to be scheduled to each user, and then call the corresponding buffer resource to achieve fast response when receiving the service processing request initiated by the target user, trigger the matching and initialization process of the service processing resource in the shared resource pool, and realize the service processing operation takeover and release the buffer resource after the service processing resource initialization is completed. The historical resource scheduling data can improve the accuracy of resource demand prediction, and the pre-loading mechanism of the buffer resource can reduce the response delay of the service processing request. At the same time, the dynamic matching of the service processing resource and the recycling mechanism of the buffer resource can improve the overall resource utilization rate on the premise of guaranteeing the user experience, and has high applicability.

[0025] Please refer to Figure 1 , Figure 1 is a system architecture diagram of the resource scheduling method provided by the embodiments of the present application. As shown in Figure 1 , as shown in Figure 1 , the system architecture can include a business server 100 and a terminal cluster, and the terminal cluster can include terminal devices 200a, 200b, 200c, …, 200n, etc. Wherein, the above-mentioned business server 100 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud database, cloud service, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, and big data and artificial intelligence platform. The terminal device (including terminal device 200a, terminal device 200b, terminal device 200c, …, terminal device 200n) can be a palm computer, a smart phone, a notebook computer, a desktop computer, a tablet computer, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, etc.), a smart computer, etc. Smart terminal, but not limited to this.

[0026] The service server 100 can establish a communication connection with each terminal device in the terminal cluster, and each terminal device in the terminal cluster can also establish a communication connection. In other words, the service server 100 can establish a communication connection with each terminal device in the terminal device 200a, the terminal device 200b, the terminal device 200c,..., and the terminal device 200n. For example, the terminal device 200a and the service server 100 can establish a communication connection. The terminal device 200a and the terminal device 200b can establish a communication connection, and the terminal device 200a and the terminal device 200c can also establish a communication connection. The above communication connection is not limited to the connection mode, and can be directly or indirectly connected through a wired communication mode, or directly or indirectly connected through a wireless communication mode, etc. The specific connection mode can be determined according to the actual application scenario, and is not limited herein.

[0027] It should be understood that each terminal device in the terminal cluster as shown in Figure 1 may be installed with an application client. When the application client runs in each terminal device, it can respectively interact with the service server 100 as shown in Figure 1 , so that the service server 100 can receive service data from each terminal device. The above service data can be application data generated during the use of the application client by the user, and the application data can be shared with the service server 100. The application client can be an application program, a web page or a website, etc. The specific application client can be determined according to the actual application scenario, and is not limited herein. The application client can be a standalone client, or an embedded sub-client integrated in a certain client (such as an instant messaging client, a social client, etc.). The specific application client can be determined according to the actual application scenario, and is not limited herein. The user can send service data to the service server 100 through the application client, which can be used to request the service server 100 to start a related service process and return related process data to the application client. The service server 100 as the server of the application client can be a collection of multiple servers including the background server corresponding to the application client, the data processing server, etc. The method provided in the embodiment of the application can be executed by the service server 100 as shown in Figure 1 , can be executed by any one of the terminal device 200a, the terminal device 200b,..., and the terminal device 200n as shown in Figure 1 , or can be executed by the terminal device and the service server together. The specific execution subject can be determined according to the actual application scenario, and is not limited herein.

[0028] The terminal device to which the resource scheduling method provided in the embodiments of the present application is applicable includes, but is not limited to, a smart phone, a computer, a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), a wearable device, and the like. Alternatively, the terminal device can also be a server corresponding to the smart phone, the computer, the tablet computer, the PDA, the MID, and the wearable device, and the like, and the specific terminal device can be determined according to an actual application scenario, which is not limited herein. For the convenience of description, the execution subject of the resource scheduling method provided in the embodiments of the present application will be described by taking the terminal device as an example. Correspondingly, the resource scheduling apparatus (or simply the resource scheduling device) provided in the embodiments of the present application includes, but is not limited to, a smart phone, a computer, a tablet computer, a PDA, an MID, and a wearable device, and the like. For the convenience of description, the resource scheduling device and / or the terminal provided in the embodiments of the present application will be described by taking the computer as an example.

[0029] It can be understood that the resource scheduling method provided in the embodiments of the present application can be executed by the service server 100 as shown in Figure 1 , executed by any one of the terminal devices 200a, 200b, …, 200n as shown in Figure 1 , or executed by the terminal device and the service server in interaction, and the specific execution manner can be determined according to an actual application scenario, which is not limited herein. For the convenience of subsequent understanding and description, the embodiments of the present application can select one terminal device as a target terminal device in the terminal device cluster as shown in Figure 1 , for example, the terminal device 200c is taken as the target terminal device.

[0030] The resource scheduling method provided by the embodiments of the present application can be applied to the scheduling of various types of resources, including but not limited to compute resources, storage resources, network resources, etc. The specific types of resources can be determined according to the actual application scenario, which is not limited herein. The compute resources can include but are not limited to central processing units (CPUs), graphics processing units (GPUs), neural network processing units (NPUs), tensor processing units (TPUs), virtualized instances, dedicated accelerators, processes / threads, etc. The storage resources can include but are not limited to object storage, block storage, file storage, cache storage, archive storage, etc. The network resources can include but are not limited to bandwidth, load balancers, IP addresses, content delivery networks, software-defined networks, etc. Different types of resources can be applied to scenarios including but not limited to business service operation, user data backup, cross-data center data transmission, etc., which is not limited herein.

[0031] Optionally, the various types of resources in the above examples can exist independently or in combination, which is not limited herein. The independent existence of the above can be understood as that the resources independently provide specific functions, for example, a GPU bare-metal server can independently provide GPU computing power for users to directly operate hardware. The combined existence of the above can be understood as that a certain type of resource can be combined with another type of resource to form a complete service. For example, by combining cloud servers and cloud disks, a virtual machine can mount block storage to run a database to realize the combination of computing processing and data persistence.

[0032] For convenience of description, an application client (or simply a client) loaded on the terminal device 200c is taken as an example, and the description is combined with the above-mentioned application client. Figure 2 The use scenario of the resource scheduling method provided by the embodiments of the present application is described.

[0033] Referring to Figure 2 , Figure 2is a schematic diagram of an application scenario of a resource scheduling method provided by an embodiment of the present application. It is assumed that a target user (which can be referred to as a user for convenience of description) has a demand for uploading a large amount of data to a cloud storage space by using a terminal device 200c (which can be referred to as a terminal device for convenience of description) at a high frequency during a working period (for example, 9:00-18:00), and there is an upload concurrent peak (for example, 17:00-18:00) in part of the period. At this time, the input / output (input / output, I / O) throughput and response speed of the storage service are directly related to work efficiency. The terminal device can detect the user operation state on the user interface (for example, user interface 1) thereof, such as Figure 2 as shown, when it is detected that the user clicks the control icon of “registration” on the user interface 1, a user interface (for example, user interface 2) for introducing storage capacity reservation can be displayed. As shown in Figure 2 , it is assumed that the user interface for introducing storage capacity reservation can include checkable controls such as “basic personal”, “small and medium-sized team”, and “enterprise customization”. When the user mouse cursor moves to the corresponding display text, the corresponding pop-up text (not shown in the figure) can be displayed to show the corresponding storage capacity. It can be understood that different storage capacities correspond to different numbers or qualities of storage resources. It is assumed that the target user checks “small and medium-sized team”, that is, the target user reserves the storage resources corresponding to “small and medium-sized team”, and the terminal device can pre-allocate the corresponding buffer resource amount to the target user. Here, the buffer resource is an available resource that is pre-initialized and stored in a buffer resource pool and is in a state of being ready for allocation. When the target user sends a storage request, for example, when the target user drags the file to be stored into the indication area in the user interface 3 and clicks the “upload” control, the terminal device immediately invokes the above-mentioned buffer resource to respond to the storage request of the target user, for example, a new user interface or a pop-up window (not shown in the figure) is displayed for the user to select the storage file type, quality, etc., and a dedicated business processing resource corresponding to the storage request is created for the target user in the background, reducing the waiting time of the target user's request. Optionally, the user can also change the reserved resource amount, such as Figure 2As shown, assuming that the user clicks the "modify reserved storage" button in the user interface 3, the user interface 2 can be switched to modify the reserved resource storage, which can be determined according to the actual application scenario, and is not limited herein. After the target user is registered, the use and use rules of the target user can be continuously collected, for example, it is collected for one week that the target user starts to log in in large quantities at about 8:50 am, the upload request volume increases sharply after 9:00, and there is a resource use peak during 17:00-18:00. Based on these historical resource use data, the peak period range of the next day can be predicted, and the expected resource demand at different time points (such as 50% of the upload bandwidth needs to be reserved before 17:00) can be further refined. In the case of no user awareness, the terminal device can complete the buffer resource preheating and expansion before the predicted peak period arrives, so as to reduce the user request response delay. In specific implementation, how the terminal device uses the historical resource scheduling data to predict the resource demand and schedule the resources can be referred to the implementation manner described in the following embodiments, and is not described herein.

[0034] In some possible embodiments, when the terminal device fails to invoke the buffer resource in the buffer resource pool, the terminal device can trigger an emergency resource allocation, dynamically allocate emergency resources from a shared resource pool, and raise the initialization priority of the emergency resources to the highest level (such as through a real-time scheduling flag, a core binding, or a resource preemption strategy, etc.), so as to ensure the availability of the emergency resources. Here, a large number of service processing resources in the shared resource pool are maintained according to the scheduling priority order of user priority, task priority, or resource type priority, etc. The service processing resources in the shared resource pool are not initialized and need to be initialized according to the service request and the initialization priority. It can be understood that the terminal device can scan the shared resource pool through a distributed resource probe, dynamically filter the applicable and idle service processing resources according to the resource demand (such as the minimum available space requirement, the lower limit of random read-write performance, etc.) declared in the service request (such as the storage request), to serve as the emergency resources, and raise the initialization priority of the emergency resources to the highest level, so as to quickly initialize and respond to the service request. The specific implementation can be determined according to the actual application scenario, and is not limited herein. In the embodiments of the present application, the emergency resource allocation mechanism is triggered when the buffer resource invocation fails, and resources are dynamically allocated from the shared resource pool, so as to ensure the zero-delay recovery of critical services, improve the fault tolerance of the system, improve the resource allocation efficiency and resource utilization, and achieve the balance between fast fault recovery and efficient resource utilization.

[0035] It can be understood that in the specific embodiments of the present application, data related to object information is involved, and when the embodiments of the present application are applied to specific products or technologies, the permission or consent of the object needs to be obtained, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of countries and regions.

[0036] The following will be combined Figures 3 to 7 The resource scheduling method and device provided by the embodiments of the application will be described in detail.

[0037] Referring to Figure 3 , Figure 3 is a flowchart of the resource scheduling method provided by the embodiments of the application. For ease of understanding, the embodiments of the application take a terminal device as an example for description, that is, take the terminal device 200c in Figure 1 as an example for description. The service server can be the service server 100 in the embodiments corresponding to the above Figure 1 . The embodiments of the application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, etc. In the resource scheduling method shown in Figure 3 , each step of resource scheduling can be performed by the terminal device 200c in the above Figure 1 , as shown in Figure 3 , the method of resource scheduling can at least include the following steps S301-S304: S301, obtaining a plurality of historical resource scheduling data corresponding to a plurality of users, wherein one of the above users corresponds to one of the above historical resource scheduling data.

[0038] In some feasible embodiments, the terminal device can obtain historical resource scheduling data corresponding to a plurality of users. Here, the resources can include but are not limited to computing resources, storage resources, network resources, etc., and the specific determination can be made according to the actual application scenario, which is not limited here. Optionally, the terminal device can collect process-level resource consumption in real time through an application programming interface (application programming interface, API) exposed by an operating system kernel layer, or parse system logs through a proxy program to obtain time series scheduling records, and then realize data collection of historical resource scheduling data. The specific determination can be made according to the actual application scenario, which is not limited here. Here, the historical resource scheduling data can include but is not limited to resource types (such as CPU core number, memory page number, IOPS, network bandwidth), pre-allocation strategy, actual usage (such as CPU utilization percentage, resident memory size), user information (such as user tag, user level), dynamic usage frequency (number of requests per second), load characteristics (bursty / stable), time series mode (day / week granularity peak valley), etc. The specific determination can be made according to the actual application scenario, which is not limited here.

[0039] Optionally, in some possible implementations, after obtaining the historical resource scheduling data corresponding to the plurality of users, the terminal device can store the historical resource scheduling data in a storage space including but not limited to a local time series database, a memory buffer, a storage cluster, or the like, for subsequent prediction to quickly call or analyze, and the specific determination can be made according to the actual application scenario, which is not limited herein.

[0040] S302, obtaining a predicted resource demand of each of the users according to the historical resource scheduling data corresponding to each of the users, and pre-allocating buffer resources to each of the users according to the predicted resource demand of each of the users to obtain a plurality of buffer resources corresponding to the plurality of users, wherein the buffer resources are available resources that are pre-initialized and stored in a buffer resource pool and in a state of being ready for allocation.

[0041] In some possible implementation manners, the terminal device can obtain the predicted resource demand of each user according to the historical resource scheduling data corresponding to each user. Here, the terminal device can directly call the historical resource scheduling data collected in real time, or read the historical resource scheduling data from a storage space (such as a database, a memory buffer, or a storage cluster), which can be determined according to an actual application scenario, and is not limited herein. Here, the historical resource scheduling data can include, but is not limited to, a resource type (such as a CPU core number, a GPU memory, a storage capacity, etc.) applied by a user, an actually allocated resource specification, a resource use duration, a resource utilization rate curve (such as a CPU / GPU load fluctuation curve), a task execution state (such as success / failure and an error code), a scheduling delay (such as a time from a request to allocation), a priority change record, and an emergency resource calling number, etc., which can be determined according to an actual application scenario, and is not limited herein. The terminal device can use methods including, but not limited to, model prediction, periodic rule mining, event correlation analysis, sliding window statistics, and similarity matching strategy to predict the resource demand, which can be predicted by using one of the above methods, or a hybrid decision system can be formed to improve robustness, which can be determined according to an actual application scenario, and is not limited herein. That is, the predicted resource demand is a result of quantitatively estimating a required computing, storage, and network resource scale in a future specific time period by analyzing historical resource scheduling data (such as CPU, memory, storage, and network scheduling records) of a user and a system, business load characteristics (such as task type, concurrency, and timing law), and environmental variables (such as business growth trend and periodic traffic fluctuation), using a statistical model or a machine learning algorithm (such as time series analysis and neural network), which can be output in a specific data (such as required CPU core number and memory capacity) or probability interval (such as bandwidth demand confidence range) form. For example, the predicted resource demand can include, but is not limited to, a peak computing power (such as a CPU core number or a GPU card number) of a user in a future task period, a memory occupancy estimation value, a storage space growth trend, a network bandwidth fluctuation range, and an accelerator resource demand (such as a TPU usage amount). It can be understood that the predicted resource demand can be in different time granularities, such as a predicted resource demand in 15 minutes or a predicted resource demand in 1 hour. It can be understood that the size of the time granularity can be set by a user, or can be determined according to a time granularity corresponding to a highest prediction accuracy of historical predicted resource demand, etc., which can be determined according to an actual application scenario, and is not limited herein. Further, the terminal device can pre-allocate buffer resources for each user according to the predicted resource demand. Here, the pre-allocation process can be dynamically adapted in combination with a demand prediction accuracy, a business scenario characteristic, and a system real-time state, etc., for example, for a user with obvious periodic characteristics, a standard deviation of a historical same-period fluctuation amplitude can be added to a predicted value as a redundancy, etc., which can be determined according to an actual application scenario, and is not limited herein.

[0042] In some possible implementation manners, the terminal device can obtain target historical resource scheduling data corresponding to each of the users in the historical target period from the historical resource scheduling data corresponding to each of the users, input the target historical resource scheduling data corresponding to each of the users into a resource prediction model, and output, through the resource prediction model, predicted resource demand amounts corresponding to each of the users in a future target period corresponding to the historical target period. Here, the resource prediction model can be at least one of a machine learning model or a deep learning model, for example, the resource prediction model can be selected from a logistic regression model, a linear regression model, an artificial neural network model, a convolutional neural network model, a long short-term memory (LSTM) model, and the like, and the specific selection can be determined according to an actual application scenario, which is not limited herein. It can be understood that the terminal device can preprocess the target historical resource scheduling data corresponding to each of the users in the historical target period from the historical resource scheduling data corresponding to each of the users, which can be input into the trained resource prediction model after data cleaning (processing missing values and abnormal values), feature engineering (extracting sliding window statistics and periodic features), normalization, and the like, and the resource prediction model can output the predicted resource demand amounts in the future target period. For example, resource usage records of a target user in the same workday in the past four weeks in the evening peak period can be selected as the target historical resource scheduling data corresponding to the target user, the target historical resource scheduling data is input into the trained resource prediction model (for example, an LSTM model) after data preprocessing, to output the predicted resource demand amounts in the same workday in the evening peak period in the future, and the data processing procedure and the selection of the model can be determined according to an actual application scenario, which is not limited herein. In the embodiments of the present application, the target historical resource scheduling data of each of the users in the historical target period can be obtained and input into the resource prediction model to generate the predicted resource demand amounts of each of the users in the future target period corresponding to the historical target period, the model can map historical resource usage rules and future demand trends, improve the matching degree of the prediction results and the real scene, improve the prediction accuracy, and further optimize the timeliness and accuracy of the preloading and pre-allocation of the buffer resources. In addition, the resource prediction model is diversified and has high applicability.

[0043] In some possible implementation manners, the terminal device can pre-allocate service processing resources to each of the users according to the predicted resource requirement of each of the users, mark the service processing resources pre-allocated to each of the users as exclusive service processing resources of each of the users, initialize the exclusive service processing resources of each of the users, and freeze the initialized exclusive service processing resources into resource instances in a buffer resource pool in a state of being initialized and being in a standby state, to obtain the multiple buffer resources corresponding to the multiple users. Optionally, after pre-allocating the service processing resources to each of the users based on the predicted resource requirement, the terminal device can mark the service processing resources pre-allocated to each of the users as exclusive service processing resources of each of the users in a manner including but not limited to tag-based resource binding, policy-driven binding, lease mechanism binding, and the like. It can be understood that the terminal device can perform logical identification by using dynamic semantic tags, ensure physical layer attribution in combination with hardware-level programmable marking (for example, data processing unit firmware burning, memory dyeing technology), and further perform conditional binding driven by a policy engine, integrate quality of service (QoS) tags and self-healing failover tags, and the like. The specific manner can be determined according to an actual application scenario, which is not limited herein. For ease of understanding, a tag-based resource binding is taken as an example for illustration in the following. The terminal device can reserve a specified number of CPU cores or GPU computing units on a physical node based on the predicted resource requirement of each of the users through a scheduler or the like, and attach user exclusive tags to the resource block to ensure resource isolation and traceability. Here, the user exclusive tags can include but are not limited to multi-factor composite tags, dynamic policy hash tags, time window segmentation tags, encrypted identity token tags, resource topology awareness tags, hierarchical priority tags, semantic version tags, and the like. The specific manner can be determined according to an actual application scenario, which is not limited herein. Further, the terminal device can start a preloading engine, pre-pull container images (for example, TensorFlow inference images, PyTorch images) required by services, dependent libraries (for example, CUDA dynamic link libraries, MySQL databases), and configuration files, and load them into memory to maintain a minimized running environment (for example, keep a process in a suspended state but do not pre-allocate a computing task), so as to compress resource initialization time from a second level to a millisecond level when the resources are called subsequently. Further, the terminal device can freeze the initialized exclusive service processing resources by using a memory snapshot freezing technology (for example, freeze memory pages, register states, and I / O device contexts into persistent images), and maintain the frozen resource instances by using a copy-on-write mechanism. When a service processing request of a user is received, a complete runtime state can be directly recovered based on a snapshot, and initialization processes such as operating system starting and dependent library loading are skipped, so that millisecond-level resource readiness can be achieved.Optionally, to ensure the effectiveness of the buffer resources, the terminal device can periodically (e.g., every 5 minutes) check the compatibility of the preloaded content with the latest business requirements (e.g., detect the consistency of the model version), and if there is a deviation, a rolling update can be triggered to ensure that the buffer pool is always synchronized with the real scene. The specific determination can be made according to the actual application scenario, which is not limited herein. In the embodiments of the present application, the exclusive business processing resources can be pre-allocated to each user according to the predicted resource demand, and the exclusive business processing resources can be initialized. Then, the initialized resources can be frozen into a to-be-scheduled state by using the memory snapshot technology, so as to obtain a plurality of buffer resources. The accurate matching between the predicted user resource demand and the pre-allocated buffer resources can be ensured. The initialized state is fixed by using the memory snapshot freezing technology, so that the buffer resources can be activated and called immediately, the flexibility of resource scheduling is improved, the waiting delay caused by the initialization triggered by the business processing request in the traditional mode is avoided, the seamless switching from the pre-allocated state of the buffer resources to the real-time scheduling state can be realized, and the applicability is high.

[0044] S303, when receiving a business processing request of a target user in the above-mentioned plurality of users, calling a target buffer resource from the above-mentioned buffer resource corresponding to the above-mentioned target user, and responding to the above-mentioned business processing request based on the above-mentioned target buffer resource, while matching a business processing resource corresponding to the above-mentioned business processing request in a shared resource pool shared by the above-mentioned plurality of users.

[0045] In some feasible embodiments, when the business processing request of the target user is sent to the terminal device through the API gateway or the message middleware, the terminal device can obtain the user identity (such as an encrypted token or a user ID) carried in the business processing request through the request analysis engine, and can accurately locate the frozen target buffer resource exclusive to the user from the plurality of buffer resources corresponding to the target user based on the tag matching engine. Further, the terminal device can send an activation instruction to the target buffer resource through the resource scheduler, the low-delay channel, and the like, and wake up the target buffer resource in a millisecond level by using the hot loading technology (such as CRIU real-time recovery or QEMU snapshot unfreezing). The specific determination can be made according to the actual application scenario, which is not limited herein. It can be understood that the above-mentioned wake-up process skips the operating system startup and dependent initialization stages, and can directly enter the ready state. At the same time, the terminal device can scan the shared resource pool through the distributed resource probe, dynamically filter the available resources according to the resource demand (such as the GPU memory size, the floating-point computing power threshold) declared in the business processing request, and can use matching strategies including but not limited to static matching and dynamic optimization to match the business processing resource corresponding to the business processing request from the shared resource pool. The specific determination can be made according to the actual application scenario, which is not limited herein.

[0046] Optionally, in some possible implementations, if no service processing resource corresponding to the service processing request can be matched from the above-mentioned shared resource pool, such as no service processing resource in an idle state or service processing resource failure, etc., the terminal device can start a resource recycling mechanism, can scan the use state of all allocated service processing resources, and recycle the allocated service processing resources based on recycling rules. Here, the terminal device can collect resource indicators (such as CPU / memory usage) in real time through a distributed probe, poll orchestration state of a control plane, detect abnormal behavior through event driving, and record resource activity in combination with a time series database with labels, to realize scanning of the use state of the service processing resources, and then can recycle service processing resources with a continuous idle duration exceeding a first duration threshold (such as 30 minutes) based on the recycling rules, can also recycle to-be-released resources with an occupation priority (such as user priority, task priority, or resource type priority) lower than a current request, and can also recycle abnormal resources (such as resources occupied by a zombie process with timeout or no response state), and the specific recycling rules can be determined according to actual application scenarios, which are not limited herein. Here, when recycling the service processing resources, the terminal device can persist the current processing state of the service processing resources to a distributed storage (such as a snapshot or a log) through a checkpoint technology, then sends an interrupt signal and waits for existing service connections to be interrupted, and can record a breakpoint position if necessary. Further, the resource can be reset (such as clearing resource cache and releasing memory lock) and then re-joined in the shared resource pool for re-allocation. In the embodiments of the present application, the idle or low-priority service processing resources can be recycled dynamically through the recycling strategy, to improve the resource utilization rate of the service processing resources, while ensuring the processing of high-priority tasks.

[0047] In some possible implementation manners, the terminal device can obtain at least one idle buffer resource from the buffer resources corresponding to the target user as a target buffer resource, and can invoke the target buffer resource through an instant available scheduling interface to respond to the service processing request through the target buffer resource. It can be understood that the terminal device can identify the buffer resource state to select at least one idle buffer resource from the buffer resources as a target buffer resource. Here, the specific amount of buffer resources selected is determined according to the actual service processing request task amount, and is not limited herein. The terminal device can invoke the target buffer resource through an instant available scheduling interface. Here, the instant available scheduling interface can include, but is not limited to, a memory access channel or a special API channel, and the specific implementation can be determined according to the actual application scenario, and is not limited herein. It can be understood that the buffer resource can include, but is not limited to, at least one of a computing resource, a storage resource, or a network resource, and details are not described herein. The various types of buffer resources can exist independently or in combination, and are not limited herein. The independent existence can be understood as that the buffer resource can independently provide a specific function, for example, a GPU bare metal server can independently provide GPU computing power for users to directly operate hardware. The combined existence can be understood as that a buffer resource of a certain type can be combined with a buffer resource of another type to form a complete service. For example, by combining a cloud server and a cloud hard disk, a virtual machine can mount block storage to run a database to realize the combination of computing processing and data persistence. The specific implementation can be determined according to the actual application scenario, and is not limited herein. In the embodiments of the present application, idle resources can be selected from the buffer resources of the target user as target buffer resources, and the target buffer resources are directly invoked through an instant available interface to respond to the service processing request. By selecting idle resources, resource preemption conflicts can be avoided. At the same time, by using an instant available scheduling interface, resource supply can be completed in real time after the service processing request is triggered, the delay of resource scheduling is reduced, and the applicability is high.

[0048] In some possible implementation manners, after the target buffer resource is determined based on the target buffer resource and the service processing request, the terminal device can determine the remaining buffer resource amount in the buffer resource corresponding to the target user except for the target buffer resource by real-time detection or periodic scanning, etc. It can be understood that the terminal device can determine the idle resource amount in the buffer resource corresponding to the target user as the remaining buffer resource amount, for example, the terminal device can track the resource consumption state of the corresponding buffer resource in real time through the resource detection agent, dynamically calculate the remaining buffer resource amount, and the remaining buffer resource amount can include but is not limited to available GPU memory proportion, idle CPU core number, etc. The specific determination can be made according to actual application scenarios and actual resource types, which is not limited herein. When the remaining buffer resource amount is less than the resource capacity threshold, the terminal device can obtain the idle service processing resource from the shared resource pool and complete initialization, and then the initialized service processing resource can be supplemented to the buffer resource corresponding to the target user. Here, the resource capacity threshold can be regarded as the minimum of the buffer resource set or the buffer resource pool, which can be determined by the user according to the multi-dimensional resource usage in the historical resource scheduling data, or can be set by the historical resource capacity threshold. The specific determination can be made according to actual application scenarios, which is not limited herein. Optionally, the resource capacity threshold can be the number of resources, or the resource proportion, etc. The specific determination can be made according to actual application scenarios, which is not limited herein. In the embodiments of the present application, the remaining buffer resource amount in the buffer resource corresponding to the target user except for the called target buffer resource can be detected in real time, and when the remaining amount is less than the resource capacity threshold, the idle service processing resource in the shared resource pool is obtained and initialized, and then the initialized resource can be supplemented to the buffer resource of the target user. Through real-time detection of the remaining buffer resource amount and the threshold triggering mechanism, the service processing resource in the shared resource pool can be dynamically called for buffer resource expansion when the buffer resource is in short supply, so as to ensure the continuous supply of the buffer resource, avoid the response delay of the subsequent service processing request caused by the insufficient buffer resource amount, at the same time, reduce the resource waste caused by the pre-allocation of redundant buffer resource, improve the resource utilization rate of the global resource, and have high applicability.

[0049] Optionally, in some possible implementations, the terminal device can determine the idle duration of the idle resource in the buffer resource corresponding to the target object through real-time detection or periodic scanning, etc. Here, the terminal device can dynamically identify the idle resource in the buffer resource that is inefficiently occupied by using an idle duration threshold judgment mechanism (such as statistical analysis based on a time window or a machine learning prediction model), and the idle duration threshold can be specifically determined according to an actual application scenario, which is not limited herein. It can be understood that for the idle resource that exceeds the idle duration threshold, the terminal device can degrade the buffer resource that can be reused in a short term to a low priority (such as adjusting the CPU frequency, memory compression, or storage cold and hot layering), and prolong the retention period of the buffer resource in the pool; and the long-term idle resource can be released to the state before initialization, and returned to the shared resource pool for allocation by other services on demand, which can be specifically determined according to an actual application scenario, which is not limited herein. In the embodiments of the present application, through real-time detection of the resource idle duration and a threshold triggering mechanism, the buffer resource in a long-term idle state can be released back to the shared resource pool, the resource turnover efficiency is improved, the operation loss of the buffer resource is reduced, and the overall resource utilization is improved.

[0050] In some possible implementation manners, before the buffer resources are pre-allocated to each of the users according to the predicted resource demand of each of the users, the terminal device can set the resource capacity threshold according to a time period position of the historical target time period in the service processing resource pre-allocation period, where the historical target time period is a part of the service processing resource pre-allocation period. It can be understood that, before the buffer resources are pre-allocated according to the predicted demand, the terminal device can set the dynamic resource capacity threshold based on the time sequence characteristics of the historical target time period in the overall resource pre-allocation period. For example, the terminal device can analyze the load law in the service processing resource pre-allocation period (for example, a day period in a 24-hour system or a week period in a 7-day system), and set the position of the historical target time period (for example, an early peak time period of 9:00-11:00 on weekdays) in the service processing resource pre-allocation period to the resource capacity threshold. According to the day period mode in the 24-hour system, that is, based on the day and night mode, for a period peak stage (for example, a daytime working time), a higher resource capacity threshold can be set to ensure sufficient supply of resources; and for a period valley stage (for example, a night rest time), since the traffic volume usually presents a decay trend, the threshold can be dynamically adjusted downward in combination with a recent decline slope calculated by a sliding window, and the specific adjustment can be determined according to an actual application scenario, which is not limited herein. In addition, the terminal device can also establish a time period association matrix, and when it is detected that there is a strong correlation between a current time period and a previous time period (for example, an immediately preceding time period), for example, when the correlation coefficient between the current time period and the previous time period is large, a statistical method including but not limited to a Bayesian method can be used to integrate the actual usage of the previous time period into the current threshold calculation with a specific weight, to realize adaptive adjustment of the threshold setting, and the specific adjustment can be determined according to an actual application scenario, which is not limited herein. In the embodiments of the present application, by using the resource capacity threshold strategy of the period position, the risk of resource overload can be prevented, and the waste of resources caused by the static threshold can be avoided, and the applicability is high.

[0051] Optionally, in some possible implementations, the terminal device can also set the resource capacity threshold according to the resource node type included in the historical resource scheduling data, wherein the resource node type is one of a resource center node or a resource edge node. It can be understood that when setting the resource capacity threshold, the terminal device can perform differentiated design of the resource capacity threshold according to the spatial dimension characteristics of the resource node type (center node or edge node). Here, the edge node can focus on low-latency, region-sensitive tasks (such as real-time video analysis, industrial Internet of Things data processing), the resource can be CPU-centered and configured with a small amount of lightweight GPU, and the resource capacity threshold can be set according to the characteristics of the localized business (such as reserving memory bandwidth at 1.2 times the historical maximum device access number); the center node can be used to carry high-computing-intensive tasks (such as artificial intelligence model training, scientific computing), the resource can be mainly GPU / NPU cluster and secondarily CPU, and the resource capacity threshold can be dynamically adjusted according to the global task queue depth (such as automatically expanding the TPU resource pool when the queued tasks exceed the threshold). The terminal device realizes spatial optimization migration of resources based on the setting of the resource capacity threshold, for example, when the edge node detects a burst request (such as a sharp increase in real-time analysis demand), the terminal device can immediately pull the initialized GPU instance from the center node and load the localized algorithm model to shorten the data transmission path; conversely, when the batch tasks of the center node need to be distributed for acceleration (such as parallel computing), the field programmable gate array (FPGA) resources idled by the edge node can be dynamically integrated into the resource pool formed by the center node, and the actual application scenario can be determined, which is not limited herein. In the embodiments of the present application, the resource capacity threshold is set based on the resource node type to realize pre-allocation of resources in the spatial dimension, which can improve the resource utilization rate through "edge-center" resource complementation, and at the same time, different resource distributions can be adapted according to different business scenarios, improving the flexibility and scenario generalization capability of resource scheduling, and having high applicability.

[0052] Optionally, in some possible implementations, the terminal device can also set the resource capacity threshold according to historical resource configuration information included in the historical resource scheduling data, wherein the historical resource configuration information at least includes resource types and service processing capabilities of the resources. It can be understood that when setting the resource capacity threshold, the terminal device can obtain the resource types (such as CPU, GPU, and NPU) and the service processing capabilities (such as floating-point computing power, memory bandwidth, and instruction set compatibility) of the resources carried in the historical resource configuration information, set the resource capacity threshold through the type dimension, and dynamically adjust the buffer ratio of the heterogeneous resources. For example, for a parallel computing scenario (such as a video rendering task) frequently appearing in historical data, if the historical peak utilization rate of GPU resources is continuously higher than 75%, the proportion of the buffer resource amount of GPU in the total amount of buffer resources is increased according to the task demand weight, and the redundant reservation of low-load CPU is reduced. Conversely, in a logic-intensive task (such as a high-frequency trading system), if the historical calling rate of NPU is very low (for example, lower than a certain set threshold), the buffer ratio of NPU is compressed, and the resources are released to increase the proportion of the CPU buffer resource amount. In the embodiments of the present application, the resource buffer threshold is set based on the resource type dimension to adjust the buffer ratio of the heterogeneous resources, which can align the resource service processing capability with the task characteristics of the service processing request, reduce the cross-type resource contention, adapt to diversified business demands, enhance the scene generalization capability and heterogeneous collaboration efficiency of the resources, and has high applicability.

[0053] Optionally, in some possible implementations, the terminal device can also set the resource capacity threshold according to user priorities of the users, wherein the user priorities are set by service levels of service processing services subscribed by the users. It can be understood that when setting the resource capacity threshold, the terminal device can hierarchically control the business demands of the users according to a service-level agreement (SLA). For example, for high-level users (such as VIPs), the resource capacity threshold is set at 120% of the average value of historical thresholds, and an exclusive resource lock (such as GPU memory reservation) can be set to ensure that high-priority tasks are preferentially preempted in resource contention; and a lower resource capacity threshold is set for low-level users. Here, through the differential design of the threshold, the buffer resources of high-priority users can be more timely supplemented. The terminal device can also realize priority scheduling of the buffer resources through a dynamic weight queue, for example, when a high-SLA task enters, the resource quota of a low-priority task is automatically compressed in proportion, and the released resources can be preferentially injected into a high-priority queue by triggering resource reallocation. In the embodiments of the present application, the resource capacity threshold can be set through the user priority, which enriches the flexibility and selectivity of the resource capacity threshold setting strategy and the resource dynamic pre-allocation strategy, enhances the scene adaptability of resource scheduling, and has high applicability.

[0054] In some possible implementations, the terminal device can dynamically adjust the resource capacity threshold according to the actual usage of the buffer resource. Here, the actual usage of the buffer resource can be the historical usage rate of the buffer resource, and the terminal device can introduce a dynamic resource capacity threshold adjustment mechanism by continuously detecting the historical usage rate of each user buffer resource (such as sliding window statistics or time series prediction analysis), to dynamically adjust the resource capacity threshold. For example, when the resource usage rate of a user exceeds a first threshold (such as 80%) for N consecutive periods, the capacity threshold (such as an increase of 20% quota) can be automatically adjusted upwards to avoid frequent resource contention; when it is below a second threshold (such as 30%) for M consecutive periods, the threshold can be stepwise adjusted downwards (such as a reduction of 10% each time) to gradually recover the redundant resources. Wherein, the above N and M can be set by business requirements (such as N = 3, M = 5), and support dynamic calibration at runtime. In the embodiments of the present application, the dynamic resource capacity threshold adjustment mechanism is introduced, which can dynamically adjust the quota according to the actual load, so as to make the resource allocation accurate, and improve the resource utilization rate and system performance.

[0055] In some possible implementation manners, the shared resource pool can include multiple service processing resources sorted according to different scheduling priorities, the terminal device can obtain an idle resource with a scheduling priority lower than a priority threshold from the multiple service processing resources, and complete initialization, and then supplement the service processing resource after the initialization to the buffer resource corresponding to the target user. Here, the scheduling priority can be set by at least one priority setting rule including but not limited to user priority, task priority, and resource type priority. It can be understood that under the priority scheduling framework of the shared resource pool, the terminal device can dynamically filter service processing resources and supplement buffer resources through a multi-dimensional rule fusion engine. For example, the terminal device can generate a priority score for each service processing resource in the pool according to a preset priority setting rule, such as user service level, task criticality weight, and resource computing power demand. When it is detected that the buffer resource of the target user needs to be expanded (that is, when the remaining buffer resource amount is less than the resource capacity threshold), the service processing resources in the shared resource pool can be sorted according to the priority score, and then service processing resources with a low priority score (that is, with a low priority) in the shared resource pool are obtained. After performing resource initialization operations including but not limited to setting a resource state and configuring an environment variable on the obtained service processing resources, the service processing resources are supplemented to the buffer resource. The specific operations can be determined according to actual application scenarios, which are not limited herein. In the embodiments of the present application, the service processing resources sorted according to the scheduling priorities of user priority, task priority, or resource type priority can be maintained in the shared resource pool, and the initialization can be completed by obtaining an idle resource with a scheduling priority lower than a set threshold when the service processing resources are obtained. By using the priority threshold filtering mechanism, an idle resource with a low priority that has a smaller impact on service running can be selected for initialization, so as to avoid the occupation of high-priority resources and affect the resource guarantee of critical tasks or high-priority users, thereby reserving the schedulability of high-priority resources to maintain the stability of core services and the resource supply preparation for high-priority users, and activating idle resources with low priority as service processing resources to improve the resource utilization of the shared resource pool, balance the efficient reuse of resources and the business guarantee capability, and have high applicability.

[0056] In some possible implementation manners, the terminal device can acquire the identity of the target user carried in the service processing request, and the identity can at least include a user identifier and a user priority, where the user priority is set by a service level of a service processing service subscribed by the user, and then the terminal device can determine a resource suitable for the target user and the service processing request from the shared resource pool shared by the plurality of users based on the identity, and initialize the resource to create a service processing resource corresponding to the service processing request. It can be understood that the terminal device can acquire the identity of the user carried in the service processing request by using a request analysis engine and the like, and the identity can at least include a user identifier (such as a user account and a user password) and a user priority. The terminal device can verify the authority range of the user according to the acquired user identifier, for example, whether the user has the calling qualification of a certain resource, and then pre-allocate a matching resource to the user according to the user priority, for example, the user priority can be abstractly converted into a physical resource specification, and a resource node with acceleration is matched for a high-level user. Optionally, the terminal device can also screen an optimal resource node that can meet the identity constraint and meet the current load from the shared resource pool in combination with real-time characteristics of the request, where the real-time characteristics can include but are not limited to the number of concurrent tasks carried in the request, a peak demand of computing power, and the like, and the specific determination can be made according to an actual application scenario, which is not limited herein. In the embodiments of the present application, the identity of the target user carried in the service processing request is acquired, a resource suitable for the target user and the request characteristics is dynamically matched from the shared resource pool based on the identity, and resource initialization is completed to create a dedicated service processing resource, which can realize differentiated resource guarantee of service levels, ensure the matching degree between the matched resource and the target user, and improve the stability of service processing resource supply. The resource initialization creation process in combination with the user identifier and the request characteristics enables the generated service processing resource to have a targeted processing capability, reduces the occupation of redundant resources, shortens the delay of the service processing request from initiation to resource readiness, and has high applicability.

[0057] S304, when the service processing resource initialization is completed, the service processing operation corresponding to the service processing request is taken over based on the service processing resource, and the target buffer resource is released.

[0058] In some possible implementation manners, when the service processing resource initialization is completed, the terminal device can take over the service processing operation corresponding to the service processing request by using the service processing resource after the initialization is completed, and release the target buffer resource originally used to execute the service processing operation. It can be understood that the switching between the service processing resource and the target buffer resource can be directly switched or can experience a smooth switching process, and the specific determination can be made according to an actual application scenario, which is not limited herein. For ease of understanding, please refer to Figure 4 ,Figure 4 is an interaction diagram of a resource scheduling method provided by an embodiment of the present application. As shown in Figure 4 the target user can be pre-allocated part of exclusive buffer resources by the terminal device through a subscription manner (such as synchronously subscribing when the target user registers; or selecting a user level or a user priority to subscribe when the target user registers, and pre-subscribing through the user level or the user priority) before sending a service request. When receiving the service processing request of the target user, the terminal device can call the target buffer resource from the buffer resource corresponding to the target resource to quickly respond to the service processing request of the target user, avoiding the long waiting for initialization of resources. At the same time, the terminal device can match the service processing resource corresponding to the service processing request in the shared resource pool and initialize the service processing resource, and then provide the service processing resource to the user after the initialization is completed, to take over the service processing operation corresponding to the service processing request, and release the target buffer resource (not shown in the figure).

[0059] In some possible implementation manners, the terminal device can process part of the service processing operations requested to be processed by the service processing request based on the service processing resource, and process all the service processing operations requested to be processed by the service processing request based on the service processing resource after a preset transition time, to realize smooth transition of the service processing operations from the target buffer resource to the service processing resource. Here, the preset transition time can be set by a user, or can be obtained by historical smooth switching time calculation, and can be determined according to an actual application scenario, which is not limited herein. It can be understood that when the terminal device receives the service processing request sent by the user, the target buffer resource can be called immediately to respond, and the service processing resource is matched in the shared resource pool and is initialized. Then, after the service processing resource is initialized, part of the service processing operations are processed based on the service processing resource, and within a preset transition time window (for example, 0-500 milliseconds), the target buffer resource continues to process core service processing operations, and the service processing resource executes non-critical subtasks in parallel and preheats service context (for example, loads user data cache). After the transition time ends, the terminal device can verify the state integrity of the service processing resource (for example, data synchronization offset detection), and if the verification is passed, the terminal device can completely hand over all the service processing operations to the service processing resource, and release the target buffer resource; if a state exception (for example, data inconsistency) is detected, the terminal device can automatically roll back to the target buffer resource to continue to serve, and an alarm mechanism can be triggered, which can be determined according to an actual application scenario, which is not limited herein. It can be understood that the process of the resource smooth switching can realize zero-jitter resource migration experience in a case that a user is not aware. In the embodiments of the present application, part of the operations in the service processing request are processed based on the service processing resource first, and all the operations are processed after a preset transition time, to realize smooth transition from the target buffer resource to the service processing resource, effectively avoiding interruption or performance fluctuation of the service processing operations in the resource switching moment, maintaining service continuity, reserving smooth transition time for complete takeover of the service processing resource, reducing processing conflict risk caused by sudden release or preemption of the resource on the basis of guaranteeing service continuity, optimizing stability of the resource switching process, and being highly applicable.

[0060] In some possible implementation manners, the terminal device can determine the remaining resource amount of the target user corresponding buffer resource through real-time detection or timing scanning, etc. When the remaining resource amount is less than the resource capacity threshold, the target buffer resource can be supplemented into the target user corresponding buffer resource to expand the target user corresponding buffer resource. When the remaining resource amount is not less than the resource capacity threshold, the target buffer resource can be released to the state before initialization to obtain the target service processing resource corresponding to the target buffer resource, and the target service processing resource is supplemented into the shared resource pool. Here, the resource capacity threshold can be regarded as the lowest bit of the buffer resource set or the buffer resource pool, which can be determined by the user according to the multi-dimensional resource usage in the historical resource scheduling data, or can be set by the historical resource capacity threshold. The specific application scenario can be determined, which is not limited here. Optionally, the resource capacity threshold can be the number of resources, or the resource proportion, etc. The specific application scenario can be determined, which is not limited here. The setting of the resource capacity threshold can refer to the foregoing embodiments, which will not be repeated here. It can be understood that when the remaining resource amount is less than the resource capacity threshold, for example, the current buffer resource is insufficient (for example, less than 30% of the capacity threshold), and the conventional supply (that is, the low priority resource obtained from the shared resource pool) cannot supplement the buffer resource level in time, or a sudden high priority request (for example, a VIP user suddenly submits a large-scale task), or part of the buffer resource fails, the target buffer resource can be supplemented into the target user corresponding buffer resource. Here, the target buffer resource that can be supplemented into the corresponding buffer resource can be the resource (for example, a virtual machine instance without data damage or pollution) that is still in the available state after the user releases it, which can be directly reset (for example, clear the task process) and directly enter the corresponding buffer resource. For easy understanding, please refer to Figure 5 , Figure 5 is another interactive diagram of the resource scheduling method provided by the embodiments of the present application. As Figure 5As shown, when a business processing request of a target user is received (not shown in the figure), the business processing request can be responded to by the target buffer resource in the buffer resource corresponding to the target user, and the business processing resource corresponding to the business processing request can be matched and initialized in the shared resource pool. Then, after the business processing resource initialization is completed, the business processing operation is taken over by the business processing resource, and the target buffer resource is released. Here, assuming that the remaining resource amount is sufficient, that is, assuming that the remaining resource amount of the buffer resource corresponding to the target user is not less than the resource capacity threshold, the above-mentioned target buffer resource can be released to the state before initialization to be supplemented to the shared resource pool. In an embodiment of the present application, the remaining resource amount of the buffer resource can be detected in real time, and then the resource pre-allocation can be dynamically adjusted according to the comparison result with the resource capacity threshold: when the remaining resource amount is insufficient, the target buffer resource can be supplemented to the buffer resource of the user to maintain the remaining resource amount of the buffer resource; when the remaining resource amount is sufficient, the target buffer resource can be released to the state before initialization and recycled to the shared resource pool. Through the elastic adjustment mechanism determined by thresholds, the buffer resource reserves of target users can be prioritized when resources are insufficient, ensuring the ability to quickly respond to subsequent business processing requests. Resources can also be released and recycled to the shared resource pool when resources are redundant, avoiding the long-term idleness of redundant buffer resources, improving the resource utilization of global resources, and having high applicability.

[0061] In addition, in some feasible implementations, the terminal device can also be combined with a feedback elastic scaling mechanism. If it detects that the actual resource usage of high-priority users is continuously significantly lower than the predicted resource demand, the terminal device can gradually release redundant resources to the shared resource pool to avoid long-term idleness, thereby ensuring the stability of core services while maximizing global resource utilization efficiency. Figure 5 ,like Figure 5 As shown in Figure 2, assuming that the actual resources of the target user are far less than the predicted resource demand, the buffer resources corresponding to the target user can release a small amount of redundant resources to the shared resource pool to maximize the global resource utilization efficiency.

[0062] In general, the resource scheduling method provided in the application can improve the accuracy of resource demand prediction by collecting historical resource scheduling data of each user, pre-allocate buffer resources that have completed initialization to each user, and then call the corresponding buffer resources to achieve fast response when receiving a service processing request initiated by a target user, trigger the matching and initialization process of the service processing resources in the shared resource pool, and implement service processing operation takeover and release buffer resources after the service processing resources are initialized. The use of historical resource scheduling data can improve the accuracy of resource demand prediction, while the pre-loading mechanism of buffer resources can reduce the response delay of service processing requests. At the same time, the dynamic matching of service processing resources and the recycling mechanism of buffer resources can improve the overall resource utilization rate while ensuring user experience, and has high applicability. Therefore, the resource scheduling method provided in the embodiments of the application can improve user experience and enhance the market competitiveness of products, and provides a resource scheduling solution with high real-time performance, high flexibility and high resource utilization rate for various enterprises.

[0063] Based on the description of the above resource scheduling method, the embodiments of the application also disclose a resource scheduling device. The resource scheduling device can be applied to Figures 1 to 5 The resource scheduling method of the embodiments shown in the drawings is used to execute the steps in the resource scheduling method, that is, the resource scheduling device can be the execution subject of the above Figures 3 to 5 The resource scheduling method in the embodiments shown in the drawings. Referring to Figure 6 , Figure 6 is a structural schematic diagram of the resource scheduling device provided by the embodiments of the application. As Figure 6 shown, in the embodiments of the application, the resource scheduling device 60 can run the following modules: The data acquisition module 610 is configured to acquire a plurality of historical resource scheduling data corresponding to a plurality of users, wherein one of the users corresponds to one of the historical resource scheduling data. The prediction and allocation module 620 is configured to acquire a predicted resource demand of each of the users according to the historical resource scheduling data corresponding to each of the users, and pre-allocate buffer resources to each of the users according to the predicted resource demand of each of the users, wherein the buffer resources are available resources that have completed initialization and are stored in a buffer resource pool and are in a state of being ready for allocation. The request response module 630 is configured to call a target buffer resource from the buffer resource corresponding to a target user when receiving a service processing request of the target user among the users, respond to the service processing request based on the target buffer resource, and match a service processing resource corresponding to the service processing request in a shared resource pool shared by the users. The resource switching module 640, when the service processing resource initialization is completed, takes over the service processing operation corresponding to the service processing request based on the service processing resource, and releases the target buffer resource.

[0064] In some possible implementations, the prediction allocation module 620 is configured to: obtain target historical resource scheduling data corresponding to each of the users in a historical target period from the historical resource scheduling data corresponding to each of the users, input the target historical resource scheduling data corresponding to each of the users into a resource prediction model, and output predicted resource demand amounts corresponding to each of the users in a future target period corresponding to the historical target period through the resource prediction model; The resource prediction model includes at least one of a machine learning model or a deep learning model.

[0065] In some possible implementations, the prediction allocation module 620 is configured to: pre-allocate service processing resources to each of the users according to the predicted resource demand amount of each of the users, and mark the service processing resources pre-allocated to each of the users as exclusive service processing resources of each of the users; initialize the exclusive service processing resources of each of the users, and freeze the initialized resources into resources in a initialized and standby scheduling state through a memory snapshot technology, to obtain a plurality of buffer resources corresponding to the plurality of users.

[0066] In some possible implementations, the request response module 630 is configured to: obtain at least one idle buffer resource as a target buffer resource from the buffer resources corresponding to the target user, and call the target buffer resource through an instant available scheduling interface to respond to the service processing request through the target buffer resource; The instant available scheduling interface includes at least one of a memory access channel or a dedicated application programming interface (API) channel, and the buffer resource includes at least one of a computing resource, a storage resource, or a network resource.

[0067] In some possible implementations, the resource switching module 640 is configured to: determine a remaining resource amount of the buffer resource corresponding to the target user; when the remaining resource amount is less than a resource capacity threshold, supplement the target buffer resource into the buffer resource corresponding to the target user to expand the buffer resource corresponding to the target user; When the remaining resource amount is not less than the resource capacity threshold, the target buffer resource is released to the state before initialization to obtain the target service processing resource corresponding to the target buffer resource, and the target service processing resource is added to the shared resource pool.

[0068] In some feasible implementations, the request response module 630 is further configured to: Determine the remaining buffer resource amount in the buffer resources corresponding to the target user excluding the target buffer resource; When the remaining buffer resource amount is less than the resource capacity threshold, idle service processing resources are obtained from the shared resource pool and initialized, and the initialized service processing resources are added to the buffer resources corresponding to the target user.

[0069] In some feasible implementations, the prediction allocation module 620 is further configured to: The resource capacity threshold is set according to the position of the historical target period in the business processing resource pre-allocation period, wherein the historical target period is a portion of the business processing resource pre-allocation period; or The resource capacity threshold is set according to the resource node type included in the historical resource scheduling data, wherein the resource node type is one of a resource center node or a resource edge node; or The resource capacity threshold is set according to the historical resource configuration information included in the historical resource scheduling data, wherein the historical resource configuration information at least includes the resource type and the service processing capability of the resource; or The resource capacity threshold is set according to the user priority of each of the users, wherein the user priority is set by the service level of the business processing service subscribed by the user.

[0070] In some feasible implementations, the shared resource pool includes multiple business processing resources sorted according to different scheduling priorities; the request response module 630 is configured to: Obtain idle resources with a scheduling priority lower than a priority threshold from the above-mentioned multiple business processing resources and complete initialization; The scheduling priority is set by at least one priority setting rule among user priority, task priority, and resource type priority.

[0071] In some feasible implementations, the resource switching module 640 is configured to: Based on the above-mentioned business processing resources, part of the business processing operations requested by the above-mentioned business processing request are processed, and after a preset transition time, all the business processing operations requested by the above-mentioned business processing request are processed based on the above-mentioned business processing resources to achieve a smooth transition of the above-mentioned business processing operations from the above-mentioned target buffer resources to the above-mentioned business processing resources.

[0072] In some feasible implementations, the request response module 630 is configured to: Obtaining the identity of the target user carried in the service processing request, where the identity includes at least a user identifier and a user priority, wherein the user priority is set by a service level of the service processing service subscribed by the user; Based on the identity identifier, resources that are compatible with the target user and the business processing request are determined from the shared resource pool shared by the multiple users, and the resources are initialized to create business processing resources corresponding to the business processing request.

[0073] In an embodiment of the present application, each module in the device shown in the above figure can be separately or completely combined into one or several other modules to constitute, or one (or some) of the modules can be further divided into multiple smaller modules in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiment of the present application. The above modules are divided based on logical functions. In actual applications, the functions of one module can also be implemented by multiple modules, or the functions of multiple modules can be implemented by one module. In other feasible implementation methods of the present application, the above device may also include other modules. In actual applications, these functions can also be implemented with the assistance of other modules, and can be implemented by the collaboration of multiple modules, which is not limited here.

[0074] In some feasible implementations, the above Figures 3 to 5 The implementation methods provided by each step in the resource scheduling method shown can be Figure 6 Each module of the device shown in FIG. Figure 3 In the resource scheduling method shown, step S301 can be performed by Figure 6 In the device shown in FIG. 6 , the data acquisition module 610 is executed, and step S302 can be respectively performed by Figure 6 In the apparatus shown, the prediction allocation module 620 is executed, and step S303 can be respectively performed by Figure 6 The request response module 630 is executed in the device shown, and step S304 can be respectively performed by Figure 6 The resource switching module 640 in the device shown is executed. The implementation method executed by the above modules can refer to the implementation method provided in each step of the above embodiment, which will not be repeated here.

[0075] In general, the resource scheduling device provided by the embodiment of the present application is composed of at least a data acquisition module, a prediction allocation module, a request response module, and a resource switching module. It can obtain the historical resource scheduling data of each user to predict the resource demand model, pre-allocate the initialized buffer resources to be scheduled for each user, and then immediately call the corresponding buffer resources to achieve a quick response when receiving the business processing request initiated by the target user, and at the same time trigger the matching and initialization process of the business processing resources in the shared resource pool, and take over the business processing operation and release the buffer resources after the business processing resources are initialized. The use of historical resource scheduling data can improve the accuracy of resource demand prediction, and the preloading mechanism of buffer resources can reduce the response delay of business processing requests. At the same time, the dynamic matching of business processing resources and the recovery mechanism of buffer resources can improve the overall resource utilization while ensuring user experience, and have high applicability. It can be seen that the resource scheduling method provided by the embodiment of the present application can improve user experience and enhance the market competitiveness of products, providing various types of enterprises with a resource scheduling solution with high real-time performance, high flexibility and high resource utilization.

[0076] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 7 As shown, the terminal device 1000 can be the above Figures 1-5 The terminal device in the corresponding embodiment. The terminal device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the terminal device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (display), a keyboard (keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 7 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

[0077] The network interface 1004 in the terminal device 1000 can also be connected to the above Figure 1The terminal device 200c in the corresponding embodiment is connected to the network, and the optional user interface 1003 can further include a display, a keyboard. Figure 7 In the terminal device 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to invoke the device control application program stored in the memory 1005 to implement the foregoing Figure 3 The resource scheduling method in the corresponding embodiment.

[0078] It should be understood that the terminal device 1000 described in the embodiments of the present application can perform the foregoing Figures 3 to 5 The description of the resource scheduling in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of using the same method will also not be repeated.

[0079] The embodiments of the present application also provide a computer-readable storage medium, which stores a computer program, the computer program including program instructions, the program instructions being executed by a processor to implement Figures 3 to 5 The resource scheduling method provided by each step, and the implementation manner provided by each step will not be repeated here. Figures 3 to 5 The resource scheduling method provided by each step, and the implementation manner provided by each step will not be repeated here.

[0080] The computer-readable storage medium can be the resource scheduling apparatus provided by any of the foregoing embodiments or the internal storage unit of the computer device, for example, the hard disk or the memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer-readable storage medium can include both the internal storage unit and the external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0081] The term "comprises" and any variation thereof in the specification and claims and drawings of the embodiments of the present application is intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment including a series of steps or modules is not limited to the listed steps or modules, but can optionally further include steps or modules that are not listed, or can optionally further include other steps or modules inherent to the process, method, device, product or equipment.

[0082] Those skilled in the art can understand that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description in a general manner. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0083] The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device implemented in the flow Figure 1 The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device implemented in the flow Figure 1 The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device implemented in the flow Figure 1 The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device implemented in the flow Figure 1 The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device implemented in the flow Figure 1 The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device implemented in the flow

[0084] The above disclosure is only the preferred embodiments of the present application, and of course cannot limit the scope of the present application. Therefore, equivalent changes made in accordance with the claims of the present application are still within the scope of the present application.

Claims

1. A resource scheduling method, characterized in that: include: Acquire a plurality of historical resource scheduling data corresponding to a plurality of users, wherein one historical resource scheduling data corresponds to one user; Obtaining predicted resource demands of each user based on the historical resource scheduling data corresponding to each user, and pre-allocating buffer resources to each user based on the predicted resource demands of each user, wherein the buffer resources are available resources that have been pre-initialized and stored in a buffer resource pool and are in a waiting-to-be-allocated state; When receiving a service processing request from a target user among the multiple users, calling a target buffer resource from the buffer resources corresponding to the target user, responding to the service processing request based on the target buffer resource, and matching a service processing resource corresponding to the service processing request in a shared resource pool shared by the multiple users; When the service processing resource initialization is completed, the service processing operation corresponding to the service processing request is taken over based on the service processing resource, and the target buffer resource is released.

2. The method according to claim 1, characterized in that The obtaining of the predicted resource demand of each user according to the historical resource scheduling data corresponding to each user includes: Obtaining target historical resource scheduling data corresponding to each user within a historical target period from the historical resource scheduling data corresponding to each user, inputting the target historical resource scheduling data corresponding to each user into a resource prediction model, and outputting predicted resource demand corresponding to each user within a future target period corresponding to the historical target period through the resource prediction model; The resource prediction model includes at least one of a machine learning model and a deep learning model.

3. The method according to claim 2, characterized in that The pre-allocating buffer resources to each of the users according to the predicted resource demand of each of the users comprises: pre-allocating business processing resources to each of the users according to the predicted resource demand of each of the users, and marking the business processing resources pre-allocated to each of the users as exclusive business processing resources for each of the users; The dedicated service processing resources of each user are initialized, and the initialized resources are frozen as initialized resources in a waiting-to-be-scheduled state through a memory snapshot technology, so as to obtain a plurality of buffer resources corresponding to the plurality of users.

4. The method according to claim 3, characterized in that The calling of the target buffer resource from the buffer resource corresponding to the target user includes: Acquire at least one idle buffer resource from the buffer resources corresponding to the target user as a target buffer resource, and call the target buffer resource through an immediately available scheduling interface to respond to the service processing request through the target buffer resource; The immediately available scheduling interface includes at least one of a memory access channel or a dedicated application programming interface channel, and the buffer resources include at least one of a computing resource, a storage resource or a network resource.

5. The method according to claim 4, characterized in that The releasing of the target buffer resource comprises: Determining the remaining amount of buffer resources corresponding to the target user; When the remaining resource amount is less than the resource capacity threshold, adding the target buffer resource to the buffer resource corresponding to the target user to expand the buffer resource corresponding to the target user; When the remaining resource amount is not less than the resource capacity threshold, the target buffer resource is released to a state before initialization to obtain a target service processing resource corresponding to the target buffer resource, and the target service processing resource is added to the shared resource pool.

6. The method according to claim 4, characterized in that After responding to the service processing request based on the target buffer resource, the method further includes: Determine the amount of remaining buffer resources in the buffer resources corresponding to the target user excluding the target buffer resources; When the remaining buffer resource amount is less than the resource capacity threshold, idle service processing resources are obtained from the shared resource pool and initialized, and the initialized service processing resources are added to the buffer resources corresponding to the target user.

7. The method according to claim 5 or 6, characterized in that Before pre-allocating buffer resources to each of the users according to the predicted resource requirements of each of the users, the method further includes: Setting the resource capacity threshold according to the time period position of the historical target time period in the business processing resource pre-allocation period, wherein the historical target time period is a portion of the time period in the business processing resource pre-allocation period; or Setting the resource capacity threshold according to the resource node type included in the historical resource scheduling data, wherein the resource node type is one of a resource center node or a resource edge node; or Setting the resource capacity threshold according to historical resource configuration information included in the historical resource scheduling data, wherein the historical resource configuration information includes at least resource type and service processing capability of the resource; or The resource capacity threshold is set according to the user priority of each user, wherein the user priority is set by the service level of the business processing service subscribed by the user.

8. The method according to claim 6, characterized in that The shared resource pool includes a plurality of business processing resources sorted according to different scheduling priorities; and obtaining idle business processing resources from the shared resource pool and completing initialization includes: Acquire idle resources with a scheduling priority lower than a priority threshold from the plurality of business processing resources, and complete initialization; The scheduling priority is set by at least one priority setting rule among user priority, task priority, and resource type priority.

9. The method according to any one of claims 1 to 6, characterized in that Taking over the business processing operation corresponding to the business processing request based on the business processing resource includes: Process part of the business processing operations requested by the business processing request based on the business processing resources, and process all of the business processing operations requested by the business processing request based on the business processing resources after a preset transition time, so as to achieve a smooth transition of the business processing operations from the target buffer resources to the business processing resources.

10. The method according to any one of claims 1 to 6, characterized in that The matching the business processing resources corresponding to the business processing request in the shared resource pool shared by the multiple users includes: Obtaining an identity identifier of the target user carried in the service processing request, where the identity identifier includes at least a user identifier and a user priority, wherein the user priority is set by a service level of the service processing service subscribed by the user; Based on the identity identifier, resources that are adapted to the target user and the service processing request are determined from a shared resource pool shared by the multiple users, and the resources are initialized to create service processing resources corresponding to the service processing request.

11. A resource scheduling device, characterized in that: include: A data acquisition module, configured to acquire a plurality of historical resource scheduling data corresponding to a plurality of users, wherein one user corresponds to one piece of historical resource scheduling data; a prediction allocation module, configured to obtain a predicted resource demand of each user based on the historical resource scheduling data corresponding to each user, and pre-allocate buffer resources to each user based on the predicted resource demand of each user, wherein the buffer resources are available resources that have been pre-initialized and stored in a buffer resource pool and are in a waiting-to-be-allocated state; a request response module, configured to, upon receiving a service processing request from a target user among the multiple users, call a target buffer resource from the buffer resources corresponding to the target user, respond to the service processing request based on the target buffer resource, and simultaneously match a service processing resource corresponding to the service processing request in a shared resource pool shared by the multiple users; The resource switching module takes over the business processing operation corresponding to the business processing request based on the business processing resource when the business processing resource is initialized, and releases the target buffer resource.

12. The device according to claim 11, characterized in that The prediction allocation module is used to: Obtaining target historical resource scheduling data corresponding to each user within a historical target period from the historical resource scheduling data corresponding to each user, inputting the target historical resource scheduling data corresponding to each user into a resource prediction model, and outputting predicted resource demand corresponding to each user within a future target period corresponding to the historical target period through the resource prediction model; The resource prediction model includes at least one of a machine learning model and a deep learning model.

13. The device according to claim 12, characterized in that The prediction allocation module is used to: pre-allocating business processing resources to each of the users according to the predicted resource demand of each of the users, and marking the business processing resources pre-allocated to each of the users as exclusive business processing resources for each of the users; The dedicated service processing resources of each user are initialized, and the initialized resources are frozen as initialized resources in a waiting-to-be-scheduled state through a memory snapshot technology, so as to obtain a plurality of buffer resources corresponding to the plurality of users.

14. The device according to claim 13, characterized in that The request response module is used to: Acquire at least one idle buffer resource from the buffer resources corresponding to the target user as a target buffer resource, and call the target buffer resource through an immediately available scheduling interface to respond to the service processing request through the target buffer resource; The immediately available scheduling interface includes at least one of a memory access channel or a dedicated application programming interface (API) channel, and the buffer resources include at least one of computing resources, storage resources, or network resources.

15. A terminal device, characterized in that: The terminal device includes a processor and a memory; The processor is connected to the memory, wherein the memory is used to store program code, and the processor is used to call the program code to execute the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Resource allocation method and device

    CN111126641A

  • Container group setting method, access request processing method and related device

    CN116541101A

  • Page loading method and device, computer equipment and storage medium

    CN119045941A

  • Resource allocation method and device, computer equipment, storage medium and program product

    CN119938338A

  • Game resource optimization method and device based on predictive algorithm and storage medium

    CN120037661A

Cited By

  • Double-resource-pool layered resource scheduling method and device, equipment and medium

    CN122261851A