Resource allocation method, device and equipment and computer readable storage medium

By classifying pending requests and determining the target resource allocation algorithm, the problem of frequent replacement of resource allocation in the chip system cache is solved, improving performance and avoiding resource waste and cache thrashing.

CN118672968APending Publication Date: 2024-09-20伟光有限公司(CN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310251401.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-15
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In the chip system cache, frequent resource allocation and replacement behavior leads to performance degradation and resource waste, causing cache thrashing.

Method used

By classifying the requests to be processed, the target resource allocation algorithm is determined based on its attribute information and storage resource information, and the algorithm is used for resource allocation to avoid frequent allocation and replacement.

Benefits of technology

It improves the performance of system cache, avoids resource waste and cache turbulence, and ensures the stability of system cache scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672968A
    Figure CN118672968A
Patent Text Reader

Abstract

The invention discloses a resource allocation method, which is applied to resource allocation equipment, and the method comprises the steps: if a to-be-processed request is obtained, classifying the to-be-processed request based on the attribute information of the to-be-processed request and the information of a storage resource corresponding to the to-be-processed request; based on a classification result, determining a target resource allocation algorithm corresponding to the to-be-processed request; wherein the target resource allocation algorithm is used for allocating resources to the to-be-processed request; and allocating storage resources to the to-be-processed request by adopting the target resource allocation algorithm. The invention also discloses a resource allocation device and equipment and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a resource allocation method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] The performance of the chip's system cache is a core focus of the system. Because the system cache interfaces with numerous subsystems, external requests occur constantly. For example, there might be no new requests for a period, while multiple requests might occur simultaneously or repeatedly. Concurrent or continuous requests force the system cache to constantly restart its resource allocation mechanism, reassessing the position of new requests within the resource group. Especially when allocating resources for requests with similar priorities, replacing old allocations with new ones causes a reallocation of the cache line; the old allocation is also evicted and flushed to Double Data Rate (DDR). However, these allocation and replacement actions consume system cache resources. Repeated replacements cause constant evictions of the cache line, significantly degrading the performance of the System-on-Chips (SoC), causing cache thrashing and wasting resources. Summary of the Invention

[0003] This application aims to provide a resource allocation method, apparatus, device, and computer-readable storage medium, which solves the problem of frequent allocation and replacement of cache resources in related technologies, improves the performance of the SOC, and avoids resource waste and cache thrashing.

[0004] The technical solution of this application is implemented as follows:

[0005] A resource allocation method, applied to a resource allocation device, the method comprising:

[0006] If a request to be processed is obtained, the request to be processed is classified based on the attribute information of the request to be processed and the information of the storage resources corresponding to the request to be processed.

[0007] Based on the classification results, a target resource allocation algorithm corresponding to the request to be processed is determined; wherein, the target resource allocation algorithm is used to allocate resources to the request to be processed.

[0008] The target resource allocation algorithm is used to allocate storage resources to the request to be processed.

[0009] A resource allocation device, the device comprising:

[0010] A classification unit is used to classify a request to be processed based on the attribute information of the request to be processed and the information of the storage resources corresponding to the request to be processed if a request to be processed is obtained.

[0011] A determining unit is configured to determine, based on the classification results, the target resource allocation algorithm corresponding to the request to be processed; wherein, the target resource allocation algorithm is used to allocate resources to the request to be processed;

[0012] The processing unit is used to allocate storage resources to the request to be processed using the target resource allocation algorithm.

[0013] A resource allocation device, the resource allocation device comprising: a processor, a memory, and a communication bus;

[0014] The communication bus is used to realize the communication connection between the processor and the memory;

[0015] The processor is used to execute a resource allocation program stored in the memory to implement the steps of the resource allocation method described above.

[0016] A computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the resource allocation method described above.

[0017] The resource allocation method, apparatus, device, and computer-readable storage medium provided in the embodiments of this application, upon receiving a request to be processed, classifies the request based on its attribute information and the information of the storage resources corresponding to the request. Based on the classification result, a target resource allocation algorithm corresponding to the request is determined. The target resource allocation algorithm is used to allocate resources to the request to be processed. By using the target resource allocation algorithm to allocate storage resources to the request to be processed, requests can be classified according to their attributes and storage resource information, and a corresponding resource allocation algorithm can be determined for each request based on its category. That is, requests of the same category use the same resource allocation algorithm to allocate storage resources, instead of allocating resources for all requests in the same way as in related technologies. This avoids frequent allocation and replacement, improves the performance of the SOC, and avoids resource waste. Attached Figure Description

[0018] Figure 1 A flowchart illustrating a resource allocation method provided for an embodiment of this application;

[0019] Figure 2 A flowchart illustrating another resource allocation method provided for embodiments of this application;

[0020] Figure 3 A schematic diagram illustrating the classification of requests to be processed in a resource allocation method provided in an embodiment of this application;

[0021] Figure 4 A schematic diagram illustrating whether to trigger a new allocation in a resource allocation method provided in an embodiment of this application;

[0022] Figure 5 A schematic diagram illustrating a target resource allocation algorithm in a resource allocation method provided for an embodiment of this application;

[0023] Figure 6 A schematic diagram of the structure of a resource allocation device provided for an embodiment of this application;

[0024] Figure 7 This is a schematic diagram of the structure of a resource allocation device provided for an embodiment of this application. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0026] The embodiments of this application can provide a resource allocation method and apparatus, device, and computer-readable storage medium. In practical applications, the resource allocation method can be implemented by a resource allocation apparatus, and the functional entities in the resource allocation apparatus can be collaboratively implemented by the hardware resources of computer devices (such as headphones, wristbands, tablets, mobile phones, televisions, and other electronic devices), such as computing resources like processors and communication resources (such as those used to support various communication methods such as optical cables and cellular networks).

[0027] Of course, the embodiments of this application are not limited to providing methods and hardware, and can also be implemented in various ways, such as providing a storage medium (storing instructions for executing the resource allocation control method provided in the embodiments of this application).

[0028] Embodiments of this application provide a resource allocation method applied to a resource allocation device, with reference to... Figure 1 As shown, the method may include the following steps:

[0029] Step 101: If a request to be processed is obtained, classify the request based on its attribute information and the storage resource information corresponding to the request.

[0030] Here, a pending request can refer to any request originating from an external device or user that accesses a resource allocation device and requires the allocation of corresponding cache resources. Furthermore, a pending request can include multiple requests that need to be processed; that is, there can be multiple pending requests. It should be noted that the attribute information of a pending request can refer to the inherent information of the pending request itself; the information of the storage resource corresponding to the pending request can refer to some key information of the cache space corresponding to the pending request. In one feasible implementation, the attribute information of the pending request can characterize the level of the pending request; the information of the storage resource corresponding to the pending request can characterize the key information of the cache space corresponding to the pending request itself.

[0031] In other embodiments of this application, requests to be processed can be classified based on their attribute information and key information of the cache space corresponding to the requests. In one feasible implementation, requests to be processed can be classified twice based on their attribute information and key information of the cache space. The second classification can be a further classification of each category of requests to be processed obtained from the first classification.

[0032] Step 102: Based on the classification results, determine the target resource allocation algorithm corresponding to the request to be processed.

[0033] The target resource allocation algorithm is used to allocate resources to requests that are pending processing.

[0034] In this embodiment, the target resource allocation algorithm can be specific to each type of request to be processed; that is, the target resource allocation algorithm is the same for the same type of request to be processed; the target resource allocation algorithms for different types of requests to be processed can be the same or different. Furthermore, the target resource classification algorithm can be a fair competition algorithm for the same type of request to be processed.

[0035] It should be noted that the resource allocation device can determine the corresponding target resource classification algorithm for each type of pending request.

[0036] Step 103: Use the target resource allocation algorithm to allocate storage resources to the requests to be processed.

[0037] In this embodiment, after determining the target resource allocation algorithm corresponding to each type of request to be processed, the resource allocation device can apply the target resource allocation algorithm corresponding to its category to allocate storage resources for each type of request to be processed from the storage resources corresponding to that type of request. In one feasible implementation, the storage resources can refer to the cache space in the storage space of the resource allocation device; that is, for each type of request to be processed, the target resource allocation algorithm corresponding to its category can be applied to allocate cache space from the cache space corresponding to that type of request.

[0038] It should be noted that because the target resource allocation algorithm is the same for the same type of pending requests, it is equivalent to using a fair competition algorithm to determine the cache space for the same type of pending requests. This avoids frequent allocation and replacement, thus effectively preventing cache thrashing and further ensuring the stability of system cache scheduling and improving cache efficiency.

[0039] The resource allocation method provided in the embodiments of this application can classify requests according to the attributes of the requests and the information of the storage resources, and determine the corresponding resource allocation algorithm for the requests according to the category of the requests. That is, requests of the same type use the same resource allocation algorithm to allocate storage resources, instead of all requests using the same method to allocate resources for a single request as in related technologies. This avoids the frequent occurrence of allocation and replacement, improves the performance of the SOC, and avoids the waste of resources.

[0040] Based on the foregoing embodiments, embodiments of this application provide a resource allocation method, see [link to relevant documentation]. Figure 2 As shown, the method may include the following steps:

[0041] Step 201: If a pending request is obtained, the resource allocation device determines the priority of each pending request and the information of the storage resources corresponding to each pending request.

[0042] Among them, the attribute information includes priority.

[0043] In this embodiment of the application, the attribute information of the request to be processed may refer to the priority of the request to be processed; and the priority of the request to be processed and the information of the storage resources corresponding to the request to be processed may be stored in the resource allocation device, and the priority of the request to be processed and the information of the storage resources corresponding to the request to be processed may be read directly from the resource allocation device.

[0044] In one feasible implementation, the information about the storage resources may include the working mode of the cache space, the size of the cache space available to be allocated to the request to be processed, whether the cache space can be shared, and / or the frequency of cache space access. It should be noted that a higher priority for the request to be processed indicates a higher level of processing.

[0045] Step 202: The resource allocation device performs a first classification on multiple pending requests based on priority, and obtains the pending requests after the first classification.

[0046] In this embodiment, the resource allocation device can first classify multiple pending requests according to their priority to obtain the pending requests after the first classification. It should be noted that pending requests with different priorities can be classified into different categories; that is, pending requests with the same priority can be classified into the same category.

[0047] Step 203: Based on the information of storage resources, the resource allocation device performs a second classification on the pending requests after the first classification.

[0048] In this embodiment of the application, for each type of pending request after the first classification, the resource allocation device can perform a second classification based on the key information of the cache space; that is, for each type of pending request after the first classification, a second, more detailed classification can be performed, that is, each first classification can also include multiple types of pending requests after the second classification.

[0049] It should be noted that step 203 can be achieved in the following way:

[0050] Step 203a: For each type of pending request after the first classification, based on the information of storage resources and the target classification threshold, perform a second classification on each type of pending request after the first classification to obtain the second classification result.

[0051] In this embodiment, the target classification threshold can refer to the threshold used for second classification corresponding to the key information of different storage resources. It should be noted that multiple target classification thresholds can be set for the key information of each cache space, taking into account the actual application scenario and historical data. In one feasible implementation, the size of the cache space can correspond to multiple target classification thresholds, and / or the call frequency of the cache space can correspond to multiple target classification thresholds, etc. If the second classification is performed based on all the key information of the cache space, then the second classification can be performed by combining the relationship between all the key information and their respective target classification thresholds.

[0052] In one feasible implementation, the resource allocation device can further classify the requests under each first category into more detailed categories based on the size of the cache space for the requests to be processed, whether the cache space can be shared, and / or the frequency of cache space access. It should be noted that in this embodiment, each major category after priority classification can further include multiple subcategories classified according to the size of the cache space for the requests to be processed, whether the cache space can be shared, and / or the frequency of cache space access.

[0053] Step 204: For each type of pending request after the first classification, the resource allocation device stores pending requests belonging to the same type in the same queue, based on the second classification result.

[0054] In this embodiment of the application, after classifying the pending requests into subcategories a second time within each major category, pending requests belonging to the same subcategory can be stored in the same queue under that major category. Each major category can include multiple queues; that is, each major category can include multiple subcategories, meaning that pending requests belonging to the same major category can be further divided into multiple subcategories.

[0055] In one feasible implementation, if the requests to be processed include different requests 0, 1, ..., and n from multiple systems, namely system 1, system 2, and system 3, then... Figure 3 The diagram shows how to extract the attribute information of requests from each system and the key information of the corresponding cache space (i.e., x0, x1, ..., xn), classify the requests from each system, and finally obtain category 0, category 1, ..., and category n; each category includes multiple queues; for example, category 0 includes queue 0, queue 1, ..., and queue n, and category n includes queue 0, queue 1, ..., and queue n, etc.

[0056] It should be noted that after step 204, you can choose to execute steps 205-206, or execute step 207.

[0057] Step 205: If the priority of the request to be processed does not meet the preset priority condition, the resource allocation device determines the target resource allocation algorithm for each type of request after the first category.

[0058] In this embodiment, after classifying multiple pending requests twice, the resource allocation device can first determine whether a pending request requiring resource allocation needs to trigger a new allocation, thereby determining whether the pending request can trigger the start determination and use the target resource allocation algorithm. Specifically, the need to trigger a new allocation can be determined based on the priority of the pending request. If the priority is less than or equal to a preset priority (i.e., the priority of the pending request is not high enough), it can be determined that the priority of the pending request does not meet the preset priority condition; at this time, it can be considered that no new allocation needs to be triggered for the pending request, and then the target resource allocation algorithm for each category of pending requests after the first classification can be determined. In one feasible implementation, such as... Figure 4 As shown, if the requests to be processed can include request 0, request 1, ..., and request n, they can be classified twice based on their respective attribute information and the key information of the corresponding cache space (i.e., x0, x1, ..., xn). After classification, it is determined whether to trigger a new allocation based on the priority of the requests. If the priority is less than or equal to the preset priority, the target resource allocation algorithm can be determined at this time. Each request n corresponds to an xn.

[0059] In other embodiments of this application, the target resource allocation algorithm may include: Round Robin algorithm, Least Recently Used (LRU-min) algorithm, First In First Out (FIFO) algorithm, Least Frequently Used (LFU-threshold) algorithm, or Hybrid algorithm; that is, the target resource allocation algorithm is one of the Round Robin algorithm, LRU-min algorithm, FIFO algorithm, LFU-threshold algorithm, and Hybrid algorithm.

[0060] The Round Robin algorithm allocates cache space by polling. Requests that have already been polled are not allocated cache space, while requests from queues that haven't been polled are allocated cache space. This process continues until all requests in a queue have been polled. The LRU-min algorithm excludes requests that have been least recently used (i.e., requests whose usage frequency hasn't reached the minimum value). The FIFO algorithm prioritizes the earliest accessed request for cache allocation. The LFU-threshold algorithm excludes requests whose access frequency hasn't reached a certain threshold. The Hybrid algorithm assigns an energy efficiency function to each queue, determined based on cache size, whether the cache can be shared, cache access frequency, and / or the number of shared subsystems. It's important to note that requests with higher energy efficiency values ​​are allocated cache space first.

[0061] It should be noted that step 205 can be achieved through step 205a, or step 205b, or steps 205c-205d.

[0062] Step 205a: For each queue of pending requests in each category, the resource allocation device determines the target resource allocation algorithm from the candidate resource allocation algorithms based on the information of the stored resources.

[0063] In this embodiment, for each queue of requests to be processed within each major category, the resource allocation device can automatically select a target resource allocation algorithm from the candidate resource allocation algorithms based on the size of the cache space for the requests to be processed, whether the cache space can be shared, and / or the frequency of cache space access. In one feasible implementation, the candidate resource allocation algorithms may include algorithms such as Round Robin, LRU-min, FIFO, LFU-threshold, and Hybrid algorithms.

[0064] Alternatively, in step 205b, the resource allocation device receives the user's first selection information for each queue of pending requests in each category, and determines the target resource allocation algorithm from the candidate resource allocation algorithms based on the first selection information.

[0065] In this embodiment, for each queue of pending requests within each major category, the resource allocation device can select a target resource allocation algorithm from the candidate resource allocation algorithms based on the user-inputted first selection information. The user-inputted first selection information can be generated after the user selects from Round Robin, LRU-min, FIFO, LFU-threshold, and Hybrid algorithms; that is, the candidate resource allocation algorithms such as Round Robin, LRU-min, FIFO, LFU-threshold, and Hybrid can be displayed. If the user has a preferred algorithm, they can select that algorithm to generate the first selection information. The resource allocation device can then determine that the candidate resource allocation algorithm in the user-selected first selection information is the final target resource allocation algorithm.

[0066] Alternatively, in step 205c, the resource allocation device receives the user's second selection information for each queue of pending requests in each category.

[0067] In this embodiment of the application, the second selection information may also be the information generated after the user selects the resource allocation algorithm that he / she currently wants to use from the candidate resource allocation algorithms; the second selection information may contain an identifier of the resource allocation algorithm selected by the user or indicate which resource allocation algorithm the user has selected; wherein the second selection information may be the same as or different from the first selection information.

[0068] Step 205d: The resource allocation device determines the target resource allocation algorithm from the candidate resource allocation algorithms based on the second selection information and the information of the storage resources.

[0069] In this embodiment, for each queue of requests to be processed within each major category, the resource allocation device can select a target resource allocation algorithm from the candidate resource allocation algorithms based on key information of the cache space and second selection information input by the user. In other words, the target resource allocation algorithm is determined by combining the key information of the cache space and the second selection information.

[0070] In one feasible implementation, such as Figure 5 As shown, the size of the cache space for the pending requests, whether the cache space can be shared, and / or the frequency of cache space calls, as well as the second selection information generated after the user selects an algorithm, can be used to jointly determine the target resource allocation algorithm from the Round Robin algorithm, LRU-min algorithm, FIFO algorithm, LFU-threshold algorithm, and Hybrid algorithm. After the target resource allocation algorithm is determined, the corresponding software and hardware information can be set to execute the target resource allocation algorithm.

[0071] Step 206: For each queue of pending requests in each category, if there are unused free storage resources in the storage resources corresponding to each category, the resource allocation device uses the target resource allocation algorithm to allocate storage resources from the free storage resources to each queue of pending requests in each category.

[0072] In this embodiment, a queue under a major category may contain multiple candidate requests that need to be allocated to cache space. When multiple candidate requests exist, if it is determined that there is unused cache space in the cache space corresponding to the major category to which the candidate request belongs, resource allocation can be automatically triggered. Then, a defined target resource allocation algorithm can be used to allocate the required cache space to the candidate request from the cache space. In one feasible implementation, the free cache space can be inherently present or generated after the cache resources of a certain request are released.

[0073] It should be noted that requests for the same category (major category) are only allowed to be allocated and become new candidates when there is free cache space. Whether cache resources can be successfully allocated ultimately depends on the cache resources available in the system.

[0074] In other embodiments of this application, when allocating cache resources to a request using the target resource allocation algorithm, the cache space allocation may be automatically triggered using a determined fair competition scheduling algorithm (i.e., the target resource allocation algorithm) when there is available cache space in the system's cache space.

[0075] Step 207: If the priority of the request to be processed meets the preset priority condition, the resource allocation device allocates storage resources to the request to be processed.

[0076] In this embodiment, if the priority of the request to be processed is greater than the preset priority (i.e., the priority of the request to be processed is sufficiently high), it can be determined that the priority of the request to be processed meets the preset priority condition; at this time, it can be considered that a new allocation can be triggered for the request to be processed, and therefore, it is not necessary to determine and use the target resource allocation algorithm for the request to be processed. Figure 4 As shown, the required cache space can be allocated directly from the cache space to the processing request, thereby ensuring that the request to be processed can proceed with subsequent operations smoothly.

[0077] In other embodiments of this application, the method may further include the following steps:

[0078] Step 208: For each queue of pending requests, the resource allocation device marks the pending requests for which storage resources have been allocated with first tag information.

[0079] The first tag information represents the current scheduling status of pending requests that have completed storage resource allocation.

[0080] In this embodiment, the first tag information may refer to information in the queue. That is, the first tag information needs to be updated after each cache space allocation to ensure successful and accurate allocation of cache space for other requests. In one feasible implementation, the first tag information may include information about cache space allocation for the request, such as whether scheduling was performed and whether the scheduling was successful.

[0081] Step 209: For each type of pending request, the resource allocation device marks each type of pending request with a second tag information.

[0082] The second tag information represents the current allocation information and storage resource information for each type of pending request.

[0083] In this embodiment, the second tag information may refer to information in the category; that is, the second tag information needs to be updated after each allocation of cache space to ensure that cache space is successfully and accurately allocated to other requests subsequently. In one feasible implementation, the second tag information may include allocation information, the actual size of the allocated cache space, the working mode of the cache space, the location of the cache space, and other information.

[0084] In other embodiments of this application, this application can effectively allocate cache space even in scenarios with numerous similar scenarios, minimal priority differences between scenarios, and low distinguishability, thus avoiding cache thrashing. Furthermore, a specific resource allocation algorithm can ensure orderly competition among similar scenarios, satisfying fair competition conditions and reducing disorderly and unprofitable reallocation. For example, it prevents newly allocated partitions from being repeatedly switched due to new similar requests, reducing the repeated replacement of worthless cache lines and lowering the likelihood of cache thrashing from a control perspective.

[0085] It should be noted that the descriptions of the same steps and contents as in other embodiments in this embodiment can be found in the descriptions in other embodiments, and will not be repeated here.

[0086] The resource allocation method provided in the embodiments of this application can classify requests according to the attributes of the requests and the information of the storage resources, and determine the corresponding resource allocation algorithm for the requests according to the category of the requests. That is, requests of the same type use the same resource allocation algorithm to allocate storage resources, instead of all requests using the same method to allocate resources for a single request as in related technologies. This avoids the frequent occurrence of allocation and replacement, improves the performance of the SOC, and avoids the waste of resources.

[0087] Based on the foregoing embodiments, embodiments of this application provide a resource allocation device that can be applied to... Figure 1 and 2 In the resource allocation method provided in the corresponding embodiment, refer to Figure 6 As shown, the resource allocation device 3 may include: a classification unit 31, a determination unit 32, and a processing unit 33, wherein:

[0088] The classification unit 31 is used to classify the request to be processed based on the attribute information of the request to be processed and the information of the storage resources corresponding to the request to be processed if the request to be processed is obtained.

[0089] Determine Unit 32, which is used to determine the target resource allocation algorithm corresponding to the request to be processed based on the classification results; wherein, the target resource allocation algorithm is used to allocate resources to the request to be processed;

[0090] Processing unit 33 is used to allocate storage resources to the requests to be processed using a target resource allocation algorithm.

[0091] In other embodiments of this application, the classification unit 31 is also used to implement the following steps:

[0092] Determine the priority of each pending request and the information of the storage resources corresponding to each pending request;

[0093] Among them, the attribute information includes priority;

[0094] Based on priority, multiple pending requests are first-classified to obtain the pending requests after the first classification.

[0095] Based on the information of storage resources, the pending requests after the first classification are classified into a second classification.

[0096] In other embodiments of this application, the classification unit 31 is further configured to perform a second classification on each type of pending request after the first classification, based on the information of the storage resources and the target classification threshold, to obtain a second classification result.

[0097] In other embodiments of this application, the determining unit 32 is further configured to perform the following steps:

[0098] If the priority of the pending request does not meet the preset priority condition, determine the target resource allocation algorithm for each pending request after the first category.

[0099] If the priority of the request to be processed meets the preset priority condition, storage resources are allocated to the request to be processed.

[0100] In other embodiments of this application, the processing unit 33 is further configured to store the requests to be processed that belong to the same category, as represented by the second classification result, into the same queue for each type of request to be processed after the first classification.

[0101] In other embodiments of this application, the determining unit 32 is further configured to perform the following steps:

[0102] For each queue of requests in each category, the target resource allocation algorithm is determined from the candidate resource allocation algorithms based on the information of storage resources.

[0103] Alternatively, for each queue of pending requests in each category, the system receives the user's first selection information and determines the target resource allocation algorithm from the candidate resource allocation algorithms based on the first selection information.

[0104] In other embodiments of this application, the determining unit 32 is further configured to perform the following steps:

[0105] For each queue of pending requests in each category, receive the user's second selection information;

[0106] Based on the second selection information and the information on storage resources, the target resource allocation algorithm is determined from the candidate resource allocation algorithms.

[0107] In other embodiments of this application, the processing unit 33 is further configured to perform the following steps:

[0108] For each queue of requests in each category, if there are unused free storage resources in the storage resources corresponding to each category, the target resource allocation algorithm is used to allocate storage resources from the free storage resources to each queue of requests in each category.

[0109] It should be noted that the interaction process between the various units in the embodiments of this application can be referred to Figure 1 and 2 The implementation process of the resource allocation method provided in the corresponding embodiments will not be described in detail here.

[0110] The resource allocation apparatus provided in the embodiments of this application can classify requests according to the attributes of the requests and the information of the storage resources, and determine the corresponding resource allocation algorithm for the requests according to the category of the requests. That is, requests of the same type use the same resource allocation algorithm to allocate storage resources, instead of all requests using the same method to allocate resources for a single request as in related technologies. This avoids the frequent occurrence of allocation and replacement, improves the performance of the SOC, and avoids the waste of resources.

[0111] Embodiments of this application provide a resource allocation device that can be applied to... Figure 1 In the resource allocation method provided in the embodiments corresponding to 1 and 2, refer to Figure 7 As shown, the resource allocation device 4 may include: a processor 41, a memory 42, and a communication bus 43, wherein:

[0112] The communication bus 43 is used to realize the communication connection between the processor 41 and the memory 42.

[0113] The processor 41 is used to execute the resource allocation program stored in the memory 42 to perform the following steps:

[0114] If a request to be processed is obtained, it is classified based on the attribute information of the request and the information of the storage resources corresponding to the request.

[0115] Based on the classification results, the target resource allocation algorithm corresponding to the request to be processed is determined; wherein, the target resource allocation algorithm is used to allocate resources to the request to be processed.

[0116] A target resource allocation algorithm is used to allocate storage resources to requests to be processed.

[0117] In other embodiments of this application, the processor 41 is used to execute the resource allocation program in the memory 42 to classify the requests to be processed based on the attribute information of the requests to be processed and the information of the storage resources corresponding to the requests to be processed, and may also implement the following steps:

[0118] Determine the priority of each pending request and the information of the storage resources corresponding to each pending request;

[0119] Among them, the attribute information includes priority;

[0120] Based on priority, multiple pending requests are first-classified to obtain the pending requests after the first classification.

[0121] Based on the information of storage resources, the pending requests after the first classification are classified into a second classification.

[0122] In other embodiments of this application, the processor 41 is used to execute a resource allocation program in the memory 42 based on storage resource information, and to perform a second classification on each type of pending request after the first classification, in order to implement the following steps:

[0123] For each type of pending request after the first classification, a second classification is performed based on the information of storage resources and the target classification threshold to obtain the second classification result.

[0124] In other embodiments of this application, the processor 41 is used to execute the resource allocation program in the memory 42 based on the classification result to determine the target resource allocation algorithm corresponding to the request to be processed, so as to implement the following steps:

[0125] If the priority of the pending request does not meet the preset priority condition, determine the target resource allocation algorithm for each pending request after the first category.

[0126] If the priority of the request to be processed meets the preset priority condition, storage resources are allocated to the request to be processed.

[0127] In other embodiments of this application, the processor 41 is used to execute a resource allocation program in the memory 42, and may also implement the following steps:

[0128] For each category of pending requests after the first classification, the pending requests that belong to the same category are stored in the same queue, represented by the second classification result.

[0129] In other embodiments of this application, the processor 41 is configured to execute the resource allocation program in the memory 42 for each type of request to be processed after the first classification, and determine the target resource allocation algorithm for the request to be processed to implement the following steps:

[0130] For each queue of requests in each category, the target resource allocation algorithm is determined from the candidate resource allocation algorithms based on the information of storage resources.

[0131] Alternatively, for each queue of pending requests in each category, the system receives the user's first selection information and determines the target resource allocation algorithm from the candidate resource allocation algorithms based on the first selection information.

[0132] In other embodiments of this application, the processor 41 is configured to execute the resource allocation program in the memory 42 for each type of request to be processed after the first classification, and determine the target resource allocation algorithm for the request to be processed to implement the following steps:

[0133] For each queue of pending requests in each category, receive the user's second selection information;

[0134] Based on the second selection information and the information on storage resources, the target resource allocation algorithm is determined from the candidate resource allocation algorithms.

[0135] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can be referred to Figure 1 and 2 The implementation process of the resource allocation method provided in the corresponding embodiments will not be described in detail here.

[0136] The resource allocation device provided in the embodiments of this application can classify requests according to the attributes of the requests and the information of the storage resources, and determine the corresponding resource allocation algorithm for the requests according to the category of the requests. That is, requests of the same type use the same resource allocation algorithm to allocate storage resources, instead of all requests using the same method to allocate resources for a single request as in related technologies. This avoids the frequent occurrence of allocation and replacement, improves the performance of the SOC, and avoids the waste of resources.

[0137] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to achieve the following: Figure 1 and 2 The steps of the resource allocation method provided in the corresponding embodiment.

[0138] It should be noted that the aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; it can also be various terminals that include one or any combination of the above-mentioned memory, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0139] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0140] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0141] Furthermore, in the various embodiments of this application, all functional units can be integrated into one processing module, or each unit can be a separate unit, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0142] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0143] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0144] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0145] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A resource allocation method, It is characterized in that Applied to a resource allocation device, the method comprises: If pending requests are obtained, classifying the pending requests based on attribute information of the pending requests and information of storage resources corresponding to the pending requests; Based on the classification result, determining a target resource allocation algorithm corresponding to the pending request; wherein the target resource allocation algorithm is used to allocate resources to the pending request; The target resource allocation algorithm is used to allocate storage resources to the pending requests.

2. The method according to claim 1, It is characterized in that The classifying the pending requests based on the attribute information of the pending requests and the information of the storage resources corresponding to the pending requests includes: Determine the priority of each of the pending requests and information of storage resources corresponding to each of the pending requests; wherein the attribute information includes the priority; Performing a first classification on the plurality of pending requests based on the priority level to obtain the pending requests after the first classification; Based on the information of the storage resources, a second classification is performed on each type of pending requests after the first classification.

3. The method according to claim 2, It is characterized in that The second classification of each type of pending requests after the first classification based on the information of the storage resource includes: For each type of pending requests after the first classification, based on the information of the storage resource and the target classification threshold, a second classification is performed on each type of pending requests after the first classification to obtain a second classification result.

4. The method according to claim 2, It is characterized in that The step of determining a target resource allocation algorithm corresponding to the request to be processed based on the classification result includes: If the priority of the pending request does not meet the preset priority condition, for each type of pending request after the first classification, determine the target resource allocation algorithm of the pending request; If the priority of the pending request meets the preset priority condition, storage resources are allocated to the pending request.

5. The method according to claim 4, It is characterized in that The method further comprises: For each type of pending requests after the first classification, storing pending requests belonging to the same type as indicated by the second classification result into the same queue; Accordingly, for each type of pending requests after the first classification, determining a target resource allocation algorithm for the pending requests includes: For each queue in each category, the target resource allocation algorithm is determined from the candidate resource allocation algorithms based on the information of the storage resources; wherein the candidate resource allocation algorithms include a plurality of allocation algorithms for allocating resources to the requests; Or, for the pending requests in each queue in each category, first selection information of a user is received, and the target resource allocation algorithm is determined from the candidate resource allocation algorithms based on the first selection information.

6. The method according to claim 5, It is characterized in that The step of determining a target resource allocation algorithm for each type of pending request after the first classification comprises: For each queue of pending requests in each category, receiving second selection information from the user; The target resource allocation algorithm is determined from candidate resource allocation algorithms based on the second selection information and the information of the storage resources.

7. The method according to claim 4, It is characterized in that The adopting the target resource allocation algorithm to allocate storage resources to the pending request includes: For pending requests in each queue in each category, if there are unused idle storage resources in the storage resources corresponding to each category, the target resource allocation algorithm is used to allocate storage resources from the idle storage resources to the pending requests in each queue in each category.

8. The method according to claim 4, It is characterized in that After allocating storage resources to the pending request using the target resource allocation algorithm, the method further includes: For each queue of pending requests, mark the pending requests to which storage resource allocation has been completed with first marking information; wherein the first marking information represents the current scheduling status of the pending requests to which storage resource allocation has been completed; For each type of pending request, second marking information is marked for each type of pending request; wherein the second marking information represents current allocation information and storage resource information of each type of pending request.

9. A resource allocation device, It is characterized in that The device comprises: a classification unit, configured to classify the pending requests based on attribute information of the pending requests and information of storage resources corresponding to the pending requests if the pending requests are obtained; A determination unit, configured to determine a target resource allocation algorithm corresponding to the pending request based on the classification result; wherein the target resource allocation algorithm is used to allocate resources to the pending request; The processing unit is used to allocate storage resources to the pending request using the target resource allocation algorithm.

10. A resource allocation device, It is characterized in that The resource allocation device includes: a processor, a memory and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute the resource allocation program stored in the memory to implement the steps of the resource allocation method according to any one of claims 1 to 8.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the resource allocation method according to any one of claims 1 to 8.