Method for improving performance of terminal equipment by aggregating computing power of multiple external computing boxes
By optimizing task allocation for external computing boxes using dynamic scheduling values and task association tables, the problems of resource waste and extended execution cycles when allocating tasks to terminal devices are solved, achieving efficient and stable task processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LHASA KOLA INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-12
AI Technical Summary
In the existing technology, when the terminal device assigns tasks to multiple external computing boxes, it fails to adapt to the load changes of each external computing box and the dependencies between subtasks in real time. This results in some computing boxes being overloaded and others being idle, leading to wasted resources and extended task execution cycles.
By scanning the computing power characteristics and load of external computing boxes, a box status list is generated, scheduling values are dynamically calculated, tasks are decomposed into sub-task blocks and associated tables are generated, task allocation is adjusted in real time, subsequent tasks are predicted and locked, task completion status is monitored, and resource utilization is optimized.
It achieves rational and dynamic adaptability in task allocation, avoids resource waste, ensures smooth task connection, shortens the execution cycle, and improves the processing efficiency and stability of terminal devices.
Smart Images

Figure CN122195644A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of external computing box computing power technology, and more specifically, to a method for aggregating the computing power of multiple external computing boxes to improve the performance of terminal devices. Background Technology
[0002] The content in this section only provides background information related to this invention and may not constitute prior art.
[0003] As the complexity of tasks carried by terminal devices continues to increase, the computing power of a single terminal is often insufficient to meet the demand for efficient processing. External computing boxes, as a flexible computing power expansion device, are widely used in various terminal scenarios. By offloading some of the terminal's processing tasks to external computing boxes, the shortcomings of insufficient terminal computing power can be effectively made up for, and the overall task processing efficiency can be improved.
[0004] In practical applications, terminal devices need to distribute complex tasks to multiple connectable external computing boxes to shorten the task execution cycle through parallel processing. However, existing technologies have significant flaws in the task allocation and scheduling methods for external computing boxes. They often allocate tasks only based on the inherent performance of each external computing box at the initial stage, failing to adapt to changes in the load of each box in real time. Furthermore, they do not adequately consider the dependencies between sub-tasks, resulting in a lack of rationality and dynamic adaptability in task allocation. Specifically, this fixed allocation model easily leads to some external computing boxes becoming overloaded due to excessive workloads, causing a significant drop in processing speed, while others remain idle, resulting in wasted computing resources. Simultaneously, because the dependencies between sub-tasks are not considered, subsequent sub-tasks often cannot promptly connect with the processing results of preceding sub-tasks or are assigned to computing boxes unsuitable for the current load, thus prolonging the execution cycle of the entire task and affecting the efficiency and stability of task processing. Summary of the Invention
[0005] The purpose of this invention is to provide a method for aggregating the computing power of multiple external computing boxes to improve the performance of terminal devices, thereby addressing the aforementioned problems. To achieve this objective, the technical solution adopted by this invention is as follows: In a first aspect, this application provides a method for aggregating the computing power of multiple external computing boxes to improve the performance of terminal devices, including: The terminal device scans for connectable external computing boxes and obtains the computing power characteristics and current load of each external computing box; the computing power characteristics include processing speed and compatible task types, and the current load is the number of tasks being processed; a box status list is generated to record the computing power characteristics and current load; The terminal device receives the task to be processed and decomposes the task to be processed into multiple sub-task blocks; according to the data flow between each sub-task block, a sub-task association table is generated, and the sub-task association table records the predecessor sub-task block and the successor sub-task block of each sub-task block. The terminal device calculates the dynamic scheduling value for each external computing box based on the box status list, the processing speed based on computing power characteristics, and the current load; the processing speed is positively correlated with the dynamic scheduling value, and the current load is negatively correlated with the dynamic scheduling value. The terminal device assigns an execution box to each subtask block based on the subtask association table and dynamic scheduling value; for subtask blocks without a predecessor, the external computing box with the highest dynamic scheduling value and compatible with its task type is selected as the execution box; for subtask blocks with a predecessor, no execution box is assigned at this time. When an execution box completes a subtask block, it identifies the successor subtask block according to the subtask association table, and recalculates the dynamic scheduling value of all boxes based on the real-time load in the current box status list. It then sends the execution forecast of the successor subtask block to the external computing box with the highest dynamic scheduling value and compatible task type for forecast locking. The forecast locking includes reserving computing resources. The external computing box that has been pre-locked receives the output data of the predecessor subtask block and begins to execute the successor subtask block; if multiple subtask blocks depend on the same predecessor, multiple pre-locks will occur in parallel. The terminal device monitors the completion status of all subtask blocks in the subtask association table. When all subtask blocks are completed, it receives the final result from the execution box of the last subtask block and updates the current load in the box status list.
[0006] Furthermore, the step of the terminal device scanning connectable external computing boxes specifically includes: The terminal device broadcasts a discovery request through a wireless communication interface, and the external computing box that responds to the discovery request carries its own identifier, number of processor cores, and supported instruction set architecture in its response message.
[0007] Furthermore, the current load is periodically reported to the terminal device via the corresponding external computing box to indicate the number of task threads in the running queue.
[0008] Furthermore, the step of decomposing the task to be processed into multiple sub-task blocks specifically includes: Based on the intermediate compilation representation of the source code of the task to be processed, identify the functions or loops that have input and output data boundaries, and divide each independently schedulable function or loop into a subtask block.
[0009] Furthermore, the formula for calculating the dynamic scheduling value of each external computing box is as follows: in, For the first Dynamic scheduling values for an external computing box; For the first The processing speed of each box; For the first The current load of each box; The first attenuation coefficient; This is the second attenuation coefficient.
[0010] Furthermore, after selecting the external computing box with the highest dynamic scheduling value and compatible with its task type as the execution box, the process also includes: The terminal device queries the historical average transmission latency between each box recorded in the box status list, and selects the box with the shortest historical average transmission latency as the execution box.
[0011] Furthermore, the external computing box that has been pre-locked receives the output data of the predecessor subtask block and begins executing the successor subtask block, specifically including: During the pre-locking phase, the external computing box pre-allocates corresponding reserved computing resources within itself according to the task type of the successor sub-task block indicated by the execution pre-announcement, and establishes a data receiving channel with the execution box of the predecessor sub-task block; after the output data is completely obtained through the data receiving channel, the unit corresponding to the reserved computing resources is started to execute the successor sub-task block.
[0012] Secondly, this application also provides a system for aggregating computing power from multiple external computing boxes to improve the performance of terminal devices, comprising: The box status acquisition module is used by the terminal device to scan connectable external computing boxes, obtain the computing power characteristics and current load of each external computing box; the computing power characteristics include processing speed and compatible task types, and the current load is the number of tasks being processed; a box status list is generated to record the computing power characteristics and current load; The task decomposition and association module is used by the terminal device to receive the task to be processed, decompose the task to be processed into multiple sub-task blocks, and generate a sub-task association table according to the data flow between each sub-task block. The sub-task association table records the predecessor sub-task block and the successor sub-task block of each sub-task block. The scheduling value calculation module is used by the terminal device to calculate the dynamic scheduling value of each external computing box based on the box status list, the processing speed of the computing power characteristics, and the current load; the processing speed is positively correlated with the dynamic scheduling value, and the current load is negatively correlated with the dynamic scheduling value. The allocation module is used by the terminal device to allocate an execution box to each subtask block based on the subtask association table and dynamic scheduling value. This includes selecting the external computing box with the highest dynamic scheduling value and compatible with its task type as the execution box for subtask blocks without a predecessor; and not allocating an execution box for subtask blocks with a predecessor. The successor task prediction module is used to identify the successor subtask block of the subtask block according to the subtask association table when the execution box completes a subtask block, and recalculate the dynamic scheduling value of all boxes based on the real-time load in the current box status list. The execution prediction of the successor subtask block is sent to the external computing box with the highest dynamic scheduling value and compatible task type for prediction locking; prediction locking includes reserving computing resources. The preview task execution module is used by the external computing box that is previewed and locked to receive the output data of the predecessor subtask block and start executing the successor subtask block; if multiple subtask blocks depend on the same predecessor, multiple preview locks will occur in parallel. The update module is used by the terminal device to monitor the completion status of all subtask blocks in the subtask association table. When all subtask blocks are completed, the final result is received from the execution box of the last subtask block, and the current load in the box status list is updated.
[0013] Thirdly, this application also provides an electronic device, including: Memory, used to store computer programs; A processor for implementing the method steps as described in the first aspect when executing the computer program.
[0014] Fourthly, this application also provides a readable storage medium storing a computer program that, when executed by a processor, implements the method steps of the first aspect.
[0015] The beneficial effects of this invention are as follows: This invention first scans and acquires the computing power characteristics of each external computing box, such as processing speed and compatible task types, as well as the real-time task load, through a terminal device, and generates a box status list. Simultaneously, the task to be processed is broken down into multiple sub-task blocks, and a sub-task association table recording predecessor and successor dependencies is generated. Then, the scheduling value of each box is dynamically calculated based on the computing power, processing speed, and real-time load. Sub-task blocks without predecessor dependencies are first assigned the computing box with the highest scheduling value and compatibility. This abandons the traditional method of allocating resources only once at the beginning of the task based on inherent performance. After a sub-task block completes execution, the dynamic scheduling value of each box is recalculated in real time, and a preview lock is performed on its successor sub-task blocks to reserve resources. Sub-task blocks that depend on the same predecessor can be previewed and locked in parallel. This fully adapts to the dependencies between sub-tasks and the real-time load changes of the computing boxes, monitors the completion status of sub-tasks throughout the process, and updates the box load synchronously. Finally, the final result is received. This solves the problem of unreasonable and undynamically adaptable task allocation, avoids waste of computing resources, ensures smooth task transitions, shortens the overall execution cycle, and improves task processing efficiency and operational stability. Attached Figure Description
[0016] Figure 1 A flowchart of a method for improving the performance of terminal devices by aggregating the computing power of multiple external computing boxes, provided by the present invention; Figure 2 A schematic diagram of a system for aggregating computing power from multiple external computing boxes to improve the performance of terminal devices, provided by the present invention; Figure 3 This is a schematic diagram of an electronic device provided by the present invention.
[0017] In the diagram: 201, Box Status Acquisition Module; 202, Task Decomposition and Association Module; 203, Scheduling Numerical Calculation Module; 204, Allocation Module; 205, Subsequent Task Preview Module; 206, Preview Task Execution Module; 207, Update Module. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0019] like Figure 1 As shown in the embodiment of the present invention, a method for improving the performance of terminal devices by aggregating the computing power of multiple external computing boxes includes: S101, the terminal device scans the connectable external computing boxes and obtains the computing power characteristics and current load of each external computing box; the computing power characteristics include processing speed and compatible task types, and the current load is the number of tasks being processed; a box status list is generated to record the computing power characteristics and current load.
[0020] Specifically, the terminal device senses the real-time computing power resource status of external computing boxes, establishes a unified resource management ledger, and provides accurate data support for subsequent task allocation and computing power scheduling. This avoids problems such as computing power waste and task lag caused by blind scheduling, ensuring that subsequent sub-task allocation matches the actual capabilities and load status of the boxes, and improving the overall efficiency of computing power aggregation on the terminal device. The terminal device scans connectable external computing boxes to obtain the computing power characteristics and current load of each external computing box, thereby achieving comprehensive perception of external computing power resources. Among them, computing power characteristics are the core basis for determining whether a box can handle a specific sub-task, specifically including processing speed and compatible task types. Processing speed reflects the box's data processing capability. For example, if an external computing box has a processing speed of 1000 MIPS (millions of instructions per second) and is compatible with image data processing, it can be used to undertake the terminal device's image processing sub-tasks. The current load is the number of tasks that the box is currently processing, directly reflecting the box's remaining computing power. For example, if a box's current load is 2, it means that it is processing 2 tasks in parallel, and the remaining computing power can undertake new sub-tasks. By acquiring the above parameters, the terminal device generates a box status list. This list serves as the core data carrier for subsequent scheduling, recording in detail the computing power characteristics and current load of each external computing box. The principle is to centrally manage the resource status of the dispersed external boxes, making it easier for the terminal device to quickly query, compare, and calculate, thereby reducing the data query time in the subsequent scheduling process and improving scheduling efficiency.
[0021] The specific implementation of the terminal device scanning for connectable external computing boxes is as follows: The terminal device broadcasts a discovery request through a wireless communication interface (such as WiFi, Bluetooth, etc.). The principle is to utilize the broadcast characteristics of wireless communication to achieve rapid detection of all external computing boxes within a certain range, eliminating the need for manual connection one by one and improving scanning efficiency. The external computing box responding to the discovery request carries its own identifier, number of processor cores, and supported instruction set architecture in its response message. The identifier is used by the terminal device to distinguish different external computing boxes and avoid confusion during scheduling. For example, the identifier can be set to "BOX-001" or "BOX-002". The number of processor cores and supported instruction set architecture are the core support for processing speed and compatible task types in computing power characteristics. For example, an external computing box with 8 processor cores and support for the ARM instruction set architecture has a faster processing speed than a 4-core box and is compatible with task programs developed based on the ARM architecture. The beneficial effect is that the terminal device can quickly and initially judge the computing power level and task compatibility of the box through the above parameters, laying the foundation for accurate acquisition of subsequent computing power characteristics.
[0022] The current load is reported periodically to the terminal device by the corresponding external computing box, showing the number of task threads in its running queue. The principle is that the number of task threads directly corresponds to the number of tasks being processed by the box. Periodic reporting ensures that the load obtained by the terminal device is real-time, avoiding task overload due to load lag. For example, if the reporting period is set to 100ms, and the number of task threads in the running queue reported by an external computing box in a certain period is 3, it means that its current load is 3. The terminal device can use this to determine the remaining computing power of the box. This ensures that the terminal device can keep track of the load changes of each external computing box in real time, providing an accurate basis for dynamic scheduling, avoiding the allocation of subtasks to boxes that are already fully loaded, and ensuring the smooth execution of tasks.
[0023] S102, the terminal device receives the task to be processed, decomposes the task to be processed into multiple sub-task blocks; and generates a sub-task association table according to the data flow between each sub-task block. The sub-task association table records the predecessor sub-task block and the successor sub-task block of each sub-task block.
[0024] Specifically, the terminal device, as the core of computing power aggregation and scheduling, first acquires the complete task to be executed, clarifies the target object of computing power aggregation, and provides a prerequisite for subsequent task decomposition and subtask allocation; it ensures that the computing resources of the external computing box can accurately match the actual task requirements, avoids the disconnect between computing power aggregation and the task, and lays the foundation for the parallel processing of subsequent subtasks. For example, if the task to be processed received by the terminal device (such as a smart terminal) is a high-definition video rendering task, this task needs to complete three core stages: video decoding, frame image processing, and video encoding, which constitutes the complete task to be processed received by the terminal device.
[0025] Then, the task to be processed is decomposed into multiple sub-task blocks. The principle is that a single task often has concentrated computing power requirements, which is difficult for a single terminal device or a single external computing box to complete efficiently, and it is impossible to fully utilize the distributed computing power of multiple external boxes. Through task decomposition, heavy-load tasks can be broken down into independent units with computing power requirements adapted to external boxes, realizing parallel computing across multiple boxes. This breaks through the computing power limit of a single device, allowing each external computing box to simultaneously undertake sub-tasks, shortening the overall task execution time, while avoiding task lag caused by overload of a single box, and improving the practicality of computing power aggregation. The specific implementation method is as follows: Based on the intermediate compilation representation of the source code of the task to be processed, identify the functions or loops that have input and output data boundaries, and divide each independently schedulable function or loop into a subtask block. The intermediate representation of the compilation process is the intermediate code form obtained after the source code of the task to be processed has been compiled by the compiler front-end, and is independent of the specific programming language and hardware platform. For example, the intermediate representation of the high-definition video rendering task mentioned above will clearly present the independent code structure of the video decoding function, the frame image processing loop, and the video encoding function, and clearly define the input and output boundaries of each function / loop (e.g., the video decoding function takes the original video data stream as input and outputs the decoded frame data as output; the frame image processing loop takes the decoded frame as input and outputs the optimized frame data as output). The principle of this step is that the intermediate representation of the compilation process can clearly present the code logic and data interaction boundaries of the task. The function or loop has independent input and output logic and can be executed independently of other code segments, which meets the requirements of independent scheduling of subtask blocks. Its beneficial effect is to ensure the independence and integrity of subtask blocks, avoid problems such as subtasks not being able to execute independently or data dependencies being chaotic after decomposition, and accurately match the compatible task types of the external computing box, providing a clear basis for subsequent subtask allocation. Following the example above, based on this intermediate representation of the compiler, the video decoding function, the frame image processing loop, and the video encoding function can be divided into three independent subtask blocks. Each subtask block has a moderate computing power requirement and can be handled by different external computing boxes.
[0026] Finally, a subtask association table is generated based on the data flow between each subtask block. The principle is that some subtask blocks have data dependencies and need to be executed in a specific order (e.g., frame image processing requires the output data of video decoding). The association table clarifies this dependency logic, providing a sequential basis for subsequent dynamic scheduling. This avoids data corruption and task failures caused by disordered allocation of subtask blocks, ensuring that the execution order of subtask blocks matches the data flow. It also facilitates the terminal device in quickly locating subsequent tasks after a subtask block is completed, improving scheduling efficiency. The subtask association table records the predecessor subtask block (the preceding subtask that must be executed first) and the successor subtask block (the subsequent task that depends on the output data of the current subtask) for each subtask block. Continuing with the above example, the association table will record: the predecessor of the frame image processing subtask block is the video decoding subtask block, and the successor is the video encoding subtask block; the video decoding subtask block has no predecessor, and the video encoding subtask block has no successor.
[0027] S103, the terminal device calculates the dynamic scheduling value of each external computing box based on the box status list, the processing speed based on the computing power characteristics, and the current load. The processing speed is positively correlated with the dynamic scheduling value, and the current load is negatively correlated with the dynamic scheduling value.
[0028] Specifically, the core purpose of this step is to assign a dynamic scheduling value that can be directly used for scheduling decisions to each external computing box through quantitative calculation, so as to achieve orderly and efficient scheduling of external computing resources. Its core principle is to combine the actual computing power of the external computing box with its current idle level to build a quantitative evaluation model, break the limitations of single parameter evaluation, and ensure that the scheduling decision is both in line with the computing power level of the box and avoids the risk of overload.
[0029] The terminal device obtains the basic data required for calculation based on the box status list. This list provides a unified and accurate data source for calculation, ensuring that the computing power characteristics (core being processing speed) and current load of each external computing box can be quickly accessed, avoiding distortion of calculation results due to data loss or data deviation, and providing basic support for the accuracy of dynamic scheduling values.
[0030] The calculation principle of dynamic scheduling value is as follows: The processing speed of the external computing box is used as a positive evaluation indicator, representing the box's core computing power. The higher the processing speed, the stronger its ability to efficiently complete subtasks, and the higher the corresponding scheduling priority should be. The current load is used as a negative evaluation indicator, representing the box's remaining computing power. The larger the current load, the less remaining computing power the box has, the weaker its ability to handle new subtasks, and the lower the corresponding scheduling priority should be. To adapt to scheduling requirements in different scenarios, the following calculation model is constructed: First, a product approach is used to ensure a strong negative correlation between load and load: (1) in, For the first The processing speed of each box; For the first The current load of each box; For processing speed A monotonically increasing function; Current load It is a monotonically decreasing function.
[0031] To reflect the positive correlation between processing speed and the principle of diminishing marginal utility, Using a logarithmic function: (2) To ensure the strong negative correlation of load, Using the product of exponential decay and fractional decay: (3) In the formula, It is an exponentially decaying term, when the load factor... As it increases, this index decreases; The first attenuation coefficient controls the attenuation rate; This is a fractional decay term, designed to provide an additional decay mechanism; This is the second attenuation coefficient, used to adjust the attenuation intensity.
[0032] Substituting formulas (2) and (3) into formula (1), we get: (4) In the formula, For the first Dynamic scheduling values for an external computing box.
[0033] The core logic of this step's calculation model is that processing speed is positively correlated with dynamic scheduling value, while current load is negatively correlated with dynamic scheduling value. The principle is that dynamic scheduling value needs to take into account both "computing power" and "idleness". Processing speed determines what the box can "do efficiently", and current load determines what the box can "do again". Combining the two can avoid overload caused by solely evaluating processing speed and waste of computing power caused by solely evaluating load, ensuring that dynamic scheduling value can truly reflect the schedulable value of external computing boxes.
[0034] S104, the terminal device assigns an execution box to each subtask block based on the subtask association table and dynamic scheduling value; including for subtask blocks without a predecessor, selecting the external computing box with the highest dynamic scheduling value and compatible with its task type as the execution box; for subtask blocks with a predecessor, no execution box is assigned for the time being.
[0035] Specifically, the terminal device allocates execution boxes to each subtask block based on the subtask association table and dynamic scheduling value. The subtask association table provides the basis for the execution order of each subtask block, clarifying which subtask blocks can be executed immediately and which need to wait for the completion of the preceding tasks. The dynamic scheduling value quantifies the schedulable priority of each external computing box. The two work together as the core basis for allocation decision.
[0036] The allocation process consists of two parts: For subtask blocks without predecessors, the external computing box with the highest dynamic scheduling value and compatibility with its task type is selected as the execution box. Specifically, a subtask block without a predecessor is a starting task unit that can be directly started without relying on the output data of other subtask blocks. The principle is that the timely and efficient execution of such subtask blocks is a prerequisite for the progress of the entire task to be processed. Selecting the box with the highest dynamic scheduling value ensures that it receives sufficient computing power support, while selecting a box compatible with the task type avoids execution failures due to task incompatibility. The combination of these two factors enables the rapid deployment of the starting subtask. For example: Suppose that the task to be processed is decomposed into a "video decoding subtask block" (without a predecessor). The box status list contains BOX-001 (dynamic scheduling value 8, compatible with video operations) and BOX-002 (dynamic scheduling value 6, compatible with data operations). Since the video decoding subtask block needs to be compatible with video operation types, and BOX-001 has a higher dynamic scheduling value, BOX-001 is selected as the execution box for this subtask block.
[0037] In addition, after selecting the external computing box with the highest dynamic scheduling value and compatibility with its task type as the execution box, the process also includes: the terminal device querying the box status list to record the historical average transmission latency between each box and the execution box, and selecting the box with the shortest historical average transmission latency as the execution box. The principle is that data transmission with the terminal device is required during the execution of the sub-task block, and the transmission latency directly affects the overall efficiency of task execution. Even if the box's dynamic scheduling value and compatibility meet the requirements, excessively long transmission latency will still cause task lag and increase overall time consumption. Combining historical transmission latency selection can further optimize the allocation rationality. An example is as follows: Continuing the above example, if the historical average transmission latency between BOX-001 and the terminal device is 50ms, and there is also BOX-003 (dynamic scheduling value 8, compatible with video computation, historical average transmission latency 30ms), both of which meet the requirements for dynamic scheduling value and compatibility, the terminal device, after querying, selects BOX-003 with the shorter transmission latency as the execution box, reducing data transmission time and further improving the execution efficiency of the sub-task block. The corresponding calculation formula is as follows: (5) In the formula, To allocate to subtask blocks The box; Compatible subtask blocks A collection of boxes of type; This is the transmission delay weighting coefficient; This represents the historical average transmission delay.
[0038] For subtask blocks with predecessors, they are not allocated yet. The principle is that subtask blocks with predecessors rely on the output data of the predecessor subtask blocks as input. If the execution box is allocated in advance, the task will not be able to start due to the lack of input data, resulting in the idle and wasteful computing resources of the external computing box. At the same time, it may cause problems such as disordered task execution order and data corruption. Not allocating them yet can ensure that the execution time of the subtask block matches the data input requirements, ensuring the efficient use of computing resources.
[0039] S105, when the execution box completes a subtask block, the successor subtask block is identified according to the subtask association table, and the dynamic scheduling value of all boxes is recalculated based on the real-time load in the current box status list. The execution forecast of the successor subtask block is sent to the external computing box with the highest dynamic scheduling value and compatible task type for forecast locking; forecast locking includes reserving computing resources.
[0040] Specifically, the principle of association table recognition is that the subtask association table has pre-recorded the predecessor and successor relationships of each subtask block, clarifying the data flow logic. By querying this association table, the terminal device can quickly locate the successor task that depends on the output data of the currently completed subtask, avoiding scheduling confusion or omissions caused by the inability to identify task associations. Then, based on the real-time load in the current box status list, the terminal device recalculates the dynamic scheduling values of all external computing boxes. The principle is that after an execution box completes a subtask block, its current load will decrease accordingly. At the same time, the load of other external computing boxes may change due to their own task execution. If the old dynamic scheduling values are used for subsequent task allocation, the allocation results will be inaccurate and unable to match the real-time computing power status of each box. Recalculation ensures that the dynamic scheduling values can truly reflect the current computing power and idle level of each box, avoiding computing power waste or overload. For example, after BOX-003 completes the video decoding subtask, its load drops from 1 to 0. Based on the updated box status list, the terminal device recalculates the dynamic scheduling values of all boxes to ensure that the scheduling values match the real-time status of each box. The recalculated formula is as follows: (6) In the formula, For a moment Dynamic scheduling value; For a moment Real-time load.
[0041] The terminal device sends the execution forecast of the successor subtask block to the external computing box with the highest dynamic scheduling value and compatible with its task type for forecast locking. The principle is that the box with the highest dynamic scheduling value has the best computing power and idle level, and the compatibility with the task type ensures that the box can execute the successor subtask block normally. Sending the execution forecast and performing forecast locking includes reserving computing resources; it can occupy the computing resources of the box in advance to avoid being preempted by other tasks, ensure that the successor subtask block can obtain the best computing power support, and avoid task waiting caused by resource preemption, thereby improving scheduling efficiency.
[0042] S106, the external computing box that has been pre-locked receives the output data of the predecessor subtask block and begins to execute the successor subtask block; if multiple subtask blocks depend on the same predecessor, multiple pre-locks occur in parallel.
[0043] Specifically, the external computing box that is pre-locked receives the output data of the preceding sub-task block and begins executing the succeeding sub-task block. Its core principle is that computing resources are reserved and data transmission is prepared during the pre-locking phase, ensuring seamless execution of the succeeding sub-task block after the preceding sub-task block is completed. The specific implementation process is as follows: During the pre-locking phase, the external computing box pre-allocates corresponding reserved computing resources based on the task type of the succeeding sub-task block indicated in the execution pre-announcement, and establishes a data receiving channel with the execution box of the preceding sub-task block. After completely acquiring the output data through the data receiving channel, it starts the unit corresponding to the reserved computing resources to execute the succeeding sub-task block. The principle of pre-allocating reserved computing resources is that different task types have different computing resource requirements. Targeted allocation ensures accurate resource allocation and avoids task execution failure due to resource waste or insufficiency. For example, if BOX-003 is pre-locked to execute the frame image processing sub-task (task type: image data computation), it pre-allocates two cores of computing power suitable for image computation as reserved resources to prevent these resources from being occupied by other tasks. The principle of establishing a dedicated data receiving channel is to reduce data transmission interference and ensure the integrity and real-time performance of data transmission. For example, BOX-003 establishes a dedicated wireless data channel with the front-end execution box BOX-001 to ensure efficient transmission of decoded frame data. The principle of starting execution only after complete data acquisition is to ensure the integrity of input data and avoid task execution failure due to missing data. For example, after BOX-003 completely receives all decoded frame data through the dedicated channel, it immediately starts the reserved 2-core computing unit to execute the frame image processing subtask, ensuring timely and stable execution.
[0044] If multiple subtask blocks depend on the same predecessor, multiple preview locks occur in parallel. The principle is that while multiple subsequent subtask blocks share the same predecessor's output data, each subsequent subtask block is independent and has no data dependency. Parallel preview locks can fully utilize the distributed computing power of different external computing boxes, without waiting for a single subsequent subtask block to complete before executing the next one. For example, if a video decoding subtask block (predecessor) is completed, and there are two independent frame image optimization subtask blocks (subsequent) that both depend on its output decoded frame data, the terminal device will send the two frame image optimization subtask blocks to BOX-003 and BOX-004, which have the highest dynamic scheduling value and are compatible with image operations. The two external computing boxes simultaneously perform preview locks, receive decoded frame data in parallel, and start execution, without waiting sequentially, thus shortening the time consumed in the image optimization stage.
[0045] S107, the terminal device monitors the completion status of all subtask blocks in the subtask association table. When all subtask blocks are completed, it receives the final result from the execution box of the last subtask block and updates the current load in the box status list.
[0046] Specifically, the subtask association table records the predecessor and successor relationships of all subtask blocks, serving as a unified monitoring carrier for the overall task progress. By querying this table in real time, the terminal device can accurately grasp the execution status of each subtask block, avoiding misjudging the overall task completion due to incomplete individual subtask blocks and ensuring the integrity of task execution. For example, in a video rendering task, the terminal device uses the subtask association table to monitor the completion status of three subtask blocks: video decoding, frame image processing, and video encoding, promptly identifying incomplete subtasks. Once all subtask blocks are completed, the terminal device receives the final result from the execution box of the last subtask block. The principle is that the output data of the last subtask block is the final result of the entire task to be processed; its execution box stores this result, and direct reception reduces data transfer links, improving the efficiency of obtaining the final result. Finally, the terminal device synchronously updates the current load in the box status list. The principle is that after each execution box completes a subtask block, the number of tasks it is processing decreases, and the remaining computing power changes. Updating the list ensures that the load data is accurate in real time, providing reliable data support for the terminal device to receive new tasks and perform computing power scheduling, avoiding scheduling errors.
[0047] like Figure 2 As shown, based on the same inventive concept, this embodiment provides a system for aggregating the computing power of multiple external computing boxes to improve the performance of terminal devices, including: The box status acquisition module 201 is used by the terminal device to scan connectable external computing boxes, obtain the computing power characteristics and current load of each external computing box; the computing power characteristics include processing speed and compatible task types, and the current load is the number of tasks being processed; and generate a box status list to record the computing power characteristics and current load. The task decomposition and association module 202 is used for the terminal device to receive the task to be processed, decompose the task to be processed into multiple sub-task blocks, and generate a sub-task association table according to the data flow between each sub-task block. The sub-task association table records the predecessor sub-task block and the successor sub-task block of each sub-task block. The scheduling value calculation module 203 is used by the terminal device to calculate the dynamic scheduling value of each external computing box based on the box status list, the processing speed of the computing power characteristics, and the current load; the processing speed is positively correlated with the dynamic scheduling value, and the current load is negatively correlated with the dynamic scheduling value; The allocation module 204 is used by the terminal device to allocate an execution box to each subtask block based on the subtask association table and dynamic scheduling value; including selecting the external computing box with the highest dynamic scheduling value and compatible with its task type as the execution box for subtask blocks without a predecessor; and not allocating an execution box for subtask blocks with a predecessor. The successor task prediction module 205 is used to identify the successor subtask block of the subtask block according to the subtask association table when the execution box completes a subtask block, and recalculate the dynamic scheduling value of all boxes based on the real-time load in the current box status list, and send the execution prediction of the successor subtask block to the external computing box with the highest dynamic scheduling value and compatible task type for prediction locking; the prediction locking includes reserving computing resources; The preview task execution module 206 is used for the external computing box that is previewed to receive the output data of the predecessor subtask block and start executing the successor subtask block; if multiple subtask blocks depend on the same predecessor, multiple preview locks will occur in parallel. The update module 207 is used by the terminal device to monitor the completion status of all subtask blocks in the subtask association table. When all subtask blocks are completed, the final result is received from the execution box of the last subtask block, and the current load in the box status list is updated.
[0048] like Figure 3 As shown, based on the same inventive concept, this embodiment provides an electronic device, including: Memory 302 is used to store computer programs; Processor 301 is used to implement the method steps as described in the first aspect when executing a computer program.
[0049] Based on the same inventive concept, this embodiment provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the method steps as described in the first aspect.
[0050] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0051] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for improving the performance of terminal devices by aggregating the computing power of multiple external computing boxes, characterized in that, include: The terminal device scans for connectable external computing boxes and obtains the computing power characteristics and current load of each external computing box; the computing power characteristics include processing speed and compatible task types, and the current load is the number of tasks being processed; Generate a list of box statuses to record computing power characteristics and current load. The terminal device receives the task to be processed and decomposes the task to be processed into multiple sub-task blocks; Based on the data flow between each subtask block, a subtask association table is generated, which records the predecessor and successor subtask blocks of each subtask block. The terminal device calculates the dynamic scheduling value for each external computing box based on the box status list, the processing speed based on computing power characteristics, and the current load; the processing speed is positively correlated with the dynamic scheduling value, and the current load is negatively correlated with the dynamic scheduling value. The terminal device assigns an execution box to each subtask block based on the subtask association table and dynamic scheduling values. For subtask blocks without predecessors, the external computation box with the highest dynamic scheduling value and compatible with its task type is selected as the execution box; for subtask blocks with predecessors, no execution box is assigned for the time being. When an execution box completes a subtask block, it identifies the successor subtask block according to the subtask association table, and recalculates the dynamic scheduling value of all boxes based on the real-time load in the current box status list. It then sends the execution forecast of the successor subtask block to the external computing box with the highest dynamic scheduling value and compatible task type for forecast locking. The forecast locking includes reserving computing resources. The external computing box that was pre-locked receives the output data of the predecessor subtask block and begins to execute the successor subtask block. If multiple subtask blocks depend on the same predecessor, multiple forecast locks will occur in parallel. The terminal device monitors the completion status of all subtask blocks in the subtask association table. When all subtask blocks are completed, it receives the final result from the execution box of the last subtask block and updates the current load in the box status list.
2. The method for improving the performance of terminal devices by aggregating computing power from multiple external computing boxes according to claim 1, characterized in that, The step of the terminal device scanning connectable external computing boxes specifically includes: The terminal device broadcasts a discovery request through a wireless communication interface, and the external computing box that responds to the discovery request carries its own identifier, number of processor cores, and supported instruction set architecture in its response message.
3. The method for improving the performance of terminal devices by aggregating computing power from multiple external computing boxes according to claim 1, characterized in that, The current load is periodically reported to the terminal device by the corresponding external computing box to indicate the number of task threads in the running queue.
4. The method for improving the performance of terminal devices by aggregating computing power from multiple external computing boxes according to claim 1, characterized in that, The step of decomposing the task to be processed into multiple sub-task blocks specifically includes: Based on the intermediate compilation representation of the source code of the task to be processed, identify the functions or loops that have input and output data boundaries, and divide each independently schedulable function or loop into a subtask block.
5. The method for improving the performance of terminal devices by aggregating computing power from multiple external computing boxes according to claim 1, characterized in that, The formula for calculating the dynamic scheduling value of each external computing box is as follows: in, For the first Dynamic scheduling values for an external computing box; For the first The processing speed of each box; For the first The current load of each box; The first attenuation coefficient; This is the second attenuation coefficient.
6. The method for improving the performance of terminal devices by aggregating computing power from multiple external computing boxes according to claim 1, characterized in that, After selecting the external computing box with the highest dynamic scheduling value and compatible with its task type as the execution box, the process also includes: The terminal device queries the historical average transmission latency between each box recorded in the box status list, and selects the box with the shortest historical average transmission latency as the execution box.
7. The method for improving the performance of terminal devices by aggregating computing power from multiple external computing boxes according to claim 1, characterized in that, The external computing box that has been pre-locked receives the output data of the predecessor subtask block and begins executing the successor subtask block, specifically including: During the pre-locking phase, the external computing box pre-allocates corresponding reserved computing resources within itself according to the task type of the successor sub-task block indicated by the execution pre-announcement, and establishes a data receiving channel with the execution box of the predecessor sub-task block; after the output data is completely obtained through the data receiving channel, the unit corresponding to the reserved computing resources is started to execute the successor sub-task block.
8. A system for aggregating computing power from multiple external computing boxes to improve the performance of a terminal device, based on the method for aggregating computing power from multiple external computing boxes to improve the performance of a terminal device as described in claim 1, characterized in that, include: The box status acquisition module is used by the terminal device to scan the connectable external computing boxes and obtain the computing power characteristics and current load of each external computing box. The computing power characteristics include processing speed and compatible task types, and the current load is the number of tasks being processed. Generate a list of box statuses to record computing power characteristics and current load. The task decomposition and association module is used by the terminal device to receive the task to be processed and decompose the task to be processed into multiple sub-task blocks. Based on the data flow between each subtask block, a subtask association table is generated, which records the predecessor and successor subtask blocks of each subtask block. The scheduling value calculation module is used by the terminal device to calculate the dynamic scheduling value of each external computing box based on the box status list, the processing speed based on computing power characteristics, and the current load. The processing speed is positively correlated with the dynamic scheduling value, and the current load is negatively correlated with the dynamic scheduling value. The allocation module is used by the terminal device to allocate an execution box to each subtask block based on the subtask association table and dynamic scheduling values. For subtask blocks without predecessors, the external computation box with the highest dynamic scheduling value and compatible with its task type is selected as the execution box; for subtask blocks with predecessors, no execution box is assigned for the time being. The successor task prediction module is used to identify the successor subtask block of the subtask block according to the subtask association table when the execution box completes a subtask block, and recalculate the dynamic scheduling value of all boxes based on the real-time load in the current box status list. The execution prediction of the successor subtask block is sent to the external computing box with the highest dynamic scheduling value and compatible task type for prediction locking; prediction locking includes reserving computing resources. The preview task execution module is used by the external computing box that is previewed to receive the output data of the predecessor sub-task block and start executing the successor sub-task block. If multiple subtask blocks depend on the same predecessor, multiple forecast locks will occur in parallel. The update module is used by the terminal device to monitor the completion status of all subtask blocks in the subtask association table. When all subtask blocks are completed, the final result is received from the execution box of the last subtask block, and the current load in the box status list is updated.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method for improving the performance of a terminal device by aggregating the computing power of multiple external computing boxes as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the method for improving the performance of a terminal device by aggregating the computing power of multiple external computing boxes as described in any one of claims 1 to 7.