CN117499341A - Processing method of computing task, first device and storage medium - Google Patents
Processing method of computing task, first device and storage medium Download PDFInfo
- Publication number
- CN117499341A CN117499341A CN202210886021.2A CN202210886021A CN117499341A CN 117499341 A CN117499341 A CN 117499341A CN 202210886021 A CN202210886021 A CN 202210886021A CN 117499341 A CN117499341 A CN 117499341A
- Authority
- CN
- China
- Prior art keywords
- equipment
- computing
- idle
- computing resources
- task
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 19
- 238000000034 method Methods 0.000 claims abstract description 108
- 230000011664 signaling Effects 0.000 claims description 44
- 238000004590 computer program Methods 0.000 claims description 18
- 230000006870 function Effects 0.000 claims description 14
- 238000004891 communication Methods 0.000 claims description 13
- 230000004044 response Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 6
- 239000002699 waste material Substances 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 208000033748 Device issues Diseases 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/76—Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
- H04L47/765—Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions triggered by the end-points
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/78—Architectures of resource allocation
- H04L47/783—Distributed allocation of resources, e.g. bandwidth brokers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/15—Conference systems
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Hardware Redundancy (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a processing method of a computing task, a first device and a storage medium, wherein the method comprises the following steps: the idle computing resources of the second equipment are obtained, the first computing task of the second equipment is determined according to the idle computing resources of the second equipment, and the first computing task is sent to the second equipment, so that the second equipment can complete the first computing task by utilizing the idle computing resources of the second equipment. In this way, the method and the device enable the first device to utilize the idle computing resources of the external second device to expand the computing power required by the first device.
Description
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method for processing a computing task, a first device, and a storage medium.
Background
At present, the video conference terminal is limited by a chip, has insufficient computing power, and is difficult to provide smooth multipath 4K conferences. In addition, when the video conference terminal provides a multi-path 4K conference, an external auxiliary stream source is required, and most of external devices (such as a camera, a mobile phone, a computer and the like) of the auxiliary stream sources only provide video sources for the video conference terminal. The contradiction between insufficient computing power of the video conference terminal and the cost of the chip cannot be solved.
Disclosure of Invention
Based on this, the embodiment of the application provides a processing method of a computing task, a first device and a storage medium, which can utilize idle computing resources externally connected with a second device to expand computing capacity required by the first device.
In a first aspect, the present application provides a method for processing a computing task, where the method is applied to a first device, and the first device is connected to at least one second device, and the method includes:
acquiring idle computing resources of the second device;
determining a first computing task of the second device according to the idle computing resources of the second device;
and sending a first computing task to the second device, so that the second device completes the first computing task by using the idle computing resources of the second device.
In a second aspect, the present application provides a method for processing a computing task, where the method is applied to a first device, and the first device is connected to at least one second device, and the method includes:
receiving the reported idle computing resource sent by the second equipment;
receiving a request of master-slave switching sent by the second equipment;
responding to a request of master-slave switching of the second equipment, sending the reported idle computing resource of the first equipment to the second equipment, and enabling the second equipment to determine the idle computing resource of the first equipment according to the reported idle computing resource of the first equipment, wherein the idle computing resource of the first equipment is used for determining a fourth computing task of the first equipment;
Receiving a fourth computing task sent by the second device;
and completing the fourth computing task by using the idle computing resources of the first device.
In a third aspect, the present application provides a first device comprising a communication circuit, a memory, and a processor, the communication circuit configured to communicate; the memory is used for storing a computer program; the processor is configured to execute the computer program and implement the processing method of the computing task according to the first aspect or the first and second aspects as described above when the computer program is executed.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement a method of processing a computing task as described in the first aspect or the first and second aspects above.
The embodiment of the application provides a processing method of a computing task, a first device and a storage medium, wherein the first device determines the first computing task of a second device according to acquired idle computing resources of the second device and then sends the first computing task to the second device; the second device receives the first computing task and then completes the first computing task using the local free computing resources. Thus, the method of the first equipment side provides technical support for the first equipment to finish the first computing task of the first equipment by using the idle computing resources of the second equipment, and the method of the second equipment side also provides technical support for the first equipment to finish the first computing task of the first equipment by using the idle computing resources of the second equipment; when the method of the first equipment end and the method of the second equipment end are combined together, the first equipment can utilize the idle computing resources of the second equipment to finish the first computing task of the first equipment, on one hand, the problem that the chip cost is increased due to the fact that the computing capacity of the first equipment is improved can be avoided, on the other hand, the idle computing resources of the second equipment are utilized to finish the first computing task of the first equipment, the utilization rate of the second equipment can be improved, the waste of the idle computing resources of the second equipment is avoided, on the other hand, the idle computing resources of the second equipment are used as the computing resources of the first equipment, the computing capacity of the first equipment can be indirectly improved, on the other hand, the external second equipment is common general equipment and is not designed for the first equipment alone, and therefore the first equipment can adapt to the external general equipment to improve the computing capacity of the first equipment without additionally increasing the cost of the external equipment.
Also, the first device sends the reported idle computing resource of the first device to the second device after receiving the request of master-slave switching sent by the second device; the second device determines idle computing resources of the first device according to the reported idle computing resources of the first device, determines a fourth computing task of the first device according to the idle computing resources of the first device and sends the fourth computing task to the first device; the first device receives a fourth computing task sent by the second device, and the fourth computing task is completed by using the idle computing resources of the first device. Thus, the method of the first equipment side provides technical support for the second equipment to finish the fourth computing task of the second equipment by utilizing the idle computing resources of the first equipment in turn, and the method of the second equipment side provides technical support for the second equipment to finish the fourth computing task of the second equipment by utilizing the idle computing resources of the first equipment in turn; when the method of the first equipment end and the method of the second equipment end are combined together, the second equipment can utilize the idle computing resources of the first equipment to complete the fourth computing task of the second equipment, on one hand, the problem that the chip cost of the second equipment is increased due to the fact that the computing capacity of the second equipment is improved can be avoided, on the other hand, the idle computing resources of the first equipment are utilized to complete the fourth computing task of the second equipment, the utilization rate of the first equipment can be improved, the waste of the idle computing resources of the first equipment is avoided, on the other hand, the idle computing resources of the first equipment are used as the computing resources of the second equipment, the computing capacity of the second equipment can be indirectly improved, on the other hand, the first equipment is common general equipment and is not designed for the second equipment alone, and therefore the second equipment can adapt to the general equipment to improve the computing capacity of the second equipment without additionally increasing the equipment cost.
Drawings
FIG. 1 is a flow chart of an embodiment of a method for processing a computing task according to the present application;
FIG. 2 is a flow chart of another embodiment of a method for processing a computing task according to the present application;
FIG. 3 is a flow chart of yet another embodiment of a method of processing a computing task of the present application;
FIG. 4 is a schematic diagram of an interaction process between a first device and a second device in a method for processing a computing task according to the present application;
FIG. 5 is a flow chart of an embodiment of a method for processing a computing task in a video conference scenario;
fig. 6 is a schematic diagram of an interaction process of performing master-slave switching between a first device and a second device in the processing method of a computing task of the present application;
fig. 7 is a schematic diagram of an interaction process of performing master-slave switching between a first device and more than two second devices in the processing method of a computing task of the present application;
FIG. 8 is a schematic view of an embodiment of a first apparatus of the present application;
fig. 9 is a schematic structural view of an embodiment of the second apparatus of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present application, and have no specific meaning in themselves. Thus, "module," "component," or "unit" may be used in combination.
At present, the video conference terminal is limited by a chip, has insufficient computing power, and is difficult to provide smooth multipath 4K conferences. In addition, when the video conference terminal provides a multi-path 4K conference, an external auxiliary stream source is required, and most of external devices (such as a camera, a mobile phone, a computer and the like) of the auxiliary stream sources only provide video sources for the video conference terminal. The contradiction between insufficient computing power of the video conference terminal and the cost of the chip cannot be solved.
According to the embodiment of the application, the first equipment determines a first computing task of the second equipment according to the acquired idle computing resources of the second equipment, and then sends the first computing task to the second equipment; the second device receives the first computing task and then completes the first computing task using the local free computing resources. Thus, the method of the first equipment side provides technical support for the first equipment to finish the first computing task of the first equipment by using the idle computing resources of the second equipment, and the method of the second equipment side provides technical support for the first equipment to finish the first computing task of the first equipment by using the idle computing resources of the second equipment; when the method of the first equipment end and the method of the second equipment end are combined together, the first equipment can utilize the idle computing resources of the second equipment to finish the first computing task of the first equipment, on one hand, the problem that the chip cost is increased due to the fact that the computing capacity of the first equipment is improved can be avoided, on the other hand, the idle computing resources of the second equipment are utilized to finish the first computing task of the first equipment, the utilization rate of the second equipment can be improved, the waste of the idle computing resources of the second equipment is avoided, on the other hand, the idle computing resources of the second equipment are used as the computing resources of the first equipment, the computing capacity of the first equipment can be indirectly improved, on the other hand, the external second equipment is common general equipment and is not designed for the first equipment alone, and therefore the first equipment can adapt to the external general equipment to improve the computing capacity of the first equipment without additionally increasing the cost of the external equipment.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
The processing method of the computing task in the embodiment of the application comprises a processing method of the computing task applied to the first device (called a first device end method for short) and a processing method of the computing task applied to the second device (called a second device end method for short). For convenience of description and also for better understanding of the processing method of the computing task according to the embodiment of the present application, the first device-side method and the second device-side method are described in detail below.
It should be noted that, although the first device-side method and the second device-side method are described in combination, the first device-side method and the second device-side method are independent from each other, the first device-side method provides technical support for the first device to be able to complete the first computing task of the first device by using the idle computing resources of the second device, and the second device-side method provides technical support for the first device to be able to complete the first computing task of the first device by using the idle computing resources of the second device; when the first device-side method and the second device-side method are combined, the first device is capable of completing a first computing task of the first device using the idle computing resources of the second device.
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a method for processing a computing task according to the present application, fig. 2 is a schematic flow chart of another embodiment of a method for processing a computing task according to the present application, and fig. 3 is a schematic flow chart of yet another embodiment of a method for processing a computing task according to the present application. It should be noted that, the method of fig. 1 is a first device-side method, the method of fig. 2 is a second device-side method, and the method of fig. 3 is a method in which the first device-side method and the second device-side method are combined together. The processing method of the computing task is applied to a first device, the first device is connected with at least one second device, the first device can be a master device actively utilizing idle computing resources of the external second device, and the second device can be a slave device connected with the first device and utilizing the idle computing resources.
The first device side method comprises the following steps: step S101, step S102, and step S103; the second device side method comprises: step S201, step S202, and step S203.
The second equipment end method comprises the following steps:
step S201: and the second equipment sends the reported idle computing resources of the second equipment to the first equipment, so that the first equipment determines the idle computing resources of the second equipment according to the reported idle computing resources of the second equipment.
Reporting free computing resources may refer to resources that are currently free for computing, including hardware resources (e.g., processors, memory, etc.), and may also include software resources (e.g., operating systems, etc.), which are not currently available for use when reporting directly.
The first equipment end method comprises the following steps:
step S101: the first device obtains idle computing resources of the second device.
Free computing resources may refer to resources that are unused and that can be used for computing.
When the fluctuation of the reported idle computing resource of the second equipment is small and relatively stable, the idle computing resource of the second equipment can be the reported idle computing resource directly sent by the second equipment; when the reported idle computing resources of the second equipment dynamically fluctuate and are unstable, the idle computing resources of the second equipment can be obtained according to the reported idle computing resources which are sent by the second equipment for many times. In general, the reported idle computing resource of the second device is a dynamic and changing computing resource, and the idle computing resource of the second device is obtained according to the reported idle computing resource sent by the second device for multiple times, which is more accurate.
Step S102: and the first equipment determines a first computing task of the second equipment according to the idle computing resource of the second equipment.
Step S103: and the first equipment sends a first computing task to the second equipment, so that the second equipment completes the first computing task by utilizing the idle computing resources of the second equipment.
The second equipment end method comprises the following steps:
step S202: and the second equipment receives a first computing task sent by the first equipment, wherein the first computing task is determined by the first equipment according to idle computing resources of the second equipment.
Step S203: the second device completes the first computing task using the idle computing resources of the second device.
The first computing task is determined from the free computing resources of the second device, such that the first computing task is matched to the free computing resources of the second device, and the second device is capable of performing the first computing task using the free computing resources of the second device.
Theoretically, the number of free computing resources of the second device is greater than or equal to the number of computing resources actually needed to complete the first computing task. In general, the second device assists the first device to complete the first computing task is an auxiliary function of the second device, and the second device itself has other functions, and the other functions that complete the second device need computing resources, so in order to avoid that the computing resources actually required for completing the first computing task fully occupy the idle computing resources of the second device and cause that the second device is affected to complete other tasks of the second device, and also in order to make the second device smoother when completing the first computing task, in an embodiment, the number of computing resources actually required for completing the first computing task is smaller than the number of idle computing resources of the second device.
One application scene applicable to the method of the embodiment of the application comprises a video conference scene, wherein the first device comprises a video conference terminal, and the second device comprises an external device of the video conference terminal; in a video conference scenario, video encoding is a considerable computational resource occupation relative to other computing tasks, and therefore, the first computing task includes video encoding.
In the embodiment of the application, the external second equipment reports the local reporting idle computing resource; the first equipment determines idle computing resources of the second equipment according to the reported idle computing resources of the second equipment, determines a first computing task of the second equipment according to the idle computing resources of the second equipment, and then sends the first computing task to the second equipment; the second device receives the first computing task and then completes the first computing task using the local free computing resources. Thus, the method of the first equipment side provides technical support for the first equipment to finish the first computing task of the first equipment by using the idle computing resources of the second equipment, and the method of the second equipment side provides technical support for the first equipment to finish the first computing task of the first equipment by using the idle computing resources of the second equipment; when the method of the first equipment end and the method of the second equipment end are combined together, the first equipment can utilize the idle computing resources of the second equipment to finish the first computing task of the first equipment, on one hand, the problem that the chip cost is increased due to the fact that the computing capacity of the first equipment is improved can be avoided, on the other hand, the idle computing resources of the second equipment are utilized to finish the first computing task of the first equipment, the utilization rate of the second equipment can be improved, the waste of the idle computing resources of the second equipment is avoided, on the other hand, the idle computing resources of the second equipment are used as the computing resources of the first equipment, the computing capacity of the first equipment can be indirectly improved, on the other hand, the external second equipment is common general equipment and is not designed for the first equipment alone, and therefore the first equipment can adapt to the external general equipment to improve the computing capacity of the first equipment without additionally increasing the cost of the external equipment.
In an embodiment, step S101 of the method at the first device side, the obtaining the idle computing resource of the second device may include: and acquiring idle computing resources of the second device under the condition that the second device supports resource sharing.
In the embodiment of the present application, supporting resource sharing may refer to supporting other devices to perform computing tasks by using local idle computing resources. In the external devices connected with the first device, some devices do not support resource sharing, some devices support resource sharing, and the method of the embodiment of the application can be implemented only under the condition that the second device supports resource sharing, so that the user requirements corresponding to different external devices can be met.
In an embodiment, before the step S101, the acquiring the idle computing resource of the second device may further include: step S104, step S105, and step S106. Correspondingly, the method at the second equipment side comprises the following steps: step S204, step S205, and step S206.
Step S104: the first device sends first signaling to the second device.
In the embodiment of the application, the role of the first signaling is mainly to inquire whether the second device supports resource sharing.
Step S204: the second device receives the first signaling sent by the first device.
Step S205: the second device sends second signaling to the first device in response to the first signaling.
Step S105: the first device receives second signaling sent by the second device in response to the first signaling, wherein the second signaling is used for indicating whether the second device supports resource sharing.
The second signaling is used for indicating whether the second device supports resource sharing, if the second device supports resource sharing, the second signaling indicates that the second device supports resource sharing, and if the second device does not support resource sharing, the second signaling indicates that the second device does not support resource sharing, and then the method of the embodiment of the application is not implemented.
Step S106: and the first equipment sends a third signaling to the second equipment under the condition that the second equipment supports resource sharing, wherein the third signaling is used for indicating the second equipment to send the reported idle computing resource of the second equipment to the first equipment.
Step S206: and under the condition that the second equipment supports resource sharing, responding to the third signaling, and sending the reported idle computing resource of the second equipment to the first equipment by the second equipment.
In an embodiment, after receiving the third signaling, the second device may trigger a keep-alive message of the second device, where the second device periodically sends, in the form of the keep-alive message, the reported idle computing resource of the second device to the first device. Because the time interval of the sending period of the keep-alive message is shorter, the first device can obtain more idle computing resources reported by the second device, and therefore more accurate idle computing resources of the second device can be obtained.
In the above steps S104, S105, S106, S204, S205, and S206, the interaction process between the first device and the second device may be simply represented by fig. 4: the method comprises the steps that a first device sends a first signaling to a second device, the second device returns a second signaling to the first device after receiving the first signaling, the first device determines that the second device supports resource sharing after receiving the second signaling, and sends a third signaling to the second device, the second device triggers a keep-alive message after receiving the third signaling, periodically sends the keep-alive message to the first device and feeds back reported idle computing resources of the second device, and the first device determines the idle computing resources of the second device according to the reported idle computing resources of the second device, which are periodically sent by the second device.
In an embodiment, step S101 of the method at the first device side, the obtaining the idle computing resource of the second device may include: and acquiring the idle computing resources of the second device under the condition that the idle computing resources of the first device are not enough to complete the total second computing task.
In this embodiment of the present application, the second computing task is a total computing task of the first device, and if the idle computing resources of the first device are enough to complete the second computing task, no external second device is needed to assist in completing the first computing task. Only when the idle computing resources of the first device are insufficient to complete the second computing task, the method of the embodiment of the application is implemented, and the external second device is used to assist in completing the first computing task. In this way, an uncontrolled misuse of the first device by the external second device can be avoided.
In an embodiment, step S101 of the method at the first device side, the obtaining the idle computing resource of the second device may include: and the first equipment determines the idle computing resources of the second equipment according to the reported idle computing resources of the second equipment.
Step S101, where the determining, according to the reported idle computing resource of the second device, the idle computing resource of the second device may further include: and the first equipment determines the idle computing resources of the second equipment according to the plurality of reported idle computing resources periodically sent by the second equipment.
Theoretically, the idle computing resources of the second device may be less than or equal to the average of the plurality of reported idle computing resources. However, when the fluctuation of the reported idle computing resources is large, the idle computing resources of the second device are equal to the average value of the plurality of reported idle computing resources, and the first computing task occupies more idle computing resources of the second device, so that other normal functions, tasks or services of the second device are affected. Thus, in an embodiment, the free computing resources of the second device are smaller than the average of the plurality of reported free computing resources.
In an embodiment, step S101, determining the idle computing resources of the second device according to the plurality of reported idle computing resources periodically sent by the second device may further include: substep S1011, substep S1012, substep S1013, and substep S1014.
Sub-step S1011: and determining the average value and the variance corresponding to the plurality of reporting idle computing resources in the time period according to the plurality of reporting idle computing resources in the time period from the current first time to the previous second time.
Sub-step S1012: and determining normal distribution probability density functions corresponding to the plurality of reported idle computing resources in the time period according to the average value and the variance.
Substep S1013: and determining an influence factor according to the area of the normal distribution probability density function and the time axis of the first interval, wherein the minimum value of the first interval is equal to the difference between the average value and the variance, and the maximum value of the first interval is equal to the sum of the average value and the variance.
Sub-step S1014: and determining the idle computing resource of the second equipment according to the average value and the influence factor, wherein the idle computing resource of the second equipment is equal to the product of the average value and the influence factor, and the influence factor is smaller than 1.
The above-mentioned substep S1011 to substep S1014 are specifically described as follows:
the second device periodically sends the current reported idle computing resources to the first device. Then, the first device takes the current time t now Until t now Reporting of idle computing resources M sent during the period of time t 1 ,M 2 ,...,M t The mean μ and variance σ of these values are calculated 2 Obtaining a normal distribution probability density function:
then calculate the interval [ mu-sigma, mu+sigma ]]The area of the function ρ (t) and the t-axis is influenced by the factorSo that the free computing resources of the second device are available +.>Wherein the influencing factor->The effect of (a) is to converge the value of the free computing resource to less than 1. The method is suitable for computing the idle computing resources of all second devices externally connected with the first device.
In an embodiment, step S102, the determining, according to the idle computing resource of the second device, the first computing task of the second device may include: substep S102A1, substep S102A2, substep S102A3 and substep S102A4.
Substep S102A1: and determining the total second computing task of the first device, computing resources required by the second computing task and idle computing resources of the first device.
Substep S102A2: and determining a third computing task which can be completed by the idle computing resource of the first device when the idle computing resource of the first device is smaller than the computing resource required by the second computing task.
Substep S102A3: and determining the computing resources required by the residual computing task, wherein the residual computing task is the remaining computing task after the second computing task minus the third computing task.
Substep S102A4: and when the idle computing resources of the second device are larger than or equal to the computing resources required by the residual computing tasks, determining that the first computing task of the second device is the residual computing task.
In the embodiment of the present application, the third computing task is a computing task that needs to be completed by the first device itself, and the sum of the third computing task and the first computing task completed by the second device is equal to the total second computing task. In the embodiment of the present application, the following three conditions are required for allocating the first computing task to the second device: the first condition is that the idle computing resources of the first device are insufficient to complete the total second computing task, the second condition is that the computing resources of the first device need to complete a certain computing task, namely, the first device needs to complete a third computing task (all the second computing tasks cannot be completely moved to the second device to complete), and the third condition is that the idle computing resources of the external second device can complete the remaining first computing task.
Wherein the idle computing resources of the second device are larger than the computing resources required by the first computing task.
In an embodiment, the first device comprises a video conference terminal, the second device comprises an external device to the video conference terminal, and the first computing task comprises video encoding; step S102, determining, according to the idle computing resource of the second device, a first computing task of the second device may include: substep S102B1, substep S102B2, substep S102B3 and substep S102B4.
Substep S102B1: and determining a total second computing task of the first device, computing resources required by the second computing task and idle computing resources of the first device, wherein the second computing task is video coding of an n-way code stream.
The coding parameters of each path of code stream can be determined, the computing resources required by video coding of each path of code stream are determined according to the coding parameters of each path of code stream, and the computing resources required by video coding of each path of code stream are summed, so that the computing resources required by video coding of n paths of code streams can be obtained, and the video coding of n paths of code streams is the second computing task.
Substep S102B2: and when the idle computing resources of the first equipment are smaller than the computing resources required by the second computing resources, determining a third computing task which can be completed by the idle computing resources of the first equipment, wherein the third computing task is video coding of m paths of code streams.
Substep S102B3: and determining the computing resources required by video coding of the residual code stream, wherein the residual code stream is the code stream left after the n-way code stream minus the m-way code stream.
Substep S102B4: and when the idle computing resource of the second equipment is larger than or equal to the computing resource required by video coding of the residual code stream, determining that the first computing task of the second equipment is video coding of the residual code stream.
Wherein the idle computing resources of the second device are larger than the computing resources required by the first computing task.
Taking the video conference scenario as an example, the above-described sub-steps S102B1 to S102B4 can be expressed as follows.
The video conference terminal (i.e. the first device) calculates the coding parameters of each path of code stream, and calculates the calculation resources required by each path of code stream according to the corresponding coding parameters, for example, the calculation resources required by the ith path of code stream are N i . Assume that the free computing resources that the videoconferencing terminal (i.e., the first device) can use for computing tasks are M principal And the total second computing task has video coding of n-way code streams, wherein the third computing task borne by idle computing resources of the video conference terminal (i.e. the first device) has video coding of m-way code streams, then the following formulas (2) (3) (4) need to be satisfied simultaneously.
Wherein equation (2) indicates that the first device must meet the idle computing resources of the second device only when its own idle computing resources are insufficient to complete the second computing task; equations (3) (4) represent that neither the first device nor the second device has free computing resources to perform their own respective computing tasks (i.e., the third computing task and the first computing task); wherein, γ in the formula (4) represents an influence factor of a specific first computing task, for example, for a coding computing task γ=0.6 in a video conference, it can ensure that the second device can smoothly run other functions, tasks or services when receiving the first computing task issued by the first device. When the three conditions are met, the first device issues a corresponding first computing task, such as an encoding computing task in a video conference, to the second device.
The above procedure for the example of a video conference scenario can be briefly represented by fig. 5: the first equipment normally refers to a video conference, calculates coding parameters, judges whether the second equipment supports resource sharing through a second signaling, further judges whether idle computing resources of the second equipment are enough to complete a first computing task if the second equipment supports the resource sharing, distributes and sends video coding computing tasks to the second equipment if the idle computing resources of the second equipment are enough to complete the first computing task, reduces video quality if the second equipment does not support the resource sharing, processes the video quality by the first equipment, reduces video quality if the idle computing resources of the second equipment are not enough to complete the first computing task, and processes the video quality by the first equipment.
In the first device-side method, in an embodiment, the number of the second devices is more than two, and at this time, step S101, the obtaining the idle computing resources of the second devices may include: the first equipment acquires idle computing resources of each second equipment; step S102, determining, according to the idle computing resource of the second device, a first computing task of the second device may include: the first device determines a first computing task of each second device according to the idle computing resource of each second device; step S103, the sending a first computing task to the second device, so that the second device can complete the first computing task by using the idle computing resources of the second device, may include: and the first equipment sends the corresponding first computing task to each second equipment, so that each second equipment completes the corresponding first computing task by utilizing the idle computing resource of each second equipment.
In this embodiment of the present application, the application scenario includes one first device (i.e., a master device) and a plurality of second devices (i.e., slave devices).
Assuming that there is one second device, the ith second device has m i A number of computing tasks (i.e., a first computing task), the first device having m computing tasks (i.e., a third computing task) and the sum of all computing tasks being n (i.e., a second computing task); the computing resource required for the ith computing task is N i . The following formula (5) needs to be satisfied, and the first device can reasonably allocate the corresponding first computing tasks to the plurality of second devices respectively. Equation (5) is an extension of equations (2) (3) (4) above.
……
Wherein the first of formulas (5) represents that the first device must meet the idle computing resources of the second device only when its own idle computing resources are insufficient to complete the second computing task; the second formula in the formula (5) indicates that the first device has idle computing resources to execute the current own third computing task; the third formula to the last formula in the formula (5) show that each second device has idle computing resources to execute the respective first computing task of the second device; the third formula in the formula (5) to the last formula τ1, … …, τi represent influence factors of specific first computing tasks corresponding to each second device, which can ensure that each second device can smoothly run other functions, tasks or services when receiving the respective first computing tasks issued by the first devices. When the conditions are met, the first device issues the corresponding first computing task to each second device.
The first device and the second device may exchange roles, i.e. master-slave switching. The processing method of the computing task of the second equipment end comprises the following steps: step S401, step S402, and step S403; the processing method of the computing task of the first equipment end comprises the following steps: step S301, step S302, step S303, step S304, and step S305.
Step S401: the second device sends the reported idle computing resources of the second device to the first device.
Step S301: the first device receives the second device report idle computing resource sent by the second device.
Step S402: and the second equipment sends a request of master-slave switching to the first equipment.
Step S302: and the first equipment receives the request of master-slave switching sent by the second equipment.
And before the first device receives the request of the master-slave switching, the first device receives the reported idle computing resource of the second device, which is sent by the second device.
Step S303: the first device responds to a request of master-slave switching of the second device, and transmits the reported idle computing resource of the first device to the second device, so that the second device determines the idle computing resource of the first device according to the reported idle computing resource of the first device, and the idle computing resource of the first device is used for determining a fourth computing task of the first device.
Step S403: the second device receives the reported idle computing resources sent by the first device, determines the idle computing resources of the first device according to the reported idle computing resources of the first device, determines a fourth computing task of the first device according to the idle computing resources of the first device, and sends the fourth computing task to the first device.
Step S304: the first device receives a fourth computing task sent by the second device.
Step S305: the first device completes the fourth computing task using the free computing resources of the first device.
In this embodiment of the present application, the master-slave switching may refer to that the first device and the second device exchange roles, and the second device may utilize the idle computing resources of the first device to complete a fourth computing task allocated to the first device by the second device.
In an embodiment, step S301, the first device receiving the reported idle computing resource sent by the second device may include: and the first equipment receives the reported idle computing resource periodically sent by the second equipment.
Step S303, where the first device sends, to the second device, a report idle computing resource of the first device in response to a request for master-slave switching of the second device, and may further include: and under the condition that the first equipment supports the master-slave switching, responding to the request of the master-slave switching of the second equipment, sending a signaling for stopping sending the reporting idle computing resource of the second equipment to the second equipment, and sending the reporting idle computing resource of the first equipment to the second equipment.
In this embodiment of the present application, before a first device receives a request for master-slave switching, a second device periodically sends a report to the first device of idle computing resources. After receiving the request of the master-slave switching, the first device can cooperate with the second device to implement the master-slave switching method under the condition that the first device supports the master-slave switching, that is, the first device is used as a slave device, responds to the request of the master-slave switching of the second device, and sends signaling to the second device, wherein the signaling requires the second device to stop sending the reporting idle computing resource of the second device, and simultaneously sends the reporting idle computing resource of the first device to the second device.
The interaction process of the first device and a second device for performing master-slave switching can be represented by fig. 6: in the process that the second device periodically sends keep-alive messages to the first device and feeds back the reporting idle computing resources of the second device, the first device sends a request of master-slave switching to the first device, the first device responds to the request under the condition that the first device supports master-slave switching, the keep-alive messages of the second device are required to be disconnected (namely, the second device does not periodically send the keep-alive messages to the first device and feeds back the reporting idle computing resources of the second device any more), the second device receives the keep-alive messages required to be disconnected, the first device sends first signaling (at the moment, the second device is converted into a master device, the first device is converted into a slave device), the first device returns second signaling to the second device after receiving the first signaling, the second device determines that the first device supports resource sharing after receiving the second signaling, and sends third signaling to the first device, the first device triggers the keep-alive messages after receiving the third signaling, the second device periodically sends the keep-alive messages and feeds back the reporting idle computing resources of the first device, and the second device determines the idle computing resources according to the first device periodically sent by the first device.
The interaction process of the first device and more than two second devices for performing master-slave switching can be represented by fig. 7: in the process that the second equipment A and other second equipment periodically send keep-alive messages to the first equipment and feed back respective reported idle computing resources, the second equipment A sends a request of master-slave switching to the first equipment, the first equipment responds to the request under the condition that the first equipment supports the master-slave switching and requires to disconnect the keep-alive messages of the second equipment A and other second equipment (namely, the second equipment A and other second equipment do not periodically send the keep-alive messages to the first equipment and feed back respective reported idle computing resources any more), the second equipment A and other second equipment disconnect the respective keep-alive messages after receiving the request, and meanwhile, the first equipment sends information of other second equipment to the second equipment A so that the second equipment A can establish connection with other second equipment and send information to other second equipment; after receiving the information of the other second devices, the first device a sends first signaling to the first device and the other second devices respectively (at this time, the second device a is converted into a master device, the first device and the other second devices are converted into slave devices), the first device and the other second devices return second signaling to the second device a after receiving the first signaling, the second device a determines that the first device and the other second devices support resource sharing after receiving the second signaling, and sends third signaling to the first device and the other second devices, the first device and the other second devices trigger respective keep-alive messages after receiving the third signaling, the first device and the other second devices send respective keep-alive messages to the second device a periodically and feed back respective reporting idle computing resources, and the second device a determines the idle computing resources of the first device and the other second devices according to the respective reporting idle computing resources sent by the first device and the other second devices periodically.
It should be noted that, in the embodiment of the present application, in the process of the master-slave switching of the second device a, the master-slave switching of other slave devices is not supported.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a first device of the present application, and it should be noted that, in the method for processing a computing task of the first device side, the first device of the embodiment of the present application can implement the method, and details of the related content are referred to the above method parts and are not described herein again.
The first device 100 comprises a communication circuit 3, a memory 1 and a processor 2, the communication circuit 3 being for communication; the memory 1 is used for storing a computer program; the processor 2 is configured to execute the computer program and implement the processing method of the computing task described in any one of the first device side above when executing the computer program.
The processor 2 may be a micro control unit, a central processing unit or a digital signal processor, among others. The memory 1 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a usb disk, a removable hard disk, or the like.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a second device of the present application, and it should be noted that, in the embodiment of the present application, the second device can implement a processing method of the computing task of the second device side, and for details of related content, please refer to the above method section, which is not described herein again.
The second device 200 comprises a communication circuit 33, a memory 11 and a processor 22, the communication circuit 33 being for communication; the memory 11 is used for storing a computer program; the processor 22 is configured to execute the computer program and implement the processing method of the computing task described in any of the second device side above when executing the computer program.
The processor 22 may be a micro control unit, a central processing unit or a digital signal processor, among others. The memory 11 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a usb disk, a removable hard disk, or the like.
The application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement a method for processing the computing task at any one of the first equipment end.
The computer readable storage medium may be an internal storage unit of the first device, such as a hard disk or a memory. The computer readable storage medium may also be an external storage device of the first device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc.
The application also provides another computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor causes the processor to implement a method for processing a computing task according to any one of the second device side.
The computer readable storage medium may be an internal storage unit of the second device, such as a hard disk or a memory. The computer readable storage medium may also be an external storage device of the second device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and are not thereby limiting the scope of the claims of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the present application shall fall within the scope of the claims of the present application.
Claims (14)
1. A method of processing a computing task, the method being applied to a first device, the first device being connected to at least one second device, the method comprising:
acquiring idle computing resources of the second device;
determining a first computing task of the second device according to the idle computing resources of the second device;
and sending a first computing task to the second device, so that the second device completes the first computing task by using the idle computing resources of the second device.
2. The method of claim 1, wherein the obtaining the free computing resources of the second device comprises:
acquiring idle computing resources of the second device under the condition that the second device is determined to support resource sharing;
and/or the number of the groups of groups,
and acquiring the idle computing resources of the second device under the condition that the idle computing resources of the first device are not enough to complete the total second computing task.
3. The method of claim 1, wherein prior to the acquiring the free computing resources of the second device, comprising:
transmitting a first signaling to the second device;
receiving second signaling sent by the second device in response to the first signaling, wherein the second signaling is used for indicating whether the second device supports resource sharing or not;
and sending third signaling to the second device under the condition that the second device supports resource sharing, wherein the third signaling is used for indicating the second device to send the reported idle computing resource of the second device to the first device.
4. The method of claim 1, wherein the obtaining the free computing resources of the second device comprises:
and determining the idle computing resources of the second equipment according to the reported idle computing resources of the second equipment.
5. The method of claim 4, wherein the determining the free computing resources of the second device based on the reported free computing resources of the second device comprises:
and determining the idle computing resources of the second equipment according to the plurality of reported idle computing resources periodically transmitted by the second equipment.
6. The method of claim 5, wherein determining the idle computing resources of the second device based on the plurality of reported idle computing resources periodically transmitted by the second device comprises:
according to a plurality of reporting idle computing resources in a time period from a current first time to a previous second time, determining a mean value and a variance corresponding to the plurality of reporting idle computing resources in the time period;
determining a normal distribution probability density function corresponding to a plurality of reported idle computing resources in the time period according to the average value and the variance;
determining an influence factor according to the area of a normal distribution probability density function and a time axis of a first interval, wherein the minimum value of the first interval is equal to the difference between the average value and the variance, and the maximum value of the first interval is equal to the sum of the average value and the variance;
and determining the idle computing resource of the second equipment according to the average value and the influence factor, wherein the idle computing resource of the second equipment is equal to the product of the average value and the influence factor, and the influence factor is smaller than 1.
7. The method of claim 5, wherein the free computing resources of the second device are less than a mean of the plurality of reported free computing resources.
8. The method of claim 1, wherein the number of second devices is more than two,
the acquiring the idle computing resource of the second device includes:
and acquiring idle computing resources of each second device.
9. The method of claim 1, wherein the determining the first computing task of the second device based on the free computing resources of the second device comprises:
determining a total second computing task of the first device, computing resources required by the second computing task and idle computing resources of the first device;
determining a third computing task that can be completed by the idle computing resources of the first device when the idle computing resources of the first device are smaller than the computing resources required by the second computing task;
determining computing resources required by a residual computing task, wherein the residual computing task is a remaining computing task after the second computing task is subtracted from the third computing task;
and when the idle computing resources of the second device are larger than or equal to the computing resources required by the residual computing tasks, determining that the first computing task of the second device is the residual computing task.
10. The method of claim 1, wherein the first device comprises a video conferencing terminal, the second device comprises an external device to the video conferencing terminal, and the first computing task comprises video encoding;
the determining, according to the idle computing resource of the second device, a first computing task of the second device includes:
determining a total second computing task of the first device, computing resources required by the second computing task and idle computing resources of the first device, wherein the second computing task is video coding of n paths of code streams;
when the idle computing resources of the first equipment are smaller than the computing resources required by the second computing resources, determining a third computing task which can be completed by the idle computing resources of the first equipment, wherein the third computing task is video coding of m paths of code streams;
determining computing resources required by video coding of residual code streams, wherein the residual code streams are remained code streams obtained by subtracting m code streams from n code streams;
and when the idle computing resource of the second equipment is larger than or equal to the computing resource required by video coding of the residual code stream, determining that the first computing task of the second equipment is video coding of the residual code stream.
11. A method of processing a computing task, the method being applied to a first device, the first device being connected to at least one second device, the method comprising:
receiving the reported idle computing resource sent by the second equipment;
receiving a request of master-slave switching sent by the second equipment;
responding to a request of master-slave switching of the second equipment, sending the reported idle computing resource of the first equipment to the second equipment, and enabling the second equipment to determine the idle computing resource of the first equipment according to the reported idle computing resource of the first equipment, wherein the idle computing resource of the first equipment is used for determining a fourth computing task of the first equipment;
receiving a fourth computing task sent by the second device;
and completing the fourth computing task by using the idle computing resources of the first device.
12. The method of claim 11, wherein the receiving the reported free computing resource sent by the second device comprises:
receiving a reported idle computing resource periodically sent by the second equipment;
the responding to the request of the master-slave switching of the second device, sending the reported idle computing resource of the first device to the second device, includes:
And under the condition that the first equipment supports the master-slave switching, responding to the request of the master-slave switching of the second equipment, sending a signaling for stopping sending the reporting idle computing resource of the second equipment to the second equipment, and sending the reporting idle computing resource of the first equipment to the second equipment.
13. A first device comprising communication circuitry, a memory, and a processor, the communication circuitry configured to communicate; the memory is used for storing a computer program; the processor is configured to execute the computer program and implement a processing method of a computing task according to any of claims 1-12 when the computer program is executed.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to implement a method of processing a computing task according to any of claims 1-12.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210886021.2A CN117499341A (en) | 2022-07-26 | 2022-07-26 | Processing method of computing task, first device and storage medium |
PCT/CN2023/098672 WO2024021888A1 (en) | 2022-07-26 | 2023-06-06 | Processing method for computing task, and first device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210886021.2A CN117499341A (en) | 2022-07-26 | 2022-07-26 | Processing method of computing task, first device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117499341A true CN117499341A (en) | 2024-02-02 |
Family
ID=89678735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210886021.2A Pending CN117499341A (en) | 2022-07-26 | 2022-07-26 | Processing method of computing task, first device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117499341A (en) |
WO (1) | WO2024021888A1 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
IN2013MU02180A (en) * | 2013-06-27 | 2015-06-12 | Tata Consultancy Services Ltd | |
CN110850957B (en) * | 2019-11-12 | 2021-04-30 | 北京工业大学 | Scheduling method for reducing system power consumption through dormancy in edge computing scene |
CN113918314A (en) * | 2020-07-08 | 2022-01-11 | 中兴通讯股份有限公司 | Task processing method, edge computing device, computer device, and medium |
CN114035945A (en) * | 2021-10-29 | 2022-02-11 | 深圳市晨北科技有限公司 | Computing power resource allocation method, device, equipment and storage medium |
CN114153582A (en) * | 2021-11-30 | 2022-03-08 | 上海商汤科技开发有限公司 | Resource scheduling method and device, electronic equipment and storage medium |
-
2022
- 2022-07-26 CN CN202210886021.2A patent/CN117499341A/en active Pending
-
2023
- 2023-06-06 WO PCT/CN2023/098672 patent/WO2024021888A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2024021888A1 (en) | 2024-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110413673B (en) | Database data unified acquisition and distribution method and system | |
CN109802986B (en) | Equipment management method, system, device and server | |
CN103294553A (en) | Method and device for managing multimedia resources of mobile terminal | |
CN111427551A (en) | User code operation method of programming platform, equipment and storage medium | |
CN113301515A (en) | Method, device, system, equipment and storage medium for processing short message channel connection | |
CN110475091A (en) | The processing method and processing device of video conference | |
CN105393590B (en) | Terminal equipment and D2D resource management method | |
CN116471277A (en) | Computing power distribution method, computing power distribution device, server and computer readable storage medium | |
CN113485842B (en) | Method and device for data analysis based on device cluster | |
CN112835703B (en) | Task processing method, device, equipment and storage medium | |
CN112749012B (en) | Data processing method, device and system of terminal equipment and storage medium | |
CN115514698A (en) | Protocol calculation method, switch, cross-device link aggregation system and storage medium | |
CN117499341A (en) | Processing method of computing task, first device and storage medium | |
CN117098074B (en) | Information sharing method, device, storage medium and sharing node in ad hoc network | |
CN114828235A (en) | Bandwidth allocation method, bandwidth allocation device and computer-readable storage medium | |
CN112333690A (en) | Data transmission method, device, storage medium, terminal and network access point equipment | |
CN117519953A (en) | Separated memory management method for server-oriented non-perception calculation | |
CN112616143B (en) | Method and device for distributing communication numbers, electronic equipment and storage medium | |
CN114710485A (en) | Processing method and processing apparatus | |
CN110119111B (en) | Communication method and device, storage medium, and electronic device | |
CN110856045B (en) | Video processing method, electronic device, and storage medium | |
CN114116203A (en) | Resource calling control method, resource calling control device and storage medium | |
CN114422569A (en) | Message pushing method and device of cloud desktop | |
CN110716985B (en) | Node information processing method, device and medium | |
CN115037745B (en) | Method and device for electing in distributed system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication |