A resource allocation method, system, device and storage medium for heterogeneous devices

By analyzing historical task data to predict real-time task resource requirements and performing dynamic scheduling, the problem that traditional static resource configuration strategies cannot cope with the dynamic nature of real-time task requirements of heterogeneous devices is solved, and resource utilization and task processing efficiency are improved.

CN119396559BActive Publication Date: 2025-06-06HANGZHOU BINGTE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411992129.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-06-06
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Traditional static resource configuration strategies cannot effectively cope with the high degree of dynamicity and uncertainty of real-time task requirements in heterogeneous devices, resulting in low resource utilization and task processing delays.

Method used

By analyzing historical task data, predict the resource requirements of real-time tasks on different heterogeneous devices, and perform dynamic scheduling to optimize resource allocation. The specific steps include obtaining historical task resources, matching real-time task requirements and historical tasks, predicting resource requirements, sorting heterogeneous device nodes, and performing dynamic resource scheduling.

Benefits of technology

Improve resource utilization and task processing efficiency, reduce resource allocation delays and errors, and ensure that each heterogeneous device makes full use of its available resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396559B_ABST
    Figure CN119396559B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of resource allocation for heterogeneous devices, and specifically to a resource allocation method, system, device and storage medium for heterogeneous devices, including: obtaining resources required for the historical tasks on different heterogeneous device nodes according to historical tasks; matching the real-time task requirements with the historical tasks to obtain the first historical task; obtaining the resource requirements of the real-time task requirements on different heterogeneous device nodes according to the first historical task; sorting the heterogeneous device nodes; and dynamically scheduling resources between the heterogeneous device nodes according to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes. The present invention can more accurately predict the resource requirements of real-time tasks on different heterogeneous devices through the analysis of historical task data, and can manage resources more finely. Avoid resource waste, ensure that each heterogeneous device can make full use of its available resources, and improve overall resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource allocation for heterogeneous devices, and in particular to a method, system, device and storage medium for resource allocation for heterogeneous devices. Background Art

[0002] With the development of information technology, various heterogeneous devices such as high-performance computing servers, edge computing devices, cloud computing nodes and other heterogeneous devices jointly build a data processing and computing ecosystem. These heterogeneous devices, with their unique hardware architecture, computing power, storage resources and network bandwidth advantages, have shown extraordinary potential in their respective fields. For example, high-performance computing servers are good at processing large-scale data analysis and complex computing tasks, while edge computing devices shine in the field of Internet of Things and real-time data analysis due to their low latency characteristics. Cloud computing nodes have become an important part of enterprise IT infrastructure with their elastic scalability and high availability.

[0003] It is not easy to fully tap the potential of these heterogeneous devices and achieve optimal resource allocation and efficient utilization. Traditional resource allocation methods are often based on a static, fixed resource allocation strategy. Under this strategy, resources are pre-allocated based on the inherent capabilities of the device and the expected workload. Although this approach ensures resource availability and task execution to a certain extent, its limitations are clearly revealed when faced with dynamically changing real-time task requirements.

[0004] In complex application scenarios such as cloud computing, edge computing, and the Internet of Things, the high dynamics and uncertainty of real-time task requirements have become the norm. These tasks may appear at any time, and their scale, complexity, and resource requirements vary. Traditional static resource allocation strategies, because they cannot perceive and respond to these changes in a timely manner, often lead to low resource utilization and delays in task processing. Summary of the invention

[0005] 1. Purpose of the invention

[0006] The object of the present invention is to provide a resource allocation method, system, device and storage medium for heterogeneous devices that can maximize resource utilization and improve task processing efficiency.

[0007] (II) Technical solution

[0008] To solve the above problems, the present invention provides a resource allocation method for heterogeneous devices, comprising:

[0009] According to the historical tasks, resources required by the historical tasks on different heterogeneous device nodes are obtained;

[0010] Acquire real-time task requirements, match the real-time task requirements with historical tasks, and obtain a first historical task;

[0011] According to the first historical task, obtaining resource requirements of the real-time task requirements on different heterogeneous device nodes;

[0012] Sorting the heterogeneous device nodes;

[0013] According to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes, dynamic resource scheduling is performed among the heterogeneous device nodes.

[0014] In another aspect of the present invention, preferably, the resources required for the historical tasks on the different heterogeneous device nodes are calculated using the following formula:

[0015] ;

[0016] Among them, D ij Represents historical task t i In heterogeneous device nodes r j The amount of resources required, F i Represents historical task t i The characteristic vector of j Represents heterogeneous device node r j The resource feature vector, NN represents the neural network, represents the neural network parameters.

[0017] In another aspect of the present invention, preferably, the neural network parameters are calculated using the following formula:

[0018] ;

[0019] in, represents the neural network parameters with the smallest error, Represents historical task t i In heterogeneous device nodes r j The actual resource usage, F i Represents historical task t i The characteristic vector of j Represents heterogeneous device node r j The resource feature vector, NN represents the neural network, represents the neural network parameters, n represents the total number of historical tasks, and m represents the total number of heterogeneous device nodes.

[0020] In another aspect of the present invention, preferably,

[0021] Matching the real-time task requirements with historical tasks includes:

[0022] Extracting the characteristics of the real-time task requirements, the characteristics including the number of CPU cores, memory capacity, storage capacity, video memory capacity, bandwidth, latency, jitter and packet loss rate;

[0023] Matching the characteristics of the real-time task requirements with the characteristics of the historical tasks one by one to obtain a matching value for each characteristic;

[0024] A first historical task is obtained according to the matching value of each feature, where the matching value of each feature of the first historical task is within a preset matching threshold range.

[0025] In another aspect of the present invention, preferably, obtaining the resource requirements of the real-time task requirements on different heterogeneous device nodes according to the first historical task includes:

[0026] According to the matching value of each feature between the first historical task and the real-time task requirement, the features are sorted according to the matching value of the features;

[0027] According to the sorted features, set the weight value for each feature;

[0028] Calculating the similarity between the first historical task and the real-time task requirement according to the weight value;

[0029] The similarity is calculated using the following formula:

[0030] ;

[0031] Among them, S represents the similarity between the first historical task and the real-time task requirements, represents the weight value of feature k, α k represents the matching value of the first historical task and the real-time task requirement feature k; K represents the total number of features, A k The vector representing the first historical task feature k, B k A vector representing the real-time task requirement feature k;

[0032] The similarity is taken as a ratio, and the resource requirements of the real-time task requirements on different heterogeneous device nodes are obtained by using the ratio and the resources required by the first historical task on different heterogeneous device nodes.

[0033] In another aspect of the present invention, preferably, sorting the heterogeneous device nodes comprises:

[0034] Get the total number of resources and the number of used resources of heterogeneous device nodes;

[0035] Extract resource features of heterogeneous device nodes;

[0036] Calculate the used ratios corresponding to the resource characteristics respectively;

[0037] Determine the resource feature with the highest utilization ratio corresponding to the resource feature as the main feature;

[0038] According to the type of the main feature, the heterogeneous device nodes are sorted in ascending order.

[0039] In another aspect of the present invention, preferably, according to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes, dynamic resource scheduling is performed among the heterogeneous device nodes, including:

[0040] According to the resource requirements and the number of used resources of the real-time task requirements on different heterogeneous device nodes, obtaining the heterogeneous device nodes that can be scheduled for the real-time task requirements;

[0041] Obtaining an optimal node according to the schedulable heterogeneous device nodes and the sorted heterogeneous device nodes, and allocating the real-time task requirements to the optimal node;

[0042] The used resources of the optimal node are updated.

[0043] In another aspect of the present invention, preferably, a resource allocation system for heterogeneous devices includes:

[0044] The first acquisition module: acquires the resources required by the historical tasks on different heterogeneous device nodes according to the historical tasks;

[0045] The second acquisition module is used to acquire the real-time task requirement, match the real-time task requirement with the historical task, and obtain the first historical task;

[0046] A third acquisition module: acquiring resource requirements of the real-time task requirements on different heterogeneous device nodes according to the first historical task;

[0047] Sorting module: sorting the heterogeneous device nodes;

[0048] Scheduling module: dynamically schedules resources among heterogeneous device nodes according to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes.

[0049] In another aspect of the present invention, preferably, a device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0050] Another aspect of the present invention is preferably a storage medium for storing a computer program, wherein the computer program enables a computer to execute the method as described above.

[0051] (III) Beneficial effects

[0052] The above technical solution of the present invention has the following beneficial technical effects:

[0053] The present invention can more accurately predict the resource requirements of real-time tasks on different heterogeneous devices through the analysis of historical task data, so as to quickly make resource allocation decisions, reduce delays and errors in the allocation process, and improve the overall resource allocation efficiency. By matching real-time tasks with historical tasks and predicting the resource requirements of real-time tasks based on the resource usage of historical tasks, resources can be managed more finely. This avoids resource waste, ensures that each heterogeneous device can fully utilize its available resources, and improves overall resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is an overall flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0056] Obviously, the described embodiments are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] In the description of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0058] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0059] Embodiment 1

[0060] A resource allocation method for heterogeneous devices. Figure 1 FIG. 1 shows an overall flow chart of an embodiment of the present invention, as shown in FIG. Figure 1 As shown, including:

[0061] Based on historical tasks, obtain the resources required by the historical tasks on different heterogeneous device nodes; first collect and store the data of historical tasks, including the resources required by these tasks on different heterogeneous device nodes. The required resources include CPU usage, memory usage, storage requirements, network bandwidth, etc. The same task may require different resources on different heterogeneous device nodes;

[0062] Acquire real-time task requirements, match the real-time task requirements with historical tasks, and obtain the first historical task; when new real-time task requirements arrive, obtain their resource requirements, including the required CPU, memory, storage, and network bandwidth, etc.; match the real-time task requirements with historical task data, and find the first historical task that is closest to the real-time task requirements.

[0063] According to the first historical task, obtain the resource requirements of the real-time task on different heterogeneous device nodes; according to the matched first historical task, find the resource requirements of the first historical task on different heterogeneous device nodes, and combine the specific requirements of the real-time task and the resource requirements of the first historical task to predict the resource requirements of the real-time task on different heterogeneous device nodes.

[0064] The heterogeneous device nodes are sorted; the device nodes are sorted according to factors such as the performance, load, and resource utilization of the heterogeneous device nodes. The purpose of sorting is to preferentially allocate resources to device nodes with better performance, lower load, and higher resource utilization.

[0065] According to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes, dynamic resource scheduling is performed among the heterogeneous device nodes. According to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted device nodes, scheduling is performed.

[0066] Furthermore, in this embodiment, the resources required for the historical tasks on the different heterogeneous device nodes are calculated using the following formula:

[0067] ;

[0068] Among them, D ij Represents historical task t i In heterogeneous device nodes r j The amount of resources required, F i Represents historical task t i The characteristic vector of j Represents heterogeneous device node r j The resource feature vector, NN represents the neural network, represents the neural network parameters. i It is a historical mission iThe feature vector of contains information on multiple dimensions such as the type, size, computational complexity, data input and output, etc. of the task. j It is a heterogeneous device node r j The resource feature vector includes key performance indicators such as the computing power, storage capacity, network bandwidth, and energy efficiency of the device. θ represents the parameters of the neural network, which are obtained through a training process to minimize the error between the calculated resource amount and the actual resource amount. The neural network here can be based on a convolutional neural network. The neural network architecture includes: an input layer, one or more hidden layers, and an output layer. The input layer receives the input vector, namely the task feature vector and the heterogeneous device resource feature vector; one or more hidden layers, which can be fully connected layers (DenseLayers), convolutional layers (Convolutional Layers) or graph convolutional layers (Graph Convolutional Layers), depending on the nature and complexity of the data. The output layer is used to output the predicted resource amount D ij .

[0069] In this embodiment, the neural network parameters are calculated using the following formula:

[0070] ;

[0071] in, represents the neural network parameters with the smallest error, Represents historical task t i In heterogeneous device nodes r j The actual resource usage, F i Represents historical task t i The characteristic vector of j Represents heterogeneous device node r j The resource feature vector, NN represents the neural network, Represents the neural network parameters, n represents the total number of historical tasks, and m represents the total number of heterogeneous device nodes. By optimizing the neural network parameters, the calculation accuracy of the resource usage of historical tasks on heterogeneous device nodes can be significantly improved.

[0072] Further, in this embodiment, matching the real-time task requirements with historical tasks includes:

[0073] Extracting the characteristics of the real-time task requirements, the characteristics including the number of CPU cores, memory capacity, storage capacity, video memory capacity, bandwidth, latency, jitter and packet loss rate;

[0074] Matching the characteristics of the real-time task requirements with the characteristics of the historical tasks one by one to obtain a matching value for each characteristic;

[0075] According to the matching value of each feature, a first historical task is obtained, wherein the matching value of each feature of the first historical task is within the preset matching threshold range. Assume that there are K features, and each feature matching value α 1 ,α 2 ,…,α K The feature matching value can be obtained by dividing the feature vector of the real-time task requirement by the feature vector of the historical task. The preset matching threshold can be 0.9-1.1. Each feature matching value α 1 ,α 2 ,…,α K Those in the range of 0.9-1.1 are the first historical tasks.

[0076] By extracting the features of real-time tasks for matching, we can more accurately find tasks with high similarity to historical tasks. Compared with overall matching, feature matching focuses more on the core requirements of the task, avoiding inaccurate matching caused by differences in other non-critical attributes of the task. Set the matching threshold range to ensure that only historical tasks with feature matching values ​​within the threshold are selected. This refined matching control helps to screen out historical tasks that better meet the needs of real-time tasks and improves the accuracy of matching.

[0077] Further, in this embodiment, obtaining the resource requirements of the real-time task requirements on different heterogeneous device nodes according to the first historical task includes:

[0078] According to the matching value of each feature between the first historical task and the real-time task requirement, the features are sorted according to the matching value of the features; the matching value of each feature between the first historical task and the real-time task requirement can be calculated by comparing the values ​​of the two tasks on each feature, such as using the Euclidean distance or the Jaccard similarity coefficient or directly comparing the values; the features are sorted according to the matching value of the features. Assuming there are K features, the feature matching value α after sorting 1 ,α 2 ,…,α K , where α 1 is the feature with the highest matching value, α K is the feature with the lowest matching value.

[0079] According to the sorted features, set the weight value for each feature;

[0080] The weight value can be calculated by the following formula:

[0081] ;

[0082] in, represents the weight value of feature k, k represents the sequence number of the feature after sorting, K represents the total number of features, and k' represents the sequence number of another feature after sorting. In order to ensure that the sum of all weights is equal to 1, normalization is required.

[0083] Calculating the similarity between the first historical task and the real-time task requirement according to the weight value;

[0084] The similarity is calculated using the following formula:

[0085] ;

[0086] Among them, S represents the similarity between the first historical task and the real-time task requirements, represents the weight value of feature k, α k represents the matching value of the first historical task and the real-time task requirement feature k; K represents the total number of features, A k The vector representing the first historical task feature k, B k A vector representing the feature k required by the real-time task. When calculating the similarity, the weight, that is, the influence of the feature order and the influence of the matching value of each feature are taken into account, so that the influence of each feature on the similarity is more reasonable.

[0087] The similarity is used as a ratio, and the resource requirements of the real-time task on different heterogeneous device nodes are obtained by using the ratio and the resources required by the first historical task on different heterogeneous device nodes. By predicting the resource requirements of the real-time task on different heterogeneous device nodes, resources can be allocated more accurately and the most suitable heterogeneous device node can be selected to execute the task. This helps to optimize the execution performance of the task and improve the speed and quality of task completion.

[0088] Further, in this embodiment, sorting the heterogeneous device nodes includes:

[0089] Get the total number of resources and the number of used resources of heterogeneous device nodes; for each heterogeneous device node, get its total amount of resources (such as the number of CPU cores, memory size, storage capacity, etc.) and the amount of resources currently in use.

[0090] Extract resource features of heterogeneous device nodes; resource features refer to attributes that can reflect the resource status of device nodes, such as CPU usage, memory occupancy, disk I / O load, etc., which can be extracted from the monitoring data of device nodes.

[0091] Calculate the used ratios corresponding to the resource features respectively; for each resource feature, calculate the ratio of its used resources to the total resources, i.e. the used ratio. The used ratio reflects the utilization degree of the device node on the resource feature.

[0092] The resource feature with the highest utilization ratio corresponding to the resource feature is determined as the primary feature; among all resource features, the resource feature with the highest utilization ratio is found as the primary feature. The primary feature represents the most scarce or most restricted resource type of the device node.

[0093] According to the type of the main feature, the heterogeneous device nodes are sorted in ascending order. According to the type of the main feature (such as CPU, memory, disk, etc.), the heterogeneous device nodes are sorted in ascending order. That is, for the case where CPU usage is the main feature, the nodes with lower CPU usage are ranked first; for the case where memory occupancy is the main feature, the nodes with lower memory occupancy are ranked first. The purpose of this is to prioritize the scheduling of nodes with more remaining resources on the main feature.

[0094] According to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes, dynamic resource scheduling is performed between the heterogeneous device nodes, including:

[0095] According to the resource requirements and the number of used resources of the real-time task requirements on different heterogeneous device nodes, the heterogeneous device nodes that can be scheduled for the real-time task requirements are obtained; according to the resource requirements and the number of used resources of the real-time task requirements on different heterogeneous device nodes, the schedulable nodes that can meet the task requirements are screened out by comparing the amount of resources required for the task with the amount of resources remaining on the node;

[0096] According to the schedulable heterogeneous device nodes and the sorted heterogeneous device nodes, the optimal node is obtained, and the real-time task demand is allocated to the optimal node; among the schedulable heterogeneous device nodes, the node with the highest sorting is selected as the optimal node in combination with the sorted node list. Because the node has the most remaining resources in the main feature, it is most likely to execute the task efficiently without causing resource bottlenecks. The real-time task demand is allocated to the optimal node, and the task execution is started.

[0097] Update the used resources of the optimal node. After the task starts to execute, the used resource information of the optimal node needs to be updated to reflect the resource occupancy of the new task to facilitate subsequent scheduling.

[0098] The present invention can more accurately predict the resource requirements of real-time tasks on different heterogeneous devices through the analysis of historical task data, so as to quickly make resource allocation decisions, reduce delays and errors in the allocation process, and improve the overall resource allocation efficiency. By matching real-time tasks with historical tasks and predicting the resource requirements of real-time tasks based on the resource usage of historical tasks, resources can be managed more finely. This avoids resource waste, ensures that each heterogeneous device can fully utilize its available resources, and improves overall resource utilization.

[0099] Embodiment 2

[0100] A resource allocation system for heterogeneous devices, comprising:

[0101] The first acquisition module: acquires the resources required by the historical tasks on different heterogeneous device nodes according to the historical tasks;

[0102] The second acquisition module is used to acquire the real-time task requirement, match the real-time task requirement with the historical task, and obtain the first historical task;

[0103] A third acquisition module: acquiring resource requirements of the real-time task requirements on different heterogeneous device nodes according to the first historical task;

[0104] Sorting module: sorting the heterogeneous device nodes;

[0105] Scheduling module: dynamically schedules resources among heterogeneous device nodes according to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes.

[0106] Embodiment 3

[0107] A device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0108] Embodiment 4

[0109] A storage medium is used to store a computer program, wherein the computer program enables a computer to execute the method as described above.

[0110] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.

[0111] The present invention has been described above with reference to the embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. The scope of the present invention is defined by the appended claims and their equivalents. Without departing from the scope of the present invention, a person skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

[0112] Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.

[0113] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. A method for allocating resources of heterogeneous devices, characterized in that: include: According to the historical tasks, resources required by the historical tasks on different heterogeneous device nodes are obtained; Acquiring a real-time task requirement, matching the real-time task requirement with a historical task, and obtaining a first historical task, including: Extracting the characteristics of the real-time task requirements, the characteristics including the number of CPU cores, memory capacity, storage capacity, video memory capacity, bandwidth, latency, jitter and packet loss rate; Matching the characteristics of the real-time task requirements with the characteristics of the historical tasks one by one to obtain a matching value for each characteristic; According to the matching value of each feature, a first historical task is obtained, where the first historical task is a historical task in which the matching value of each feature is within a preset matching threshold range; According to the first historical task, obtaining resource requirements of the real-time task requirements on different heterogeneous device nodes includes: According to the matching value of each feature between the first historical task and the real-time task requirement, the features are sorted according to the matching value of the features; According to the sorted features, set the weight value for each feature; Calculating the similarity between the first historical task and the real-time task requirement according to the weight value; Taking the similarity as a ratio, and using the ratio and the resources required by the first historical task on different heterogeneous device nodes, obtaining the resource requirements of the real-time task requirements on different heterogeneous device nodes; Sorting the heterogeneous device nodes; According to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes, dynamic resource scheduling is performed among the heterogeneous device nodes.

2. The resource allocation method according to claim 1, characterized in that: The resources required by the historical tasks on the different heterogeneous device nodes are calculated using the following formula: ; Among them, D ij Represents historical task t i In heterogeneous device nodes r j The amount of resources required, F i Represents historical task t i The characteristic vector of j Represents heterogeneous device node r j The resource feature vector, NN represents the neural network, represents the neural network parameters.

3. The resource allocation method according to claim 2, characterized in that: The neural network parameters are calculated using the following formula: ; in, represents the neural network parameters with the smallest error, Represents historical task t i In heterogeneous device nodes r j The actual resource usage, F i Represents historical task t i The characteristic vector of j Represents heterogeneous device node r j The resource feature vector, NN represents the neural network, represents the neural network parameters, n represents the total number of historical tasks, and m represents the total number of heterogeneous device nodes.

4. The resource allocation method according to claim 1, characterized in that: The similarity is calculated using the following formula: ; Among them, S represents the similarity between the first historical task and the real-time task requirements, represents the weight value of feature k, α k represents the matching value of the first historical task and the real-time task requirement feature k; K represents the total number of features, A k The vector representing the first historical task feature k, B k A vector representing the real-time task requirement feature k.

5. The resource allocation method according to claim 1, characterized in that: Sorting the heterogeneous device nodes includes: Get the total number of resources and the number of used resources of heterogeneous device nodes; Extract resource features of heterogeneous device nodes; Calculate the used ratios corresponding to the resource characteristics respectively; Determine the resource feature with the highest utilization ratio corresponding to the resource feature as the main feature; According to the type of the main feature, the heterogeneous device nodes are sorted in ascending order.

6. The resource allocation method according to claim 5, characterized in that: According to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes, dynamic resource scheduling is performed between the heterogeneous device nodes, including: According to the resource requirements and the number of used resources of the real-time task requirements on different heterogeneous device nodes, obtaining the heterogeneous device nodes that can be scheduled for the real-time task requirements; Obtaining an optimal node according to the schedulable heterogeneous device nodes and the sorted heterogeneous device nodes, and allocating the real-time task requirements to the optimal node; The used resources of the optimal node are updated.

7. A resource allocation system for heterogeneous devices, characterized in that: include: The first acquisition module: acquires the resources required by the historical tasks on different heterogeneous device nodes according to the historical tasks; The second acquisition module: acquires the real-time task requirement, matches the real-time task requirement with the historical task, and obtains the first historical task, including: Extracting the characteristics of the real-time task requirements, the characteristics including the number of CPU cores, memory capacity, storage capacity, video memory capacity, bandwidth, latency, jitter and packet loss rate; Matching the characteristics of the real-time task requirements with the characteristics of the historical tasks one by one to obtain a matching value for each characteristic; According to the matching value of each feature, a first historical task is obtained, where the first historical task is a historical task in which the matching value of each feature is within a preset matching threshold range; The third acquisition module: acquires the resource requirements of the real-time task requirements on different heterogeneous device nodes according to the first historical task, including: According to the matching value of each feature between the first historical task and the real-time task requirement, the features are sorted according to the matching value of the features; According to the sorted features, set the weight value for each feature; Calculating the similarity between the first historical task and the real-time task requirement according to the weight value; Taking the similarity as a ratio, and using the ratio and the resources required by the first historical task on different heterogeneous device nodes, obtaining the resource requirements of the real-time task requirements on different heterogeneous device nodes; Sorting module: sorting the heterogeneous device nodes; Scheduling module: dynamically schedules resources among heterogeneous device nodes according to the resource requirements of the real-time task requirements on different heterogeneous device nodes and the sorted heterogeneous device nodes.

8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.

9. A storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Task scheduling method, device and equipment and computer readable storage medium

    CN118445051A

  • Method and device for scheduling cloud computing resources

    CN118796388A