Resource allocation method, device and server

By querying and matching resource cards in the resource pool, dividing and allocating resource cards, the problem of high resource fragmentation in the existing technology is solved, and AI training efficiency and resource utilization are improved.

CN112433855BActive Publication Date: 2025-02-07TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011407042.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-04
Publication Date
2025-02-07
Estimated Expiration
2040-12-04

AI Technical Summary

Technical Problem

In the prior art, the resource pre-match method results in a high amount of resource fragmentation, affecting the efficiency of AI training.

Method used

By generating multiple resource allocation tasks, query the free resource card corresponding to the resource card capacity in the resource pool for each task. If it is not matched, select the target free resource card and divide it into the target resource card and the fragmented resource card. And assign the target resource card to the task, and update the fragment resource card to the resource pool for use by other tasks.

Benefits of technology

Reduce the generation of resource fragments, improve the efficiency of AI training, and improve the utilization rate of resources through reasonable scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112433855B_ABST
    Figure CN112433855B_ABST
Patent Text Reader

Abstract

The present application provides a resource allocation method, device, and server. The method first generates multiple resource allocation tasks according to a resource allocation request, and then allocates resource cards to each resource allocation task one by one. When no idle resource card corresponding to the current resource allocation task is found in the resource pool, the target idle resource card is selected according to a preset method, and the target idle resource card is divided into a target resource card and a fragment resource card corresponding to the current resource allocation task. Finally, the target resource card is allocated to the current resource allocation task, and the fragment resource card is updated to the resource pool in time for other resource allocation tasks to call. When matching resource cards, the present application decomposes a resource request into multiple tasks to match resources one by one, and reasonably schedules resources according to the task requirements of the remaining unmatched resource cards, thereby enhancing the training efficiency of artificial intelligence and reducing the generation of resource fragments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a resource allocation method, device, and server. Background Art

[0002] With the development of science and technology, AI (Artificial Intelligence) technology is increasingly widely used. AI technology is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. At present, AI is widely used in training. When AI training is performed, a certain amount of GPU (Graphics Processing Unit) computing power resources are required. When the computing power platform system service business runs AI training, it will provide users with GPU computing power resources according to the user's resource allocation request. In order to evaluate whether the idle resources can meet the needs of the business, before delivering the GPU computing power resources, the amount of GPU cards required by the business will be matched and judged in advance. If the resource requirements of the business can be met, the production operation will be issued. The process of pre-evaluating and judging idle resources is called pre-matching. The amount of resource fragments generated by different resource pre-matching methods (a single GPU resource card with a capacity of less than 8 is called a fragment) will be different, and the resource pre-matching method in the prior art will increase the amount of resource fragments. Summary of the invention

[0003] The embodiments of the present application provide a resource allocation method, device, and server to alleviate the technical problem of high resource fragmentation in current technologies.

[0004] To solve the above technical problems, the present application provides the following technical solutions:

[0005] A resource allocation method, comprising:

[0006] Generate multiple resource allocation tasks according to a resource allocation request; the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required capacity of resource cards;

[0007] For a current resource allocation task among the multiple resource allocation tasks, query a free resource card of a corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, determine the current resource allocation task as an unmatched resource allocation task;

[0008] Selecting a target idle resource card for the unmatched resource allocation task according to a preset method;

[0009] Dividing the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task;

[0010] Allocating the target resource card to the unmatched resource allocation task;

[0011] The fragment resource card is updated as an idle resource card to the resource pool.

[0012] A resource allocation device, comprising:

[0013] A task generation module, used to generate multiple resource allocation tasks according to a resource allocation request; the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required resource card capacities;

[0014] A resource query module is used to query a free resource card of a corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task among the multiple resource allocation tasks; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, the current resource allocation task is determined as an unmatched resource allocation task;

[0015] A resource matching module, used for selecting a target idle resource card for the unmatched resource allocation task according to a preset method;

[0016] A resource splitting module, used for dividing the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task;

[0017] A resource allocation module, used to allocate the target resource card to the unmatched resource allocation task;

[0018] The resource updating module is used to update the fragmented resource card as an idle resource card to the resource pool.

[0019] In one embodiment, the resource allocation device further includes:

[0020] A resource pool division module, used for dividing the resource pool into at least two characteristic resource pools and a mixed resource pool according to the capacity characteristics of the resource card capacity of each idle resource card in the resource pool; the different characteristic resource pools include idle resource cards with different capacity characteristics, and the mixed resource pool includes all idle resource cards;

[0021] The resource update module is used to update the fragment resource card as an idle resource card to the corresponding characteristic resource pool according to the capacity characteristics of the resource card capacity of the fragment resource card.

[0022] In one embodiment, the resource query module is used to: determine the target characteristic resource pool corresponding to the current resource allocation task based on the capacity characteristics of the resource card capacity of the current resource allocation task; query the target characteristic resource pool for the free resource card corresponding to the required capacity of the resource card; if the free resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, it is determined that the free resource card corresponding to the required capacity of the resource card of the current resource allocation task is not queried from the resource pool.

[0023] In one embodiment, the resource query module is used to: query the target feature resource pool for idle resource cards whose resource card capacity is the same as the required capacity of the resource card; if no corresponding idle resource card is found, it is determined that no idle resource card corresponding to the required capacity of the resource card is found in the target feature resource pool.

[0024] In one embodiment, the resource query module is used to: query the target feature resource pool for idle resource cards whose resource card capacity is greater than the required capacity of the resource card; if no corresponding idle resource card is found, it is determined that an idle resource card corresponding to the required capacity of the resource card has not been found in the target feature resource pool.

[0025] In one embodiment, the resource matching module is used to: determine a candidate resource pool from the mixed resource pool or the non-target feature resource pool according to the preset resource pool selection method; and select the target idle resource card from the candidate resource pool for the unmatched resource allocation task according to the preset resource card selection method.

[0026] In one embodiment, the resource matching module is used to: select an idle resource card whose resource card capacity is greater than the required capacity of the resource card from the candidate resource pool and determine it as a candidate idle resource card; and determine the target idle resource card from the candidate idle resource cards according to the preset resource card selection method.

[0027] In one embodiment, the resource matching module is used to: obtain the total required capacity of resource cards of multiple or all unmatched resource allocation tasks; select idle resource cards whose resource card capacity is greater than or equal to the total required capacity of resource cards from the candidate resource pool, and determine them as candidate idle resource cards; and determine the target idle resource card from the candidate idle resource cards according to the preset resource card selection method.

[0028] An embodiment of the present application provides a server, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned resource allocation method when executing the computer program.

[0029] The embodiment of the present application also provides a computer-readable storage medium, which stores processor-executable instructions, and the instructions are loaded by one or more processors to execute the above-mentioned resource allocation method.

[0030] An embodiment of the present application provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the above method.

[0031] Beneficial effect: The embodiment of the present application provides a resource allocation method, device, and server. Based on this method, after the user makes a GPU resource allocation request, multiple resource allocation tasks are first generated according to the resource allocation request, and then resource cards are allocated to each resource allocation task one by one. When the idle resource card corresponding to the current resource allocation task is not found in the resource pool, a target idle resource card is selected according to a preset method, and the target idle resource card is divided into a target resource card and a fragment resource card corresponding to the current resource allocation task. Finally, the target resource card is allocated to the current resource allocation task, and the fragment resource card is updated to the resource pool in time for other resource allocation tasks to call. The present application matches resources one by one when matching resource cards, and reasonably schedules resources according to the task requirements of the remaining resource cards that have not been matched, thereby enhancing the training efficiency of artificial intelligence and reducing the generation of resource fragments. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0033] Figure 1 A schematic diagram of a scenario of a resource allocation system provided in an embodiment of the present application.

[0034] Figure 2 A first flow chart of a resource allocation method provided in an embodiment of the present application.

[0035] Figure 3 A second flow chart of the resource allocation method provided in an embodiment of the present application.

[0036] Figure 4 A third flow chart of the resource allocation method provided in an embodiment of the present application.

[0037] Figure 5A fourth flow chart of the resource allocation method provided in an embodiment of the present application.

[0038] Figure 6 A schematic diagram of a flow chart of a preset resource card selection method provided in an embodiment of the present application.

[0039] Figure 7 A schematic diagram of the structure of a resource allocation device provided in an embodiment of the present application.

[0040] Figure 8 A schematic diagram of the first distribution of the resource pool provided in an embodiment of the present application.

[0041] Fig. 9 A second distribution diagram of the resource pool provided in an embodiment of the present application.

[0042] Fig.10 A third distribution diagram of the resource pool provided in an embodiment of the present application.

[0043] Fig.11 A fourth distribution diagram of the resource pool provided in an embodiment of the present application.

[0044] Fig.12 A schematic diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0046] The embodiment of the present application provides a resource matching method, device, server and computer-readable storage medium. The resource matching device can be integrated in the server.

[0047] In an embodiment of the present application, a resource allocation request refers to a resource allocation request issued by a user at a requesting terminal, such as requesting two resource cards with a capacity of 3, wherein the resource allocation request for two resource cards with a capacity of 3 generates two resource allocation tasks, resource allocation task 1: one resource card with a capacity of 3; resource allocation task 2: one resource card with a capacity of 3.

[0048] In the embodiment of the present application, the capacity of a single resource card is one of eight capacity types: 1, 2, 3, 4, 5, 6, 7, and 8.

[0049] In the embodiment of the present application, the idle resource card refers to a resource card that can be used in the resource pool, and the target idle resource card refers to a resource card that can be used to meet the current resource allocation task.

[0050] In an embodiment of the present application, an unmatched resource allocation task refers to a situation in which no idle resource card corresponding to the resource card demand capacity of the current resource allocation task is found in the resource pool. In this case, the current resource allocation task is an unmatched resource allocation task. For example, the current resource allocation task is: 1 resource card with a capacity of 3. When there is no idle resource card with a capacity of 3 or a capacity greater than 3 in the resource pool, the current resource allocation task is an unmatched resource allocation task.

[0051] In an embodiment of the present application, the target idle resource card is divided into a target resource card corresponding to the current resource allocation task and a fragment resource card, wherein the target resource card refers to a resource card that can meet the current resource allocation task and whose resource capacity is exactly equal to the resource card capacity corresponding to the current resource allocation task, and the fragment resource card refers to the resource card remaining after the target resource card is assigned to the current resource allocation task, for example; the current resource allocation task is: 1 resource card with a capacity of 3, and the idle resource card in the resource pool is 1 resource card with a capacity of 5, then, at this time, the resource card with a capacity of 5 is the target idle resource card, and the resource card with a capacity of 5 is divided into two parts, one part corresponds to the target resource card with 3 / 5 of the capacity of the resource card, and the other part corresponds to the fragment resource card with 2 / 5 of the capacity of the resource card.

[0052] The resources involved in this application may be various resources, and the following description will take the GPU resource as an example.

[0053] For the convenience of explanation, a single GPU resource card with a capacity of 1 is called A card (fragmented resource). For example, A card includes 10 resource cards marked as A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, etc., among which the capacity of GPU resource cards such as A1 card to A10 is the same, all of which are 1 card; similarly, a single GPU card with a card capacity of 2 is called B card (fragmented card resource), and B card includes 10 resource cards marked as B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, etc. Cards, among which, B1 card, B2 card, B3 card, B4 card, B5 card and other cards have the same capacity, all of which are 2; a single GPU card with a card capacity of 3 is called a C card (fragment resource), and a C card includes 10 resource cards marked as C1, C2, C3, C4, C5, C6, C7, C8, C9, and C10. As mentioned above, C1 card, C2 card, C3 card, C4 card, C5 card and other cards have the same capacity, all of which are 3; a single GPU card with a card capacity of 4 is called a D card (fragment resource), and a D card includes 10 resource cards marked as D1, D2, D3, D4, D There are 10 resource cards, including D1, D2, D3, D4, and D5. The capacity of these cards is the same, which is 4. A single GPU card with a card capacity of 5 is called an E card (fragmented resource). The E card includes 10 resource cards marked as E1, E2, E3, E4, E5, E6, E7, E8, E9, and E10. The capacity of these cards is the same, which is 5. A single GPU card with a card capacity of 6 is called an F card (fragmented resource). ,F cards include 10 resource cards marked as F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, etc., among which, F1 card, F2 card, F3 card, F4 card, F5 card, etc. have the same capacity, all 6; a single GPU card with a card capacity of 7 is called a G card (fragment resource), and G cards include 10 resource cards marked as G1, G2, G3, G4, G5, G6, G7, G8, G9, G10, etc., among which, G1 card, G2 card, G3 card, G4 card, G5 card, etc. have the same capacity, all 7;A single GPU card with 8 card capacity is called an H card (whole card resource). H cards include 10 resource cards marked as H1, H2, H3, H4, H5, H6, H7, H8, H9, and H10. Among them, H1 card, H2 card, H3 card, H4 card, H5 card, etc. have the same capacity, which is 8. Among them, each resource card corresponds to a different address. Here, A card is divided into A1 card, A2 card, A3 card, A4 card, etc. just to illustrate that their corresponding addresses in the resource pool are different, which is convenient to distinguish them. There is no essential difference. Similarly, B card, C card, D card, E card, F card, G card, and H card are separated just for convenience of explanation. For example: According to the regulations, the physical hardware address of the A1 card is 0XX00X001-0XX00X010, the physical hardware address of the A2 card is 0XX00X011-0XX00X020, the physical hardware address of the A3 card is 0XX00X021-0XX00X030, and so on. The physical hardware address of the A10 card is 0XX00X091-0XX00X0100; the physical hardware address of the B1 card is 1XX00X001-1XX00X010, the physical hardware address of the B2 card is 1XX00X011-1XX00X020, and the physical hardware address of the B3 card is 1XX00X021-1XX00X030. X00X030, and so on. The physical hardware address of the B10 card is 1XX00X091-1XX00X0100; the physical hardware address of the C1 card is 2XX00X001-2XX00X010, the physical hardware address of the C2 card is 2XX00X011-2XX00X020, the physical hardware address of the C3 card is 2XX00X021-2XX00X030, and so on. The physical hardware address of the C10 card is 2XX00X091-2XX00X0100; the physical hardware address of the D1 card is 3XX00X001-3XX00X010, and the physical hardware address of the D2 card is 3 XX00X011-3XX00X020, the physical hardware address of the D3 card is 3XX00X021-3XX00X030, and so on, the physical hardware address of the D10 card is 3XX00X091-3XX00X0100; the physical hardware address of the E1 card is 4XX00X001-4XX00X010, the physical hardware address of the E2 card is 4XX00X011-4XX00X020, the physical hardware address of the E3 card is 4XX00X021-4XX00X030, and so on, the physical hardware address of the E10 card is 4XX00X091-4XX00X0100;The physical hardware address of the F1 card is 5XX00X001-5XX00X010, the physical hardware address of the F2 card is 5XX00X011-5XX00X020, the physical hardware address of the F3 card is 5XX00X021-5XX00X030, and so on. The physical hardware address of the F10 card is 5XX00X091-5XX00X0100; the physical hardware address of the G1 card is 6XX00X001-6XX00X010, the physical hardware address of the G2 card is 6XX00X011-6XX00X020, and the physical hardware address of the G3 card is The physical hardware address of the G10 card is 6XX00X021-6XX00X030, and so on. The physical hardware address of the G10 card is 6XX00X091-6XX00X0100; the physical hardware address of the H1 card is 7XX00X001-7XX00X010, the physical hardware address of the H2 card is 7XX00X011-7XX00X020, the physical hardware address of the H3 card is 7XX00X021-7XX00X030, and so on. The physical hardware address of the H10 card is 7XX00X091-7XX00X0100. ;

[0054] See also Figure 1 , Figure 1 A scenario diagram of a resource allocation system provided in an embodiment of the present application is used for AI training of a computing platform system service business operation. Before delivering GPU computing resources, in order to evaluate whether the available resources in the GPU resource pool can meet the business needs, the resources in the GPU resource pool are pre-allocated. If the available resources can meet the allocation of business needs, the production operation is then executed. The system may include a request terminal and a server, and the terminal and the server are connected and communicated through the Internet composed of various gateways, etc., wherein the application scenario includes a request terminal 11 and a server 12; wherein:

[0055] The request terminal 11 sends a resource allocation request, wherein the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required resource card capacities;

[0056] The server 12 includes a local server and / or a remote server, etc.;

[0057] The request terminal 11 transmits the service request to the server 12 of the computing platform through a wired or wireless network.

[0058] Figure 5 A fourth flow chart of the resource allocation method provided in the embodiment of the present application is shown in FIG. Figure 5 As shown, in this embodiment, the resource allocation method provided by the present application includes the following steps:

[0059] 501: Generate N resource allocation tasks according to the resource allocation request.

[0060] For example: the request sent by the user request terminal 11 is: 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5. The server 12 of the computing power platform divides the user's resource allocation request into 3 tasks, among which Task 1: 1 resource card with a capacity of 3, Task 2: 1 resource card with a capacity of 3; Task 3: 1 resource card with a capacity of 5. At this time, N is equal to 3.

[0061] 502: The current resource allocation task is I, I=1.

[0062] For example, server 12 of the computing power platform begins to complete resource task matching. The first resource allocation task is I. Taking the above content as an example, I is task 1, that is, 1 resource card with a capacity of 3.

[0063] 503: Are there any resource cards in the resource pool that can meet the current resource allocation task?

[0064] For example: the server 12 of the computing power platform queries whether there are idle resource cards that meet the current resource allocation task in the resource pool according to the current resource allocation task. When the current resource allocation task is task 1, it queries whether there are idle resource cards that meet task 1.

[0065] 504: Satisfied the current assigned task.

[0066] For example, there is exactly one resource card in the current resource pool that can satisfy the currently assigned task, wherein the capacity of the resource card can be any one of 3, 4, 5, 6, 7, and 8.

[0067] 505:I=I+1.

[0068] For example: after the current task is completed, the value of I is increased by 1, that is, when Task 1: 1 resource card with a capacity of 3 is completed, the current assigned task becomes Task 2: 1 resource card with a capacity of 3.

[0069] 506: Update resource pool.

[0070] For example: after a resource card with a capacity of 5 satisfies a current resource allocation task with a capacity of 3, the remaining fragmented resources with a capacity of 2 are put back into the corresponding resource pool. For example: the resource pool is divided into an odd resource pool, an even resource pool and a mixed resource pool. A resource card with a capacity of 5 is placed in the odd resource pool before being allocated to the current resource allocation task. After being allocated to the current resource allocation task, the remaining fragmented resources with a capacity of 2 of the resource card with a capacity of 5 are placed in the even resource pool.

[0071] 507:I=N?

[0072] For example: determine whether the currently completed task is the last task. When the completed resource allocation task is task 3, I=N=3, indicating that the user's resource allocation request has been completed, and the resource allocation work is ended.

[0073] The following are Figure 5 A specific description of the content.

[0074] like Figure 5 The server 12 of the computing power platform shown first parses the received resource allocation request, and then parses to obtain the resource card capacity corresponding to the resource allocation request and the number of resource cards required corresponding to the capacity of each resource card, generates N resource allocation tasks according to the resource allocation request, and then allocates resource cards to each resource allocation task one by one, until all N resource allocation tasks are completed, and then sends the addresses corresponding to the resource cards assigned to all resource allocation tasks to the request terminal 11, and the request terminal obtains the requested resources in the area corresponding to the resource library according to the resource address. For example: the user's resource allocation request is: 2 resource cards with a capacity of 3, and there are 3 idle resource cards with a capacity of 3 in the resource pool, namely: C1, C2, C3, and the addresses corresponding to any two resource cards among C1, C2, and C3 are sent to the request terminal 11.

[0075] Among them, the specific steps of the server 12 of the computing power platform to allocate resource cards to the current resource allocation task are:

[0076] First, according to the resource card demand capacity of the current resource allocation task, the free resource card of the corresponding resource card capacity is queried from the resource pool; if the free resource card corresponding to the resource card demand capacity of the current resource allocation task is not found from the resource pool, the current resource allocation task is determined as an unmatched resource allocation task, and then a target free resource card is selected for the unmatched resource allocation task according to a preset method; finally, the target free resource card is divided into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task, the target resource card is allocated to the unmatched resource allocation task, and the fragment resource card is updated to the resource pool as a free resource card.

[0077] It should be noted that Figure 1 The resource allocation method scenario diagram shown is only an example. The server and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. A person of ordinary skill in the art will know that with the evolution of the system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems. The following are described in detail. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0078] See also Figure 2 , Figure 2 is a schematic diagram of a first flow chart of a resource allocation method provided in an embodiment of the present application, such as Figure 2 As shown, the resource allocation method provided in this embodiment includes:

[0079] 201: Generate multiple resource allocation tasks according to the resource allocation request.

[0080] Among them, the resource allocation request comes from the requesting terminal, and the user sends the resource allocation request on the requesting terminal. The resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity. The resource allocation task corresponds to a preset number of resource card required capacities.

[0081] In one embodiment, for example, a user needs two resource cards with a capacity of 3 cards, and the resource allocation request generated by the request terminal according to the user operation is: 2 resource cards with a capacity of 3, where 3 is the resource card capacity and 2 is the required number of resource cards corresponding to the resource card capacity. Then, the resource allocation request generates two resource allocation tasks, and each resource allocation task corresponds to a resource card with a capacity of 3.

[0082] 202: For a current resource allocation task among multiple resource allocation tasks, query the resource pool for free resource cards with corresponding resource card capacities according to the resource card demand capacity of the current resource allocation task; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is found from the resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0083] In one embodiment, the step of querying the resource pool for free resource cards corresponding to the resource card capacity required by the resource card of the current resource allocation task includes: first determining the target characteristic resource pool corresponding to the current resource allocation task based on the capacity characteristics of the resource card capacity of the current resource allocation task, wherein the resource pool may include: a mixed resource pool and at least two characteristic resource pools (refer to the description below), in which case the target characteristic resource pool is one of the characteristic resource pools; then querying the target characteristic resource pool for free resource cards corresponding to the resource card capacity required; if the free resource card corresponding to the resource card capacity required is not queried from the target characteristic resource pool, it is determined that the free resource card corresponding to the resource card capacity required by the current resource allocation task is not queried from the resource pool.

[0084] In one embodiment, in order to reduce resource fragmentation, only resource cards with the same capacity can be allocated. At this time, the step of querying the target characteristic resource pool for the idle resource card corresponding to the required capacity of the resource card includes: querying the target characteristic resource pool for the idle resource card with the same capacity as the required capacity of the resource card, if there is an idle resource card with the same capacity in the target resource pool, then the resource card with the same capacity is allocated to the current resource allocation task; if there is no idle resource card with the same capacity in the target resource pool, then it is determined that the idle resource card corresponding to the required capacity of the resource card has not been queried from the target characteristic resource pool. For example: user resource allocation request: 2 resource cards with a capacity of 3, then it is necessary to query whether there is an idle resource card with a capacity of 3 from the target resource pool, if there is no idle resource card with a capacity of 3 in the target resource pool, then it is determined that the idle resource card corresponding to the required capacity of the resource card has not been queried from the target characteristic resource pool, if there is an idle resource card with a capacity of 3 in the target resource pool, then it is directly allocated as the target idle resource card to the current resource allocation task.

