Decentralization task scheduling method, device and equipment based on computing power network
By adopting a decentralized computing power network method in a distributed computing system, multiple network nodes jointly select computing nodes and dynamically adjust the evaluation scores, the task scheduling failure caused by control node failure is solved, and resource utilization is improved System stability.
Patent Information
- Application Number
- CN202411161338.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-17
AI Technical Summary
In existing distributed computing systems, the failure of the control node may lead to failure of task scheduling, and there are problems such as single point failure risk and unbalanced resource utilization.
Using a decentralized task scheduling method based on computing power network, multiple network nodes jointly select computing nodes, determine computing nodes based on the node's statistical information and preset conditions, ensure that the node has the ability to process tasks, and dynamically adjust the evaluation score to Optimize resource utilization.
It avoids task scheduling failure caused by single point of failure, improves the global utilization rate of computing resources, ensures the stability and security of computing power network, and dynamically adapts to the computing network environment.
Smart Images

Figure CN119149192A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a decentralized task scheduling method, device and equipment based on a computing power network. Background Art
[0002] With the development of cloud computing, big data and artificial intelligence technologies, distributed computing systems are increasingly used in scientific computing, data analysis and image processing. Distributed computing systems usually include multiple computing nodes, through which complex tasks are completed.
[0003] In the related art, a control node in a distributed computing system selects an available computing node from a plurality of computing nodes, and assigns a task to the selected computing node so that the computing node selected by the control node executes the task.
[0004] However, according to the method of the related art, if the control node fails, it may be impossible to determine the available computing nodes, which may lead to the problem of task allocation and scheduling failure. That is, the task scheduling method of the related art has the problem that when a single point of failure occurs, it will cause the task scheduling failure. Summary of the invention
[0005] In view of the above problems, embodiments of the present application are proposed to provide a decentralized task scheduling method, apparatus and device based on a computing power network that overcomes the above problems or at least partially solves the above problems.
[0006] In a first aspect, an embodiment of the present application discloses a decentralized task scheduling method based on a computing power network, wherein the computing power network includes multiple network nodes, and the method is applied to a first network node among the multiple network nodes, and the method includes:
[0007] Acquire the task to be processed, and determine the network node capable of undertaking the task to be processed as the candidate network node;
[0008] Filtering a first candidate node from the candidate network nodes according to a first preset condition;
[0009] Acquire node information of a second candidate node; the second candidate node is a second network node selected according to the first preset condition, and the second network node is a network node other than the first network node among the plurality of network nodes;
[0010] When it is determined, based on the node information of the first candidate node and the node information of the second candidate node, that the statistical information of the computing node undertaken by the first network node meets the second preset condition, the first network node is determined to be a computing node, and the task to be processed is executed.
[0011] In a second aspect, an embodiment of the present application discloses a decentralized task scheduling device based on a computing power network, wherein the computing power network includes a plurality of network nodes, and the method is applied to a first network node among the plurality of network nodes, and the method includes:
[0012] A first acquisition module is used to acquire a task to be processed and determine a network node capable of undertaking the task to be processed as a candidate network node;
[0013] A second acquisition module, configured to select a first candidate node from the candidate network nodes according to a first preset condition;
[0014] A third acquisition module is used to acquire node information of a second candidate node; the second candidate node is a second network node selected according to the first preset condition, and the second network node is a network node other than the first network node among the plurality of network nodes;
[0015] A determination module is used to determine that the first network node is a computing node and execute the task to be processed when it is determined that the statistical information of the computing node undertaken by the first network node meets the second preset condition based on the node information of the first candidate node and the node information of the second candidate node.
[0016] In a third aspect, the application embodiment discloses an electronic device, including:
[0017] one or more processors; and
[0018] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the processors to perform the method as described in the first aspect.
[0019] In summary, in this embodiment, a network node that has the ability to undertake the task to be processed is determined as a candidate network node, and the statistical information of the first network node undertaking the settlement node is obtained according to the node information of the first candidate node selected from the candidate network nodes and the node information of the second candidate node selected by the second network node. When the statistical information meets the second preset condition, the first network node is determined to be a computing node, and the task to be processed is executed, thereby ensuring that the computing node is a network node that has the ability to process the task to be processed and the statistical information of the computing node meets the condition. The statistical information is determined according to the node information of the first candidate node selected by the first network node and the node information of the second candidate node selected by the second network node, and the computing node is determined according to the statistical information. The computing node is selected by multiple network nodes together, thereby avoiding the problem that the computing node selection fails when the control node fails and the task scheduling fails when the computing node is selected through fixed control, and the problem that the task scheduling method of the related technology fails when a single point failure occurs is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flowchart of the steps of a decentralized task scheduling method based on a computing power network provided in an embodiment of the present application;
[0021] Figure 2 It is a schematic diagram of the distribution of multiple network nodes in a computing power network provided in an embodiment of the present application;
[0022] Figure 3 It is a flowchart of another decentralized task scheduling method based on a computing power network provided in an embodiment of the present application;
[0023] Figure 4 This is another decentralized task scheduling method based on a computing power network provided in an embodiment of the present application;
[0024] Figure 5 It is a flowchart of the steps of a decentralized task scheduling method based on a computing power network provided in an embodiment of the present application;
[0025] Figure 6 It is a structural diagram of a decentralized task scheduling system based on a computing power network provided in an embodiment of the present application;
[0026] Figure 7 It is a block diagram of a decentralized task scheduling device based on a computing power network provided in an embodiment of the present application;
[0027] Figure 8 It is a structural block diagram of an electronic device provided in an application embodiment. DETAILED DESCRIPTION
[0028] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0029] Figure 1 A decentralized task scheduling method based on computing power network is shown. Figure 1 , the method may include the following steps:
[0030] Step 101: Obtain tasks to be processed, and determine network nodes capable of undertaking the tasks to be processed as candidate network nodes.
[0031] Specifically, the computing power network includes multiple network nodes, and the method of this embodiment is applied to the first network node among the multiple network nodes.
[0032] The first network node is not a fixed network node among the multiple network nodes, but any network node among the multiple network nodes. Among the multiple network nodes, all network nodes except the first network node are second network nodes.
[0033] Furthermore, the computing network includes multiple network nodes, and data can be exchanged between each network node. For each network node in the multiple networks, according to the method of this embodiment, it is determined whether the network node itself is a computing node; if it is determined that it is a computing node, it executes the task to be processed by itself; if it is determined that it is not a computing node, it abandons the execution of the task to be processed.
[0034] Furthermore, when a network node determines whether it is a computing node, it regards itself as the first network node in this embodiment, and regards other network nodes except itself as the second network node. When it is determined that it is a computing node according to the method of this embodiment, it executes the pending task by itself. When it is determined that it is not a computing node according to the method of this embodiment, it gives up executing the pending task.
[0035] For example, refer to Figure 2 The computing network includes network node 1, network node 2, network node 3, network node 4, network node 5 and network node 6. Data is directly or indirectly exchanged between the network nodes. For each of the six network nodes, it is determined whether the network node itself is a computing node according to the method of this embodiment.
[0036] When network node 1 determines whether it is a computing node, network node 1 takes itself as the first network node, and takes network nodes 2, 3, 4, 5, and 6 other than itself as second network nodes. If network node 1 determines that it is a computing node according to the method of this embodiment, network node 1 processes the task to be processed; if network node 1 determines that it is not a computing node, it abandons the task to be processed.
[0037] When network node 2 determines whether it is a computing node, network node 2 takes itself as the first network node, and takes network node 1, network node 3, network node 4, network node 5, and network node 6 other than itself as second network nodes. If network node 2 determines that it is a computing node according to the method of this embodiment, network node 2 processes the pending task; if network node 2 determines that it is not a computing node, it abandons the pending task.
[0038] By analogy, each network node among the multiple network nodes takes itself as the first network node and other network nodes except itself as the second network node, and determines whether it is a computing node according to the method of this embodiment, and executes the pending task by itself when it is determined that it is a computing node, and gives up executing the pending task when it is determined that it is not a computing node.
[0039] In a distributed computing system, a computing network usually includes multiple network nodes, which are used to collaboratively complete various complex tasks to be processed. The computing network can be a network composed of multiple computing devices, which can be personal computers (PCs), servers, mobile devices, or other computing devices. The computing network is used to share computing resources to perform complex tasks to be processed.
[0040] Furthermore, multiple network nodes schedule pending tasks through a distributed scheduling method. The distributed scheduling method specifically refers to the process of reasonably allocating pending tasks to corresponding network nodes in an environment with multiple network nodes according to the resource availability of the network nodes and the task requirements of the pending tasks. It should be noted that in the distributed scheduling method, it is necessary to consider information such as the communication delay between each network node, the computing power and the storage resources of the network node, and determine the network node for scheduling the pending tasks based on the information.
[0041] For example, in response to the user's task submission operation for the computing network, the pending tasks submitted by the user can be obtained. When the pending tasks submitted by the user are small computing tasks, the tasks submitted by the user can be directly determined as pending tasks. When the tasks submitted by the user are large computing tasks, the tasks can be sliced to obtain multiple small tasks after slicing, and then the multiple small tasks after slicing are determined as pending tasks. Then, through the method of this embodiment, the computing nodes corresponding to each pending task are determined respectively, and each pending task is scheduled to the computing node corresponding to each pending task. Finally, through the parallel processing method, multiple pending tasks are processed in parallel by multiple computing nodes. Through this method, the processing efficiency of pending tasks can be improved and the execution time of tasks can be shortened.
[0042] For example, a network node in an idle state is determined as a network node capable of taking on a task to be processed.
[0043] Step 102: select a first candidate node from the candidate network nodes according to a first preset condition.
[0044] For example, the first preset condition includes: the evaluation information of the first candidate node is the best. The evaluation information is used to reflect the ability of the candidate node to process tasks. Further, the candidate network node with the best evaluation information is selected from the candidate network nodes and determined as the first candidate node.
[0045] Step 103: Obtain node information of the second candidate node.
[0046] Specifically, the second candidate node is selected by the second network node according to the first preset condition. The second network node is other network nodes among the multiple network nodes except the first network node.
[0047] There may be one or more second network nodes, and for each second network node, the following operations are performed respectively: determine a network node capable of undertaking the task to be processed and use it as a candidate network node, and determine a second candidate node from the candidate network nodes determined by the second network node according to the first preset condition.
[0048] The method for the second network node to determine the second candidate node is the same as the method for the first network node to determine the first candidate node in steps 101 to 102, and will not be described in detail here.
[0049] Specifically, when there are multiple second network nodes, each network node selects a second candidate node from the multiple network nodes. Then, there are multiple second candidate nodes selected by the multiple second network nodes, and the second candidate nodes correspond to the second network nodes one by one, and each candidate node has corresponding node information.
[0050] For example, the node information of the second candidate node is the node identifier of the second candidate node. In addition, the first candidate node selected by the first network node also has corresponding node information, and the node information of the first candidate node is the node identifier of the first candidate node.
[0051] It should be noted that the second candidate nodes selected by different second network nodes may be the same or different. Figure 2 , the first network node is network node 1, the second candidate nodes selected by network node 2, network node 3, network node 4 and network node 5 in the second network nodes are all network node 1, and the second candidate nodes selected by network node 6 are other network nodes.
[0052] Step 104: when it is determined based on the node information of the first candidate node and the node information of the second candidate node that the statistical information of the computing node undertaken by the first network node meets the second preset condition, the first network node is determined to be a computing node, and the task to be processed is executed.
[0053] The statistical information of the first network node serving as a computing node includes: the number of times the first network node is selected as a candidate node. Further, if it is determined that the first network node is selected as a candidate node the most times, the first network node is determined to be a computing node.
[0054] Furthermore, based on the node information of the first candidate node and the node information of the second candidate node, the number of times the first network node is selected as a candidate node can be counted. If it is determined that among multiple network nodes, the first network node is selected as a candidate node the most times, the first network node is determined to be a computing node, and the task to be processed is executed through the first network node; if it is determined that among multiple network nodes, the first network node is not selected as a candidate node the most times, it is determined that the first network node is not a computing node, and the first network node gives up processing the task to be processed.
[0055] For example, the node information of the first candidate node and the node information of the second candidate node are both node identifiers, the node identifiers correspond to the network nodes one by one, and the node identifiers can be the names, numbers, or other unique identifiers of the network nodes. According to the node information, the number of times each candidate network node is selected as a network node can be counted, and the counted number of times is used as statistical information. When the statistical information of the first network node meets the second preset condition, the first network node is determined to be a computing node.
[0056] In a distributed computing system, it is necessary to use a task scheduling method to assign pending tasks in the computing network to available computing nodes, and to detect the execution progress of pending tasks in real time to ensure that pending tasks can be completed on time. The related technology adopts a centralized task scheduling method. Specifically, a fixed control node is used to determine the node for processing tasks from multiple nodes, and the task is distributed to the node for processing. This method has the risk of single point failure. For example, if the control node fails or the control node is a malicious node, it will not be possible to determine the node for processing the task and the task scheduling cannot be realized. This method also has performance bottlenecks, uneven resource utilization, and cannot adapt to the dynamic computing network environment.
[0057] In this embodiment, a network node that has the ability to undertake the task to be processed is determined as a candidate network node, and a computing node that processes the task to be processed is selected from the candidate nodes, so that the task to be processed can be successfully processed. According to the first preset condition, a first candidate node is screened out from the candidate network nodes, and the node information of the second candidate node screened out by the second network node is obtained. According to the node information of the first candidate node and the node information of the second candidate node, the node information of the candidate nodes screened out by all network nodes can be obtained, and then the statistical information of the first network node as the settlement node is obtained. When the statistical information meets the second preset condition, the first network node is determined to be a computing node, and the task to be processed is executed. Thus, it can be ensured that the computing node is a network node that has the ability to process the task to be processed, and the statistical information of the computing node that bears the computing node meets the conditions. Based on the computing node, the task to be processed can be successfully processed.
[0058] In addition, statistical information is determined based on the node information of the first candidate node selected by the first network node and the node information of the second candidate node selected by the second network node. The computing node is determined based on the statistical information, which is equivalent to the computing node being selected by multiple network nodes. This can avoid the problem of determining the computing node by one network node, and when the network node is a malicious node, the malicious node determines an inappropriate computing node. It can also avoid determining the malicious node as the computing node for processing the task to be processed, which can ensure the stability and security of the computing power network. Determining the first network node as the computing node for executing the task to be processed increases the possibility of successfully processing the task to be processed, avoids the selected computing node being a network node that cannot meet the execution requirements of the task to be processed, and avoids the problem of computing node performance bottleneck.
[0059] In one embodiment, referring to Figure 3 , the decentralized task scheduling method based on computing power network can include the following steps:
[0060] Step 201, receiving a task to be processed sent by broadcasting;
[0061] The computing power network also includes a decentralized task queue, wherein pending tasks are tasks stored in the decentralized task queue; the decentralized task queue is used to respond to user submission operations for pending tasks of the computing power network, and to receive and store pending tasks.
[0062] For example, each network node in the computing network can access the decentralized task queue. After receiving the pending tasks submitted by the user, the computing network stores the pending tasks in the decentralized task queue, and then distributes the pending tasks to each network node through broadcasting.
[0063] For example, the pending tasks can be encrypted through the zero-knowledge proof method, and the encrypted pending tasks can be broadcast to each network node to ensure the secure transmission of the pending tasks. Among them, zero-knowledge proof is an encryption technology that allows the prover to prove to the verifier that it has certain information without providing any specific information. In the computing power network, zero-knowledge proof can be used to protect data privacy and verify the correctness of calculation results.
[0064] Step 202: Acquire status information of each network node.
[0065] Wherein, the state information includes an idle state or a non-idle state;
[0066] Specifically, a network node in an idle state is a network node that is not executing a task when sending status information; a network node in a non-idle state is a network node that is sending status information and processing a task. Each network node in the information computing network broadcasts its own status information to other network nodes, so that the first network node receives the status information sent by other network nodes via broadcast.
[0067] Step 203: According to the state information, determine the network nodes in the idle state as network nodes capable of taking on the tasks to be processed as candidate network nodes.
[0068] Specifically, when the status information of a certain network node is in an idle state, the network node is determined to be a network node capable of undertaking the task to be processed and is determined as a candidate network node.
[0069] For example, the first preset condition includes: the evaluation information of the first candidate node is optimal, and the evaluation information includes the evaluation score and the predicted processing time of the task to be processed. Correspondingly, after step 203, the following steps are also included:
[0070] Step 204, respectively obtaining the evaluation score of each candidate network node and the predicted processing time for processing the task to be processed;
[0071] For example, the predicted processing time for the network node to process the task to be processed may be obtained based on the task amount of the task to be processed and the pre-stored correspondence between the task amount and the processing time.
[0072] For example, each network node obtains the predicted processing time for processing the task to be processed, and broadcasts the predicted processing time to other network nodes. The candidate network node is a network node selected from multiple network nodes, and the first network node obtains the predicted processing time broadcasted by the candidate network node.
[0073] Among them, the evaluation score is positively correlated with the ability of the alternative network node to process tasks, and the predicted processing time is negatively correlated with the ability of the alternative network node to process the tasks to be processed.
[0074] Step 205, performing weighted sum processing on the evaluation score and the predicted processing time to obtain a comprehensive evaluation value;
[0075] For example, the prediction processing time and the evaluation score can be normalized separately to eliminate the dimension of the prediction processing time and the evaluation score, and then the normalized prediction processing time and the normalized evaluation score can be weighted summed according to the preset weight value of the prediction processing time and the preset weight value of the evaluation score to obtain a comprehensive evaluation value.
[0076] Furthermore, the longer the predicted processing time is, the weaker the network node's ability to process tasks is, and the larger the evaluation score is, the stronger the network node's ability to process tasks is.
[0077] For example, a first product of the normalized evaluation score and its weight value and a second product of the normalized prediction processing time and its weight value can be obtained, and the difference between the first product and the second product can be obtained, and the difference is determined as the comprehensive evaluation value.
[0078] For example, the first product of the normalized evaluation score and its weight value and the third product of the inverse of the predicted processing time and its weight value can be obtained, and the sum of the first product and the third product can be obtained, and the sum result is determined as the comprehensive evaluation value.
[0079] Step 206: determine the candidate network node with the highest comprehensive evaluation value as the first candidate node.
[0080] Among them, the comprehensive evaluation value is positively correlated with the ability of the network node to process tasks. The candidate network node with the largest comprehensive evaluation value is selected from multiple candidate network nodes as the candidate network node with the strongest ability to process tasks.
[0081] For example, the evaluation score of each candidate network node may be directly obtained, and the candidate network node with the highest evaluation score is selected from multiple candidate network nodes and determined as the first candidate node.
[0082] Step 207: Obtain node information of the second candidate node.
[0083] The second candidate node is a second network node selected according to a first preset condition, and the second network node is another network node among the multiple network nodes except the first network node.
[0084] The method of this step has been described in the aforementioned step 103 and will not be repeated here.
[0085] Step 208, if the cumulative number of times the first network node is selected as a candidate node is greater than the cumulative number of times each second network node is selected as a candidate network node based on the node information of the first candidate node and the node information of the second candidate node, then it is determined that the statistical information of the first network node as a computing node meets the second preset condition, and the first network node is determined to be a computing node.
[0086] The node information is a node identifier, and the accumulated number of times the first network node is selected as a candidate node and the accumulated number of times each of the other second network nodes is selected as a candidate network node can be obtained based on the node information of the first candidate node and the node information of the second candidate node. Figure 2 , network nodes 1 to 6 are all candidate network nodes in idle state. Among them, network node 1 is the first network node, the first candidate node selected by it is network node 1, the other network nodes are the second network nodes, the second candidate node selected by network nodes 2, 3 and 4 is network node 1, and the second candidate node selected by network nodes 5 and 6 is network node 2. According to these node information, it can be counted that the number of times network node 1 is selected as a candidate node is 4, the number of times network node 2 is selected as a candidate node is 2, and the number of times other network nodes are selected as candidate nodes is 0, then the number of times the first network node (network node 1) is selected as a candidate node is greater than the number of times other second network nodes are selected as candidate nodes, and network node 1 is a computing node.
[0087] The first candidate node and the second candidate node selected from the multiple network nodes are trusted nodes with better task processing capabilities among the multiple candidate network nodes. According to the first node identifier of the first candidate node and the second node identifier of the second candidate node, it is determined that the number of times the first network node itself is selected as a candidate node is greater than the number of times the second network node is selected as a candidate node, indicating that the first network node is the candidate network node that has been selected as a candidate node the most times among the multiple candidate network nodes, and the first network node is the network node with the best ability to execute tasks among the multiple candidate network nodes.
[0088] For example, determining in step 208 that the statistical information of the computing node undertaken by the first network node meets the second preset condition may include the following sub-steps:
[0089] Sub-step 2081, if the cumulative number of times the first network node is selected as a candidate node is greater than half of the total number of candidate network nodes based on the node information of the first candidate node and the node information of the second candidate node, then it is determined that the statistical information of the computing node undertaken by the first network node meets the second preset condition.
[0090] If the number of times the first network node is selected as a candidate node is greater than half of the total number of candidate network nodes based on the first node identifier and the second node identifier, it means that the first network node is the network node that has been selected as a candidate node the most times among multiple candidate network nodes, and the first network node is the network node with the best task processing capability among the multiple candidate network nodes.
[0091] Furthermore, if a second network node is determined by any network node as a candidate network node with the ability to process the task to be processed, then the second network node may be selected as a candidate node, that is, the number of times the second network node is selected as a candidate node may be greater than zero. Because the candidate node is selected from the candidate network nodes, if the second network node is not determined by any network node as a candidate network node with the ability to process the task to be processed, then it is impossible for it to be selected as a candidate node, or the number of times the second network node is selected as a candidate node may be equal to zero.
[0092] Therefore, the cumulative number of times the first network node is selected as a candidate node is greater than half of the total number of candidate network nodes, indicating that the cumulative number of times the first network node is selected as a candidate node is greater than the cumulative number of times the second network node is selected as a candidate node.
[0093] In this embodiment, the evaluation score and the predicted processing time are used to reflect the ability of the network node to process tasks. The first candidate node and the second candidate node selected from multiple network nodes according to the evaluation score and predicted processing time of each network node are trusted nodes with better processing task capabilities among multiple network nodes. According to the node information of the first candidate node and the second candidate node, it is determined that the number of times the first network node itself is selected as a candidate node is greater than the number of times the second network node is selected as a candidate node, indicating that the first network node is the network node selected as the candidate node the most times among multiple network nodes, and the first network node is the network node with the best ability to execute tasks among multiple network nodes. According to the evaluation score and the predicted processing time, the computing node with strong ability to process the pending tasks can be accurately selected, which can avoid malicious nodes in the computing power network from processing the pending tasks, and can ensure the stability and security of the computing power network. Determining the first network node as the computing node that executes the pending tasks increases the possibility of successfully processing the pending tasks, avoids the selected computing node being a network node that cannot meet the execution requirements of the pending tasks, and avoids the problem of computing node performance bottleneck.
[0094] In addition, the computing node that is ultimately used to execute the pending task is dynamically determined based on the candidate nodes selected by multiple network nodes, which can avoid the problem of uneven resource utilization among network nodes caused by specifying fixed computing nodes. The computing node that executes the pending task is dynamically selected based on the candidate nodes selected by each network node, which can also meet the dynamic environment of the computing power network.
[0095] When a network node fails, a computing node that is suitable for the current state of the computing network can be dynamically selected according to the method of this embodiment, avoiding the problem in related technologies of selecting computing nodes through a fixed control node. If a control node fails, the computing node cannot be determined, and task scheduling cannot be performed.
[0096] This embodiment does not determine the computing node through a single control node, but obtains the computing node for executing the pending task based on the candidate nodes selected by multiple network nodes, and jointly manages and determines the computing node through multiple network nodes in the computing network, thereby realizing decentralized task scheduling in the computing network. Through decentralized task scheduling, the pending tasks can be intelligently assigned to the computing nodes with the best processing capabilities according to the real-time characteristics of the computing resources in the computing network, avoiding the physical limitations of the related technology when scheduling tasks through a centralized data center, improving the global utilization of computing resources in the computing network, and solving the problem of task scheduling failure caused by a single point failure in the related technology.
[0097] When it is determined that the number of times the first network node is selected as the candidate node is greater than the number of times the second network node is selected as the candidate node, the first network node is determined as the computing node, so that the task to be processed is processed by the first network node. In a distributed computing network system including multiple network nodes, even if there are malicious nodes and faulty nodes, through this embodiment, the candidate nodes selected by the majority of network nodes are determined as computing nodes, which can ensure that the computing nodes are nodes with strong processing task capabilities selected by the majority of network nodes, and can ensure the consistency and reliability of the computing nodes determined by the multiple network nodes.
[0098] According to the status information of each network node, an idle network node is selected from multiple network nodes, and according to the evaluation score of the idle node, a first candidate node is selected from multiple idle network nodes, and the second node identifier of the second candidate node selected by the second network node is received. If the number of times the first network node is selected as a candidate node is determined to be greater than half of the total number of network nodes according to the first node identifier of the first candidate node and the second node identifier of the second candidate node, the first network node is determined to be a computing node, and the task to be processed is executed by the computing node, thereby quickly selecting the network node with the best ability to execute the task. The task to be processed is assigned to the computing node selected according to the method of this embodiment, which increases the possibility of successfully processing the task to be processed, avoids the selected computing node being a network node that cannot meet the execution requirements of the task to be processed, and avoids the problem of computing node performance bottleneck. When a certain network node fails, according to the method of this embodiment, the computing node that is adapted to the current state of the computing network can be dynamically selected to execute the task to be processed. The method of this embodiment solves the problem of task scheduling failure when a single point failure occurs in the related technology.
[0099] In the example, the first candidate node has the highest evaluation score, and the evaluation score includes a comprehensive evaluation score and at least one type evaluation score; the type evaluation score corresponds to the task type one-to-one, the comprehensive evaluation score is used to reflect the ability of the candidate network node to process tasks of at least one task type, and the type evaluation score reflects the ability of the candidate network node to process tasks of the corresponding task type.
[0100] After step 203, the following steps may also be included:
[0101] Step 209: Obtain the task type of the task to be processed.
[0102] For example, in response to a task submission operation by a user in a computing power network user interface, the pending tasks submitted by the user can be obtained, and in response to a task type selected by the user, the task type of the pending tasks can be obtained.
[0103] Step 210, obtaining a target type evaluation score of each candidate network node according to the task type of the task to be processed;
[0104] The target type evaluation score is a task type corresponding to the task type of the task to be processed in at least one type evaluation score of the candidate network node;
[0105] For example, the target type evaluation score of each network node may be obtained according to the task type of the task to be processed and the correspondence between the pre-stored task type and the type evaluation score.
[0106] Step 211, determining the candidate network node with the highest target type evaluation score as the third candidate node;
[0107] The type evaluation score is positively correlated with the ability of the network node to process tasks of the corresponding task type, and the target type evaluation score is positively correlated with the ability of the network node to process the pending tasks. Further, from the multiple candidate network nodes, the candidate network node with the highest target type evaluation score is selected and determined as the third candidate node. The third candidate node is the candidate node with the strongest ability to process the pending tasks among the multiple candidate nodes.
[0108] Step 212: If there are multiple third candidate nodes, the third candidate node with the highest comprehensive evaluation score is determined as the first candidate node.
[0109] For example, the evaluation scores of various task types of network nodes may be weighted and fused to obtain a comprehensive evaluation score.
[0110] When there are multiple third candidate nodes, a third candidate node with the highest comprehensive evaluation score is selected from the third candidate nodes and determined as the first candidate node with the best task processing capability.
[0111] If there is one third candidate node, the third candidate node is determined as the first candidate node.
[0112] For example, the first candidate node may be selected from the candidate nodes by the method of steps 204 to 206 , or the first candidate node may be selected from the candidate nodes by the method of steps 209 to 212 .
[0113] For example, after step 208, the following steps may also be included:
[0114] Step 213, obtaining the processing result of the task to be processed.
[0115] The processing result includes processing success or processing failure.
[0116] For example, when the computing node executes the task to be processed, if the processing program does not report an error and outputs the execution result, it is determined that the task to be processed is successfully processed; when the computing node executes the task to be processed, if the processing program reports an error or does not output the execution result, it is determined that the task to be processed has failed.
[0117] Step 214, according to the processing result, modify the evaluation information of the first network node to obtain new evaluation information;
[0118] Specifically, the evaluation information includes an evaluation score. When the processing result is successful, the evaluation score of the network node is increased by a preset score to obtain a new evaluation score; when the processing result is a failure, the evaluation score of the network node is subtracted by a preset score to obtain a new evaluation score.
[0119] Step 215, broadcast the new evaluation information to other network nodes, so that when other network nodes receive new tasks to be processed, they can select a new second candidate node from multiple network nodes according to the new evaluation information.
[0120] In this step, the evaluation information of each network node includes the evaluation score of the first network node and the evaluation scores of other network nodes except the first network node among the multiple network nodes of the computing network. For example, for each candidate network node, after the candidate network node is selected as a computing node and the task to be processed is successfully executed by the candidate network node, an updated evaluation score is obtained according to the task processing result and the preset score value corresponding to the task processing result.
[0121] For example, when a network node is established, the initial value of the evaluation score is set to 0. If the task processing result is successful, the corresponding preset score value is 0.1. If the task processing result is a task processing failure, the corresponding preset score value is -0.1. When the network node is determined as a computing node for the first time and successfully executes the pending task, the preset score value (for example, the preset score value is 0.1) is added to the initial value. When the pending task is executed for the first time, the updated evaluation score is 0.1. When the network node is determined as a computing node for the second time and fails to process the pending task, -0.1 is added to the current evaluation score (0.1), and the updated evaluation score is 0.
[0122] The new evaluation score is broadcasted to other network nodes, and the evaluation score can be dynamically updated. Thus, the evaluation score of each network node in the computing power network can be adjusted in real time according to the evaluation score of the network node and the processing result of the processing task.
[0123] Dynamically adjusting the evaluation score according to the processing result is equivalent to providing an incentive mechanism. Specifically, the evaluation score of the network node with a successful processing result is increased, and the evaluation score of the network node with an unsuccessful processing result is reduced. This embodiment optimizes the incentive mechanism for evaluation scores in the computing power network.
[0124] For example, the network nodes of the computing power network are connected in communication. When the computing power network receives the task to be processed, it broadcasts the task to be processed to each network node. After receiving the task to be processed, each network node broadcasts its own evaluation score to other network nodes. Correspondingly, the first network node obtains the evaluation score sent by the network node by broadcasting.
[0125] For example, after step 208, the following steps may also be included:
[0126] Step 216, obtaining the processing result of the task to be processed.
[0127] The processing result includes processing success or processing failure. The method of this step has been described in the aforementioned step 213 and will not be repeated here.
[0128] Step 217: If it is determined that the processing result is a processing failure, a fourth candidate node is selected from the candidate network nodes except the first network node according to the evaluation information of the candidate network nodes except the first network node.
[0129] When the processing result is determined to be a processing failure, the candidate network node with the highest evaluation score is selected from other candidate network nodes and determined as the fourth candidate node, which is equivalent to no longer analyzing whether the first network node is a computing node, but directly selecting a computing node from other candidate network nodes.
[0130] Step 218: broadcast the node information of the fourth candidate node to the second network node, so that the second network node can select a new computing node from the candidate network nodes except the first network node according to the node information of the fourth candidate node.
[0131] Specifically, when a second network node determines, based on the node information of the fourth candidate node, that the number of times it is selected as a candidate node is greater than the number of times other network nodes are selected as candidate nodes, the network node is determined to be a computing node.
[0132] For example, the computing resources of the computing network can be expanded or shrunk according to the current status of each network node in the computing network. For example, when receiving a pending task, all network nodes are in a non-idle state, and the number of selected candidate nodes is zero. In this case, it means that the number of available network nodes is insufficient, and network nodes can be added to expand the computing network resources. For another example, when receiving a pending task, when the number of network nodes in a non-idle state exceeds the number threshold, it is considered that the computing network system resources are in excess, and network nodes can be reduced to shrink computing resources.
[0133] Figure 4 is a flowchart of a decentralized task scheduling method provided in an embodiment of the present application. Figure 5 This is a flowchart of a decentralized task scheduling method provided by an embodiment of the present application, referring to Figure 4 and Figure 5 , the method may include the following steps:
[0134] Step S1, the computing power network responds to the task submission operation of the user through the user interface, obtains the pending tasks and stores them in the decentralized task queue.
[0135] In this embodiment, the user submits the task to be executed through the user interface, and the computing power network sends the task to Figure 4 The decentralized task queue shown in FIG. The decentralized task queue is used to collect and store all pending tasks.
[0136] Step S2, broadcast the pending tasks in the decentralized task queue to all network nodes in the computing power network.
[0137] The computing power network system broadcasts the pending tasks in the decentralized task queue to all network nodes in the computing power network.
[0138] Step S3: The first network node determines its own resource availability and receives resource availability information of other second network nodes.
[0139] pass Figure 4 The resource discovery mechanism in obtains the resource availability declared by the network node itself, broadcasts its own resource availability to other network nodes, and receives the resource availability of other network nodes. The resource availability may include the status information of the network node, and specifically, the resource availability includes the information that the network node is in an idle state or a non-idle state.
[0140] Step S4: The first network node determines its own dynamic level, and receives dynamic levels of other second network nodes.
[0141] For example, the evaluation score can be used to represent the dynamic level of the network node.
[0142] pass Figure 4 The dynamic level mechanism in the network evaluates the dynamic level of the network node based on its historical performance.
[0143] Step S5, the first network node obtains network nodes whose resource availability meets the preset task processing requirements, and determines a first candidate node from the selected network nodes according to the dynamic level; the first candidate node has a first node identifier.
[0144] For example, when the network node is an idle node, the network node is determined to be a network node whose resource availability meets a preset task processing requirement.
[0145] Can be Figure 4 The smart contract mechanism in the example selects the first candidate node according to the dynamic level. The smart contract mechanism is a program that can execute relevant policies in a blockchain or non-blockchain computing network system. In the computing network, the smart contract can automatically assign tasks, verify execution results, and distribute rewards. Based on the smart contract mechanism, operations such as candidate node selection in this embodiment can be implemented without third-party intervention.
[0146] Step S6: The first network node receives a second node identifier of a second candidate node sent by the second network node.
[0147] Specifically, other network nodes select the second candidate node according to the node identifier of the candidate node selected by themselves and the node identifier of the candidate node sent by other network nodes, and broadcast the second node identifier of the second candidate node to other network nodes except themselves.
[0148] Step S7: If the first network node determines that it is selected as a candidate node the most times according to the first node identifier of the first candidate node and the second node identifier of the second candidate node, the first network node is determined to be a computing node.
[0149] Through the smart contract mechanism in the network nodes, computing nodes are selected according to the evaluation scores, and through the smart contract mechanism in the network nodes, the tasks to be processed are assigned to the computing nodes.
[0150] Step S8: The computing node executes the task to be processed, and after completion of the execution, verifies and provides feedback on the processing result.
[0151] pass Figure 4 The task execution mechanism in the program executes the tasks to be processed, and verifies and provides feedback on the processing results through the result verification and feedback mechanism.
[0152] Step S9, the computing network checks whether the pending task is successfully processed. If so, it proceeds to step S10, otherwise it proceeds to step S11.
[0153] For example, if the processing process does not report an error and the processing result is successfully output, it is determined that the pending task is successfully processed, otherwise it is determined that the pending task is failed.
[0154] Step S10, feeding back the processing result to the user and increasing the evaluation score.
[0155] For example, the preset score and the evaluation score may be summed, and the summed result may be determined as a new evaluation score to increase the evaluation score.
[0156] Step S11, the computing power network marks the pending task as completed.
[0157] Specifically, when the processing result is fed back to the user, a notification of task processing completion is sent to the user. Figure 4 The task completion mechanism in marks the pending tasks as completed.
[0158] Step S12: the first network node selects a third candidate node from other network nodes other than itself, and sends third node information of the third candidate node to the second network node, so that the second network node can determine a new computing node for processing.
[0159] Specifically, when the first network node determines that the task processing fails, Figure 4 The reallocation or error handling mechanism in the network sends the error record to the dynamic ranking mechanism, and determines the third candidate node based on the dynamic ranking mechanism and the smart contract mechanism.
[0160] The second network node reselects a computing node according to the third node information and the fourth node information of the fourth candidate node selected according to the evaluation scores of other networks other than the first network node.
[0161] Step S13: The first network node stores the record of the processing failure and lowers the evaluation score.
[0162] Specifically, refer to Figure 4 ,The error records of failed processing are recorded through the dynamic grading mechanism in the network nodes, and the evaluation scores are lowered.
[0163] Step S14: the first network node broadcasts the updated evaluation score to each second network node.
[0164] By broadcasting the updated evaluation score to other network nodes, other network nodes can obtain the latest evaluation score.
[0165] Step S15: The computing network monitors and optimizes each network node.
[0166] For example, the evaluation scores of each network node are supervised, and the evaluation scores of the network nodes are adjusted and optimized. Figure 4 , the system can be updated and optimized through governance decisions in network nodes.
[0167] After the pending task is processed through steps S1 to S15, the process returns to step S1 to wait for the user to submit a new pending task, and processes the new pending task according to the method of steps S1 to S15.
[0168] The method of this embodiment can be applied to blockchains, and can also be applied to other distributed computing networks including multiple network nodes, wherein blockchain is a distributed ledger technology that can record transactions or time through linked blocks, and blockchain has the characteristics of decentralization, transparency and non-tamperability. In the computing network, blockchain can be used to record task allocation, verify results or distribute rewards. The computing nodes are determined by multiple network nodes together, and the computing nodes are determined based on the Byzantine fault tolerance mechanism. Based on the method of this embodiment, when there are malicious network nodes in the network nodes, the pending tasks will not be directly assigned to the wrong computing nodes selected by the malicious network nodes, but the computing nodes for processing the pending tasks are determined based on the node information of the candidate nodes selected by multiple network nodes, thereby ensuring the reliability and consistency of the computing network machine system. The method of this embodiment realizes decentralized task scheduling and enhances the system elasticity and anti-censorship of the computing network. In addition, based on the method of this embodiment, it can meet the needs of users who need a large amount of computing resources for simulation, modeling, and rendering, and can obtain computing power that meets user needs at a lower cost.
[0169] This embodiment provides a dynamic rating model for dynamically determining evaluation scores, and can automatically handle score modifications for resource contributors through a smart contract mechanism.
[0170] According to the direction of data flow, the computing network can be described as a distributed task scheduling system. Example 6 shows a computing node in the computing network. The computing node is responsible for executing the tasks assigned to it and reporting the task execution status. Figure 6 The system may include a task management module, a resource management module, an intelligent scheduling module, a task execution module (not shown in the figure), a result processing module, a result feedback module, a dynamic rating module, a resource pool, a reputation management system, a system monitoring module, and a system optimization module.
[0171] Among them, the task management module is used for the computing network system to receive and record pending tasks submitted by users, and store them in the task queue module, then obtain the network nodes with available resources through the resource management module, and determine the computing nodes through the dynamic level module and the intelligent scheduling module, assign the tasks to the computing nodes for execution, and determine whether the task is successfully processed through the result processing module. If successful, the processing result is fed back to the dynamic level module, the evaluation score is updated, and the updated evaluation score is stored in the resource pool. The evaluation score of the network node is obtained in real time through the system monitoring module for optimization by the system optimization module. If the task processing is identified, the task is reallocated to other network nodes through the error handling module. At the same time, the error is recorded, and the evaluation score is updated through the reputation management system, and the updated result is stored in the resource pool.
[0172] Through the distributed architecture in this embodiment, decentralized task scheduling can be achieved in the computing network. According to the real-time availability of each network node in the computing network, the tasks to be processed can be intelligently scheduled to the most suitable computing node. This mechanism breaks the physical limitations of traditional centralized data centers and improves the global utilization of computing resources.
[0173] Figure 7 The embodiment of the present application also provides a decentralized task scheduling device based on a computing power network, characterized in that the computing power network includes multiple network nodes, the device is applied to a first network node among the multiple network nodes, and the device includes:
[0174] The first acquisition module 301 is used to acquire tasks to be processed and determine network nodes capable of undertaking the tasks to be processed as candidate network nodes;
[0175] A second acquisition module 302, configured to select a first candidate node from the candidate network nodes according to a first preset condition;
[0176] The third acquisition module 303 is used to acquire node information of a second candidate node; the second candidate node is a second network node selected according to a first preset condition, and the second network node is a network node other than the first network node among multiple network nodes;
[0177] The determination module 304 is used to determine that the first network node is a computing node and execute the task to be processed when it is determined that the statistical information of the computing node undertaken by the first network node meets the second preset condition based on the node information of the first candidate node and the node information of the second candidate node.
[0178] Optionally, the determination module 304 may include:
[0179] The first determination submodule is used to determine that the statistical information of the first network node as a computing node meets the second preset condition, and determine that the first network node is a computing node if the cumulative number of times the first network node is selected as a candidate node is greater than the cumulative number of times each second network node is selected as a candidate network node.
[0180] Optionally, the first acquisition module 301 may include:
[0181] The first acquisition submodule is used to acquire the status information of each network node; the status information includes an idle state or a non-idle state;
[0182] The second determining submodule is used to determine, according to the state information, a network node in an idle state as a network node capable of undertaking the task to be processed as a candidate network node.
[0183] Optionally, the first preset condition includes: the evaluation information of the first candidate node is optimal, and the evaluation information includes the evaluation score and the predicted processing time of the task to be processed; the second acquisition module 302 may include:
[0184] The second acquisition submodule is used to respectively acquire the evaluation score of each candidate network node and the predicted processing time for processing the task to be processed;
[0185] The third acquisition submodule is used to perform weighted sum processing on the evaluation score and the predicted processing time to obtain a comprehensive evaluation value;
[0186] The third determining submodule is configured to determine the candidate network node with the highest comprehensive evaluation value as the first candidate node.
[0187] Optionally, the first candidate node has the highest evaluation score, the evaluation score includes a comprehensive evaluation score and at least one type evaluation score; the type evaluation score corresponds to the task type one-to-one, the comprehensive evaluation score is used to reflect the ability of the candidate network node to process tasks of at least one task type, and the type evaluation score reflects the ability of the candidate network node to process tasks of the corresponding task type; the second acquisition module 302 may include:
[0188] The fourth acquisition submodule is used to obtain the task type of the task to be processed;
[0189] A fifth acquisition submodule is used to obtain a target type evaluation score of each candidate network node according to the task type of the task to be processed; the target type evaluation score is a task type corresponding to the task type of the task to be processed in at least one type evaluation score of the candidate network node;
[0190] A fourth determination submodule is used to determine the candidate network node with the highest target type evaluation score as the third candidate node;
[0191] The fifth determination submodule is configured to determine the third candidate node with the highest comprehensive evaluation score as the first candidate node if there are multiple third candidate nodes.
[0192] Optionally, the device 30 may further include:
[0193] The fourth acquisition module is used to obtain the processing result of the task to be processed after executing the task to be processed; the processing result includes processing success or processing failure;
[0194] A correction module, used for correcting the evaluation information of the first network node according to the processing result to obtain new evaluation information;
[0195] The first broadcast module is used to broadcast the new evaluation information to other network nodes, so that when the other network nodes receive new tasks to be processed, they can select a new second candidate node from multiple network nodes according to the new evaluation information.
[0196] Optionally, the device 30 may further include:
[0197] A fifth acquisition module is used to acquire the processing result of the task to be processed after executing the task to be processed; the processing result includes processing success or processing failure;
[0198] a second determining module, configured to select a fourth candidate node from the candidate network nodes other than the first network node according to evaluation information of the candidate network nodes other than the first network node if the processing result is determined to be a processing failure;
[0199] The third broadcast module is used to broadcast the node information of the fourth candidate node to the second network node, so that the second network node can select a new computing node from the candidate network nodes except the first network node according to the node information of the fourth candidate node.
[0200] Optionally, the computing power network further includes a decentralized task queue, and the first acquisition module 301 may include:
[0201] The receiving submodule is used to receive pending tasks sent by broadcasting; wherein the pending tasks are tasks stored in a decentralized task queue; the decentralized task queue is used to respond to the user's pending task submission operation for the computing power network, and receive and store the pending tasks.
[0202] Optionally, the device 30 further includes:
[0203] The third determination module is used to determine that the statistical information of the computing node undertaken by the first network node meets the second preset condition if the cumulative number of times the first network node is selected as a candidate node is greater than half of the total number of candidate network nodes based on the node information of the first candidate node and the node information of the second candidate node.
[0204] In summary, in this embodiment, a network node that has the ability to undertake the task to be processed is determined as a candidate network node, and the statistical information of the first network node undertaking the settlement node is obtained according to the node information of the first candidate node selected from the candidate network nodes and the node information of the second candidate node selected by the second network node. When the statistical information meets the second preset condition, the first network node is determined to be a computing node, and the task to be processed is executed, thereby ensuring that the computing node is a network node that has the ability to process the task to be processed and the statistical information of the computing node meets the conditions. The statistical information is determined according to the node information of the first candidate node selected by the first network node and the node information of the second candidate node selected by the second network node. The computing node is determined according to the statistical information. It is selected by multiple network nodes. Therefore, it can be avoided that the computing node is selected through fixed control, and when the control node fails, the computing node selection fails, and then the task scheduling fails. The problem is solved that the task scheduling method of the related technology has a single point failure, which will cause the task scheduling to fail.
[0205] The embodiment of the present invention discloses an electronic device, such as Figure 8 As shown, it includes: a processor 401 and a memory 402, the device number memory 402 stores programs or instructions that can be run on the device number processor 401, and when the device number program or instruction is executed by the device number processor 401, any of the above-mentioned decentralized task scheduling methods based on the computing power network is implemented.
[0206] An embodiment of the present invention discloses a computer-readable storage medium, wherein a computer program stored in the storage medium enables a processor to execute any of the above methods.
[0207] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0208] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0209] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0210] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0211] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0212] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0213] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the device number element.
[0214] The above is a detailed introduction to the decentralized task scheduling method, device, equipment and storage medium based on the computing power network provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A decentralized task scheduling method based on computing power network, characterized in that: The computing power network includes a plurality of network nodes, and the method is applied to a first network node among the plurality of network nodes. The method includes: Acquire the task to be processed, and determine the network node capable of undertaking the task to be processed as the candidate network node; Filtering a first candidate node from the candidate network nodes according to a first preset condition; Acquire node information of a second candidate node; the second candidate node is a second network node selected according to the first preset condition, and the second network node is a network node other than the first network node among the plurality of network nodes; When it is determined, based on the node information of the first candidate node and the node information of the second candidate node, that the statistical information of the computing node undertaken by the first network node meets the second preset condition, the first network node is determined to be a computing node, and the task to be processed is executed.
2. The method according to claim 1, characterized in that The determining that the first network node is a computing node when it is determined, according to the node information of the first candidate node and the node information of the second candidate node, that the statistical information of the computing node assumed by the first network node meets a second preset condition includes: If, based on the node information of the first candidate node and the node information of the second candidate node, it is determined that the cumulative number of times the first network node is selected as a candidate node is greater than the cumulative number of times each second network node is selected as a candidate network node, then it is determined that the statistical information of the first network node as a computing node meets the second preset condition, and the first network node is determined to be a computing node.
3. The method according to claim 1, characterized in that Determining a network node capable of undertaking the task to be processed as a candidate network node includes: Acquire status information of each of the network nodes; the status information includes an idle state or a non-idle state; According to the state information, a network node in an idle state is determined as a network node capable of undertaking the task to be processed and is determined as a candidate network node.
4. The method according to claim 1, characterized in that: The first preset condition includes: the evaluation information of the first candidate node is optimal, and the evaluation information includes an evaluation score and a predicted processing time for processing the task to be processed; and selecting the first candidate node from the candidate network nodes according to the first preset condition includes: Obtaining the evaluation score of each candidate network node and the predicted processing time for processing the task to be processed; Performing weighted sum processing on the evaluation score and the predicted processing time to obtain a comprehensive evaluation value; The candidate network node with the highest comprehensive evaluation value is determined as the first candidate node.
5. The method according to claim 1, characterized in that The first candidate node has the highest evaluation score, the evaluation score including a comprehensive evaluation score and at least one type evaluation score; the type evaluation score corresponds to the task type one-to-one, the comprehensive evaluation score is used to reflect the ability of the candidate network node to process tasks of at least one task type, and the type evaluation score reflects the ability of the candidate network node to process tasks of the corresponding task type; The selecting a first candidate node from the candidate network nodes according to a first preset condition includes: Obtaining the task type of the task to be processed; According to the task type of the task to be processed, respectively obtain a target type evaluation score of each candidate network node; the target type evaluation score is a task type corresponding to the task type of the task to be processed in at least one type evaluation score of the candidate network node; The candidate network node with the highest target type evaluation score is determined as the third candidate node; If there are multiple third candidate nodes, the third candidate node with the highest comprehensive evaluation score is determined as the first candidate node.
6. The method according to claim 1, characterized in that After executing the tasks to be processed, the method further includes: Obtaining a processing result of the task to be processed; the processing result includes a processing success or a processing failure; According to the processing result, modifying the evaluation information of the first network node to obtain new evaluation information; The new evaluation information is broadcasted to other network nodes, so that when the other network nodes receive new tasks to be processed, they can select a new second candidate node from the plurality of network nodes according to the new evaluation information.
7. The method according to any one of claims 1 to 6, characterized in that: After executing the tasks to be processed, the method further includes: Obtaining a processing result of the task to be processed; the processing result includes a processing success or a processing failure; If it is determined that the processing result is a processing failure, selecting a fourth candidate node from the candidate network nodes except the first network node according to evaluation information of the candidate network nodes except the first network node; The node information of the fourth candidate node is broadcast to the second network node, so that the second network node selects a new computing node from the candidate network nodes except the first network node according to the node information of the fourth candidate node.
8. The method according to any one of claims 1 to 6, characterized in that: The computing power network also includes a decentralized task queue, and obtaining tasks to be processed includes: Receiving the pending tasks sent by broadcasting; Among them, the pending tasks are tasks stored in the decentralized task queue; the decentralized task queue is used to respond to the user's pending task submission operation for the computing power network, receive and store the pending tasks.
9. The method according to claim 1, characterized in that: Also includes: If, based on the node information of the first candidate node and the node information of the second candidate node, it is determined that the cumulative number of times the first network node is selected as a candidate node is greater than half of the total number of the candidate network nodes, then it is determined that the statistical information of the computing node undertaken by the first network node meets the second preset condition.
10. A decentralized task scheduling device based on a computing power network, characterized in that: The computing power network includes a plurality of network nodes, and the device is applied to a first network node among the plurality of network nodes, and the device includes: A first acquisition module is used to acquire a task to be processed and determine a network node capable of undertaking the task to be processed as a candidate network node; A second acquisition module, configured to select a first candidate node from the candidate network nodes according to a first preset condition; A third acquisition module is used to acquire node information of a second candidate node; the second candidate node is a second network node selected according to the first preset condition, and the second network node is a network node other than the first network node among the plurality of network nodes; The first determination module is used to determine that the first network node is a computing node and execute the task to be processed when it is determined that the statistical information of the computing node undertaken by the first network node meets the second preset condition based on the node information of the first candidate node and the node information of the second candidate node.
11. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the processors to perform the method of any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the method according to any one of claims 1 to 9.
