Method, device and system for switching tasks
Through the collaborative work of the strategy center and the dispatch center, task processing equipment is automatically switched to target tasks with higher profits, which solves the problem of inability to automatically switch tasks in the existing technology, improves user benefits and user experience, and avoids waste of computing power and The connection is interrupted.
Patent Information
- Application Number
- CN202010385984.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-09
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-05-09
AI Technical Summary
Existing task processing equipment cannot automatically switch to tasks with higher benefits, resulting in users being unable to obtain more benefits, and the manual switching process will lead to a waste of computing power and insufficient timeliness.
Through the collaborative work of the strategy center and the dispatch center, it is determined that the profit of the target task is higher than the current task, and automatically switches to the target task without interrupting the link between the task processing equipment and the dispatch center, ensuring that the task processing equipment is always connected with the dispatch center Stay connected to avoid restarts and wasted computing power.
It realizes the automatic switching of task processing equipment, maximizes user benefits, improves user experience, and avoids the problem of reduced benefits caused by waste of computing power and connection interruption.
Smart Images

Figure CN113626159B
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computers, and more specifically, to a method, device, and system for switching tasks. Background Art
[0002] Currently, a task processing device will specify the address of a task collection platform, obtain fixed-type tasks from the address, complete the tasks issued by the task collection platform and obtain corresponding benefits. Therefore, even if there are other types of tasks with higher benefits, the task processing device cannot obtain the task to obtain more benefits. Summary of the invention
[0003] The present application provides a method, device and system for switching tasks, which can enable a task processing device to automatically switch to a task with higher benefits to protect the interests of users.
[0004] In a first aspect, a method for switching tasks is provided, the method comprising: the policy center determines a target task for a first task processing device, the benefit of the target task being higher than the benefit of a first task currently executed by the first task processing device; the policy center sends an indication message to a scheduling center, the indication message being used to instruct the scheduling center to schedule the target task from the task collection platform to the first task processing device, the first task processing device being used to switch from the first task to the target task.
[0005] The policy center can select the tasks to be processed, and pick out the target tasks with higher benefits than the first task from the tasks to be processed, so that the first task processing device can automatically switch to the target tasks with higher benefits to obtain more benefits.
[0006] By setting up a dispatch center and connecting the dispatch center to the task processing device, it is possible to ensure that the task processing device and the dispatch center are always connected. For example, during the process of optimizing the strategy center, the link between the dispatch center and the task processing device will not be disconnected, which will not cause the problem of reduced revenue, and this can improve the user experience.
[0007] In addition, since there is no need to disconnect the link between the first task processing device and the scheduling center during the task switching process, there is no need to restart the task processing device, there is no computing power switching loss, and no waste of computing power.
[0008] In some possible implementations, the policy center determines a target task for the first task processing device, including: the policy center determines a task set whose benefits are greater than the first task; and the policy center determines the target task from the task set.
[0009] In some possible implementations, the target task is the task with the greatest benefit in the task set.
[0010] Taking the task with the greatest profit as the target task can ensure that the user's profit is maximized.
[0011] In some possible implementations, the policy center determines a set of tasks whose benefits are greater than those of the first task, including: the policy center determines the set of tasks based on a first parameter of the first task processing device, the first parameter including at least one of the following: supported algorithms, computing power, tasks that can be executed by supported algorithms, price information of supported digital certificates, difficulty information for completing tasks, and power consumption.
[0012] In some possible implementations, the policy center determines the target task for the first task processing device based on a first parameter of the first task processing device, including: the policy center determines, based on the first parameter, the benefits that the first task processing device can obtain when executing multiple tasks per unit time; the policy center determines a set of tasks whose benefits among the multiple tasks per unit time are higher than those of the first task as the task set.
[0013] In some possible implementations, the policy center determines, based on the first parameter, the profits that can be obtained by the first task processing device when executing multiple tasks per unit time, including: the policy center determines the profits that can be obtained by the first task processing device when executing the multiple tasks per unit time based on difficulty information for completing the multiple tasks, computing power of the first task processing device when executing the multiple tasks respectively, power consumption of the first task processing device when executing the multiple tasks respectively, and price information of digital certificates corresponding to the multiple tasks per unit time.
[0014] By comprehensively considering factors such as difficulty information, price information, computing power, and power consumption, the final target task can be made more reasonable.
[0015] In some possible implementations, the first task processing device supports multiple algorithms, the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0016] In some possible implementations, the method also includes: the policy center receives parameter information for the first task processing device sent by the scheduling center, and the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, difficulty information for completing tasks, and power consumption.
[0017] In some possible implementations, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0018] In some possible implementations, the target task and the first task are from the same task collection platform.
[0019] In some possible implementations, the task collection platform includes tasks for different digital credentials.
[0020] In some possible implementations, the policy center determines the target task for the first task processing device, including: the policy center determines the target task for the first task processing device at every preset time interval.
[0021] In some possible implementations, the task collection platform is a proof-of-work computing power collection platform, the target task is a proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0022] In a second aspect, a method for switching tasks is provided, the method comprising: a scheduling center receives indication information, the indication information is used to indicate a target task; the scheduling center schedules the target task from a task collection platform to a first task processing device according to the indication information, the first task processing device is used to switch from a currently executed first task to the target task, wherein the benefit of the target task is higher than the benefit of the first task.
[0023] In some possible implementations, the target task is the task with the highest benefit in a set of tasks whose benefits are greater than those of the first task.
[0024] In some possible implementations, the target task is the task with the highest profit that can currently be executed by the first task processing device.
[0025] In some possible implementations, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0026] In some possible implementations, the target task and the first task are from the same task collection platform.
[0027] In some possible implementations, the task collection platform includes tasks for different digital credentials.
[0028] In some possible implementations, the method also includes: the scheduling center sends parameter information for the first task processing device to the policy center, and the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, difficulty information for completing tasks, and power consumption.
[0029] In some possible implementations, the task collection platform is a proof-of-work computing power collection platform, the target task is a proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0030] In a third aspect, a method for switching tasks is provided, the method comprising: a first task processing device receives a target task scheduled by a scheduling center; the first task processing device switches from a currently executed first task to the target task, wherein a benefit of the target task is higher than a benefit of the first task.
[0031] In some possible implementations, the target task is the task with the highest benefit in a set of tasks whose benefits are greater than those of the first task.
[0032] In some possible implementations, the first task processing device supports multiple algorithms; the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0033] In some possible implementations, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0034] In some possible implementations, the target task and the first task are from the same task collection platform.
[0035] In some possible implementations, the task collection platform includes tasks for different digital credentials.
[0036] In some possible implementations, the task collection platform is a proof-of-work computing power collection platform, the target task is a proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0037] In a fourth aspect, a device for switching tasks is provided, comprising: a processing unit, used to determine a target task for a first task processing device, the benefit of the target task being higher than the benefit of a first task currently executed by the first task processing device; a communication unit, used to send indication information to a scheduling center, the indication information being used to instruct the scheduling center to schedule the target task from a task collection platform to the first task processing device, the first task processing device being used to switch from the first task to the target task.
[0038] In some possible implementations, the processing unit is specifically configured to: determine a set of tasks whose benefits are greater than those of the first task; and determine the target task from the set of tasks.
[0039] In some possible implementations, the target task is the task with the greatest benefit in the task set.
[0040] In some possible implementations, the processing unit is specifically used to: determine the task set based on a first parameter of the first task processing device, wherein the first parameter includes at least one of the following: supported algorithms, computing power, tasks that can be executed by supported algorithms, price information of supported digital certificates, difficulty information of completing tasks, and power consumption.
[0041] In some possible implementations, the processing unit is specifically used to: determine, based on the first parameter, the benefits that the first task processing device can obtain when executing multiple tasks per unit time; and determine a set of tasks whose benefits among the multiple tasks per unit time are higher than those of the first task as the task set.
[0042] In some possible implementations, the processing unit is specifically used to determine the benefits that the first task processing device can obtain when executing the multiple tasks per unit time based on difficulty information of completing the multiple tasks, computing power of the first task processing device when executing the multiple tasks respectively, power consumption of the first task processing device when executing the multiple tasks respectively, and price information of digital certificates corresponding to the multiple tasks per unit time.
[0043] In some possible implementations, the first task processing device supports multiple algorithms; the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0044] In some possible implementations, the communication unit is also used to: receive parameter information for the first task processing device sent by the scheduling center, the parameter information including at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, difficulty information for completing tasks, and power consumption.
[0045] In some possible implementations, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0046] In some possible implementations, the target task and the first task are from the same task collection platform.
[0047] In some possible implementations, the task collection platform includes tasks for different digital credentials.
[0048] In some possible implementations, the processing unit is further configured to: determine the target task for the first task processing device at every preset time interval.
[0049] In some possible implementations, the task collection platform is a proof-of-work computing power collection platform, the target task is a proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0050] In a fifth aspect, a device for switching tasks is provided, comprising: a communication unit for receiving indication information, wherein the indication information is used to indicate a target task; a processing unit for scheduling the target task from a task collection platform to a first task processing device according to the indication information, the first task processing device being used to switch from a currently executed first task to the target task, wherein a benefit of the target task is higher than a benefit of the first task.
[0051] In some possible implementations, the target task is the task with the highest benefit in a set of tasks whose benefits are greater than those of the first task.
[0052] In some possible implementations, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0053] In some possible implementations, the target task and the first task are from the same task collection platform.
[0054] In some possible implementations, the task collection platform includes tasks for different digital credentials.
[0055] In some possible implementations, the communication unit is also used to: send parameter information for the first task processing device to the policy center, the parameter information including at least one of the following parameters: supported algorithms, computing power, tasks that can be performed by the supported algorithms, difficulty information for completing the tasks, and power consumption.
[0056] In some possible implementations, the task collection platform is a proof-of-work computing power collection platform, the target task is a proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0057] In a sixth aspect, a task processing device is provided, comprising: a communication unit for receiving a target task scheduled by a scheduling center; and a processing unit for switching from a currently executed first task to the target task, wherein the benefit of the target task is higher than the benefit of the first task.
[0058] In some possible implementations, the target task is the task with the highest benefit in a set of tasks whose benefits are greater than those of the first task.
[0059] In some possible implementations, the first task processing device supports multiple algorithms; the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0060] In some possible implementations, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0061] In some possible implementations, the target task and the first task are from the same task collection platform.
[0062] In some possible implementations, the task collection platform includes tasks for different digital credentials.
[0063] In some possible implementations, the task collection platform is a proof-of-work computing power collection platform, the target task is a proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0064] In the seventh aspect, a system for switching tasks is provided, comprising a task collection platform, a scheduling center, and a device for switching tasks as in the fourth aspect or any possible implementation of the fourth aspect, wherein the scheduling center is used to schedule the target task from the task collection platform; the scheduling center is also used to send the target task to the first task processing device, so that the first task processing device switches from the currently executing first task to the target task, and the benefit of the target task is higher than the benefit of the first task. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a schematic block diagram of a traditional task processing system.
[0066] Figure 2 It is a schematic flowchart of a method for switching tasks provided in an embodiment of the present application.
[0067] Figure 3 It is a schematic flowchart of another method for switching tasks provided in an embodiment of the present application.
[0068] Figure 4 This is a schematic flowchart of another method for switching tasks provided in an embodiment of the present application.
[0069] Figure 5 It is a schematic block diagram of a device for switching tasks provided in an embodiment of the present application.
[0070] Figure 6 It is a schematic block diagram of another device for switching tasks provided in an embodiment of the present application.
[0071] Figure 7 This is a schematic block diagram of another device for switching tasks provided in an embodiment of the present application.
[0072] Figure 8a and Figure 8b It is a schematic block diagram of a system for switching tasks provided in an embodiment of the present application.
[0073] Fig. 9 This is a schematic block diagram of another device for switching tasks according to an embodiment of the present application. DETAILED DESCRIPTION
[0074] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0075] Figure 1 is a schematic diagram of a conventional task processing system 100 .
[0076] The task processing system 100 may include a task collection platform 110 and a task processing device 120. The task collection platform 110 and the task processing device 120 may generally be connected by wire, such as a gigabit optical fiber, etc. Of course, the task collection platform 110 and the task processing device 120 may also be connected by wireless, such as WiFi, etc., and the present application embodiment does not impose any limitation on this.
[0077] It is understood that the system 100 may include a plurality of task processing devices 120. Figure 1 The illustrated task processing device 120 is one of a plurality of task processing devices.
[0078] The task collection platform 110 can obtain the tasks to be processed and assign the tasks to be processed to the task processing device 120. The task processing device 120 can process the tasks assigned by the task collection platform 110 and return the processing results to the task collection platform 110 to obtain the revenue corresponding to the tasks.
[0079] Of course, the task processing device 120 can complete a task alone, or it can work together with other task processing devices to complete a task. Usually, in order to improve the processing speed, the task collection platform usually assigns a task to multiple task processing devices, and the multiple task processing devices jointly complete the task. Finally, the task collection platform can determine the profit distribution according to the contribution of each task processing device to the task.
[0080] In some possible implementations, the task processing system 100 may be a digital authentication processing system, an encryption algorithm processing system, a cryptocurrency computing system, a computing power provision system, or a virtual currency mining system, etc.; the task collection platform 110 may be a proof-of-work computing power collection platform, a digital authentication platform, an encryption algorithm processing platform, a cryptocurrency computing platform, a computing power provision platform, or a virtual currency mining platform, etc.
[0081] When the task processing system 100 is a virtual currency mining system, the task processing device 120 may be a mining machine or server in the virtual currency processing system; when the task processing system 100 is an encryption algorithm processing system, the task processing device 120 may be an encryption computer or server in the encryption algorithm processing system.
[0082] The task collection platform 110 can utilize the processing capabilities of multiple task processing devices to complete data processing, so the task collection platform 110 can also be called a data processing platform. For example, the task collection platform 110 can be a server of any specification. The task processing device 120 can be any device with processing capabilities. For example, the task processing device 120 can be any device with a central processing unit (CPU) or a graphics processing unit (GPU). Optionally, the task collection platform 110 can also be called a proof of work (PoW) computing power collection platform, and the data processing device can also be called a supercomputing device, a proof of work supercomputing device, a proof of work cloud computing server or the aforementioned mining machine.
[0083] The task in the embodiment of the present application may be a proof-of-work calculation.
[0084] When the tasks generated by the task processing system 100 in period A need to be processed, the task collection platform 110 may send the tasks to be processed to the data processing device 120. The tasks to be processed may include transaction record information in period A and digital certificates before period A. The tasks to be processed may be used to solve a difficult mathematical problem that is difficult to calculate but the calculation results are easy to verify.
[0085] After the task processing device 120 obtains the task to be processed, it can calculate and generate a processing result based on the task to be processed assigned by the task collection platform 110. For example, the data processing device 120 can solve the mathematical problem based on the task to be processed to obtain the processing result (for example, a hash value). After the data processing device 120 obtains the processing result, it can broadcast the processing result to the task processing system 100. For example, the task processing device 120 can broadcast the processing result to other task processing devices in the task processing system 100 through the task collection platform 110, or it can broadcast the processing result to other task processing devices in the system 100 that switches tasks.
[0086] If the processing result is verified by a certain number of task processing devices in the task processing system 100, and the task processing device 120 is the first task processing device in the task processing system 100 to obtain the processing result, the task processing device 120 can obtain the recording right in the time period A, and record the information generated by the system 100 of the switching task in the time period A, obtain the digital certificate A, and connect the digital certificate A with the digital certificate before the time period A. Since the information generated by the task processing system 100 may be recorded by any task processing device in the task processing system 100, compared with the system of the switching task in which only one or a few devices record information, the task processing system 100 reduces the risk of information being tampered with.
[0087] In addition, the task processing device 120 may also feed back the obtained processing result to the task collection platform 110 so that the task collection platform 110 can evaluate the contribution of the task processing device 120 .
[0088] It should be understood that the task processing system 100 is only an example applicable to the present application, and the system applicable to the switching task of the present application is not limited thereto. For example, the task collection platform 110 can also be integrated as a software module on the task processing device without setting up a server in the system of the switching task; for another example, the task processing device 120 can directly obtain the task to be processed from the task processing system 100 without obtaining the task to be processed through the task collection platform 110. For another example, the task processing device 120 can also be a device formed by a combination of one device or multiple devices.
[0089] At present, the task types in a task collection platform are usually fixed, that is, the task collection platform can only assign fixed types of tasks. For example, if a task collection platform can only obtain tasks for one type of digital credential, then the task collection platform can only assign tasks for that digital credential; for another example, if a task collection platform can only obtain tasks for one type of algorithm, then the task collection platform can only assign tasks for that algorithm.
[0090] A link may be established between the task processing device and the task collection platform, and the task processing device may obtain tasks from the task collection platform through the link.
[0091] After a task processing device is linked to a task collection platform, it will specify the address of the task collection platform, obtain fixed-type tasks from the address, complete the tasks issued by the task collection platform and obtain benefits.
[0092] However, if there are other types of tasks with greater benefits, such as tasks for another type of digital certificate in the same task collection platform with greater benefits or tasks for another type of digital certificate in other task collection platforms with greater benefits, the task processing device cannot automatically switch to the new task in real time to obtain more benefits.
[0093] Since the user's task processing device cannot quickly switch to a task that generates more benefits, the user's task processing device cannot generate more benefits.
[0094] One solution is manual switching, where users can manually switch the task processing device to the same or other task collection platform to perform more profitable tasks. However, since different task interactions between the task processing device and the task collection platform are connected through different links, during the manual switching process, users need to restart the task processing device to switch from one link to another. Restarting the task processing device will result in a waste of computing power and there is also a problem of insufficient timeliness.
[0095] The embodiment of the present application provides a method for switching tasks, which can enable a task processing device to automatically switch to a task with higher benefits in real time.
[0096] The method for switching tasks in the embodiment of the present application can be applied to a system for switching tasks, and the system for switching tasks includes a task collection platform, a policy center, and a scheduling center.
[0097] The task collection platform in the present application is a special task collection platform that can integrate different types of tasks. For example, the task collection platform may include tasks for different digital credentials; for another example, the task collection platform may include tasks using different algorithms. In other words, the task collection platform in the embodiment of the present application may include tasks for different digital credentials and / or tasks using different algorithms.
[0098] The policy center can be linked to the dispatch center to obtain relevant information about the task processing equipment and the relevant information about the tasks to be processed from the dispatch center, so as to make corresponding policies. The dispatch center can be linked to the task collection platform, and according to the policy of the policy center, schedule and distribute tasks from the task collection platform. The task processing equipment can be linked to the dispatch center to receive tasks scheduled by the dispatch center.
[0099] like Figure 2 As shown, the method 200 includes steps S210-S220.
[0100] S210: The policy center determines a target task for the first task processing device, where the profit of the target task is higher than the profit of the first task currently executed by the first task processing device.
[0101] There may be a plurality of task processing devices connected to the task aggregation platform, and the first task processing device is one of the plurality of task processing devices.
[0102] The task currently executed by the first task processing device may indicate the task that the first task processing device is executing before the task switching.
[0103] S220: The policy center sends instruction information to the scheduling center, where the instruction information is used to instruct the scheduling center to schedule the target task from the task collection platform to the first task processing device, and the first task processing device is used to switch from the first task to the target task.
[0104] The policy center in the present application can select tasks to be processed, and select target tasks with higher benefits than the first task from the tasks to be processed, so that the first task processing device can automatically switch to the target task with higher benefits to obtain more benefits.
[0105] After determining the target task, the policy center schedules the target task for the first task processing device through the scheduling center. For example, after determining the target task, the policy center can send the target task to the scheduling center, and the scheduling center schedules the target task from the task collection platform; the scheduling center can send the scheduled target task to the first task processing device; after receiving the target task, the first task processing device can switch from the currently executed first task to the target task to execute the target task.
[0106] In order to improve the accuracy of the policy center calculation, the embodiment of the present application may include regularly optimizing the policy center and updating the algorithm of the policy center. If the task processing device is directly connected to the policy center, it is necessary to disconnect the link between the task processing device and the policy center during the optimization of the policy center. In other words, although the policy center can directly send the target task to the task processing device after determining the target task, the task processing device will be disconnected during the optimization of the policy center, thereby reducing the user's benefits and affecting the user experience.
[0107] Therefore, by setting up a dispatch center and connecting the dispatch center to the task processing device, it is possible to ensure that the task processing device and the dispatch center are always connected. For example, in the process of optimizing the strategy center, the link between the dispatch center and the task processing device will not be disconnected, which will not cause the problem of reduced revenue, and this can improve the user experience.
[0108] In addition, since there is no need to disconnect the link between the first task processing device and the scheduling center during the task switching process, there is no need to restart the task processing device, which will not cause a waste of computing power.
[0109] The embodiment of the present application does not specifically limit the manner in which the policy center determines the target task for the first task processing device.
[0110] For example, the policy center may first determine a set of tasks whose benefits are greater than the first task, and then determine the target task from the set of tasks.
[0111] As an implementation method, the policy center can determine a task set based on a first parameter of a first task processing device, wherein the first parameter may include at least one of the following: supported algorithms, computing power, tasks that can be executed by the supported algorithms, price information of supported digital certificates, difficulty information for completing tasks, and power consumption.
[0112] Optionally, the first parameter may be obtained by the policy center from the scheduling center. For example, the policy center may receive parameter information for the first task processing device sent by the scheduling center, and the parameter information may include at least one of the following parameters: supported algorithms, computing power, tasks that the supported algorithms can perform, difficulty information for completing tasks, and power consumption.
[0113] The policy center may obtain the power consumption information from the first task processing device, or the first task processing device may send the power consumption information to the scheduling center, which then forwards the information to the policy center.
[0114] The strategy center can obtain real-time price information of digital certificates from market transaction records.
[0115] Since different tasks may require different algorithms, the policy center may determine the tasks that the first task processing device can perform based on the algorithms that the first task processing device can support; the policy center may select the target task from the tasks that the first task processing device can perform.
[0116] The revenue in the embodiment of the present application may be calculated per unit time. For example, the target task may refer to a task having a higher revenue than the first task per unit time.
[0117] For example, the policy center can determine the benefits that the first task processing device can obtain when executing multiple tasks per unit time based on the first parameter; further, the policy center can determine a set of tasks whose benefits among the multiple tasks per unit time are higher than the first task as a task set.
[0118] It is understandable that the multiple tasks here can be tasks that can be executed by the first task processing device. In this case, the policy center can first determine the tasks that can be executed by the first task processing device, and then determine the target task from the executable tasks. Of course, the policy center can also first determine tasks with higher benefits than the first task, and then select tasks that can be executed by the first task processing device from these tasks. This application does not make specific limitations on this.
[0119] The tasks that the first task processing device can perform can be determined according to the algorithms it supports, and / or the tasks that the first task processing device can perform can be determined according to the digital certificates it can support. Of course, the tasks that the first task processing device can perform can also be known.
[0120] The policy center determines the profits that can be obtained by the first task processing device when executing multiple tasks in unit time, which may include: the policy center determines the profits that can be obtained by the first task processing device when executing multiple tasks in unit time based on the difficulty information of completing the multiple tasks, the computing power of the first task processing device when executing the multiple tasks respectively, the power consumption of the first task processing device when executing the multiple tasks respectively, and the price information of the digital certificates corresponding to the multiple tasks in unit time.
[0121] Assuming that multiple tasks include Task A, the policy center can determine the difficulty information of Task A based on the total computing power of other task processing devices currently executing Task A. The greater the total computing power of other task processing devices, the greater the difficulty; the smaller the total computing power of other task processing devices, the smaller the difficulty.
[0122] If the total computing power of other task processing devices currently executing task A is 100P, the difficulty faced by the first task processing device in completing task A can be expressed as 100P.
[0123] The computing power of the first task processing device when executing different tasks may be different. For example, the computing power of the first task processing device when executing task A is 20T, but the computing power of the first task processing device when executing task B is 18T.
[0124] Generally, the computing power of a task processing device is mainly related to the algorithm it runs, and the computing power of a task processing device when running different algorithms is usually different. If a first task processing device supports a first algorithm and a second algorithm, the computing power of the first task processing device when running the first algorithm and the second algorithm is usually different. If the first algorithm is used to execute task A and the second algorithm is used to execute task B, the computing power of executing task A and executing task B will be different.
[0125] The other task processing devices may refer to all processing devices that process the task except the first task processing device.
[0126] The policy center can determine the profit that the first task processing device can obtain when executing task A per unit time based on the difficulty information of completing task A, the computing power of the first task processing device executing task A, the power consumption of the first task processing device, and the price information of the digital certificate corresponding to task A per unit time.
[0127] As an implementation method, the profit that the first task processing device can obtain by executing task A in unit time can be expressed as: Y = (price information of digital certificate * device computing power) / (difficulty * device power consumption).
[0128] By integrating factors such as difficulty information, price information, power consumption of processing equipment, computing power of processing equipment, etc., the final target task can be made more reasonable. For example, if the price of some tasks is relatively high, but the difficulty of completing the task is also relatively high, the embodiment of the present application may not select the task as the target task. The embodiment of the present application gives priority to selecting tasks that are not difficult to complete, but the corresponding digital voucher price is still relatively high as the target task.
[0129] The price information of the digital certificate corresponding to task A within a unit of time can be determined based on the market transaction price.
[0130] The power consumption of the first task processing device may be different when executing different tasks, and the power consumption here can be understood as the power consumption of the first processing device during the task execution, because the main cost of executing the task is the power cost of the first processing device.
[0131] Usually, the main factor affecting power consumption is the algorithm run by the first task processing device. The power consumption of the first task processing device when running different algorithms is usually different. If the first algorithm is used to execute task A and the second algorithm is used to execute task B, the power consumption of executing task A and executing task B will be different.
[0132] In addition, as another implementation method, the embodiment of the present application can also consider the working efficiency of the first task processing device. When executing different tasks, the working efficiency of the first task processing device may be different. Therefore, the income that the first task processing device can obtain by executing task A per unit time can also be expressed as: Y = (device working efficiency * price information of digital voucher * device computing power) / (difficulty * device power consumption).
[0133] It should be noted that the calculation of the above two benefits Y includes the main influencing factors, that is, Y is proportional to the working efficiency of the device, the price information of the digital certificate, and the computing power of the device, and is inversely proportional to the difficulty of the task and the power consumption of the device. In practice, there may be some other influencing factors, such as the network stability of different tasks. At this time, this application can add some coefficients to the above formula for calculation, which also belongs to the disclosure content of this application.
[0134] According to the above formula, the policy center can calculate the benefits that can be obtained by the first task processing device in a unit time when executing different tasks, and then the task with a higher benefit than the first task can be used as the target task.
[0135] The embodiment of the present application does not specifically limit the process of determining the target task. For example, the policy center may first determine a set of tasks whose benefits are greater than the first task, and then determine the target task from the set of tasks. For another example, the policy center may judge the benefits of multiple target tasks respectively, and use the first task whose benefit is greater than the first task as the target task.
[0136] The embodiment of the present application does not specifically limit the income of the target task, as long as the income of the target task is higher than the income of the first task.
[0137] For example, when the policy center determines the target task from the task set, if there are multiple tasks in the task set, the policy center can randomly select a task from the task set as the target task; or the policy center can also select the task with the highest benefit from the task set as the target task, that is, the target task is the task with the highest benefit in the task set. Taking the task with the highest benefit as the target task can maximize the user's benefit, so this application gives priority to executing the task with the highest benefit.
[0138] The task with the highest profit in the embodiment of the present application may represent the task with the highest profit that can be executed by the task processing device.
[0139] The embodiment of the present application does not specifically limit the target task and the first task. For example, the algorithms used to execute the target task and the first task are different; and / or the digital certificates corresponding to the target task and the first task may be different.
[0140] Of course, the algorithms used to execute the target task and the first task may also be the same; and / or, the digital certificates corresponding to the target task and the first task may be the same.
[0141] The target task and the first task may come from the same task collection platform, and the scheduling center may schedule different tasks for the first task processing device from the same task collection platform.
[0142] Since the scheduling center and the task collection platform in the embodiment of the present application are independent of each other, the scheduling center can also schedule tasks for the first task processing device from different task collection platforms, that is, the target task and the first task can come from different task collection platforms.
[0143] In the process of determining the target task, the policy center can first determine whether the benefit of the target task is higher than the benefit of the first task; only when the benefit of the target task is higher than the benefit of the first task, the policy center instructs the scheduling center to schedule the target task.
[0144] If the tasks to be processed include multiple tasks, the policy center can determine the target task by judging whether the benefits of each task are higher than the benefits of the first task. If the benefits of all the tasks to be processed that the first task processing device can execute are lower than the benefits of the first task, the policy center may not instruct the scheduling center to schedule the task, and the first task processing device may continue to execute the first task.
[0145] In the process of determining the target task, the policy center may determine the target task for the first task processing device once at a preset time interval.
[0146] Since the tasks to be processed are constantly changing, the benefits of the current tasks to be processed are lower than the benefits of the first task. After a period of time, there may appear a task to be processed with a higher benefit than the first task. Alternatively, after a period of time, another task with a higher benefit may appear after a period of time after the currently determined task with the highest benefit. Based on this, the embodiment of the present application can re-determine the target task at regular intervals, so that the task processing device can execute the task with the greatest benefit in real time, thereby maximizing the user's benefit.
[0147] The preset time can be set according to actual needs. The shorter the preset time, the more it can ensure that the task processing device switches to the target task in time, and since there is basically no waste of power consumption and computing power during task switching, the preset time is minimized based on the speed of collecting relevant information that affects the benefits.
[0148] The task processing device in the embodiment of the present application may support only one algorithm or multiple algorithms, and the present application does not make any specific limitation on this.
[0149] The target tasks determined by the policy center may be different for different task processing devices. Since different task processing devices may support different algorithms, computing power, and / or power consumption parameters, the target tasks for different task processing devices may also be different. For example, the target task calculated by the policy center for the first task processing device is task A, but the target task calculated for the second task processing device is task B.
[0150] The digital certificate in the embodiment of the present application can be understood as digital currency, virtual currency, virtual digital goods, etc.
[0151] In some embodiments of the present application, the task processing device may include a computer, a graphics card, a server, or a mining machine having at least one processing chip. For example, the processing chip includes a graphics card, a central processing unit (CPU), and an application specific integrated circuit (ASIC) chip.
[0152] In addition, the strategy center in this application can also integrate the price monitoring calculations of multiple exchanges to avoid errors in the application programming interface (API) of a single exchange that may lead to erroneous strategies.
[0153] Optionally, the policy center and the scheduling center in the embodiment of the present application may communicate through an API request, and the API request may be made based on a hypertext transfer protocol (HTTP) or a transmission control protocol (TCP).
[0154] In addition, if Figure 3 As shown, the embodiment of the present application also provides another method for switching tasks. The method 300 includes steps S310 to S320.
[0155] S310: The dispatch center receives indication information, where the indication information is used to indicate a target task.
[0156] S320, the dispatch center dispatches the target task from the task collection platform to the first task processing device according to the instruction information, and the first task processing device is used to switch from the currently executed first task to the target task. The benefit of the target task is higher than the benefit of the first task. In other words, the dispatch center can dispatch the target task from the task collection platform to the first task processing device, and send the target task to the first task processing device, so that the first task processing device switches from the first task to the target task.
[0157] Optionally, the first task processing device supports multiple algorithms; the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0158] Optionally, the target task is the task with the highest profit that can be currently executed by the first task processing device.
[0159] Optionally, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0160] Optionally, the target task and the first task are from the same task collection platform.
[0161] Optionally, the task collection platform includes tasks for different digital credentials.
[0162] Optionally, the method also includes: the scheduling center sends parameter information for the first task processing device to the policy center, and the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, and difficulty information for completing tasks.
[0163] Optionally, the task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0164] The method 300 and Figure 2 The method 200 described is similar, and the corresponding features can be found in Figure 2 The description is not repeated here.
[0165] Optionally, Figure 3 The method shown can be applied to a system for switching tasks, which includes a task collection platform, a policy center, and a scheduling center.
[0166] like Figure 4As shown, the embodiment of the present application also provides another method for switching tasks. The method 400 includes steps S410 to S420.
[0167] S410: A first task processing device receives a target task scheduled by a scheduling center.
[0168] S420: The first task processing device switches from the currently executed first task to the target task, wherein the profit of the target task is higher than the profit of the first task.
[0169] The first task processing device can switch immediately after receiving the target task, so that the first task processing device can execute the task with more benefits as soon as possible to obtain more benefits. In some cases, the first task processing device can complete the first task first after receiving the target task, and then switch. In other words, the first task processing device can continue to execute the first task, and switch to the target task after the first task is processed.
[0170] Optionally, the target task is the task with the highest benefit in a set of tasks whose benefits are greater than those of the first task.
[0171] Optionally, the first task processing device supports multiple algorithms; the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0172] Optionally, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0173] Optionally, the target task and the first task are from the same task collection platform.
[0174] Optionally, the task collection platform includes tasks for different digital credentials.
[0175] The method 400 and Figure 2 The method 200 described is similar, and the corresponding features can be found in Figure 2 The description is not repeated here.
[0176] Optionally, Figure 4 The method shown can be applied to a system for switching tasks, which includes a task collection platform, a policy center, and a scheduling center.
[0177] The above describes in detail an example of the method for switching tasks provided by the present application. It is understandable that in order to implement the above functions, the policy center and the scheduling center may include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0178] For example, the policy center can be divided into functional units according to the above method example. For example, each function can be divided into each functional unit, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in this application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0179] The embodiment of the present application further provides a device 500 for switching tasks, which may include a processing unit 510 and a communication unit 520 .
[0180] The processing unit 510 is configured to determine a target task for a first task processing device, wherein a benefit of the target task is higher than a benefit of a first task currently being executed by the first task processing device.
[0181] The communication unit 520 is used to send instruction information to the dispatch center, wherein the instruction information is used to instruct the dispatch center to dispatch the target task from the task collection platform to the first task processing device, and the first task processing device is used to switch from the first task to the target task.
[0182] Optionally, the processing unit 510 is specifically configured to: determine a set of tasks whose benefits are greater than those of the first task; and determine the target task from the set of tasks.
[0183] Optionally, the target task is the task with the greatest benefit in the task set.
[0184] Optionally, the processing unit 510 is specifically used to: determine the target task for the first task processing device according to a first parameter of the first task processing device, the first parameter including at least one of the following: supported algorithms, computing power, tasks that can be executed by supported algorithms, price information of supported digital certificates, difficulty information of completing the task, and power consumption.
[0185] Optionally, the processing unit 510 is specifically used to: determine, based on the first parameter, the benefits that can be obtained by the first task processing device when executing multiple tasks per unit time; and determine the task whose benefit among the multiple tasks per unit time is higher than that of the first task as the target task.
[0186] Optionally, the processing unit 510 is specifically used to determine the benefits that the first task processing device can obtain when executing the multiple tasks per unit time based on difficulty information of completing the multiple tasks, computing power of the first task processing device when executing the multiple tasks respectively, power consumption of the first task processing device when executing the multiple tasks respectively, and price information of digital certificates corresponding to the multiple tasks per unit time.
[0187] Optionally, the first task processing device supports multiple algorithms; the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0188] Optionally, the communication unit 520 is also used to receive parameter information for the first task processing device sent by the scheduling center, and the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, and difficulty information for completing tasks.
[0189] Optionally, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0190] Optionally, the target task and the first task are from the same task collection platform.
[0191] Optionally, the task collection platform includes tasks for different digital credentials.
[0192] Optionally, the processing unit 510 is further configured to enable the policy center to determine the target task for the first task processing device at every preset time interval.
[0193] Optionally, the task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0194] Figure 5 The device for switching tasks shown may be the policy center described above, and the device for switching tasks may be used to execute the method performed by the policy center described above.
[0195] Figure 66 is a schematic block diagram of a device for switching tasks provided in an embodiment of the present application. The device 600 may include a communication unit 610 and a processing unit 620.
[0196] The communication unit 610 is used to receive indication information, where the indication information is used to indicate a target task.
[0197] The processing unit 620 is used to schedule the target task from the task collection platform to the first task processing device according to the indication information, and the first task processing device is used to switch from the currently executed first task to the target task, wherein the benefit of the target task is higher than the benefit of the first task.
[0198] Optionally, the target task is the task with the highest benefit in a set of tasks whose benefits are greater than those of the first task.
[0199] Optionally, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0200] Optionally, the target task and the first task are from the same task collection platform.
[0201] Optionally, the task collection platform includes tasks for different digital credentials.
[0202] Optionally, the communication unit 610 is also used to: send parameter information for the first task processing device to the policy center, the parameter information including at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, and difficulty information for completing tasks.
[0203] Optionally, the task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0204] Figure 6 The device for switching tasks shown may be the dispatch center described above, and the device 600 for switching tasks may be used to execute the method performed by the dispatch center described above.
[0205] Figure 7 700 is a schematic block diagram of a task processing device provided in an embodiment of the present application. The task processing device 700 may include a communication unit 710 and a processing unit 720 .
[0206] The communication unit 710 is used to receive the target task scheduled by the dispatch center.
[0207] The processing unit 720 is configured to switch from a currently executed first task to the target task, wherein the benefit of the target task is higher than the benefit of the first task.
[0208] Optionally, the target task is the task with the highest benefit in a set of tasks whose benefits are greater than those of the first task.
[0209] Optionally, the first task processing device supports multiple algorithms; the computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
[0210] Optionally, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0211] Optionally, the target task and the first task are from the same task collection platform.
[0212] Optionally, the task collection platform includes tasks for different digital credentials.
[0213] Optionally, the task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
[0214] Figure 7 The task processing device shown may be the first task processing device described above. The task processing device 700 may be used to execute the method performed by the first task processing device described above.
[0215] Figure 8a and Figure 8b 800 is a schematic diagram of a system for switching tasks in an embodiment of the present application. The task switching system 800 may include a task collection platform 810, a policy center 820, and a scheduling center 830. The functions of the policy center 820 and the scheduling center 830 are consistent with those of the policy center and the scheduling center in the method embodiment. The description of the corresponding features in the device embodiment can be found in the method embodiment, and will not be repeated here.
[0216] Figure 8a The task collection platform 810 and the scheduling center 830 shown are independent of each other, and the scheduling center 830 can schedule tasks in different task collection platforms. For example, the scheduling center 830 can schedule tasks in the task collection platform 810, and can also schedule tasks in other task collection platforms.
[0217] Figure 8b The scheduling center 830 shown may be integrated in the task collection platform 810 , and the scheduling center 830 may schedule the tasks in the task collection platform 810 .
[0218] Optionally, the policy center may be the apparatus 500 for switching tasks described above, the scheduling center may be the apparatus 600 for switching tasks described above, and the first task processing device may be the task processing device 700 described above.
[0219] The policy center 820 may be used to determine a target task for the first task processing device 840 , where the profit of the target task is higher than the profit of the first task currently being executed by the first task processing device 840 .
[0220] The scheduling center 830 may be used to schedule the target task from the task collection platform 810 .
[0221] The scheduling center 830 is further configured to send the target task to the first task processing device 840 , so that the first task processing device 840 switches from the first task to the target task.
[0222] The functions of the above-mentioned policy center 820 and scheduling center 830 can be implemented through the functional modules included therein.
[0223] For example, the policy center 820 in the embodiment of the present application may include a processing unit, which may be used to determine a target task for the first task processing device 840 .
[0224] For another example, the dispatch center 830 in the embodiment of the present application may include a processing unit and a communication unit. The processing unit may be used to schedule the target task, and the communication unit may be used to send the target task to the task processing device.
[0225] Optionally, the policy center and the scheduling center in the embodiment of the present application may be implemented by software, or by hardware or a combination of software and hardware.
[0226] It should be noted that the above processing unit or communication unit can be a software module, for example, a module composed of kernel code; it can also be a hardware module, for example, a logic circuit; it can also be a module combining software and hardware. This application does not limit the specific form of the processing unit and the communication unit.
[0227] When the processing unit or the communication unit is a software module, it can be compiled into a system driver, integrated into the operating system (OS), and run when the OS is started. The processing unit or the communication unit can be compatible with different hardware. The above hardware includes but is not limited to CPU, GPU and field programmable gate array (FPGA).
[0228] Optionally, the policy center 820 is specifically used to determine the target task for the first task processing device 840 based on a first parameter of the first task processing device 840, wherein the first parameter includes at least one of the following: supported algorithms, computing power, tasks that can be executed by supported algorithms, price information of supported digital certificates, difficulty information of completing the task, and power consumption.
[0229] Optionally, the policy center 820 is specifically used to: determine, based on the first parameter, the benefits that can be obtained by the first task processing device 840 when executing multiple tasks within a unit time; and determine the task whose benefit among the multiple tasks within a unit time is higher than the benefit of the first task as the target task.
[0230] Optionally, the policy center 820 is specifically used to determine the benefits that the first task processing device 840 can obtain when executing the multiple tasks per unit time based on the difficulty information of completing the multiple tasks, the computing power of the first task processing device 840 when executing the multiple tasks respectively, the power consumption of the first task processing device 840 when executing the multiple tasks respectively, and the price information of the digital certificates corresponding to the multiple tasks per unit time.
[0231] Optionally, the first task processing device 840 supports multiple algorithms, and the computing power of the first task processing device 840 when running different algorithms is different, and / or the power consumption of the first task processing device 840 when running the different algorithms is different.
[0232] Optionally, the target task is the task with the highest profit that the first task processing device 840 can currently execute.
[0233] Optionally, different algorithms are used to execute the target task and the first task, and / or different digital certificates correspond to the target task and the first task.
[0234] Optionally, the target task and the first task are from the same task collection platform.
[0235] Optionally, the task collection platform includes tasks for different digital credentials.
[0236] Optionally, the policy center 820 is further configured to: determine whether the benefit of the target task is higher than the benefit of the first task; and instruct the scheduling center to schedule the target task if the benefit of the target task is higher than the benefit of the first task.
[0237] Optionally, the policy center 820 is specifically configured to determine the target task for the first task processing device 840 at every preset time interval.
[0238] The system 800 for switching tasks in the embodiment of the present application may include a task processing device, or may not include a task processing device, and this is not specifically limited.
[0239] Regardless of which aspect, such as method aspect, device aspect, etc., the task processing described in the present application may include at least one of setting, calculating, judging, transmitting, storing, managing, etc. based on data or on data.
[0240] As an embodiment, the data processing may be data processing related to a digital certificate performed by a data processing device. The digital certificate may be obtained through the data processing. The data processing device may be a digital certificate processing device.
[0241] When the digital certificate is related to digital currency or is embodied as digital currency, the digital certificate processing device can be a digital currency mining machine.
[0242] Fig. 9 is a schematic block diagram of an apparatus 900 for switching tasks according to an embodiment of the present application. In which, a dotted line may be used to indicate that the unit (or module) is an optional unit (or module).
[0243] Optionally, the task switching device 900 may be the policy center described above, or the scheduling center described above, or the task processing device described above.
[0244] like Fig. 9 As shown, the switching task device 900 can be used to implement the method described in the above method embodiment. The switching task device 900 can be a terminal device, a server, or a chip.
[0245] The device 900 for switching tasks may include one or more processors 901, and the one or more processors 901 are used to execute the method described above. The processor 901 may be a general-purpose processor or a special-purpose processor. For example, the processor 901 may be a CPU. The CPU may be used to control the device 900 for switching tasks to execute a software program and then process the data of the software program.
[0246] The task switching device 900 may also include a transceiver to implement signal input (reception) and output (transmission).
[0247] For example, the switching task device 900 may be a chip, the transceiver 905 may be the input and / or output circuit of the chip, or the transceiver 905 may be the communication interface of the chip, and the chip may be a component of a terminal device, a server or other electronic device.
[0248] For another example, the apparatus 900 for switching tasks may be a terminal device or a server, the transceiver 905 may be a transceiver of the terminal device or the server, or the transceiver 905 may be a transceiver circuit of the terminal device or the server.
[0249] The device 900 for switching tasks may include one or more memories 902, on which programs are stored, and the program 904 can be executed by the processor 901 to generate instructions 903, so that the processor 901 performs the method described in the above method embodiment according to the instructions 903. Optionally, data may also be stored in the memory 902. Optionally, the processor 901 may also read the data stored in the memory 902, and the data may be the above correspondence.
[0250] The processor 901 and the memory 902 may be provided separately or integrated together, for example, integrated on a single board of a server or a system on chip (SOC) of a terminal device.
[0251] In a possible implementation, the switching task apparatus 900 may further include an antenna 906. The transceiver 905 is configured to implement the transceiver function of the switching task apparatus 900 through the antenna 906.
[0252] The specific manner in which the processor 901 executes the method for processing the proof-of-work computing task can be found in the relevant description in the method embodiment.
[0253] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or a software-based instruction in the processor 901. The processor 901 can be a CPU, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.
[0254] In addition, the present application also provides a computer program product, which implements the method of any method embodiment of the present application when executed by the processor 901. Optionally, the computer program product can be stored in the memory 902, for example, a program 904, which is finally converted into an executable target file that can be executed by the processor 901 after preprocessing, compilation, assembly, and linking.
[0255] In addition, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method of any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.
[0256] As an example and not by way of limitation, the computer-readable storage medium is, for example, a memory 902. The memory 902 may be a volatile memory or a non-volatile memory, or the memory 902 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct Rambus RAM (DR RAM).
[0257] It should be noted that those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.
[0258] In several embodiments provided in the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not performed. The device embodiments described above are merely schematic, and the division of units is only a logical function division. There may be other division methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.
[0259] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0260] In addition, the terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0261] In short, the above is only a preferred embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application should be included in the protection scope of this application.
Claims
1. A method for switching tasks, characterized in that: include: The policy center determines a target task for the first task processing device, the income of the target task is higher than the income of the first task currently executed by the first task processing device, and the income of the task is determined according to the difficulty information of completing the task, the computing power of the first task processing device executing the task, the power consumption of the first task processing device, and the price information of the digital voucher corresponding to the task per unit time; The policy center sends instruction information to the scheduling center, where the instruction information is used to instruct the scheduling center to schedule the target task from the task collection platform to the first task processing device, and the first task processing device is used to switch from the first task to the target task.
2. The method according to claim 1, characterized in that The policy center determines a target task for the first task processing device, including: The strategy center determines a set of tasks with a greater benefit than the first task; The policy center determines the target task from the task set.
3. The method according to claim 2, characterized in that The target task is the task with the greatest benefit in the task set.
4. The method according to claim 2, characterized in that: The strategy center determines a task set whose benefits are greater than the first task, including: The policy center determines the task set based on a first parameter of the first task processing device, where the first parameter includes at least one of the following: supported algorithms, computing power, tasks that can be executed by supported algorithms, price information of supported digital certificates, difficulty information for completing tasks, and power consumption.
5. The method according to claim 4, characterized in that The policy center determines the task set according to the first parameter of the first task processing device, including: The policy center determines, based on the first parameter, the benefits that can be obtained by the first task processing device when executing a plurality of tasks in a unit time; The strategy center determines a set of tasks whose benefits are higher than the first task among the multiple tasks in unit time as the task set.
6. The method according to claim 5, characterized in that The policy center determines, based on the first parameter, the benefits that can be obtained by the first task processing device when executing a plurality of tasks in a unit time, including: The policy center determines the benefits that the first task processing device can obtain when executing the multiple tasks per unit time based on the difficulty information of completing the multiple tasks, the computing power of the first task processing device when executing the multiple tasks respectively, the power consumption of the first task processing device when executing the multiple tasks respectively, and the price information of the digital certificates corresponding to the multiple tasks per unit time.
7. The method according to claim 6, characterized in that The first task processing device supports multiple algorithms; The computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
8. The method according to claim 4, characterized in that The method further comprises: The policy center receives parameter information for the first task processing device sent by the scheduling center, and the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, difficulty information for completing tasks, and power consumption.
9. The method according to any one of claims 1 to 8, characterized in that The algorithms used to perform the target task and the first task are different, and / or, The digital certificates corresponding to the target task and the first task are different.
10. The method according to any one of claims 1 to 8, characterized in that The target task and the first task are from the same task collection platform.
11. The method according to any one of claims 1 to 8, characterized in that The task collection platform includes tasks for different digital credentials.
12. The method according to any one of claims 1 to 8, characterized in that The policy center determines a target task for the first task processing device, including: At each preset time interval, the policy center determines the target task for the first task processing device.
13. The method according to any one of claims 1 to 8, characterized in that The task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
14. A method for switching tasks, characterized in that: include: The dispatch center receives the instruction information, where the instruction information is used to indicate the target task; The dispatch center dispatches the target task from the task collection platform to the first task processing device according to the indication information, and the first task processing device is used to switch from the currently executed first task to the target task, wherein the benefit of the target task is higher than the benefit of the first task, and the benefit of the task is determined based on the difficulty information of completing the task, the computing power of the first task processing device to execute the task, the power consumption of the first task processing device, and the price information of the digital certificate corresponding to the task per unit time.
15. The method according to claim 14, characterized in that The target task is the task with the highest benefit in the task set whose benefit is greater than that of the first task.
16. The method according to claim 14 or 15, characterized in that The algorithms used to perform the target task and the first task are different, and / or, The digital certificates corresponding to the target task and the first task are different.
17. The method according to claim 14 or 15, characterized in that The target task and the first task are from the same task collection platform.
18. The method according to claim 14 or 15, characterized in that The task collection platform includes tasks for different digital credentials.
19. The method according to claim 14 or 15, characterized in that The method further comprises: The dispatch center sends parameter information for the first task processing device to the policy center, where the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, difficulty information for completing tasks, and power consumption.
20. The method according to claim 14 or 15, characterized in that The task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
21. A device for switching tasks, characterized in that: include: a processing unit, configured to determine a target task for a first task processing device, wherein the income of the target task is higher than the income of a first task currently being executed by the first task processing device, and the income of the task is determined according to information on the difficulty of completing the task, computing power of the first task processing device for executing the task, power consumption of the first task processing device, and price information of a digital voucher corresponding to the task per unit time; A communication unit is used to send instruction information to the dispatch center, wherein the instruction information is used to instruct the dispatch center to dispatch the target task from the task collection platform to the first task processing device, and the first task processing device is used to switch from the first task to the target task.
22. The device according to claim 21, characterized in that The processing unit is specifically used for: Determine a set of tasks whose benefits are greater than the first task; The target task is determined from the task set.
23. The device according to claim 22, characterized in that The target task is the task with the greatest benefit in the task set.
24. The device according to claim 22, characterized in that The processing unit is specifically used for: The task set is determined according to a first parameter of the first task processing device, where the first parameter includes at least one of the following: supported algorithms, computing power, tasks that can be executed by supported algorithms, price information of supported digital certificates, difficulty information for completing tasks, and power consumption.
25. The device according to claim 24, characterized in that The processing unit is specifically used for: Determine, based on the first parameter, the benefits that can be obtained by the first task processing device when executing a plurality of tasks in a unit time; A set of tasks whose benefits are higher than those of the first task among the multiple tasks within a unit time is determined as the task set.
26. The device according to claim 25, characterized in that The processing unit is specifically used for: Determine the benefits that the first task processing device can obtain when executing the multiple tasks per unit time based on the difficulty information of completing the multiple tasks, the computing power of the first task processing device when executing the multiple tasks respectively, the power consumption of the first task processing device when executing the multiple tasks respectively, and the price information of the digital certificates corresponding to the multiple tasks per unit time.
27. The device according to claim 26, characterized in that The first task processing device supports multiple algorithms; The computing power of the first task processing device when running different algorithms is different, and / or the power consumption of the first task processing device when running different algorithms is different.
28. The device according to claim 24, characterized in that The communication unit is also used for: Receive parameter information for the first task processing device sent by the dispatch center, where the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be executed by the supported algorithms, difficulty information for completing tasks, and power consumption.
29. The device according to any one of claims 21 to 28, characterized in that The algorithms used to perform the target task and the first task are different, and / or, The digital certificates corresponding to the target task and the first task are different.
30. The device according to any one of claims 21 to 28, characterized in that The target task and the first task are from the same task collection platform.
31. The device according to any one of claims 21 to 28, characterized in that The task collection platform includes tasks for different digital credentials.
32. The device according to any one of claims 21 to 28, characterized in that The processing unit is also used for: The target task for the first task processing device is determined at every preset time interval.
33. The device according to any one of claims 21 to 28, characterized in that The task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
34. A device for switching tasks, characterized in that: include: A communication unit, used for receiving instruction information, where the instruction information is used for indicating a target task; A processing unit is used to schedule the target task from a task collection platform to a first task processing device according to the indication information, and the first task processing device is used to switch from a currently executed first task to the target task, wherein the benefit of the target task is higher than the benefit of the first task, and the benefit of the task is determined based on the difficulty information of completing the task, the computing power of the first task processing device executing the task, the power consumption of the first task processing device, and the price information of the digital certificate corresponding to the task per unit time.
35. The device according to claim 34, characterized in that The target task is the task with the highest benefit in the task set whose benefit is greater than that of the first task.
36. The device according to claim 34 or 35, characterized in that The algorithms used to perform the target task and the first task are different, and / or, The digital certificates corresponding to the target task and the first task are different.
37. The device according to claim 34 or 35, characterized in that The target task and the first task are from the same task collection platform.
38. The device according to claim 34 or 35, characterized in that The task collection platform includes tasks for different digital credentials.
39. The device according to claim 34 or 35, characterized in that The communication unit is also used for: Parameter information for the first task processing device is sent to the policy center, where the parameter information includes at least one of the following parameters: supported algorithms, computing power, tasks that can be performed by the supported algorithms, difficulty information for completing tasks, and power consumption.
40. The device according to claim 34 or 35, characterized in that The task collection platform is a proof-of-work computing power collection platform, the target task is proof-of-work calculation, and the first task processing device is a proof-of-work supercomputing device.
41. A system for switching tasks, characterized in that: include: A task collection platform, a dispatch center, and a device for switching tasks as described in any one of claims 21-33; The dispatch center is used to dispatch target tasks from the task collection platform; The scheduling center is also used to send the target task to the first task processing device, so that the first task processing device switches from the currently executed first task to the target task, the benefit of the target task is higher than the benefit of the first task, and the benefit of the task is determined based on the difficulty information of completing the task, the computing power of the first task processing device to perform the task, the power consumption of the first task processing device and the price information of the digital certificate corresponding to the task per unit time.