[0085] In one embodiment, in order to increase the resource allocation speed, resource cards of the same capacity or large capacity can be allocated simultaneously. At this time, the step of querying the target characteristic resource pool for idle resource cards corresponding to the required capacity of the resource card can include: querying the target characteristic resource pool for idle resource cards whose capacity is greater than the required capacity of the resource card; if there is an idle resource card with a capacity greater than the required capacity of the resource card in the target resource pool, then the resource card with a capacity greater than the required capacity of the resource card is allocated to the current resource allocation task; if there is no idle resource card with a capacity greater than the required capacity of the resource card in the target resource pool, then it is determined that the idle resource card corresponding to the required capacity of the resource card has not been queried from the target characteristic resource pool. For example: User resource allocation request: 2 resource cards with a capacity of 3, then it is necessary to query from the target resource pool whether there are any idle resource cards with a capacity greater than 3, such as: resource cards with capacities of 4, 5, 6, 7, and 8; if there is any resource card with a capacity of 4, 5, 6, 7, or 8 in the target resource pool, it is determined that an idle resource card corresponding to the required capacity of the resource card is queried from the target characteristic resource pool, and a resource card with the minimum capacity that meets the current resource allocation task is selected from the idle resource cards and allocated to the current task; if there is no resource card with a capacity of 4, 5, 6, 7, or 8 in the target resource pool, it is determined that an idle resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool.

[0086] 203: Select a target idle resource card for the unmatched resource allocation task according to a preset method.

[0087] Among them, the preset methods include: preset resource pool selection method and preset resource card selection method, etc. The preset resource pool selection method is to determine the candidate resource pool from the mixed resource pool or the non-target feature resource pool, wherein the candidate resource pool can be a non-target feature resource pool or a mixed resource pool, and the specific resource pool is selected according to the preset preset resource pool selection method. The preset resource card selection method is to select the minimum capacity resource card that meets the current resource allocation task in the corresponding candidate resource pool and determine it as the target idle resource card.

[0088] like Figure 6 A schematic diagram of a preset resource card selection method process provided in an embodiment of the present application, wherein, Figure 6 As shown, this step includes:

[0089] 601: The idle resource cards in the candidate resource pool are sorted according to their capacity.

[0090] For example, there are 1 B card, 1 D card, and 1 F card in the candidate resource pool. They are arranged in order of capacity from small to large: BDF.

[0091] 602: The capacity of the resource card corresponding to the current resource allocation task is M.

[0092] For example: the request sent by the user request terminal 11 is: 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5. The server 12 of the computing power platform divides the user's resource allocation request into 3 tasks, among which Task 1: 1 resource card with a capacity of 3, Task 2: 1 resource card with a capacity of 3; Task 3: 1 resource card with a capacity of 5. When Task 1 is the current task, M is 3.

[0093] 603: Whether there is an idle resource card with a capacity of M in the candidate resource pool.

[0094] For example, when the current resource allocation task is task 1, a search is performed in the candidate resource pool to determine whether there is an idle resource card with a capacity of 3.

[0095] 604:M=M+1.

[0096] For example, when the current resource allocation task is Task 1, and there is no free resource card with a capacity of M in the candidate resource pool, the value of M is increased by 1, that is, a search is made in the candidate resource pool to see whether there is a free resource card with a capacity of 4. If there is no free resource card with a capacity of 4 in the candidate resource pool, M is increased by 1 again, that is, a search is made in the candidate resource pool to see whether there is a free resource card with a capacity of 5, and so on, until M is 8. If there is still no free resource card with a capacity of 8 in the candidate resource pool, the match ends and the matching is unsuccessful.

[0097] 605: Determine the resource card of the M specification as the target idle resource card.

[0098] For example, if an idle resource card with a capacity of 4 is found in the candidate resource pool, the resource card with a capacity of 4 is determined as the target idle resource card.

[0099] The following content is Figure 6 Specific description of the preset method. For the convenience of explanation, it is stipulated that the resource pool at this time is composed of an odd resource pool, an even resource pool and a mixed resource pool. For example: user resource allocation request: 2 resource cards with a capacity of 3, the idle resource cards in the resource pool are: 1 B card, 2 D cards, and 1 F card, and the idle resource cards in the resource pool are specifically: B1, D1, D2, and F1. Among them, the odd resource pool has no idle resource cards, the even resource pool has idle resource cards: 1 B card, 2 D cards, and 1 F card, and the mixed resource pool has idle resource cards: 1 B card, 2 D cards, and 1 F card. The user's resource allocation request for 2 resource cards with a capacity of 3 generates 2 tasks, wherein each task corresponds to the allocation demand of 1 resource card with a capacity of 3. Then, at this time, the target resource pool corresponding to the current resource allocation task is the odd resource pool, but the odd resource pool There is no idle resource card with a capacity of 3 or greater than 3, so the current resource allocation task is determined as an unmatched resource allocation task. The next step is to select the target idle resource card for the unmatched resource allocation task from the candidate resource pool. When the preset resource pool selection method is a non-target resource pool, the even-numbered resource pool is the candidate resource pool. Both the D card and the F card in the candidate resource pool can meet the current resource allocation task. At this time, it is necessary to select the D card or the F card as the target idle resource card according to the preset resource card selection method, because the capacity of the D card is 4 and the capacity of the F card is 6. Therefore, according to the preset resource card selection method, the D card is determined as the target idle resource card for the current resource allocation task. There are two D cards, D1 card and D2 card. Any one of them can be selected as the target idle resource card. Here, for the convenience of explanation, the D1 card is used as the target idle resource card.

[0100] When the preset resource pool selection method is a mixed resource pool, at this time, the mixed resource pool is the candidate resource pool, because the resource cards in the current mixed resource pool are exactly the same as those in the even resource pool, so the matching method is also the same as described above. The D card and F card in the candidate resource pool can meet the current resource allocation task. At this time, it is necessary to select the D card or the F card as the target idle resource card according to the preset resource card selection method, because the capacity of the D card is 4 and the capacity of the F card is 6. Therefore, according to the preset resource card selection method, the D card is determined as the target idle resource card for the current resource allocation task. There are two D cards, D1 card and D2 card. Any one of them can be selected as the target idle resource card. Here, for the convenience of explanation, the D1 card is used as the target idle resource card.

[0101] 204: Divide the target idle resource card into a target resource card corresponding to the unmatched resource allocation task and a fragment resource card.

[0102] Finally, the target idle resource card is divided into the target resource card and the fragment resource card corresponding to the unmatched resource allocation task, and then the target resource card is allocated to the unmatched resource allocation task. That is, the D1 card is divided into the D11 card with 3 / 4 of the D1 capacity and the D12 card with 1 / 4 of the D1 card capacity, the D11 card is used as the target resource card, and the D12 card is divided into the fragment resource card.

[0103] 205: Assign the target resource card to the unmatched resource allocation task.

[0104] Specifically, allocating the target resource card to the unmatched resource allocation task is to allocate the D11 card in the above example to the unmatched resource allocation task.

[0105] 206: Update the fragmented resource card as an idle resource card to the resource pool.

[0106] After allocating the addresses corresponding to the target resource cards in the target free resource cards to the unmatched resource allocation tasks, put the addresses corresponding to the remaining fragmented resource cards back into the corresponding resource pools. Taking the above content as an example, the D12 card is a fragmented resource card, and the capacity of the D12 card is 1. Therefore, the D12 card needs to be updated as a free resource card to the odd resource pool. After completing the current resource allocation task, the free resource cards in the odd resource pool are: D12 card, the free resource cards in the even resource pool are D2 card and F1 card, and the free resource cards in the mixed resource pool are: D12 card, D2 card, F1 card.

[0107] In one embodiment, in order to improve the matching rate, the resource pool can be subdivided. Figure 2 The method shown in the figure also includes, before the step of generating multiple resource allocation tasks according to the resource allocation request, dividing the resource pool into at least two characteristic resource pools and a mixed resource pool according to the capacity characteristics of the resource card capacity of each idle resource card in the resource pool; different characteristic resource pools include idle resource cards with different capacity characteristics, and the mixed resource pool includes all idle resource cards. At this time, the step of updating the fragment resource card as an idle resource card to the resource pool includes: updating the fragment resource card as an idle resource card to the corresponding characteristic resource pool according to the capacity characteristics of the resource card capacity of the fragment resource card.

[0108] See also Figure 8 , Figure 8 The first distribution diagram of the resource pool provided in the embodiment of the present application divides the resource pool into a first characteristic resource pool, a second characteristic resource pool and a mixed resource pool. Fig. 9 , Fig. 9 A second distribution diagram of the resource pool provided in an embodiment of the present application, specifically, the first characteristic resource pool and the second characteristic resource pool are divided into odd resource pools and even resource pools according to the capacity of the resource cards, resource cards with capacities of 1, 3, 5, and 7 are placed in the odd resource pool, resource cards with capacities of 2, 4, 6, 6, and 8 are placed in the even resource pool, and resource cards with capacities of 1, 2, 3, 4, 5, 6, 7, and 8 are all placed in the mixed resource pool.

[0109] See also Figure 3 , Figure 3 The second flow chart of the resource allocation method provided in the embodiment of the present application is as follows. Figure 3 As shown, the resource allocation method provided in this embodiment includes the following steps:

[0110] 301: The requesting terminal sends a resource allocation request.

[0111] For example, a user sends a resource allocation request to the server of the computing power platform through a request terminal, requesting: 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5.

[0112] 302: Generate a resource allocation task according to the resource allocation request.

[0113] For example, the server of the computing power platform receives a resource allocation request from a user: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. Three resource allocation tasks are generated based on the resource allocation request, among which Task 1: 1 resource card with a capacity of 3, Task 2: 1 resource card with a capacity of 3; Task 3: 1 resource card with a capacity of 5.

[0114] 303: Match the odd-numbered resource pool, the even-numbered resource pool, and the mixed resource pool.

[0115] For example, when the server of the computing power platform completes the resource allocation task of Task 1: 1 resource card with a capacity of 3, it first uses the odd-numbered resource pool as the target feature resource pool. If a resource card that meets the requirements of Task 1 is matched in the odd-numbered resource pool, the matched resource card is allocated to the current resource distribution task. If a resource card that meets the requirements of Task 1 is not matched in the odd-numbered resource pool, the even-numbered resource pool or the mixed resource pool is used as a candidate resource pool, and resource matching is completed in the candidate resource pool.

[0116] 304: Returns the address corresponding to the allocated resource card.

[0117] For example, the resource card allocated to the above task 1 is a D card, that is, the physical hardware address corresponding to the D card is returned to the requesting terminal.

[0118] 305: Get resource card,

[0119] For example, the user goes to the corresponding location in the resource library to obtain resources according to the physical hardware address corresponding to the D card returned above.

[0120] The following content is Figure 3 Specific description of the content.

[0121] In one embodiment, the resource pool is divided into an odd-numbered resource pool, an even-numbered resource pool, and a mixed resource pool to complete the resource allocation request of the user, and whether there is an idle resource card with a card capacity equal to the required capacity of the current resource allocation task is queried in the target characteristic resource pool. If the corresponding idle resource card is not queried, it is determined that the idle resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, and the current resource allocation task is determined as an unmatched resource allocation task, and then a target idle resource card is selected for the unmatched resource allocation task according to a preset method, wherein the non-target characteristic idle resource card is selected. The resource pool is used as a candidate resource pool. For example, the user's resource allocation request is: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. The idle resource cards in the resource pool are: 1 B card, 1 C card, 1 F card, 1 G card, and 1 H card. At this time, the odd resource pool has: 1 C card and 1 G card, that is, the resource cards in the odd resource pool are: C1, G1; the even resource pool has: 1 B card, 1 F card, and 1 H card, that is, the resource cards in the even resource pool are: B1, F1, H1, and the resource cards in the mixed resource pool are: C1, G1, B1, F1, H1. First, the user's resource allocation requests for 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5 are divided into 2 resource allocation tasks. There are 2 resource allocation tasks corresponding to 1 resource card with a capacity of 3, and one resource allocation task corresponding to 1 resource card with a capacity of 5. Each resource allocation task is completed in sequence. Therefore, the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity of 3 is an odd number, the target feature resource pool corresponding to the current resource allocation task is the odd resource pool. First, query whether there is a resource card with a capacity of 3 in the odd resource pool. The capacity corresponding to the C1 card in the odd resource pool is 3. Then assign the C1 card to the current resource allocation task. There are 2 resource allocation tasks left. At this time, the resource card in the odd resource pool is: G1, the resource cards in the even resource pool are: B1, F1, H1, and the resource cards in the mixed resource pool are: G1, B1, F1, H1.

[0122] Next, complete another resource card allocation task with a capacity of 3, that is, the current resource allocation task becomes another resource card allocation task with a capacity of 3. Because 3 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, query whether there is a resource card with a capacity of 3 in the target feature pool. Because there is no resource card with a capacity of 3 in the current odd resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0123] Next, according to the preset method, a target idle resource card is selected for the unmatched resource allocation task. When the preset resource pool selection method is to determine the non-target feature resource pool as the candidate resource pool, that is, the candidate resource pool at this time is an even resource pool. Next, according to the preset resource card selection method, a target idle resource card is selected for the unmatched resource allocation task in the candidate resource pool. The resource cards in the current even resource pool are: B1, F1, H1, among which F1 and H1 can both meet the demand for a resource card with a capacity of 3, but the capacity of F1 is less than that of H1. According to the preset resource card selection method: select the minimum capacity that meets the current resource allocation task in the corresponding candidate resource pool The resource card is determined as the target idle resource card, so F1 is determined as the target idle resource card, F1 is divided into F11 with 1 / 2 of F1's capacity and F12 with 1 / 2 of F1's capacity, F11 is determined as the target resource card corresponding to the unmatched resource allocation task, and F12 is determined as the fragmented resource card. Finally, F11 is assigned to the current resource allocation task. Since the capacity of F12 is 3, F12 is updated to the odd resource pool, and there is 1 resource allocation task left. At this time, the resource cards in the odd resource pool are: G1, F12, the resource cards in the even resource pool are: B1, H1, and the resource cards in the mixed resource pool are: G1, B1, F12, H1.

[0124] Finally, a resource allocation task with a capacity of 5 needs to be completed, that is, the current resource allocation task becomes a resource card allocation task with a capacity of 5. Because 5 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, check whether there is a resource card with a capacity of 5 in the target feature pool. Because there is no resource card with a capacity of 5 in the current odd resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0125] Next, a target idle resource card is selected for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is to determine the non-target feature resource pool as the candidate resource pool, that is, the candidate resource pool at this time is an even resource pool. Next, a target idle resource card is selected for the unmatched resource allocation task in the candidate resource pool according to the preset resource card selection method. The resource cards in the current even resource pool are: B1 and H1. Among them, only H1 can meet the demand for a resource card with a capacity of 5. Therefore, H1 is determined as the target idle resource card, and H1 is divided into H11 with 5 / 8 of H1 capacity and H12 with 3 / 8 of H1 capacity. H11 is determined as the unmatched resource card. The target resource card corresponding to the allocation task is determined, and H12 is determined as the fragmented resource card. Finally, H11 is allocated to the current resource allocation task. Because the capacity of H12 is 3, H12 is updated to the odd resource pool. At this time, the resource cards in the odd resource pool are: G1, F12, H12; the resource cards in the even resource pool are: B1; the resource cards in the mixed resource pool are: G1, F12, H12, B1. After the user resource allocation requests are matched, the address corresponding to the resource card assigned to the resource allocation request is sent to the user request terminal, and the addresses corresponding to C1, F1, and H1 are sent to the user terminal. The user terminal obtains the resource card with the corresponding resource capacity according to the received address.

[0126] In one embodiment, the resource pool is divided into an odd-numbered resource pool, an even-numbered resource pool, and a mixed resource pool to complete the resource allocation request of the user, and whether there is an idle resource card with a capacity equal to the required capacity of the current resource allocation task is queried in the target characteristic resource pool. If the corresponding idle resource card is queried, the idle resource card is allocated to the current resource allocation task; if the corresponding idle resource card is not queried, it is determined that the idle resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, and the current resource allocation task is determined as an unmatched resource allocation task, and then a target is selected for the unmatched resource allocation task according to a preset method. Mark the idle resource cards, among which the mixed resource pool is used as the candidate resource pool. For example, the user's resource allocation request is: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. The idle resource cards in the resource pool are: 1 B card, 1 C card, 1 F card, 1 G card, and 1 H card. At this time, the odd resource pool has: 1 C card and 1 G card, that is, the resource cards in the odd resource pool are: C2, G2; the even resource pool has: 1 B card, 1 F card and 1 H card, that is, the resource cards in the even resource pool are: B2, F2, H2, and the resource cards in the mixed resource pool are: C2, G2, B2, F2, H2. First, the user's resource allocation requests for 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5 are divided into 3 resource allocation tasks. There are 2 resource allocation tasks corresponding to 1 resource card with a capacity of 3, and 1 resource allocation task corresponding to 1 resource card with a capacity of 5. Each resource allocation task is completed in sequence. Therefore, the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity of 3 is an odd number, the target feature resource pool corresponding to the current resource allocation task is the odd resource pool. First, query whether there is a resource card with a capacity of 3 in the odd resource pool. The capacity corresponding to the C2 card in the odd resource pool is 3. Then assign the C2 card to the current resource allocation task. There are 2 resource allocation tasks left. At this time, the resource card in the odd resource pool is: G2, the resource cards in the even resource pool are: B2, F2, H2, and the resource cards in the mixed resource pool are: G2, B2, F2, H2.

[0127] Next, complete another resource card allocation task with a capacity of 3, that is, the current resource allocation task becomes another resource card allocation task with a capacity of 3. Because 3 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, query whether there is a resource card with a capacity of 3 in the target feature pool. Because there is no resource card with a capacity of 3 in the current odd resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0128] Next, a target idle resource card is selected for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is to determine the hybrid resource pool as the candidate resource pool, that is, the candidate resource pool at this time is a hybrid resource pool. Next, a target idle resource card is selected for the unmatched resource allocation task in the candidate resource pool according to the preset resource card selection method. The resource cards in the current hybrid resource pool are: G2, B2, F2, H2, among which F2, G2, and H2 can all meet the demand for a resource card with a capacity of 3, but the capacity of F2 is smaller than that of G2 and H2. According to the preset resource card selection method: the best resource card that meets the current resource allocation task is selected in the corresponding candidate resource pool. The small-capacity resource card is determined as the target idle resource card, so F2 is determined as the target idle resource card, and F2 is divided into F21 with 1 / 2 of F2's capacity and F22 with 1 / 2 of F2's capacity. F21 is determined as the target resource card corresponding to the unmatched resource allocation task, and F22 is determined as a fragmented resource card. Finally, F21 is assigned to the current resource allocation task. Since the capacity of F22 is 3, F22 is updated to the odd resource pool, and there is 1 resource allocation task left. At this time, the resource cards in the odd resource pool are: G2, F22, the resource cards in the even resource pool are: B2, H2, and the resource cards in the mixed resource pool are: G2, B2, F22, H2.

[0129] Finally, a resource allocation task with a capacity of 5 needs to be completed, that is, the current resource allocation task becomes a resource card allocation task with a capacity of 5. Because 5 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, check whether there is a resource card with a capacity of 5 in the target feature pool. Because there is no resource card with a capacity of 5 in the current odd resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0130] Next, a target idle resource card is selected for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is that the hybrid resource pool is determined as the candidate resource pool, that is, the candidate resource pool at this time is a hybrid resource pool. Next, a target idle resource card is selected for the unmatched resource allocation task in the candidate resource pool according to the preset resource card selection method. The resource cards in the current hybrid resource pool are: G2, B2, F22, and H2. Among them, only H2 can meet the demand for a resource card with a capacity of 5. Therefore, H2 is determined as the target idle resource card, and H2 is divided into H21 with 5 / 8 of H2 capacity and H22 with 3 / 8 of H2 capacity. H21 is determined as an unmatched resource. Assign the target resource card corresponding to the task, determine H22 as the fragmented resource card, and finally, assign H21 to the current resource allocation task. Because the capacity of H22 is 3, H22 is updated to the odd resource pool. At this time, the resource cards in the odd resource pool are: G2, F22, H22; the resource cards in the even resource pool are: B2; the resource cards in the mixed resource pool are: G2, F22, H22, B2. After the user resource allocation requests are matched, the address corresponding to the resource card assigned to the resource allocation request is sent to the user request terminal, and the addresses corresponding to C2, F2, and H2 are sent to the user terminal. The user terminal obtains the resource card with the corresponding resource capacity according to the received address.

[0131] In one embodiment, the resource pool is divided into an odd-numbered resource pool, an even-numbered resource pool, and a mixed resource pool to complete the resource allocation request of the user, and whether there is an idle resource card with a capacity greater than the required capacity of the current resource allocation task is queried in the target characteristic resource pool. If the corresponding idle resource card is queried, the idle resource card is allocated to the current resource allocation task; if the corresponding idle resource card is not queried, it is determined that the idle resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, and the current resource allocation task is determined to be an unmatched resource allocation task, and then a target idle resource card is selected for the unmatched resource allocation task according to a preset method. Idle resource cards, where the non-target feature resource pool is used as a candidate resource pool. For example, the user's resource allocation request is: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. The idle resource cards in the resource pool are: 1 B card, 1 C card, 1 F card, 1 G card, and 1 H card. At this time, the odd resource pool has: 1 C card and 1 G card, that is, the resource cards in the odd resource pool are: C3, G3; the even resource pool has: 1 B card, 1 F card and 1 H card, that is, the resource cards in the even resource pool are: B3, F3, H3, and the resource cards in the mixed resource pool are: C3, G3, B3, F3, H3. First, the user's resource allocation requests for 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5 are divided into 3 resource allocation tasks. There are 2 resource allocation tasks corresponding to 1 resource card with a capacity of 3, and one resource allocation task corresponding to 1 resource card with a capacity of 5. Each resource allocation task is completed in sequence. Therefore, the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity of 3 is an odd number, the target feature resource pool corresponding to the current resource allocation task is the odd resource pool. First, query whether there is a resource card with a capacity of 3 in the odd resource pool. The capacity corresponding to the C3 card in the odd resource pool is 3. Then assign the C3 card to the current resource allocation task. There are 2 resource allocation tasks left. At this time, the resource card in the odd resource pool is: G3, the resource cards in the even resource pool are: B3, F3, H3, and the resource cards in the mixed resource pool are: G3, B3, F3, H3.

[0132] Next, complete another resource card allocation task with a capacity of 3, that is, the current resource allocation task becomes another resource card allocation task with a capacity of 3. Because 3 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, query whether there is a resource card with a capacity greater than 3 in the target feature pool. Because the capacity of G3 card in the current odd resource pool is greater than 3, G3 is determined as the target idle resource card, and G3 is divided into G31 with 3 / 7 of G3 capacity and G32 with 4 / 7 of G3 capacity. G31 is determined as the target resource card corresponding to the unmatched resource allocation task, and G32 is determined as a fragmented resource card. Finally, G31 is allocated to the current resource allocation task. Because the capacity of G32 is 4, G32 is updated to the even resource pool, and there is 1 resource allocation task left. At this time, there is no resource card in the odd resource pool, and the resource cards in the even resource pool are: G32, B3, F3, H3, and the resource cards in the mixed resource pool are: G32, B3, F3, H3.

[0133] Finally, a resource allocation task with a capacity of 5 needs to be completed, that is, the current resource allocation task becomes a resource card allocation task with a capacity of 5. Because 5 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, check whether there is a resource card with a capacity greater than 5 in the target feature pool. Because there is no resource card with a capacity greater than 5 in the current odd resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0134] Next, a target idle resource card is selected for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is that the hybrid resource pool is determined as the candidate resource pool, that is, the candidate resource pool at this time is a hybrid resource pool. Next, a target idle resource card is selected for the unmatched resource allocation task in the candidate resource pool according to the preset resource card selection method. The resource cards in the current hybrid resource pool are: G32, B3, F3, and H3. Among them, F3 and H3 can both meet the demand for a resource card with a capacity of 5, but the capacity of F3 is less than that of H3. Therefore, F3 is determined as the target idle resource card, and F3 is divided into F31 with 5 / 6 of F3 capacity and F32 with 1 / 6 of F3 capacity. F31 Determine the target resource card corresponding to the unmatched resource allocation task, determine F32 as the fragmented resource card, and finally, allocate F31 to the current resource allocation task. Since the capacity of F32 is 1, F32 is updated to the odd resource pool. At this time, the resource cards in the odd resource pool are: F32, the resource cards in the even resource pool are: G32, B3, H3, and the resource cards in the mixed resource pool are: G32, B3, H3, and F32. After the user resource allocation requests are matched, the address corresponding to the resource card to which the resource allocation request is assigned is sent to the user request terminal, and the addresses corresponding to C3, G3, and F3 are sent to the user terminal. The user terminal obtains the resource card with the corresponding resource capacity according to the received address.

[0135] In one embodiment, the resource pool is divided into an odd resource pool, an even resource pool and a mixed resource pool to complete the resource allocation request of the user, and whether there is an idle resource card with a capacity greater than the required capacity of the current resource allocation task is queried in the target characteristic resource pool. If an idle resource card with a capacity greater than the required capacity of the current resource allocation task is queried, the idle resource card is allocated to the current resource allocation task. If no corresponding idle resource card is queried, it is determined that an idle resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, and the current resource allocation task is determined as an unmatched resource allocation task, and then the unmatched resource allocation task is allocated according to a preset method. The target idle resource card is selected in the task allocation, wherein the mixed resource pool is used as the candidate resource pool. For example, the user's resource allocation request is: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. The idle resource cards in the resource pool are: 1 B card, 1 C card, 1 F card, 1 G card, and 1 H card. At this time, the odd resource pool has: 1 C card and 1 G card, that is, the resource cards in the odd resource pool are: C4, G4; the even resource pool has: 1 B card, 1 F card, and 1 H card, that is, the resource cards in the even resource pool are: B4, F4, H4, and the resource cards in the mixed resource pool are: C4, G4, B4, F4, H4. First, the user's resource allocation requests for 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5 are divided into 3 resource allocation tasks. There are 2 resource allocation tasks corresponding to 1 resource card with a capacity of 3, and 1 resource allocation task corresponding to 1 resource card with a capacity of 5. Each resource allocation task is completed in sequence. Therefore, the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity of 3 is an odd number, the target feature resource pool corresponding to the current resource allocation task is the odd resource pool. The capacity corresponding to the C4 card in the odd resource pool is 3. Then the C4 card is assigned to the current resource allocation task. There are 2 resource allocation tasks left. At this time, the resource card in the odd resource pool is: G4, the resource cards in the even resource pool are: B4, F4, H1, and the resource cards in the mixed resource pool are: G4, B4, F4, H4.

[0136] Next, complete another resource card allocation task with a capacity of 3, that is, the current resource allocation task becomes another resource card allocation task with a capacity of 3. Because 3 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, query whether there is a resource card with a capacity greater than 3 in the odd resource pool. Because the capacity of G4 card in the current odd resource pool is greater than 3, G4 is determined as the target idle resource card, and G4 is divided into G41 with 3 / 7 of G4 capacity and G42 with 4 / 7 of G4 capacity. G41 is determined as the target resource card corresponding to the unmatched resource allocation task, and G42 is determined as a fragmented resource card. Finally, G41 is allocated to the current resource allocation task. Because the capacity of G42 is 4, G42 is updated to the even resource pool, and there is 1 resource allocation task left. At this time, there is no resource card in the odd resource pool, and the resource cards in the even resource pool are: G42, B4, F4, H4, and the resource cards in the mixed resource pool are: G42, B4, F4, H4.

[0137] Finally, a resource allocation task with a capacity of 5 needs to be completed, that is, the current resource allocation task becomes a resource card allocation task with a capacity of 5. Because 5 is an odd number, the odd resource pool is still determined as the target feature resource pool. First, check whether there is a resource card with a capacity of 5 in the target feature pool. Because there is no resource card with a capacity of 5 in the current odd resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0138] The next step is to select a target idle resource card for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is to determine the non-target feature resource pool as the candidate resource pool, that is, the candidate resource pool at this time is a mixed resource pool. Next, select a target idle resource card for the unmatched resource allocation task in the candidate resource pool according to the preset resource card selection method. The resource cards in the current mixed resource pool are: G42, B4, F4, H4, among which only F4 and H4 can meet the demand for a resource card with a capacity of 5, but the capacity of F4 is less than that of H4, so F4 ​​is determined as the target idle resource card, and F4 is divided into F41 with 5 / 6 of F4 capacity and F42 with 1 / 6 of F4 capacity. F41 is determined as the target resource card corresponding to the unmatched resource allocation task, and F42 is determined as the fragmented resource card. Finally, F41 is assigned to the current resource allocation task. Since the capacity of F42 is 1, F42 is updated to the odd resource pool. At this time, the resource cards in the odd resource pool are: F42, the resource cards in the even resource pool are: G42, B4, H4, and the resource cards in the mixed resource pool are: G42, B4, H4, F42. After the user resource allocation requests are matched, the address corresponding to the resource card assigned to the resource allocation request is sent to the user request terminal, and the addresses corresponding to C4, G4, and F4 are sent to the user terminal. The user terminal obtains the resource card with the corresponding resource capacity according to the received address.

[0139] Fig.10 The third distribution diagram of the resource pool provided in the embodiment of the present application, specifically, the first characteristic resource pool and the second characteristic resource pool are divided into a small card resource pool and a large card resource pool according to the capacity of the resource card, wherein resource cards with capacities of 1, 2, 3, and 4 are placed in the small card resource pool, resource cards with capacities of 5, 6, 7, and 8 are placed in the large card resource pool, and resource cards with capacities of 1, 2, 3, 4, 5, 6, 7, and 8 are placed in the mixed resource pool.

[0140] See also Figure 4 , Figure 4 A third flow chart of the resource allocation method provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, in this embodiment, the resource allocation method provided by this application includes the following steps:

[0141] 401: Send resource allocation request.

[0142] For example, a user sends a resource allocation request to the server of the computing power platform through a request terminal, requesting: 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5.

[0143] 402: Generate a resource allocation task according to the resource allocation request.

[0144] For example, the server of the computing power platform receives a resource allocation request from a user: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. Three resource allocation tasks are generated based on the resource allocation request, among which Task 1: 1 resource card with a capacity of 3, Task 2: 1 resource card with a capacity of 3; Task 3: 1 resource card with a capacity of 5.

[0145] 403: Match the small card resource pool, large card resource pool and mixed resource pool.

[0146] For example, when the server of the computing power platform completes the resource allocation task of Task 1: 1 resource card with a capacity of 3, it first uses the small card resource pool as the target feature resource pool. If a resource card that meets the requirements of Task 1 is matched in the small card resource pool, the matched resource card is allocated to the current resource distribution task. If a resource card that meets the requirements of Task 1 is not matched in the small card resource pool, the large card resource pool or the mixed resource pool is used as a candidate resource pool, and resource matching is completed in the candidate resource pool.

[0147] 404: Returns the address corresponding to the assigned resource card.

[0148] For example, the resource card allocated to the above task 1 is a D card, that is, the physical hardware address corresponding to the D card is returned to the requesting terminal.

[0149] 405: Get resource card.

[0150] For example, the user goes to the corresponding location in the resource library to obtain resources according to the physical hardware address corresponding to the D card returned above.

[0151] The following are Figure 4 Specific description of the content.

[0152] In one embodiment, the resource pool is divided into a small card resource pool, a large card resource pool and a mixed resource pool to complete the resource allocation request of the user, and whether there is an idle resource card with a capacity equal to the required capacity of the current resource allocation task in the target characteristic resource pool is queried. If an idle resource card with a capacity equal to the required capacity of the current resource allocation task is queried, the idle resource card is allocated to the current resource allocation task. If the corresponding idle resource card is not queried, it is determined that the idle resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, and the current resource allocation task is determined as an unmatched resource allocation task, and then a target is selected for the unmatched resource allocation task according to a preset method. Idle resource cards, where the hybrid resource pool is used as a candidate resource pool. For example, the user's resource allocation request is: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. The idle resource cards in the resource pool are: 1 B card, 1 C card, 1 D card, 1 F card, 1 G card, and 1 H card. At this time, the small card resource pool has: 1 B card, 1 C card, and 1 D card, that is, the resource cards in the small card resource pool are: C5, B5, and D5, and the large card resource pool has: 1 F card, 1 G card, and 1 H card, and the resource cards in the large card resource pool are: F5, G5, and H5; the resource cards in the hybrid resource pool are: C5, D5, G5, B5, F5, and H5. First, the user's resource allocation requests for 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5 are divided into 3 resource allocation tasks. There are 2 resource allocation tasks corresponding to 1 resource card with a capacity of 3, and one resource allocation task corresponding to 1 resource card with a capacity of 5. Each resource allocation task is completed in sequence. Therefore, the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity of 3 belongs to the range of 1-4, the target feature resource pool corresponding to the current resource allocation task is the small card resource pool. First, query whether there is a resource card with a capacity of 3 in the small card resource pool. It happens that the capacity corresponding to the C5 card in the small card resource pool is 3. Then assign the C5 card to the current resource allocation task. There are 2 resource allocation tasks left. At this time, the resource cards in the small card resource pool are: B5, D5, the resource cards in the large card resource pool are: F5, G5, H5, and the resource cards in the mixed resource pool are: G5, D5, B5, F5, H5.

[0153] Next, complete another resource card allocation task with a capacity of 3, that is, the current resource allocation task becomes another resource card allocation task with a capacity of 3. Because 3 belongs to the range of 1-4, the small card resource pool is still determined as the target feature resource pool. First, query whether there is a resource card with a capacity of 3 in the target feature pool. Because there is no resource card with a capacity of 3 in the current small card resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0154] Next, a target idle resource card is selected for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is to determine the hybrid resource pool as the candidate resource pool, that is, the candidate resource pool at this time is a hybrid resource pool. Next, a target idle resource card is selected for the unmatched resource allocation task in the candidate resource pool according to the preset resource card selection method. The resource cards in the current hybrid resource pool are: B5, D5, F5, G5, H5, among which D5, F5, G5, H5 can all meet the demand for a resource card with a capacity of 3, but the capacity of D5 is smaller than that of F5, G5 and H5. According to the preset resource card selection method: select the resource card that meets the current resource allocation task in the corresponding candidate resource pool. The resource card with the smallest capacity is determined as the target idle resource card, so D5 is determined as the target idle resource card, and D5 is divided into D51 with 3 / 4 of D5's capacity and D52 with 1 / 4 of D5's capacity. D51 is determined as the target resource card corresponding to the unmatched resource allocation task, and D52 is determined as the fragmented resource card. Finally, D51 is assigned to the current resource allocation task. Since the capacity of D52 is 1, D52 is updated to the small card resource pool, and there is 1 resource allocation task left. At this time, the resource cards in the small card resource pool are: B5, D52, the resource cards in the large card resource pool are: F5, G5, H5, and the resource cards in the mixed resource pool are: B5, D52, F5, G5, H5.

[0155] Finally, a resource allocation task with a capacity of 5 needs to be completed, that is, the current resource allocation task becomes a resource card allocation task with a capacity of 5. Because 5 belongs to the range of 5-8, the large card resource pool is still determined as the target feature resource pool. First, check whether there is a resource card with a capacity of 5 in the target feature pool. Because there is no resource card with a capacity of 5 in the current large card resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0156] Next, a target idle resource card is selected for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is to determine the hybrid resource pool as the candidate resource pool, that is, the candidate resource pool at this time is a hybrid resource pool. Next, a target idle resource card is selected for the unmatched resource allocation task in the candidate resource pool according to the preset resource card selection method. The resource cards in the current hybrid resource pool are: B5, D52, F5, G5, H5. Among them, F5, G5, and H5 can all meet the demand for a resource card with a capacity of 5, but the capacity of F5 is less than that of G5 and H5. Therefore, F5 is determined as the target idle resource card, and F5 is divided into F51 with 5 / 6 of the capacity of F5 and F52 with 1 / 6 of the capacity of F5. 51 is determined as the target resource card corresponding to the unmatched resource allocation task, and F52 is determined as the fragmented resource card. Finally, F51 is assigned to the current resource allocation task. Since the capacity of F52 is 1, F52 is updated to the small card resource pool. At this time, the resource cards in the small card resource pool are: F52, B5, D52; the resource cards in the large card resource pool are: G5, H5, and the resource cards in the mixed resource pool are: F52, B5, D52, G5, H5. After the user resource allocation requests are matched, the address corresponding to the resource card assigned to the resource allocation request is sent to the user request terminal, and the addresses corresponding to C5, D5, and F5 are sent to the user terminal. The user terminal obtains the resource card with the corresponding resource capacity according to the received address.

[0157] In one embodiment, the resource pool is divided into a small card resource pool, a large card resource pool and a mixed resource pool to complete the user's resource allocation request, and whether there is an idle resource card with a capacity greater than the required capacity of the current resource allocation task in the target characteristic resource pool is queried. If an idle resource card with a capacity greater than the required capacity of the current resource allocation task is queried, the idle resource card is allocated to the current resource allocation task. If an idle resource card with a capacity greater than the required capacity of the current resource allocation task is not queried, it is determined that an idle resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, and the current resource allocation task is determined as an unmatched resource allocation task, and then the unmatched resource allocation task is assigned according to a preset method. The task selects the target idle resource card, wherein the mixed resource pool is used as the candidate resource pool. For example, the user's resource allocation request is: 2 resource cards with a capacity of 3, and 1 resource card with a capacity of 5. The idle resource cards in the resource pool are: 1 B card, 1 C card, 1 D card, 1 F card, 1 G card, and 1 H card. At this time, the small card resource pool has: 1 B card, 1 C card, and 1 D card, that is, the resource cards in the small card resource pool are: C6, B6, and D6, and the large card resource pool has: 1 F card, 1 G card, and 1 H card, and the resource cards in the large card resource pool are: F6, G6, and H6; the resource cards in the mixed resource pool are: C6, D6, G6, B6, F6, and H6. First, the user's resource allocation requests for 2 resource cards with a capacity of 3 and 1 resource card with a capacity of 5 are divided into 3 resource allocation tasks. There are 2 resource allocation tasks corresponding to 1 resource card with a capacity of 3, and one resource allocation task corresponding to 1 resource card with a capacity of 5. Each resource allocation task is completed in sequence. Therefore, the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity of 3 belongs to the range of 1-4, the target feature resource pool corresponding to the current resource allocation task is the small card resource pool. First, query whether there is a resource card with a capacity of 3 in the small card resource pool. It happens that the capacity corresponding to the C6 card in the small card resource pool is 3. Then assign the C6 card to the current resource allocation task. There are 2 resource allocation tasks left. At this time, the resource cards in the small card resource pool are: B6, D6, the resource cards in the large card resource pool are: F6, G6, H6, and the resource cards in the mixed resource pool are: G6, D6, B6, F6, H6.

[0158] Next, complete another resource card allocation task with a capacity of 3, that is, the current resource allocation task becomes another resource card allocation task with a capacity of 3. Because 3 is in the range of 1-4, the small card resource pool is still determined as the target feature resource pool. First, check whether there is a resource card with a capacity greater than 3 in the target feature pool. Because the capacity of D6 card in the current small card resource pool is greater than 3, D6 is determined as the target idle resource card, and D6 is divided into D61 with 3 / 4 of D6 capacity and D62 with 1 / 4 of D6 capacity. D62, determine D61 as the target resource card corresponding to the unmatched resource allocation task, determine D62 as a fragmented resource card, and finally, assign D61 to the current resource allocation task. Because the capacity of D62 is 1, D61 is updated to the small card resource pool, and there is 1 resource allocation task left. At this time, the resource cards in the small card resource pool are: D62, B6, the resource cards in the large card resource pool are: F6, G6, H6, and the resource cards in the mixed resource pool are: D62, B6, F6, G6, H6.

[0159] Finally, a resource allocation task with a capacity of 5 needs to be completed, that is, the current resource allocation task becomes a resource card allocation task with a capacity of 5. Because 5 belongs to the range of 5-8, the large card resource pool is still determined as the target feature resource pool. First, check whether there is a resource card with a capacity greater than 5 in the target feature pool. Because the capacities of F6, G6, and H6 in the current large card resource pool are all greater than 5, but the capacity of F6 is the smallest. Therefore, F6 is determined as the target idle resource card. F6 is divided into F61 with 5 / 6 of F6 capacity and F62 with 1 / 6 of F6 capacity. F61 is determined as the target resource card corresponding to the unmatched resource allocation task, and F62 is It is determined to be a fragmented resource card. Finally, F61 is assigned to the current resource allocation task. Since the capacity of F62 is 1, F62 is updated to the small card resource pool. At this time, the resource cards in the small card resource pool are: F62, B6, D62; the resource cards in the large card resource pool are: G6, H6, and the resource cards in the mixed resource pool are: F62, B6, D62, G6, H6. After the user resource allocation requests are matched, the address corresponding to the resource card to which the resource allocation request is assigned is sent to the user request terminal, and the addresses corresponding to C6, D6, and F6 are sent to the user terminal. The user terminal obtains the resource card with the corresponding resource capacity according to the received address.

[0160] See also Fig.11 , Fig.11 A fourth distribution diagram of the resource pool provided in an embodiment of the present application.

[0161] In some embodiments, the resource pool is divided into a broken card resource pool and a whole card resource pool, wherein resource cards with a specification of less than 8 are placed in the broken card resource pool, and resource cards with a specification of 8 are placed in the whole card resource pool. In actual situations, the urgency of user resource allocation requests is different. Requests submitted by general users can be divided into general requests and emergency requests. In special cases, users urgently need GPU resources to complete business operations, and an emergency request identifier can be added to the resource allocation request. The GPU computing power platform will determine the resource allocation request with the emergency request identifier as an emergency request, and the resource allocation request without the emergency identifier as a general request. General requests will be found in the broken card resource pool, and emergency requests will be found in the whole card resource pool.

[0162] The following content is used as an example to illustrate the case where the resource allocation request is an emergency request. Whether there is an idle resource card with a capacity greater than the required capacity of the current resource allocation task is queried in the target feature resource pool. If the corresponding idle resource card is not found, it is determined that the idle resource card corresponding to the required capacity of the resource card is not queried from the target feature resource pool, and the current resource allocation task is determined as an unmatched resource allocation task. Then, a target idle resource card is selected for the unmatched resource allocation task according to a preset method, wherein the non-target feature resource pool is used as a candidate resource pool. For example, the user's resource allocation request is: 2 cards There are two resource cards with a capacity of 3 and one resource card with a capacity of 5, and they carry an emergency request mark. The idle resource cards in the resource pool are: 1 B card, 1 C card, 1 D card, 1 F card, 1 G card, and 1 H card. At this time, there are 1 B card, 1 C card, 1 D card, 1 F card, and 1 G card in the broken card resource pool, that is, the resource cards in the broken card resource pool are: C10, B10, D8, F10, G10, and the whole card resource pool has: H10. First, divide the resource allocation requests of the user's two resource cards with a capacity of 3 and one resource card with a capacity of 5 into 3 resource allocation tasks. There are 2 resource allocation tasks corresponding to 1 resource card with a capacity of 3, and another resource allocation task corresponding to 1 resource card with a capacity of 5. Each resource allocation task is completed in turn. Therefore, the current resource allocation task is: 1 resource card with a capacity of 3. Because the current resource allocation task belongs to the task in the emergency request, the target feature resource pool corresponding to the current resource allocation task is the whole card resource pool. First, check whether there is an idle resource card in the whole card resource pool. There is an H10 card in the whole resource pool. H10 is determined as the target idle resource card. H10 is divided into H10 with a capacity of 3. / 10 and H102 with 7 / 10 of H10 capacity, H101 is determined as the target resource card corresponding to the unmatched resource allocation task, and H102 is determined as a fragmented resource card. Finally, H101 is assigned to the current resource allocation task. Since the capacity of H102 is 7, H102 is updated to the fragmented card resource pool. At this time, there is no resource card in the whole card resource pool. The cards in the fragmented card resource pool are: C10, B10, D8, F10, G10, H102, and the cards in the mixed resource pool are: C10, B10, D8, F10, G10, H102.

[0163] Next, complete another resource card allocation task with a capacity of 3, that is, the current resource allocation task becomes another resource card allocation task with a capacity of 3. Because the current resource allocation task belongs to the task in the emergency request, the target feature resource pool corresponding to the current resource allocation task is the whole card resource pool. First, query whether there are any idle resource cards in the target feature pool. Because there are no idle resource cards in the current whole card resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0164] The next step is to select a target idle resource card for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is to determine the non-target feature resource pool as the candidate resource pool, that is, the candidate resource pool at this time is the broken card resource pool. Next, according to the preset resource card selection method, select a target idle resource card for the unmatched resource allocation task in the broken card resource pool. The current resource cards in the broken card resource pool are: C10, B10, D8, F10, G10, H102. Because the capacity corresponding to C10 is exactly 3, C10 is directly assigned to the current resource allocation task. At this time, there is no resource card in the whole card resource pool. The resource cards in the broken card resource pool are: B10, D8, F10, G10, H102, and the resource cards in the mixed resource pool are: B10, D8, F10, G10, H102.

[0165] Finally, a resource allocation task with a capacity of 5 needs to be completed, that is, the current resource allocation task becomes a resource card allocation task with a capacity of 5. Because the current resource allocation task belongs to the task in the emergency request, the target feature resource pool corresponding to the current resource allocation task is the whole card resource pool. First, check whether there are any idle resource cards in the target feature pool. Because there are no idle resource cards in the current whole card resource pool, the current resource allocation task is determined as an unmatched resource allocation task.

[0166] Next, a target idle resource card is selected for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is to determine the non-target feature resource pool as the candidate resource pool, that is, the candidate resource pool at this time is the broken card resource pool. Next, a target idle resource card is selected for the unmatched resource allocation task in the broken card resource pool according to the preset resource card selection method. The resource cards in the current broken card resource pool are: B10, D8, F10, G10, H102, among which F10, G10, and H102 can all meet the demand for a resource card with a capacity of 5, but the capacity of F10 is smaller than that of G10 and H102. According to the preset resource card selection method: the resource card with the minimum capacity that meets the current resource allocation task is selected in the corresponding candidate resource pool as the target idle resource card. Therefore, F10 is determined as the target idle resource card, and F10 is divided into two types with a capacity of F10. F101 has 5 / 6 of the capacity and F102 has 1 / 6 of the capacity of F10, F101 is determined as the target resource card corresponding to the unmatched resource allocation task, and F102 is determined as a fragmented resource card. Finally, F101 is assigned to the current resource allocation task. Since the capacity of F102 is 1, F102 is updated to the fragmented card resource pool. At this time, the resource cards in the fragmented card resource pool are: B10, D8, F102, G10, H102; there are no resource cards in the whole card resource pool, and the resource cards in the mixed resource pool are: B10, D8, F102, G10, H102. After the user resource allocation requests are matched, the address corresponding to the resource card assigned to the resource allocation request is sent to the user request terminal, and the addresses corresponding to H10, C10, and F10 are sent to the user terminal. The user terminal obtains the resource card with the corresponding resource capacity according to the received address.

[0167] In one embodiment, the idle resource cards in the resource pool are: 5 A cards, 3 B cards, 1 C card, 1 F card, and 2 H cards, among which 3 B cards, 1 F card, and 2 H cards are placed in the even-numbered resource pool, that is, the cards in the even-numbered resource pool are: B7, B8, B9, F7, H7, H8; 5 A cards and 1 C card are placed in the odd-numbered resource pool, that is, the cards in the odd-numbered resource pool are: A1, A2, A3, A4, A5, C7; and the mixed resource pool has: A1, A2, A3, A4, A5, C7, B7, B8, B9, F7, H7, H8. User A's resource allocation request is: 4 resource cards with a capacity of 1. First, divide user A's resource allocation request: 4 resource cards with a capacity of 1 into 4 resource allocation tasks. Each resource allocation task corresponds to 1 resource card with a capacity of 1, and then determine the target resource pool. Because the current resource allocation task is 1 resource card with a capacity of 1, and 1 is an odd number, the target resource pool corresponding to the current resource allocation task is the odd resource pool. Because there are 5 resource cards with a capacity of 1 in the odd resource pool, A1 is assigned to the current resource allocation task, and then the other 3 resource allocation tasks are executed in sequence, and A2, A3, and A4 are assigned to the current resource allocation task in sequence. After completing user A's resource allocation request, the resource cards in the even resource pool remain unchanged, and the resource cards in the odd resource pool are: A5, C7; the resource cards in the mixed resource pool are: B7, B8, B9, F7, H7, H8, A5, C7. User B's resource allocation request is: 3 resource cards with a capacity of 3. First, divide user B's resource allocation request: 3 resource cards with a capacity of 3 into 3 resource allocation tasks. Each resource allocation task corresponds to 1 resource card with a capacity of 3. Then determine the target resource pool. Because the current resource allocation task is 1 resource card with a capacity of 3, 3 is an odd number, so the target resource pool corresponding to the current resource allocation task is the odd resource pool. At this time, the resource cards in the odd resource pool are: A5 and C7. First, satisfy one current resource allocation task, that is, assign the C7 card to the current resource allocation task. At this time, the resource card in the odd resource pool is: A5. The resource cards in the even resource pool remain unchanged, and are still: B7, B8, B9, F7, H7, H8. The resource cards in the mixed resource pool are: A5, B7, B8, B9, F7, H7, H8. There are still 2 resource allocation tasks left to be completed.

[0168] Next, you need to complete two resource allocation tasks in sequence, each of which corresponds to a resource card with a capacity of 3. Complete one of them first, namely: the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity is 3, which is an odd number, the odd resource pool is determined as the target resource pool. Because there is no resource card with a capacity greater than 3 in the target resource pool, the current resource allocation request is determined as an unmatched resource allocation task.

[0169] Next, it is necessary to select a target idle resource card for the unmatched resource allocation task according to a preset method. When the preset resource pool selection method is: determining the mixed resource pool as the candidate resource pool, a resource card with a capacity of 3 should be selected from the mixed resource pool, because the idle resource cards in the mixed resource pool at this time are: A5, B7, B8, B9, F7, H7, H8, among which F7, H7, and H8 can all meet the demand for a capacity of 3, but F7 has the smallest capacity, so F7 is determined as the target idle resource card, and the F7 card is divided into an F71 card with 1 / 2 of the F7 capacity and an F72 card with 1 / 2 of the F7 capacity, and the F71 card is divided into a target resource card, and the F72 card is divided into a fragment resource card, and the F71 card is divided into an unmatched resource allocation task, and the F72 card is updated to the odd resource pool, among which the capacity of the F72 card is 3, so the corresponding address is between 21-30. At this time, the resource cards in the odd resource pool are: A5, F72, the resource cards in the even resource pool are: B7, B8, B9, H7, H8, and the resource cards in the mixed resource pool are: A5, F72, B7, B8, B9, H7, H8. There is only one resource allocation task left to be completed.

[0170] Finally, the remaining resource allocation task is completed, that is, the current resource allocation task is: 1 resource card with a capacity of 3. Because the capacity is 3, which is an odd number, the odd resource pool is determined as the target resource pool. In the target resource pool, the F72 card with a capacity of 3 is found, so F72 is directly allocated to the unmatched resource allocation task. At this time, the last resource allocation task in the resource allocation request of user B has been completed. After the resource allocation requests of users A and B are completed, the resource card in the odd resource pool is: A5 card, the resource cards in the even resource pool are: B9, B7, B8, H7, H8, and the resource cards in the mixed resource pool are: A5, B9, B7, B8, H7, H8. According to the calculation formula of the fragmentation rate: (W1+W2+W3+W4+W5+W5+W7) / W, W1 represents: the sum of all resource cards with a single-chip capacity of 1 in the resource pool, and the sum of all resource cards with a single-chip capacity of 1 is less than 8; W2 represents: the sum of all resource cards with a single-chip capacity of 2 in the resource pool, and the sum of all resource cards with a single-chip capacity of 2 is less than 8; W3 represents: the sum of all resource cards with a single-chip capacity of 3 in the resource pool, and the sum of all resource cards with a single-chip capacity of 3 is less than 8; W4 represents: the sum of all resource cards with a single-chip capacity of 4 in the resource pool, and the sum of all resource cards with a single-chip capacity of 4 is less than 8; W5 represents: all resource cards with a single-chip capacity of 5 in the resource pool The sum of all resource cards with a single-chip capacity of 5 is less than 8, W6 represents: the sum of all resource cards with a single-chip capacity of 6 in the resource pool, and the sum of all resource cards with a single-chip capacity of 6 is less than 8, W7 represents: the sum of all resource cards with a single-chip capacity of 7 in the resource pool, and the sum of all resource cards with a single-chip capacity of 7 is less than 8, W represents: the total capacity of resource cards in the resource pool, that is: W1+W2+W3+W4+W5+W6+W7+W8, so at this time, W1 in the mixed resource pool is 1, W2 is 6, W3, W4, W5, W6, and W7 are all 0, and W8 is 16, that is: W=1+6+16, so the fragmentation rate is (1+6) / (1+6+16), which is about 30%.In the resource matching method in the prior art, four cards with a capacity of 1 in the resource pool are first used to satisfy the resource allocation request of user A at one time, that is, A1, A2, A3, and A4 are allocated to the resource allocation request of user A at one time. For the three resource allocation requests with a capacity of 3 proposed by user B, C7 in the resource pool is first used to satisfy the resource demand of one card with a capacity of 3. There are two resource allocation requests with a capacity of 3, which are satisfied by one F7 card and one H7 card in the resource pool at the same time, that is, the F7 card is divided into F71 with 1 / 2 of the F7 capacity and F72 with 1 / 2 of the remaining F7 capacity; the H7 is divided into H71 with 3 / 8 of the H7 capacity and H72 with 5 / 8 of the remaining H7 capacity; the F7 is divided into 1 and H71 are simultaneously allocated to 2 resource allocation requests with a capacity of 3. At this time, the resource cards in the resource pool are: A5, B7, B8, B9, H72, H72, H8. According to the fragmentation rate calculation formula, W1 is 1, W2 is 6, W3 is 3, W4 is 0, W5 is 5, and W8 is 8, that is, W=1+6+3+5+8, so the fragmentation rate is: (1+6+3+5) / (1+6+3+5+8), which is about 65%. In this embodiment, the fragmentation rate is about 30% after matching the user's needs. In the prior art, the fragmentation rate is about 65% after matching the user's needs. It can be seen that the solution provided in this embodiment reduces the fragmentation rate caused by the resource matching process.

[0171] The resource allocation method provided in this embodiment first generates multiple resource allocation tasks according to the resource allocation request, and then allocates resource cards to each resource allocation task one by one. When no idle resource card corresponding to the current resource allocation task is found in the resource pool, a target idle resource card is selected according to a preset method, and the target idle resource card is divided into a target resource card and a fragment resource card corresponding to the current resource allocation task. Finally, the target resource card is allocated to the current resource allocation task, and the fragment resource card is updated to the resource pool in time for other resource allocation tasks to call. When matching resource cards, resources are matched one by one, and resources are reasonably scheduled according to the task requirements of the remaining resource cards that have not been matched, thereby enhancing the training efficiency of artificial intelligence and reducing the generation of resource fragments.

[0172] In order to better implement the resource allocation method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above resource allocation method. The meanings of the terms are the same as those in the above resource allocation method, and the specific implementation details can refer to the description in the method embodiment.

[0173] See also Figure 7 , Figure 7 A schematic diagram of the structure of a resource allocation device provided in an embodiment of the present application, wherein the resource allocation device may include:

[0174] The task generation module 701 is used to generate multiple resource allocation tasks according to the resource allocation request;

[0175] The resource query module 702 is used for querying, for a current resource allocation task among the multiple resource allocation tasks, free resource cards of corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, determining the current resource allocation task as an unmatched resource allocation task;

[0176] The resource matching module 703 is used to select a target idle resource card for the unmatched resource allocation task according to a preset method;

[0177] The resource splitting module 704 is used to divide the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task;

[0178] The resource allocation module 705 is used to allocate the target resource card to the unmatched resource allocation task;

[0179] The resource updating module 706 is used to update the fragment resource card as an idle resource card to the resource pool;

[0180] In one embodiment, the resource allocation device also includes: a resource pool division module, which is used to divide the resource pool into at least two characteristic resource pools and a mixed resource pool according to the capacity characteristics of the resource card capacity of each idle resource card in the resource pool; different characteristic resource pools include idle resource cards with different capacity characteristics, and the mixed resource pool includes all idle resource cards; the resource update module is used to update the fragment resource card as an idle resource card to the corresponding characteristic resource pool according to the capacity characteristics of the resource card capacity of the fragment resource card.

[0181] In some embodiments, the task generation module 701 is specifically used to: after receiving a resource allocation request sent by a user, parse to obtain the resource card type corresponding to the resource allocation request and the required quantity corresponding to each resource card type, and generate multiple resource allocation tasks according to the resource allocation request, wherein the resource allocation request carries at least one resource card capacity and the required quantity of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of resource card required capacities.

[0182] In some embodiments, the resource query module 702 is specifically used to: determine the target characteristic resource pool corresponding to the current resource allocation task based on the capacity characteristics of the resource card capacity of the current resource allocation task; query the target characteristic resource pool for the free resource card corresponding to the required capacity of the resource card; if the free resource card corresponding to the required capacity of the resource card is not queried from the target characteristic resource pool, it is determined that the free resource card corresponding to the required capacity of the resource card of the current resource allocation task is not queried from the resource pool.

[0183] In one embodiment, the resource query module 702 is used to: query the target feature resource pool for idle resource cards whose resource card capacity is the same as the required capacity of the resource card; if no corresponding idle resource card is found, it is determined that an idle resource card corresponding to the required capacity of the resource card has not been found in the target feature resource pool.

[0184] In one embodiment, the resource query module 702 is used to: query the target feature resource pool for idle resource cards whose resource card capacity is greater than the required capacity of the resource card; if no corresponding idle resource card is found, it is determined that an idle resource card corresponding to the required capacity of the resource card has not been found in the target feature resource pool.

[0185] In some embodiments, the resource matching module 703 is specifically used to: determine a candidate resource pool from the mixed resource pool or the non-target feature resource pool according to the preset resource pool selection method; and select the target idle resource card from the candidate resource pool for the unmatched resource allocation task according to the preset resource card selection method.

[0186] In one embodiment, the resource matching module 703 is used to: select an idle resource card whose resource card capacity is greater than the required capacity of the resource card from the candidate resource pool and determine it as a candidate idle resource card; and determine the target idle resource card from the candidate idle resource cards according to the preset resource card selection method.

[0187] In one embodiment, the resource matching module 703 is used to: obtain the total demand amount of resource card demand capacity of multiple or all unmatched resource allocation tasks; select idle resource cards whose resource card capacity is greater than or equal to the total demand amount of resource cards from the candidate resource pool, and determine them as candidate idle resource cards; and determine the target idle resource card from the candidate idle resource cards according to the preset resource card selection method.

[0188] In some embodiments, the resource update module 706 is specifically used to: after the target resource card is allocated to the unmatched resource allocation task, update the remaining fragment resource cards in the target free resource card to the corresponding resource pool according to the characteristics.

[0189] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described in detail here.

[0190] The present application also provides a server, such as Fig.12 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:

[0191] The server includes one or more processing core processors 1201, one or more computer-readable storage media memories 1202, a power supply 1204, an input unit 1203 and other components. Those skilled in the art will appreciate that Fig.12 The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0192] The processor 1201 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server. By running or executing software programs and / or modules stored in the memory 1202, and calling data stored in the memory 1202, the processor 1201 performs various functions of the server and processes data, thereby controlling the server as a whole. Optionally, the processor 1201 may include one or more processing cores; preferably, the processor 1201 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1201.

[0193] The memory 1202 can be used to store software programs and modules. The processor 1201 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202. The memory 1202 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 902 may also include a memory controller to provide the processor 1201 with access to the memory 1202.

[0194] The server also includes a power supply 1204 for supplying power to various components. Preferably, the power supply 1204 can be logically connected to the processor 1201 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 1204 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0195] The server may further include an input unit 1203, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0196] Although not shown, the server may also include a display processor, etc., which will not be described in detail here. Specifically in this embodiment, the processor 1201 in the server will load the executable files corresponding to the processes of one or more applications into the memory 1202 according to the following instructions, and the processor 1201 will run the application stored in the memory 1202, thereby realizing various functions, as follows:

[0197] Generate multiple resource allocation tasks according to a resource allocation request; the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required capacity of resource cards;

[0198] For a current resource allocation task among the multiple resource allocation tasks, query a free resource card of a corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, determine the current resource allocation task as an unmatched resource allocation task;

[0199] Selecting a target idle resource card for the unmatched resource allocation task according to a preset method;

[0200] Dividing the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task;

[0201] Allocating the target resource card to the unmatched resource allocation task;

[0202] The fragment resource card is updated as an idle resource card to the resource pool.

[0203] In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, please refer to the detailed description above and will not be repeated here.

[0204] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0205] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the resource allocation methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0206] Generate multiple resource allocation tasks according to a resource allocation request; the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required capacity of resource cards;

[0207] For a current resource allocation task among the multiple resource allocation tasks, query a free resource card of a corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, determine the current resource allocation task as an unmatched resource allocation task;

[0208] Selecting a target idle resource card for the unmatched resource allocation task according to a preset method;

[0209] Dividing the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task;

[0210] Allocating the target resource card to the unmatched resource allocation task;

[0211] The fragment resource card is updated as an idle resource card to the resource pool.

[0212] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0213] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0214] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the resource allocation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the resource allocation methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here. At the same time, the embodiments of the present application provide a computer program product or a computer program, which includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the above-mentioned various optional implementations. For example, the following functions are realized:

[0215] Generate multiple resource allocation tasks according to a resource allocation request; the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required capacity of resource cards;

[0216] For a current resource allocation task among the multiple resource allocation tasks, query a free resource card of a corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, determine the current resource allocation task as an unmatched resource allocation task;

[0217] Selecting a target idle resource card for the unmatched resource allocation task according to a preset method;

[0218] Dividing the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task;

[0219] Allocating the target resource card to the unmatched resource allocation task;

[0220] The fragment resource card is updated as an idle resource card to the resource pool.

[0221] The above is a detailed introduction to a resource allocation method, device, server and computer-readable storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A resource allocation method, characterized in that: include: According to the capacity characteristics of the resource card capacity of each idle resource card in the resource pool, the resource pool is divided into at least two characteristic resource pools and a mixed resource pool; the different characteristic resource pools include idle resource cards with different capacity characteristics, and the mixed resource pool includes all idle resource cards; Generate multiple resource allocation tasks according to a resource allocation request; the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required capacity of resource cards; For a current resource allocation task among the multiple resource allocation tasks, query a free resource card of a corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, determine the current resource allocation task as an unmatched resource allocation task; Selecting a target idle resource card for the unmatched resource allocation task according to a preset method; Dividing the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task; Allocating the target resource card to the unmatched resource allocation task; According to the capacity characteristics of the resource card capacity of the fragment resource card, the fragment resource card is updated as an idle resource card to the corresponding characteristic resource pool.

2. The resource allocation method according to claim 1, characterized in that: The step of searching the resource pool for free resource cards with corresponding resource card capacity according to the resource card required capacity of the current resource allocation task includes: Determining a target characteristic resource pool corresponding to the current resource allocation task according to the capacity characteristics of the resource card capacity of the current resource allocation task; Querying the target characteristic resource pool for an idle resource card corresponding to the required capacity of the resource card; If no idle resource card corresponding to the resource card demand capacity is found in the target characteristic resource pool, it is determined that no idle resource card corresponding to the resource card demand capacity of the current resource allocation task is found in the resource pool.

3. The resource allocation method according to claim 2, characterized in that: The step of searching the target characteristic resource pool for free resource cards corresponding to the required capacity of the resource card comprises: Searching the target characteristic resource pool for idle resource cards whose resource card capacity is the same as the required capacity of the resource card; If no corresponding idle resource card is found, it is determined that no idle resource card corresponding to the required capacity of the resource card is found in the target characteristic resource pool.

4. The resource allocation method according to claim 2, characterized in that: The step of searching the target characteristic resource pool for free resource cards corresponding to the required capacity of the resource card comprises: Searching the target characteristic resource pool for idle resource cards whose resource card capacity is greater than the required capacity of the resource card; If no corresponding idle resource card is found, it is determined that no idle resource card corresponding to the required capacity of the resource card is found in the target characteristic resource pool.

5. The resource allocation method according to claim 1, characterized in that: The preset method includes a preset resource pool selection method and a preset resource card selection method; the step of selecting a target idle resource card for the unmatched resource allocation task according to the preset method includes: Determine a candidate resource pool from the mixed resource pool or the non-target feature resource pool according to the preset resource pool selection method; According to the preset resource card selection method, the target idle resource card is selected from the candidate resource pool for the unmatched resource allocation task.

6. The resource allocation method according to claim 5, characterized in that: The step of selecting the target idle resource card for the unmatched resource allocation task from the candidate resource pool according to the preset resource card selection method comprises: Selecting an idle resource card whose resource card capacity is greater than the required capacity of the resource card from the candidate resource pool and determining it as a candidate idle resource card; According to the preset resource card selection method, the target idle resource card is determined from the candidate idle resource cards.

7. The resource allocation method according to claim 5, characterized in that: The step of selecting the target idle resource card from the candidate resource pool according to the preset resource card selection method includes: Get the total demand amount of resource card demand capacity of multiple or all unmatched resource allocation tasks; Selecting idle resource cards whose resource card capacity is greater than or equal to the total required amount of resource cards from the candidate resource pool and determining them as candidate idle resource cards; According to the preset resource card selection method, the target idle resource card is determined from the candidate idle resource cards.

8. A resource allocation device, characterized in that: include: A resource pool division module, used for dividing the resource pool into at least two characteristic resource pools and a mixed resource pool according to the capacity characteristics of the resource card capacity of each idle resource card in the resource pool; the different characteristic resource pools include idle resource cards with different capacity characteristics, and the mixed resource pool includes all idle resource cards; A task generation module, used to generate multiple resource allocation tasks according to a resource allocation request; the resource allocation request carries at least one resource card capacity and the required number of resource cards corresponding to each resource card capacity, and the resource allocation task corresponds to a preset number of required resource card capacities; A resource query module is used to query a free resource card of a corresponding resource card capacity from a resource pool according to the resource card demand capacity of the current resource allocation task among the multiple resource allocation tasks; when no free resource card corresponding to the resource card demand capacity of the current resource allocation task is queried from the resource pool, the current resource allocation task is determined as an unmatched resource allocation task; A resource matching module, used for selecting a target idle resource card for the unmatched resource allocation task according to a preset method; A resource splitting module, used for dividing the target idle resource card into a target resource card and a fragment resource card corresponding to the unmatched resource allocation task; A resource allocation module, used to allocate the target resource card to the unmatched resource allocation task; The resource updating module is used to update the fragment resource card as an idle resource card to the corresponding characteristic resource pool according to the capacity characteristics of the resource card capacity of the fragment resource card.

9. A server, characterized in that: The server includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the resource allocation method according to any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Task scheduling method and device based on GPU resources and medium

    CN111552550A