CN116471277A - Computing power distribution method, computing power distribution device, server and computer readable storage medium - Google Patents

Computing power distribution method, computing power distribution device, server and computer readable storage medium Download PDF

Info

Publication number
CN116471277A
CN116471277A CN202310373112.0A CN202310373112A CN116471277A CN 116471277 A CN116471277 A CN 116471277A CN 202310373112 A CN202310373112 A CN 202310373112A CN 116471277 A CN116471277 A CN 116471277A
Authority
CN
China
Prior art keywords
computing
terminal
available
terminals
idle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310373112.0A
Other languages
Chinese (zh)
Inventor
李魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202310373112.0A priority Critical patent/CN116471277A/en
Publication of CN116471277A publication Critical patent/CN116471277A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload

Abstract

The present disclosure provides a computing power distribution method, an apparatus, a server, and a computer readable storage medium, where when a target terminal in a computing power system cannot complete a corresponding computing task, the computing power distribution method may send a computing power request to the server, where the server determines available terminals in a resource idle state from all available terminals currently, distributes the computing power request among the available terminals according to idle computing resources of each available terminal, so that each available terminal completes the computing power request together, aggregates computing results of all available terminals, and sends the computing results to the target terminal, so that the target terminal completes the computing power request through the server by using idle computing resources in the computing power system. The terminal in the computing system can complete corresponding computing tasks when the computing force of the terminal is insufficient. Under the conditions of old terminal equipment and the like, the terminal equipment can also run applications which cannot be run by the terminal equipment, so that the computing power of the high-power machine is displayed on the low-power machine. And the user experience is improved.

Description

