CN117573340A - Resource scheduling method and device based on block chain, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN117573340A
CN117573340A CN202311501450.4A CN202311501450A CN117573340A CN 117573340 A CN117573340 A CN 117573340A CN 202311501450 A CN202311501450 A CN 202311501450A CN 117573340 A CN117573340 A CN 117573340A
Authority
CN
China
Prior art keywords
service
resource
consensus nodes
node
resource scheduling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311501450.4A
Other languages
Chinese (zh)
Inventor
高畅
赵永刚
张淼
白波
余弦
石正贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202311501450.4A priority Critical patent/CN117573340A/en
Publication of CN117573340A publication Critical patent/CN117573340A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a resource scheduling method and device based on a blockchain, electronic equipment and a storage medium. The method comprises the following steps: responding to a resource scheduling request, carrying out polling operation on a plurality of consensus nodes of the block chain, determining a broadcast node from the plurality of consensus nodes, wherein one consensus node corresponds to one service cluster; determining a plurality of target consensus nodes from a plurality of other consensus nodes based on the broadcasting node, wherein the target consensus nodes are the consensus nodes determined from the plurality of other consensus nodes according to the task quantity to be processed and the response time length corresponding to each other consensus node, and the response time length is the time length of the corresponding other consensus nodes responding to the broadcasting message sent by the broadcasting node; service resources in a plurality of service clusters are scheduled based on a broadcast node and a plurality of target consensus nodes. The scheme provided by the application reduces the management pressure of resource scheduling and improves the efficiency of resource scheduling.

Description

Resource scheduling method and device based on block chain, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of blockchains, and particularly relates to a blockchain-based resource scheduling method, a blockchain-based resource scheduling device, electronic equipment and a storage medium.
Background
Cloud computing services, i.e., cloud services, are cloud computing products that may be used as a service offering. With the rapid development of cloud computing services, a plurality of cloud services such as public cloud, private cloud, edge cloud and the like exist in the market at present. The existence of multiple types of cloud services creates a need for resource scheduling among the multiple types of cloud services.
In the related art, a dedicated cloud management platform is generally used to schedule cloud service resources under multi-cloud collaboration. However, in the related art, as the service cluster size and the number of servers increase, the cloud management platform will bear greater and greater management and scheduling pressures, and the response speed of resource scheduling will also decrease in geometric speed. Moreover, the centralized cloud management platform has poor horizontal expansion capability, and after the pressure of resource scheduling reaches a certain limit, the system may be blocked or even crashed due to backlog of scheduling tasks, so that the efficiency of the cloud management platform for managing and scheduling cloud service resources is reduced.
Disclosure of Invention
The embodiment of the application provides a resource scheduling method, device, electronic equipment and storage medium based on a blockchain, which can reduce the management pressure of resource scheduling and improve the efficiency of resource scheduling.
In a first aspect, an embodiment of the present application provides a method for scheduling resources based on a blockchain, where the method includes: responding to a resource scheduling request, carrying out polling operation on a plurality of consensus nodes of the block chain, and determining a broadcast node from the plurality of consensus nodes, wherein one consensus node corresponds to one service cluster; determining a plurality of target consensus nodes from a plurality of other consensus nodes based on the broadcasting node, wherein the plurality of other consensus nodes are the consensus nodes except the broadcasting node in the plurality of consensus nodes, the plurality of target consensus nodes are the consensus nodes determined from the plurality of other consensus nodes according to the task quantity to be processed and the response time length corresponding to each other consensus node, and the response time length is the time length of the corresponding other consensus nodes responding to the broadcasting message sent by the broadcasting node; service resources in a plurality of service clusters are scheduled based on a broadcast node and a plurality of target consensus nodes.
In a second aspect, an embodiment of the present application provides a resource scheduling apparatus based on a blockchain, where the apparatus includes: the polling module is used for responding to the resource scheduling request, carrying out polling operation on a plurality of consensus nodes of the block chain, and determining a broadcast node from the plurality of consensus nodes, wherein one consensus node corresponds to one service cluster; the node selection module is used for determining a plurality of target consensus nodes from a plurality of other consensus nodes based on the broadcast node, wherein the plurality of other consensus nodes are the consensus nodes except the broadcast node in the plurality of consensus nodes, the plurality of target consensus nodes are the consensus nodes determined from the plurality of other consensus nodes according to the task quantity to be processed and the response time length corresponding to each other consensus node, and the response time length is the time length of the corresponding other consensus nodes responding to the broadcast message sent by the broadcast node; and the resource scheduling module is used for scheduling the service resources in the service clusters based on the broadcasting nodes and the target consensus nodes.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the blockchain-based resource scheduling method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement the blockchain-based resource scheduling method of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, the instructions in which, when executed by a processor of an electronic device, cause the electronic device to perform the blockchain-based resource scheduling method of the first aspect.
The method comprises the steps that other consensus nodes are determined based on the selected consensus nodes to perform resource scheduling, after a resource scheduling request is responded, polling operation is performed on a plurality of the consensus nodes of the block chain, and a broadcasting node is determined from the plurality of the consensus nodes; then the broadcasting node determines a plurality of target consensus nodes from a plurality of other consensus nodes according to the task quantity to be processed and the response time length corresponding to each other consensus node; and finally, scheduling the service resources in the service clusters based on the broadcasting node and the target consensus nodes. The plurality of other consensus nodes are the consensus nodes except the broadcasting node in the plurality of consensus nodes, and the response time is the time of the corresponding other consensus nodes responding to the broadcasting message sent by the broadcasting node.
From the above, in the present application, the polling operation is performed on the plurality of consensus nodes to obtain the broadcast node, and then the target consensus node is selected based on the broadcast node to perform resource scheduling.
In addition, in the method, after the broadcast node is determined, the target consensus node is selected by the broadcast node to perform resource scheduling, so that the pressure of the multi-cloud cooperation network on the network level is released, the multi-cloud cooperation network can have more service capacity to respond to the resource scheduling request of the user, the response speed of the resource scheduling request is further improved, and the resource scheduling efficiency is further improved.
Therefore, the scheme provided by the application solves the problem of low resource scheduling efficiency in the related technology, reduces the management pressure of resource scheduling, and improves the efficiency of resource scheduling.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
Fig. 1 is a schematic view of a resource scheduling structure of a cloud management platform in the related art;
FIG. 2 is a flow chart of resource scheduling in the related art;
FIG. 3 is a schematic diagram of a multi-cloud collaboration network provided in one embodiment of the present application;
FIG. 4 is a flow diagram of a blockchain-based resource scheduling method provided by an embodiment of the present application;
FIG. 5 is a flow diagram of a blockchain-based resource scheduling method provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a block chain based resource scheduling apparatus according to another embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application are described in detail below to make the objects, technical solutions and advantages of the present application more apparent, and to further describe the present application in conjunction with the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative of the application and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
For ease of understanding, the background of the solution provided by the present application is explained before explaining the solution provided by the embodiments of the present application.
With the rapid development of cloud computing services, a plurality of cloud services such as public cloud, private cloud, edge cloud and the like exist in the market at present. The existence of multiple types of cloud services creates a need for resource scheduling among the multiple types of cloud services. In the related art, cloud management platforms are generally used to schedule cloud resources for multi-cloud collaboration. The resource scheduling structure of the cloud management platform is shown in fig. 1.
As can be seen from fig. 1, in the related art, the cloud management platform is configured with proxy services in different types of cloud services (such as private cloud, public cloud, and edge cloud), and the cloud management platform can interact with cloud resource clusters in each cloud service through the proxy services. The proxy service can be used for monitoring and collecting cloud resource service information of a cloud resource cluster in the cloud service, and the cloud resource service information can comprise information such as resource types, names, specifications, resource use conditions, service running conditions and the like.
In addition, as can be seen from fig. 1, the cloud management platform may provide a resource information collection service, a resource scheduling service, a rights management service, a resource application service, and a resource information display service to each cloud service. The resource information acquisition service can control agent services in each cloud service to acquire information according to a certain frequency, the agent services transmit the acquired information back to the cloud management platform, and the cloud management platform compares the acquired information with the existing data and updates and stores the changed data. These data are the data base for resource scheduling by the cloud management platform.
Fig. 2 shows a flow chart of resource scheduling based on the cloud management platform shown in fig. 1, and the flow shown in fig. 2 includes the following steps:
S20, a cloud management platform in the resource demand direction initiates a cloud resource request containing cloud resource demands, and the cloud management platform receives the cloud resource request and analyzes the cloud resource request, so that the resource type, specification, quantity and the like of resources required by the resource demand side are determined.
S21, the cloud management platform searches available resources in the residual resources of various types of cloud services according to the cloud resource request, performs resource scheduling, and then sends scheduling instructions to proxy services in related cloud services.
S22, after receiving the scheduling instruction, the proxy service executes corresponding operations such as cloud resource deployment initialization and the like so as to finish generating cloud resources required by the resource demander.
S23, the cloud management platform collects generation information of all cloud resources, and feeds back access and use information of the corresponding cloud resources to the resource demand party in the forms of platform information, mails and the like.
S24, the resource demander accesses the cloud resource and performs subsequent service function development.
As can be seen from the above steps S20 to S24, in the related art, the cloud resource scheduling in the multi-cloud collaboration mode is responsible for the centralized cloud management platform, and depends on the operations of the cloud management platform for statistics, matching, scheduling and the like of various cloud service resources under jurisdiction. With the increase of the service cluster size and the number of servers, the cloud management platform becomes a bottleneck of cloud resource scheduling in a multi-cloud cooperation mode.
In order to solve the above problems, an embodiment of the present application provides a method, an apparatus, an electronic device, and a storage medium for scheduling resources based on a blockchain, where the method is applied to a multi-cloud collaboration network shown in fig. 3.
As can be seen from fig. 3, the multi-cloud collaboration network is composed of multiple types of multi-cloud scheduling intelligent contracts and multi-cloud collaboration chains, wherein the multi-remote collaboration chains are composed of a multi-cloud scheduling consensus algorithm and a multi-cloud image ledger, the multi-cloud image ledger is used for recording configuration information and service deployment information of service clusters in each cloud service, and the information recorded in the multi-cloud image ledger is the basis of multi-cloud resource scheduling.
In addition, it should be noted that, in the present application, the nodes in the blockchain include at least an accounting node and a consensus node, each service cluster at least corresponds to one accounting node and one consensus node, that is, the accounting nodes in the blockchain are distributed in different service clusters of each cloud service, a small number of consensus nodes select appropriate cluster resources by executing a multi-cloud scheduling consensus algorithm, and the accounting nodes on the selected service cluster execute a corresponding multi-cloud scheduling intelligent contract, and the multi-cloud scheduling intelligent contract executes cluster deployment according to a scheduling transaction policy. And synchronizing the information of different types of cloud services in the multi-cloud cooperative chain by utilizing the characteristic of data sharing of each node account of the block chain, and scheduling the resources of each cloud service by utilizing a multi-cloud computing consensus scheduling algorithm, so that the scheduling efficiency of the service resources is improved.
The blockchain-based resource scheduling method provided by the present application is described below.
Fig. 4 is a flowchart of a block chain-based resource scheduling method according to an embodiment of the present application. As shown in fig. 4, the method comprises the steps of:
in step S401, in response to the resource scheduling request, a polling operation is performed on a plurality of common nodes of the blockchain, and a broadcast node is determined from the plurality of common nodes.
In step S401, the resource scheduling request is request information sent by the resource demand direction to the cloud collaboration network, where the resource scheduling request includes at least resource demand information of resources required by the resource demand party and service scenarios (e.g., big data service scenarios, artificial intelligence service scenarios, network application service scenarios, database service scenarios, etc.) of the required resources.
In addition, in step S401, one consensus node corresponds to one service cluster, where the consensus node is configured to execute a multi-cloud scheduling consensus algorithm to select an appropriate service cluster from a plurality of service clusters for resource scheduling.
In one example, after receiving a resource scheduling request sent by a resource demand party, the multi-cloud cooperative network analyzes the resource scheduling request to obtain information such as resource demand information of a resource required by the resource demand party and corresponding service scene, and then the multi-cloud cooperative network performs polling operation on a plurality of consensus nodes of the blockchain based on the resource demand information, so as to select a broadcast node corresponding to the resource demand information from the plurality of consensus nodes.
As an example, the multi-cloud collaboration network may perform a polling operation on the plurality of consensus nodes according to a certain rule, e.g., the multi-cloud collaboration network may determine a broadcast node from the plurality of consensus nodes according to a distance between a service cluster corresponding to the consensus node and a resource demander; for another example, the multi-cloud collaboration network may determine a broadcast node from among the plurality of consensus nodes according to resource remaining information of the service cluster to which the consensus node corresponds; for another example, the multi-cloud collaboration network may combine aspects of the distance between the service cluster and the resource demander, and the resource remaining information of the service cluster to determine the broadcast node from among the plurality of consensus nodes.
It should be noted that, through step S401, a broadcast node is selected from a plurality of consensus nodes, and the broadcast node may be used in selection of a subsequent consensus node and resource scheduling, thereby dispersing the resource scheduling pressure of the multi-cloud cooperative network.
Step S402, determining a plurality of target consensus nodes from a plurality of other consensus nodes based on the broadcast node.
In step S402, the plurality of other consensus nodes are consensus nodes other than the broadcast node among the plurality of consensus nodes.
In one example, after determining a broadcast node from a plurality of consensus nodes, the broadcast node may determine a plurality of target consensus nodes from the plurality of other consensus nodes according to the amount of tasks to be processed and a response time duration corresponding to each other consensus node, where the response time duration is a time duration for the corresponding other consensus node to respond to a broadcast message sent by the broadcast node.
Specifically, the broadcasting node broadcasts a broadcasting message of "recruiting" the target consensus node to other consensus nodes; and after receiving the broadcast message, the other consensus nodes report the current task amount to be processed to the broadcast node. And the broadcasting node records the response time of the waiting task quantity fed back by other consensus nodes and the response time of the other consensus nodes to the broadcasting message, and scores the other consensus nodes according to the waiting task quantity and the response time, so that the broadcasting node can select candidate consensus nodes from the other consensus nodes according to the scores. Further, after the candidate consensus nodes are determined, the broadcasting node sends confirmation information of joining the task to the candidate consensus nodes; if the candidate consensus node replies the confirmation information to the broadcast node, the broadcast node determines the candidate node as the target consensus node, otherwise, the broadcast node does not take the candidate node as the target consensus node.
Further, after the target consensus node is selected from the other consensus nodes, the broadcast node and the target consensus node together form a consensus processing cluster for the subsequent sorting and block out operation of the resource scheduling request.
In one example, in the process of scoring other consensus nodes according to the task amount to be processed and the response time length, the broadcasting node can set weights according to the task amount range in which the task amount to be processed is located, wherein different task amount ranges correspond to different weights, and the more the task amount to be processed is, the smaller the corresponding weight value is; correspondingly, the broadcast node can set weights according to the time length range of the response time length, wherein different time length ranges correspond to different weights, and the longer the response time length is, the smaller the corresponding weight value is. Based on the rules described above, the broadcast node may score other consensus nodes, where the greater the score, the greater the likelihood that the consensus node is used for resource scheduling. Further, the broadcast node can select a consensus node with small load pressure and high response speed as a target consensus node based on the scores.
In another example, the broadcast node may select the target consensus node not by scoring, but by other means. Specifically, the broadcast node first judges whether the response time length of other consensus nodes exceeds a time length threshold value, and selects one or more consensus nodes with the least amount of tasks to be processed from the other consensus nodes which never exceed the time length threshold value as target consensus nodes.
After the broadcast node is determined, the target consensus node is selected by the broadcast node to perform resource scheduling, and the selection of the consensus node is not needed by the multi-cloud cooperation network, so that the pressure of the multi-cloud cooperation network on the network layer is released, the multi-cloud cooperation network can have more service capacity to respond to the resource scheduling request of the user, the response speed of the resource scheduling request is further improved, and the resource scheduling efficiency is further improved.
Step S403, scheduling service resources in the plurality of service clusters based on the broadcast node and the plurality of target consensus nodes.
In step S403, after determining the broadcast node and the plurality of target consensus nodes, the broadcast node and the plurality of target consensus nodes may schedule resources for the plurality of service clusters. It is easy to note that in the application, not all the consensus nodes participate in the resource scheduling, but a small number of consensus nodes meeting the resource scheduling requirement participate in the resource scheduling, so that the problem of high resource scheduling management pressure caused by managing and scheduling all the consensus nodes through a cloud management platform in the related art is avoided, and the resource scheduling efficiency is improved.
Based on the scheme defined in the above steps S401 to S403, it can be known that, in the present application, a manner of determining other consensus nodes based on the selected consensus nodes to perform resource scheduling is adopted, after a resource scheduling request is responded, polling operation is performed on a plurality of consensus nodes of the blockchain, and a broadcast node is determined from the plurality of consensus nodes; then the broadcasting node determines a plurality of target consensus nodes from a plurality of other consensus nodes according to the task quantity to be processed and the response time length corresponding to each other consensus node; and finally, scheduling the service resources in the service clusters based on the broadcasting node and the target consensus nodes. The plurality of other consensus nodes are the consensus nodes except the broadcasting node in the plurality of consensus nodes, and the response time is the time of the corresponding other consensus nodes responding to the broadcasting message sent by the broadcasting node.
From the above, in the present application, the polling operation is performed on the plurality of consensus nodes to obtain the broadcast node, and then the target consensus node is selected based on the broadcast node to perform resource scheduling.
In addition, in the method, after the broadcast node is determined, the target consensus node is selected by the broadcast node to perform resource scheduling, so that the pressure of the multi-cloud cooperation network on the network level is released, the multi-cloud cooperation network can have more service capacity to respond to the resource scheduling request of the user, the response speed of the resource scheduling request is further improved, and the resource scheduling efficiency is further improved.
Therefore, the scheme provided by the application solves the problem of low resource scheduling efficiency in the related technology, reduces the management pressure of resource scheduling, and improves the efficiency of resource scheduling.
The blockchain-based resource scheduling method provided by the present application is explained below in conjunction with fig. 4.
As can be seen from fig. 4, after receiving the resource scheduling request, the multi-cloud cooperative network performs step S401, i.e., performs a polling operation on a plurality of common nodes of the blockchain, and determines a broadcast node from the plurality of common nodes.
Specifically, the multi-cloud cooperative network detects the distance between a request initiator initiating a resource scheduling request and a service cluster corresponding to each consensus node; sequencing a plurality of consensus nodes based on the distance to obtain a sequencing result; then, a polling operation is performed on the plurality of consensus nodes based on the ordering result, and a broadcast node is determined from the plurality of consensus nodes. The broadcast node is a consensus node corresponding to a target service cluster, and the target service cluster is a service cluster which is the first one of the service clusters and can meet the resource demand information corresponding to the resource scheduling request.
In one example, the multi-cloud collaboration network may first detect a distance between each service cluster and the resource demander, and rank consensus nodes corresponding to the service clusters in a manner from near to far; and then determining a consensus node corresponding to the first service cluster capable of carrying out resource scheduling from the sequenced consensus nodes, wherein the consensus node is the broadcasting node.
It should be noted that, the above manner of determining the broadcast node may enable the distributed consensus node to closely bear the responsibility of resource scheduling, and this manner may significantly improve the timeliness of resource scheduling and the upper limit of the bearable load of the scheduling system.
Further, as shown in fig. 4, after determining the broadcast node, the broadcast node determines the target consensus node according to the task amount to be processed and the response time length of the consensus node, that is, performs step S402. Then, the multi-cloud cooperative network performs step S403, that is, schedules service resources in the multiple service clusters based on the broadcast node and the multiple target consensus nodes.
Specifically, the multi-cloud cooperative network analyzes the resource scheduling request based on the broadcast node and the plurality of target consensus nodes to obtain resource demand information corresponding to the resource scheduling request and a service scene corresponding to the resource scheduling request; then, determining candidate clusters from a plurality of service clusters based on the resource demand information and the cloud image account book, and determining a target intelligent contract algorithm corresponding to the service scene; and finally, scheduling the service resources in the candidate clusters based on a target intelligent contract algorithm.
The cloud image account book includes resource information of service clusters corresponding to different types of cloud services, and the resource information at least includes resource configuration information and transaction information. The resource configuration information may include, but is not limited to, cloud service class, cluster name, cluster service address, area to which the resource belongs, resource type, total amount of resources of the resources such as CPU core number, memory, storage, etc., total amount of remaining resources of the resources such as CPU core number, memory, storage, etc., total details of resources (CPU core number, remaining resource details of the resources such as memory, storage, etc.).
The transaction information is used for recording transaction information generated on the multi-cloud collaboration chain during resource scheduling, and is a detailed record of resource use in the multi-cloud collaboration network and is also the basis of information change in the multi-cloud image account book. The transaction information may include, but is not limited to, information such as transaction identification, transaction time, transaction sponsor, and transaction details, which may include, but is not limited to, resource specifications (e.g., CPU core number, memory size, storage size) and number of resources, request resource type, deployment medium, deployment server, deployment policy, scheduling type, etc.
In one example, the multi-cloud collaboration network may collect resource configuration information and transaction information corresponding to the plurality of service clusters by executing a corresponding smart contract algorithm and generate a multi-cloud image ledger based on the resource configuration information and the transaction information for the plurality of service clusters.
It should be noted that, the types of cloud services corresponding to the plurality of service clusters are at least partially different, for example, the cloud service corresponding to the service cluster 1 is a private cloud, and the cloud service corresponding to the service cluster 2 is a public cloud.
In addition, in the related technology, an effective cooperation means is lacking among cloud services, the resource states of the cloud services cannot be synchronized in time, the resource scheduling of the cloud services is seriously dependent on a centralized cloud management platform, and the service requirements under a cross-cloud service scene cannot be met, namely in the related technology, when the resource scheduling is carried out, only resources in one type of cloud service can be scheduled.
It is easy to note that, in the present application, the types of cloud services corresponding to the plurality of service clusters are at least partially different, so that the resource information in the multi-cloud image ledger comes from different types of cloud services, and thus when the resource scheduling is performed based on the multi-cloud image ledger, the resource scheduling of the cross-cloud service can be realized, that is, when the resource scheduling is performed, the resource scheduling can be performed on the service clusters of the different types of cloud services. In addition, the resource scheduling of the cross-cloud service can be realized only through the multi-cloud image account book, the execution process is simple, and the efficiency of the resource scheduling under the situation of the cross-cloud service is effectively improved.
In one example, after determining the broadcast node and the plurality of target consensus nodes in step S401 and step S402, the multi-cloud cooperative network parses the resource scheduling request based on the broadcast node and the plurality of target consensus nodes to obtain resource requirement information corresponding to the resource scheduling request and a service scenario corresponding to the resource scheduling request.
Specifically, after receiving the resource scheduling request of the resource demand party, the broadcasting node and the target consensus nodes respectively execute a multi-cloud scheduling consensus algorithm to analyze the resource scheduling request and acquire the resource demand information of the resources required by the resource demand party, such as data in dimensions of specification, quantity, cloud service type, region requirement, service mutex requirement and the like. Meanwhile, a service scene corresponding to the resource scheduling request, for example, an artificial intelligence service scene, a big data service scene and the like, can also be obtained. That is, the resource demand party may specify an application scenario of the invoked resource from among a plurality of service scenarios before sending a resource scheduling request to the multi-cloud collaboration network.
Further, after the resource demand information of the resource demander is determined, a multi-cloud scheduling consensus algorithm is executed in the multi-cloud collaboration network to determine candidate clusters from the plurality of service clusters based on the resource demand information and the multi-cloud image ledgers.
Specifically, the multi-cloud collaboration network determines target resource information matched with the resource demand information from the resource information contained in the multi-cloud image account book, and determines a service cluster corresponding to the target resource information as a candidate cluster. That is, the multi-cloud collaboration network executes a multi-cloud scheduling consensus algorithm to select an appropriate service cluster from the resource information in the multi-cloud image ledger for use. The target resource information and the resource demand information are matched to represent that the target resource information can meet the resource scheduling demand corresponding to the resource demand information.
It should be noted that, the candidate clusters determined by the method may belong to the same type of cloud service as the service cluster where the resource demander is located, for example, all belong to private clouds; the service cluster where the resource demand party is located may also belong to different types of cloud services, for example, the candidate cluster belongs to a private cloud, and the service cluster where the resource demand party is located belongs to a public cloud.
Still further, after determining the candidate cluster from the plurality of service clusters, the multi-cloud collaboration network determines a target smart contract algorithm corresponding to the service scenario.
It should be noted that, as shown in fig. 3, different types of multi-cloud scheduling intelligent contracts are deployed in the multi-cloud collaboration network, and the multi-cloud scheduling intelligent contracts take responsibility of service deployment, cluster access, and image account book information acquisition and update in the multi-cloud collaboration network. In order to adapt to different deployment requirements of different kinds of services when deployed in a cloud environment, the multi-cloud scheduling intelligent contract distinguishes different kinds of intelligent contracts for different situations, for example, an intelligent contract algorithm suitable for an artificial intelligent service scene, an intelligent contract algorithm suitable for a big data service scene, an intelligent contract algorithm suitable for a network application service scene, an intelligent contract algorithm suitable for a database service scene and the like. Wherein, different kinds of multi-cloud scheduling intelligence are likely to be different about the amount of request resources, the type of request resources, the deployment medium, the deployment policy and the like required at deployment.
In addition, when the service scenario corresponding to the resource scheduling request is not an existing service scenario in the multi-cloud cooperation network, the multi-cloud cooperation network may also write a new intelligent contract according to the unified multi-cloud scheduling intelligent contract data structure to adapt to the new service deployment requirement (i.e. service scenario).
In one example, the multi-cloud collaboration network may send a scheduling request to the multi-cloud scheduling smart contract through a unified data structure that describes the process or steps of the multi-cloud scheduling smart contract to perform the scheduled deployment tasks of the service resources. The data structure may include, but is not limited to, the amount of requested resources, the type of requested resources, the deployment medium, the deployment server, the deployment policy, and the scheduling type. Wherein the requested resource amount is used to describe related information of service resources required at the time of service deployment, such as resource specification information (e.g., CPU core number, memory size, storage size) and resource amount; the request resource type is used to describe the manner in which the service resource is provided, for example, in the form of a virtual machine or in the form of a container; the deployment medium is used for describing an installation package and a mirror image used in service deployment; the deployment server is used for describing the service cluster used in service deployment and the servers in the service cluster; the deployment strategy is used for describing scripts, starting commands and the like used in service deployment; the scheduling type is used to describe the type of scheduling actions, including but not limited to cluster access actions, resource acquisition actions, service deployment actions, resource scaling actions, abnormal scheduling actions, etc.
In addition, the multi-cloud scheduling intelligent contract comprises contract methods including, but not limited to, a cluster access method, a resource acquisition method, a deployment transaction method, a resource expansion and contraction method and an abnormal scheduling method.
For the cluster access method, when a new service cluster is added into the cloud environment, the method is executed to register and authorize the newly added service cluster, and then an accounting node is deployed in the service cluster, and the accounting node is added into a multi-cloud collaboration chain.
For the resource collection method, the method is used for regularly collecting resource configuration information and service deployment information of the service cluster, and timely updating the collected information into the cloud image account book; the accounting nodes in different service clusters can collect relevant information of the service clusters through the intelligent contract method and collect the collected information into a multi-cloud collaboration chain.
For the deployment transaction method, the method is used for carrying out service deployment according to a scheduling transaction request in the multi-cloud cooperation network, and updating the related information about the service cluster after deployment into a multi-cloud image account book.
For the resource expanding and shrinking method, the method is used for expanding and shrinking the resources used by the service clusters, the method can execute corresponding resource expanding or shrinking actions according to the transaction parameters, and relevant information on the cloud image account book is synchronously updated after the expanding and shrinking operation is completed.
For the abnormal scheduling method, the method is used for rescheduling and deploying the service resources which are abnormal and can not normally operate, the accounting node submits the portrait account book updating transaction request, and rescheduling the service resources to other normal service clusters for deployment according to the original deployment information such as the request resource quantity, the request resource type, the deployment medium, the deployment strategy and the like on the portrait account book, and updating the portrait account book after successful deployment.
In one example, after determining the target smart contract algorithm, the multi-cloud collaboration network may schedule service resources in the candidate cluster based on the target smart contract algorithm. To ensure that service resources in the candidate clusters can be scheduled, the multi-cloud collaboration network also validates the candidate clusters before scheduling the service resources in the candidate clusters based on the target intelligent contract algorithm.
Specifically, the multi-cloud cooperative network verifies the cluster state of the candidate cluster and the resource information of the candidate cluster based on the accounting node of the candidate cluster to obtain a verification result; and generating endorsement information corresponding to the verification result under the condition that the verification result characterizes the cluster state of the candidate cluster and the resource information of the candidate cluster meets the transaction requirement information corresponding to the resource scheduling request.
It should be noted that, the cluster states include, but are not limited to, available states (including available states and unavailable states) of the service clusters, remaining memory, and the like. The endorsement information characterizes successful verification and legal transaction.
As one example, the accounting node in the candidate cluster may run a multi-cloud scheduling intelligence contract, check cluster status and resource information of the candidate cluster to confirm whether the candidate cluster can meet the demand for resource scheduling, e.g., check whether the candidate cluster is available, check whether the remaining memory of the candidate cluster can meet the scheduling demand, etc. And under the condition that the candidate clusters are available and/or the residual memory of the candidate clusters can meet scheduling requirements and the like, determining that the candidate clusters are successfully checked, generating endorsement information at the moment, and returning the endorsement information to the broadcasting node and the target consensus nodes.
After the endorsement information corresponding to the verification result is generated, the cloud cooperation network generates a transaction block based on the endorsement information, and sends block data of the transaction block to accounting nodes of a plurality of service clusters, so that the accounting nodes of the plurality of service clusters update the cloud image account book.
As one example, a broadcast node and a plurality of target consensus nodes in a multi-cloud collaboration network generate a transaction block according to received endorsement information, wherein the transaction block comprises current resource scheduling transaction and endorsement information. The block data of the transaction block (e.g., information of the deployment location of the transaction block, etc.) is then sent to all accounting nodes of the multi-cloud collaboration network, such that each accounting node records the block data and updates the multi-cloud image ledger.
After the block data is recorded, the multi-cloud scheduling intelligent contract executes service deployment according to the deployment strategy, invokes corresponding resource interfaces in the cloud service to perform operations such as resource allocation and initialization, and comprehensively determines service resources to be scheduled according to the requirements such as regions, service mutex and the like contained in the resource scheduling request.
Thus, the explanation of the blockchain-based resource scheduling method provided by the application is completed. As an example, fig. 5 shows an overall flowchart of a blockchain-based resource scheduling method, which, as can be seen from fig. 5, includes the following steps:
and step S50, the multi-cloud cooperative network receives a resource scheduling request initiated by a resource demand party.
And step S51, the multi-cloud cooperative network polls the plurality of consensus nodes to determine a broadcasting node, and the broadcasting node determines a target consensus node according to the task quantity to be processed and the response time length of other consensus nodes.
And step S52, the broadcasting node and the target consensus node analyze the resource scheduling requirement and determine the resource scheduling requirement of the resource requiring party.
And step S53, the broadcasting node and the target consensus node in the multi-cloud cooperative network determine candidate clusters from the plurality of service clusters according to the resource scheduling requirement and the multi-cloud image account book.
And S54, checking the candidate clusters by the accounting nodes of the candidate clusters, generating endorsement information under the condition that the checking is successful, and returning the endorsement information to the broadcasting node and the target consensus node.
In step S55, the broadcasting node and the target consensus node generate a transaction block based on the endorsement information, and send the block data of the transaction block to all accounting nodes.
In step S56, all accounting nodes record the block data and update the cloud image ledger.
Step S57, service deployment is executed according to the deployment strategy.
As can be seen from the foregoing, in the present application, the multi-cloud collaboration network is formed by a plurality of block link points distributed in each cloud service cluster, accounting nodes in the block chain are deployed in front of each service cluster of the cloud service, and the multi-cloud scheduling intelligent contracts in the accounting nodes can monitor and collect resource configuration information and service operation information of the service cluster where the accounting nodes are located and record the resource configuration information and service operation information on the block chain. Because the block chain nodes share account book data through the multi-cloud image account book, the information collected by all the account book nodes jointly form the multi-cloud image account book of each cloud service. When the newly added service cluster is detected, the multi-cloud cooperative chain deploys the blockchain nodes in the newly added service cluster and brings the blockchain nodes into the management scheduling range of the multi-cloud cooperative network, so that the problem of management scheduling pressure caused by the expansion of the service cluster scale in the related technology is effectively solved, and the resource scheduling efficiency is improved. In addition, the multi-cloud cooperation link points are distributed in different cloud service environments, so that the service requirements of cross-cloud computing can be effectively met. The distributed consensus nodes bear the responsibility of resource scheduling nearby, so that the timeliness of resource scheduling and the upper limit of the bearable load of a scheduling system can be obviously improved.
Therefore, the scheme provided by the application creatively realizes the multi-cloud cooperation network based on the blockchain from the practical production demand, adopts the decentralization design, utilizes the blockchain nodes to collect configuration and operation information of different cloud service clusters, only uses a small number of consensus nodes to participate in the selection of the service clusters each time for scheduling tasks, can improve the information collection and sharing efficiency under the cross-cloud service condition, effectively relieves the resource management pressure of the centralized cloud management platform scheme in the related technology, remarkably improves the service cluster scale and scheduling response speed under the cross-cloud service condition, meets the service demand of the cross-cloud computing, and has strong practicability.
The embodiment of the application also provides a resource scheduling device based on the blockchain, as shown in fig. 6, the device includes: a polling module 601, a node selection module 602, and a resource scheduling module 603.
A polling module 601, configured to perform a polling operation on a plurality of consensus nodes of the blockchain in response to a resource scheduling request, and determine a broadcast node from the plurality of consensus nodes, where one consensus node corresponds to one service cluster;
the node selection module 602 is configured to determine a plurality of target consensus nodes from a plurality of other consensus nodes based on the broadcast node, where the plurality of other consensus nodes are consensus nodes except the broadcast node in the plurality of consensus nodes, and the plurality of target consensus nodes are the consensus nodes determined from the plurality of other consensus nodes according to the task amount to be processed and the response duration corresponding to each other consensus node, and the response duration is a duration of the corresponding other consensus nodes responding to the broadcast message sent by the broadcast node;
The resource scheduling module 603 is configured to schedule service resources in a plurality of service clusters based on the broadcast node and a plurality of target consensus nodes.
From the above, in the present application, the polling operation is performed on the plurality of consensus nodes to obtain the broadcast node, and then the target consensus node is selected based on the broadcast node to perform resource scheduling.
In addition, in the method, after the broadcast node is determined, the target consensus node is selected by the broadcast node to perform resource scheduling, so that the pressure of the multi-cloud cooperation network on the network level is released, the multi-cloud cooperation network can have more service capacity to respond to the resource scheduling request of the user, the response speed of the resource scheduling request is further improved, and the resource scheduling efficiency is further improved.
Therefore, the scheme provided by the application solves the problem of low resource scheduling efficiency in the related technology, reduces the management pressure of resource scheduling, and improves the efficiency of resource scheduling.
In one example, the polling module includes: the device comprises a distance detection module, a sorting module and a node determination module. The distance detection module is used for detecting the distance between a request initiator initiating a resource scheduling request and a service cluster corresponding to each consensus node; the sequencing module is used for sequencing the plurality of consensus nodes based on the distance to obtain a sequencing result; the node determining module is used for carrying out polling operation on the plurality of consensus nodes based on the sequencing result, and determining a broadcast node from the plurality of consensus nodes, wherein the broadcast node is the consensus node corresponding to a target service cluster, and the target service cluster is a service cluster which is the first one of the plurality of service clusters and can meet the resource demand information corresponding to the resource scheduling request.
In one example, the resource scheduling module includes: the system comprises a request analysis module, a first cluster determination module, a contract determination module and a resource scheduling sub-module. The request analysis module is used for analyzing the resource scheduling request based on the broadcasting node and the target consensus nodes to obtain resource demand information corresponding to the resource scheduling request and a service scene corresponding to the resource scheduling request; the first cluster determining module is used for determining candidate clusters from the service clusters based on the resource demand information and the multi-cloud image account book, wherein the multi-cloud image account book contains resource information of the service clusters corresponding to different types of cloud services, and the resource information at least comprises resource configuration information and transaction information; the contract determining module is used for determining a target intelligent contract algorithm corresponding to the service scene; and the resource scheduling sub-module is used for scheduling the service resources in the candidate clusters based on the target intelligent contract algorithm.
In one example, the first cluster determination module includes: the resource determining module and the second cluster determining module. The resource determining module is used for determining target resource information matched with the resource demand information from the resource information contained in the cloud image account book; and the second cluster determining module is used for determining the service cluster corresponding to the target resource information as a candidate cluster.
In one example, the blockchain-based resource scheduling apparatus further includes: the system comprises a cluster verification module and an endorsement generation module. The cluster verification module is used for verifying the cluster state of the candidate cluster and the resource information of the candidate cluster based on the accounting node of the candidate cluster before scheduling the service resources in the candidate cluster based on the target intelligent contract algorithm to obtain a verification result; the endorsement generation module is used for generating endorsement information corresponding to the verification result under the condition that the verification result represents the cluster state of the candidate cluster and the resource information of the candidate cluster meets the transaction requirement information corresponding to the resource scheduling request.
In one example, the blockchain-based resource scheduling apparatus further includes: the system comprises a block generation module and an account book updating module. The block generation module is used for generating a transaction block based on the endorsement information after generating the endorsement information corresponding to the verification result; and the account book updating module is used for sending the block data of the transaction block to the accounting nodes of the plurality of service clusters so as to update the cloud image account book by the accounting nodes of the plurality of service clusters.
In one example, the blockchain-based resource scheduling apparatus further includes: and the information acquisition module and the account book generation module. The information acquisition module is used for acquiring resource configuration information and transaction information corresponding to the plurality of service clusters, wherein the types of cloud services corresponding to the plurality of service clusters are at least partially different; and the account book generation module is used for generating a cloud image account book based on the resource configuration information and the transaction information of the plurality of service clusters.
The resource scheduling device based on the blockchain provided by the embodiment of the application can realize each process realized by the foregoing method embodiment, and in order to avoid repetition, a detailed description is omitted here.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Fig. 7 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
The electronic device may include a processor 701 and a memory 702 storing computer program instructions.
In particular, the processor 701 described above may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 702 may include mass storage for data or instructions. By way of example, and not limitation, memory 702 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. The memory 702 may include removable or non-removable (or fixed) media, where appropriate. Memory 702 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 702 is a non-volatile solid state memory.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to a method according to an aspect of the present application.
The processor 701 implements any of the blockchain-based resource scheduling methods of the above embodiments by reading and executing computer program instructions stored in the memory 702.
In one example, the electronic device may also include a communication interface 703 and a bus 710. As shown in fig. 7, the processor 701, the memory 702, and the communication interface 703 are connected by a bus 710 and perform communication with each other.
The communication interface 703 is mainly used for implementing communication between each module, device, unit and/or apparatus in the embodiments of the present application.
Bus 710 includes hardware, software, or both that couple components of the electronic device to one another. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 710 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
In addition, in combination with the blockchain-based resource scheduling method in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the blockchain-based resource scheduling methods of the above embodiments.
In addition, in conjunction with the blockchain-based resource scheduling method in the above embodiments, embodiments of the present application may provide a computer program product for implementation. The instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform implementing a blockchain-based resource scheduling method as in any of the above embodiments.
It should be clear that the present application is not limited to the particular arrangements and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be different from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (10)

1. A blockchain-based resource scheduling method, comprising:
responding to a resource scheduling request, carrying out polling operation on a plurality of consensus nodes of a block chain, and determining a broadcast node from the plurality of consensus nodes, wherein one consensus node corresponds to one service cluster;
determining a plurality of target consensus nodes from a plurality of other consensus nodes based on the broadcast node, wherein the plurality of other consensus nodes are the consensus nodes except the broadcast node in the plurality of consensus nodes, the plurality of target consensus nodes are the consensus nodes determined from the plurality of other consensus nodes according to the task quantity to be processed and the response time length corresponding to each other consensus node, and the response time length is the time length of the corresponding other consensus nodes responding to the broadcast message sent by the broadcast node;
and scheduling service resources in a plurality of service clusters based on the broadcast node and the plurality of target consensus nodes.
2. The resource scheduling method of claim 1, wherein polling a plurality of consensus nodes of a blockchain, determining a broadcast node from the plurality of consensus nodes, comprises:
Detecting the distance between a request initiator which initiates the resource scheduling request and a service cluster corresponding to each consensus node;
sequencing the plurality of consensus nodes based on the distance to obtain a sequencing result;
and carrying out polling operation on the plurality of consensus nodes based on the sequencing result, and determining the broadcast node from the plurality of consensus nodes, wherein the broadcast node is the consensus node corresponding to a target service cluster, and the target service cluster is a service cluster which is the first one of the plurality of service clusters and can meet the resource demand information corresponding to the resource scheduling request.
3. The resource scheduling method of claim 1, wherein scheduling service resources in a plurality of service clusters based on the broadcast node and the plurality of target consensus nodes comprises:
analyzing the resource scheduling request based on the broadcasting node and the target consensus nodes to obtain resource demand information corresponding to the resource scheduling request and a service scene corresponding to the resource scheduling request;
determining candidate clusters from the service clusters based on the resource demand information and a cloud image account book, wherein the cloud image account book contains resource information of the service clusters corresponding to different types of cloud services, and the resource information at least comprises resource configuration information and transaction information;
Determining a target intelligent contract algorithm corresponding to the service scene;
and scheduling service resources in the candidate clusters based on the target intelligent contract algorithm.
4. The resource scheduling method of claim 3, wherein determining a candidate cluster from the plurality of service clusters based on the resource demand information and a cloud image ledger comprises:
determining target resource information matched with the resource demand information from the resource information contained in the cloud image account book;
and determining the service cluster corresponding to the target resource information as the candidate cluster.
5. A method of resource scheduling according to claim 3, wherein prior to scheduling service resources in the candidate cluster based on the target smart contract algorithm, the method further comprises:
verifying the cluster state of the candidate cluster and the resource information of the candidate cluster based on the accounting node of the candidate cluster to obtain a verification result;
and generating endorsement information corresponding to the verification result under the condition that the verification result characterizes the cluster state of the candidate cluster and the resource information of the candidate cluster meets the transaction requirement information corresponding to the resource scheduling request.
6. The resource scheduling method according to claim 5, wherein after generating endorsement information corresponding to the verification result, the method further comprises:
generating a transaction block based on the endorsement information;
and sending the block data of the transaction block to the accounting nodes of the service clusters so that the accounting nodes of the service clusters update the cloud image account book.
7. The resource scheduling method according to any one of claims 3 to 6, characterized in that the method further comprises:
collecting resource allocation information and transaction information corresponding to the plurality of service clusters, wherein the types of cloud services corresponding to the plurality of service clusters are at least partially different;
and generating the cloud image account book based on the resource configuration information and transaction information of the plurality of service clusters.
8. A blockchain-based resource scheduling apparatus, comprising:
the polling module is used for responding to the resource scheduling request, carrying out polling operation on a plurality of consensus nodes of the blockchain, and determining broadcast nodes from the plurality of consensus nodes, wherein one consensus node corresponds to one service cluster;
The node selection module is used for determining a plurality of target consensus nodes from a plurality of other consensus nodes based on the broadcast node, wherein the plurality of other consensus nodes are the consensus nodes except the broadcast node in the plurality of consensus nodes, the plurality of target consensus nodes are the consensus nodes determined from the plurality of other consensus nodes according to the task quantity to be processed and the response time length corresponding to each other consensus node, and the response time length is the time length of the corresponding other consensus nodes responding to the broadcast message sent by the broadcast node;
and the resource scheduling module is used for scheduling service resources in a plurality of service clusters based on the broadcasting node and the plurality of target consensus nodes.
9. An electronic device, characterized in that the electronic device comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a blockchain-based resource scheduling method as defined in any of claims 1-7.
10. A computer readable storage medium, having stored thereon computer program instructions which, when executed by a processor, implement the blockchain-based resource scheduling method of any of claims 1-7.
CN202311501450.4A 2023-11-13 2023-11-13 Resource scheduling method and device based on block chain, electronic equipment and storage medium Pending CN117573340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311501450.4A CN117573340A (en) 2023-11-13 2023-11-13 Resource scheduling method and device based on block chain, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311501450.4A CN117573340A (en) 2023-11-13 2023-11-13 Resource scheduling method and device based on block chain, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117573340A true CN117573340A (en) 2024-02-20

Family

ID=89885398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311501450.4A Pending CN117573340A (en) 2023-11-13 2023-11-13 Resource scheduling method and device based on block chain, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117573340A (en)

Similar Documents

Publication Publication Date Title
CN111984408B (en) Data cooperative processing method based on big data and edge computing and edge cloud platform
CN112905333B (en) Computing power load scheduling method and device for distributed video intelligent analysis platform
CN113282462B (en) Information processing method applied to block chain and big data platform
CN108600399A (en) Information-pushing method and Related product
CN108683557B (en) Micro-service health degree evaluation method, elastic expansion method and framework
CN105357069A (en) Distributed node service state monitoring method, device and system
CN112596985B (en) IT asset detection method, device, equipment and medium
CN109639755A (en) Interconnected system server decoupling method, device, medium and electronic equipment
CN117573340A (en) Resource scheduling method and device based on block chain, electronic equipment and storage medium
CN115794423B (en) Intelligent machine room management method and device, electronic equipment and storage medium
CN102546652B (en) System and method for server load balancing
CN115378841B (en) Method and device for detecting state of equipment accessing cloud platform, storage medium and terminal
CN111757371A (en) Statistical method of transmission delay, server and storage medium
CN112258184B (en) Method, apparatus, electronic device and readable storage medium for freezing blockchain network
CN115988462A (en) Debugging method of edge computing module based on vehicle-road cooperation
CN112286622A (en) Virtual machine migration processing and strategy generating method, device, equipment and storage medium
CN112054926B (en) Cluster management method and device, electronic equipment and storage medium
CN115396411A (en) Method, device, system and medium for acquiring target server
CN112134734B (en) Configuration method and device of network equipment
CN114237981A (en) Data recovery method, device, equipment and storage medium
CN111625334A (en) Service migration method and system
CN112988405A (en) Micro-service automatic degradation method and device and computing equipment
CN111198765A (en) Operation resource allocation and management method and proxy server
CN112422598A (en) Resource scheduling method, intelligent front-end equipment, intelligent gateway and distributed system
CN114339856B (en) Test method and device for power inspection service, terminal equipment and network equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination