Resource scheduling method and device based on block chain, electronic equipment and storage medium

By introducing blockchain technology into the GPU resource scheduling system and using smart contracts for multi-dimensional evaluation and optimization, the problem of low resource utilization in the existing system is solved and more efficient resource allocation and utilization is achieved.

CN119902887AActive Publication Date: 2025-04-29CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1

Patent Information

Application Number
CN202411975737.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing GPU resource scheduling systems have low resource utilization due to traditional static allocation methods, lacking standardized performance measurement and service quality assurance mechanisms, resulting in low resource utilization efficiency.

Method used

The blockchain-based resource scheduling method is adopted to conduct priority assessment, resource capability assessment and trust assessment on multiple resource nodes through blockchain smart contracts, and optimize the matching degree with the evaluation mechanism of multi-dimensional characteristics to determine the target resource nodes.

Benefits of technology

It realizes calling resource nodes with the best performance to execute pending tasks, ensuring reasonable allocation of tasks, maximizing resource utilization, and thus improving resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902887A_ABST
    Figure CN119902887A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a resource scheduling method and device based on a block chain, electronic equipment and a storage medium, and the method is applied to a resource scheduling system, and carries out the priority evaluation of a to-be-processed task, carries out the resource capability evaluation of a plurality of resource nodes, and carries out the credibility evaluation of the plurality of resource nodes. Then, the matching degree between the to-be-processed task and the multiple resource nodes is optimized through an evaluation result obtained through an evaluation mechanism based on the multi-dimensional features, and finally, a target resource node used for executing the to-be-processed task is determined from the multiple resource nodes according to the target matching degree obtained through optimization of the matching degree. According to the method, the resource node with the optimal performance can be called to execute the to-be-processed task, so that the resource utilization rate is maximized while reasonable allocation of the task is ensured, and the resource utilization efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and specifically, to a resource scheduling method, device, electronic device and storage medium based on blockchain. Background Art

[0002] At present, with the rapid development of artificial intelligence technology, many artificial intelligence models have emerged. Before these artificial intelligence models go online, it is necessary to systematically test and evaluate the performance, effects and capabilities of large-scale artificial intelligence models (such as large language models). Therefore, the demand for GPU (Graphics Processing Unit) computing resources is increasing.

[0003] In the related technology, the current GPU resource scheduling mainly adopts a centralized architecture, but due to the traditional static allocation method, the GPU resource utilization rate is generally less than 40%, a large amount of computing power is wasted, and the existing system lacks standardized performance measurement and service quality assurance mechanism. The performance interference during multi-tasking is difficult to control, resulting in low resource utilization efficiency when scheduling computing power resources to process related test tasks. Summary of the invention

[0004] To solve the above technical problems, the embodiments of the present application provide a resource scheduling method, device, electronic device and storage medium based on blockchain, so as to improve resource utilization efficiency.

[0005] According to one aspect of an embodiment of the present application, a blockchain-based resource scheduling method is provided, the method is applied to a resource scheduling system, the resource scheduling system includes a resource layer, a resource scheduling layer and a blockchain layer, the resource layer includes a plurality of resource nodes for providing computing resources; the resource scheduling layer includes a blockchain smart contract, the blockchain smart contract is used to schedule the resource nodes in the resource layer to perform tasks to be processed; the blockchain layer is used to store and verify data; the method includes: performing a priority evaluation on the tasks to be processed to obtain a first evaluation result, performing a resource capability evaluation on the plurality of resource nodes to obtain a second evaluation result, and performing a trust evaluation on the plurality of resource nodes to obtain a third evaluation result; matching the tasks to be processed with the plurality of resource nodes respectively to obtain candidate matching degrees corresponding to the plurality of resource nodes respectively; optimizing the candidate matching degrees according to the first evaluation result, the second evaluation result and the third evaluation result to obtain target matching degrees corresponding to the plurality of resource nodes respectively; determining a target resource node for executing the tasks to be processed from the plurality of resource nodes according to the target matching degrees.

[0006] In some embodiments, the priority evaluation of the pending tasks to obtain a first evaluation result includes: obtaining a task attribute score corresponding to the pending tasks, and obtaining a priority evaluation weight parameter corresponding to the task attribute score; wherein the task attribute score includes a task urgency score, a task waiting time score, and a task resource requirement ratio; and performing a weighted summation of the task attribute scores according to the priority evaluation weight parameter to obtain the first evaluation result.

[0007] In some embodiments, performing resource capability evaluation on the multiple resource nodes to obtain a second evaluation result includes: obtaining resource attribute scores of the multiple resource nodes, and obtaining resource capability evaluation weight parameters corresponding to the resource attribute scores; wherein the resource attribute scores include a performance score, a load balancing score, and a reliability score; and performing a weighted summation of the resource attribute scores according to the resource capability evaluation weight parameters to obtain the second evaluation result.

[0008] In some embodiments, the trust evaluation of the multiple resource nodes to obtain a third evaluation result includes: obtaining historical reputation features of the multiple resource nodes, and obtaining trust weight parameters corresponding to the historical reputation features; wherein the historical reputation features include node historical performance, node consensus credibility, and node stability; and performing weighted summation of the historical reputation features according to the trust weight parameters to obtain the third evaluation result.

[0009] In some embodiments, the matching of the tasks to be processed and the multiple resource nodes respectively to obtain the alternative matching degrees corresponding to the multiple resource nodes respectively includes: obtaining the resource matching degree and the load matching degree when the tasks to be processed are respectively run on the multiple resource nodes, and obtaining the matching weight parameters corresponding to the resource matching degree and the load matching degree respectively; performing weighted calculation on the resource matching degree and the load matching degree according to the matching weight parameters to obtain the alternative matching degrees corresponding to the multiple resource nodes respectively.

[0010] In some embodiments, determining the target resource node for executing the task to be processed from the multiple resource nodes based on the target matching degree includes: determining the resource node corresponding to the maximum value among the multiple target matching degrees as the target resource node for executing the task to be processed.

[0011] In some embodiments, after determining the target resource node for executing the task to be processed from the multiple resource nodes according to the target matching degree, the method further includes: adjusting the preset weight parameters through a preset gradient descent optimization algorithm; wherein the preset weight parameters include at least one of the priority evaluation weight parameter, the resource capability evaluation weight parameter, the trust weight parameter and the matching weight parameter.

[0012] In some embodiments, according to one aspect of an embodiment of the present application, a blockchain-based resource scheduling device is provided, the device comprising: an evaluation module, configured to perform a priority evaluation on a task to be processed to obtain a first evaluation result, perform a resource capability evaluation on a plurality of resource nodes to obtain a second evaluation result, and perform a trust evaluation on the plurality of resource nodes to obtain a third evaluation result; a matching module, configured to match the task to be processed with the plurality of resource nodes respectively, to obtain alternative matching degrees corresponding to the plurality of resource nodes respectively; an optimization module, configured to optimize the alternative matching degrees according to the first evaluation result, the second evaluation result and the third evaluation result, to obtain target matching degrees corresponding to the plurality of resource nodes respectively; a determination module, configured to determine a target resource node for executing the task to be processed from the plurality of resource nodes according to the target matching degree.

[0013] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the blockchain-based resource scheduling method as described above.

[0014] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned blockchain-based resource scheduling method.

[0015] In the technical solution provided in the embodiments of the present application, by performing priority evaluation on the tasks to be processed, performing resource capacity evaluation on multiple resource nodes, and performing trust evaluation on multiple resource nodes, and then optimizing the matching degree between the tasks to be processed and the multiple resource nodes through the evaluation results obtained through the evaluation mechanism based on multidimensional features, finally determining the target resource node for executing the tasks to be processed from the multiple resource nodes according to the target matching degree obtained by the optimized matching degree, it is possible to call the resource node with the best performance to execute the tasks to be processed, thereby ensuring reasonable task allocation while maximizing resource utilization, thereby improving resource utilization efficiency.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0018] Figure 1 It is a structural schematic diagram of a blockchain network shown in an exemplary embodiment of the present application;

[0019] Figure 2 It is a schematic diagram of an implementation environment involved in this application;

[0020] Figure 3 It is an application schematic diagram of a resource scheduling method based on blockchain shown in an exemplary embodiment of the present application;

[0021] Figure 4 is a flowchart of a resource scheduling method based on blockchain shown in an exemplary embodiment of the present application;

[0022] Figure 5 yes Figure 4 Step S410 in the illustrated embodiment is a flow chart of evaluating the priority of the tasks to be processed in an exemplary embodiment;

[0023] Figure 6 yes Figure 4 Step S410 in the illustrated embodiment is a flow chart of performing resource capability evaluation on a plurality of resource nodes in an exemplary embodiment;

[0024] Figure 7 yes Figure 4 Step S410 in the illustrated embodiment is a flow chart of performing trust evaluation on a plurality of resource nodes in an exemplary embodiment;

[0025] Figure 8 yes Figure 4 Step S420 in the illustrated embodiment is a flow chart of optimizing the candidate matching degree in an exemplary embodiment;

[0026] Fig. 9 is a flowchart of a resource scheduling method based on blockchain shown in another exemplary embodiment of the present application;

[0027] Fig.10 It is a structural diagram of a resource scheduling device based on blockchain in an exemplary embodiment of the present application;

[0028] Fig.11 It is a schematic diagram of the structure of a computer system of an exemplary electronic device of the present application. DETAILED DESCRIPTION

[0029] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments that are the same as the present application. Instead, they are only examples of devices and methods that are the same as some aspects of the present application as detailed in the attached claims.

[0030] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in the form of an application program, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0031] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0032] It should be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.

[0033] First of all, it should be noted that the embodiments of the present application involve blockchain technology. Blockchain technology is a new distributed infrastructure and computing method that uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data. Specifically, it is a data structure that consists of data blocks in a chronological order in a manner similar to a linked list, which can safely store data that has a sequence relationship and can be verified within the system, and cryptography ensures that the data cannot be tampered with or forged. Simply put, blockchain is a decentralized distributed ledger, and each chain is equivalent to an independent ledger. In the embodiment of the present application, the blockchain layer in the resource scheduling system stores the evaluation data hash and records the evaluation results to ensure the transparency and non-tamperability of the evaluation process.

[0034] See also Figure 1 , Figure 1 It is a structural diagram of a blockchain network shown in an exemplary embodiment of the present application. Figure 1 The blockchain network 100 shown may include node devices 10a, 10b, 10c, and 10d. Among them, node devices 10a, 10b, 10c, and 10d are Figure 1 The blockchain nodes (referred to as nodes) in the blockchain network 100 shown may be computing devices of any form connected to the blockchain network 100, such as servers, user terminals, etc. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. Each node may be directly or indirectly connected by wired or wireless communication, and this application is not limited thereto. Figure 1 The node devices 10a, 10b, 10c, and 10d shown can also be connected through network communication to form a blockchain network 100.

[0035] Each node in the blockchain network 100 can be used to maintain the same blockchain (i.e. Figure 1The blockchain 10e shown in the figure can pre-deploy multiple smart contracts on the blockchain corresponding to the blockchain 10e, for example, it can pre-deploy: agent contracts, rights management contracts, data contracts, agent management contracts and other smart contracts with different data processing functions. In the embodiment of the present application, the blockchain smart contract is used to manage the evaluation process, verify permissions and record results.

[0036] In the related technology, the current GPU resource scheduling mainly adopts a centralized architecture, but due to the traditional static allocation method, the GPU resource utilization rate is generally less than 40%, a large amount of computing power is wasted, and the existing system lacks standardized performance measurement and service quality assurance mechanism. The performance interference during multi-tasking is difficult to control, resulting in low resource utilization efficiency when scheduling computing power resources to process related test tasks.

[0037] Based on this, in order to improve resource utilization efficiency, the embodiments of the present application propose a resource scheduling method, device, electronic device and computer-readable storage medium based on blockchain.

[0038] The following is a detailed description of the blockchain-based resource scheduling solution provided in the embodiments of the present application.

[0039] See also Figure 2 , Figure 2 2 is a schematic diagram of an implementation environment involved in the present application, which is specifically a resource scheduling system based on blockchain. The resource scheduling system includes a resource layer 210, a resource scheduling layer 220 and a blockchain layer 230. The resource layer 210 includes a plurality of resource nodes for providing computing resources. The resource scheduling layer 220 includes a blockchain smart contract. The blockchain smart contract is used to schedule resource nodes in the resource layer to execute pending tasks. The blockchain layer 230 is used for data storage and data verification.

[0040] The resource layer 210 is responsible for managing GPU computing resources. Its core function is to integrate and schedule the computing resources of GPU providers to provide efficient support for pending tasks. The resource layer 210 ensures the stability and high availability of resources by monitoring the operating status of resource nodes in real time.

[0041] The resource scheduling layer 220 is responsible for virtualizing physical GPU resources into vGPUs, providing standardized computing power and video memory capacity for pending tasks. Through the resource scheduling method proposed in the embodiment of the present application, based on a multi-dimensional feature evaluation and matching mechanism, the core features of tasks and resources (such as computing requirements, computing power, load, etc.) can be quantified as scoring indicators, and the matching degree is optimized through a three-layer scoring system (task priority, resource capacity, and historical reputation) to obtain the target matching degree. In addition, the resource management layer 220 is deployed with a blockchain smart contract, which executes global optimization decisions through blockchain smart contracts, maximizes resource utilization while ensuring reasonable task allocation, solves the problem of cross-organizational GPU resource collaboration, and realizes decentralized scheduling through blockchain technology, breaks resource islands, and improves overall computing power utilization.

[0042] The blockchain layer 230 is responsible for resource node data collection, and then aggregates the data on the blockchain network 100 and stores it in IPFS (InterPlanetary File System), so as to store and verify the data, and provide open and transparent verification information for the resource scheduling process through smart contracts. The blockchain layer 230 ensures the credibility and immutability of all task assignments, execution records, and result verification data. In addition, the blockchain layer 230 is equipped with a consensus algorithm that can record the reputation scores of participants; at the same time, the reputation scores of resource nodes are dynamically adjusted by the historical reputation characteristics of resource nodes collected after each resource mobilization, which can incentivize high-quality resource nodes, improve the overall reliability and fairness of the system, and solve the credibility problem of GPU computing results. Through smart contracts and multi-party verification mechanisms, the reliability of the computing process and results is ensured.

[0043] For example, combining Figure 3 As shown, Figure 3 It is an application diagram of a resource scheduling method based on blockchain shown in an exemplary embodiment of the present application. Figure 3In the process of evaluating the large model, the large model is controlled to execute tasks to be processed, such as one or more tasks such as training tasks, inference tasks and scoring tasks. At this time, after receiving the tasks to be processed, the resource scheduling system identifies the tasks to be processed through the blockchain smart contract in the blockchain layer 230, obtains the task attribute characteristics corresponding to the tasks to be processed, and obtains all dimensional resource characteristics of each resource node; wherein the task attribute characteristics may include the deadline of the tasks to be processed, the current time, the maximum time window for executing the tasks to be processed, the current waiting time and the average waiting time for executing the tasks to be processed, etc.; all dimensional resource characteristics of each resource node may include the GPU computing power, video memory size, bandwidth, current load and reliability, etc. The task attribute characteristics of the task to be processed are represented as a task feature vector in a preset format, and all dimensional resource characteristics are represented as a resource feature vector in a preset format; then the task feature vector and the resource feature vector are analyzed and processed through the blockchain smart contract to achieve priority evaluation of the task to be processed, resource capacity evaluation of multiple resource nodes, and trust evaluation of multiple resource nodes, and then the matching degree between the task to be processed and the multiple resource nodes is optimized through the evaluation results obtained by the evaluation mechanism based on multi-dimensional characteristics, and finally the target resource node for executing the task to be processed is determined from the multiple resource nodes according to the target matching degree obtained by the optimized matching degree. It can realize the calling of the resource node with the best performance to execute the task to be processed, and the task to be processed is allocated to the adapted resource node for execution, so as to ensure the reasonable allocation of tasks while maximizing resource utilization, thereby improving resource utilization efficiency.

[0044] Furthermore, after the pending tasks are executed, the resource node information is updated, that is, the GPU information is updated; wherein the GPU information includes information such as the computing power, video memory size, bandwidth, current load and reliability of the resource node.

[0045] Please continue reading Figure 4 , Figure 4 is a flowchart of a resource scheduling method based on blockchain shown in an exemplary embodiment of the present application, which can be applied to Figure 2 The implementation environment shown in FIG. 1 is specifically executed by the blockchain smart contract in the resource management layer 220 in the implementation environment. It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by blockchain smart contracts in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.

[0046] like Figure 4 As shown, in an exemplary embodiment, the resource scheduling method based on blockchain includes at least steps S410 to S440, which are described in detail as follows:

[0047] Step S410, performing a priority evaluation on the task to be processed to obtain a first evaluation result, performing a resource capability evaluation on multiple resource nodes to obtain a second evaluation result, and performing a trust evaluation on multiple resource nodes to obtain a third evaluation result.

[0048] It should be understood that the evaluation results in the embodiments of the present application include scores for quantifying corresponding features. By quantifying and scoring the multi-dimensional features in the resource scheduling process, the tasks to be processed can be allocated more accurately, the decentralized scheduling of computing resources is realized, and the resource utilization efficiency is improved. In addition, in the embodiments of the present application, the resource scheduling algorithm is automatically executed through the blockchain smart contract, which can reduce human intervention and improve scheduling fairness.

[0049] In some embodiments, when testing and evaluating a large model, there may be multiple tasks to be processed at the same time, such as training tasks, inference tasks, and scoring tasks. By performing priority evaluation on the tasks to be processed, the tasks that need to be executed first can be determined, and resources can be scheduled to execute high-priority tasks, thereby improving work efficiency. At the same time, in the case of limited resources, giving priority to high-priority tasks can also ensure the effective use of resources, avoid waste of resources, and improve resource utilization efficiency.

[0050] Combination Figure 5 As shown, Figure 5 yes Figure 4 Step S410 in the illustrated embodiment is a flowchart of evaluating the priority of the task to be processed in an exemplary embodiment, which includes at least steps S510 to S520, which are described in detail as follows:

[0051] Step S510, obtaining the task attribute score corresponding to the task to be processed, and obtaining the priority evaluation weight parameter corresponding to the task attribute score.

[0052] Among them, the task attribute score includes the task urgency score, the task waiting time score and the task resource requirement ratio.

[0053] For example, in the embodiment of the present application, the task urgency score can be obtained by the following method, including: obtaining the task attribute characteristics of the task to be processed, calculating the task attribute characteristics by a preset urgency function, and obtaining the task urgency score. The task attribute characteristics include the deadline of the task to be processed, the current time, and the maximum time window for executing the task to be processed.

[0054] In some embodiments, the task attribute characteristics are calculated by a preset urgency function to obtain a task urgency score, including: calculating Get the task urgency score. Among them, U(t i) is the task urgency score of the i-th pending task, λ is the preset time decay factor, Deadline is the deadline of the i-th pending task, CurrentTime is the current time, and MaxTimeWindow is the maximum time window for executing the pending task.

[0055] For example, in the embodiment of the present application, the task waiting time score can be obtained by the following method, including: obtaining the task attribute characteristics of the task to be processed; calculating the task attribute characteristics by a preset waiting time function to obtain the task waiting time score. The task attribute characteristics also include the current waiting time and the average waiting time of executing the task to be processed.

[0056] In some embodiments, the task attribute characteristics are calculated by a preset waiting time function to obtain the task waiting time score, including: Get the task waiting time score. Among them, W(t i ) is the task waiting time score of the i-th pending task, μ is the preset waiting time gain factor, WaitingTime is the current waiting time for executing the pending task, and AverageWaitTime is the average waiting time.

[0057] Exemplarily, the task resource requirement ratio in the embodiment of the present application can be obtained by the following methods, including: obtaining the task attribute characteristics of the task to be processed; calculating the task attribute characteristics through a preset resource requirement function to obtain the resource requirement ratio; wherein the task attribute characteristics include the resource requirement size of the task to be processed and the maximum resource requirement that can be provided by the resource scheduling system.

[0058] In some embodiments, the task attribute characteristics are calculated by a preset resource demand function to obtain the resource demand ratio, including: calculating Get the resource demand ratio; where R(t i ) is the task resource demand ratio of the i-th task to be processed, ResourceDemand is the resource demand size of the task to be processed, and MaxResourceDemand is the maximum resource demand that the resource scheduling system can provide.

[0059] In some embodiments, obtaining the priority evaluation weight parameters corresponding to the task attribute score includes: matching the priority evaluation weight parameters corresponding to the task attributes of the task attribute score from a preset database; wherein the preset database stores the correspondence between the task attributes and the priority evaluation weight parameters.

[0060] Step S520: performing weighted summation on the task attribute scores according to the priority evaluation weight parameter to obtain a first evaluation result.

[0061] It is understandable that the first evaluation result is a score for the task priority. In the embodiment of the present application, the scores of each task attribute are balanced by obtaining the priority evaluation weight parameters corresponding to the task attributes, which can adjust the sensitivity of the priority scoring algorithm. At the same time, different weight parameters are used to constrain the scores of different types of task attributes, which can optimize the priority scoring, thereby obtaining the task priority score more accurately.

[0062] In some embodiments, the first evaluation result can be obtained by weighting and summing the task attribute scores according to the priority evaluation weight parameter in the following manner, including: by calculating P(t i )=α 1 U(t i )+α 2 W(t i )+α 3 R(t i ) obtains the first evaluation result; wherein, t i is the i-th task to be processed, P(t i ) is the first evaluation result corresponding to the i-th task to be processed, that is, the priority score of the i-th task to be processed, and the value range of the first evaluation result is a positive real number; U(t i ) is the task urgency score of the i-th task to be processed, W(t i ) is the task waiting time score of the i-th task to be processed, R(t i ) is the task resource demand ratio of the i-th task to be processed. 1 , α 2 and α 3 is a priority evaluation weight parameter. In some embodiments, α 1 ,α 2 ,α 3 ∈[0,1], and α 1 +α 2 +α 3 =1.

[0063] Combination Figure 6 As shown, Figure 6 yes Figure 4 Step S410 in the illustrated embodiment is a flowchart of performing resource capability evaluation on multiple resource nodes in an exemplary embodiment, which at least includes steps S610 to S620, which are described in detail as follows:

[0064] Step S610, obtaining resource attribute scores of multiple resource nodes, and obtaining resource capability evaluation weight parameters corresponding to the resource attribute scores.

[0065] The resource attribute score includes a performance score, a load balancing score, and a reliability score. In some embodiments, the performance score ranges from [0, 1], the load balancing score ranges from [0, 1], and the reliability score ranges from [0, 1].

[0066] Exemplarily, the performance score of each resource node in the embodiment of the present application can be obtained by the following methods, including: obtaining the current available resource amount of each dimension of each resource node; wherein the resource amount of each dimension includes five dimensions, namely, GPU computing power, video memory size, bandwidth, current load and reliability; calculating the current available resource amount of each dimension through a preset performance scoring function to obtain a performance score.

[0067] In some embodiments, the currently available resources in each dimension are calculated by a preset performance scoring function to obtain a performance score, including: calculating Get performance score; where g j Used to characterize the jth resource node, P(g j ) is the performance score of the jth resource node, g j .resource m is the current available resource amount of the mth dimension of the jth resource node, max_resource m is the maximum resource amount in the mth dimension, β m is the weight parameter corresponding to the resource amount in the mth dimension.

[0068] For example, each resource node includes five dimensions of resource features, namely, GPU computing power, video memory size, bandwidth, current load, and reliability. For example, the first dimension of resource features is GPU computing power, the second dimension of resource features is video memory size, the third dimension of resource features is bandwidth, the fourth dimension of resource features is current load, and the fifth dimension of resource features is reliability. Then g j .resource m The value of m ranges from 1 to 5, for example, g 1 .resource 2 is 8g, then g 1 .resource 2 The current available resource amount of the second dimension that can be used to characterize the first resource node is 8 GB, that is, the available video memory size in the first resource node is 8 GB. The resource characteristics of the remaining dimensions are similar.

[0069] Exemplarily, the load balancing score of each resource node in the embodiment of the present application can be obtained in the following manner, including: obtaining the current load of each resource node; calculating the current load through a preset load balancing function to obtain the load balancing score.

[0070] In some embodiments, the current load is calculated by a preset load balancing function to obtain a load balancing score, including: calculating Get the load balancing score; where L(g j ) is the load balancing score of the jth resource node, g j .Current_load is the current load of the jth resource node, g j .Max_load The maximum load of the j-th resource node.

[0071] Exemplarily, the reliability score of each resource node in the embodiment of the present application can be obtained in the following manner, including: obtaining the reliability characteristics of each resource node; wherein the reliability characteristics include the task execution success rate, the resource online time rate and the response rate; calculating the reliability characteristics through a preset reliability function to obtain a reliability score.

[0072] In some embodiments, the reliability feature is calculated by a preset reliability function to obtain a reliability score, including: calculating R(g j )=λ 1 Success_Rate j +λ 2 Uptime_Rate j +λ 3 Response_Rate j Get the reliability score; where R(g j ) is the reliability score of the j-th resource node, Success_Rate j is the task execution success rate of the jth resource node, Uptime_Rate j is the resource online time rate of the jth resource node, Response_Rate j is the response rate of the jth resource node. 1 , 2 and λ 3 is a preset weight parameter. In some embodiments, λ 1 +λ 2 +λ 3 =1.

[0073] In some embodiments, obtaining resource capability evaluation weight parameters corresponding to resource attribute scores includes: matching resource capability evaluation weight parameters corresponding to resource attributes of the resource attribute scores from a preset database; wherein the preset database stores the correspondence between resource attributes and resource capability evaluation weight parameters.

[0074] Step S620: performing weighted summation on the resource attribute scores according to the resource capability evaluation weight parameter to obtain a second evaluation result.

[0075] It is understandable that the second evaluation result is a score for resource capabilities. In the embodiment of the present application, by obtaining the resource capability evaluation weight parameter corresponding to the resource attribute to balance the scores of each resource capability, the sensitivity of the resource capability scoring algorithm can be adjusted, and at the same time, different weight parameters are used to constrain the scores of different types of resource capabilities, so that the resource capability scores can be optimized, thereby obtaining the resource capability scores more accurately.

[0076] Exemplarily, weighted summing of resource attribute scores according to resource capability evaluation weight parameters to obtain a second evaluation result includes: calculating S(g j )=w 1 P(g j )+w 2 L(g j )+w 3 R(g j ) obtains the second evaluation result; wherein, S(g j ) is the second evaluation result of the jth resource node, P(g j ) is the performance score of the jth resource node, L(g j ) is the load balancing score of the jth resource node, R(g j ) is the reliability score of the jth resource node, w 1 、w 2 and w 3 is a resource capability evaluation weight parameter. In some embodiments, w 1 ,w 2 ,w 3 ∈[0,1], and w 1 +w 2 +w 3 =1.

[0077] Combination Figure 7 As shown, Figure 7 yes Figure 4 Step S410 in the illustrated embodiment is a flowchart of performing trust evaluation on multiple resource nodes in an exemplary embodiment, which includes at least steps S710 to S720, which are described in detail as follows:

[0078] Step S710, obtaining historical reputation features of multiple resource nodes, and obtaining trust weight parameters corresponding to the historical reputation features.

[0079] Among them, historical reputation features include node historical performance, node consensus credibility and node stability.

[0080] In some embodiments, the historical reputation features of each resource node in the embodiments of the present application can be obtained by the following methods, including: matching the historical reputation features corresponding to the resource nodes from a preset database; wherein the preset database stores the correspondence between the resource nodes and the historical reputation features.

[0081] In some embodiments, the trust weight parameters corresponding to the historical reputation features in the embodiments of the present application can be obtained by the following methods, including: matching the trust weight parameters corresponding to the historical reputation features in a preset database; wherein the preset database stores the correspondence between the historical reputation features and the trust weight parameters.

[0082] Step S720: weighted summing of historical reputation features is performed according to the trust weight parameter to obtain a third evaluation result.

[0083] It is understandable that the third evaluation result is a trust score for each resource node. In the embodiment of the present application, the historical reputation features are balanced by obtaining the trust weight parameters corresponding to the historical reputation features, which can adjust the sensitivity of the trust scoring algorithm. At the same time, different weight parameters are used to constrain different types of historical reputation features, which can optimize the trust score to obtain a more accurate trust score. In addition, by introducing a trust scoring mechanism, the historical performance and service quality of resource providers are scored to help the system evaluate the value of their resources, give priority to the allocation of resources of resource nodes with high trust scores, thereby improving the efficiency of task execution, and effectively preventing malicious node behavior, thereby ensuring the overall security and fairness of the scheduling system.

[0084] Exemplarily, weighted summing of historical reputation features according to the trust weight parameter to obtain the third evaluation result includes: calculating Trust(g j ) = η 1 HistoricalPerf j +η 2 ConsensusValid j +η 3 Stability j Obtain the third evaluation result; wherein, Trust(g j ) is the third evaluation result of the j-th resource node, that is, the trust score of the j-th resource node, HistoricalPerf j is the node historical performance of the j-th resource node, ConsensusValid j is the node consensus credibility of the j-th resource node, Stability j is the node stability of the jth resource node. 1 , η 2and η 3 is a trust weight parameter. In some embodiments, n 1 +η 2 +η 3 =1.

[0085] Step S420: Match the task to be processed with the multiple resource nodes respectively to obtain candidate matching degrees corresponding to the multiple resource nodes respectively.

[0086] It is understandable that in the embodiment of the present application, the tasks to be processed and multiple resource nodes can be pre-allocated to obtain the alternative matching degree between each resource node and the tasks to be processed, thereby obtaining a preliminary matching result.

[0087] Combination Figure 8 As shown, Figure 8 yes Figure 4 Step S420 in the illustrated embodiment is a flowchart for optimizing the candidate matching degree in an exemplary embodiment, which includes at least steps S810 to S820, which are described in detail as follows:

[0088] Step S810, obtaining the resource matching degree and the load matching degree when the to-be-processed task is run on multiple resource nodes respectively, and obtaining the matching degree weight parameters corresponding to the resource matching degree and the load matching degree respectively.

[0089] It is understandable that when assigning pending tasks to resource nodes for processing, it is necessary to consider whether the current remaining available resources in the resource nodes and the current load situation are sufficient to execute the pending tasks, so as to avoid resource node overload and task processing failure, balance the load and reduce the task failure rate; and, by comprehensively considering resource matching and load matching, it can ensure that tasks are assigned to the most suitable resource nodes, thereby improving the processing efficiency and response speed of the entire scheduling system.

[0090] For example, in the embodiment of the present application, the resource matching degree when the to-be-processed task is run on multiple resource nodes can be obtained by the following method, including: by calculating Obtain resource matching degree; where F(t i ,g j ) is the resource matching degree when the i-th pending task runs on the j-th resource node; g j .resource m is the current available resource amount of the mth dimension of the jth resource node, t i .requirement mis the required resource amount of the mth dimension for the i-th task to be processed. By taking the minimum value of the above resource matching degree, the reasonable allocation of tasks to be processed can be achieved, and the available resources can be utilized to the maximum extent to avoid resource waste.

[0091] Exemplarily, in the embodiment of the present application, the load matching degrees corresponding to the multiple resource nodes can be obtained in the following manner, including: by calculating Obtain load matching; where E(t i ,g j ) is the load matching degree between the i-th task to be processed and the j-th resource node, g j .Current_load is the current load of the jth resource node, g j .Max_load The maximum load of the j-th resource node.

[0092] In some embodiments, obtaining the matching weight parameters corresponding to the resource matching degree and the load matching degree respectively includes: matching the matching weight parameters corresponding to the resource matching degree from a preset database, and matching the matching weight parameters corresponding to the load matching degree from a preset database. The preset database stores the corresponding relationship between the resource matching degree and the matching weight parameters, and the corresponding relationship between the load matching degree and the matching weight parameters.

[0093] Step S820: weighted calculation is performed on the resource matching degree and the load matching degree according to the matching degree weight parameter to obtain candidate matching degrees corresponding to the plurality of resource nodes.

[0094] In some embodiments, the resource matching degree and the load matching degree are weightedly calculated according to the matching degree weight parameter to obtain the candidate matching degrees corresponding to the multiple resource nodes, including: calculating M(t i ,g j )=γ 1 F(t i ,g j )+γ 2 E(t i ,g j ) obtains the candidate matching degree corresponding to the resource node; where M(t i ,g j ) is the alternative matching degree between the i-th task to be processed and the j-th resource node, F(t i ,g j ) is the resource matching degree between the i-th task to be processed and the j-th resource node, E(t i ,g j ) is the load matching degree between the i-th task to be processed and the j-th resource node. 1 and γ 2is a matching weight parameter. In some embodiments, γ 1 +γ 2 =1.

[0095] Step S430, optimizing the candidate matching degrees according to the first evaluation result, the second evaluation result and the third evaluation result, to obtain target matching degrees corresponding to the plurality of resource nodes.

[0096] In the embodiment of the present application, the first evaluation result is the priority score, the second evaluation result is the resource capability score, and the third evaluation result is the trust score; by optimizing the alternative matching degree through the scoring mechanism of the above three dimensions, a more accurate target matching degree can be obtained, so that the scheduling system can ensure reasonable task allocation when scheduling resources according to the target matching degree, while maximizing resource utilization.

[0097] Exemplarily, optimizing the candidate matching degrees according to the first evaluation result, the second evaluation result, and the third evaluation result to obtain target matching degrees corresponding to the plurality of resource nodes respectively includes: calculating M'(t i ,g j )=M(t i ,g j )*P(t i )*S(g i )*Trust(g j ) to obtain the target matching degree; where M'(t i ,g j ) is the target matching degree between the i-th task to be processed and the j-th resource node, M(t i ,g j ) is the alternative matching degree between the i-th task to be processed and the j-th resource node, P(t i ) is the first evaluation result corresponding to the i-th task to be processed, that is, the priority score, S(g j ) is the second evaluation result of the j-th resource node, i.e., the resource capability score, Trust(g j ) is the third evaluation result of the j-th resource node, that is, the trust score.

[0098] Step S440: determining a target resource node for executing the task to be processed from a plurality of resource nodes according to the target matching degree.

[0099] It can be understood that in the embodiment of the present application, the target resource node for executing the task to be processed is determined from multiple resource nodes through the target matching degree, and the target resource node that is more suitable for the current task to be processed can be screened out, thereby avoiding resource waste and improving resource utilization efficiency.

[0100] Exemplarily, in the embodiment of the present application, the target resource node for executing the task to be processed can be determined from multiple resource nodes according to the target matching degree in the following manner, including: determining the resource node corresponding to the maximum value among the multiple target matching degrees as the target resource node for executing the task to be processed. In this way, by determining the resource node with the largest target matching degree as the target resource node for executing the task to be processed, it is possible to ensure reasonable task allocation while maximizing resource utilization.

[0101] In some embodiments, the resource node corresponding to the maximum value among multiple target matching degrees can be determined as the target resource node for executing the task to be processed in the following manner, including: calculating the target matching degrees corresponding to multiple resource nodes respectively through a preset global optimization function to obtain the target resource node.

[0102] In some embodiments, the global optimization function is Maximize∑ i ∑ j X ij M'(t i ,g j ), where X ij It is used to indicate whether the i-th task to be processed is allocated to the j-th resource node. In some embodiments, if X ij =1, it is considered that the i-th pending task is allocated to the j-th resource node; if X ij = 0, it is considered that the i-th pending task is not allocated to the j-th resource node; M'(t i ,g j ) is the target matching degree between the i-th task to be processed and the j-th resource node.

[0103] In another embodiment, the resource scheduling method based on blockchain provided in the embodiment of the present application also includes the following constraints, which are specifically executed by the blockchain smart contract, and the constraints include:

[0104] Task unique assignment constraint C1: ∑ j X ij =1, X ij ∈{0,1}; By setting the task unique allocation constraint C1, it can be ensured that only one pending task is executed on a resource node at the same time, thereby improving the efficiency and stability of task execution.

[0105] Capacity constraint C2: ∑ j X ij L(t i )≤C j , Among them, L(t i ) is the load requirement of the i-th task, Cj is the load limit of the j-th resource node; by setting the capacity constraint C2, the task loads of all tasks assigned to the j-th resource node are added together to ensure that the task load assigned to the resource node is lower than the load limit of the resource node, thereby ensuring that the resource node can run stably and improving the success rate of task execution;

[0106] Load balancing constraint C3: Among them, var(L) is the total load of the j-th resource node, L(t i ) is the load requirement of the i-th task, L - is the average load of all resource nodes, σ 2 is the preset load parameter, and m is the total number of resource feature dimensions of the resource node. In this way, by setting the load balancing constraint C3, it is possible to prevent the resource node from being overloaded, thereby improving resource utilization efficiency.

[0107] In this way, by using blockchain smart contracts to execute the above constraints, it is possible to achieve global optimization decisions in the resource scheduling process, maximizing resource utilization while ensuring reasonable task allocation.

[0108] Exemplarily, in the embodiment of the present application, the target resource node for executing the task to be processed can also be determined from multiple resource nodes according to the target matching degree in the following manner, including: determining a preset number of target matching degrees with the largest value from multiple target matching degrees, and selecting a resource node that has not been used in a preset time period from the resource nodes corresponding to the preset number of target matching degrees with the largest value as the target resource node. Wherein, the preset time period is the last task processing cycle, for example, within the past 2 hours. In this way, by selecting a resource node that has not been used in the last task processing cycle as the target resource node from the target matching degrees with the largest preset number of values, it is possible to avoid continuous use of the same resource node, prevent the node from being overloaded or becoming a bottleneck, thereby helping to achieve a more uniform load distribution in the entire resource scheduling system and improve overall performance and efficiency.

[0109] Please continue reading Fig. 9 , Fig. 9 is a flowchart of a resource scheduling method based on blockchain shown in another exemplary embodiment of the present application. After determining a target resource node for executing a task to be processed from multiple resource nodes according to the target matching degree, the resource scheduling method based on blockchain at least further includes step S910, which is described in detail as follows:

[0110] S910, adjusting the preset weight parameters by using a preset gradient descent optimization algorithm.

[0111] Among them, the preset weight parameters include at least one of a priority evaluation weight parameter, a resource capability evaluation weight parameter, a trust weight parameter and a matching weight parameter.

[0112] It can be understood that in the embodiment of the present application, after each resource scheduling, the weight parameters are adjusted through a preset gradient descent optimization algorithm, which can achieve dynamic adjustment of the weight parameters, thereby ensuring the reliability and efficiency of the resource scheduling process; at the same time, the resource allocation strategy is optimized through dynamic weight adjustment.

[0113] In some embodiments, the priority evaluation weight parameter is adjusted by a preset gradient descent optimization algorithm, including: by calculating Get the adjusted priority evaluation weight parameter. Among them, J(α z )=-∑ i ∑ j X ij M'(t i ,g j )+τ 1 C 1 +τ 2 C 2 +τ 3 C 3 , X ij It is used to indicate whether the i-th task to be processed is allocated to the j-th resource node. In some embodiments, if X ij =1, it is considered that the i-th pending task is allocated to the j-th resource node; if X ij = 0, it is considered that the i-th pending task is not allocated to the j-th resource node, M'(t i ,g j ) is the target matching degree between the i-th task to be processed and the j-th resource node, J(α z ) is the loss function in the gradient descent optimization algorithm, τ 1 , τ 2 and τ 3 is the preset parameter in the loss function; C 1 , C 2 and C 3 is the preset constant in the loss function, α' z is the adjusted priority evaluation weight parameter, α z is the priority evaluation weight parameter before adjustment, η is the preset learning rate,

[0114] In some embodiments, the resource capability evaluation weight parameters are adjusted by a preset gradient descent optimization algorithm, including: Get the adjusted resource capacity evaluation weight parameter. Among them, J(w z)=-∑ i ∑ j X ij M'(t i ,g j )+τ 1 C 1 +τ 2 C 2 +τ 3 C 3 , X ij It is used to indicate whether the i-th task to be processed is allocated to the j-th resource node. In some embodiments, if X ij =1, it is considered that the i-th pending task is allocated to the j-th resource node; if X ij = 0, it is considered that the i-th pending task is not allocated to the j-th resource node, M'(t i ,g j ) is the target matching degree between the i-th task to be processed and the j-th resource node, J(w z ) is the loss function in the gradient descent optimization algorithm, τ 1 , τ 2 and τ 3 is the preset parameter in the loss function; C 1 , C 2 and C 3 is the preset constant in the loss function, w' z is the adjusted resource capacity evaluation weight parameter, w z is the resource capacity evaluation weight parameter before adjustment, η is the preset learning rate,

[0115] In some embodiments, the trust weight parameter is adjusted by a preset gradient descent optimization algorithm, including: Get the adjusted trust weight parameter. z )=-Σ i ∑ j X ij M'(t i ,g j )+τ 1 C 1 +τ 2 C 2 +τ 3 C 3 , X ij It is used to indicate whether the i-th task to be processed is allocated to the j-th resource node. In some embodiments, if X ij =1, it is considered that the i-th pending task is allocated to the j-th resource node; if X ij = 0, it is considered that the i-th pending task is not allocated to the j-th resource node, M'(ti ,g j ) is the target matching degree between the i-th task to be processed and the j-th resource node, J(η z ) is the loss function in the gradient descent optimization algorithm, τ 1 , τ 2 and τ 3 is the preset parameter in the loss function; C 1 , C 2 and C 3 is the preset constant in the loss function, η' z is the adjusted trust weight parameter, η z is the trust weight parameter before adjustment, η is the preset learning rate,

[0116] In some embodiments, the matching weight parameter is adjusted by a preset gradient descent optimization algorithm, including: Get the adjusted trust weight parameter. Among them, J(γ e )=-Σ i Σ j X ij M'(t i ,g j )+τ 1 C 1 +τ 2 C 2 +τ 3 C 3 , X ij It is used to indicate whether the i-th task to be processed is allocated to the j-th resource node. In some embodiments, if X ij =1, it is considered that the i-th pending task is allocated to the j-th resource node; if X ij = 0, it is considered that the i-th pending task is not allocated to the j-th resource node, M'(t i ,g j ) is the target matching degree between the i-th task to be processed and the j-th resource node, J(γ e ) is the loss function in the gradient descent optimization algorithm, τ 1 , τ 2 and τ 3 is the preset parameter in the loss function; C 1 , C 2 and C 3 is the preset constant in the loss function, γ' e is the adjusted trust weight parameter, γ e is the trust weight parameter before adjustment, η is the preset learning rate,

[0117] Combination Fig.10 As shown, Fig.10 It is a resource scheduling device based on blockchain shown in an exemplary embodiment of the present application, and the device includes an evaluation module 1010, a matching module 1020, an optimization module 1030 and a determination module 1040. The evaluation module 1010 is configured to perform a priority evaluation on the task to be processed, obtain a first evaluation result, perform a resource capability evaluation on multiple resource nodes, obtain a second evaluation result, and perform a trust evaluation on multiple resource nodes to obtain a third evaluation result; the matching module 1020 is configured to match the task to be processed with multiple resource nodes respectively, and obtain the candidate matching degrees corresponding to the multiple resource nodes respectively; the optimization module 1030 is configured to optimize the candidate matching degrees according to the first evaluation result, the second evaluation result and the third evaluation result, and obtain the target matching degrees corresponding to the multiple resource nodes respectively; the determination module 1040 is configured to determine the target resource node for executing the task to be processed from the multiple resource nodes according to the target matching degree.

[0118] In some embodiments, the evaluation module 1010 is configured to perform a priority evaluation on the task to be processed to obtain a first evaluation result in the following manner, including: obtaining a task attribute score corresponding to the task to be processed, and obtaining a priority evaluation weight parameter corresponding to the task attribute score; wherein the task attribute score includes a task urgency score, a task waiting time score, and a task resource requirement ratio; and performing a weighted summation of the task attribute scores according to the priority evaluation weight parameter to obtain a first evaluation result.

[0119] In some embodiments, the evaluation module 1010 is configured to perform resource capability evaluation on multiple resource nodes to obtain a second evaluation result in the following manner, including: obtaining resource attribute scores of multiple resource nodes, and obtaining resource capability evaluation weight parameters corresponding to the resource attribute scores; wherein the resource attribute scores include performance scores, load balancing scores, and reliability scores; and performing weighted summation of the resource attribute scores according to the resource capability evaluation weight parameters to obtain a second evaluation result.

[0120] In some embodiments, the evaluation module 1010 is configured to perform a trust evaluation on multiple resource nodes to obtain a third evaluation result, including: obtaining historical reputation features of multiple resource nodes, and obtaining trust weight parameters corresponding to the historical reputation features; wherein the historical reputation features include node historical performance, node consensus credibility, and node stability; performing weighted summation of the historical reputation features according to the trust weight parameters to obtain a third evaluation result.

[0121] In some embodiments, the matching module 1020 is configured to match the task to be processed and multiple resource nodes respectively in the following manner to obtain alternative matching degrees corresponding to the multiple resource nodes respectively, including: obtaining the resource matching degree and load matching degree when the task to be processed is run on multiple resource nodes respectively, and obtaining the matching weight parameters corresponding to the resource matching degree and the load matching degree respectively; performing weighted calculation on the resource matching degree and the load matching degree according to the matching weight parameters to obtain the alternative matching degrees corresponding to the multiple resource nodes respectively.

[0122] In some embodiments, the determination module 1040 is configured to determine the target resource node for executing the task to be processed from multiple resource nodes according to the target matching degree in the following manner, including: determining the resource node corresponding to the maximum value among the multiple target matching degrees as the target resource node for executing the task to be processed.

[0123] In some embodiments, the blockchain-based resource scheduling device also includes an update module, which is configured to adjust the preset weight parameters through a preset gradient descent optimization algorithm after determining the target resource node for executing the task to be processed from multiple resource nodes according to the target matching degree; wherein the preset weight parameters include at least one of a priority evaluation weight parameter, a resource capability evaluation weight parameter, a trust weight parameter and a matching weight parameter.

[0124] An embodiment of the present disclosure further provides an electronic device, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.

[0125] Fig.11 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.11 The computer system 1100 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0126] like Fig.11As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 to the random access memory (RAM) 1103, such as executing the method in the above embodiment. In the random access memory 1103, various programs and data required for system operation are also stored. The central processing unit 1101, the read-only memory 1102 and the random access memory 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0127] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.

[0128] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1109, and / or installed from a removable medium 1111. When the computer program is executed by a central processing unit (CPU) 1101, various functions defined in the system of the present application are executed.

[0129] The embodiments of the present disclosure also provide a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned resource scheduling method based on blockchain.

[0130] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0131] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0132] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0133] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the resource scheduling method based on blockchain as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.

[0134] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A resource scheduling method based on blockchain, characterized in that: The method is applied to a resource scheduling system, wherein the resource scheduling system includes a resource layer, a resource scheduling layer and a blockchain layer, wherein the resource layer includes a plurality of resource nodes for providing computing resources; the resource scheduling layer includes a blockchain smart contract, and the blockchain smart contract is used to schedule resource nodes in the resource layer to execute tasks to be processed; The blockchain layer is used for data storage and data verification; the method includes: Performing a priority evaluation on the pending tasks to obtain a first evaluation result, performing a resource capability evaluation on the multiple resource nodes to obtain a second evaluation result, and performing a trust evaluation on the multiple resource nodes to obtain a third evaluation result; Matching the to-be-processed tasks with the multiple resource nodes respectively, and obtaining candidate matching degrees corresponding to the multiple resource nodes respectively; Optimizing the candidate matching degrees according to the first evaluation result, the second evaluation result, and the third evaluation result to obtain target matching degrees corresponding to the multiple resource nodes respectively; A target resource node for executing the task to be processed is determined from the multiple resource nodes according to the target matching degree.

2. The method according to claim 1, characterized in that The step of performing a priority evaluation on the task to be processed to obtain a first evaluation result includes: Obtaining a task attribute score corresponding to the task to be processed, and obtaining a priority evaluation weight parameter corresponding to the task attribute score; wherein the task attribute score includes a task urgency score, a task waiting time score, and a task resource requirement ratio; The task attribute scores are weighted and summed according to the priority evaluation weight parameter to obtain the first evaluation result.

3. The method according to claim 1, characterized in that The performing resource capability evaluation on the plurality of resource nodes to obtain a second evaluation result includes: Obtain resource attribute scores of the multiple resource nodes, and obtain resource capability evaluation weight parameters corresponding to the resource attribute scores; wherein the resource attribute scores include performance scores, load balancing scores, and reliability scores; The resource attribute scores are weighted and summed according to the resource capability evaluation weight parameter to obtain the second evaluation result.

4. The method according to claim 1, characterized in that The performing trust evaluation on the multiple resource nodes to obtain a third evaluation result includes: Obtaining historical reputation features of the multiple resource nodes, and obtaining trust weight parameters corresponding to the historical reputation features; wherein the historical reputation features include node historical performance, node consensus credibility, and node stability; The historical reputation features are weighted and summed according to the trust weight parameter to obtain the third evaluation result.

5. The method according to claim 1, characterized in that The matching the to-be-processed tasks with the multiple resource nodes respectively to obtain candidate matching degrees respectively corresponding to the multiple resource nodes includes: Obtain resource matching degrees and load matching degrees when the tasks to be processed are respectively run on the multiple resource nodes, and obtain matching weight parameters corresponding to the resource matching degrees and load matching degrees respectively; The resource matching degree and the load matching degree are weightedly calculated according to the matching degree weight parameter to obtain candidate matching degrees respectively corresponding to the multiple resource nodes.

6. The method according to claim 1, characterized in that Determining a target resource node for executing the task to be processed from the multiple resource nodes according to the target matching degree includes: The resource node corresponding to the maximum value among the multiple target matching degrees is determined as the target resource node for executing the task to be processed.

7. The method according to any one of claims 1 to 5, characterized in that After determining the target resource node for executing the task to be processed from the multiple resource nodes according to the target matching degree, the method further includes: The preset weight parameters are adjusted by a preset gradient descent optimization algorithm; wherein the preset weight parameters include at least one of the priority evaluation weight parameter, the resource capability evaluation weight parameter, the trust weight parameter and the matching weight parameter.

8. A resource scheduling device based on blockchain, characterized in that: The device comprises: An evaluation module is configured to perform a priority evaluation on the task to be processed to obtain a first evaluation result, perform a resource capability evaluation on a plurality of resource nodes to obtain a second evaluation result, and perform a trust evaluation on the plurality of resource nodes to obtain a third evaluation result; A matching module is configured to match the to-be-processed task with the plurality of resource nodes respectively, and obtain candidate matching degrees respectively corresponding to the plurality of resource nodes; an optimization module, configured to optimize the candidate matching degrees according to the first evaluation result, the second evaluation result, and the third evaluation result, to obtain target matching degrees corresponding to the multiple resource nodes respectively; The determination module is configured to determine a target resource node for executing the task to be processed from the multiple resource nodes according to the target matching degree.

9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the blockchain-based resource scheduling method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer executes the blockchain-based resource scheduling method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for processing computing power task of computing power network based on block chain

    CN116909695A

  • Computing power scheduling system and method, control node, storage medium and equipment

    CN117294702A

  • Node selection method and device based on task collaboration, equipment and medium

    CN117354310A

  • Method and apparatus for allocating invokable resources

    WO2023185043A1

Cited By

  • High-performance computing system

    CN120104286A

  • Distributed intelligent computing resource scheduling optimization method and system

    CN120469817A

  • A distributed intelligent computing resource scheduling optimization method and system

    CN120469817B

  • Power distribution network resource allocation method and device, storage medium and electronic equipment

    CN120634121A