Computing power distribution method, computing power distribution device, server and computer readable storage medium
Technical Field
The present disclosure relates to the field of computer network technology, and in particular, to a computing power distribution method, apparatus, server, and computer readable storage medium.
Background
In a computer network, each terminal needs to take on its own computing tasks. However, in the case of insufficient computing power of the terminal due to the old and useless equipment and other problems, the computing task of the terminal cannot be completed. For example, when a terminal runs a game, the terminal cannot run the game due to insufficient computing power.
Disclosure of Invention
The embodiment of the disclosure provides a computing power distribution method, a computing power distribution device, a server and a computer readable storage medium, which can solve the problem that a terminal cannot complete a self-computing task. The technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a method of computing force distribution, the method comprising:
receiving a calculation force request sent by a target terminal, wherein the calculation force request is used for indicating that the current calculation resources of the target terminal are insufficient;
determining available terminals in a resource idle state from all schedulable terminals;
according to the idle computing resources of each available terminal, determining the distribution condition of the computing resources required by the computing power request among the available terminals;
according to the allocation situation, sending calculation notification to each available terminal respectively;
respectively receiving calculation results returned by each available terminal, and aggregating all the received calculation results to obtain a target calculation result;
and sending the target calculation result to the target terminal.
In one embodiment, the method further comprises:
periodically receiving heartbeat messages respectively sent by all terminals;
determining all schedulable terminals according to the heartbeat message received in the last period;
the determining the available terminal in the resource idle state from all schedulable terminals comprises the following steps:
respectively sending reporting notices to all schedulable terminals;
respectively receiving report messages sent by all schedulable terminals, wherein the report messages contain current idle computing resource information of the schedulable terminals, and the current idle computing resource information of the terminals comprises: the current idle computing resource quantity of the schedulable terminal occupies the proportion value of the total resource quantity;
and determining available terminals according to the current idle computing resource information of all the schedulable terminals.
In one embodiment, the determining the available terminal in the resource idle state from all schedulable terminals includes:
sending idle computing resource statistics notification to all terminals;
and respectively receiving idle computing resource report messages sent by the schedulable terminals, wherein the idle computing resource report messages contain current idle computing resource information of the terminals, and the current idle computing resource information of the terminals comprises: the current idle computing resource quantity of the schedulable terminal occupies the proportion value of the total resource quantity;
and determining available terminals according to the current idle computing resource information of all the schedulable terminals.
In one embodiment, the determining, according to the idle computing resources of each available terminal, the allocation situation of the computing resources required by the computing power request among the available terminals includes:
and if the fact that the computing power request can be completed by determining that the use of the idle computing resources of each available terminal reaches a full load threshold value according to the proportion value of the current idle computing resource quantity of each available terminal to the total resource quantity and the idle computing resource quantity of each available terminal, distributing the computing power request in each available terminal evenly.
In one embodiment, the determining, according to the idle computing resources of each available terminal, the allocation situation of the computing resources required by the computing power request among the available terminals includes:
if it is determined that the computing resources of each available terminal reach a full load threshold according to the current proportion value of the free computing resources of each available terminal to the total resources and the free computing resources of each available terminal, distributing the computing requests among the available terminals according to a preset sequence, so that when the computing resources of each distributed available terminal reach the full load threshold, the computing requests are continuously distributed to the next available terminal until the computing requests are distributed.
In one embodiment, the method further comprises:
and if the fact that the computing resource usage of each available terminal reaches the full load threshold value and the computing power request cannot be completed is determined according to the proportion value of the current idle computing resource amount of each available terminal to the total resource amount and the idle computing resource amount of each available terminal, sending a resource shortage notification to the target terminal.
In one embodiment, the method further comprises:
and if the fact that the computing resources of the available terminals are used to reach the full load threshold value can not finish the computing power request is determined according to the proportion value of the current idle computing resource quantity of the available terminals to the total resource quantity and the idle computing resource quantity of the available terminals, sending the computing power request to a standby terminal.
According to a second aspect of embodiments of the present disclosure, there is provided a computing force distribution device comprising:
the receiving module is used for receiving a calculation force request sent by a target terminal, wherein the calculation force request is used for indicating that the current calculation resources of the target terminal are insufficient;
the processing module is used for determining available terminals in a resource idle state from all schedulable terminals; according to the idle computing resources of each available terminal, determining the distribution condition of the computing resources required by the computing power request among the available terminals;
the sending module is used for respectively sending calculation notification to each available terminal according to the distribution condition;
the receiving module is further configured to: respectively receiving calculation results returned by the available terminals;
the processing module is further configured to: the target calculation result is obtained after the aggregation of all the received calculation results;
the sending module is further configured to: and sending the target calculation result to the target terminal.
In one embodiment, the receiving module is further configured to: periodically receiving heartbeat messages respectively sent by all terminals;
the processing module is also used for: determining all schedulable terminals according to the heartbeat message received in the last period;
the sending module is further configured to: respectively sending reporting notices to all schedulable terminals;
the processing module is specifically used for: respectively receiving report messages sent by all schedulable terminals, wherein the report messages contain current idle computing resource information of the schedulable terminals, and the current idle computing resource information of the terminals comprises: the current idle computing resource quantity of the schedulable terminal occupies the proportion value of the total resource quantity; and determining available terminals according to the current idle computing resource information of all the schedulable terminals.
In one embodiment, the sending module is further configured to: sending idle computing resource statistics notification to all terminals;
the processing module is specifically used for: and respectively receiving idle computing resource report messages sent by the schedulable terminals, wherein the idle computing resource report messages contain current idle computing resource information of the terminals, and the current idle computing resource information of the terminals comprises: the current idle computing resource quantity of the schedulable terminal occupies the proportion value of the total resource quantity; and determining available terminals according to the current idle computing resource information of all the schedulable terminals.
In one embodiment, the processing module is specifically configured to: and if the fact that the computing power request can be completed by determining that the use of the idle computing resources of each available terminal reaches a full load threshold value according to the proportion value of the current idle computing resource quantity of each available terminal to the total resource quantity and the idle computing resource quantity of each available terminal, distributing the computing power request in each available terminal evenly.
In one embodiment, the processing module is specifically configured to: if it is determined that the computing resources of each available terminal reach a full load threshold according to the current proportion value of the free computing resources of each available terminal to the total resources and the free computing resources of each available terminal, distributing the computing requests among the available terminals according to a preset sequence, so that when the computing resources of each distributed available terminal reach the full load threshold, the computing requests are continuously distributed to the next available terminal until the computing requests are distributed.
In one embodiment, the processing module is specifically configured to: and if the fact that the computing resource usage of each available terminal reaches the full load threshold value and the computing power request cannot be completed is determined according to the proportion value of the current idle computing resource amount of each available terminal to the total resource amount and the idle computing resource amount of each available terminal, sending a resource shortage notification to the target terminal.
In one embodiment, the processing module is specifically configured to: and if the fact that the computing resources of the available terminals are used to reach the full load threshold value can not finish the computing power request is determined according to the proportion value of the current idle computing resource quantity of the available terminals to the total resource quantity and the idle computing resource quantity of the available terminals, sending the computing power request to a standby terminal.
According to a third aspect of embodiments of the present disclosure, there is provided a server comprising a processor and a memory having stored therein at least one computer instruction that is loaded and executed by the processor to implement the steps performed in the computing power distribution method described in the first aspect and any embodiment of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored therein at least one computer instruction that is loaded and executed by a processor to implement the steps performed in the computing force allocation method described in the first aspect and any embodiment of the first aspect.
According to the computing power distribution method, the computing power distribution device, the server and the computer readable storage medium, when a target terminal in a computing power system cannot complete corresponding computing tasks, a computing power request can be sent to the server, the server determines available terminals in a resource idle state from all current schedulable terminals, distributes the computing power request among the available terminals according to idle computing resources of all the available terminals, so that all the available terminals can jointly complete the computing power request, and the computing results of all the available terminals are aggregated and then sent to the target terminal, so that the target terminal can complete the computing power request through the server by utilizing idle computing resources in the computing power system. The terminal in the computing system can complete corresponding computing tasks when the computing force of the terminal is insufficient. Under the conditions of old terminal equipment and the like, the terminal equipment can also run applications which cannot be run by the terminal equipment, so that the computing power of the high-power machine is displayed on the low-power machine. And the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram of a computing system according to an embodiment of the present disclosure;
FIG. 2 is an interactive schematic diagram of a method for computing force distribution according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of another power system according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a computing force distribution device according to an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
One scenario in which the present disclosure may be applied is described below in connection with fig. 1. Referring to fig. 1, fig. 1 is a schematic structural diagram of a computing system according to an embodiment of the disclosure, where the computing system may include a server 11 and a terminal 12, and a terminal 13 and a terminal 14. The servers are connected to terminals 12, 13 and 14, respectively. The terminals 12, 13 and 14 may be computers, cell phones or tablet devices, respectively, without limitation to the present disclosure. It should be noted that fig. 1 shows only 3 terminal devices by way of example, and two or more terminals may be included in an actual computing system.
Wherein, a terminal, which may also be referred to as an Agent (Agent) end, refers to an Agent initiating end, and is also a network computing node.
The server is used for computing power allocation and aggregation, and can also be called as a server side.
According to the calculation force distribution method provided by the embodiment of the disclosure, under the condition that the calculation force of the target terminal is insufficient due to the old and useless equipment and other reasons, a calculation force request can be sent to the server, the server can distribute the calculation force request to other available terminals for execution, and the calculation results of the available terminals are aggregated and then sent to the target terminal, so that corresponding calculation tasks can be completed when the calculation force of the terminal in the calculation force system is insufficient. Under the conditions of old terminal equipment and the like, the terminal equipment can also run applications which cannot be run by the terminal equipment, so that the computing power of the high-power machine is displayed on the low-power machine. And the user experience is improved.
The technical scheme provided by the present disclosure is described in detail below with specific examples.
Referring to fig. 2, fig. 2 is an interaction schematic diagram of a computing power distribution method according to an embodiment of the disclosure, where the embodiment may be applied to a computing power system, and the computing power system may be the computing power system shown in fig. 1. In this embodiment, the power computing system shown in fig. 1 is taken as an example, the server in this embodiment may be the server 11 in the power computing system shown in fig. 1, and the target terminal may be the terminal 12, the terminal 13 or the terminal 14 in the power computing system shown in fig. 1. The method provided by the embodiment may include the following steps.
Step 201, the target terminal sends a calculation force request to the server.
The target terminal can be any terminal in the power system, and when the current processing calculation task of the terminal cannot be completed, the power calculation request can be sent to the server.
The computing power request is used for indicating that the current computing resources of the target terminal are insufficient.
Step 202, the server determines available terminals in a resource idle state from all schedulable terminals.
The schedulable terminal refers to a terminal in communication connection with the server. The schedulable terminal may be all terminals communicatively connected to the server, or may be all terminals communicatively connected to the server except the target terminal.
The available terminals refer to schedulable terminals currently in a resource idle state, i.e. the available terminals currently have idle computing resources.
Step 203, the server determines the allocation situation of the computing resources required by the computing power request among the available terminals according to the idle computing resources of the available terminals.
And the server distributes the computing resources required by the computing power request of the target terminal among all the available terminals according to the idle computing resources of each available terminal to obtain the distribution condition.
And 204, the server respectively sends calculation notification to each available terminal according to the distribution condition.
The calculation notification is used for indicating the available terminals to complete calculation tasks allocated to the available terminals according to allocation conditions.
And step 205, each available terminal returns a calculation result to the server.
And each available terminal performs calculation operation according to the calculation task allocated to the available terminal to obtain a calculation result, and sends the calculation result to the server.
And 206, the server aggregates all the received calculation results to obtain target calculation results.
Step 207, the server sends the target calculation result to the target terminal.
In this embodiment, when the target terminal in the computing system cannot complete the corresponding computing task, the computing request may be sent to the server, the server determines available terminals in a resource idle state from all current schedulable terminals, allocates the computing request among the available terminals according to idle computing resources of each available terminal, so that each available terminal jointly completes the computing request, and aggregates computing results of all available terminals and sends the aggregated computing results to the target terminal, so that the target terminal completes the computing request by using the idle computing resources in the computing system through the server. The terminal in the computing system can complete corresponding computing tasks when the computing force of the terminal is insufficient. Under the conditions of old terminal equipment and the like, the terminal equipment can also run applications which cannot be run by the terminal equipment, so that the computing power of the high-power machine is displayed on the low-power machine. And the user experience is improved.
In some embodiments, in step 202, the server needs to first obtain the computing resource usage of the terminal that is idle in the current computing system, so as to determine the available terminals, and then complete the distribution of the computing request. There are many implementations of the above-described process of determining available terminals by the server, and detailed descriptions will be given below with specific embodiments.
In a possible implementation manner, the method provided in this embodiment may further include step 208 and step 209.
Step 208, all terminals periodically send heartbeat messages to the server respectively.
The period in which the terminal sends the heartbeat message to the server may be preset. By way of example, the period may be 5ms or the like.
Wherein the heartbeat message is used to cause the server to determine the terminal with which it is currently in communication connection. Because the terminal in the power system may be disconnected or disconnected at a certain moment, or a newly accessed terminal may be available at a certain moment, the server may learn about the currently online terminal through a periodic heartbeat message.
Alternatively, the heartbeat message may be the current idle computing resource reported by the terminal. Because the reported idle computing resources occupy less network resources, the heartbeat message can be the reported current idle computing resources, so that the server can know the idle computing resource condition of the currently connected terminal in time.
Step 209, the server determines all schedulable terminals according to the heartbeat message received in the last period.
Since the server periodically receives heartbeat messages sent by all terminals, the server can determine the terminal currently connected to the server through the received heartbeat messages, and the terminal which is in communication connection with the server can be called a schedulable terminal. And the server determines all schedulable terminals in current communication connection with the server according to the heartbeat message received in the last period.
Accordingly, step 202 may perform steps 202 a-202 c as follows.
Step 202a, the server sends report notification to all schedulable terminals respectively.
When the server receives the calculation force request and needs to distribute the calculation force request, a report notice can be sent to the schedulable terminals.
The reporting notice is used for notifying the schedulable terminal to send the current idle computing resource information to the server. The current idle computing resource information of the schedulable terminal may include, but is not limited to: the current amount of idle computing resources of the schedulable terminal is a proportional value of the total amount of resources. The ratio value of the current idle computing resource amount of the schedulable terminal to the total resource amount refers to the ratio value of the current idle computing resource amount of the schedulable terminal to the total resource amount of the schedulable terminal. For example, if the current amount of idle computing resources of the schedulable terminal is 2 ten thousand computing units and the total amount of resources of the schedulable terminal is 5 ten thousand computing units, the ratio of the current amount of idle computing resources of the schedulable terminal to the total amount of resources is 2 ten thousand/5 ten thousand=40%.
Optionally, the current idle computing resource information of the schedulable terminal may further include a total resource amount of the schedulable terminal, a computing resource amount that the schedulable terminal has currently used, and/or a ratio value of the computing resource amount that the schedulable terminal has currently used to the total resource amount of the schedulable terminal, which is not limited in this disclosure.
And 202b, all the schedulable terminals respectively send report messages to the server.
The report message contains the current idle computing resource information of the schedulable terminal.
And after receiving the report notification sent by the server, the schedulable terminal sends a report message containing the current idle computing resource information of the schedulable terminal to the server.
Step 202c, the server determines the available terminals according to the current idle computing resource information of all the schedulable terminals.
The server determines available terminals in a resource idle state from the schedulable terminals.
According to the embodiment, the server can timely know the schedulable terminal which is kept connected currently through the heartbeat signal sent by the periodically received terminal, when the computing power request is available, the server directly obtains the current idle computing resource information of the schedulable terminal, and the server rapidly determines the available terminal in a resource idle state from the schedulable terminal, so that the computing power request is distributed among the available terminals, the computing results of all the terminals are aggregated and then sent to the target terminal, and the target terminal completes the computing power request through the server by utilizing idle computing resources in a computing power system. The terminal in the computing system can complete corresponding computing tasks when the computing force of the terminal is insufficient. Under the conditions of old terminal equipment and the like, the terminal equipment can also run applications which cannot be run by the terminal equipment, so that the computing power of the high-power machine is displayed on the low-power machine. And the user experience is improved.
In another possible implementation, the step 202 in this embodiment may include the following steps 2021 to 2023.
Step 2021, the server sends idle computing resource statistics notification to all terminals.
The idle computing resource statistical notification is used for indicating the schedulable terminal connected with the server to send the current idle computing resource information of the schedulable terminal to the server. The current idle computing resource information of the schedulable terminal comprises: the current amount of idle computing resources of the schedulable terminal is a proportional value of the total amount of resources. The ratio value of the current idle computing resource amount of the schedulable terminal to the total resource amount refers to the ratio value of the current idle computing resource amount of the schedulable terminal to the total resource amount of the schedulable terminal. For example, if the current amount of idle computing resources of the schedulable terminal is 2 ten thousand computing units and the total amount of resources of the schedulable terminal is 5 ten thousand computing units, the ratio of the current amount of idle computing resources of the schedulable terminal to the total amount of resources is 2 ten thousand/5 ten thousand=40%.
Optionally, the current idle computing resource information of the schedulable terminal may further include a total resource amount of the schedulable terminal, a computing resource amount that the schedulable terminal has currently used, and/or a ratio value of the computing resource amount that the schedulable terminal has currently used to the total resource amount of the schedulable terminal, which is not limited in this disclosure.
Step 2022, the schedulable terminal sends the idle computing resource report message to the server respectively.
The idle computing resource report message contains the current idle computing resource information of the terminal. The current idle computing resource information of the terminal comprises: the current amount of idle computing resources of the schedulable terminal is a proportional value of the total amount of resources.
Step 2023, the server determines the available terminals according to the current idle computing resource information of all the schedulable terminals.
The server determines available terminals in a resource idle state from the schedulable terminals.
In this embodiment, when there is a calculation request, the server sends an idle computing resource report message to all the terminals, the schedulable terminal connected with the server sends current idle computing resource information to the server, the server determines available terminals with idle resources from the schedulable terminals, the server distributes the calculation request among the available terminals, and the calculation results of all the terminals are aggregated and sent to the target terminal, so that the target terminal completes the calculation request by using the idle computing resources in the calculation system through the server. The terminal in the computing system can complete corresponding computing tasks when the computing force of the terminal is insufficient. Under the conditions of old terminal equipment and the like, the terminal equipment can also run applications which cannot be run by the terminal equipment, so that the computing power of the high-power machine is displayed on the low-power machine. And the user experience is improved.
Based on the above embodiment, the server may allocate the computing power request through the current idle computing resource information of the terminal reported by the schedulable terminal, and specific allocation modes may be multiple, and two allocation modes are shown in the following examples.
In a possible implementation manner, further, step 203 may be implemented by following step 2031 and step 2032, or by following step 2031 and step 2032', on the basis of the above embodiment.
Step 2031, the server determines whether the computing resource of each available terminal reaches the full load threshold and can complete the computing power request according to the current proportion value of the idle computing resource amount of each available terminal to the total resource amount and the idle computing resource amount of each available terminal.
The available terminal refers to a terminal which has idle computing resources and the use of the idle computing resources does not affect the operation of the terminal. That is, the available terminals are terminals whose own computing resources have not reached the full load threshold. The full load threshold is that when the ratio of the computing resource usage of the terminal to the total resource is greater than or equal to the value, the terminal will get stuck. The full load threshold of the terminal may be 80% by way of example.
If yes, proceed to step 2032 or step 2032'. Alternatively, if not, then execution may continue with step 2033 or step 2033'.
Step 2032, the server distributes the calculation request evenly among all available terminals.
For example, if 10% computing power is required, there are 10 available terminals, and 1% computing power is allocated to each available terminal.
Step 2032', the server allocates the calculation requests to the available terminals in a preset order, so that when the calculation resources of each allocated available terminal reach the full load threshold, the calculation requests continue to be allocated to the next available terminal until the calculation requests are allocated.
The preset sequence may be a preset sequence of available terminals, or may be a sequence of randomly selecting available terminals.
The server distributes calculation force requests to the available terminals one by one according to a preset sequence, and the specific distribution process is as follows: the computing resources of the first available terminal reach the full load threshold value, the rest computing force requests are continuously distributed to the next available terminal, and the like until the computing force requests are distributed.
Illustratively, assume (80% of loaded mobile devices will experience a stuck, 80% is full load threshold), when the available resources for this available terminal are 80% -40% = 40%; and so on; the server issues a calculation task to the available terminal and sends the calculation task to a plurality of available terminals at the same time, if the calculation resource occupation of the first available terminal cannot complete the task (i.e. the calculation resource occupation of the first available terminal reaches 80%), the calculation task is handed over to the next available terminal to continue to complete, and the like until the calculation force request is distributed.
Step 2033, the server sends a resource deficiency notification to the target terminal.
Wherein the under-resource notification is used to indicate that the current computing resource is not sufficient. The user is prompted that the current task cannot be opened.
Step 2033', the server sends a calculation request to the standby terminal.
If a new terminal is accessed to the computing system, that is, a standby terminal exists, the computing resource can be continuously applied to the standby terminal so as to complete the current computing request.
Further, in one possible implementation manner, the computing power request may include an amount of computing resources required by the target terminal, where the amount of computing resources required by the target terminal refers to an amount of computing resources required by a portion of the current computing task of the target terminal that cannot be processed. All terminals include target terminals; in step 203, the server may allocate among all available terminals including the target terminal.
In another possible implementation manner, the computing power request includes a total computing resource amount required by the target terminal and a proportion value of the current idle computing resource of the target terminal to the total resource of the target terminal, where the total computing resource amount refers to an amount of all computing resources required by a computing task currently executed by the target terminal; in step 203, the server may allocate among all available terminals except the target terminal.
Based on the calculation force distribution method provided by the above embodiment, the method provided by the embodiment of the present disclosure is illustrated below with reference to the system configuration diagram shown in fig. 3. Referring to fig. 3, fig. 3 is a schematic structural diagram of another power calculation system according to an embodiment of the disclosure. Referring to fig. 3, the power system includes: server 311, base station 309, base station 310, terminal 301, terminal 302, terminal 303, terminal 304, terminal 305, terminal 306, terminal 307, and terminal 308. The server 311 corresponds to the above server. Terminal 301, terminal 302, terminal 303, terminal 304, terminal 305, terminal 306, terminal 307 and terminal 308 correspond to terminals in the above-described computing system. The server 311 is connected to the terminal 301, the terminal 302, the terminal 303, the terminal 304, the terminal 305, the terminal 306, the terminal 307 and the terminal 308 through base stations, that is, through a telecommunication network, respectively, to realize data transmission.
The force calculation method provided in this embodiment may include the following steps 1 to 4.
Step 1, a terminal initiates a task, and a server is connected in a network, and idle resources of the CPU are reported every 0.5S, namely the available resources, and a machine with more than 40% of idle CPU in the network is subjected to zone bit processing.
Step 2, the server receives tasks and divides resources, S end plans the tasks of the receiving terminal, the tasks are divided into a local computing resource (set as X) duty ratio and a needed scheduling resource duty ratio (set as Y), and then the total resources are X+NY; where N is given to a plurality of terminals other than local X.
And 3, the CPU calculation force of the server is coordinated, the terminal reports the required calculation force, the distribution is carried out according to the magnitude of the gap calculation force, the distribution algorithm is the average distribution, if 10% of calculation force is needed, 10 node terminals are occupied, each node terminal occupies 1%, and at the moment, the server can actively send calculation tasks to the terminal.
And 4, after the terminal calculation is finished, the calculated result is aggregated to the terminal initiating the task through the server end and is directly presented to the user or stored.
In addition, the mobile equipment terminal designs a program to communicate with the server end in real time, when the mobile equipment opens a device cpu or gpu to 80%, the cpu is found to be insufficient or gpu is insufficient, at this time, a preprocessing resource (insufficient cpu or gpu) is sent to the server end through the program, after the server is terminated to the request, a check node (each terminal communicated with the server end is a node), a subordinate node is checked, and mobile equipment with cpu and gpu resources occupying less than 40% of the nodes is found to be available equipment, and the available resources of the terminal are 80% -40% = 40% on the assumption that (80% of loaded mobile equipment is blocked and 80% is a threshold value); and so on; the server side can send a calculation task to a plurality of devices at the same time, if the first resource occupation can not finish the task (to 80%), the task is transferred to the next terminal to finish the task continuously, and the like; if all the devices are started up for resources or not enough, two steps of operation can be performed at the moment, firstly, the user is prompted that the resources are not enough, and the task cannot be opened; and secondly, continuously applying resources to the standby node to fulfill the task.
According to the calculation force distribution method provided by the embodiment of the disclosure, a calculation force request is sent through a terminal, a server side performs central allocation, mobile equipment connected with the server is distributed and calculated through a scheduling algorithm, and finally, the calculation force result is aggregated through the server and finally sent to an initiating side for presentation. The mobile device solves the problems that the currently used mobile device is old and cannot run large-scale applications.
Based on the computing force distribution method described in the above-described embodiments corresponding to fig. 2 and 3, the following are embodiments of the apparatus of the present disclosure, which may be used to perform the embodiments of the method of the present disclosure.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a computing force distribution device according to an embodiment of the disclosure, where the computing force distribution device may include:
a receiving module 41, configured to receive an computing power request sent by a target terminal, where the computing power request is used to indicate that a current computing resource of the target terminal is insufficient;
a processing module 42, configured to determine an available terminal in a resource idle state from all schedulable terminals; according to the idle computing resources of each available terminal, determining the distribution condition of computing resources required by the computing power request among the available terminals;
a sending module 43, configured to send calculation notifications to each available terminal according to the allocation situation;
the receiving module 41 is further configured to: respectively receiving calculation results returned by all available terminals;
the processing module 42 is also configured to: the target calculation result is obtained after the aggregation of all the received calculation results;
the transmitting module 43 is further configured to: and sending the target calculation result to the target terminal.
The implementation principle and the beneficial effects of the device provided by the embodiment of the present disclosure are similar to those of the method embodiment provided above, and are not repeated here.
The embodiments of the present disclosure provide a server, including a processor and a memory, where at least one computer instruction is stored in the memory, where the instruction is loaded and executed by the processor to implement the computing power distribution method described in the foregoing embodiments corresponding to fig. 2 and 3, which is not described herein again.
Based on the computing power distribution method described in the embodiments corresponding to fig. 2 and 3, the embodiments of the present disclosure also provide a computer readable storage medium, for example, a non-transitory computer readable storage medium may be a Read Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the computing power distribution method described in the embodiments corresponding to fig. 2 and 3, which are not described herein.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method of computing force distribution, comprising:
receiving a calculation force request sent by a target terminal, wherein the calculation force request is used for indicating that the current calculation resources of the target terminal are insufficient;
determining available terminals in a resource idle state from all schedulable terminals;
according to the idle computing resources of each available terminal, determining the distribution condition of the computing resources required by the computing power request among the available terminals;
according to the allocation situation, sending calculation notification to each available terminal respectively;
respectively receiving calculation results returned by each available terminal, and aggregating all the received calculation results to obtain a target calculation result;
and sending the target calculation result to the target terminal.
2. The method according to claim 1, wherein the method further comprises:
periodically receiving heartbeat messages respectively sent by all terminals;
determining all schedulable terminals according to the heartbeat message received in the last period;
the determining the available terminal in the resource idle state from all schedulable terminals comprises the following steps:
respectively sending reporting notices to all schedulable terminals;
respectively receiving report messages sent by all schedulable terminals, wherein the report messages contain current idle computing resource information of the schedulable terminals, and the current idle computing resource information of the terminals comprises: the current idle computing resource quantity of the schedulable terminal occupies the proportion value of the total resource quantity;
and determining available terminals according to the current idle computing resource information of all the schedulable terminals.
3. The method according to claim 1, wherein said determining available terminals in a resource idle state from among all schedulable terminals comprises:
sending idle computing resource statistics notification to all terminals;
and respectively receiving idle computing resource report messages sent by the schedulable terminals, wherein the idle computing resource report messages contain current idle computing resource information of the terminals, and the current idle computing resource information of the terminals comprises: the current idle computing resource quantity of the schedulable terminal occupies the proportion value of the total resource quantity;
and determining available terminals according to the current idle computing resource information of all the schedulable terminals.
4. The method according to claim 1, wherein said determining an allocation of computing resources required for said computing power request among each of said available terminals based on free computing resources of each of said available terminals comprises:
and if the fact that the computing power request can be completed by determining that the use of the idle computing resources of each available terminal reaches a full load threshold value according to the proportion value of the current idle computing resource quantity of each available terminal to the total resource quantity and the idle computing resource quantity of each available terminal, distributing the computing power request in each available terminal evenly.
5. The method according to claim 1, wherein said determining an allocation of computing resources required for said computing power request among each of said available terminals based on free computing resources of each of said available terminals comprises:
if it is determined that the computing resources of each available terminal reach a full load threshold according to the current proportion value of the free computing resources of each available terminal to the total resources and the free computing resources of each available terminal, distributing the computing requests among the available terminals according to a preset sequence, so that when the computing resources of each distributed available terminal reach the full load threshold, the computing requests are continuously distributed to the next available terminal until the computing requests are distributed.
6. The method according to claim 4 or 5, characterized in that the method further comprises:
and if the fact that the computing resource usage of each available terminal reaches the full load threshold value and the computing power request cannot be completed is determined according to the proportion value of the current idle computing resource amount of each available terminal to the total resource amount and the idle computing resource amount of each available terminal, sending a resource shortage notification to the target terminal.
7. The method according to claim 4 or 5, characterized in that the method further comprises:
and if the fact that the computing resources of the available terminals are used to reach the full load threshold value can not finish the computing power request is determined according to the proportion value of the current idle computing resource quantity of the available terminals to the total resource quantity and the idle computing resource quantity of the available terminals, sending the computing power request to a standby terminal.
8. A computing force distribution device, comprising:
the receiving module is used for receiving a calculation force request sent by a target terminal, wherein the calculation force request is used for indicating that the current calculation resources of the target terminal are insufficient;
the processing module is used for determining available terminals in a resource idle state from all schedulable terminals; according to the idle computing resources of each available terminal, determining the distribution condition of the computing resources required by the computing power request among the available terminals;
the sending module is used for respectively sending calculation notification to each available terminal according to the distribution condition;
the receiving module is further configured to: respectively receiving calculation results returned by the available terminals;
the processing module is further configured to: the target calculation result is obtained after the aggregation of all the received calculation results;
the sending module is further configured to: and sending the target calculation result to the target terminal.
9. A server comprising a processor and a memory having stored therein at least one computer instruction that is loaded and executed by the processor to implement the steps performed in the computing power distribution method of any of claims 1 to 7.
10. A computer readable storage medium having stored therein at least one computer instruction that is loaded and executed by a processor to implement the steps performed in the computing force allocation method of any one of claims 1 to 7.
CN202310373112.0A 2023-04-07 2023-04-07 Computing power distribution method, computing power distribution device, server and computer readable storage medium Pending CN116471277A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310373112.0A CN116471277A (en) 2023-04-07 2023-04-07 Computing power distribution method, computing power distribution device, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310373112.0A CN116471277A (en) 2023-04-07 2023-04-07 Computing power distribution method, computing power distribution device, server and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116471277A true CN116471277A (en) 2023-07-21

Family

ID=87174561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310373112.0A Pending CN116471277A (en) 2023-04-07 2023-04-07 Computing power distribution method, computing power distribution device, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116471277A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117041259A (en) * 2023-09-28 2023-11-10 新华三技术有限公司 Scheduling method and device for computing resources
CN117435354A (en) * 2023-12-20 2024-01-23 腾讯科技(深圳)有限公司 Method, device and system for running algorithm model, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117041259A (en) * 2023-09-28 2023-11-10 新华三技术有限公司 Scheduling method and device for computing resources
CN117041259B (en) * 2023-09-28 2024-01-12 新华三技术有限公司 Scheduling method and device for computing resources
CN117435354A (en) * 2023-12-20 2024-01-23 腾讯科技(深圳)有限公司 Method, device and system for running algorithm model, electronic equipment and storage medium
CN117435354B (en) * 2023-12-20 2024-04-09 腾讯科技(深圳)有限公司 Method, device and system for running algorithm model, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN116471277A (en) Computing power distribution method, computing power distribution device, server and computer readable storage medium
US6434380B1 (en) Dynamic negotiation of resources for user equipment in wireless communications system
CN109376011B (en) Method and device for managing resources in virtualization system
CN108540568B (en) Computing capacity sharing method and intelligent equipment
CN104243405A (en) Request processing method, device and system
WO2021159831A1 (en) Programming platform user code running method, platform, node, device and medium
CN112887228B (en) Cloud resource management method and device, electronic equipment and computer readable storage medium
EP3644646A1 (en) Load-balancing method and apparatus
CN112465615B (en) Method, device and system for processing bill data
CN111798113A (en) Resource allocation method, device, storage medium and electronic equipment
CN113342534A (en) Method, device and equipment for allocating graphics processing resources and storage medium
CN114155026A (en) Resource allocation method, device, server and storage medium
CN109587806A (en) A kind of scheduling request sending method and terminal device
CN103761192A (en) Internal memory distributing method and device
CN113535376B (en) Force calculation scheduling method, centralized control equipment and force calculation application equipment
CN106973389A (en) A kind of dynamic spectrum sharing method and device
CN113822485A (en) Power distribution network scheduling task optimization method and system
CN112835721A (en) Method and device for distributing number of GPU cards, electronic equipment and storage medium
CN111083237A (en) Cloud mobile phone distribution system and method
CN111782364A (en) Service calling method and device, electronic equipment and storage medium
WO2022028512A1 (en) Computing power sharing-related exception reporting and handling methods and devices, storage medium, and terminal apparatus
KR101076762B1 (en) Apparatus for assigning process and method for operating the same
CN112995704B (en) Cache management method and device, electronic equipment and storage medium
CN115391042B (en) Resource allocation method and device, electronic equipment and storage medium
CN116302456B (en) Meta universe computing resource scheduling system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication