Resource scheduling method and apparatus, electronic equipment and computer program
The resource scheduling method enhances flexibility and efficiency by searching multilevel resource pools for candidate combinations, addressing the limitations of predetermined templates in existing methods.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-07-25
- Publication Date
- 2026-05-22
Smart Images

Figure 2026516371000001_ABST
Abstract
Description
Technical Field
[0001] This application claims priority based on a Chinese patent application filed with the Chinese Patent Office on September 18, 2023, with an application number of 2023112004036 and an invention title of "Resource Scheduling Method, Related Device, Electronic Device and Medium", and the entire content thereof is incorporated herein by reference.
[0002] The present disclosure relates to the technical field of networks, and particularly to resource scheduling.
Background Art
[0003] In the era of IoT (Internet of Things) born with the annual development of network technology, it is often necessary to process resource scheduling. When performing resource scheduling, by selecting and setting the resources to be used from multiple resource pools of different types and different reservation conditions, a plurality of candidate resource setting schemes can be obtained, and it may be necessary to select a scheme that meets the needs from them to implement resource scheduling.
[0004] At present, the resource scheduling methods for setting resource scheduling schemes based on multiple candidate resource pools mainly include methods such as generating a resource scheduling scheme that matches it based on a predetermined event template.
[0005] In the related technology scheme, since a predetermined event template cannot cope with application scenarios with relatively frequent changes, the above method has relatively low flexibility and adaptability.
Summary of the Invention
Problems to be Solved by the Invention
[0006] The embodiments of this disclosure aim to provide resource scheduling methods and apparatus, electronic devices, and computer programs that can improve the flexibility and efficiency of resource scheduling. [Means for solving the problem]
[0007] According to one aspect of this disclosure, a resource scheduling method is provided, which is, In response to a resource scheduling request for a target task, multiple candidate resource combinations corresponding to the target task are obtained, and each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources for that target resource; For each candidate resource combination, based on the at least one type of target resource and the number of target resources, a search is performed on each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, and a seed resource pool corresponding to the candidate resource combination is determined; and The process includes determining a target resource pool from a plurality of seed resource pools to satisfy the resource scheduling request, based on the level of the seed resource pool corresponding to each candidate resource combination.
[0008] According to one aspect of this disclosure, a resource scheduling device is provided, which is, A first acquisition unit used to acquire a plurality of candidate resource combinations corresponding to a target task in response to a resource scheduling request for the target task, wherein each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources for that target resource; A resource search unit used to determine a seed resource pool corresponding to the candidate resource combination by performing a search on each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, based on the at least one type of target resource and the number of target resources for each candidate resource combination; and It includes a first decision unit used to determine a target resource pool from a plurality of seed resource pools to satisfy the resource scheduling request, based on the level of the seed resource pool corresponding to each candidate resource combination.
[0009] According to one aspect of this disclosure, an electronic device is provided which includes a memory and a processor, the memory storing a computer program, and the processor implementing the resource scheduling method described above when executing the computer program.
[0010] According to one aspect of this disclosure, a computer-readable storage medium is provided, the storage medium stores a computer program, and the computer program implements the resource scheduling method described above when executed by a processor.
[0011] According to one aspect of this disclosure, a computer program product is provided, which includes a computer program, which is read and executed by a processor of a computer device, thereby causing the computer device to perform the resource scheduling method described above. [Effects of the Invention]
[0012] In the embodiments of this disclosure, the resource scheduling method needs to obtain a plurality of candidate resource combinations corresponding to a target task in response to a resource scheduling request for a target task, and each candidate resource combination includes at least one type of target resource and the number of target resources required for the target task. Subsequently, for each candidate resource combination, a search is performed on a multilevel resource pool in order from low level to high level based on at least one type of target resource and the number of target resources to determine the seed resource pool corresponding to the candidate resource combination. Thus, a series of corresponding seed resource pools can be determined for each candidate resource combination corresponding to a target task. Furthermore, a target resource pool to satisfy the resource scheduling request is determined from the plurality of seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination. Since the resource scheduling method of this disclosure determines the target resource pool to satisfy the resource scheduling request according to the level of the seed resource pool corresponding to each candidate resource combination, the speed of response to the resource scheduling request for a target task is relatively fast, and in this way, the efficiency of resource scheduling can be improved. Such schemes do not limit the types of tasks and candidate resource combinations that must be targeted, can be applied to relatively variable application scenarios, and allow for a reasonable determination of the target resource pool to satisfy resource scheduling requests, thus offering relatively high flexibility in resource scheduling.
[0013] Other features and advantages of this disclosure are described in subsequent specifications and are partially apparent from the specifications or understood by implementing this disclosure. The purposes and other advantages of this disclosure can be realized and obtained by configurations specifically shown in the specifications, claims and drawings. [Brief explanation of the drawing]
[0014] [Figure 1] This is a system architecture diagram to which the resource scheduling method according to the embodiments of this disclosure is applied. [Figure 2A] This is an illustrative diagram of a corresponding front-end interface when the resource scheduling method according to the embodiments of this disclosure is applied to the scheduling of virtual resources. [Figure 2B] This is an illustrative diagram of a corresponding front-end interface when the resource scheduling method according to the embodiments of this disclosure is applied to the scheduling of virtual resources. [Figure 2C] This is an illustrative diagram of a corresponding front-end interface when the resource scheduling method according to the embodiments of this disclosure is applied to the scheduling of virtual resources. [Figure 2D] This is an illustrative diagram of a corresponding front-end interface when the resource scheduling method according to the embodiments of this disclosure is applied to the scheduling of physical resources. [Figure 2E] This is an illustrative diagram of a corresponding front-end interface when the resource scheduling method according to the embodiments of this disclosure is applied to the scheduling of physical resources. [Figure 2F] This is an illustrative diagram of a corresponding front-end interface when the resource scheduling method according to the embodiments of this disclosure is applied to the scheduling of physical resources. [Figure 3] This is an overall flowchart of a resource scheduling method according to one embodiment of the present disclosure. [Figure 4A] This is an illustrative diagram showing how candidate resource combinations are obtained by the resource scheduling method in the embodiments of this disclosure. [Figure 4B] This is an illustrative diagram showing how a seed resource pool is determined when scheduling virtual resources in an embodiment of the present disclosure. [Figure 4C]An exemplary diagram for determining a seed resource pool when scheduling physical resources in an embodiment of the present disclosure. [Figure 4D] An exemplary diagram for determining a target resource pool in an embodiment of the present disclosure. [Figure 5] A specific flowchart as one option for step 320 in FIG. 3. [Figure 6] An exemplary diagram for determining a seed resource pool according to a single common type in an embodiment of the present disclosure. [Figure 7] A specific flowchart as one option for step 520 in FIG. 5. [Figure 8] A specific flowchart as one option for step 720 in FIG. 7. [Figure 9] An exemplary diagram for performing a search on a multi-level resource pool in an embodiment of the present disclosure. [Figure 10] A specific flowchart as one option for step 820 in FIG. 8. [Figure 11A] An exemplary diagram showing determining the scheduling return amount of a resource pool waiting for consideration in an embodiment of the present disclosure. [Figure 11B] An exemplary diagram showing determining the scheduling return amount of a resource pool waiting for consideration in an embodiment of the present disclosure. [Figure 11C] An exemplary diagram showing determining the scheduling return amount of a resource pool waiting for consideration in an embodiment of the present disclosure. [Figure 11D] An exemplary diagram showing determining the scheduling return amount of a resource pool waiting for consideration in an embodiment of the present disclosure. [Figure 12] A specific flowchart as one option for step 1060 in FIG. 10. <s [Figure 13] An exemplary diagram showing determining the scheduling return amount in an embodiment of the present disclosure. [Figure 14]Figure 3 shows a specific flowchart as one option for step 320. [Figure 15A] This is an illustrative diagram showing how the seed resource pool is determined based on the shortage amount in an embodiment of the present disclosure. [Figure 15B] This is an illustrative diagram showing how the seed resource pool is determined based on the shortage amount in an embodiment of the present disclosure. [Figure 16] This is a specific flowchart as an option for performing a second process after step 1420 in Figure 14 in the embodiments of this disclosure. [Figure 17] Figure 3 shows a specific flowchart as one option for step 330. [Figure 18] Figure 17 shows a specific flowchart as one option for step 1720. [Figure 19] This is an illustrative diagram showing how to determine the target resource pool in an embodiment of the present disclosure. [Figure 20] Figure 3 shows a specific flowchart as one option for step 330. [Figure 21] This is an illustrative diagram showing how to determine the target resource pool in an embodiment of the present disclosure. [Figure 22] Figure 3 shows a specific flowchart as another option for step 300. [Figure 23] Figure 22 shows a specific flowchart as one option for step 2200. [Figure 24] This is a specific flowchart of options for replenishing resources in a multilevel resource pool in an embodiment of the present disclosure. [Figure 25] Figure 24 shows a specific flowchart as one option for step 2440. [Figure 26] This is an illustrative diagram of one example of replenishing resources in a multilevel resource pool in an embodiment of the present disclosure. [Figure 27]This is a specific flowchart that serves as one option for selecting a target compute node from multiple candidate compute nodes. [Figure 28] Figure 3 shows a specific flowchart as another option for step 300. [Figure 29] Figure 28 shows a specific flowchart as one option for step 2840. [Figure 30] This is an illustrative diagram of a system architecture to which the resource scheduling method according to the embodiments of this disclosure is applied. [Figure 31] This is an illustrative diagram of asynchronous operations of the resource scheduling control layer within the resource scheduling system architecture in an embodiment of the present disclosure. [Figure 32] This is a specific example diagram of a resource scheduling method in an embodiment of the present disclosure. [Figure 33] This is a block diagram of a resource scheduling device according to one embodiment of the present disclosure. [Figure 34] Figure 3 is a configuration diagram of a terminal implementing the resource scheduling method shown in Figure 3, based on one embodiment of this disclosure. [Figure 35] Figure 3 is a configuration diagram of a server implementing the resource scheduling method shown in Figure 3, based on one embodiment of this disclosure. [Modes for carrying out the invention]
[0015] To further clarify the purpose, technical proposal, and advantages of this disclosure, the disclosure will be described in more detail below, along with the drawings and examples. For the purposes of understanding, the specific examples described herein are used solely for the purpose of interpreting this disclosure and are not intended to limit it.
[0016] Before providing further details about the embodiments of this disclosure, we will explain some nouns and terms relating to the embodiments of this disclosure. The nouns and terms relating to the embodiments of this disclosure shall be interpreted as follows:
[0017] A target task refers to a task that needs to be executed as a target in various business scenarios. To ensure that a target task is executed successfully, it has a corresponding resource scheduling request, which is used to schedule the resources necessary for the target task to run successfully.
[0018] Candidate resource combination: Used to represent the target resources and the number of target resources required to execute the target task.
[0019] Resource Pool: A resource pool refers to a collection (set) of resources that can be made available for use within an organization or system. These resources may be physical goods, computer computing power, or a collection of hardware and software resources or other types of resources that can be made available for use by a program within a computer system.
[0020] In related technologies, resource scheduling methods exist that primarily configure resource scheduling schemes based on multiple candidate resource pools. For example, one method generates a resource scheduling scheme that matches a given event template and solves the resource scheduling scheme based on a genetic algorithm. In the former method, the given event template cannot accommodate application scenarios with relatively high variation, so the method has relatively low flexibility and adaptability. In the latter method, the genetic algorithm relies on a large number of samples to be trained, so the method has relatively high time constraints and relatively low resource allocation efficiency.
[0021] Therefore, this disclosure provides a resource scheduling method that can be applied to relatively variable application scenarios, can reasonably determine a target resource pool to satisfy resource scheduling requests, and offers relatively high flexibility in resource scheduling.
[0022] <Description of system architectures and scenarios to which embodiments of this disclosure apply> Figure 1 is an architecture diagram of a system to which the resource scheduling method according to an embodiment of this disclosure is applied. It includes terminals 140, the internet 130, a gateway 120, a resource scheduling server 110, and the like.
[0023] Terminal 140 is a device for displaying input fields, input information, and candidate words. It can take various forms, including desktop computers, laptop computers, tablet computers, PDAs, mobile phones, and in-vehicle terminals. It may also be a single device or a collection of multiple devices. For example, multiple devices may be connected via a local area network and share a single display to perform collaborative work, thereby jointly forming one terminal 140. Terminal 140 can also communicate with the Internet 130 via wired or wireless means and exchange data.
[0024] The resource scheduling server 110 refers to a computer system capable of performing resource scheduling based on target tasks. Compared to a typical terminal 140, the resource scheduling server 110 has considerably higher requirements in terms of stability, security, and performance. The resource scheduling server 110 may be a single high-performance computer on a network platform, a cluster of multiple high-performance computers, a part of a single high-performance computer (e.g., a virtual machine), or a combination of parts of multiple high-performance computers (e.g., virtual machines). The resource scheduling server 110 includes a target task acquisition module, a resource query module, and a resource configuration module. Of these, the target task acquisition module is used to acquire target tasks that need to be executed in the current business scenario and to analyze resource scheduling requests corresponding to those target tasks. The resource query module is used to query a target resource pool that matches the resource scheduling request from among multiple resource pools. The resource configuration module is used to determine a target resource pool that matches the resource scheduling request, set the target resources in the target resource pool to the target tasks that need to be executed, and complete the resource scheduling.
[0025] Gateway 120 is also called an inter-network connector or protocol converter. A gateway is a computer system or device that enables network interconnection at the transmission layer and has conversion functions. When using different communication protocols, data formats, or languages, or between two systems with completely different system configurations, the gateway acts as a translator. Gateways can also provide filtering and security functions.
[0026] Messages sent by terminal 140 to resource scheduling server 110 must be sent to the corresponding resource scheduling server 110 via gateway 120. Messages sent by resource scheduling server 110 to terminal 140 must also be sent to the corresponding terminal 140 via gateway 120. To understand this, terminal 140 may also be used to pass target tasks to the resource scheduling server via the internet 130 and gateway 120.
[0027] The embodiments described herein can be applied to multiple types of business scenarios, and the meanings of target task, target resource, candidate resource combination, and resource pool will differ in different business scenarios. Below, we will describe two of these business scenarios.
[0028] One type of embodiment is when the target task involves scheduling virtual resources. For example, to build an application program (app), it may be necessary to call code blocks from different data storage modules. In this type of business scenario, such a target task may be "building the application program," such a target resource may be "code blocks," such a resource pool may be "data storage modules in which the code blocks are stored," and the candidate resource combination may be "candidate code block combination A, candidate code block combination B, and candidate code block combination C required to build the application program."
[0029] Referring to Figure 2A, which shows the relevant record information for scheduling each code block based on the application build when the target task involves scheduling virtual resources. To query the relevant record information for scheduling each code block based on the application build, query conditions must be entered. In the query conditions, the “Task Type” field is used to fill in the type of target task to be queried, which in this embodiment is “Application Program Build”; the “Specified Resource Pool” field is used to fill in the resource pool that must be specified as being for resource scheduling, which in this embodiment is “Data Storage Module A, Data Storage Module B, and Data Storage Module C”; the “Task Number” field is used to fill in the number of the target task to be queried, which in this embodiment is “001#02”; the “Execution Status” field is used to fill in the execution status corresponding to the target task to be queried, which in this embodiment is the target task in the “Completed” state; and the “Does it contain subtasks” field specifies whether the target task to be queried has a main subtask The "Request Resource Combination" field is used to indicate whether the subtask corresponding to the task should be displayed. In this example, the input is "Yes," meaning that the relevant record information corresponding to the subtask should be displayed. The "Request Resource Combination" field is used to indicate the request resource combination that should be used as the resource scheduling criterion. In this example, it is "Request Code Block Combination A {[Code Block A,1];[Code Block C,3];[Code Block F,4]}, Request Code Block Combination B {[Code Block B,2];[Code Block D,2];[Code Block F,4]}, Request Code Block Combination C {[Code Block A,5];[Code Block E,3];[Code Block F,2]}"; and the "Resource Scheduling Description" field is used to indicate the interpretation or description related to resource scheduling. To make it clear, there are many different types of fields in query conditions and types of content that can be entered, so a comprehensive list is omitted here.
[0030] Referring to Figure 2B, which shows request data for a single resource scheduling operation of a code block type to build an application program when the target task involves virtual resource scheduling. The request data contains the information necessary for each associated resource scheduling request for this code block type resource scheduling. For example, when resource scheduling is performed based on each candidate code block combination according to the resource scheduling request, associated data such as task address information corresponding to the target task, the number of resources required for the code block type resource scheduling, and the resource scheduling type and resource type information to be scheduled are recorded. Specifically, when the target resource is a code block, the resource scheduling type may be something that represents the type of code block scheduling, such as "entire code block" or "code block segment phrase," and the resource type information may be a description of the code block function, a description of the code block adaptation information, etc.
[0031] To ensure clarity, the example shown in Figure 2B is merely illustrative. In actual application, the content regarding the request data may include, but is not limited to, the specific examples described above.
[0032] Referring to Figure 2C, which shows scheduling data for a single code block type resource scheduling to build an application program when the target task involves virtual resource scheduling. The scheduling data contains detailed information recorded after the actual execution of each associated resource scheduling for this code block type resource scheduling. For example, in the process of actually executing resource scheduling based on each candidate code block combination, associated data such as task address information corresponding to the target task, the number of resources required for the code block type resource scheduling, and the resource scheduling type and resource type information being scheduled are recorded.
[0033] To ensure clarity, the embodiment shown in Figure 2C is merely illustrative, and in actual applications, the content regarding scheduling data may include, but is not limited to, the specific embodiments described above.
[0034] Another type of implementation involves scheduling physical resources. For example, in a business scenario where materials are scheduled from various storage warehouses to meet a material requirement, the target task might be "satisfy the material requirement," the target resource might be "material," the resource pool might be "storage warehouses storing the material," and the candidate resource combination might be "material A, material B, and material C needed to compensate for the material shortage."
[0035] Referring to Figure 2D, which shows the relevant record information for scheduling materials stored in each warehouse based on filling a shortage of a certain material when the target task involves scheduling physical resources. To query the relevant record information for scheduling each material based on filling a shortage, query conditions must be entered. In the query conditions, the "Task Type" field is used to fill in the type of target task to be queried, which in this embodiment is "Filling a Shortage of Materials"; the "Specified Resource Pool" field is used to fill in the resource pool that needs to be designated for resource scheduling, which in this embodiment is "Warehouse A, Warehouse B, Warehouse C"; the "Task Number" field is used to fill in the number of the target task to be queried, which in this embodiment is "002#03"; and the "Execution Status" field is used to fill in the execution status corresponding to the target task to be queried, which in this embodiment is the target task in the "Completed" state. The “Include Subtasks” field is used to indicate whether the target task to be queried will display subtasks corresponding to the main task. In this embodiment, it is filled in as “Yes,” meaning that related record information corresponding to subtasks should be displayed. The “Candidate Resource Combinations” field is used to indicate candidate resource combinations that should be used as resource scheduling criteria. In this embodiment, these are “Candidate Material Combination A {[Material A,33];[Material C,45];[Material F,48]}, Candidate Material Combination B {[Material A,47];[Material C,56];[Material F,78]}, Candidate Material Combination C {[Material A,34];[Material C,45];[Material F,69]}”. The “Resource Scheduling Description” field is used to indicate interpretations and descriptions regarding resource scheduling. To make it clear, there are many types of fields in query conditions and types of content that can be filled in, and a comprehensive list is omitted here.
[0036] Referring to Figure 2E, which shows request data for performing resource scheduling of material types once to build an application program when the target task involves scheduling physical resources. The request data contains the information necessary for each associated resource scheduling request regarding the current material type resource scheduling. For example, when resource scheduling is performed based on each candidate material combination according to the resource scheduling request, associated data such as task address information corresponding to the target task, the number of resources required for resource scheduling of material types, and the resource scheduling type and resource type information to be scheduled this time are recorded. Specifically, when the target resource is a material, the resource scheduling type may be something that represents material scheduling types such as "materials in boxes," "individual materials," or "material components," and the resource type information may be a description of the material function, a description of material adaptation information, etc.
[0037] To ensure clarity, the example shown in Figure 2E is merely illustrative. In actual applications, the content regarding the request data may include, but is not limited to, the specific examples described above.
[0038] Referring to Figure 2F, which shows scheduling data for a resource scheduling of material types to build an application program when the target task involves scheduling physical resources. The scheduling data contains detailed information recorded after the actual execution of each associated resource scheduling for the current material type resource scheduling. For example, in the process of actually executing resource scheduling based on each candidate material combination, associated data such as task address information corresponding to the target task, the number of resources required for the material type resource scheduling, and the resource scheduling type and resource type information being scheduled are recorded.
[0039] To ensure clarity, the embodiment shown in Figure 2F is merely illustrative, and in actual applications, the content regarding scheduling data may include, but is not limited to, the specific embodiments described above.
[0040] The business scenarios to which the embodiments described herein may be applied are diverse and may include, but are not limited to, the specific embodiments described above.
[0041] <Overall Description of the Embodiments in This Disclosure> The embodiments of this disclosure are applicable to multiple types of business scenarios, and the meanings of target task, target resource, candidate resource combination, and resource pool differ in different business scenarios. When a target task involves scheduling virtual resources, for example, to build an application program, it is necessary to call code blocks from different data storage modules. In such a business scenario, such a target task may be "Build Application Program," such a target resource may be "Code Block," such a resource pool may be "Data Storage Modules Storing the Code Block," and such a candidate resource combination may be "Candidate Code Block Combination A, Candidate Code Block Combination B, and Candidate Code Block Combination C required to build the application program." Also, when a target task involves scheduling physical resources, for example, to satisfy a request for a material, it is necessary to schedule materials from storage warehouses in various locations. In such a business scenario, such a target task may be "Satisfy the Material Request," such a target resource may be "Material," such a resource pool may be "Storage Warehouses Storing the Material," and such a candidate resource combination may be "Material A, Material B, and Material C required to compensate for the material shortage." To ensure that this is understood, the business scenarios to which the embodiments of this disclosure may apply are diverse and may include, but are not limited to, the specific embodiments described above.
[0042] <Detailed explanation of Step 300> Referring to Figure 3, the resource scheduling method in one embodiment of the present disclosure may be performed by the resource scheduling server 110 described above, and includes, but is not limited to, the following steps 310 to 330.
[0043] Step 310: In response to a resource scheduling request for a target task, obtain multiple candidate resource combinations corresponding to the target task, each candidate resource combination including at least one type of target resource required for the target task and the number of target resources for that target resource; Step 320: For each candidate resource combination, based on at least one type of target resource and the number of target resources, a search is performed on each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, and a seed resource pool corresponding to the candidate resource combination is determined; and Step 330: Based on the level of the seed resource pool corresponding to each candidate resource combination, determine the target resource pool from multiple seed resource pools to satisfy the resource scheduling request.
[0044] Steps 310 through 330 will be described in detail below.
[0045] In step 310, in response to a resource scheduling request for a target task, multiple candidate resource combinations corresponding to the target task are obtained. Each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources for that target resource. A target task refers to a task that needs to be executed as a target in various business scenarios. To ensure that a target task is executed successfully, it has one corresponding resource scheduling request, and this resource scheduling request is used to schedule the resources necessary for the target task to be executed successfully. Therefore, in order to schedule the appropriate resources for a target task, it is necessary to respond to the resource scheduling request for the target task by obtaining multiple candidate resource combinations corresponding to the target task. Each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources for that target resource. The number of target resources is used to indicate the number of resources for the corresponding target resource. For example, the target resource may include three types, with target resource 1 having 10 target resources, target resource 2 having 15 target resources, and target resource 3 having 30 target resources.
[0046] Referring to the example diagram of a resource scheduling request shown in Figure 4A, various candidate resource combinations can be obtained depending on the resource scheduling request for the target task.
[0047] "Candidate resource combination A" includes {[Target Resource A, 3], [Target Resource C, 4], [Target Resource D, 5]} required for the target task, with 3 target resources corresponding to target resource A, 4 target resources corresponding to target resource C, and 5 target resources corresponding to target resource D; "Candidate resource combination B" includes {[Target Resource B, 2], [Target Resource D, 5], [Target Resource E, 8]} required for the target task, with the number of target resources corresponding to target resource B being 2, the number of target resources corresponding to target resource D being 5, and the number of target resources corresponding to target resource E being 8; "Candidate resource combination C" includes {[Target Resource A, 30], [Target Resource F, 40]} required for the target task, with 30 target resources corresponding to Target Resource A and 40 target resources corresponding to Target Resource F; "Candidate resource combination D" includes {[Target Resource A, 5], [Target Resource C, 6], [Target Resource D, 7], [Target Resource F, 9]} required for the target task, with the number of target resources corresponding to target resource A being 5, the number of target resources corresponding to target resource C being 6, the number of target resources corresponding to target resource D being 7, and the number of target resources corresponding to target resource F being 9; "Candidate resource combination E" includes {[Target Resource A, 36], [Target Resource C, 88], [Target Resource D, 90]} required for the target task, with 36 target resources corresponding to target resource A, 88 target resources corresponding to target resource C, and 90 target resources corresponding to target resource D; "Candidate resource combination F" includes {[Target Resource B, 166], [Target Resource D, 64], [Target Resource G, 83]} required for the target task, with 166 target resources corresponding to target resource B, 64 target resources corresponding to target resource D, and 83 target resources corresponding to target resource G.
[0048] To facilitate understanding, Figure 4A is used to illustrate the relationship between resource scheduling requests and candidate resource combinations. In actual business scenarios, resource scheduling requests and candidate resource combinations may include, but are not limited to, the specific embodiments described above.
[0049] In step 320, for each candidate resource combination, a search is performed on each resource pool within the multilevel resource pool in order from the lowest to the highest level of the multilevel resource pool, based on at least one type of target resource and the number of target resources, to determine the seed resource pool corresponding to the candidate resource combination. A resource pool refers to a collection of resources that can be used in one organization or system. These resources may be physical goods, computing power, or a collection of hardware and software resources or other types of resources that can be used for a program in a computer system. A multilevel resource pool refers to multiple resource pools at different levels; for example, a multilevel resource pool may contain three resource pools, where the predetermined levels of these three resource pools are different from each other, or at least some of the levels are different.
[0050] For each candidate resource combination, the corresponding seed resource pool can be determined by searching the multilevel resource pool from low-level to high-level based on at least one type of target resource and the number of target resources. The so-called seed resource pool is a resource pool that provides the resources that need to be scheduled for the candidate resource combination.
[0051] Furthermore, resource pool levels can be classified using various criteria, with the overhead of resource scheduling increasing sequentially from low to high levels. For example, when a target task involves scheduling virtual resources, the level can be classified based on the read / write speed of each data storage module. Searching a multi-level resource pool in this order from low to high is equivalent to searching a multi-level data storage module in order from high read / write speed to low read / write speed, and then determining a seed resource pool to provide the resources that need to be scheduled for the candidate resource combination, thereby improving the efficiency of resource scheduling. For example, when a target task involves scheduling physical resources, the level of storage warehouses can be classified based on the distance between each warehouse and the shortage of materials. Searching a multi-level resource pool in this order from low to high is equivalent to searching a multi-level storage warehouse in order from the closest to the shortage of materials to the furthest, and then determining a seed resource pool to provide the resources that need to be scheduled for the candidate resource combination, thereby improving the efficiency of resource scheduling. To ensure clarity, resource pool level classification criteria may include, but are not limited to, the examples mentioned above.
[0052] Referring to Figure 4B, in some embodiments, when the target task involves scheduling virtual resources, for example, to build an application program, it is necessary to call code blocks from different data storage modules. In such business scenarios, the resource pool is a "data storage module that stores code blocks," and may specifically include data storage module A, data storage module B, and data storage module C. Of these, each data storage module is classified into levels based on its read / write speed, with data storage module A, which has the fastest read / write speed, being low level; data storage module B, which has a moderate read / write speed, being medium level; and data storage module C, which has the slowest read / write speed, being low level.
[0053] In this way, for each candidate resource combination, the seed resource pool corresponding to the candidate resource combination can be determined by searching the multilevel resource pool in order from low level to high level, based on at least one type of target resource and the number of target resources. Specifically, it may be as follows:
[0054] For candidate code block combination A, based on the three types of code blocks and the quantity of each type of code block in candidate code block combination A, i.e., {[code block A, 1], [code block C, 3], [code block F, 4]}, a search is first performed on the low-level data storage module A to retrieve one code block A and two code blocks C, then a search is performed on the mid-level data storage module B to retrieve one code block C and one code block F, and finally a search is performed on the high-level data storage module C to retrieve three code blocks F. As can be understood, the order of data storage modules from low level to high level is from fast to slow read / write speed, so by prioritizing the scheduling of necessary code blocks from data storage modules with fast read / write speeds, the efficiency of resource scheduling can be improved.
[0055] Since code block A is scheduled from data storage module A, code block C is scheduled from data storage module B, and code block F is scheduled from data storage module C, data storage modules A, B, and C are all determined to be seed resource pools corresponding to candidate code block combination A. To understand this, a seed resource pool is a resource pool that provides the resources that need to be scheduled for a candidate resource combination. If another data storage module D exists and data storage module D does not provide resources to candidate code block combination A, then data storage module D cannot be determined to be a seed resource pool corresponding to candidate code block combination A.
[0056] Referring to Figure 4C, in some embodiments, when the target task involves scheduling physical resources, for example, to satisfy a requirement for one material, it may be necessary to schedule materials from storage warehouses in various locations. In such a business scenario, the resource pool is the "storage warehouses that store the material," and may specifically include storage warehouses A, B, and C. Of these, each storage warehouse is classified into levels based on the distance between it and the material that is lacking. Storage warehouse A, being the closest to the material, is at a low level; storage warehouse B, being of a medium distance, is at a medium level; and storage warehouse C, being the furthest away, is at a high level.
[0057] In this way, for each candidate resource combination, the seed resource pool corresponding to the candidate resource combination can be determined by searching the multilevel resource pool in order from low level to high level, based on at least one type of target resource and the number of target resources. Specifically, it may be as follows:
[0058] For candidate material combination A, based on the three types of materials and the quantities of each type in candidate material combination A, i.e., {[Material A, 33], [Material C, 45], [Material F, 48]}, a search is first performed on low-level storage warehouse A to retrieve 15 units of Material A and 20 units of Material C, then a search is performed on medium-level storage warehouse B to retrieve 18 units of Material A, 10 units of Material C, and 20 units of Material F, and finally a search is performed on high-level storage warehouse C to retrieve 15 units of Material C and 28 units of Material F. As can be understood, the order of storage warehouses from low level to high level is from close to far away from the storage warehouse to the storage warehouse where the material is needed. Therefore, by prioritizing the scheduling of necessary materials from storage warehouses that are relatively close, the efficiency of resource scheduling can be improved.
[0059] Furthermore, since material A is scheduled from warehouse A, material C is scheduled from warehouse B, and material F is scheduled from warehouse C, warehouses A, B, and C can all be determined as seed resource pools corresponding to candidate material combination A. To make it clear, a seed resource pool is a resource pool that provides the resources that need to be scheduled for a candidate resource combination. If another warehouse D exists and warehouse D does not provide resources to candidate material combination A, then warehouse D cannot be determined as a seed resource pool corresponding to candidate material combination A.
[0060] In step 330, a target resource pool to satisfy the resource scheduling request is determined from multiple seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination. After determining multiple seed resource pools, it is necessary to further determine a target resource pool to satisfy the resource scheduling request from these multiple seed resource pools in step 330. While all resource scheduling based on any one of the multiple candidate resource combinations can satisfy the resource scheduling request for the target task, there are differences in the scheduling effectiveness of these methods. Therefore, it is necessary to determine a target resource pool to satisfy the resource scheduling request from multiple seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination.
[0061] In several relatively detailed embodiments, when a target task involves scheduling virtual resources, for example, building an application program requires calling code blocks from different data storage modules. These data storage modules are resource pools, classified into levels based on their read / write speeds: data storage module A, with the fastest read / write speed, is low-level; data storage module B, with a moderate read / write speed, is medium-level; and data storage module C, with the slowest read / write speed, is high-level. In such business scenarios, when resource scheduling is performed based on candidate code block combination A, code blocks are retrieved from data storage module A; and when resource scheduling is performed based on candidate code block combination B, code blocks are retrieved from data storage modules B and C. Given that data storage module A is at a lower level and has a faster read / write speed than data storage modules B and C, the efficiency of resource scheduling can be improved by designating data storage module A as the target resource pool to satisfy the resource scheduling request.
[0062] In several other relatively detailed embodiments, when the target task involves scheduling physical resources, for example, to satisfy a request for a single material, it is necessary to schedule materials from various storage warehouses. These storage warehouses are resource pools, and their levels are classified based on the distance between each warehouse and the material in need. Storage warehouse A, being the closest to the material in need, is low-level; storage warehouse B, being of medium distance, is medium-level; and storage warehouse C, being the furthest away, is high-level. In such a business scenario, when resource scheduling is performed based on candidate material combination A, materials are retrieved from storage warehouse A; and when resource scheduling is performed based on candidate material combination B, materials are retrieved from storage warehouses B and C. Given that storage warehouse A is at a lower level than storage warehouses B and C, and is closer to the material in need, the efficiency of resource scheduling can be improved by designating storage warehouse A as the target resource pool to satisfy the resource scheduling request.
[0063] Referring to the embodiment shown in Figure 4D, obtaining multiple candidate resource combinations corresponding to a target task in response to a resource scheduling request for a target task specifically includes obtaining candidate resource combination A, candidate resource combination B, candidate resource combination C, candidate resource combination D, candidate resource combination E, and candidate resource combination F.
[0064] Furthermore, for each candidate resource combination, the seed resource pool corresponding to the candidate resource combination is determined by searching the multi-level resource pool in order from low level to high level, based on at least one type of target resource and the number of target resources. To make it easier to understand, the resource pool levels A, B, C, and D increase sequentially. Among these, the level A resource pool includes resource pool A1, resource pool A2, resource pool A3, etc., the level B resource pool includes resource pool B1, resource pool B2, resource pool B3, etc., the level C resource pool includes resource pool C1, resource pool C2, resource pool C3, etc., and the level D resource pool includes resource pool D1, resource pool D2, resource pool D3, etc. To make it easier to understand, multiple corresponding seed resource pools can be determined for each candidate resource combination.
[0065] Furthermore, a set of multiple seed resource pools corresponding to a given candidate resource combination may be referred to as a seed resource pool set. Specifically, for each candidate resource combination, a search is performed on multilevel resource pools in order from low level to high level, based on at least one type of target resource and the number of target resources, thereby determining seed resource pool set A corresponding to candidate resource combination A, seed resource pool set B corresponding to candidate resource combination B, seed resource pool set C corresponding to candidate resource combination C, seed resource pool set D corresponding to candidate resource combination D, seed resource pool set E corresponding to candidate resource combination E, and seed resource pool set F corresponding to candidate resource combination F.
[0066] Furthermore, based on the level of the seed resource pool corresponding to each candidate resource combination, a target resource pool to satisfy the resource scheduling request is determined from among multiple seed resource pools. In the embodiment of this disclosure shown in Figure 4D, the seed resource pool corresponding to candidate resource combination B is determined as the target resource pool, so the three seed resource pools specifically included in seed resource pool set B, resource pool A1, resource pool B2, and resource pool C3, are also determined as target resource pools to satisfy the resource scheduling request.
[0067] It should be noted that this disclosure describes a wide variety of specific implementation methods for resource scheduling, and is not limited to the specific embodiment shown in Figure 4D above.
[0068] In the embodiments of the present disclosure shown in steps 310 to 330, the resource scheduling method needs to obtain a plurality of candidate resource combinations corresponding to the target task in response to a resource scheduling request for the target task, where each candidate resource combination includes at least one type of target resource and the number of target resources required for the target task. Subsequently, for each candidate resource combination, a search is performed on a multilevel resource pool in order from low level to high level based on at least one type of target resource and the number of target resources to determine the seed resource pool corresponding to the candidate resource combination. Thus, a set of corresponding seed resource pools can be determined for each candidate resource combination corresponding to the target task. Furthermore, a target resource pool to satisfy the resource scheduling request is determined from the plurality of seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination. Since the source scheduling method according to the present disclosure determines the target resource pool to satisfy the resource scheduling request according to the level of the seed resource pool corresponding to each candidate resource combination, the speed of response to the resource scheduling request for the target task is relatively fast, and in this way, the efficiency of resource scheduling can be improved. The scheme described above offers relatively high flexibility in resource scheduling because it can rationally determine the target resource pool to satisfy resource scheduling requests for application scenarios with relatively frequent changes.
[0069] <Detailed explanation of Step 320> Referring to Figure 5, in some embodiments provided in this disclosure, each storage resource pool in the multilevel resource pool includes various storage resources of various common types (general-purpose), and the number of resources of various storage resources of various common types. Step 320 may include, but is not limited to, the following steps 510 to 520.
[0070] Step 510: For each candidate resource combination, a search is performed on each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, based on at least one type of target resource and the number of target resources; and Step 520: If a resource pool awaiting consideration among the multilevel resource pools can satisfy the target resource count for each type of target resource with a single common type of resource, then a seed resource pool is determined from that resource pool awaiting consideration.
[0071] Steps 510 through 520 will be described in detail below.
[0072] In step 510, for each candidate resource combination, a search is performed against the multilevel resource pool in order from low level to high level, based on at least one type of target resource and the number of target resources. It is necessary to perform a search against the multilevel resource pool for each candidate resource combination in order to determine the seed resource pool that will provide the resources that need to be scheduled for the candidate resource combination. The basis for this search against the multilevel resource pool is the level of each resource pool, and the search is performed in order from low level to high level. The resource pool levels may have various classification criteria.
[0073] In step 520, a seed resource pool is determined from the awaiting resource pool within the multilevel resource pool if the number of target resources for each type of target resource can be satisfied by a single number of resources of a common type. The awaiting resource pool refers to the resource pools that are awaiting search in the process of determining the seed resource pool by searching the multilevel resource pool. A seed resource pool can be determined from the awaiting resource pool if the number of target resources for each type of target resource in the candidate resource combination can be satisfied by a single number of resources of a common type for each type of target resource.
[0074] A common type refers to a common type of a target resource. Target resources of the same common type can be mixed (combined), while target resources of different common types cannot. In some cases, the resources stored in a resource pool may not necessarily satisfy the requests for each resource sub-type in a resource scheduling request. Furthermore, resources of the same common type can substitute for each other and perform the same role. Therefore, when a resource pool cannot satisfy the requests for each resource sub-type in a resource scheduling request, it can use resources of the same common type to perform equivalent substitutions, thereby similarly satisfying the resource scheduling request. In this way, the flexibility of resource scheduling can be improved.
[0075] In some embodiments, when the target resource is a code block, common type A includes code blocks A1, A2, and A3 for implementing function A, and common type B includes code blocks B1, B2, and B3 for implementing function B. Of these, code blocks A1, A2, and A3 of common type A are functionally interchangeable, and when a resource scheduling request requires a code block of common type A, the data storage module can call any one of code blocks A1, A2, or A3 as the target resource to perform scheduling. Even if code block A1 is not stored in the data storage module, the resource scheduling request can be satisfied if code block A2 or A3 is stored in the data storage module. However, code blocks B1, B2, and B3 of common type B cannot satisfy the resource scheduling request for a code block of common type A.
[0076] In several other embodiments, when the target resource is a cable, Common Type A includes three types of cables: Model A1, Model A2, and Model A3, and Common Type B includes three types of cables: Model B1, Model B2, and Model B3. Of these, Model A1, Model A2, and Model A3 cables of Common Type A can be mixed, and if there is a shortage of Model A1 cables and the resource scheduling request cannot be satisfied, the request can be satisfied by using a Model A2 or Model A3 cable to replenish the stock. However, the three types of cables of Common Type B, Model B1, Model B2, and Model B3, cannot replenish the stock shortage of Model A1 cables.
[0077] To understand this, if a resource pool awaiting consideration can satisfy the resource scheduling request in one go, it means that the resource pool awaiting consideration can satisfy the resource scheduling request in one go if it can satisfy the target resource number for each type of target resource with a single common type of resource. In the embodiments of this disclosure, to improve the efficiency of resource scheduling, a resource pool that can satisfy the resource scheduling request in one go can be determined as a seed resource pool. In some embodiments, a multilevel resource pool may have multiple resource pools awaiting consideration that can satisfy the resource scheduling request in one go. In this case, it is necessary to determine a seed resource pool from among the multiple resource pools awaiting consideration.
[0078] In the embodiments of this disclosure shown in steps 510 to 520, if one of the multilevel resource pools awaiting consideration can satisfy the resource scheduling request in one go if it can satisfy the number of target resources for each type of target resource with a single number of resources of a common type, then that awaiting consideration resource pool can satisfy the resource scheduling request in one go. Because it can satisfy the resource scheduling request in one go, it is advantageous to designate it as a seed resource pool to further improve the efficiency of resource scheduling.
[0079] Referring to several embodiments of the present disclosure provided in Figure 6, it is shown that one of the multilevel resource pools awaiting consideration can satisfy the number of target resources for each type of target resource with a single number of resources of a common type. Specifically, a resource scheduling request may have candidate resource combinations A, B, and C, of which each candidate resource combination has a corresponding number of target resources of multiple types and a number of target resources to satisfy, where candidate resource combination A requires 3 target resources A, 4 target resources C, and 5 target resources D; candidate resource combination B requires 2 target resources B, 5 target resources D, and 8 target resources E; and candidate resource combination C requires 30 target resources A and 40 target resources F.
[0080] As is clear, if the number of target resources for each type of target resource among target resource A, target resource B, target resource C, target resource D, target resource E, and target resource F can be satisfied with a single common type of resource, then the resource pool awaiting consideration will contain at least 33 resources of the same common type as target resource A, at least 2 resources of the same common type as target resource B, at least 4 resources of the same common type as target resource C, at least 10 resources of the same common type as target resource D, at least 8 resources of the same common type as target resource E, and at least 40 resources of the same common type as target resource F.
[0081] Based on this, by performing a search on the multilevel resource pool in order from low level to high level, based on various types of target resources and the number of target resources, it can be determined that there are two resource pools waiting to be considered, A1 and B2, in the multilevel resource pool, and that the number of target resources for each type of target resource among target resource A, target resource B, target resource C, target resource D, target resource E, and target resource F can be satisfied with a single common type of resource. Therefore, the seed resource pool can be determined from resource pools waiting to be considered A1 and B2.
[0082] Referring to Figure 7, in some embodiments provided in this disclosure, step 520 may include, but is not limited to, the following steps 710 to 720.
[0083] Step 710: If the number of resource pools awaiting consideration is 1, determine that resource pool awaiting consideration as the seed resource pool; and Step 720: If there are two or more resource pools awaiting consideration, determine the seed resource pool based on the levels of two or more of the resource pools awaiting consideration.
[0084] Steps 710 through 720 will be described in detail below.
[0085] In step 710, if there is one resource pool awaiting consideration, that resource pool is determined to be the seed resource pool. A resource pool awaiting consideration refers to a resource pool that is awaiting search in the process of determining the seed resource pool by searching the multilevel resource pool. If a multilevel resource pool has only one resource pool awaiting consideration, it means that the multilevel resource pool has one resource pool that can be used to satisfy the resource scheduling request, and therefore this single resource pool awaiting consideration can be determined to be the seed resource pool.
[0086] In step 720, if there are two or more resource pools awaiting consideration, the seed resource pool is determined based on the levels of two or more of these awaiting resource pools. Note that if there are two or more resource pools awaiting consideration in a multilevel resource pool, it means that the multilevel resource pool has two or more resource pools that can be used to satisfy the resource scheduling request. In this case, the seed resource pool must be determined from these two or more awaiting resource pools based on their levels.
[0087] As demonstrated in the embodiments of this disclosure shown in steps 710 to 720, when a multilevel resource pool has only one pending resource pool that can satisfy a resource scheduling request, determining this pending resource pool as a seed resource pool reduces the economic and time costs incurred in the resource scheduling process and improves the efficiency of resource scheduling. Furthermore, when a multilevel resource pool has two or more pending resource pools that can satisfy a resource scheduling request, it is necessary to further reduce the economic and time costs incurred in the resource scheduling process and further improve the efficiency of resource scheduling by selecting the better of these two or more pending resource pools according to the resource pool level.
[0088] Referring to Figure 8, in some embodiments provided in this disclosure, step 720 may include, but is not limited to, the following steps 810 to 830.
[0089] Step 810: If there are two or more resource pools awaiting consideration, the resource pool with the lowest level among the two or more awaiting consideration resources is selected as the seed resource pool; Step 820: If the number of resource pools awaiting consideration is 2 or more, and the levels of 2 or more resource pools awaiting consideration are the same, determine the scheduling return amount for 2 or more resource pools awaiting consideration, and determine the seed resource pool based on the scheduling return amount; and Step 830: If two or more resource pools awaiting consideration have the same scheduling return amount, determine the seed resource pool based on the resource pool type of the two or more resource pools awaiting consideration.
[0090] Steps 810 through 830 will be described in detail below.
[0091] In step 810, if there are two or more resource pools awaiting consideration, the lower-level resource pool among the two or more awaiting resource pools is selected as the seed resource pool. A resource pool awaiting consideration refers to a resource pool awaiting search in the process of determining the seed resource pool by searching the multilevel resource pool. Furthermore, if there are two or more resource pools awaiting consideration, and these two or more resource pools correspond to different levels, selecting the better one from these two or more awaiting resource pools according to their levels can further reduce the economic and time costs incurred in the resource scheduling process and further improve the efficiency of resource scheduling.
[0092] Step 820 determines the scheduling return amount for two or more resource pools awaiting consideration, and then determines the seed resource pool based on the scheduling return amount, provided that there are two or more resource pools awaiting consideration and that these two or more resource pools are at the same level. Note that if there are two or more resource pools awaiting consideration and these two or more resource pools are at the same level, it is necessary to determine the scheduling return amount for two or more resource pools awaiting consideration and then select the better one based on the scheduling return amount. The scheduling return amount refers to the balance that needs to be returned to the resource pool in the process of resource scheduling using the resource pool's inventory. As you can understand, the scheduling return amount arises when the resource pool's inventory cannot satisfy the resource scheduling request. Therefore, the smaller the scheduling return amount for a resource pool awaiting consideration, the lower the overhead of returning resources as balance to the resource pool. As is clear, when two or more resource pools awaiting consideration are at the same level, determining the scheduling return amount for two or more resource pools awaiting consideration, and then determining the seed resource pool based on the scheduling return amount, can reduce the economic and time costs incurred in the resource scheduling process and improve the efficiency of resource scheduling.
[0093] In step 830, if the scheduling return amounts of two or more resource pools awaiting consideration are the same, a seed resource pool is determined based on the resource pool type of those two or more resource pools awaiting consideration. Note that if there are two or more resource pools awaiting consideration, and these two or more resource pools are at the same level and have the same scheduling return amounts, then a seed resource pool must be determined based on the resource pool type of those two or more resource pools awaiting consideration. Note that there may be various classification criteria for resource pool types, such as resource pool types classified based on capacity size, resource pool types classified based on inventory size, resource pool types classified based on resource scheduling authority, and various other resource pool types.
[0094] In the embodiments of the present disclosure shown in steps 810 to 830, in order to determine a seed resource pool from two or more resource pools awaiting consideration, it is necessary to first make a preferential selection of these two or more resource pools awaiting consideration according to their resource pool levels, and then select the resource pool with a relatively lower level as the seed resource pool. If the levels of these two or more resource pools awaiting consideration are the same, then it is necessary to make a preferential selection of these two or more resource pools awaiting consideration based on their scheduling return amounts. If the levels of these two or more resource pools awaiting consideration are the same and their scheduling return amounts are also the same, then it is necessary to make a further preferential selection based on the resource pool types of the two or more resource pools awaiting consideration, and finally determine the seed resource pool. In this way, a seed resource pool can be selected from two or more resource pools awaiting consideration that can further reduce the cost of resource scheduling and further improve the efficiency of resource scheduling.
[0095] Referring to Figure 9, in some embodiments, it is necessary to perform a search on a multi-level resource pool. When the number of resource pools awaiting consideration is 1, the resource pool awaiting consideration is determined as the seed resource pool. When the number of resource pools awaiting consideration is 2 or more, specifically, the resource pool levels A, B, C, and D increase sequentially, with level A resource pools including resource pool A1, A2, A3, etc., level B resource pools including resource pool B1, B2, B3, etc., level C resource pools including resource pool C1, C2, C3, etc., and level D resource pools including resource pool D1, D2, D3, etc.
[0096] In the embodiments of this disclosure, if there are two or more resource pools awaiting consideration, it is necessary to first make a preferential selection of these two or more resource pools awaiting consideration according to their levels, and then select a resource pool with a relatively low level from resource pool level A, resource pool level B, resource pool level C, and resource pool level D and determine it to be a seed resource pool.
[0097] Furthermore, if only multiple resource pools awaiting consideration, such as resource pool B1, resource pool B2, resource pool B3, and resource pool B4, which correspond to resource pool level B, can satisfy the resource scheduling request, then the level corresponding to these two or more resource pools awaiting consideration is the same. In this case, it is then necessary to determine the seed resource pool by making a preferential selection of these two or more resource pools awaiting consideration based on the scheduling return amount.
[0098] Furthermore, if multiple resource pools awaiting consideration, such as resource pool B2, resource pool B5, resource pool B8, resource pool B9, resource pool B11, and resource pool B14, can satisfy the resource scheduling request and have the same scheduling return amount, it is necessary to determine the seed resource pool based on the resource pool type corresponding to the multiple resource pools awaiting consideration, such as resource pool B2, resource pool B5, resource pool B8, resource pool B9, resource pool B11, and resource pool B14.
[0099] In this way, a seed resource pool can be selected from two or more resource pools awaiting consideration, which can further reduce the cost of resource scheduling and further improve the efficiency of resource scheduling.
[0100] Referring to Figure 10, in some embodiments provided in this disclosure, determining the scheduling return amounts for two or more resource pools awaiting consideration in step 820 may include, but is not limited to, the following steps 1010 to 1060.
[0101] Step 1010: Obtain the resource container capacity of multiple resource containers in the resource pool awaiting consideration; Step 1020: Sort the multiple resource containers from largest to smallest in terms of resource container capacity; Step 1030: Determine the resource container with the highest rank in the sorting results as the resource container awaiting consideration, and determine the target number of resources as the number of unscheduled resources; Step 1040: Execute the first process, which includes updating the number of unscheduled resources with the remainder of "number of unscheduled resources" mod "resource container capacity of resource containers awaiting consideration", and updating the resource containers awaiting consideration with the resource containers with the next highest rank in the sorting result; Step 1050: Repeat the first process until the resource container awaiting consideration is empty; and Step 1060: Determine the scheduling return amount based on the number of unscheduled resources.
[0102] Steps 1010 through 1060 will be explained in detail below.
[0103] Step 1010 retrieves the resource container capacity of multiple resource containers in the resource pool awaiting consideration. Note that each resource in the resource pool awaiting consideration may be specifically stored by a resource container, and each resource container can store a certain (determined) number of resources. Note that the resource container capacity is the number of resources that a resource container can store, and since different resource containers can store different numbers of resources, the resource container capacities of different resource containers will also differ.
[0104] Step 1020 sorts multiple resource containers from largest to smallest in terms of resource container capacity. The purpose of sorting multiple resource containers from largest to smallest in terms of resource container capacity is to perform resource scheduling according to the sorting result in a subsequent step and determine the amount of scheduling return corresponding to the resource pool awaiting consideration. The resource container with the highest rank in the sorting result is the resource container with the largest resource container capacity.
[0105] In steps 1030 to 1050, the resource container with the highest rank in the sorting results is first determined as the resource container awaiting consideration, and the number of target resources is determined as the number of unscheduled resources. Next, the first process is executed, which includes updating the number of unscheduled resources using the remainder of "number of unscheduled resources" modulo "resource container capacity of resource containers awaiting consideration," and updating the resource containers awaiting consideration using the resource container with the next highest rank in the sorting results. The first process is repeated until the resource containers awaiting consideration are empty. Note that multiple resource containers are sorted from largest to smallest in terms of resource container capacity, and the resource container with the highest rank in the sorting results is the resource container with the largest resource container capacity. Based on this, in order to satisfy the resource scheduling request, it is necessary to first determine the resource container with the highest rank in the sorting results as the resource container awaiting consideration, and determine the number of target resources as the number of unscheduled resources. After that, the first process is executed based on the resource containers awaiting consideration and the number of unscheduled resources to update the resource containers awaiting consideration and the number of unscheduled resources. In the first process, it is necessary to first use the remainder of "number of unscheduled resources" mod "resource container capacity of resource containers awaiting consideration". As can be understood, the number of unscheduled resources is often larger than the resource container capacity of a single resource container awaiting consideration. Therefore, the resource container capacity of a resource container awaiting consideration can generally only satisfy a portion of the number of unscheduled resources and cannot satisfy the number of unscheduled resources in one go. Thus, it is necessary to perform a modulo operation between the number of unscheduled resources and the resource container capacity of the resource container awaiting consideration, and this will give us the remainder corresponding to the number of unscheduled resources that the current resource container awaiting consideration cannot satisfy.Since the resource container capacity of the resource container awaiting consideration satisfies a certain number of unscheduled resources, the next step is to update the number of unscheduled resources, and then update the resource container awaiting consideration with the next highest-ranked resource container in the sorting results to determine if the resource container capacity of the next resource container can satisfy a certain number of updated unscheduled resources. The first process is repeated until the resource container awaiting consideration is empty. To understand this, the first process in each round requires updating the resource container awaiting consideration with the next highest-ranked resource container, which corresponds to the process of replacing the current resource container with the next resource container to create the updated resource container awaiting consideration. When the resource container awaiting consideration becomes empty, that is, when there is no next resource container, it means that the traverse (check) for each resource container in the sorting results is complete.
[0106] In step 1060, the scheduling return amount is determined based on the number of unscheduled resources. Steps 1030 to 1050 are performed until the resource containers awaiting consideration are empty, thereby achieving a complete traverse for each resource container in the sorted result. The number of unscheduled resources at this time is the number of resources that each resource container in the sorted result does not necessarily satisfy. Therefore, by comparing the number of unscheduled resources with the resource container that has the smallest resource container capacity in the sorted result, the scheduling return amount that needs to be returned to the resource pool in the resource scheduling process can be determined.
[0107] The embodiments of this disclosure shown in steps 1010 to 1050 illustrate a set of executable steps for determining the scheduling return amount of a resource pool awaiting consideration. In each step, the target number of resources is first satisfied using a resource container with a relatively large capacity, then the remaining target number of resources is satisfied using a resource container with a relatively large capacity, and when the resource container with the smallest capacity can no longer fully satisfy the target number of resources, the scheduling return amount that needs to be returned to the resource pool can be determined. In this way, it is advantageous to select a seed resource pool from two or more resource pools awaiting consideration that can further reduce the cost of resource scheduling and further improve the efficiency of resource scheduling.
[0108] Referencing several relatively detailed embodiments of this disclosure provided in Figures 11A to 11D, a selectable process for determining the scheduling return amount of a resource pool awaiting consideration is shown.
[0109] In Figure 11A, the resource pool awaiting consideration includes resource containers A, B, C, D, E, and F. The multiple resource containers are sorted from largest to smallest in terms of resource container capacity, and the sequentially arranged resource containers E, C, B, A, D, and F (the result of the sorting) are obtained. Then, resource container E, which has the highest rank, is determined to be the resource container awaiting consideration, the target resource number is determined to be 120 as the number of unscheduled resources, and the execution of the first process begins. In the first round of the first process, it is necessary to first determine the resource container capacity of the resource container awaiting consideration, i.e., the resource container capacity of resource container E is 50, and then perform a modulo operation with the number of unscheduled resources, 120, i.e., 120% 50, and obtain the remainder of 20.
[0110] After obtaining a remainder of 20, the number of unscheduled resources is updated to 20, and the resource containers awaiting consideration are updated using the next resource container C in the sorting result.
[0111] In Figure 11B, the resource container awaiting consideration is resource container C, and the number of unscheduled resources is 20. Based on this, the first process of a new round is performed. First, the resource container capacity of resource container C, 25, is determined, and then a modulo operation is performed using the number of unscheduled resources, 20, with the resource container capacity of the resource container awaiting consideration, 25, i.e., 20%25 is performed, and the remainder, 20, is obtained. Note that the resource container capacity of resource container C, 25, is larger than the number of unscheduled resources, 20, so the number of unscheduled resources is not changed in the first process of this round.
[0112] After obtaining a remainder of 20, the number of unscheduled resources is updated to 20, and the resource containers awaiting consideration are updated using the next resource container B in the sorting results.
[0113] In Figure 11C, the resource container awaiting consideration is resource container B, and the number of unscheduled resources is 20. Based on this, the first process of a new round is performed. First, the resource container capacity of resource container B, 15, is determined, and then a modulo operation is performed using the number of unscheduled resources, 20, with the resource container capacity of the resource container awaiting consideration, 15, i.e., 20% of 15 is performed, and the remainder, 5, is obtained. Note that the resource container capacity of resource container C, 15, is smaller than the number of unscheduled resources, 20, so in the first process of this round, the number of unscheduled resources, 20, is adjusted to 5.
[0114] After updating the number of unscheduled resources to 5, update the resource containers awaiting consideration using the next resource container A in the sorting results. Repeat the first process according to the method described above.
[0115] In Figure 11D, once the first process corresponding to resource container F is completed, the resource container awaiting consideration is updated to empty. Note that the resource container capacity of resource container A (12), resource container D (10), and resource container F (8) are all greater than the number of unscheduled resources (5), so the number of unscheduled resources (5) is not changed in the first process of these three rounds. Clearly, the corresponding number of unscheduled resources after the completion of the first process is 5. At this point, it is necessary to further compare the number of unscheduled resources with the resource container that has the smallest resource container capacity in the sorting result, thereby determining the amount of scheduling that needs to be returned to the resource pool in the resource scheduling process. Specifically, based on the number of unscheduled resources being 5, the resource container with the smallest resource container capacity (8) in the sorting result is resource container F. In order to ensure that the target number of resources can be satisfied, it is necessary to ensure that resource container F with a resource container capacity of 8 is used to satisfy the remaining number of unscheduled resources (5). In this case, the corresponding amount of scheduling that needs to be returned to the resource pool is 8-5=3, so the amount of scheduling that needs to be returned in the embodiment of this disclosure is 3.
[0116] To make it clear, there are many different methods for determining the scheduling return amount for resource pools awaiting consideration, and these may include, but are not limited to, the specific examples described above.
[0117] Referring to Figure 12, in some embodiments provided in this disclosure, step 1060 may include, but is not limited to, the following steps 1210 to 1230.
[0118] Step 1210: Obtain the number of discrete resources in the resource pool awaiting consideration; Step 1220: Determine that the scheduling return amount is 0 if the number of discrete resources is greater than the number of unscheduled resources; and Step 1230: If the number of discrete resources is less than or equal to the number of unscheduled resources, the scheduling return amount is obtained by subtracting the number of unscheduled resources from the resource container capacity of the lowest-ranked resource container.
[0119] Steps 1210 through 1230 will be described in detail below.
[0120] Step 1210 retrieves the number of discrete resources in the resource pool awaiting consideration. The number of discrete resources refers to the number of discrete resources stored in the resource pool awaiting consideration. Clearly, each resource container sorted from smallest to largest resource container capacity cannot necessarily satisfy the target number of resources. Specifically, if the target number of resources is still not satisfied after a complete traverse of each resource container in the sorted state, and the target number of resources is satisfied using the resource container with the smallest resource container capacity in the sorted state, the resources required to replenish the target number of resources will exceed the number of unscheduled resources, resulting in a scheduling return amount that needs to be returned to the resource pool. The discrete resources stored in the resource pool awaiting consideration are there to address this situation. When the target number of resources is still not satisfied after a complete traverse of each resource container in the sorted state, the target number of resources is satisfied by determining discrete resources from the resource pool awaiting consideration based on the number of unscheduled resources.
[0121] In step 1220, if the number of discrete resources is greater than the number of unscheduled resources, it is determined that the scheduling return amount is 0. Note that if the number of discrete resources is greater than the number of unscheduled resources, it means that the target number of resources can be satisfied by selecting the number of unscheduled resources from the multiple discrete resources stored in the resource pool awaiting consideration. In this case, the target number of resources is satisfied, and the scheduling return amount can be determined to be 0.
[0122] In step 1230, if the number of discrete resources is less than or equal to the number of unscheduled resources, the scheduling return amount is obtained by subtracting the number of unscheduled resources from the resource container capacity of the lowest-ranked resource container in the sorting result. Note that if the number of discrete resources is less than or equal to the number of unscheduled resources, it means that even if all the discrete resources stored in the resource pool awaiting consideration are replenished to meet the target resource count, it will not be possible to satisfy the target resource count. In this case, it is necessary to use the lowest-ranked resource container, i.e., the resource container with the smallest resource container capacity in the sorting result, and satisfy the target resource count with its resource container capacity. Of these, the resources that replenish the target resource count will exceed the number of unscheduled resources, so the scheduling return amount can be obtained by subtracting the number of unscheduled resources from the resource container capacity of the lowest-ranked resource container. This allows for the selection of a better resource pool from two or more awaiting considerations based on the scheduling return amount. Note that the smaller the scheduling return amount, the smaller the overhead of returning resources to the resource pool, so from two or more awaiting considerations resource pools, the awaiting considerations resource pool with the smaller scheduling return amount can be determined as the better choice.
[0123] In the embodiments of the present disclosure shown in steps 1210 to 1230, in order to reduce the overhead of returning resources to the resource pool, it is necessary to prioritize determining whether the number of discrete resources in the resource pool awaiting consideration can cover the number of unscheduled resources. If the number of discrete resources can cover the number of unscheduled resources, discrete resources equal to the number of unscheduled resources are determined from the resource pool awaiting consideration to satisfy the target number of resources. If the number of discrete resources cannot cover the number of unscheduled resources, it is necessary to satisfy the target number of resources using the resource container with the smallest resource container capacity as a result of the sorting. However, in this case, the resources used to supplement the target number of resources will exceed the number of unscheduled resources, so the scheduling return amount can be obtained by subtracting the number of unscheduled resources from the resource container capacity of the lowest-ranked resource container. In this way, when two or more resource pools awaiting consideration are at the same level, a preferential selection can be made to these two or more resource pools awaiting consideration based on the scheduling return amount, so that a seed resource pool can be selected from two or more resource pools awaiting consideration that can further reduce the cost of resource scheduling and further improve the efficiency of resource scheduling.
[0124] An illustrative diagram for determining the scheduling return amount is shown with reference to several embodiments of the present disclosure provided in Figure 13. Assume that the resource pool awaiting consideration includes six resource containers: resource container A, resource container B, resource container C, resource container D, resource container E, and resource container F, and multiple discrete resources such as discrete resource A, discrete resource B, discrete resource C, and discrete resource D. Based on the target number of resources, the number of unscheduled resources can be obtained by traversing resource containers A, B, C, D, E, and F in the resource pool awaiting consideration, as each resource container may not necessarily satisfy the target number of resources. To further determine the scheduling return amount for a resource pool awaiting consideration, it is first necessary to obtain the number of discrete resources in the resource pool. Then, a comparison is made between the number of discrete resources and the number of unscheduled resources. If the number of discrete resources is greater than the number of unscheduled resources, the scheduling return amount is determined to be 0. If the number of discrete resources is less than or equal to the number of unscheduled resources, the scheduling return amount can be obtained by subtracting the number of unscheduled resources from the resource container capacity of the lowest-ranked resource container. In this way, when two or more resource pools awaiting consideration are at the same level, a preferential selection can be made to these two or more resource pools awaiting consideration according to the scheduling return amount, allowing for the selection of a seed resource pool from two or more resource pools awaiting consideration that can further reduce the cost of resource scheduling and further improve the efficiency of resource scheduling.
[0125] Referring to Figure 14, in some embodiments provided in this disclosure, step 320 may further include, but is not limited to, the following steps 1410 to 1420.
[0126] Step 1410: If any one of the multilevel resource pools cannot satisfy the target resource count for each type of target resource with a single common type of resource count, select one storage resource pool from the lowest level that has the smallest deficit after satisfying the target resource count with a single common type of resource count as a seed resource pool, set the single common type as the target common type, and set the number of resources that are still not satisfied after satisfying the target resource count with a single common type of resource count as the surplus resource count.
[0127] Step 1420: From the other memory resource pools with the lowest level, select another memory resource pool as a seed resource pool that has the smallest deficit after satisfying the surplus resource count with the number of resources of the target common type, and update the surplus resource count with the number of resources that still do not satisfy the surplus resource count after satisfying the number of resources of the target common type, and continue this process until the traverse for the lowest level memory resource pool is complete.
[0128] Steps 1410 through 1420 will be explained in detail below.
[0129] In step 1410, if any one of the multilevel resource pools cannot satisfy the target resource count for each type of target resource with a single common type of resource, then one memory resource pool with the smallest deficit after satisfying the target resource count with a single common type of resource is selected as a seed resource pool, starting from the lowest level memory resource pool. The single common type is then designated as the target common type, and the number of resources still not satisfied after satisfying the target resource count with a single common type of resource is designated as the surplus resource count. Note that there may be various level classification criteria for resource pools, and the overhead caused by resource scheduling increases sequentially as the resource pool level progresses from low to high.
[0130] A common type refers to a common type of a target resource. Target resources of the same common type can be mixed, but target resources of different common types cannot. In some cases, the resources stored in a resource pool may not necessarily satisfy the requests for each resource sub-type in a resource scheduling request. Since resources of the same common type can substitute for each other and perform the same role, if a resource pool cannot satisfy the requests for each resource sub-type in a resource scheduling request, the resource scheduling request can be similarly satisfied by using resources of the same common type to perform equivalent substitutions. In this way, the flexibility of resource scheduling can be improved.
[0131] Therefore, in the embodiments of this disclosure, a seed resource pool is determined from one of the multilevel resource pools awaiting consideration if the number of target resources for each type of target resource can be satisfied with a single number of resources of a common type. However, if any one of the multilevel resource pools awaiting consideration is not satisfied with the number of target resources for each type of target resource with a single number of resources of a common type, it is necessary to determine the seed resource pool by another method.
[0132] In several relatively detailed embodiments, it is possible to select a single seed resource pool from the lowest-level memory resource pools, which has the smallest deficit after satisfying the target resource count with a single common type of resource. The purpose is to first use the lowest-level memory resource pools to satisfy as many resources of a single common type as possible and determine the corresponding resource deficit, and then select the single memory resource pool with the smallest deficit as the seed resource pool. As the resource pool levels progress from low to high, the overhead caused by resource scheduling increases sequentially, so determining the seed resource pool in this manner can reduce the overall overhead of resource scheduling and improve the efficiency of resource scheduling.
[0133] Furthermore, by designating a single common type as the target common type, and defining the number of resources that still do not meet the target resource count after the number of resources of that single common type has been satisfied as the surplus resource count, it is advantageous to schedule the surplus resources in a subsequent step to supplement the target resource count.
[0134] In step 1420, from the other memory resource pools with the lowest level, select another memory resource pool as a seed resource pool that has the smallest deficit after satisfying the surplus resource count with the number of resources of the target common type, and update the surplus resource count with the number of resources that still do not satisfy the surplus resource count after satisfying the number of resources of the target common type, and continue this process until the traverse for the lowest level memory resource pool is complete.
[0135] Furthermore, after designating a single common type as the target common type and satisfying the target resource count with the number of resources of that single common type, and then determining the number of resources still not satisfied as the surplus resources, it is necessary to determine another memory resource pool from the lowest-level other memory resource pools that has the smallest deficit after satisfying the surplus resources with the number of resources of the target common type in order to further supplement the target resource count. The reason for this is as follows: by determining another memory resource pool from the lowest-level other memory resource pools, the overall overhead of resource scheduling can be reduced, the efficiency of resource scheduling can be improved, and the efficiency of supplementing the target resource count can be further improved. Therefore, it is necessary to select another memory resource pool that has the smallest deficit after satisfying the surplus resources with the number of resources of the target common type as one seed resource pool. If these two memory resource pools still cannot supplement the target resource count, it is necessary to do the following: update the surplus resources using the number of resources still not satisfied after satisfying the surplus resources with the number of resources of the target common type, find the next seed resource pool to provide the target resources from the lowest-level other memory resource pools, and continue this process until the traverse of the lowest-level memory resource pools is complete.
[0136] As demonstrated in the embodiments of the present disclosure shown in steps 1410 to 1420, the resource pool levels progress from low to high, and the overhead resulting from resource scheduling increases sequentially. Therefore, by prioritizing the selection of the seed resource pool from the lowest-level storage resource pools, the overall overhead of resource scheduling can be reduced, the efficiency of resource scheduling can be improved, and the acquisition efficiency relative to the number of target resources can be further enhanced.
[0137] Referring to several embodiments of the present disclosure provided in Figures 15A to 15B, it is shown that any one of the storage resource pools in a multilevel resource pool is not satisfied with a single common type of resource for the number of target resources of each type of target resource. To understand this, resource pool levels A, B, C and D are sequentially increasing, of which level A resource pools include resource pool A1, resource pool A2, resource pool A3, etc., level B resource pools include resource pool B1, resource pool B2, resource pool B3, etc., level C resource pools include resource pool C1, resource pool C2, resource pool C3, etc., and level D resource pools include resource pool D1, resource pool D2, resource pool D3, etc.
[0138] Referring to Figure 15A, specifically, candidate resource combination A in the resource scheduling request requires 345 target resources A, 425 target resources C, and 540 target resources D. No single storage resource pool among the multilevel resource pools can satisfy the target resource count for each type of target resource with a single common type of resource count. In this case, it is necessary to select one storage resource pool as a seed resource pool from the lowest level storage resource pools, i.e., resource pools A1, A2, A3, and A4 of level A, which has the smallest deficit after satisfying the target resource count with a single common type of resource count. Clearly, resource pool A1 can satisfy the various target resource counts to the maximum extent, and it has the smallest corresponding deficit after satisfying the target resource count. Therefore, resource pool A1 is determined to be the seed resource pool. Subsequently, the single common type is designated as the target common type, and the number of resources that are still not satisfied after satisfying the target resource count with a single common type of resource count is designated as the surplus resource count. Of these, the surplus resources and the number of surplus resources are specifically [Target Resource A, 45], [Target Resource C, 25], and [Target Resource D, 190].
[0139] Referring to Figure 15B, after determining the surplus resources and the number of surplus resources, one seed resource pool is selected from the other storage resource pools with the lowest level that has the smallest deficit after satisfying the number of surplus resources with the number of resources of the target common type. Of the other storage resource pools with the lowest level, namely resource pool A2, resource pool A3, and resource pool A4, resource pool A3 can satisfy various surplus resource numbers to the maximum extent, and therefore has the smallest corresponding deficit after satisfying the number of surplus resources. The deficit can be obtained by subtracting the number of resources stored in the corresponding resource pool from the number of surplus resources, specifically [Target Resource A, 5], [Target Resource C, 0], and [Target Resource D, 90]. Therefore, resource pool A2, which has the smallest deficit after satisfying the number of surplus resources with the number of resources of the target common type, can be determined as the other seed resource pool. The number of surplus resources is then updated using the number of resources that are still not satisfied after satisfying the number of surplus resources with the number of resources of the target common type.
[0140] After traversing all the lowest-level memory resource pools using the method described above, multiple seed resource pools can be determined. In this way, the multiple seed resource pools determined can reduce the overall overhead of resource scheduling, improve resource scheduling efficiency, and further enhance the acquisition efficiency relative to the number of target resources.
[0141] Referring to Figure 16, after traversing all the lowest-level memory resource pools in step 1420, the resource scheduling method in the embodiment of the present disclosure may further perform a second process, which may include, but is not limited to, the following steps 1610 to 1630.
[0142] Step 1610: After traversing all memory resource pools at the lowest level, if the number of surplus resources is still not zero, the second-to-last level is set as the target level, and a traverse is performed in the memory resource pool of the target level; Step 1620: From the untraversed memory resource pools, select the one memory resource pool with the smallest deficit after satisfying the surplus resource count with the number of resources of the target common type as a seed resource pool; and Step 1630: Repeat the second process, updating the surplus resource count with the number of resources of the target common type until all memory resource pools at the target level are traversed, and then updating the target level with the level one level above the target level until the highest level is reached.
[0143] Steps 1610 through 1630 will be described in detail below.
[0144] In steps 1610 through 1630, after traversing all memory resource pools at the lowest level, if the surplus resource count is still not zero, the second-to-last level is set as the target level, and traversal is performed in the memory resource pool at the target level; also, from the memory resource pools that have not been traversed, one memory resource pool with the smallest deficit after satisfying the surplus resource count with the number of resources of the target common type is selected as a seed resource pool; furthermore, until traversal in the memory resource pool at the target level is complete, the surplus resource count is updated using the number of resources that still do not satisfy the surplus resource count with the number of resources of the target common type, and the target level is updated using the level one level above the target level, and the second process is repeated until the highest level is reached.
[0145] Note that resource pool levels can be classified using various criteria, and the overhead caused by resource scheduling increases sequentially from low to high levels. Therefore, if the number of surplus resources is still not zero after traversing all the lowest-level memory resource pools, the second-to-last level (the second lowest level) can be set as the target level, and traversal can be performed on the memory resource pools at the target level. The purpose of this is as follows: First, use relatively low-level memory resource pools to satisfy as many resources of a single common type as possible, determine the resource shortage corresponding to the second-to-last level resource pool, and then determine the single memory resource pool with the smallest shortage as a seed resource pool. For the second-to-last level, traversal is performed in the same way as traversing the lowest-level resource pools, and the target number of resources is supplemented. Since the overhead caused by resource scheduling increases sequentially from low to high levels of resource pools, determining the seed resource pool in this manner can reduce the overall overhead of resource scheduling and improve the efficiency of resource scheduling.
[0146] Similarly, if the number of surplus resources is still not zero after traversing the second-to-last level resource pool is complete, the target level is updated using the level one level above the target level, and the second process is repeated, continuing this process until the highest level is reached. Note that if the number of surplus resources is cleared (becomes zero) during processing the target level resource pool, all seed resource pools for providing the target resources can be determined.
[0147] As demonstrated in the embodiments of this disclosure shown in paragraphs 1610 to 1630, the overhead of resource scheduling increases sequentially as the resource pool levels progress from low to high. By prioritizing the selection of a seed resource pool from among several storage resource pools with relatively low levels, the overall overhead of resource scheduling can be reduced, the efficiency of resource scheduling can be improved, and the acquisition efficiency relative to the number of target resources can be further enhanced.
[0148] <Detailed explanation of Step 330> Referring to Figure 17, step 330 may include, but is not limited to, the following steps 1710 to 1720.
[0149] Step 1710: If each candidate resource combination corresponds to one seed resource pool, obtain the level of the seed resource pool corresponding to each candidate resource combination; and Step 1720: From the seed resource pools corresponding to each candidate resource combination, the seed resource pool with the lowest level is determined as the target resource pool.
[0150] Steps 1710 through 1720 will be described in detail below.
[0151] In step 1710, if each candidate resource combination corresponds to one seed resource pool, the level of the seed resource pool corresponding to each candidate resource combination is obtained. Note that in order to determine the target resource pool that satisfies the resource scheduling request from multiple seed resource pools, it is first necessary to obtain the level of the seed resource pool corresponding to each candidate resource combination in order to select the best one from among the multiple seed resource pools.
[0152] In step 1720, the seed resource pool with the lowest level among the seed resource pools corresponding to each candidate resource combination is determined as the target resource pool. Although the resource scheduling request for the target task can be satisfied by performing resource scheduling based on any one of the multiple candidate resource combinations, there is a difference in the effectiveness of the scheduling when satisfying the resource scheduling request. As the resource pool level increases from low to high, the overhead caused by resource scheduling increases sequentially. Therefore, in the embodiments of this disclosure, by determining the seed resource pool with the lowest level among the seed resource pools corresponding to each candidate resource combination as the target resource pool, the overhead caused by resource scheduling can be reduced and the efficiency of resource scheduling can be improved.
[0153] As demonstrated in the embodiments of the present disclosure shown in steps 1710 to 1720, the efficiency of resource scheduling can be further improved by prioritizing the selection of the lowest-level seed resource pool and determining it as the target resource pool.
[0154] Referring to Figure 18, step 1720 may include, but is not limited to, steps 1810 through 1820.
[0155] Step 1810: If there are two or more seed resource pools with the lowest level, determine the scheduling return amount for two or more seed resource pools, and then determine the target resource pool based on the scheduling return amount; and Step 1820: If two or more seed resource pools have the same scheduling return amount, determine the target resource pool based on the resource pool type of the two or more seed resource pools.
[0156] Steps 1810 through 1820 will be explained in detail below.
[0157] Step 1810 determines the scheduling return amount for two or more seed resource pools if there are two or more seed resource pools with the lowest level, and then determines the target resource pool based on the scheduling return amount. Note that if there are two seed resource pools with the lowest level, it is not possible to select the better one based solely on the level of the seed resource pool. Based on this, the target resource pool can be determined by determining the scheduling return amount for two or more seed resource pools and then selecting the better one based on the scheduling return amount. Note that the scheduling return amount refers to the balance that needs to be returned to the resource pool in the process of resource scheduling using the inventory of the resource pool. As can be understood, the scheduling return amount arises when the inventory of the resource pool cannot satisfy the resource scheduling request. Therefore, the smaller the scheduling return amount of a resource pool awaiting consideration, the lower the overhead of returning resources as balance to the resource pool. As is clear, when there are two or more seed resource pools with the lowest level, determining the scheduling return amount for two or more seed resource pools and then determining the target resource pool based on the scheduling return amount can reduce the economic and time costs incurred in the resource scheduling process and improve the efficiency of resource scheduling.
[0158] Step 1820 determines the target resource pool based on the resource pool type of two or more seed resource pools when the scheduling return amounts of two or more seed resource pools are the same. However, if there are two or more seed resource pools with the lowest level and two or more seed resource pools with the same scheduling return amount, it means that a better one cannot be selected based on the level and scheduling return amount of the seed resource pools. Note that there may be multiple classification criteria for resource pool types, for example, resource pool types classified by capacity size, resource pool types classified by inventory amount, resource pool types classified by resource scheduling authority, and various other resource pool types.
[0159] In the embodiments of the present disclosure shown in steps 1810 to 1820, in order to determine a target resource pool from two or more seed resource pools, it is necessary to first select a seed resource pool with a relatively lower level as the target resource pool by making a preferential selection of these two or more seed resource pools based on the level of the resource pool; if the levels of these two or more seed resource pools are the same, it is then necessary to make a preferential selection of these two or more seed resource pools based on the scheduling return amount; and if the levels of these two or more seed resource pools are the same and the scheduling return amount is also the same, it is finally necessary to determine the target resource pool by making a preferential selection based on the resource pool type of the two or more seed resource pools. In this way, a target resource pool can be selected from two or more seed resource pools that can further reduce the cost of resource scheduling and further improve the efficiency of resource scheduling.
[0160] Referring to Figure 19, in some embodiments provided in this disclosure, the resource pool levels A, B, C, and D are sequentially increased, with the level A resource pool including resource pool A1, resource pool A2, resource pool A3, etc., the level B resource pool including resource pool B1, resource pool B2, resource pool B3, etc., the level C resource pool including resource pool C1, resource pool C2, resource pool C3, etc., and the level D resource pool including resource pool D1, resource pool D2, resource pool D3, etc.
[0161] The seed resource pool corresponding to candidate resource combination A is included in seed resource pool set A, and includes resource pool A1, resource pool A2, and resource pool A3, with a corresponding resource return amount of 50 and a resource pool type of "large resource pool".
[0162] The seed resource pool corresponding to candidate resource combination B is included in seed resource pool set B, and includes resource pools A4, A5, and A6, with a corresponding resource return amount of 25 and a resource pool type of "large resource pool".
[0163] The seed resource pool corresponding to candidate resource combination C is included in seed resource pool set C, and includes resource pools A7, A8, and A9, with a corresponding resource return amount of 25 and a resource pool type of "large resource pool".
[0164] The seed resource pool corresponding to candidate resource combination D is included in seed resource pool set D, and includes resource pool B1, resource pool B2, and resource pool B3, with a corresponding resource return amount of 25 and a resource pool type of "large resource pool".
[0165] Figure 19 shows the selectable implementation methods for determining the target resource pool from multiple seed resource pools.
[0166] To determine the target resource pool from multiple seed resource pools, it is necessary to first make a preferential selection of these seed resource pools based on their resource pool levels, and then select a seed resource pool with a relatively low level from among them to determine as the target resource pool. Specifically, the resource pool levels of seed resource pool sets A, B, and C are all level A, and the resource pool level of candidate resource combination D is level B. Assuming that resource pool level A is lower than resource pool level B, the seed resource pools that are preferentially selected based on resource pool levels are specifically the seed resource pools in seed resource pool sets A, B, and C.
[0167] Furthermore, since there are multiple seed resource pools with the same corresponding level, it is necessary to prioritize the selection of these two or more seed resource pools based on their scheduling return amounts. Of seed resource pool sets A, B, and C, seed resource pool set A has a scheduling return amount of 50, while seed resource pool sets B and C have a scheduling return amount of 25. Therefore, seed resource pool sets B and C, which have a scheduling return amount of 25, are prioritized for selection.
[0168] Furthermore, since there are multiple seed resource pools with the same corresponding level and the same scheduling return amount, it is necessary to prioritize selection from these multiple seed resource pools based on the resource pool type. In some embodiments, large resource pools have a more complete resource scheduling system, a more standardized resource scheduling flow, and a more efficient resource scheduling method compared to small resource pools. Therefore, prioritization is made from seed resource pool sets B and C based on the resource pool type, and the selected seed resource pool set C is of the large resource pool type.
[0169] As is clear, after a three-stage screening (selection) process, the seed resource pools in the seed resource pool set C are determined to be the target resource pools. The candidate resource combinations C corresponding to the seed resource pool set C are also designated as the resource combinations actually used for resource scheduling, thereby responding to the resource scheduling request for the target task. In this way, a target resource pool can be selected from two or more seed resource pools that can reduce the cost of resource scheduling and improve the efficiency of resource scheduling.
[0170] Referring to Figure 20, step 330 may further include, but is not limited to, steps 2010 through 2020.
[0171] Step 2010: If some candidate resource combinations correspond to multiple seed resource pools, select the seed resource pool with the highest level from among the multiple seed resource pools and acquire it as the seed resource pool; and for the other parts of the candidate resource combinations that correspond to a single seed resource pool, select the single seed resource pool and acquire it as the seed resource pool; and Step 2020: Among the selected seed resource pools corresponding to each candidate resource combination, the seed resource pool with the lowest level is determined as the target resource pool.
[0172] Steps 2010 through 2020 are described in detail below.
[0173] Furthermore, in the process of determining a target resource pool to satisfy a resource scheduling request from multiple seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination, if some candidate resource combinations correspond to multiple seed resource pools and the resource pool levels of these multiple seed resource pools are different, the target resource pool can be determined by the embodiments of this disclosure shown in steps 2010 to 2020.
[0174] In steps 2010 through 2020, if some candidate resource combinations correspond to multiple seed resource pools, the seed resource pool with the highest level among the multiple seed resource pools is selected as the post-selection seed resource pool. For the other parts of the candidate resource combination that correspond to a single seed resource pool, that single seed resource pool is designated as the post-selection seed resource pool. Furthermore, among the post-selection seed resource pools corresponding to each candidate resource combination, the seed resource pool with the lowest level is determined as the target resource pool. The post-selection seed resource pools of candidate resource combinations are used to perform preferential selection of the seed resource pools corresponding to the candidate resource combinations. If a candidate resource combination corresponds to a single seed resource pool, that single seed resource pool can be directly designated as the post-selection seed resource pool. If a candidate resource combination corresponds to multiple seed resource pools, and the resource pool levels of these multiple seed resource pools are different, it is necessary to determine the seed resource pool with the highest level from among the multiple seed resource pools corresponding to this candidate resource combination and designate it as the post-selection seed resource pool. In this way, by comparing the resource pool levels based on the selected seed resource pools for different candidate combinations, the seed resource pool with the lowest level among the selected seed resource pools corresponding to each candidate resource combination can be determined as the target resource pool.
[0175] As demonstrated by the embodiments of this disclosure shown in steps 2010 to 2020, when a candidate resource combination corresponds to multiple seed resource pools and these seed resource pools have different resource pool levels, it is possible to determine a target resource pool to satisfy the resource scheduling request from among the multiple seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination, thereby further reducing the cost of resource scheduling and further improving the efficiency of resource scheduling.
[0176] Referring to one embodiment of the present disclosure provided in Figure 21, the resource pool levels are sequentially increased as follows: Level A resource pool, Level B resource pool, Level C resource pool, and Level D resource pool, of which Level A resource pool includes resource pool A1, resource pool A2, resource pool A3, etc.; Level B resource pool includes resource pool B1, resource pool B2, resource pool B3, etc.; Level C resource pool includes resource pool C1, resource pool C2, resource pool C3, etc.; and Level D resource pool includes resource pool D1, resource pool D2, resource pool D3, etc.
[0177] The seed resource pool corresponding to candidate resource combination A is included in seed resource pool set A, and includes resource pool D1; The seed resource pool corresponding to candidate resource combination B is included in seed resource pool set B, and includes resource pool A2, resource pool B3, and resource pool C4; The seed resource pool corresponding to candidate resource combination C is included in seed resource pool set C, and includes resource pool B2, resource pool B4 and resource pool C1; and The seed resource pools corresponding to candidate resource combination D are included in seed resource pool set D, and include resource pool C2, resource pool D2, and resource pool C3.
[0178] Figure 21 shows an example of how to determine the target resource pool when a candidate resource combination corresponds to multiple seed resource pools and the resource pool levels of these multiple seed resource pools are mismatched. Specifically, it is as follows:
[0179] Candidate resource combination A corresponds to a single seed resource pool, i.e., resource pool D1; therefore, a single seed resource pool can be selected and designated as the seed resource pool; Candidate resource combination B corresponds to three seed resource pools: resource pool A2, resource pool B3, and resource pool C4. Therefore, out of these three seed resource pools, the one with the highest level, i.e., resource pool A2, is selected and acquired as the seed resource pool; Candidate resource combination C corresponds to three seed resource pools: resource pool B2, resource pool B4, and resource pool C1. Therefore, out of these three seed resource pools, the one with the highest level, i.e., resource pool B2 and resource pool B4, is selected and acquired as the seed resource pool; Candidate resource combination B corresponds to three seed resource pools: resource pool C2, resource pool D2, and resource pool C3. Therefore, out of these three seed resource pools, the one with the highest level, i.e., resource pool C2 and resource pool C3, is selected and acquired as the seed resource pool; and Furthermore, among the selected seed resource pools corresponding to each candidate resource combination, the seed resource pool with the lowest level is determined as the target resource pool. Specifically, among resource pools D1, A2, B2, B4, C2, and C3, the seed resource pool with the lowest level, i.e., resource pool A2, is determined as the target resource pool. In this way, when a candidate resource combination corresponds to multiple seed resource pools, and the resource pool levels of these multiple seed resource pools do not match, it is possible to determine a target resource pool to satisfy the resource scheduling request from among the multiple seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination. This further reduces the cost of resource scheduling and further improves the efficiency of resource scheduling.
[0180] <Detailed explanation of feasible implementation methods prior to Step 310> Referring to Figure 22, according to some embodiments provided in this disclosure, the resource scheduling method in the embodiments of this disclosure may further include, but is not limited to, the following steps 2210 to 2230 prior to step 310.
[0181] Step 2210: Received a resource scheduling request for multiple tasks, where the multiple tasks include the target task; Step 2220: Place multiple tasks into the task queue; and Step 2230: Tasks are retrieved from the task queue in order from front to back, with the next task being retrieved only after the previous task has been completed.
[0182] Steps 2210 through 2230 will be described in detail below.
[0183] Step 2210 receives resource scheduling requests for multiple tasks, including a target task. In many business scenarios, there are often multiple tasks that need to schedule resources. In this case, it is necessary to first receive resource scheduling requests for multiple tasks so that resources can be scheduled for each task in subsequent steps.
[0184] In steps 2220 to 2230, multiple tasks are placed in a task queue, and tasks are retrieved from the task queue in order from the front to the back. After the execution of the currently retrieved task is completed, the next task can be retrieved. Note that if parallel resource scheduling is performed simultaneously for each task, considering that different tasks may use the same resources in the same resource pool, resource contention may occur, potentially affecting the efficiency of resource scheduling. Therefore, in the embodiments of this disclosure, it is necessary to place multiple tasks in a task queue and retrieve tasks in order from the front to the back of the task queue, and after the execution of the currently retrieved task is completed, the next task can be retrieved.
[0185] In the embodiments of the present disclosure shown in steps 2210 to 2230, resource scheduling requests for multiple tasks are received, the multiple tasks include a target task, the multiple tasks are placed in a task queue, and then the tasks are retrieved from the task queue in order from front to back, and after the execution of the currently retrieved task is completed, the next task can be retrieved. In this way, by arranging each task in a serial queue and performing resource scheduling sequentially for each task, the efficiency of resource scheduling can be further improved.
[0186] Referring to Figure 23, according to some embodiments provided in this disclosure, step 2220 may include, but is not limited to, the following steps 2310 to 2320.
[0187] Step 2310: Determine the priority level indicator for each of the multiple tasks; and Step 2320: Arrange multiple tasks in a task queue based on priority level indicators.
[0188] Steps 2310 through 2320 will be described in detail below.
[0189] Steps 2310 through 2320 determine the priority level indicator for each of the multiple tasks. Furthermore, the multiple tasks are arranged in a task queue based on the priority level indicators. Note that arranging multiple tasks in a queue for resource scheduling requires placing multiple tasks in the task queue. Since some of these tasks need to be executed preferentially, they need to be placed at the beginning of the task queue when queuing. The priority level indicator set for a task is used to represent the priority level corresponding to the current task. Tasks with relatively high priority levels are located closer to the front of the task queue and are retrieved preferentially, while tasks with relatively low priority levels are located further back in the task queue and are retrieved later.
[0190] In the embodiments of the present disclosure shown in steps 2310 to 2320, first, the priority level indicator of each of the multiple tasks is determined, and then, based on the priority level indicator, the multiple tasks are arranged in a task queue. In this way, the order of resource scheduling can be rationally determined according to the importance of different tasks, thereby further improving the efficiency and flexibility of resource scheduling.
[0191] Referring to Figure 24, according to some embodiments provided in this disclosure, after step 2220, the resource scheduling method in the embodiments of this disclosure may further include, but is not limited to, the following steps 2410 to 2440.
[0192] Step 2410: Determine the number of resources of each type required for multiple tasks in the task queue; Step 2420: For each type of resource, calculate the sum of the number of resources of that type required for multiple tasks, and obtain the total number of primary resources of that type; Step 2430: Find the sum of the number of resources of that type in the multilevel resource pool, and obtain the total number of secondary resources of that type; and Step 2440: If the total number of primary resources is greater than the total number of secondary resources, a replenishment request is sent to the reserve resource library to replenish resources in the multilevel resource pool.
[0193] Steps 2410 through 2440 will be described in detail below.
[0194] In some embodiments, resource scheduling requests for multiple tasks are received first, the multiple tasks include a target task, the multiple tasks are placed in a task queue, and then the tasks are retrieved from the task queue in order from front to back, and the next task must be retrieved only after the execution of the currently retrieved task is completed. In this process, if a resource shortage occurs in the multilevel resource pool, resource scheduling for the current task must be temporarily suspended, and normal resource scheduling must be resumed only after the resources in the multilevel resource pool are replenished. When resource scheduling is temporarily suspended, the efficiency of resource scheduling for each task in the task queue decreases. To solve this problem, embodiments shown in steps 2410 to 2440 of this disclosure are provided.
[0195] Step 2410 determines the number of resources of each type required for multiple tasks in the task queue. Note that a task queue may contain multiple tasks, and each task requires scheduling of multiple resources. Therefore, in order to clarify the resource requirements of the task queue, it is necessary to first determine the number of resources of each type required for multiple tasks in the task queue.
[0196] In step 2420, for each type of resource, the sum of the number of resources of that type required by multiple tasks is calculated to obtain the total number of primary resources of that type. Note that multiple tasks in the task queue may request the same type of resource, so it is necessary to calculate the sum of the number of resources of that type required by multiple tasks for each type of resource to obtain the total number of primary resources of that type. Note that the total number of primary resources can reflect the total amount of requests for a particular resource from each task in the current task queue.
[0197] Step 2430 calculates the sum of the resource counts for that type of resource in the multilevel resource pool and obtains the total secondary resource count for that type of resource. It is necessary to calculate the sum of the resource counts for that type of resource in the multilevel resource pool and obtain the total secondary resource count for that type of resource in order to determine if there is sufficient surplus in the multilevel resource pool to satisfy the current task queue requests. As can be understood, the total secondary resource count can reflect the total surplus of a certain type of resource in the current multilevel resource pool.
[0198] In step 2440, if the total number of primary resources is greater than the total number of secondary resources, a replenishment request is sent to the reserve resource library to replenish resources in the multilevel resource pool. The total number of primary resources reflects the total amount of requests for a certain type of resource from each task in the current task queue, and the total number of secondary resources reflects the total surplus of a certain type of resource in the current multilevel resource pool. Therefore, if the total number of primary resources is greater than the total number of secondary resources, it means that there is insufficient storage surplus for that type of resource in the multilevel resource pool, and a replenishment request is sent to the reserve resource library to replenish resources in the multilevel resource pool. The reserve resource library is a resource storage unit outside the multilevel resource pool.
[0199] In the embodiments of the present disclosure shown in steps 2410 to 2440, if the total number of primary resources of a certain type of resource is greater than the total number of secondary resources, the multilevel resource pool has insufficient storage capacity for that type of resource, and a replenishment request is sent to the reserve resource library to cause the reserve resource library to replenish the multilevel resource pool with resources. In this way, the possibility of resource scheduling interruptions is reduced and the efficiency of resource scheduling can be further improved.
[0200] In some relatively detailed embodiments, given that it takes time for the backup resource library to replenish resources in the multilevel resource pool, the possibility of resource scheduling pauses can be further reduced by replenishing the multilevel resource pool with storage resources exceeding the total number of primary resources. For example, if the total number of primary resources is greater than the total number of secondary resources, and specifically if the total number of secondary resources is less than a slight double of the total number of primary resources, it can be determined that a replenishment request should be sent to the backup resource library to cause it to replenish resources in the multilevel resource pool.
[0201] Referring to Figure 25, according to some embodiments provided in this disclosure, step 2440 may include, but is not limited to, the following steps 2510 to 2530.
[0202] Step 2510: Determine the difference between the total number of first resources and the total number of second resources; Step 2520: Determine the number of replenishable resources based on the difference and a predetermined multiple; and Step 2530: Replenish the multilevel resource pool with the number of resources to be replenished by sending a replenishment request for the number of replenished resources to the reserve resource library.
[0203] Steps 2510 through 2530 will be described in detail below.
[0204] In steps 2510 to 2530, first, the difference between the total number of first resources and the total number of second resources is determined, then the number of replenishment resources is determined based on the difference and a predetermined multiple, and finally, the number of replenishment resources is sent to the reserve resource library as a replenishment request to replenish the multilevel resource pool with the number of replenishment resources. Considering that it takes time for the reserve resource library to replenish the multilevel resource pool with resources, the possibility of a temporary suspension of resource scheduling can be further reduced by replenishing the multilevel resource pool with storage resources exceeding the total number of first resources. Therefore, in the embodiments of this disclosure, it is necessary to first determine the difference between the total number of first resources and the total number of second resources, and then determine the corresponding number of replenishment resources by multiplying the difference between the total number of first resources and the total number of second resources by a predetermined multiple. Based on this, the possibility of a temporary suspension of resource scheduling can be further reduced by sending the number of replenishment resources to the reserve resource library as a replenishment request.
[0205] Referring to several embodiments of the present disclosure provided in Figure 26, one optional implementation is shown in which a replenishment request is sent to a reserve resource library to replenish resources in a multilevel resource pool.
[0206] The task queue includes tasks A, B, C, and D, and each of these tasks requires target resources A, B, and C, respectively. For each type of resource, the sum of the number of resources of that type required by multiple tasks is calculated, and by obtaining the total number of primary resources of that type, it can be determined that the total number of primary resources for target resource A is 160, for target resource B it is 59, and for target resource C it is 76.
[0207] Furthermore, since the multilevel resource pool also includes three resource pools, resource pool A, resource pool B, and resource pool C, it can be determined that the total number of secondary resources for target resource A is 200, the total number of secondary resources for target resource B is 200, and the total number of secondary resources for target resource C is 230.
[0208] After determining the total number of primary and secondary resources for each type of resource, it is necessary to determine whether a replenishment request needs to be sent to the reserve resource library by checking if the total number of primary resources is greater than the total number of secondary resources. Since the total number of primary resources for target resource A, target resource B, and target resource C is all greater than the total number of secondary resources, resource replenishment is necessary for these three types of resources.
[0209] Furthermore, the difference between the total number of first-level resources and the total number of second-level resources is determined first. Of these, the difference for target resource A is 60, the difference for target resource B is 59, and the difference for target resource C is 49. The predetermined multiple is 2, which means that twice the number of resources must be added to the multi-level resource pool based on the difference between the total number of first-level resources and the total number of second-level resources. Therefore, the number of resources to be added for target resource A is 120, for target resource B it is 118, and for target resource C it is 98.
[0210] By sending replenishment requests of 120 resources for target resource A, 118 resources for target resource B, and 98 resources for target resource C to the reserve resource library, the reserve resource library is instructed to replenish the multilevel resource pool with the required number of resources. In this way, the possibility of a temporary suspension of resource scheduling can be further reduced.
[0211] Referring to Figure 27, according to some embodiments provided in this disclosure, the resource scheduling method according to this disclosure can be executed by a target compute node among a plurality of candidate compute nodes, and the target compute node is selected from the plurality of candidate compute nodes in the following manner.
[0212] Step 2710: Obtain the processing power of multiple candidate compute nodes; Step 2720: Get the number of assigned tasks for multiple candidate compute nodes; and Step 2730: Select a target compute node from multiple candidate compute nodes based on processing capacity and the number of assigned tasks.
[0213] Steps 2710 through 2730 will be described in detail below.
[0214] In steps 2710 to 2730, the processing capacity of multiple candidate compute nodes is first obtained, then the number of assigned tasks for each of the multiple candidate compute nodes is obtained, and then a target compute node is selected from the multiple candidate compute nodes based on the processing capacity and the number of assigned tasks. Computer nodes are used to provide the computing power required for the resource scheduling process, and candidate compute nodes refer to compute nodes that can be selected in advance to provide computing power for resource scheduling, while the target compute node is selected from multiple candidate compute nodes. Specifically, in order to select a target compute node from multiple candidate compute nodes, it is necessary to first obtain the number of assigned tasks for each of the multiple candidate compute nodes, and then select a target compute node from the multiple candidate compute nodes based on the processing capacity and the number of assigned tasks. The purpose of this is as follows: by determining the current computing power that a candidate compute node can provide to the resource scheduling process based on its processing capacity and the number of assigned tasks, the resource scheduling process can obtain more sufficient computing power from its corresponding compute node, thereby further improving the efficiency of resource scheduling.
[0215] Referring to Figure 28, according to some embodiments provided in this disclosure, the target compute node includes a master target compute node and a slave target compute node, and the multiple candidate compute nodes include a first set of candidate compute nodes and a second set of candidate compute nodes. Step 2730 may include, but is not limited to, the following steps 2810 to 2820.
[0216] Step 2810: Determine the master target compute node from the first set of candidate compute nodes based on processing capacity and the number of assigned tasks; and Step 2820: Determine the slave target compute node from the second set of candidate compute nodes.
[0217] Steps 2810 through 2820 will be described in detail below.
[0218] The target computing node is a selected computing node that provides computing power for resource scheduling. In an embodiment in which a target computing node is selected from multiple candidate computing nodes based on processing power and the number of allocated tasks, if a failure occurs in the target computing node, the target computing node may not be able to support the computing power required for resource scheduling, potentially resulting in poor anti-interference capability and robustness. To solve this problem, the embodiments of this disclosure provide the examples shown in steps 2810 to 2820.
[0219] In step 2810, the master target compute node is determined from the first group of candidate compute nodes based on their processing capacity and the number of assigned tasks. The current compute capacity available to the resource scheduling process of a given candidate compute node can be determined based on its processing capacity and the number of assigned tasks. In some embodiments, candidate compute nodes with good processing capacity or a small number of assigned tasks can be determined as the first group of candidate compute nodes. Based on this, the master target compute node can be determined from the first group of candidate compute nodes based on their processing capacity and the number of assigned tasks, thereby ensuring that the master target compute node utilizes more sufficient compute capacity.
[0220] In step 2820, the slave target compute node is determined from the second group of candidate compute nodes. Some candidate compute nodes with average processing power or a large number of allocated tasks may be determined as the second group of candidate compute nodes. Based on this, the slave target compute node is determined from the second group of candidate compute nodes, and in this way, a backup scheme can be provided to the master target compute node. If the master target compute node fails, the slave target compute node can be used in place of the master target compute node and can provide the computing power necessary to continue resource scheduling.
[0221] The embodiments of the present disclosure shown in steps 2810 to 2820 reduce the risk of loss of computing power when some target computing nodes fail, and improve the anti-interference capability and robustness of the resource scheduling method in the embodiments of the present disclosure.
[0222] According to some relatively detailed embodiments of this disclosure, a target compute node can be configured with its corresponding attribute information. When a master target compute node fails while the target compute node is executing the process of the resource scheduling method according to this disclosure, a slave target compute node with the same attribute information can be preferentially called and used in place of the master target compute node to provide the computing power necessary to continue resource scheduling. The purpose is to reduce the adaptive cost during the replacement process and decrease the possibility of compatibility issues occurring by replacing the target compute node with a slave target compute node with the same attribute information. To understand this, the attribute information may include various information such as the location information of the target compute node, system configuration information, processing capacity, and the number of assigned tasks.
[0223] In several relatively detailed examples, the number of candidate computation nodes changes periodically in the following manner, namely, Get the total number of tasks in the current cycle of the resource platform; and The number of candidate computing nodes is determined based on the total number of tasks.
[0224] Furthermore, multiple candidate compute nodes can be used to simultaneously respond to resource scheduling requests for different tasks. Therefore, in order to flexibly respond to resource scheduling requests for different tasks, the number of candidate compute nodes needs to change periodically in the embodiments of this disclosure. Computation demands can be met by decreasing the number of candidate compute nodes when there are few resource scheduling requests and increasing the number of candidate compute nodes when there are many resource scheduling requests. Therefore, it is necessary to first obtain the total number of tasks in the current period of the resource platform, and then determine the number of candidate compute nodes based on the total number of tasks. In this way, it is possible to flexibly respond to resource scheduling requests for different tasks.
[0225] Referring to Figure 29, according to some embodiments provided in this disclosure, the resource scheduling method may further include, but is not limited to, the following steps 2910 to 2920 prior to step 310.
[0226] Step 2910: Obtain the resource pool water level information library, resource pool location information library, task resource relationship library and calculation instruction library; and Step 2920: Construct the resource pool water level information library as a water level model, the resource pool location information library as a distribution location model, the task resource relationship library as a resource model, and the computation instruction library as a computation model.
[0227] Step 310 may include, but is not limited to, the following steps 2930, namely, Step 2930: The computation model invokes the resource model and retrieves multiple candidate resource combinations corresponding to the target task in response to the resource scheduling request.
[0228] Step 320 searches for multilevel resource pools in order from low level to high level, and may include, but is not limited to, the following step 2940, namely, Step 2940: The computational model determines the location of each level of resource pool according to the distribution location model, and then the water level model is invoked to determine the seed resource pool corresponding to the candidate resource combination.
[0229] Step 330 determines the target resource pool to satisfy the resource scheduling request from multiple seed resource pools, and may include, but is not limited to, the following step 2950, namely, Step 2950: The computational model determines the target resource pool to satisfy the resource scheduling request from among multiple seed resource pools.
[0230] Steps 2910 through 2950 will be described in detail below.
[0231] In step 2910, the resource pool level information library, resource pool location information library, task resource relationship library, and calculation instruction library are obtained. The resource pool level information library is used to store resource inventory information for each level of resource pools. As resource scheduling progresses, the resource inventory information in the resource pools gradually decreases, meaning the resource pool level gradually decreases. In some embodiments, a target task corresponds to a scheduling target location that needs to fill resources. The greater the distance between the resource pool location and the scheduling target location, the greater the overhead caused by resource scheduling. Therefore, by storing the resource pool location in the resource pool location information library, it is necessary to obtain the resource pool location from the resource pool location information library when calculating the overhead. The task resource relationship library stores the correspondence between each type of task and the resources required for it. The calculation instruction library stores the instructions necessary to perform calculations for each type of data.
[0232] In step 2920, the resource pool water level information library is constructed as a water level model, the resource pool location information library as a distribution location model, the task resource relationship library as a resource model, and the computation instruction library as a computation model. The purpose of constructing the resource pool water level information library as a water level model, the resource pool location information library as a distribution location model, the task resource relationship library as a resource model, and the computation instruction library as a computation model is to allow computation nodes to easily retrieve the necessary data from each model.
[0233] In step 2930, the computation model invokes the resource model to obtain multiple candidate resource combinations corresponding to the target task in response to the resource scheduling request. The task resource relationship library stores the correspondence between each type of task and the resources required for it, and the task resource relationship library is constructed as a resource model. Therefore, in order to respond to a resource scheduling request for a target task, it is necessary to invoke the resource model using the computation model to obtain multiple candidate resource combinations corresponding to the target task, and each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources for that target resource.
[0234] In step 2940, the computational model determines the location of each level of resource pool according to the distribution location model, and then the seed resource pool corresponding to the candidate resource combination is determined by calling the water level model. The computational instruction library stores the instructions necessary to perform computational processing for each type of data, the resource pool location information library stores the location of each level of resource pool, the resource pool water level information library is used to store resource inventory information for each level of resource pool, the resource pool water level information library is constructed as a water level model, the resource pool location information library is constructed as a distribution location model, and the computational instruction library is constructed as a computational model. Therefore, it is necessary to determine the location of each level of resource pool according to the distribution location model using the computational model, and the purpose of this is to perform a search on the multi-level resource pool in order from low level to high level based on at least one type of target resource and the number of target resources for each candidate resource combination, and then the seed resource pool corresponding to the candidate resource combination is determined by calling the water level model. In some embodiments, the resource pool level is classified based on the distance between the resource pool's location and the scheduling target location. The smaller the distance between the resource pool's location and the scheduling target location, the lower the corresponding resource pool level, and the larger the distance, the higher the corresponding resource pool level.
[0235] In step 2950, the computational model determines the target resource pool to satisfy the resource scheduling request from multiple seed resource pools. Note that after determining the seed resource pools corresponding to the candidate resource combinations, the computational model can determine the target resource pool to satisfy the resource scheduling request from multiple seed resource pools. Specifically, the computational model determines the target resource pool to satisfy the resource scheduling request from multiple seed resource pools based on the level of the seed resource pools corresponding to each candidate resource combination.
[0236] As demonstrated in the embodiments of the present disclosure shown in steps 2910 to 2950, the resource scheduling method in the embodiments of the present disclosure can be configured as a resource scheduling method implemented based on a water level model, a distribution location model, a resource model, and a calculation instruction library, with respect to the resource pool water level information library, resource pool location information library, task resource relationship library, and calculation instruction library. This allows for the clear determination of the role each model plays in the resource scheduling process. In this way, the implementation of the resource scheduling method in the embodiments of the present disclosure can be facilitated.
[0237] Referring to several embodiments of the present disclosure shown in Figure 30, a system architecture to which the resource scheduling method of the present disclosure is applied is shown. The system architecture for scheduling resources in Figure 30 includes a data information layer, a model processing layer, a resource scheduling calculation layer, a resource scheduling control layer, and an application layer. Each layer will be described in detail below.
[0238] Data Information Layer: Used to store various types of data and information necessary for resource scheduling. Specifically, this includes, but is not limited to, a resource pool water level information library, a resource pool location information library, a task resource relationship library, and a computation instruction library.
[0239] Model Processing Layer: Used to extract data information from the data information layer and construct it as a model, which allows the resource scheduling computation layer to retrieve the corresponding data information. Of these, the resource pool water level information library is constructed as a water level model, the resource pool location information library as a distribution location model, the task resource relationship library as a resource model, and the computation instruction library as a computation model.
[0240] Resource Scheduling Calculation Layer: This layer receives request information from the Resource Scheduling Control Layer and performs corresponding scheduling calculations based on the instructions in that request information. When performing calculations, the Resource Scheduling Calculation Layer can call upon the corresponding data information from the Resource Scheduling Calculation Layer as the basis for the calculation. The Resource Scheduling Calculation Layer is divided into two parts: one used for calculating resource requests and the other used for calculating resource inventory. As can be understood, resource scheduling is essentially a process to ensure that the allocated resource inventory satisfies resource requests, so dividing the resource scheduling calculation into two parts is advantageous for making full use of the computing power of the computing nodes.
[0241] Resource Scheduling Control Layer: It can implement functions in various aspects such as resource scheduling, serial queue, asynchronous request, and water level inspection. Among them, resource scheduling means that the resource scheduling method in the embodiments of the present disclosure is used as the control logic in the resource scheduling control layer, and the specific realization of the resource scheduling method needs to be combined with the computing power of the resource scheduling calculation layer; the serial queue is considered that different tasks can use the same resource in the same resource pool. To avoid resource competition and affect the efficiency of resource scheduling caused by performing parallel resource scheduling for each task simultaneously, in the embodiments of the present disclosure, multiple tasks are put into the task queue and used to retrieve tasks in the order from the front to the back of the task queue. Among them, after the execution of the retrieved current task is completed, the next task can be retrieved; asynchronous operation means that the execution logic of each part in the embodiments of the present disclosure can be realized by asynchronous operation after decoupling; water level inspection means that the resource scheduling control layer in the embodiments of the present disclosure further detects the resource inventory of the multi-level resource pool to determine the scheduling scheme of various types of resources and the replenishment operation for the multi-level resource pool.
[0242] Application Layer: The embodiments of the present disclosure are applicable to multiple types of business scenarios, and tasks that need to schedule resources in the application layer of the system architecture for scheduling resources in different business scenarios can be issued.
[0243] Referring to some embodiments of the present disclosure provided in FIG. 31, an exemplary diagram of asynchronous operation in the embodiments of the present disclosure is shown. Note that asynchronous operation means that the execution logic of each part in the embodiments of the present disclosure can be realized by asynchronous operation after decoupling. In FIG. 31, the execution logic of each part of the resource scheduling control layer is decoupled and performed in different modules. Specifically, it is as follows.
[0244] Task analysis module: It is used to obtain a plurality of candidate resource combinations corresponding to a target task according to a resource scheduling request of the target task. Each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources of the target resource; Resource setting module: For each candidate resource combination, based on at least one type of target resource and the number of target resources, by performing a search on the multi-level resource pool in order from low level to high level, a seed resource pool corresponding to the candidate resource combination is determined. Furthermore, based on the level of the seed resource pool corresponding to each candidate resource combination, it is used to determine a target resource pool for satisfying the resource scheduling request from a plurality of seed resource pools; Scheduling execution module: It is used to perform actual resource scheduling after determining a target resource pool for satisfying the resource scheduling request; Log module: It is used to update a computer log that stores system operation information based on the actually executed resource scheduling operation; Alarm module: It is used to perform an alarm operation when an emergency occurs in resource scheduling; Resource statistics module: It is triggered after resource scheduling is actually executed, and is used to update the resource inventory information in the multi-level resource pool based on the actually scheduled resources; Inventory management module: It is used to detect whether the inventory of the multi-level resource pool has reached a level of shortage, that is, the execution logic of water level inspection; and Resource replenishment module: When the inventory of the multi-level resource pool reaches a level of shortage, a replenishment request is sent to the spare resource library to achieve resource replenishment to the multi-level resource pool.
[0245] In this way, the execution logic of each part in the embodiments of the present disclosure can be implemented by asynchronous operation after decoupling, thereby clearly defining the role that each module plays in the resource scheduling process and facilitating the implementation of the resource scheduling method in the embodiments of the present disclosure.
[0246] Referring to the embodiments of this disclosure provided in Figure 32, several relatively detailed examples of resource scheduling methods are shown. Note that the serial queue may contain n tasks, each being task 1, task 2, task 3, ..., task n.
[0247] To ensure conflict-free resource scheduling between different tasks, these n tasks are placed in a serial queue and resource scheduling is performed sequentially. Each task corresponds to a few candidate resource combinations; for example, Task 1 includes multiple candidate resource combinations such as Candidate Resource Combination A, Candidate Resource Combination B, Candidate Resource Combination C, and Candidate Resource Combination D. Each candidate resource combination corresponds to a few types of target resources; for example, Candidate Resource Combination A includes multiple types of target resources such as Target Resource a, Target Resource b, Target Resource c, Target Resource d, Target Resource e, Target Resource f, and Target Resource g. Each target resource in a candidate resource combination has a corresponding number of target resources to indicate the number of target resources required to satisfy the target task. As can be understood, the process of analyzing the target resources and their numbers in a candidate resource combination from the target task can be processed in parallel, thereby improving computational efficiency.
[0248] After clarifying the target resources and the number of target resources for each candidate resource combination, the resource scheduling scheme can be configured. For each candidate resource combination, based on at least one type of target resource and the number of target resources, a seed resource pool is first selected from the low-level resource pool, then from the second-to-last level resource pool, and by searching the multi-level resource pool in this manner from low to high level, the seed resource pool corresponding to the candidate resource combination is determined. Furthermore, based on the level of the seed resource pool corresponding to each candidate resource combination, a target resource pool to satisfy the resource scheduling request is determined from multiple seed resource pools. Specifically, the target resource pool may be determined based on the location of the multi-level resource pool, i.e., resource pool location selection; the target resource pool may also be determined based on the return amount corresponding to the resource pool; or the target resource pool may be determined based on the number of discrete resources.
[0249] After determining the target resource pool, resource allocation can be performed based on the target resource pool, thereby preventing the corresponding resource from being invoked by other tasks or processes. Based on this, resource scheduling can be completed by setting the allocated resources in the application layer. To make it easier to understand, information about all processes, such as analyzing candidate resource combinations and resource allocation from the target task and setting resources in the application layer, can be recorded in the log information. In this way, the efficiency of resource scheduling can be improved. The above scheme offers relatively high flexibility in resource scheduling because it can rationally determine the target resource pool to satisfy resource scheduling requests for application scenarios with relatively frequent changes.
[0250] <Explanation of experimental data for the embodiments of this disclosure> In several relatively detailed embodiments, for a target task of compensating for a shortage of equipment parts at location A, the shortage is compensated for by scheduling equipment parts at other locations using a conventional product number-based resource scheduling method, and by scheduling equipment parts at other locations using the resource scheduling method of the embodiments of this disclosure.
[0251] To clarify the advantageous effects of the resource scheduling methods in the embodiments of this disclosure, the resource scheduling metrics of the two resource scheduling methods in the embodiments of this disclosure are compared as shown in Table 1.
[0252] [Table 1] In the embodiments of this disclosure, five types of resource scheduling indicators are compared: matching speed of two resource scheduling methods, support for area partitioning, consideration of distance factors, support for combined scheduling, and inbound / outbound efficiency.
[0253] Regarding the matching speed of the scheduling scheme, the matching speed of the scheduling scheme in conventional product number-based resource scheduling methods is at the hour level, while the matching speed of the scheduling scheme in the embodiments of this disclosure is at the minute and second level. Clearly, the resource scheduling method in the embodiments of this disclosure can improve the efficiency of resource scheduling. In some relatively detailed embodiments, when performing nationwide resource scheduling for 500 C4 modules (one type of equipment component), the resource scheduling method in the embodiments of this disclosure reduces the matching speed of the scheduling scheme from 2 hours to 10 seconds, improving matching efficiency by approximately 99.86%.
[0254] Regarding the indicator of whether or not area division is supported, conventional product number-based resource scheduling methods cannot determine the area associated with location A, and therefore cannot identify the storage warehouse where the equipment parts are stored from the associated area. In contrast, the resource scheduling method in the embodiment of this disclosure classifies each storage warehouse into a level based on the area associated with location A, and then identifies the storage warehouses in the resource pool by searching multiple levels in order from low level to high level. As is clear, in the resource scheduling method in the embodiment of this disclosure, the selection of the area where the storage warehouse is located is closely related to the location of the material shortage, so that material shortages in different locations have different resource scheduling schemes, thereby improving the flexibility of resource scheduling.
[0255] Regarding the indicator of whether or not to consider the distance factor, conventional product number-based resource scheduling methods cannot determine which storage warehouses need to provide resources for scheduling based on their distance from location A where there is a material shortage. In contrast, the resource scheduling method in the embodiment of this disclosure classifies each storage warehouse into levels based on its distance from location A where there is a material shortage, and then identifies storage warehouses in the resource pool by performing searches across multiple levels in order from low to high levels. In this way, by determining which storage warehouses are close to the location where there is a material shortage and using them for resource scheduling, transportation costs can be saved and the efficiency of resource scheduling can be improved.
[0256] Regarding indicators of whether or not combined resource scheduling is supported, conventional product number-based resource scheduling methods cannot support combined resource scheduling. Taking resource scheduling for equipment parts as an example, there are often corresponding combinations between parts, and if parts cannot be matched, assembly is not possible. Based on this, the resource scheduling method in the embodiment of this disclosure can achieve combined resource scheduling by obtaining candidate resource combinations that correspond to the insufficient materials, and then identifying storage warehouses based on the candidate resource combinations, thereby improving the efficiency and flexibility of resource scheduling.
[0257] Regarding the efficiency metrics for receiving and shipping resources, conventional product number-based resource scheduling methods generally take two days to complete both receiving and shipping resource scheduling for a single resource scheduling order. However, the resource scheduling method in the embodiments of this disclosure can complete both receiving and shipping resource scheduling for a single resource scheduling order within one day. Clearly, the resource scheduling method in the embodiments of this disclosure can improve the efficiency of resource scheduling.
[0258] <Description of the apparatus and equipment in the embodiments of this disclosure> To make it clear, the steps in each flowchart above are shown in the order of the arrows, but these steps are not necessarily executed in that order. Unless otherwise specified in this embodiment, there are no strict constraints on the order in which these steps are executed, and they may be executed in any other order. Also, at least some of the steps in the flowcharts above may include multiple steps or stages, and these steps or stages do not necessarily have to be executed simultaneously, but may be executed at different times. Furthermore, the execution order of these steps or stages does not necessarily have to be sequential, and they may be executed alternately with other steps or at least some of the steps or stages in other steps.
[0259] According to one aspect of this disclosure, as shown in Figure 33, a resource scheduling device 3300 is provided, which may be installed in the aforementioned resource scheduling server. The resource scheduling device 3300 includes the following:
[0260] First acquisition unit 3310: Used to acquire multiple candidate resource combinations corresponding to a target task in response to a resource scheduling request for the target task, each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources for that target resource; Resource search unit 3320: Used to determine the seed resource pool corresponding to each candidate resource combination by searching for resource pools in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, based on the at least one type of target resource and the number of target resources for each candidate resource combination; and The first decision unit 3330: It is used to determine a target resource pool for satisfying the resource scheduling request from a plurality of the seed resource pools based on the level of the seed resource pool corresponding to each of the candidate resource combinations.
[0261] Optionally, each memory resource pool among the multi-level resource pools includes various memory resources of various common types and the number of resources of various memory resources of various common types.
[0262] The resource search unit 3320 is specifically used to perform the following, that is, for each of the candidate resource combinations, according to a predetermined level of the multi-level resource pool, search each resource pool among the multi-level resource pools in ascending order from a low level to a high level based on the at least one type of target resource and the target resource number, and when the resource pool to be considered among the multi-level resource pools can satisfy the target resource number of each type of the target resources with the number of resources of a single common type, determine the seed resource pool from the resource pool to be considered.
[0263] Optionally, the resource search unit 3320 is specifically used to perform the following, that is, when the number of the resource pools to be considered is 1, determine the resource pool to be considered as the seed resource pool, and when the number of the resource pools to be considered is 2 or more, determine the seed resource pool based on the levels of two or more of the resource pools to be considered.
[0264] Optionally, the resource search unit 3320 is used to perform the following: if the number of resource pools awaiting consideration is two or more, to determine the lower-level resource pool among the two or more resource pools awaiting consideration as the seed resource pool; if the number of resource pools awaiting consideration is two or more and the levels of the two or more resource pools awaiting consideration are the same, to determine the scheduling return amount for the two or more resource pools awaiting consideration and determine the seed resource pool based on the scheduling return amount; and if the scheduling return amounts for the two or more resource pools awaiting consideration are the same, to determine the seed resource pool based on the resource pool type of the two or more resource pools awaiting consideration.
[0265] Optionally, the resource search unit 3320 is used to specifically perform the following: obtain the resource container capacity of multiple resource containers in the pending resource pool; sort the multiple resource containers in descending order of resource container capacity; determine the highest-ranked resource container as the pending resource container and determine the target resource number as the unscheduled resource number; execute a first process, which includes updating the unscheduled resource number with the remainder of "unscheduled resource number" mod "resource container capacity of the pending resource container" and updating the pending resource container with the next resource container in the sorting result, repeating the first process until the pending resource container is empty; and determine the scheduling return amount based on the unscheduled resource number.
[0266] Optionally, the resource search unit 3320 is used to specifically perform the following: obtain the number of discrete resources in the resource pool awaiting consideration; determine that the scheduling return amount is 0 if the number of discrete resources is greater than the number of unscheduled resources; and obtain the scheduling return amount by subtracting the number of unscheduled resources from the resource container capacity of the lowest-ranked resource container if the number of discrete resources is less than or equal to the number of unscheduled resources.
[0267] Optionally, the resource search unit 3320 is used to specifically perform the following: if any one of the multilevel resource pools cannot satisfy the target number of each type of target resource with the number of resources of the single common type, select one of the storage resource pools with the lowest level as a seed resource pool, which has the smallest deficit after satisfying the target number of resources with the number of resources of the single common type, set the single common type as the target common type, and set the number of resources that still do not satisfy the target number of resources with the number of resources of the single common type as the surplus resource number; select another of the storage resource pools with the lowest level as a seed resource pool, which has the smallest deficit after satisfying the surplus resource number with the number of resources of the target common type, update the surplus resource number with the number of resources that still do not satisfy the surplus resource number after satisfying the number of resources of the target common type, and continue this process until the storage resource pool with the lowest level is traversed.
[0268] Optionally, the resource search unit 3320 is used to perform the following: namely, execute a second process, which, after traversing the storage resource pool with the lowest level, if the surplus resource count is still not zero, sets the second-to-last level as the target level, traverses the storage resource pool at the target level, sets one of the storage resource pools that has the smallest deficit after satisfying the surplus resource count with the number of resources of the target common type from the untraversed storage resource pools, sets one of the storage resource pools as the seed resource pool, updates the surplus resource count with the number of resources that still do not satisfy the surplus resource count after satisfying the number of resources of the target common type, and continues this process until the traversal in the storage resource pool at the target level is complete, and then repeats the second process, updating the target level at the level one level above the target level until the highest level is reached.
[0269] Optionally, the first decision unit 3330 is used to specifically perform the following: when each candidate resource combination corresponds to one seed resource pool, obtain the level of the seed resource pool corresponding to each candidate resource combination; and determine the seed resource pool with the lowest level among the seed resource pools corresponding to each candidate resource combination as the target resource pool.
[0270] Optionally, the first decision unit 3330 is used to specifically perform the following: if there are two or more seed resource pools with the lowest level, determine the scheduling return amount for two or more seed resource pools and determine the target resource pool based on the scheduling return amount; and if the scheduling return amounts for two or more seed resource pools are the same, determine the target resource pool based on the resource pool type of two or more seed resource pools.
[0271] Optionally, the first decision unit 3330 is used to do the following: if some of the candidate resource combinations correspond to multiple seed resource pools, to designate the seed resource pool with the highest level among the multiple seed resource pools as the post-selection seed resource pool; for the other parts of the candidate resource combinations corresponding to a single seed resource pool, to designate a single seed resource pool as the post-selection seed resource pool; and to determine the seed resource pool with the lowest level among the post-selection seed resource pools corresponding to each of the candidate resource combinations as the target resource pool.
[0272] Optionally, the resource scheduling device 3300 further includes the following:
[0273] Task receiving unit (not shown in Figure 33): Used to receive resource scheduling requests for multiple tasks, the multiple tasks include the target task; Queue generation unit (not shown in Figure 33): Used to place multiple of the aforementioned tasks into a task queue for queuing; and Task extraction unit (not shown in Figure 33): Used to extract tasks from the task queue in order from front to back, and after the execution of the currently extracted task is completed, the next task is extracted.
[0274] Optionally, the queue generation unit (not shown in Figure 33) is used to specifically perform the following: obtain the priority level indicator of each of the multiple tasks; and arrange the multiple tasks in the task queue based on the priority level indicator.
[0275] Optionally, the resource scheduling device 3300 further includes the following:
[0276] Second decision unit (not shown in Figure 33): Used to determine the number of resources of each type required for multiple tasks in the task queue; First Computation Unit (not shown in Figure 33): Used to obtain the total number of first resources of a given type for each resource, by calculating the sum of the number of resources of that type required for multiple tasks; Second computing unit (not shown in Figure 33): Used to calculate the sum of the number of resources of that type in the multilevel resource pool and to obtain the total number of second resources of that type; Resource replenishment unit (not shown in Figure 33): Used to send replenishment requests to the reserve resource library and to replenish resources in the multilevel resource pool when the total number of first resources is greater than the total number of second resources.
[0277] Optionally, the resource replenishment unit (not shown in Figure 33) is used to specifically perform the following: determine the difference between the total number of first resources and the total number of second resources; determine the number of replenishment resources based on the difference and a predetermined multiple; and send the number of replenishment resources to the spare resource library as a replenishment request to the multilevel resource pool to replenish the number of resources.
[0278] Optionally, the resource scheduling method is executed by a target computing node among a plurality of candidate computing nodes, and the target computing node is selected from the plurality of candidate computing nodes in the following manner: that is, the processing capacity of the plurality of candidate computing nodes is obtained; the number of assigned tasks for the plurality of candidate computing nodes is obtained; and the target computing node is selected from the plurality of candidate computing nodes based on the processing capacity and the number of assigned tasks.
[0279] Optionally, the number of candidate compute nodes is periodically changed in the following manner: that is, the total number of tasks in the resource platform in the current cycle is obtained; and the number of candidate compute nodes is determined based on the total number of tasks.
[0280] Optionally, the resource scheduling device 3300 further includes the following:
[0281] Second acquisition unit: Used to obtain the resource pool water level information library, resource pool location information library, task resource relationship library, and calculation instruction library; Water level model construction unit (not shown in Figure 33): Used to construct the resource pool water level information library as a water level model, the resource pool location information library as a distribution location model, the task resource relationship library as a resource model, and the calculation instruction library as a calculation model.
[0282] The first acquisition unit 3310 is used specifically to perform the following: namely, to invoke the resource model using the calculation model and to acquire a plurality of candidate resource combinations corresponding to the target task in response to the resource scheduling request.
[0283] The resource search unit 3320 is specifically used to perform the following: determine the location of each level of the resource pool according to the distribution location model using the calculation model, call the water level model, and determine the seed resource pool corresponding to the candidate resource combination.
[0284] The first decision unit 3330 is used specifically to perform the following: namely, to determine a target resource pool from a plurality of seed resource pools to satisfy the resource scheduling request using the calculation model.
[0285] Optionally, the resource search unit 3320 is used to specifically perform the following: receive call requests for the target domain name of the water level model, of which the target domain name is shared by the main water level model and the backup water level model; forward the call requests to the main water level model for execution when the main water level model is working normally; and forward the call requests to the backup water level model for execution when the main water level model fails.
[0286] Referring to Figure 34, which is a partial block diagram of a terminal 140 that implements a resource scheduling method for content recommendation in an embodiment of the present disclosure. The terminal includes components such as an RF (Radio Frequency) circuit 3410, a memory 3415, an input unit 3430, a display unit 3440, a sensor 3450, an audio circuit 3460, a WiFi (wireless fidelity) module 3470, a processor 3480, and a power supply 3490. As those skilled in the art will understand, the terminal configuration shown in Figure 34 is not limited to a mobile phone or a computer, and may include more or fewer components than shown, or may be a combination of some components, or may employ a different component layout.
[0287] The RF circuit 3410 receives and transmits signals during the information transmission / reception or call process. In particular, it receives downlink information from the base station and passes it to the processor 3480 for processing, and is also used to transmit uplink data to the base station.
[0288] The memory unit 3415 is used to store software programs and modules, and the processor 3480 executes the software programs and modules stored in the memory unit 3415 to apply various functions of the terminal and process data.
[0289] The input unit 3430 is used to receive input digital or character information and to generate key signal inputs related to terminal installation and function control. Specifically, the input unit 3430 may include a touch panel 3431 and other input devices 3432.
[0290] The display unit 3440 is used to display input information or provided information and various menus of the terminal. The display unit 3440 may also include a display panel 3441.
[0291] The audio circuit 3460, speaker 3461, and voice transmitter 3462 can provide an audio interface.
[0292] In this embodiment, the processor 3480 included in the terminal can execute the resource scheduling method for content recommendation described in the above embodiment.
[0293] The terminals in the embodiments of this disclosure may include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, in-vehicle terminals, and aerospace equipment. The embodiments of this disclosure can be applied to a variety of scenarios, which may include, but are not limited to, artificial intelligence, big data, and data processing.
[0294] Referring to Figure 35, which is a block diagram of a partial configuration of a server for a resource scheduling method for content recommendation in an embodiment of the present disclosure. The server 110 may vary considerably depending on the configuration and performance, and may include one or more central processing units (CPUs) 3522 (e.g., one or more processors), a memory 3532, and a storage medium 3530 (e.g., one or more mass storage devices) for storing one or more application programs 3542 or data 3544. Of these, the memory 3532 and the storage medium 3530 may be temporary or permanent. The programs stored in the storage medium 3530 may include one or more modules (not shown), each module may include operations for a set of instructions in the server 3500. Furthermore, the central processing unit 3522 is configured to communicate with the storage medium 3530 so that the server 3500 can execute a set of instruction operations in the storage medium 3530.
[0295] The server 3500 further includes one or more power supplies 3526, one or more wired or wireless network interfaces 3550, one or more input / output interfaces 3558, and / or one or more operating systems 3541, for example, Windows Server. TM Mac OS X TM Unix TM、 Linux TM FreeBSD TMThis includes, among others.
[0296] The processor in server 3500 may be used to perform the resource scheduling method for content recommendation in the embodiments of this disclosure.
[0297] In embodiments of the present disclosure, a computer-readable storage medium is further provided, which is used to store a computer program, and the computer program is used to execute the resource scheduling method in each of the embodiments described above.
[0298] In embodiments of this disclosure, a computer program product is further provided, which includes a computer program. The processor of the computer equipment retrieves and executes the computer program, thereby enabling the computer equipment to implement the resource scheduling method described above.
[0299] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and drawings of this disclosure are used to distinguish similar subjects and do not necessarily represent a specific order or sequence. To make it clear, the data used herein may be interchangeable where appropriate, thereby allowing the embodiments of this disclosure described herein to be carried out, for example, in an order other than that illustrated or described herein. Furthermore, the terms “includes” and “has” and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus including a series of steps or units is not necessarily limited to the steps or elements expressly enumerated, and may include other steps or elements not expressly enumerated or specific to such process, method, product, or apparatus.
[0300] To ensure clarity, in this disclosure, “at least one (paragraph 1)” means one or more, and “multiple” means two or more. “And / or” is used to describe the relationship between related objects, indicating that there are three types of relationships. For example, “A and / or B” means that only A exists, only B exists, and A and B exist simultaneously, where A and B may be singular or plural. The letter “ / ” generally means that the preceding and succeeding related objects have an “or” relationship. “At least one (paragraph 1)” or similar expressions means any combination of these paragraphs, including any combination of one or more paragraphs. For example, at least one of a, b, or c may be expressed as a, b, c, “a and b”, “a and c”, “b and c”, or “a and b and c”, where a, b, and c may be singular or plural.
[0301] In some embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatus, and methods can be implemented in other ways. For example, the embodiments of the apparatus described above are merely schematic. For example, the division of units is merely a logical functional division. In actual implementations, other division methods may exist, such as connecting multiple units or assemblies or connecting them to another system. Also, some functions may be ignored or not performed. Furthermore, the interconnections, direct connections, or communication connections illustrated or described may also be indirect connections or communication connections via electrical, mechanical, or other forms of interfaces, devices, or units.
[0302] Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the objectives of this embodiment, depending on the actual needs.
[0303] Furthermore, the functional units in the various embodiments of this disclosure may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated unit may be implemented in the form of a hardware or software functional unit.
[0304] The integrated unit may be implemented in the form of a software functional unit and stored on a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solutions of the present disclosure, either in essence or in part with respect to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored on a storage medium and includes a number of instructions for enabling a computer device (such as a personal computer, server, or network device) to perform all or part of the steps of various embodiments of the present disclosure. The aforementioned storage mediums include U disks, mobile hard disks, read-only memory (ROM), random access memory (RAM), disks or optical disks, and other media capable of storing program code.
[0305] Furthermore, it should be understood that the various implementations provided in the embodiments of this disclosure can be arbitrarily combined to achieve different technical effects.
[0306] While preferred embodiments of this application have been described above, this application is not limited to these embodiments, and any modifications to this application that do not deviate from the spirit of this application fall within the technical scope of this application.
Claims
1. A method for scheduling resources, which is performed by a resource scheduling server, Steps include obtaining a plurality of candidate resource combinations corresponding to a target task in response to a resource scheduling request for the target task, wherein each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources for that target resource; For each candidate resource combination, a search is performed on each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, based on the at least one type of target resource and the number of target resources, to determine the seed resource pool corresponding to the candidate resource combination; and A method comprising the step of determining a target resource pool to satisfy the resource scheduling request from a plurality of seed resource pools based on the level of the seed resource pool corresponding to each of the candidate resource combinations.
2. The method according to claim 1, Each of the multilevel resource pools includes multiple storage resources of multiple common types, and the number of resources of the multiple storage resources of the multiple common types. For each candidate resource combination, the step of searching each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, based on the at least one type of target resource and the number of target resources, and determining the seed resource pool corresponding to the candidate resource combination is as follows: A method comprising the steps of: for each candidate resource combination, searching each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, based on the at least one type of target resource and the number of target resources; and determining the seed resource pool from the resource pools awaiting consideration if the number of target resources for each type of target resource can be satisfied by a single number of resources of the common type in the multilevel resource pool.
3. The method according to claim 2, The step of determining the seed resource pool from the aforementioned resource pool awaiting consideration is: The step of determining the aforementioned resource pool awaiting consideration as the seed resource pool when there is one such resource pool; and A method comprising the step of determining a seed resource pool based on the levels of two or more of the aforementioned resource pools awaiting consideration, when there are two or more such resource pools awaiting consideration.
4. The method according to claim 3, When there are two or more resource pools awaiting consideration, the step of determining the seed resource pool based on the levels of the two or more resource pools awaiting consideration is: If there are two or more resource pools awaiting consideration, the step of determining the resource pool with the lowest level among the two or more such resource pools awaiting consideration as the seed resource pool; If there are two or more resource pools awaiting consideration, and the levels of the two or more such resource pools are the same, the steps are to determine the scheduling return amount for the two or more such resource pools and to determine the seed resource pool based on the scheduling return amount; and A method comprising the step of determining the seed resource pool based on the resource pool type of the two or more resource pools awaiting consideration, when the scheduling return amounts of the two or more resource pools awaiting consideration are the same.
5. The method according to claim 4, Determining the scheduling return amount for the two or more resource pools awaiting consideration is: Steps to obtain the resource container capacity of multiple resource containers in the aforementioned resource pool awaiting consideration; A step of sorting the multiple resource containers in order from the largest to the smallest resource container capacity; The step of determining the resource container with the highest rank in the sorting results as the resource container awaiting consideration, and determining the number of target resources as the number of unscheduled resources; A step of executing a first process, the first process including updating the number of unscheduled resources by the remainder of “the number of unscheduled resources” mod “the resource container capacity of the resource container awaiting consideration”, and updating the resource container awaiting consideration with the next resource container in the sorting result; The first process is repeated until the aforementioned resource container awaiting consideration is empty; and A method comprising the step of determining the scheduling return amount based on the number of unscheduled resources.
6. The method according to claim 5, The step of determining the scheduling return amount based on the number of unscheduled resources is: Steps to obtain the number of discrete resources in the resource pool awaiting consideration; If the number of discrete resources is greater than the number of unscheduled resources, the step of determining the scheduling return amount to be 0; A method comprising the step of obtaining the scheduling return amount by subtracting the number of unscheduled resources from the resource container capacity of the lowest-ranked resource container in the sorting result, when the number of discrete resources is less than or equal to the number of unscheduled resources.
7. The method according to claim 1, The step of determining a target resource pool to satisfy the resource scheduling request from a plurality of seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination is: When each candidate resource combination corresponds to one seed resource pool, the step of obtaining the level of the seed resource pool corresponding to each candidate resource combination; and A method comprising the step of determining the seed resource pool with the lowest level among the seed resource pools corresponding to each candidate resource combination as the target resource pool.
8. The method according to claim 7, The step of determining the seed resource pool with the lowest level among the seed resource pools corresponding to each candidate resource combination as the target resource pool is: If there are two or more seed resource pools with the lowest level, the steps of determining the scheduling return amount for two or more seed resource pools and determining the target resource pool based on the scheduling return amount; and A method comprising the step of determining the target resource pool based on the resource pool type of the two or more seed resource pools when the scheduling return amounts of the two or more seed resource pools are the same.
9. The method according to claim 1, The step of determining a target resource pool to satisfy the resource scheduling request from a plurality of seed resource pools based on the level of the seed resource pool corresponding to each candidate resource combination further includes: If some of the candidate resource combinations correspond to multiple seed resource pools, the step of acquiring the seed resource pool with the highest level among the multiple seed resource pools as the selected seed resource pool, and for the other parts of the candidate resource combinations corresponding to a single seed resource pool, the step of making the single seed resource pool the selected seed resource pool; and A method comprising the step of determining the seed resource pool with the lowest level among the selected seed resource pools corresponding to each candidate resource combination as the target resource pool.
10. The method according to claim 1, Before the step of obtaining a plurality of candidate resource combinations corresponding to the target task in response to the resource scheduling request for the target task, the method further: A step of receiving resource scheduling requests for multiple tasks, wherein the multiple tasks include the target task; The steps of queuing multiple aforementioned tasks by placing them in a task queue; and A method comprising the step of retrieving tasks from the task queue in order from front to back, wherein, after the execution of the currently retrieved task is completed, the next task is retrieved.
11. The method according to claim 10, The step of queuing multiple aforementioned tasks by placing them in a task queue is: A step of obtaining a priority level indicator for each of the tasks among the multiple tasks; and A method comprising the step of arranging a plurality of the tasks in the task queue based on the priority level indicator.
12. The method according to claim 10, After the step of queuing multiple tasks by placing them in a task queue, the method further: A step of determining the number of resources of each type of resource required for multiple tasks in the task queue; For each type of resource, the sum of the number of resources of that type required for multiple tasks is calculated, and the total number of first resources of that type is obtained; A step of calculating the sum of the number of resources of that type in the multilevel resource pool and obtaining the total number of second resources of that type; and A method comprising the step of sending a replenishment request to a reserve resource library to replenish resources in the multilevel resource pool when the total number of first resources is greater than the total number of second resources.
13. The method according to claim 1, The above method is executed by a target computing node among a plurality of candidate computing nodes, and the target computing node is selected from the plurality of candidate computing nodes in the following manner, namely, Obtain the processing power of multiple candidate computing nodes; Obtain the number of assigned tasks for multiple candidate computing nodes; and A method for selecting a target compute node from a plurality of candidate compute nodes based on the processing capacity and the number of assigned tasks.
14. The method according to claim 13, The target computing node includes a master target computing node and a slave target computing node, and the plurality of candidate computing nodes include a first set of candidate computing nodes and a second set of candidate computing nodes. The step of selecting the target compute node from a plurality of candidate compute nodes based on the processing capacity and the number of assigned tasks is: A method comprising the steps of determining the master target computing node from the first set of candidate computing nodes based on the processing capacity and the number of assigned tasks, and determining the slave target computing node from the second set of candidate computing nodes.
15. The method according to claim 13, The number of candidate computing nodes is periodically changed in the following manner, namely, Get the total number of tasks in the current cycle of the resource platform; and A method for determining the number of candidate computing nodes based on the total number of tasks.
16. The method according to claim 1, Before the step of obtaining a plurality of candidate resource combinations corresponding to the target task in response to the resource scheduling request for the target task, the method further: Steps to obtain the resource pool water level information library, the resource pool location information library, the task resource relationship library, and the calculation instruction library; and The step includes constructing the resource pool water level information library as a water level model, the resource pool location information library as a distribution location model, the task resource relationship library as a resource model, and the calculation instruction library as a calculation model, The step of obtaining a plurality of candidate resource combinations corresponding to the target task in response to a resource scheduling request for the target task is: The calculation model is used to call the resource model and, in response to the resource scheduling request, to obtain a plurality of candidate resource combinations corresponding to the target task, Performing a search on each resource pool in the multilevel resource pool in order from the lowest level to the highest level is: The calculation model determines the location of the resource pool at each level according to the distribution location model, calls the water level model, and determines the seed resource pool corresponding to the candidate resource combination, The step of determining a target resource pool to satisfy the resource scheduling request from a plurality of seed resource pools is: A method comprising the step of determining a target resource pool to satisfy the resource scheduling request from a plurality of seed resource pools using the calculation model described above.
17. A device for scheduling resources, A first acquisition unit used to acquire a plurality of candidate resource combinations corresponding to a target task in response to a resource scheduling request for the target task, wherein each candidate resource combination includes at least one type of target resource required for the target task and the number of target resources of the target resource; A resource search unit used to determine a seed resource pool corresponding to the candidate resource combination by performing a search on each resource pool in the multilevel resource pool in order from low level to high level according to a predetermined level of the multilevel resource pool, based on the at least one type of target resource and the number of target resources for each candidate resource combination; and Apparatus including a first decision unit used to determine a target resource pool from a plurality of seed resource pools to satisfy the resource scheduling request, based on the level of the seed resource pool corresponding to each of the candidate resource combinations.
18. It is an electronic device, A memory device that stores computer programs; and Includes a processing unit connected to the memory, The processing device is an electronic device configured to implement the method described in any one of claims 1 to 16 by executing the computer program.
19. A program for causing a computer to perform the method described in any one of claims 1 to 16.