CN109960575B - Computing capacity sharing method, system and related equipment - Google Patents

Computing capacity sharing method, system and related equipment Download PDF

Info

Publication number
CN109960575B
CN109960575B CN201910233203.8A CN201910233203A CN109960575B CN 109960575 B CN109960575 B CN 109960575B CN 201910233203 A CN201910233203 A CN 201910233203A CN 109960575 B CN109960575 B CN 109960575B
Authority
CN
China
Prior art keywords
node
check
node equipment
calculation
node device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910233203.8A
Other languages
Chinese (zh)
Other versions
CN109960575A (en
Inventor
罗来堂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910233203.8A priority Critical patent/CN109960575B/en
Publication of CN109960575A publication Critical patent/CN109960575A/en
Application granted granted Critical
Publication of CN109960575B publication Critical patent/CN109960575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

The embodiment of the invention provides a method, a system and related equipment for sharing computing capacity, which are used for improving the efficiency and accuracy of shared computing. The method comprises the following steps: determining node equipment groups corresponding to N subtasks of a computing task respectively, wherein each node equipment group comprises at least M node equipment meeting preset conditions; determining optimal node equipment in each node equipment group, calling the optimal node equipment in each node equipment group to complete corresponding subtasks, and generating a subtask result; taking at least (M-1) node devices except the optimal node device in each node device group as check node devices, calling the check node devices in each node device group to check the subtask results, and judging that the corresponding subtask results pass the check if the check node devices with the number ratio more than a preset ratio pass the check; and generating a complete calculation task result according to all the N subtask results passing the verification.

Description

Computing capacity sharing method, system and related equipment
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a computing capability sharing method, system, and related devices.
Background
Because the computing power of a single device is determined according to its own hardware resources, the current single device has relatively limited hardware resources, and for the huge computing task in the current big data scene, the computing power provided by the single device is relatively limited, so that it is difficult to normally execute the computing task.
In order to ensure normal execution of a computing task, a currently adopted mode is to share computing capacity through a plurality of devices, split a complete computing task into a plurality of subtasks, respectively allocate the subtasks to be respectively processed in one node device, and finally combine the subtask results obtained by processing the node devices into a complete computing task result.
In the existing scheme, a plurality of subtasks are distributed to a single independent node device for processing respectively, the completion of the calculation tasks can be given after the completion of a plurality of nodes, the server can hardly ensure that the calculation power values of the plurality of nodes are identical, the time consumption of each calculation task is completely determined by the worst node device, if the node device with poor state appears, the calculation efficiency is low, and secondly, the accuracy of calculation is hardly ensured when the subtasks are processed by the single independent node device. In view of this, it is necessary to further improve the calculation efficiency and accuracy.
Disclosure of Invention
The invention mainly aims to provide a computing capacity sharing method, a computing capacity sharing system and related equipment, which are used for improving the efficiency and the accuracy of sharing computing.
To achieve the above object, a first aspect of the present invention provides a computing power sharing method, which may include:
determining node equipment groups corresponding to N subtasks of a computing task respectively, wherein each node equipment group comprises at least M node equipment meeting preset conditions, N is a positive integer greater than 0, and M is a positive integer greater than 1;
determining optimal node equipment in each node equipment group, calling the optimal node equipment in each node equipment group to complete corresponding subtasks, and generating a subtask result;
taking at least M-1 node devices except the optimal node device in each node device group as check node devices, calling the check node devices in each node device group to check the subtask results, and judging that the corresponding subtask results pass the check if the check node devices with the number ratio more than a preset ratio pass the check;
and generating a complete calculation task result according to all the N subtask results passing the verification.
Optionally, as a possible implementation manner, in an embodiment of the present invention, the method may further include:
If the check node equipment with the number ratio more than the preset ratio fails to pass the check, judging that the corresponding subtask result is abnormal, and calling the node equipment in the corresponding node equipment group to recalculate the corresponding subtask.
Optionally, as a possible implementation manner, in an embodiment of the present invention, the determining a node device group corresponding to N subtasks corresponding to a computing task includes:
receiving a calculation task sent by a main server, dividing the calculation task into N sub-tasks, and calculating the calculation force requirement of each sub-task;
the power calculation demand information is sent to the main server, and the power calculation demand information comprises power calculation demands of the subtasks, so that the main server distributes corresponding node equipment groups for each subtask;
and receiving node information of at least M node devices belonging to N node device groups corresponding to the N subtasks and sent by the main server.
Optionally, as a possible implementation manner, in the embodiment of the present invention, the determining an optimal node device in each node device group includes:
acquiring node information of each node device, wherein the node information comprises one or more of a hardware performance parameter, a stable online time length parameter, a network bandwidth performance parameter and an accuracy parameter of a historical calculation result of the node device;
According to the node information, at least M node devices in each node device group adopt a preset consensus mechanism to select optimal node devices;
or, calculating the comprehensive weight of at least M node devices according to the preset weight of each parameter in the node information, and determining the node device with the largest comprehensive weight as the optimal node device.
Optionally, as a possible implementation manner, in an embodiment of the present invention, the method may further include:
and selecting node equipment meeting preset conditions from the node equipment as a standby server, and adopting the standby server to replace the current server when the current server fails.
Optionally, as a possible implementation manner, in an embodiment of the present invention, the node device includes a mobile node device.
A second aspect of an embodiment of the present invention provides a computing power sharing device, where the device includes a memory, a processor, and a bus, where the memory stores a computing power sharing program that can be transmitted to the processor through the bus and run on the processor, and the computing power sharing program is executed by the processor to implement the computing power sharing method according to the first aspect.
Optionally, as a possible implementation manner, in an embodiment of the present invention, the computing capability sharing device is a node that forms a CDN network or a blockchain network.
A third aspect of an embodiment of the present invention provides a computing power sharing system, including:
the first determining unit is used for determining node equipment groups corresponding to N subtasks corresponding to the calculation tasks respectively, wherein each node equipment group comprises at least M node equipment meeting preset conditions, N is a positive integer greater than 0, and M is a positive integer greater than 1;
a second determining unit, configured to determine an optimal node device in each node device group;
the first calling unit is used for calling the optimal node equipment in each node equipment group to complete the corresponding subtask and generating a subtask result;
the second calling unit is used for calling at least M-1 node devices except the optimal node device in each node device group as check node devices to check the subtask results, and judging that the corresponding subtask results pass the check if the number of check node devices with the proportion more than the preset proportion pass the check;
And the generating unit is used for generating a complete calculation task result according to all the N subtask results which pass the verification.
A fourth aspect of the embodiments of the present invention provides a computer readable storage medium, wherein a computing power sharing program is stored on the computer readable storage medium, the computing power sharing program being executable by one or more processors to implement the steps as in the first aspect and any of the possible computing power sharing method embodiments of the first aspect.
In the embodiment of the invention, N node equipment groups can be allocated for N subtasks corresponding to each calculation task, the optimal node equipment in each node equipment group completes the corresponding subtask calculation, the condition of low calculation efficiency of the subtasks can be avoided, at least (M-1) node equipment except the optimal node equipment in each node equipment group is used as check node equipment to check the subtask calculation result, and when only check node equipment with the number ratio more than a preset ratio passes, the corresponding subtask result check is judged to pass, thereby improving the calculation accuracy.
Drawings
FIG. 1 is a diagram of one embodiment of a method for sharing computing power according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another embodiment of a method for sharing computing power according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of one embodiment of a computing power sharing system according to an embodiment of the present invention;
FIG. 4 is a diagram of a computing power sharing device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
In the existing computing capacity sharing scheme, an acquired computing task is divided into N subtasks mainly through a main server, then the main server distributes each subtask to a plurality of nodes for computing, and finally the server judges, gathers and merges the output results of each node. The applicant notes that in the existing scheme, the splitting of the subtasks, the judgment and the summarizing and merging of the output results are all completed by the main server, which has higher performance requirements on the main server, when more computing tasks exist, the performance of the main server is likely to become a bottleneck restricting the computing power of the main server, and delay of computing task allocation can occur, so that node equipment with computing capability is idle to wait, and the computing resources are wasted. Even if a separate node device outside the main server is used for subtask operation, the applicant finds that the time consumption of each calculation task is completely determined by the worst node device, if the node device with poor state appears, the calculation efficiency is low, and then the accuracy of calculation is difficult to be ensured when a single independent node device processes the subtasks.
In the embodiment of the invention, N node equipment groups can be allocated for N subtasks corresponding to the calculation task, the optimal node equipment in each node equipment group completes the corresponding subtask calculation, the condition of low calculation efficiency of the subtasks can be avoided, and then (M-1) node equipment except the optimal node equipment in each node equipment group is used as check node equipment to check the subtask calculation result, so that the calculation accuracy is improved.
For ease of understanding, referring to FIG. 1, one embodiment of a computing power sharing method provided by the present invention may include:
101. determining node equipment groups corresponding to N subtasks of a computing task respectively;
in the process of sharing computing power, all node devices need to be directly or indirectly connected with a main server in a communication way, and actively or passively send node information to the main server. The node information may include one or more of a node device hardware performance parameter, a stable online time period parameter, a network bandwidth performance parameter, and an accuracy parameter of a historical calculation result.
Optionally, after acquiring the state information of each node device, the main server may select the node device meeting the preset condition to serve as a temporary server. For example, a node device with a memory greater than 4G, an available storage space greater than 10G, and an online time length exceeding a threshold may be selected to serve as a temporary server, and the specific selection criteria may be reasonably set or modified according to actual needs, which is not limited herein.
In the embodiment of the invention, after the main server acquires the calculation task, the main server can directly divide the calculation task into N sub-tasks, or can send the acquired calculation task to the temporary server, so that the temporary server divides the calculation task into N sub-tasks, and the specific calculation task dividing process is not limited. The adjustment can be reasonably performed according to actual requirements, and is not limited herein.
After the computing task is divided into N subtasks, the main server or the temporary server can allocate a corresponding node equipment group for each subtask according to the computing power requirements of the N subtasks corresponding to the computing task, wherein each node equipment group comprises at least M node equipment meeting preset conditions, N is a positive integer greater than 0, M is a positive integer greater than 1, and specific values of M and N can be reasonably adjusted according to actual requirements. The temporary server may also send the calculation force demand to the main server, and the main server allocates N node device groups corresponding to the N subtasks and then transmits the N node device groups to the temporary server, and the manner of specifically determining the node device groups corresponding to the N subtasks of the calculation task is not limited herein.
102. Determining optimal node equipment in each node equipment group, calling the optimal node equipment in each node equipment group to complete corresponding subtasks, and generating a subtask result;
in order to save computing resources and improve computing efficiency, after the corresponding node equipment groups are allocated for the subtasks, the main server or the temporary server needs to determine the optimal node equipment in each node equipment group, the comprehensive computing efficiency of the optimal node equipment is higher than the average computing efficiency in the corresponding node equipment, and the main server or the temporary server can call the optimal node equipment in each node equipment group to complete the corresponding subtasks to generate subtask results. The comparison may be specifically performed according to the node information of the node devices in each node device group to determine the optimal node device, and the specific determination manner may be set reasonably according to the content of the selected node information, which is not limited herein.
103. Taking at least (M-1) node devices except the optimal node device in each node device group as check node devices, calling the check node devices in each node device group to check the subtask results, and judging that the corresponding subtask results pass the check if the check node devices with the number ratio more than a preset ratio pass the check;
In order to ensure the accuracy of calculation, the main server or the temporary server in the embodiment of the invention can take at least (M-1) node devices except the optimal node device in each node device group as check node devices, call the check node devices in each node device group to check the subtask results, and judge that the corresponding subtask results pass the check if the check node devices with the number ratio more than the preset ratio pass the check, for example, the preset ratio can be set to be 50%, 60% and the like.
Optionally, if the check node device with the number ratio above the preset ratio fails to check, determining that the corresponding subtask result is abnormal, and calling the node device in the corresponding node device group to recalculate the corresponding subtask. The main server or the temporary server may call the determined optimal node device to re-perform the calculation of the subtasks, or may re-determine the new optimal node device to re-perform the calculation of the subtasks again, which is not limited herein.
104. And generating a complete calculation task result according to all the N subtask results passing the verification.
After the subtask results of each subtask pass the verification, the main server or the temporary server can combine according to all N subtask results passing the verification to generate a complete calculation task result.
In the embodiment of the invention, N node equipment groups can be allocated for N subtasks corresponding to each calculation task, the optimal node equipment in each node equipment group completes the corresponding subtask calculation, the condition of low calculation efficiency of the subtasks can be avoided, at least (M-1) node equipment except the optimal node equipment in each node equipment group is used as check node equipment to check the subtask calculation result, and when only check node equipment with the number ratio more than a preset ratio passes, the corresponding subtask result check is judged to pass, thereby improving the calculation accuracy.
On the basis of the embodiment shown in fig. 1, a method for sharing computing power in an embodiment of the present invention will be further described, and referring to fig. 2, when a temporary server is used to divide computing tasks, another embodiment of the method for sharing computing power in an embodiment of the present invention may include:
201. receiving a calculation task sent by a main server, dividing the calculation task into N sub-tasks, and calculating the calculation force requirement of each sub-task;
in the process of sharing computing power, all node devices need to be directly or indirectly connected with a main server in a communication way, and actively or passively send node information to the main server. The node information may include one or more of a node device hardware performance parameter, a stable online time period parameter, a network bandwidth performance parameter, and an accuracy parameter of a historical calculation result.
After the master server obtains the state information of each node device, the node device meeting the preset condition can be selected to serve as a temporary server. For example, a node device with a memory greater than 4G, an available storage space greater than 10G, and an online time length exceeding a threshold may be selected to serve as a temporary server, and the specific selection criteria may be reasonably set or modified according to actual needs, which is not limited herein.
In the embodiment of the invention, after the main server acquires the calculation task, the acquired calculation task can be sent to the temporary server, so that the temporary server divides the calculation task into N sub-tasks and determines the calculation power requirement of each sub-task.
202. The power calculation demand information is sent to the main server, and the power calculation demand information comprises power calculation demands of all sub-tasks;
after the computing task is divided into N subtasks, the temporary server may determine the computing power requirements of the N subtasks corresponding to the computing task, and send computing power requirement information to the main server, where the computing power requirement information includes computing power requirements of each subtask, so that the main server allocates a corresponding node device group to each subtask for each subtask, and allocates a corresponding node device group to each subtask, where each node device group includes at least M node devices meeting a preset condition, where N is a positive integer greater than 0, M is a positive integer greater than 1, and specific values of M and N may be reasonably adjusted according to actual requirements, and not limited in this disclosure.
203. Receiving node information of at least M node devices belonging to N node device groups corresponding to N subtasks sent by a main server;
in practical application, because the node equipment may be down due to failure, in order to ensure stability of a calculation process, after receiving the calculation force demand information, the main server may allocate a corresponding node equipment group for each subtask according to the calculation force demand information, where the node equipment group may include M node equipments, and send node information of the node equipment to which each node equipment group belongs to the corresponding temporary server. Wherein M is a positive integer greater than 1, and specific values can be reasonably adjusted according to actual requirements, and are not limited herein.
204. Determining optimal node equipment in each node equipment group, calling the optimal node equipment in each node equipment group to complete corresponding subtasks, and generating a subtask result;
in order to save computing resources and improve computing efficiency, after the corresponding node equipment groups are allocated for the subtasks, the temporary server needs to determine the optimal node equipment in each node equipment group, the comprehensive computing efficiency of the optimal node equipment is higher than the average computing efficiency in the corresponding node equipment, and the main server or the temporary server can call the optimal node equipment in each node equipment group to complete the corresponding subtasks to generate subtask results. The comparison may be specifically performed according to the node information of the node devices in each node device group to determine the optimal node device, and the specific determination manner may be set reasonably according to the content of the selected node information, which is not limited herein.
Optionally, as a possible implementation manner, the process of determining the optimal node device in each node device group in the embodiment of the present invention may include:
acquiring node information of each node device, wherein the node information comprises one or more of a hardware performance parameter, a stable online time length parameter, a network bandwidth performance parameter and an accuracy parameter of a historical calculation result of the node device; and selecting optimal node equipment by adopting a preset consensus mechanism according to the node information by M node equipment in each node equipment group.
Specifically, after the preset node information of the node device is obtained, an optimal node may be recommended to perform task calculation together based on a preset consensus mechanism, for example, M node devices corresponding to each subtask are compared with each other, a criterion of consideration may be that hardware performance of the mobile phone is best (memory size, storage space, CPU operation efficiency, etc.), stable online time is longest, network bandwidth is highest and stability of a historical calculation result is highest, and a specific consensus process may refer to an existing embodiment and is not limited herein.
Optionally, as a possible implementation manner, the process of determining the optimal node device in each node device group in the embodiment of the present invention may include:
Acquiring node information of each node device, wherein the node information comprises one or more of a hardware performance parameter, a stable online time length parameter, a network bandwidth performance parameter and an accuracy parameter of a historical calculation result of the node device; and calculating the comprehensive weight of M node devices according to the preset weight of each parameter in the node information, and determining the node device with the largest comprehensive weight as the optimal node device.
Specifically, after the preset node information of the node device is obtained, the temporary server may perform comprehensive weight calculation according to the preset weights of the parameters in the node information, and determine the node device with the largest comprehensive weight as the optimal node device.
205. Taking at least (M-1) node devices except the optimal node device in each node device group as check node devices, calling the check node devices in each node device group to check the subtask results, and judging that the corresponding subtask results pass the check if the check node devices with the number ratio more than a preset ratio pass the check;
in order to ensure the accuracy of calculation, the main server or the temporary server in the embodiment of the invention can take (M-1) node devices except the optimal node device in each node device group as check node devices, call the check node devices in each node device group to check the subtask results, and judge that the corresponding subtask results pass the check if the check node devices with the number ratio more than the preset ratio pass the check.
In practical application, although the calculation results of the subtasks are checked, the calculation amount required in the checking process of the calculation results of the same calculation task is generally smaller than the calculation amount required in normal calculation of the task, and the overall calculation efficiency is still improved.
Optionally, if the check node device with the number ratio above the preset ratio fails to check, determining that the corresponding subtask result is abnormal, and calling the node device in the corresponding node device group to recalculate the corresponding subtask. The main server or the temporary server may call the determined optimal node device to re-perform the calculation of the subtasks, or may re-determine the new optimal node device to re-perform the calculation of the subtasks again, which is not limited herein.
206. And generating a complete calculation task result according to all the N subtask results passing the verification.
In the embodiment of the invention, N node equipment groups can be allocated for N subtasks corresponding to each calculation task, the optimal node equipment in each node equipment group completes the corresponding subtask calculation, the condition of low calculation efficiency of the subtasks can be avoided, at least (M-1) node equipment except the optimal node equipment in each node equipment group is used as check node equipment to check the subtask calculation result, and when only check node equipment with the number ratio more than a preset ratio passes, the corresponding subtask result check is judged to pass, thereby improving the calculation accuracy. And secondly, the division of calculation tasks and the processing of sub-task results are not required by the main server, so that the resource occupation of the main server is greatly reduced, and the sharing calculation efficiency is further improved.
Further, as a preferred embodiment, the node device as a temporary server includes a mobile node device.
The mobile node device in this embodiment may be a device with computing capability and portability, such as a mobile phone, a notebook computer, and a tablet computer. Considering the wide popularization of mobile devices, the mobile device has larger holding capacity and the mobile device often has certain computing capacity, so the computing capacity provided by the whole mobile device is relatively high, but in actual use, the idle rate of the mobile device is generally high due to the fact that the user changes the mobile device frequently, the waste of available resources is often caused, the use cost of the mobile device is relatively low, and the mobile device is used as a node device for executing subtasks, so the utilization rate of the idle available resources can be relatively improved, and the execution cost of the whole computing capacity sharing can be reduced.
Furthermore, in addition to the above-described series of embodiments, as a preferred embodiment, the total amount of the node device group is greater than N.
It should be noted that, in consideration of the situation that in practical application, a node device in a node device group may be down, in this case, the availability of the node device group may be greatly reduced, in order to ensure that the node device groups for processing the subtasks can all have higher availability, in this embodiment, the total amount of the node device groups is greater than the total amount of the subtasks, so even if a certain node device group is unavailable due to the down of the node device, other node device groups can replace the unavailable node device group to execute the subtasks, thereby relatively ensuring the overall reliability of executing the subtasks.
On the basis of the embodiments shown in fig. 1 and fig. 2, the main server or the temporary server may also select a node device meeting the preset condition from the node devices as a standby server, and when the temporary server fails, the standby server is adopted to replace the temporary server, so as to ensure the stability of completion of the computing task.
It should be understood that, in various embodiments of the present invention, the sequence number of each step is not meant to indicate the order of execution, and the order of execution of each step should be determined by its functions and internal logic, and should not be construed as limiting the implementation process of the embodiments of the present invention.
The foregoing embodiments describe a computing power sharing method in an embodiment of the present invention, referring to fig. 3, an embodiment of a computing power sharing system in an embodiment of the present invention may include:
a first determining unit 301, configured to determine node device groups corresponding to N subtasks corresponding to a computing task, where each node device group includes at least M node devices that meet a preset condition, where N is a positive integer greater than 0, and M is a positive integer greater than 1;
a second determining unit 302, configured to determine an optimal node device in each node device group;
The first invoking unit 303 is configured to invoke the optimal node device in each node device group to complete the corresponding subtask, and generate a subtask result;
a second calling unit 304, which uses at least (M-1) node devices other than the optimal node device in each node device group as check node devices, and calls the check node devices in each node device group to check the subtask results, and if the check node devices with the number ratio being more than a preset ratio pass the check, the corresponding subtask results are judged to pass the check;
the generating unit 305 is configured to generate a complete calculation task result according to all the N subtask results that pass the verification.
In the embodiment of the invention, N node equipment groups can be allocated for N subtasks corresponding to each calculation task, the optimal node equipment in each node equipment group completes the corresponding subtask calculation, the condition of low calculation efficiency of the subtasks can be avoided, at least (M-1) node equipment except the optimal node equipment in each node equipment group is used as check node equipment to check the subtask calculation result, and when only check node equipment with the number ratio more than a preset ratio passes, the corresponding subtask result check is judged to pass, thereby improving the calculation accuracy.
The present invention also provides a computing power sharing device corresponding to the method, and the embodiment of the device part corresponds to the embodiment of the method part.
Referring to fig. 4, fig. 4 is a block diagram of a computing power sharing device according to an embodiment of the present invention.
The computing power sharing device 1 provided by the embodiment of the invention comprises a memory 11, a processor 12 and a bus 13, wherein a computing power sharing program which can be transmitted to the processor 12 through the bus 13 and run on the processor 12 is stored in the memory 11, and the operating content of the computing power sharing method is realized when the computing power sharing program is executed by the processor 12.
Specifically, the processor in the present invention may be used to implement the following steps:
determining node equipment groups corresponding to N subtasks of a computing task respectively, wherein each node equipment group comprises at least M node equipment meeting preset conditions, N is a positive integer greater than 0, and M is a positive integer greater than 1;
determining optimal node equipment in each node equipment group;
calling the optimal node equipment in each node equipment group to complete the corresponding subtask, and generating a subtask result;
Taking at least (M-1) node devices except the optimal node device in each node device group as check node devices, calling the check node devices in each node device group to check the subtask results, and judging that the corresponding subtask results pass the check if the check node devices with the number ratio more than a preset ratio pass the check;
and generating a complete calculation task result according to all the N subtask results passing the verification.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
if the check node equipment with the number ratio more than the preset ratio fails to pass the check, judging that the corresponding subtask result is abnormal, and calling the node equipment in the corresponding node equipment group to recalculate the corresponding subtask.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
receiving a calculation task sent by a main server, dividing the calculation task into N sub-tasks, and calculating the calculation force requirement of each sub-task;
the power calculation demand information is sent to the main server, and the power calculation demand information comprises the power calculation demands of all the subtasks, so that the main server distributes corresponding node equipment groups for each subtask;
And receiving node information of M node devices belonging to N node device groups corresponding to the N subtasks and sent by the main server.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
acquiring node information of each node device, wherein the node information comprises one or more of a hardware performance parameter, a stable online time length parameter, a network bandwidth performance parameter and an accuracy parameter of a historical calculation result of the node device;
according to the node information, M node devices in each node device group adopt a preset consensus mechanism to select optimal node devices;
or, calculating the comprehensive weight of M node devices according to the preset weight of each parameter in the node information, and determining the node device with the largest comprehensive weight as the optimal node device.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
and selecting node equipment meeting preset conditions from the node equipment as a standby server, and replacing the current server by the standby server when the current server fails.
Optionally, in some embodiments of the present invention, a total amount of the node device group is greater than N.
The computing power sharing device 1 may be a node constituting a CDN network or a blockchain network.
The memory 11 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the client, such as a hard disk of the client. The memory 11 may in other embodiments also be an external storage device of the client, such as a plug-in hard disk provided on the client, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like. Further, the memory 11 may also include both an internal storage unit of the client and an external storage device. The memory 11 may be used not only for storing application software installed in a client and various types of data, such as code of a data access program based on a web library, etc., but also for temporarily storing data that has been output or is to be output.
The processor 12 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for running program code or processing data stored in the memory 11, e.g. executing a network library based data access program or the like.
The bus 13 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
Further, the computing power sharing device may also include a network interface 14, where the network interface 14 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the device 1 and other electronic equipment.
Optionally, the computing power sharing device 1 may further comprise a user interface, which may comprise a Display (play), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or a display unit, as appropriate, for displaying information processed in the computing power sharing device 1 and for displaying a visual user interface.
It will be appreciated by those skilled in the art that the configuration shown in fig. 4 does not constitute a limitation of the computing power sharing device 1, and may include fewer or more components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The present invention also provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, can implement the steps of:
determining node equipment groups corresponding to N subtasks of a computing task respectively, wherein each node equipment group comprises at least M node equipment meeting preset conditions, N is a positive integer greater than 0, and M is a positive integer greater than 1;
determining optimal node equipment in each node equipment group;
calling the optimal node equipment in each node equipment group to complete the corresponding subtask, and generating a subtask result;
taking at least (M-1) node devices except the optimal node device in each node device group as check node devices, calling the check node devices in each node device group to check the subtask results, and judging that the corresponding subtask results pass the check if the check node devices with the number ratio more than a preset ratio pass the check;
And generating a complete calculation task result according to all the N subtask results passing the verification.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
if the check node equipment with the number ratio more than the preset ratio fails to pass the check, judging that the corresponding subtask result is abnormal, and calling the node equipment in the corresponding node equipment group to recalculate the corresponding subtask.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
receiving a calculation task sent by a main server, dividing the calculation task into N sub-tasks, and calculating the calculation force requirement of each sub-task;
the power calculation demand information is sent to the main server, and the power calculation demand information comprises the power calculation demands of all the subtasks, so that the main server distributes corresponding node equipment groups for each subtask;
and receiving node information of at least M node devices belonging to N node device groups corresponding to the N subtasks and sent by the main server.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
acquiring node information of each node device, wherein the node information comprises one or more of a hardware performance parameter, a stable online time length parameter, a network bandwidth performance parameter and an accuracy parameter of a historical calculation result of the node device;
According to the node information, selecting optimal node equipment by adopting a preset consensus mechanism by at least M node equipment in each node equipment group;
or, calculating the comprehensive weight of at least M node devices according to the preset weight of each parameter in the node information, and determining the node device with the largest comprehensive weight as the optimal node device.
Optionally, in some embodiments of the present invention, the processor may be further configured to implement the steps of:
and selecting node equipment meeting preset conditions from the node equipment as a standby server, and replacing the current server by the standby server when the current server fails.
Optionally, in some embodiments of the present invention, a total amount of the node device group is greater than N.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A computing power sharing method, comprising:
determining node equipment groups corresponding to N subtasks of a computing task respectively, wherein each node equipment group comprises at least M node equipment meeting preset conditions, N is a positive integer greater than 0, and M is a positive integer greater than 1;
determining optimal node equipment in each node equipment group, calling the optimal node equipment in each node equipment group to complete corresponding subtasks, and generating a subtask result; the comprehensive calculation efficiency of the optimal node equipment is higher than the average calculation efficiency of the node equipment in the corresponding node equipment group;
taking at least M-1 node devices except the optimal node device in each node device group as check node devices, calling the check node devices in each node device group to check the subtask results, and judging that the corresponding subtask results pass the check if the check node devices with the number ratio more than a preset ratio pass the check;
and generating a complete calculation task result according to all the N subtask results passing the verification.
2. The method according to claim 1, wherein the method further comprises:
if the check node equipment with the number ratio more than the preset ratio fails to pass the check, judging that the corresponding subtask result is abnormal, and calling the node equipment in the corresponding node equipment group to recalculate the corresponding subtask.
3. The method according to claim 2, wherein determining the node device groups to which the N subtasks of the computing task respectively correspond includes:
receiving a calculation task sent by a main server, dividing the calculation task into N sub-tasks, and calculating the calculation force requirement of each sub-task;
the power calculation demand information is sent to the main server, and the power calculation demand information comprises power calculation demands of the subtasks, so that the main server distributes corresponding node equipment groups for each subtask;
and receiving node information of at least M node devices belonging to N node device groups corresponding to the N subtasks and sent by the main server.
4. A method according to any one of claims 1 to 3, wherein said determining the optimal node device in each node device group comprises:
acquiring node information of each node device, wherein the node information comprises one or more of a hardware performance parameter, a stable online time length parameter, a network bandwidth performance parameter and an accuracy parameter of a historical calculation result of the node device;
according to the node information, at least M node devices in each node device group adopt a preset consensus mechanism to select optimal node devices;
Or, calculating the comprehensive weight of at least M node devices according to the preset weight of each parameter in the node information, and determining the node device with the largest comprehensive weight as the optimal node device.
5. The method as recited in claim 4, further comprising:
and selecting node equipment meeting preset conditions from the node equipment as a standby server, and adopting the standby server to replace the current server when the current server fails.
6. The method of claim 5, wherein the node device comprises a mobile node device.
7. A computing power sharing apparatus comprising a memory, a processor and a bus, the memory having stored thereon a computing power sharing program that is transferable to and runs on the processor via the bus, the computing power sharing program when executed by the processor implementing the computing power sharing method of any of claims 1 to 5.
8. The apparatus of claim 7, wherein the apparatus is a node comprising a CDN network or a blockchain network.
9. A computing power sharing system, the system comprising:
The first determining unit is used for determining node equipment groups corresponding to N subtasks corresponding to the calculation tasks respectively, wherein each node equipment group comprises at least M node equipment meeting preset conditions, N is a positive integer greater than 0, and M is a positive integer greater than 1;
a second determining unit, configured to determine an optimal node device in each node device group; the comprehensive calculation efficiency of the optimal node equipment is higher than the average calculation efficiency of the node equipment in the corresponding node equipment group;
the first calling unit is used for calling the optimal node equipment in each node equipment group to complete the corresponding subtask and generating a subtask result;
the second calling unit is used for calling at least M-1 node devices except the optimal node device in each node device group as check node devices to check the subtask results, and judging that the corresponding subtask results pass the check if the number of check node devices with the proportion more than the preset proportion pass the check;
and the generating unit is used for generating a complete calculation task result according to all the N subtask results which pass the verification.
10. A computer-readable storage medium, having stored thereon a computing-capability sharing program executable by one or more processors to implement the computing-capability sharing method of any one of claims 1 to 6.
CN201910233203.8A 2019-03-26 2019-03-26 Computing capacity sharing method, system and related equipment Active CN109960575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910233203.8A CN109960575B (en) 2019-03-26 2019-03-26 Computing capacity sharing method, system and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910233203.8A CN109960575B (en) 2019-03-26 2019-03-26 Computing capacity sharing method, system and related equipment

Publications (2)

Publication Number Publication Date
CN109960575A CN109960575A (en) 2019-07-02
CN109960575B true CN109960575B (en) 2023-09-15

Family

ID=67024960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910233203.8A Active CN109960575B (en) 2019-03-26 2019-03-26 Computing capacity sharing method, system and related equipment

Country Status (1)

Country Link
CN (1) CN109960575B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995614B (en) * 2019-11-05 2022-04-05 华为技术有限公司 Computing power resource allocation method and device
CN111444010B (en) * 2020-01-19 2022-10-14 南京邮电大学 Consensus method based on computing resource computing power certification
CN111432159B (en) * 2020-03-19 2022-05-17 深圳市鹏创软件有限公司 Computing task processing method, device and system and computer readable storage medium
CN113542316B (en) * 2020-04-13 2022-11-25 展讯半导体(南京)有限公司 Computing power sharing method and related equipment
CN113535343B (en) * 2020-04-15 2022-10-21 展讯半导体(南京)有限公司 Computing power sharing method based on network scheduling and related product
CN112261141A (en) * 2020-10-23 2021-01-22 移康智能科技(上海)股份有限公司 Local Internet of things computing power detection system based on block chain technology

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013077787A1 (en) * 2011-11-23 2013-05-30 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for distributed processing tasks
CN103701894A (en) * 2013-12-25 2014-04-02 浙江省公众信息产业有限公司 Method and system for dispatching dynamic resource
CN103970611A (en) * 2014-05-05 2014-08-06 神华集团有限责任公司 Task processing method based on computer cluster
EP2819011A2 (en) * 2013-06-27 2014-12-31 Tata Consultancy Services Limited Task execution by idle resources in grid computing system
CN108268318A (en) * 2016-12-30 2018-07-10 华为技术有限公司 A kind of method and apparatus of distributed system task distribution
CN108491263A (en) * 2018-03-02 2018-09-04 珠海市魅族科技有限公司 Data processing method, data processing equipment, terminal and readable storage medium storing program for executing
CN108540568A (en) * 2018-04-23 2018-09-14 移康智能科技(上海)股份有限公司 Computing capability sharing method and smart machine
CN108958935A (en) * 2018-06-28 2018-12-07 阿瑞思科技(成都)有限责任公司 The method and its system of distributed computing are realized based on mobile terminal
CN109298946A (en) * 2018-10-19 2019-02-01 上海达家迎信息科技有限公司 Digging mine method, cloud platform, device, equipment and medium based on block chain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013077787A1 (en) * 2011-11-23 2013-05-30 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for distributed processing tasks
EP2819011A2 (en) * 2013-06-27 2014-12-31 Tata Consultancy Services Limited Task execution by idle resources in grid computing system
CN103701894A (en) * 2013-12-25 2014-04-02 浙江省公众信息产业有限公司 Method and system for dispatching dynamic resource
CN103970611A (en) * 2014-05-05 2014-08-06 神华集团有限责任公司 Task processing method based on computer cluster
CN108268318A (en) * 2016-12-30 2018-07-10 华为技术有限公司 A kind of method and apparatus of distributed system task distribution
CN108491263A (en) * 2018-03-02 2018-09-04 珠海市魅族科技有限公司 Data processing method, data processing equipment, terminal and readable storage medium storing program for executing
CN108540568A (en) * 2018-04-23 2018-09-14 移康智能科技(上海)股份有限公司 Computing capability sharing method and smart machine
CN108958935A (en) * 2018-06-28 2018-12-07 阿瑞思科技(成都)有限责任公司 The method and its system of distributed computing are realized based on mobile terminal
CN109298946A (en) * 2018-10-19 2019-02-01 上海达家迎信息科技有限公司 Digging mine method, cloud platform, device, equipment and medium based on block chain

Also Published As

Publication number Publication date
CN109960575A (en) 2019-07-02

Similar Documents

Publication Publication Date Title
CN109960575B (en) Computing capacity sharing method, system and related equipment
US10810045B2 (en) Method and apparatus for allocating central processing unit (CPU) resources in a default resource pool
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
US8751657B2 (en) Multi-client storage system and storage system management method
US7945913B2 (en) Method, system and computer program product for optimizing allocation of resources on partitions of a data processing system
CN109873868A (en) A kind of computing capability sharing method, system and relevant device
US8185905B2 (en) Resource allocation in computing systems according to permissible flexibilities in the recommended resource requirements
US8024737B2 (en) Method and a system that enables the calculation of resource requirements for a composite application
WO2015101091A1 (en) Distributed resource scheduling method and device
US9535749B2 (en) Methods for managing work load bursts and devices thereof
CN113849312B (en) Data processing task allocation method and device, electronic equipment and storage medium
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN108028806B (en) Method and device for allocating virtual resources in Network Function Virtualization (NFV) network
CN111104219A (en) Binding method, device, equipment and storage medium of virtual core and physical core
CN112600761A (en) Resource allocation method, device and storage medium
CN112559173A (en) Resource adjusting method and device, electronic equipment and readable storage medium
CN110336888B (en) Server distribution method, device, system and medium
CN111625339A (en) Cluster resource scheduling method, device, medium and computing equipment
CN113986497B (en) Queue scheduling method, device and system based on multi-tenant technology
CN114116173A (en) Method, device and system for dynamically adjusting task allocation
CN110912967A (en) Service node scheduling method, device, equipment and storage medium
CN107766154B (en) Server conversion method and device
CN107045452B (en) Virtual machine scheduling method and device
CN111382141A (en) Master-slave architecture configuration method, device, equipment and computer readable storage medium
CN115658295A (en) Resource scheduling method and device, electronic equipment and storage medium

Legal Events

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