Dynamic power consumption management method and system for intelligent converged terminals
By generating and adjusting the execution plan of the intelligent fusion terminal, the response timeout problem during joint state transition was solved, the effective management of hardware resource status was achieved, and the net energy saving effect within the task execution time limit was ensured.
Patent Information
- Application Number
- CN202611628358.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-21
- Publication Date
- 2026-11-17
AI Technical Summary
When tasks share hardware resources and there are irrevocable entry phases and mutual exclusion relationships for recovery, existing technologies cannot effectively identify the event response risks during joint state transitions, which may lead to timeouts. Furthermore, after adjusting power reduction actions, the original energy-saving benefits are still used, making it impossible to achieve a net energy saving judgment for the entire cycle.
By acquiring the task's execution time limit and resource requirements, the state transition stages of hardware resources, ready dependencies, and mutual exclusion relationships of shared recovery control resources, a candidate execution plan is generated that includes task execution, resource recovery, and power reduction actions. Before executing the power reduction actions, the upper bound of the response time for each joint intermediate state is determined and adjusted to ensure that the task execution time limit is met.
It can identify and correct potential response timeout risks, prevent power and dwell time variations caused by upstream hardware resource reservation or staggered entry timing, ensure the accuracy of net energy saving judgment, avoid erroneous release of hardware resources, and achieve net energy saving effect throughout the entire cycle.
Smart Images

Figure CN123114236A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power consumption management technology for computing devices, and more specifically to a dynamic power consumption management method and system for intelligent converged terminals. Background Technology
[0002] The intelligent converged terminals in the distribution network IoT can handle multi-source data acquisition, protocol processing, local analysis, data caching, event alarms, and communication uploading. These terminals typically use a fixed power supply and operate online for extended periods. There are low-load periods between adjacent acquisition or uploading tasks. By adjusting the processor performance level, utilizing the processor's idle state, and putting some peripherals into low-power states, the overall power consumption and continuous heat generation can be reduced.
[0003] Existing power management methods for computing devices already include scheduling tasks based on deadlines, merging shared peripheral usage periods, comparing the benefits of hibernation with the costs of state switching, and scheduling recovery order. Runtime power management frameworks can also determine whether a device should be suspended based on device usage counts, active sub-devices, and in-transit access. These processes provide the foundation for terminal power saving.
[0004] However, when hardware resources transition from an operational state to a low-power state, they may pass through an entry phase that cannot be immediately reversed. Resource recovery may also depend on the readiness of upstream hardware resources or wait for control paths occupied by other recovery transactions. Judging whether power saving is possible solely based on the recovery time after entering a stable low-power state cannot reflect the blocking time when a sudden event arrives precisely during the overlapping period of multiple state transitions. Even if the recovery time required for each hardware resource individually does not exceed the allowable range for the business, the combined entry phase and shared recovery occupancy may still cause the complete event processing to exceed the allowed response time.
[0005] Furthermore, after removing a power-saving action, preserving upstream hardware resources, or staggering the entry timing to meet event response requirements, the actual low-power dwell time and overall system state combination have changed. If the power difference and dwell time before the adjustment are still used to calculate the benefits, power-saving benefits that cannot be actually executed may be used to allow subsequent power-saving actions.
[0006] In summary, the technical problem that needs to be solved is: when tasks share hardware resources and there are irreversible entry phases and mutual exclusion relationships for recovery, how to identify the event response risks in the joint state transition before executing power reduction actions, and make a complete cycle net energy saving judgment based on the actual executable adjustment results, so that task scheduling and hardware resource state control correspond to each other. Summary of the Invention
[0007] The purpose of this application is to provide a dynamic power consumption management method and system for intelligent converged terminals, which solves the problems that recovery blocking during joint state transitions is not fully factored into event response judgment, and that the original energy-saving benefits are still used after adjusting power-saving actions.
[0008] In view of the above problems, this application provides a dynamic power consumption management method and system for intelligent converged terminals.
[0009] The first aspect of this application provides a dynamic power consumption management method for an intelligent converged terminal, the method comprising: Obtain the task's execution time limit and resource requirements, the state transition stages of hardware resources, ready dependencies, and mutual exclusion relationships of shared recovery control resources; Based on the execution time limit and resource requirements, combined with the ready dependencies and mutual exclusion relationships, a candidate execution plan is generated that includes task execution, resource recovery, and power reduction actions; Before executing the power reduction action, for each joint intermediate state formed by the power reduction action and the current in-transit stage, the upper bound of the response time of the mandatory event task is determined according to the remaining irreversible time of the state transition stage, the occupation of the shared recovery control resources, the order of resource recovery and task execution. Based on the comparison between the upper bound of the response time and the allowed response time of the mandatory event task, the power reduction action is adjusted to obtain an adjusted execution plan that meets the task execution time limit; Based on the aforementioned adjustment execution plan, taking into account the energy consumption of power reduction, low-power residence, resource recovery, and power management, determine the net energy savings relative to the full cycle of maintaining resource availability; When the net energy saving of the complete cycle meets the energy saving conditions, the task execution and hardware resource status are controlled according to the adjustment execution plan, and the power reduction actions that have not yet been executed are re-verified when the task or state transition phase changes.
[0010] Optionally, the state transition phase includes a preparation suspension phase, an irrevocable entry phase, a low-power phase, a recovery phase, and a readiness confirmation phase. The irreversible entry stage is the state transition stage of the recovery path that must be completed before a recovery request can be entered after the current stage is received; the ready dependency relationship is used to indicate other hardware resources that need to reach a specified ready state before the hardware resource can perform a specified operation; the mutual exclusion relationship is used to indicate operations that cannot occupy the same shared recovery control resource at the same time. The mandatory event task is an event task that is pre-registered with an execution time limit, resource requirements, and arrival constraints. The arrival constraints include the number of tasks allowed to arrive within a specified time interval. The allowed response time is the longest allowed time from arrival to completion of the mandatory event task.
[0011] Optionally, based on the execution time limit and resource requirements, and in conjunction with the ready dependencies and mutual exclusion relationships, a candidate execution plan is generated that includes task execution, resource recovery, and power reduction actions, including: Based on the hardware resources and the state transitions supported by the corresponding drivers, the target states of the hardware resources are combined, and the target state combinations of event detection paths that cannot retain mandatory event tasks are excluded. According to the task processing order and the ready dependencies, set the order of task execution operations and resource recovery operations, and arrange the order of occupancy of shared recovery control resources according to the mutual exclusion relationship; Schedule resource recovery operations and task execution operations backward from the task's execution time limit, determine the latest start time for recovery, and check the earliest execution time and completion time of the task in a forward direction; In the arrangement that meets the task execution time limit, power reduction actions and low-power dwell intervals are set to form the candidate execution plan.
[0012] Optionally, the sequence of task execution operations and resource recovery operations is set according to the task processing order and the ready dependencies, and the order of occupancy of shared recovery control resources is arranged according to the mutual exclusion relationship, further including: For multiple tasks that can be served by the same resource recovery operation, record the set of beneficiary tasks corresponding to the resource recovery operation, and keep the recovered hardware resources in the ready state required by the set of beneficiary tasks. For resource recovery operations that do not have ready dependencies and mutual exclusion relationships, set parallel execution relationships and make each subsequent dependent operation start after the resource recovery operation it depends on has completed and reached the required ready state. Once a task in the set of beneficiary tasks is completed, the resource requirements of the completed task are removed. Power reduction actions are allowed on the hardware resources only when the set of beneficiary tasks no longer requires the corresponding hardware resources to remain ready.
[0013] Optionally, before executing the power reduction action, for each joint intermediate state formed by the power reduction action and the current in-transit stage, the upper bound of the response time of the mandatory event task is determined according to the remaining irreversible time of the state transition stage, the occupation of the shared recovery control resources, and the order of resource recovery and task execution, including: Based on the currently confirmed state transition phases and the state transition phases through which the power reduction action has been performed, determine the joint intermediate states that need to be checked. For each joint intermediate state, irrevocable in-transit operations are retained, the upper bound of the remaining irrevocable time of the corresponding stage is used as the blocking time before recovery, and the resource occupation caused by the mandatory event tasks that satisfy the arrival constraints and the accepted tasks is added. Based on the order of resource restoration and task execution, as well as the mutual exclusion relationship, the processing operations of resource restoration, readiness confirmation, and mandatory event tasks are arranged to obtain the upper bound of the time taken for mandatory event tasks from start to finish, and a safety margin is included to obtain the upper bound of the response time.
[0014] Optionally, based on the comparison between the upper bound of the response time and the allowable response time of the mandatory event task, the power reduction action is adjusted to obtain an adjusted execution plan that meets the task execution time limit, including: When the upper bound of the response time corresponding to any joint intermediate state exceeds the allowed response time of the mandatory event task, delete the power reduction action that puts the shared upstream hardware resources into a low-power state, or change the target state to another low-power state supported by the driver, or postpone the power reduction action to eliminate the overlap of the entry stage. The upper bound of the response time is redefined for the joint intermediate state formed after each adjustment, and the completion time of the accepted tasks is re-examined. The adjustment execution plan is determined by ensuring that both the mandatory event tasks and the accepted tasks meet the execution time limit. If there is no arrangement that meets the execution time limit, the corresponding power reduction action is abandoned while keeping the required hardware resources available.
[0015] Optionally, according to the adjusted execution plan, taking into account the energy consumption of power reduction, low-power dwell, resource recovery, and power management, the net energy saving relative to the complete cycle of maintaining resource availability is determined, including: Acquire power measurement data from the terminal input, or acquire the joint state power table and state transition energy calibrated based on the power measurement data from the terminal input; Set a comparison period with the same initial state, the same effective tasks, and the same data quality requirements, so that the effective tasks are completed within the comparison period of the two execution arrangements, and so that the execution plan that adjusts the execution plan and the execution arrangement that maintains the availability of resources have the same ending state, or include the energy consumption of converting different ending states into the same ending state. The total energy consumption of the machine within the comparison period is accumulated separately. The energy consumption for state saving, communication readiness confirmation, required communication reconstruction and retry is included in the corresponding execution schedule, and the energy consumption of the transition interval and the stable state interval is not accumulated repeatedly. The net energy saving for the complete cycle is obtained by subtracting the upper limit of the overall energy consumption of the adjusted execution plan from the lower limit of the overall energy consumption to maintain resource availability. The energy saving condition is that the net energy saving for the complete cycle is greater than the positive energy saving margin determined based on the measurement error.
[0016] Optionally, when the net energy saving of the complete cycle meets the energy-saving conditions, the task execution and hardware resource status are controlled according to the adjustment execution plan, and the power reduction actions that have not yet been executed are re-verified when the task or state transition phase changes, including: Set a plan version for the adjusted execution plan, and set a corresponding plan version, expected pre-state, and expected completion state for each state transition stage for the control command; after confirming that there are no in-transit access, shared resource requirements, or incomplete data submissions that would prevent suspension, call the driver interface in the order of resource dependencies and receive stage receipts; When the actual state before a new task arrives and is executed is inconsistent with the expected pre-state or when the stage receipt is inconsistent with the expected completion state of the corresponding state transition stage, the affected plan version is invalidated, the corresponding unexecuted power reduction action is prohibited, and the task execution and resource recovery are rearranged according to the current actual state. For hardware resources that have entered the irreversible entry stage, wait for the current stage that must be completed to finish before switching to the recovery path; for hardware resources that are still referenced by other tasks, retain the corresponding ready state.
[0017] Optionally, when the net energy saving of the complete cycle meets the energy-saving conditions, the task execution and hardware resource status are controlled according to the adjusted execution plan, and the power reduction actions that have not yet been executed are re-verified when the task or state transition phase changes, further including: The actual time consumed by the state transition phase is recorded according to the phase receipt and compared with the time upper bound of the corresponding state transition phase used to determine the upper bound of the response time. When the actual time exceeds the upper time limit, cancel the affected but not yet executed power reduction action, remove the corresponding low power state from the allowed state set, and recheck the task completion time with an update time not less than the actual time. Record the total power consumption and task completion status of the entire cycle, and correct the joint state power table or state transition energy used for net energy saving judgment based on the power measurement data of the terminal input terminal; after recalibration and passing the response time check of the joint intermediate state, add the corresponding low power consumption state to the set of allowed states.
[0018] A second aspect of this application provides a dynamic power consumption management system for an intelligent converged terminal, the dynamic power consumption management system of the intelligent converged terminal comprising: The runtime information acquisition module is used to acquire the task's execution time limit and resource requirements, the state transition stage of hardware resources, ready dependencies, and mutual exclusion relationships of shared recovery control resources, and send them to the execution plan generation module. The execution plan generation module is used to generate a candidate execution plan that includes task execution, resource recovery and power reduction actions based on the execution time limit and resource requirements, combined with the ready dependencies and the mutual exclusion relationships, and send it to the joint phase verification module. The joint phase verification module is used to determine the upper bound of the response time of the mandatory event task before executing the power reduction action, based on the remaining irreversible time of the state transition phase, the occupation of the shared recovery control resources, and the order of resource recovery and task execution, for each joint intermediate state formed by the power reduction action and the current in-transit phase; and to adjust the power reduction action according to the comparison result between the upper bound of the response time and the allowed response time of the mandatory event task, so as to obtain an adjusted execution plan that meets the task execution time limit, and send it to the net energy saving judgment module. The net energy saving judgment module is used to determine the net energy saving relative to the full cycle of maintaining resource availability, by taking into account the energy consumption of power reduction, low power consumption residence, resource recovery and power management according to the adjustment execution plan, and sending the adjustment execution plan and the net energy saving of the full cycle to the status execution control module. The state execution control module is used to control the task execution and hardware resource status according to the adjustment execution plan when the net energy saving of the complete cycle meets the energy saving conditions, and to send the task changes and state transition phase changes to the operation information acquisition module so that the joint phase verification module can re-verify the power reduction actions that have not yet been executed.
[0019] The technical solutions provided in this application have at least the following technical effects or advantages: Before executing a power reduction action, the joint intermediate state formed by the power reduction action and the current in-transit stage is used as the inspection object. The entry stage that must be completed first, the waiting for shared recovery control resources, resource recovery, and event handling are placed in the same time schedule, which can identify entry stage response timeouts that cannot be detected by checking only the stable low-power state. The power reduction action is directly deleted, replaced, or postponed based on the comparison result, so that the verification result corresponds to the actual hardware resource state changes.
[0020] For adjustments that meet time constraints, the execution plan re-accumulates low-power residency and state transition energy consumption. This allows changes in power and residency time caused by retaining upstream hardware resources or staggering entry timing to be included in net energy saving judgment, preventing the use of the benefits of deleted power reduction actions as the basis for execution. The complete cycle also includes state saving, recovery, communication readiness, and power management overhead, thus excluding actions where the expected residency is insufficient to offset switching costs.
[0021] By registering the set of beneficiary tasks for the same resource recovery operation and ensuring that control commands correspond to the planned version and actual stage feedback, completed recovery operations can be reused when unexpected tasks arrive, undoing unexecuted old actions, and preventing the erroneous release of hardware resources still needed by other tasks after a single task ends. These effects arise from specific processing relationships and are not contingent on accurate task arrival predictions or positive benefits from every power-saving action. Attached Figure Description
[0022] Figure 1 A flowchart illustrating the dynamic power consumption management method for the intelligent fusion terminal provided in this application.
[0023] Figure 2 A schematic diagram of the functional modules of the dynamic power consumption management system for the intelligent fusion terminal provided in this application.
[0024] Figure 3 This is a schematic diagram of hardware resource readiness dependencies and shared recovery control resources in the embodiments of this application.
[0025] Figure 4 This is a schematic diagram of the hardware resource state transition stage and the abnormal recovery branch in the embodiments of this application.
[0026] Figure labeling: 11 Operation information acquisition module, 12 Execution plan generation module, 13 Joint phase verification module, 14 Net energy saving judgment module, 15 Status execution control module. Detailed Implementation
[0027] The present application will be described below with reference to the accompanying drawings and embodiments. The hardware configuration, duration, power, energy, and decision margin in the embodiments are design assumptions or illustrative parameters used to explain the processing procedure. Before implementation, the corresponding parameters should be determined based on target platform data, driver behavior, response time analysis, and stress calibration. Low-power states that do not obtain an effective upper bound on latency or reliable wake-up conditions are not added to the allowed state set.
[0028] Example 1 like Figure 1 As shown, this embodiment provides a dynamic power consumption management method for intelligent converged terminals. The dynamic power consumption management method for intelligent converged terminals is executed locally on the terminal, using enumerable hardware states, task processing order, and time budgets to make judgments. It does not rely on continuous cloud computing, nor does it require additional dedicated power consumption control hardware.
[0029] The intelligent fusion terminal in this embodiment is used for multi-source data acquisition and local processing in a distribution network. It is powered by a fixed 12V DC power supply and configured with no fewer than five processor cores, one of which is a real-time core. The rated operating frequency of the application processing core is no less than 1 GHz. The memory capacity is no less than 2 GB, and the data storage area of the non-volatile memory is configured in pSLC (pseudo-single-level cell) mode. After pSLC configuration, this data storage area provides an effective logical capacity of no less than 16 GB to the system. The application processing core can run an embedded Linux system with processor performance management, processor idle state management, and device runtime power consumption management capabilities. The processor performance level and low-power state are subject to the actual capabilities supported by the platform and corresponding drivers. The pSLC mode is used as a storage configuration for non-volatile memory and is not considered a low-power state switched during the operation of this method.
[0030] like Figure 3 As shown, the processor, memory, non-volatile storage, native acquisition interface, general-purpose input / output interrupts, timers, and watchdog timer constitute a continuously available path. The native acquisition interface can be a UART or RS485 interface, responsible for continuously receiving data and key acquisitions; general-purpose input / output interrupts and timers handle event detection and timed recovery. The terminal does not enter a system sleep state that disables this continuously available path; the processor only uses a shallow idle state that can be woken up by this continuously available path. Functions involving protection actions or emergency interlocks are implemented by independent normally open paths and are not treated as tasks that can be delayed.
[0031] The managed hardware resources include a USB host, a polling acquisition expansion interface, and a communication module. USB stands for Universal Serial Bus, UART for Universal Asynchronous Receiver / Transmitter, RS485 for the differential serial interface standard used in this embodiment, and KiB and MiB for 1024 bytes and 1024 square bytes, respectively. The USB host allows partial clock shutdown and port power retention when the sub-device is not in transit; the polling acquisition expansion interface is used only for non-protective periodic polling, allowing polling to be paused but not handling asynchronous event detection during sleep periods; the communication module employs a shallow low-power state that maintains registration and power supply, and has the ability to initiate internal recovery from continuously available general-purpose input / output pins. If the target platform does not possess these capabilities, the corresponding low-power state should be removed, and software commands should not be interpreted as hardware support for that state.
[0032] The internal recovery of the communication module can overlap with the recovery of the USB host or the polling acquisition expansion interface; however, the USB interface recovery of the communication module requires the USB host to be ready first. In this embodiment, the polling acquisition expansion interface recovery transaction and the USB interface recovery transaction of the communication module use the same non-reentrant recovery control path. This non-reentrant recovery control path is a shared recovery control resource, and the two recovery transactions cannot overlap. Normal data reading after the polling acquisition expansion interface recovery does not occupy the shared recovery control resource and can overlap with the USB interface recovery of the communication module. The transmission wait caused by the shared USB bus is separately included in the wall clock time of the corresponding operation.
[0033] The mutual exclusion relationship of shared recovery control resources is confirmed by driver locks, firmware control paths, or control transaction records, and is not automatically established simply because two devices belong to the same USB host. If the actual driver allows two recovery transactions to run concurrently, the corresponding mutual exclusion relationship is canceled, and the timing is rescheduled. Power supply, clock, and access dependencies between hardware resources are also registered separately; it cannot be inferred from the hardware name that each hardware resource can be independently powered off.
[0034] To differentiate time quantities, this embodiment registers the task execution time limit as arrival time or release time, earliest execution time, and completion deadline time. For mandatory event tasks, an allowable response time is also registered, and the completion deadline time for mandatory event tasks is obtained by adding the allowable response time to the arrival time. The upper bound of the response time is the duration from arrival to completion, compared with the allowable response time; the completion time in the schedule is compared with the completion deadline time. All time calculations use the same monotonic clock to avoid the influence of system time correction on the judgment.
[0035] The tasks are categorized by default into critical acquisition tasks, periodic analysis tasks, polling acquisition tasks, batch upload tasks, data processing tasks, and mandatory event tasks. Critical acquisition tasks have a cycle of 100ms, a relative completion deadline of 50ms, and a processor computation budget of 2ms. Periodic analysis tasks have a cycle of 1s, a relative completion deadline of 200ms, and a processor computation budget of 20ms. Critical acquisition and periodic analysis tasks use a continuously available path and do not rely on the low-power wake-up of the polling acquisition extension interface.
[0036] The polling data collection task has a cycle of 10 seconds, a relative completion deadline of 1 second, and an interface read budget of 40 milliseconds. The batch upload task, by default, generates a batch of no more than 64 KiB of data to be uploaded every 10 seconds, with a allowed delay of 5 seconds. The processor computation budget is 120 milliseconds, and the budget for submitting data locally to the communication module is 80 milliseconds. The sorting task has a cycle of 30 seconds, with a allowed delay of 5 seconds, a processor computation budget of 200 milliseconds, and a preemptible point is set at the completion of each block. Allowing a delay means rescheduling between the earliest execution time and the completion deadline; it does not change data quality requirements or delete the task.
[0037] The allowed response time for critical local alarms is 100ms, with event detection, necessary judgment, and local output completed by a continuously available path. Event tasks requiring the acquisition of extended data and submission of detailed alarms to the communication module are registered as mandatory event tasks, with an allowed response time of 500ms. Their completion condition is the successful local submission of the required data to the communication module, which has reached the specified communication readiness state; receiving data or receiving a confirmation response from the remote server is not a completion condition in this embodiment. The arrival constraint for mandatory event tasks is set to no more than one event within any 500ms interval. If the arrival constraint is exceeded, the original event is recorded, and critical local alarms are prioritized for protection; this does not mean that all detailed alarms will still be completed within 500ms.
[0038] The terminal allocates 8 MiB in memory as a pending-processing cache. When the cache occupancy reaches 70% of its capacity, defragmentation or persistence is triggered. When it reaches 85%, related tasks are postponed, and the performance level prioritized for critical tasks is adopted. The default persistence interval is 2 seconds. If a service requires that certain records not be lost after a power outage, these records are only considered persistent after being committed to non-volatile memory; memory enqueueing cannot replace persistence confirmation. The write tail latency of non-volatile memory should be calibrated under the configured pSLC mode and actual read / write load conditions. The pending-processing cache capacity and the persistence interval should be determined in conjunction with the data generation rate, persistence requirements, and memory lifespan.
[0039] S101, obtain the task's execution time limit and resource requirements, the state transition stages of hardware resources, ready dependencies, and the mutual exclusion relationships of shared recovery control resources.
[0040] Specifically, the local task scheduling interface writes task records when a task is created or its attributes are changed. The task record includes the task identifier, version, release time, earliest execution time, completion deadline, processing stages and order, execution time budget for each processing stage under the available processor performance level, required hardware resources and their readiness status, non-preemptible intervals, preemptible points, data volume, and completion conditions. The task record for mandatory event tasks also includes the allowed response time and arrival constraints. Mandatory event tasks that have not yet arrived participate in the admission judgment according to the registered arrival constraints; they cannot only check tasks already existing in the current queue.
[0041] Hardware resource information is obtained from the platform capability table, device tree or board-level configuration, driver query interface, and runtime receipts. This includes the actual supported operating states and low-power states, state transition order, completion conditions for each stage, revocable flags, entry time, upper bound of execution time, ready dependencies, mutual exclusion relationships of shared recovery control resources, and event detection and wake-up sources. Hardware resource information also includes the number of read / write operations in transit, active sub-devices, usage count, cache or transfer commit status, and the most recently confirmed ready state. Static capabilities and operating states are recorded separately; the former cannot overwrite the latter's exception receipts.
[0042] like Figure 4 As shown, the normal state transition sequentially passes through the running state, the preparation suspension phase, the irrevocable entry phase, the low-power phase, the recovery phase, and the readiness confirmation phase, before returning to the running state. The preparation suspension phase disables new access, checks existing access, and saves necessary states; if it can be undone, it directly returns to the running state. The irrevocable entry phase represents the current phase that must be completed even after a recovery request arrives. The recovery phase can be further divided according to power, clock, controller, interface, and communication readiness conditions, but only phases observable or conservatively defined by the target platform are used.
[0043] When the driver cannot report its internal sub-stages, the entire suspended callback is treated as an irreversible entry stage, and a conservative time record is established using the callback entry time and completion receipt. After the recovery callback returns, the required registers, interfaces, and communication status must be verified; a sent recovery command cannot be considered ready. Each stage records its start time and completion conditions; the remaining time is calculated by subtracting the elapsed time from the corresponding upper time bound only if the upper time bound remains valid. If no completion receipt is received after exceeding the upper time bound, the stage is marked as abnormal, and the remaining time must not be zero.
[0044] The task execution time budget is determined based on the actual processor cores deployed, implementation path, maximum data length, actual performance level used, and allowed preemption conditions, and includes the wait time caused by other processor cores accessing shared memory, bus, and related hardware resources. The device recovery budget is determined by combining constraints in the platform documentation, driver analysis, and stress measurements under actual power supply, temperature, and load conditions. When the number of processor cores, core type, or performance level changes, the execution time budget of the affected tasks should be reconfirmed, and should not be directly converted according to the number of cores or clock speed ratio. Statistical averages cannot be used as worst-case time guarantees for critical tasks. Test maximum values can be used as calibration basis, but should be combined with analyzable blocking, retry limits, and measurement margins to form a conservative upper bound with clearly defined applicable conditions; if an upper bound cannot be confirmed, the use of low-power states dependent on that upper bound should be discontinued.
[0045] The S101 outputs a consistent version of task records and hardware resource information. Under normal circumstances, a snapshot is updated every 1 second; it is updated immediately upon the arrival of a new task, cache overrun, device stage change, recovery timeout, or driver failure. The budgeted computation time for a single search is 5ms; if the budgeted computation time is exceeded, the search is stopped, already accepted task assignments are retained, and the necessary hardware resources are requested to remain available. Power-saving actions are not implemented based on incomplete search results.
[0046] S102, based on the execution time limit and the resource requirements, and combined with the ready dependencies and the mutual exclusion relationships, generate a candidate execution plan that includes task execution, resource recovery and power reduction actions.
[0047] Specifically, taking the task records and hardware resource information output by S101 as input, candidate combinations are first formed based on the actual state combinations supported by the driver. For the USB host controller, polling acquisition expansion interface, and communication module in this embodiment, running states or calibrated low-power states are selected respectively to form a finite combination, and combinations that do not meet power supply or clock dependencies, have event detection paths closed, do not allow usage counts to be suspended, and have invalid upper bounds for time consumption are excluded in sequence. The performance level of the application processing core is selected only from the levels actually supported by the platform and the corresponding driver, and the task time budget under the corresponding processor core and performance level is used. For processor cores that share clock or power resources and cannot independently switch performance levels, the state combination is determined according to the actual linkage relationship; the running state of the real-time core is recorded according to the actual capabilities of the platform, and the performance level of the application processing core is not directly used for the real-time core. State combinations that cannot retain the processing capacity required for the accepted tasks or the continuously available paths are not adopted.
[0048] For retained combinations, the task processing phase, resource recovery operations, readiness confirmation operations, and irreversible in-transit operations are included in the time schedule. The task processing order and readiness dependencies specify the operations that must be completed first; the mutual exclusion relationship of shared recovery control resources specifies the non-overlapping occupancy intervals. For a small number of recovery transactions, they are arranged from earliest to latest according to the completion deadline of accepted tasks, and feasible occupancy orders are tried on the same shared recovery control resource; if no feasible order is found within the budget, the combination is abandoned, which does not mean that the global minimum energy consumption has been found.
[0049] First, subtract the time spent on subsequent processing, readiness confirmation, and recovery from the completion deadline, placing the relevant recovery transactions into the unoccupied time interval to obtain the latest start time for recovery. Then, check forward from the current time: task processing operations must not be earlier than the earliest execution time of the task; resource recovery and readiness confirmation operations can be scheduled before task processing begins. Each operation must not be earlier than the completion time of its required prerequisite operations and the availability time of the required shared recovery control resources; the completion time of each operation is the start time plus the corresponding wall clock time budget. If any accepted task is later than the completion deadline, the occupancy order is adjusted or the combination is abandoned.
[0050] Operations without ready dependencies or mutual exclusions are allowed to run concurrently. Subsequent operations only wait for their actual preceding operations, and cannot wait for all concurrent operations without a basis. For multiple tasks that can be served by the same resource recovery operation, a set of benefiting tasks is established, and the ready status and end-of-use conditions required by each task are recorded. After a task in the benefiting task set completes, only the resource requirement of that task is removed; if other tasks still have requirements, valid references to the hardware resources and their dependent resources are retained.
[0051] A power-reduction action is scheduled between the end of the current activity task and the latest start time of recovery. After deducting the preparation suspension and entry phase time, a low-power residence interval is obtained. Each candidate execution plan records the task execution time, the start and end budgets of the recovery operation, the shared recovery control resource occupancy interval, the set of beneficiary tasks, the power-reduction action, the target state, and the low-power residence interval. This candidate execution plan is the input to S103 and is not directly used as an execution instruction.
[0052] S103, before executing the power reduction action, for each joint intermediate state formed by the power reduction action and the current in-transit stage, determine the upper bound of the response time of the mandatory event task according to the remaining irreversible time of the state transition stage, the occupation of the shared recovery control resources, the order of resource recovery and task execution.
[0053] Specifically, starting from the currently confirmed hardware resource stages, the necessary stages for each power reduction action and possible combinations overlapping with other in-transit stages are listed according to the candidate execution plan. The joint intermediate state consists of the stage of each hardware resource, the remaining irreversible time of the stage, the readiness status of the required upstream hardware resources, and the occupancy of shared recovery control resources. Actions that have not yet started are designated as planned actions, while actions that have entered irreversible stages are reserved as in-transit operations.
[0054] During the check, it is assumed that mandatory event tasks arrive within each joint intermediate state. Preparation suspension actions that can be immediately cancelled will not advance to a low-power state; non-cancellable operations must be completed first. A blocking interval is added before recoverable operations, based on a conservative upper bound of the remaining irreversible time. Mandatory event tasks that may still overlap with the current response are added according to the registered arrival constraints, and processor budget, non-preemptible intervals, and shared hardware resource occupancy are reserved for accepted critical tasks. The actual state of an event that has occurred takes precedence over the registered budget of an event that has not yet occurred; the two cannot be counted twice in the same event.
[0055] Subsequently, recovery operations, readiness confirmation operations, and data reading, processing, and commit operations for mandatory event tasks are arranged according to readiness dependencies and mutual exclusion relationships. The start time of each operation is the time after all its preconditions are met and the required mutual exclusion occupancy ends. Internal recovery, data reading, or processing operations that can be parallelized are maintained in parallel; recovery control transactions that cannot be parallelized are executed in occupancy order. The upper bound of the response time is obtained by adding the portion of the detection scheduling overhead not yet included and a safety margin to the difference between the completion time of the last required operation of the mandatory event task and its arrival time, thus avoiding repeated timing of already included waits.
[0056] To cover the entire phase process, the maximum remaining irrevocable time and maximum in-transit occupancy that may occur within a phase combination are used, rather than sampling only a specific moment. State transition start, completion, mutual exclusion occupancy change, and task release are used as combination boundaries. With accepted tasks and arrival constraints unchanged and the upper bound valid, the remaining irrevocable time within a phase will only decrease; therefore, the maximum remaining time is used for a conservative assessment. Intervals where the upper bound of occupancy within the combination cannot be determined are not allowed entry; if a new task, receipt, or budget invalidation changes the above conditions, a re-examination is immediately performed.
[0057] In this embodiment, the detection and scheduling budget is 10ms, with a safety margin of 10ms. The detection and scheduling budget includes no more than 5ms of power management processing time for this operation, and is not added again to the upper bound of the response time. The recovery, reading, processing, and submission times are all wall clock time budgets under the selected performance level and the set of accepted tasks, including scheduling waits and shared bus contention, and do not indicate that the relevant operations continuously monopolize the processor. The 2ms computation budget for critical acquisition tasks every 100ms and the 20ms computation budget for periodic analysis tasks every 1s are both included in the determination of the above time budgets.
[0058] One implementation involves providing at least two processor cores capable of handling application tasks on the platform. Critical acquisition and periodic analysis tasks retain execution budgets on one application core, while recovery coordination and mandatory event handling tasks are executed on another. Interrupts and recovery callbacks are scheduled within the driver support range. Whether a real-time core handles the tasks involved in this method is determined based on the actual task deployment on the platform. The operating status and shared resource usage of the real-time core and other processor cores, when affecting the task execution or overall system power consumption, are included in the corresponding time budget and power records. The above-mentioned inter-core task division does not eliminate interference caused by shared memory, buses, and non-migratable kernel operations; related interference is still included in the upper bound of the time consumption. If the actual platform cannot confirm the time budget of this embodiment, the corresponding budget should be increased and re-verified; the response results of the example should not be used. S103 outputs the upper bound of the response time for each joint intermediate state and the blocking interval that leads to timeout to S104.
[0059] S104, based on the comparison result between the upper bound of the response time and the allowed response time of the mandatory event task, adjust the power reduction action to obtain an adjusted execution plan that meets the task execution time limit.
[0060] Specifically, the response time upper bound obtained in S103 is compared with the corresponding allowed response time. When all joint intermediate states meet the requirements and all accepted tasks in the forward check are completed on time, the current arrangement is retained; otherwise, the power-saving action that increases the blockage in the recovery chain is identified, and attempts are made sequentially to remove the power-saving action sharing upstream hardware resources, use another low-power state that is supported by the driver and has been calibrated, or postpone a certain entry stage to eliminate stage overlap. Shared upstream hardware resources refer to hardware resources on which the recovery or access of multiple hardware resources commonly depends.
[0061] After each deletion, replacement, or postponement, the affected joint intermediate state is regenerated, the upper bound of the response time and the completion time of accepted tasks are recalculated, and the low-power dwell interval and occupancy arrangement are redefined. Unrelated state combinations can retain their original check records, but reuse is only allowed if the task, resource, and parameter versions used are consistent. If no adjustment meets the time limit requirements, the corresponding power reduction action is abandoned while maintaining the availability of the required hardware resources.
[0062] The adjustment execution plan output by S104 includes the actual state combination to be executed, the entry and recovery times, and the task schedule. After removing the power reduction action of the USB host, the adjustment execution plan clearly states that the USB host remains available and cannot continue to use the power of the USB host in its low-power state in subsequent energy assessments.
[0063] S105, according to the adjustment execution plan, taking into account the energy consumption of power reduction, low power residence, resource recovery and power management, determine the net energy saving relative to the full cycle of maintaining resource availability.
[0064] Specifically, the overall power consumption is based on the active input power formed by the voltage and current at the terminal input. If the terminal has a power management chip or input measurement circuit, the calibrated voltage, current, and sampling time are read. If the terminal lacks this capability, an external power analyzer is used during the equipment calibration phase to measure and establish a joint state power table and state transition energy record. During operation, the power consumption is estimated based on the actual state and duration. It is important to note that the latter is explicitly an estimated energy consumption, and processor utilization is not directly used as the overall power consumption.
[0065] The combined state power meter records the lower and upper bounds of the system power according to the processor performance level, hardware resource state combination, typical effective load, and applicable temperature and voltage range. Each combination is maintained and measured repeatedly, recording instrument error, repeatability differences, and load variation range. Module increments are recorded only when they are identifiable; when determining the combined state power of the entire system, the power of the same module is not superimposed. Entries that cannot cover the current state or environment are marked as invalid, and reliance on these entries is prohibited from allowing new power reduction actions.
[0066] The combined state power meter and state transition energy in this embodiment should be calibrated under 12V input power conditions, taking into account the actual operating state of the processor cores and core groups, memory configuration, and pSLC configuration of non-volatile memory. Measurements at the system input terminals should cover all processor cores, storage resources, peripherals, and power conversion losses, not just the processor cores executing power management programs. When power supply conditions or hardware configurations change, the affected power meter entries and state transition energy should be recalibrated, and should not be directly converted according to the proportion of input voltage, number of processor cores, or storage capacity.
[0067] State transition energy is obtained by integrating the intervals for entering, saving, recovering, interface verification, and actual communication reconstruction. Communication re-registration, authentication, or retries are only included when the target state truly requires them and the time and number of attempts can be defined; undefined remote network wait times are not considered as fixed recovery times. The energy added by the management algorithm itself for reading, planning, verifying, sending, and acknowledging is measured or estimated separately; if it is already included in the whole-machine time segment integration, it is not added again.
[0068] The comparison period begins when two execution arrangements have the same initial task, cache, and hardware state, and extends until both valid tasks are completed under the same data quality requirements. At the end, the same set of incomplete tasks, cache commit status, and hardware state are maintained; if they cannot be directly identical, the energy required to restore to the common completion state is factored in, and task completion is continuously verified. Simply postponing a task beyond the comparison period is not considered an energy saving.
[0069] The comparison period is divided into non-overlapping stable residence intervals and state transition intervals. The stable residence interval is calculated by multiplying the corresponding total power by the duration; the state transition interval is calculated using integrated energy or calibrated state transition energy. The energy consumption for maintaining resource availability and adjusting execution plans are accumulated separately to obtain the lower bound of the former and the upper bound of the latter. The difference between the two is the net energy saved for the entire cycle used for admission. When using incremental accounting, the accumulated power difference in the residence interval and the energy increment relative to maintaining availability in the transition interval have the same meaning. The power integral of the entire transition interval and the transition energy records of the same interval must not be accumulated simultaneously.
[0070] The energy-saving condition is met only when the net energy saving for the entire cycle is greater than the positive energy-saving margin. The energy-saving margin is determined based on measurement error, power meter deviation, and energy accounting resolution; in this example, it is taken as 0.20J. For cases of frequent switching purely due to short-term idle periods, the planned low-power dwell time is also required to be no less than 2 seconds; this condition does not cover response time checks and net energy saving judgments.
[0071] The arrival of a new task causes the low-power dwell time to end prematurely. Prioritizing the fulfillment of task requirements, the actual net energy saving for a single action may be negative, and continued sleep is not used to compensate for energy consumption already incurred. Initial decisions use the full cycle cost; replanning after partial execution only compares the energy of the subsequently modifiable portion. Energy already incurred is recorded as a fact in the cycle record and is not repeatedly deducted from multiple candidates. S105 outputs the adjusted execution plan, the net energy saving for the full cycle, and whether the energy-saving conditions are met.
[0072] S106, when the net energy saving of the complete cycle meets the energy saving conditions, control the task execution and hardware resource status according to the adjustment execution plan, and re-verify the power reduction actions that have not yet been executed when the task or state transition phase changes.
[0073] Specifically, a plan version is assigned to the execution plan through S105. Each control instruction includes a hardware resource identifier, target status, allowed execution time, corresponding plan version, expected prerequisite status, and expected completion status of each observable state transition stage. Before issuance, the plan version is checked in the same protected status record to ensure it is still valid, the current stage matches the expected prerequisite status, task requirements have not increased, and there are no blocked pending accesses, active sub-devices, incomplete data collection, cached submissions, or transmissions. After the check passes, the action is recorded as submitted and the corresponding driver is invoked to avoid missing task changes between the check and submission.
[0074] Specific control can be achieved through the platform's actual processor performance management interface, switching performance levels for allowed application processing cores or shared performance management units, and restricting allowed idle states through the processor idle management interface. For real-time cores, only state control methods explicitly supported by the platform that do not affect accepted tasks and continuously available paths are used. The USB host control and polling acquisition expansion interface are controlled through the corresponding device runtime suspend and resume interfaces. The communication module uses manufacturer-supported shallow low-power instructions and continuously available general-purpose input / output wake-up; after the instruction is completed, the actual ready state of the communication module is checked. Resources without independent power switches are not powered down; sub-devices that must be controlled in conjunction with their parent devices execute according to the dependency order specified by the driver, and the parent device's ready condition is satisfied first upon resumption.
[0075] All managed power reduction actions are executed through a unified entry point. For driver-driven autonomous suspend strategies that conflict with the execution plan adjustment, their independent downward behavior is stopped, or the same joint phase check is performed in the suspend callback. Software plan version checks cannot replace runtime power management framework checks on usage counts and in-transit inputs and outputs. During suspend preparation, new normal accesses are blocked and existing accesses are waited for to complete; if in-transit accesses cannot be cleared within the allowed time, the suspend is canceled without forcibly truncating data.
[0076] The driver sends back a stage receipt upon completion of each observable stage. This receipt includes hardware resources, the actual stage, monotonic clock time, and success or failure status. Expected pre-stage status is used for pre-execution comparison, and expected completion status is used for comparing stage receipts with the same stage identifier. Normal intermediate stage receipts cannot be directly compared with the final target status; the final stage should also verify the target status. These two methods cannot be mixed. After successful readiness confirmation, access gating is released, and execution continues according to the saved transmission offset, commit flag, and task processing stage. Submitted but unconfirmed communication data is deduplicated or reconfirmed according to the service protocol; duplicate transmissions are not considered new valid tasks.
[0077] When a new task arrives, first establish valid references to the hardware resources and their dependencies for the new task, then invalidate the affected plan version and release old references that are no longer needed. Cancel any pending timers and control instructions that have not yet been executed; return to the running state for committed and reversible preparation suspension phases; hardware resources that have entered the irreversible entry phase enter the recovery path after completing the current phase that must be completed. Cancelling a plan only undoes subsequent software actions and does not mean that hardware transitions that have already occurred can be rolled back.
[0078] The continuously available event detection path writes the event type, arrival time, and necessary raw data to a reserved queue and notifies the state execution control module. The state execution control module immediately stops any unexecuted power-saving actions that conflict with the event, reschedules recovery using the current actual stage, and feeds back the task changes and stage changes to S101. Timed recovery is triggered by a continuously available timer. If the hardware wake-up source or event queue cannot be retained, the corresponding state combination is excluded in S102.
[0079] The actual time consumed is recorded in the stage feedback and compared with the corresponding state transition stage time upper bound used when determining the response time upper bound. If the actual time exceeds the upper bound, the upper bound is immediately invalidated, the affected unexecuted power reduction actions are canceled, and the corresponding low-power state is removed from the allowed state set; incomplete recovery continues to wait for the actual feedback and is processed according to the driver specifications, without forging readiness. Recalculating the current task schedule with a value not less than the observed time can identify unqualified states, but a single observation value cannot be directly identified as a new reliable upper bound.
[0080] When the terminal input power can be read, the joint state power table and state transition energy are corrected using a complete cycle record. Correction first widens the error range that cannot cover the observed results; reducing energy consumption or time upper bounds is done after recalibration covering the original applicable boundaries. The allowed state cannot be restored simply because of a normal recovery or a decrease in the average value. When there is no online power data, only the duration and task completion records are updated; the power table retains the offline calibrated version and is updated after the next measurement. Recalibration is performed through a joint intermediate state check and net energy saving judgment before allowing the corresponding low-power state again.
[0081] To suppress repeated switching, this embodiment stops the new power reduction action of the combination for 60 seconds if three premature recoverys occur within 60 seconds due to low-power dwell time of less than 2 seconds; the recovery required by the task is not limited by the waiting time. The energy saving margin and time budget are managed using version, and the same version is used for the same adjustment execution plan; parameter additions or failures immediately affect the admission, while parameter reductions only affect subsequent adjustment execution plans after recalibration.
[0082] If operational status data is missing, stage receipts are lost, the input power meter malfunctions, or timing is abnormal, the affected power reduction actions will no longer be approved. A recovery request will be sent to the driver, and a true readiness receipt will determine whether the task can continue. If an action fails, the failure stage will be recorded, and recovery will be achieved using a retry or reset method supported by the driver. The number of retries and the maximum waiting time will be set to the platform's defined upper limit. If confirmation is not possible, retries will not be allowed indefinitely, nor will it indicate that the faulty device has recovered. Power management failures will not cancel critical data collection and local alarms on the continuously available path.
[0083] When tasks are backlogged, further postponement of sorting or batch uploading should be halted. If necessary, select a processor performance level that meets the budget for critical tasks, but without exceeding platform temperature and power supply limits. If maximum availability performance, maintaining relevant hardware resources, and allowed scheduling still cannot meet all constraints, retain already accepted critical data collection and local alarms. Delay or reject new tasks based on business priority, and record affected tasks and the reasons for timeouts. When mandatory event arrival constraints are exceeded, save the original events. They can be merged and reported according to pre-defined business rules, but losing original data to appear on-time completion is prohibited.
[0084] Example 2 This embodiment provides a complete processing procedure with periodic tasks as the main focus and available idle time. The power, energy, task processing time, and resource recovery time in this embodiment, as well as in Embodiments 3 and 4, are merely example inputs used to illustrate the judgment process and calculation relationships, and are not considered as actual performance data of the aforementioned hardware configuration. When implementing the hardware configuration described in Embodiment 1, the task allocation of the processor core, the time consumed in each processing stage, the mutual exclusion relationship of resource recovery, and the overall energy parameters should be reconfirmed. The response time verification and the net energy saving judgment for the complete cycle should be re-executed using the confirmed parameters. Only when the actual parameters meet the conditions specified in the corresponding example input can the task arrangement and power reduction actions corresponding to that example be adopted. The initial time is 0s. The USB host controller, polling acquisition expansion interface, and communication module are all in running state, with no in-transit access; the critical acquisition tasks and periodic analysis tasks on the continuously available path are running normally. The next group of tasks requiring polling acquisition expansion interface and communication module will begin using relevant hardware resources at 8.00s, and the existing tasks allow this arrangement.
[0085] The upper bound for the irrevocable entry phase of the USB master controller is set at 50ms, and the upper bound for the recovery phase is set at 20ms. The upper bound for the irrevocable entry phase of the communication module is 60ms, with internal recovery triggered by general input / output taking 100ms, followed by USB interface recovery at 180ms. The upper bound for the irrevocable entry phase of the polling acquisition extension interface is 40ms, and recovery takes 200ms. Recovery of the polling acquisition extension interface and USB interface recovery of the communication module are mutually exclusive. The mandatory event task also requires 40ms for extended data reading, 30ms for data processing, and 50ms for local submission, with 10ms each for detection scheduling and safety margin. All budgets include accepted task interference according to the method in Example 1.
[0086] S102 first considers that all three hardware resources have entered a low-power state. If the check starts only from a stable low-power state, then the time after detection is taken as the relative zero point. The USB host controller recovers from 0 to 20ms, the communication module recovers from 0 to 100ms, the polling acquisition expansion interface recovers from 20 to 220ms, and the communication module's USB interface recovers from 220 to 400ms, occupying shared recovery control resources. Extended data reading occurs from 220 to 260ms, data processing from 260 to 290ms, both of which can finish before the communication module is ready. Local submission occurs from 400 to 450ms. After adding detection scheduling and safety margin, the upper limit of the response time is 470ms, which superficially does not exceed 500ms.
[0087] S103 further checks the joint intermediate state where the USB host has entered a low-power state and has 50ms of irreversible remaining time. Given that its sub-devices have already entered a low-power state, and considering the 50ms remaining irreversible time as the upper bound for blocking, the budget for USB host recovery and subsequent shared recovery transactions is correspondingly shifted back by 50ms. Although internal recovery within the communication module can still be parallelized, the waiting time before USB access cannot be eliminated. The local commit completion budget is delayed from 450ms to 500ms, and after adding detection scheduling and safety margins, it becomes 520ms, exceeding the allowed response time. Therefore, the USB host power reduction action cannot be executed.
[0088] S104 removes the power reduction action of the USB host controller, but retains the arrangement for the polling acquisition expansion interface and communication module to enter the low-power state. At this time, in the stable low-power state, the recovery of the polling acquisition expansion interface occupies the first 200ms, the internal recovery of the communication module is completed in parallel, the USB interface recovery then occupies 180ms, the local submission occupies another 50ms, and after adding detection scheduling and safety margin, it is 450ms.
[0089] The adjusted execution plan first puts the communication module into a low-power state from 0 to 0.06 seconds, and then puts the polling acquisition extension interface into a low-power state from 0.06 to 0.10 seconds. If there are 60ms remaining in the communication module's entry phase and the polling acquisition extension interface is still running, the total internal recovery, interface recovery, and submission, along with detection scheduling and margin, will not exceed 410ms. If there are 40ms remaining in the polling acquisition extension interface's entry phase and the communication module is already in a low-power state, the upper bound of the response time is 490ms. Under other identical conditions, the remaining phase time is reduced without generating a larger upper bound. This adjusted execution plan utilizes joint intermediate state checks.
[0090] Simultaneously, the polling acquisition extension interface recovery and the internal recovery of the communication module are initiated at 7.62s; the polling acquisition extension interface becomes ready at 7.82s, the internal recovery of the communication module is completed at 7.72s, and the USB interface recovery of the communication module will be executed from 7.82 to 8.00s after the shared recovery control resources are released. Therefore, both will reach the ready state required by the predetermined task no later than 8.00s. The listed recovery time is calculated from the budget starting point of the predetermined recovery request, including timed request dispatch, driver queuing, and ready confirmation, without omitting these overheads outside the 7.62 to 8.00s interval. The USB master controller retains its running state throughout, and the periodic critical tasks continue to execute on the continuously available path.
[0091] The S105 uses the following illustrative overall power consumption figures: 3.40W for continuous use; 0.35W and 0.05W for USB host operation and low-power increments respectively; 1.20W and 0.25W for the communication module; and 0.25W and 0.05W for the polling acquisition expansion interface respectively. The overall power consumption is 5.20W when all three hardware resources are running; 4.05W when the USB host is running while both sub-devices are at low power; and 3.75W when all three hardware resources are at low power. This last power consumption figure is not used in this adjustment execution plan. The above increments are only used to explain the status table; the overall power consumption used in the judgment will not be repeatedly added.
[0092] To account for power error, the overall power difference in the low-power dwell period is conservatively capped at 1.00W, lower than the illustrative nominal difference of 1.15W. The commonly recognized low-power dwell period is 0.10 to 7.62s, totaling 7.52s; 0 to 0.10s and 7.62 to 8.00s are state transition periods, with a total upper limit of 0.60J for the transition energy increment relative to the maintain-operation plan; the upper limit of the newly added power management energy within the entire adjustment execution plan is 0.04J. The aforementioned 0.04J must cover all updates, planning, verification, and deployment times, and cannot be derived solely from a single 5ms calculation budget.
[0093] The net energy saving for the entire cycle is conservatively estimated at 6.88J, which is greater than the 0.20J energy saving margin, calculated by subtracting the conversion energy increment and the additional power management energy from the product of the power difference and the dwell time. The conversion interval is not included in the 7.52s dwell interval, and the power management energy is deducted only once. The comparison extends to 8.00s, where both execution arrangements complete their common tasks, and the end-task queue, cache commit status, and hardware resource status are consistent. The 6.88J figure is a calculation result based on the above illustrative inputs and is not the actual measured energy saving or energy saving percentage.
[0094] The S106 releases an adjusted execution plan version, sequentially completing the entry actions of the communication module and the polling acquisition extension interface, receiving the phase receipt, and setting a 7.62s recovery timer. After the joint recovery is completed, each task is executed in the pre-arranged processing order, and shared hardware resources are only allowed to enter the next power-saving judgment after all benefiting tasks are no longer needed.
[0095] Example 3 This embodiment illustrates early recovery when a sudden event occurs and multiple tasks run concurrently. Following the adjusted execution plan validated in Embodiment 2, at 3:000s, the USB host is running, the polling acquisition extension interface and communication module are in a low-power state, and a mandatory event task meeting the arrival constraint arrives. Simultaneously, a temporary polling acquisition task using the same polling acquisition extension interface is issued, and a batch upload task using the communication module is generated; both new tasks are released at 3:000s, with completion deadlines of 4:000s and 8:000s respectively, thus triggering an update to the original adjusted execution plan. The periodic task originally scheduled to start using resources at 8:00s retains its earliest execution time, and data not yet generated is acquired in advance without early recovery.
[0096] The continuous availability event detection path records the arrival time and original event for 3.000 seconds. The status execution control module first establishes valid references to the mandatory event tasks and their dependent hardware resources, thus invalidating the affected plan versions corresponding to the originally scheduled 7.62-second recovery and subsequent suspension actions. Critical local alarms are handled according to their own continuous availability paths; new mandatory event tasks are prioritized without preempting the budget of critical data collection tasks.
[0097] The detection scheduling was completed before 3.010s. Polling of the extended acquisition interface resumed between 3.010 and 3.210s; internal recovery of the communication module occurred in parallel between 3.010 and 3.110s. The communication module's USB interface resumed operation between 3.210 and 3.390s after waiting for shared recovery control resources. Extended data reading occurred between 3.210 and 3.250s, data processing between 3.250 and 3.280s, and local submission was completed between 3.390 and 3.440s. The actual scheduled descriptive duration was 440ms, and the upper bound of the response time, including a 10ms safety margin, was 450ms, not exceeding 500ms.
[0098] Newly arriving polling and batch upload tasks, within their respective deadlines, will reuse this recovery process and be added to the set of tasks benefiting from the corresponding resource recovery operation. If reuse introduces new non-preemptible blocking or affects mandatory event tasks, the relevant processing will be scheduled after the mandatory event tasks, and the deadline will be rechecked. Time limit checks cannot be omitted due to reuse. When a mandatory event task ends, only its own resource requirements are removed; if other benefiting tasks still have requirements, the USB controller and corresponding hardware resources remain ready.
[0099] This early recovery resulted in an actual dwell time shorter than the expected dwell time in Example 2. Therefore, the overall energy consumption should be re-recorded based on the actual stage feedback and task completion status, instead of directly using 6.88J. If an earlier event results in a negative net energy saving for a single event, the event should still be immediately restored. Negative returns will be used in subsequent judgments to suppress frequent switching; energy results should not be pursued by delaying essential events.
[0100] Example 4 This example illustrates the correction and cancellation when the recovery time becomes longer. Following the original arrangement of Example 2, the communication module's USB interface recovery began at 7.82s, with an original budget of 180ms, and was expected to complete at 8.00s; however, no ready confirmation was received by 8.00s, and it actually completed at 8.12s, with an observed time of 300ms. The corresponding batch task completion deadline in this example was 12.00s, and after recovery, the batch task could still be completed after rescheduling and checking the required processing time.
[0101] When the original recovery budget is exceeded at 8.00s, the state execution control module immediately invalidates the 180ms budget, cancels any affected but unexecuted power-saving actions, retains the USB host control and polling acquisition expansion interfaces, and waits for a real acknowledgment from the communication module. After the acknowledgment arrives at 8.12s, 300ms is recorded as the actual time elapsed. This observation is sufficient to identify that the original arrangement does not meet the conditions, but 300ms is not directly considered a reliable upper bound for future recovery time.
[0102] Using a 300ms response schedule for a counter-verification check, when the USB master controller remains running and both sub-devices are at low power, the polling acquisition extension interface recovers serially for 200ms and the communication module USB interface recovers serially for 300ms, local submission takes 50ms, plus 10ms each for detection scheduling and margin, totaling 570ms, which exceeds 500ms. Therefore, this joint low-power state is ruled out.
[0103] Simply keeping the polling acquisition extension interface running is not enough to directly allow the communication module to enter a low-power state. Although the communication module's internal recovery time (100ms), USB interface recovery time (300ms), local submission time (50ms), detection scheduling time (10ms), and margin time (10ms) total 470ms in a stable low-power state, if the communication module still has an irrevocable entry time of 60ms when the event arrives, the total is 530ms, which still exceeds 500ms. Therefore, in this example, the communication module is not allowed to enter this low-power state, and re-admission cannot be based solely on the 470ms of the stable state.
[0104] The communication module should maintain the setting of prohibiting the addition of this low-power state until a new conservative upper bound for the time consumption is obtained through recalibration and all joint intermediate states meet the allowable response time again. Whether the polling acquisition expansion interface can still enter the low-power state independently should be rechecked based on the new combination of communication module readiness, checking the time limit and net energy saving for the entire cycle. After adding conversion time to new parameters, the dwell interval and conversion energy must be recalculated; simply correcting the response time and using the original energy-saving results is insufficient.
[0105] If the other candidate only has 0.40s of available dwell time, under the illustrative conditions that the lower bound of the power difference remains at 1.00W, the conversion energy increment is 0.60J, and the additional power management energy is 0.04J, the net energy saving for the entire cycle is negative 0.24J, which does not meet the energy saving conditions. The above energy input does not automatically represent the communication module after this slowdown; it must actually be obtained according to the new parameters. This candidate should maintain the operation of the corresponding hardware resources.
[0106] During the recovery period, newly arriving mandatory event tasks may exceed the original 500ms allowable response time. Feedback cannot be traced back to ensure timely completion of events that have already occurred; the actual completion time and the reason for timeout should be recorded. Critical data collection and critical local alarms on continuously available paths should continue to execute. If the anomaly stems from lost communication registration or duplicate authentication, the recovery path and retry limit should be recorded separately for different communication states. If a network recovery upper bound cannot be provided, local records and alarms should be maintained, and guarantees for related remote readiness timeouts should be discontinued.
[0107] Example 5 Based on the same inventive concept as the dynamic power consumption management method of the intelligent fusion terminal in the foregoing embodiments, such as Figure 2As shown, this embodiment provides a dynamic power consumption management system for an intelligent converged terminal. The dynamic power consumption management system for the intelligent converged terminal consists of an operation information acquisition module 11, an execution plan generation module 12, a joint phase verification module 13, a net energy saving judgment module 14, and a state execution control module 15. Each functional module can be implemented by the terminal processor executing the corresponding software flow, and data can be transmitted through shared records or message queues with version and timestamps, without requiring each functional module to correspond to an independent chip.
[0108] The runtime information acquisition module 11 receives task records, platform capability tables, driver status, stage receipts, and available power measurement data from the task scheduling interface. Following the method in S101, it checks the source and version, and outputs the execution time limit, resource requirements, state transition stages, ready dependencies, and mutual exclusion relationships of shared recovery control resources. The task records and hardware resource information are then transmitted to the execution plan generation module 12, and subsequently, the joint stage verification module 13 reads the corresponding version.
[0109] The execution plan generation module 12 receives the output of the running information acquisition module 11, combines the target state according to the method in S102, arranges the task execution and resource recovery operations, determines the latest recovery start time and the low-power dwell interval, and outputs the candidate execution plan to the joint phase verification module 13. The candidate execution plan retains the recovery occupancy, the set of benefiting tasks, and the task completion conditions, so that subsequent verification can find the tasks affected by each action.
[0110] The joint phase verification module 13 receives candidate execution plans and the current phase record, determines each joint intermediate state according to the methods of S103 and S104, accumulates the remaining irreversible time, mutual exclusion wait, recovery and processing time, and outputs the upper bound of the response time; deletes, replaces or postpones power reduction actions based on the comparison result with the allowed response time, and checks the completion time of accepted tasks, and sends the adjusted execution plan to the net energy saving judgment module 14. If an adjusted execution plan that meets the conditions cannot be obtained, the module outputs the result of abandoning the corresponding power reduction action to the state execution control module 15.
[0111] The net energy saving judgment module 14 receives the power data or calibration records provided by the adjustment execution plan and the operation information acquisition module 11, establishes a common completion boundary according to the method in S105, accumulates the total energy consumption of the two execution arrangements, outputs the net energy saving of the complete cycle and the comparison result of energy saving conditions, and sends the adjustment execution plan to the status execution control module 15. The net energy saving judgment module 14 only calculates the benefit for the actions retained in the received adjustment execution plan.
[0112] The state execution control module 15 receives the adjusted execution plan, the net energy saving of the complete cycle, and the comparison results. Following the method in S106, when the energy-saving conditions are met, it generates control instructions with a plan version, expected pre-state, and expected completion states for each state transition stage. These instructions are executed through the task scheduling interface and the device driver interface. The module receives stage feedback, records the actual completion time and true ready state, and cancels unexecuted actions and organizes recovery when new tasks, stage discrepancies, or time exceeding limits are detected. Task changes and state transition stage changes are fed back to the operation information acquisition module 11, which then causes the joint stage verification module 13 to re-verify the power-saving actions that have not yet been executed.
[0113] The system's modules exchange specific task records, phase records, execution plans, energy assessment results, and control receipts. The joint phase verification module 13 and the net energy saving assessment module 14 sequentially process the same version of the adjusted execution plan; when the status execution control module 15 detects a version failure, it continues to issue control commands without using the old energy assessment results. This forms a closed loop from acquiring operational data, response checking, energy assessment to actual task execution and hardware status changes.
[0114] The above embodiments are used to illustrate the specific processing method of this application. When hardware resources have different numbers of state transition phases, different ready dependencies, or different shared recovery control resources, the same data acquisition, joint phase checks, adjustments, and full cycle energy judgment relationships can be implemented; when the required state observability, recovery upper bound, or event detection path is not available, the corresponding hardware resources should be retained to run, and the scope of application should not be expanded by omitting checks.
Claims
1. A method for dynamic power management of an intelligent converged terminal, the method comprising: The method includes: Obtain the task's execution time limit and resource requirements, the state transition stages of hardware resources, ready dependencies, and mutual exclusion relationships of shared recovery control resources; Based on the execution time limit and resource requirements, combined with the ready dependencies and mutual exclusion relationships, a candidate execution plan is generated that includes task execution, resource recovery, and power reduction actions; Before executing the power reduction action, for each joint intermediate state formed by the power reduction action and the current in-transit stage, the upper bound of the response time of the mandatory event task is determined according to the remaining irreversible time of the state transition stage, the occupation of the shared recovery control resources, the order of resource recovery and task execution. Based on the comparison between the upper bound of the response time and the allowed response time of the mandatory event task, the power reduction action is adjusted to obtain an adjusted execution plan that meets the task execution time limit; Based on the aforementioned adjustment execution plan, taking into account the energy consumption of power reduction, low-power residence, resource recovery, and power management, determine the net energy savings relative to the full cycle of maintaining resource availability; When the net energy saving of the complete cycle meets the energy saving conditions, the task execution and hardware resource status are controlled according to the adjustment execution plan, and the power reduction actions that have not yet been executed are re-verified when the task or state transition phase changes.
2. The dynamic power consumption management method for intelligent converged terminals as described in claim 1, characterized in that, The state transition phase includes a preparation suspension phase, an irrevocable entry phase, a low power phase, a recovery phase, and a readiness confirmation phase. The irreversible entry stage is the state transition stage of the recovery path that must be completed before a recovery request can be entered after the current stage is received; the ready dependency relationship is used to indicate other hardware resources that need to reach a specified ready state before the hardware resource can perform a specified operation; the mutual exclusion relationship is used to indicate operations that cannot occupy the same shared recovery control resource at the same time. The mandatory event task is an event task that is pre-registered with an execution time limit, resource requirements, and arrival constraints. The arrival constraints include the number of tasks allowed to arrive within a specified time interval. The allowed response time is the longest allowed time from arrival to completion of the mandatory event task.
3. The method for dynamic power management of the intelligent converged terminal according to claim 1, wherein, Based on the execution time limit and resource requirements, and in conjunction with the ready dependencies and mutual exclusion relationships, a candidate execution plan is generated that includes task execution, resource recovery, and power reduction actions, including: Based on the hardware resources and the state transitions supported by the corresponding drivers, combine the target states of the hardware resources and exclude the target state combinations of event detection paths that cannot retain the mandatory event tasks. According to the task processing order and the ready dependencies, set the order of task execution operations and resource recovery operations, and arrange the order of occupancy of shared recovery control resources according to the mutual exclusion relationship; Schedule resource recovery operations and task execution operations backward from the task's execution time limit, determine the latest start time for recovery, and check the earliest execution time and completion time of the task in a forward direction; In the arrangement that meets the task execution time limit, power reduction actions and low-power dwell intervals are set to form the candidate execution plan.
4. The method for dynamic power management of the intelligent converged terminal according to claim 3, wherein, Based on the task processing order and the aforementioned readiness dependencies, the sequential relationship between task execution operations and resource recovery operations is established, and the order of occupancy of shared recovery control resources is arranged according to the aforementioned mutual exclusion relationship. This also includes: For multiple tasks that can be served by the same resource recovery operation, record the set of beneficiary tasks corresponding to the resource recovery operation, and keep the recovered hardware resources in the ready state required by the set of beneficiary tasks. For resource recovery operations that do not have ready dependencies and mutual exclusion relationships, set parallel execution relationships and make each subsequent dependent operation start after the resource recovery operation it depends on has completed and reached the required ready state. Once a task in the set of beneficiary tasks is completed, the resource requirements of the completed task are removed. Power reduction actions are allowed on the hardware resources only when the set of beneficiary tasks no longer requires the corresponding hardware resources to remain ready.
5. The method for dynamic power management of the intelligent converged terminal according to claim 2, wherein, Before executing the power reduction action, for each joint intermediate state formed by the power reduction action and the current in-transit stage, the upper bound of the response time of the mandatory event task is determined according to the remaining irreversible time of the state transition stage, the occupation of the shared recovery control resources, and the order of resource recovery and task execution, including: Based on the currently confirmed state transition phases and the state transition phases through which the power reduction action has been performed, determine the joint intermediate states that need to be checked. For each joint intermediate state, irrevocable in-transit operations are retained, the upper bound of the remaining irrevocable time of the corresponding stage is used as the blocking time before recovery, and the resource occupation caused by the mandatory event tasks that satisfy the arrival constraints and the accepted tasks is added. Based on the order of resource restoration and task execution, as well as the mutual exclusion relationship, the processing operations of resource restoration, readiness confirmation, and mandatory event tasks are arranged to obtain the upper bound of the time taken for mandatory event tasks from start to finish, and a safety margin is included to obtain the upper bound of the response time.
6. The method of claim 5, wherein the intelligent convergence terminal is a mobile terminal. Based on the comparison between the upper bound of the response time and the allowed response time of the mandatory event task, the power reduction action is adjusted to obtain an adjusted execution plan that meets the task execution time limit, including: When the upper bound of the response time corresponding to any joint intermediate state exceeds the allowed response time of the mandatory event task, delete the power reduction action that puts the shared upstream hardware resources into a low-power state, or change the target state to another low-power state supported by the driver, or postpone the power reduction action to eliminate the overlap of the entry stage. The upper bound of the response time is redefined for the joint intermediate state formed after each adjustment, and the completion time of the accepted tasks is re-examined. The adjustment execution plan is determined by ensuring that both the mandatory event tasks and the accepted tasks meet the execution time limit. If there is no arrangement that meets the execution time limit, the corresponding power reduction action is abandoned while keeping the required hardware resources available.
7. The method for dynamic power management of the intelligent converged terminal according to claim 1, wherein, According to the aforementioned adjustment execution plan, taking into account the energy consumption of power reduction, low-power residence, resource recovery, and power management, determine the net energy savings relative to the complete cycle of maintaining resource availability, including: Acquire power measurement data from the terminal input, or acquire the joint state power table and state transition energy calibrated based on the power measurement data from the terminal input; Set a comparison period with the same initial state, the same effective tasks, and the same data quality requirements, so that the effective tasks are completed within the comparison period of the two execution arrangements, and so that the execution plan that adjusts the execution plan and the execution arrangement that maintains the availability of resources have the same ending state, or include the energy consumption of converting different ending states into the same ending state. The total energy consumption of the machine within the comparison period is accumulated separately. The energy consumption for state saving, communication readiness confirmation, required communication reconstruction and retry is included in the corresponding execution schedule, and the energy consumption of the transition interval and the stable state interval is not accumulated repeatedly. The net energy saving for the complete cycle is obtained by subtracting the upper limit of the overall energy consumption of the adjusted execution plan from the lower limit of the overall energy consumption to maintain resource availability. The energy saving condition is that the net energy saving for the complete cycle is greater than the positive energy saving margin determined based on the measurement error.
8. The method for dynamic power management of the intelligent converged terminal according to claim 2, wherein, When the net energy saving of the complete cycle meets the energy-saving conditions, the task execution and hardware resource status are controlled according to the adjustment execution plan, and the power reduction actions that have not yet been executed are re-verified when the task or state transition phase changes, including: Set a plan version for the adjusted execution plan, and set a corresponding plan version, expected pre-state, and expected completion state for each state transition stage for the control command; after confirming that there are no in-transit access, shared resource requirements, or incomplete data submissions that would prevent suspension, call the driver interface in the order of resource dependencies and receive stage receipts; When the actual state before a new task arrives and is executed is inconsistent with the expected pre-state or when the stage receipt is inconsistent with the expected completion state of the corresponding state transition stage, the affected plan version is invalidated, the corresponding unexecuted power reduction action is prohibited, and the task execution and resource recovery are rearranged according to the current actual state. For hardware resources that have entered the irreversible entry stage, wait for the current stage that must be completed to finish before switching to the recovery path; for hardware resources that are still referenced by other tasks, retain the corresponding ready state.
9. The method for dynamic power management of the intelligent converged terminal according to claim 8, wherein, When the net energy saving of the complete cycle meets the energy-saving conditions, the task execution and hardware resource status are controlled according to the adjustment execution plan, and the power reduction actions that have not yet been executed are re-verified when the task or state transition phase changes. This also includes: The actual time consumed by the state transition phase is recorded according to the phase receipt and compared with the time upper bound of the corresponding state transition phase used to determine the upper bound of the response time. When the actual time exceeds the upper time limit, cancel the affected but not yet executed power reduction action, remove the corresponding low power state from the allowed state set, and recheck the task completion time with an update time not less than the actual time. Record the total power consumption and task completion status of the entire cycle, and correct the joint state power table or state transition energy used for net energy saving judgment based on the power measurement data of the terminal input terminal; after recalibration and passing the response time check of the joint intermediate state, add the corresponding low power consumption state to the set of allowed states.
10. A dynamic power management system for a smart converged terminal, characterized by, The dynamic power consumption management system of the intelligent fusion terminal includes: The runtime information acquisition module is used to acquire the task's execution time limit and resource requirements, the state transition stage of hardware resources, ready dependencies, and mutual exclusion relationships of shared recovery control resources, and send them to the execution plan generation module. The execution plan generation module is used to generate a candidate execution plan that includes task execution, resource recovery and power reduction actions based on the execution time limit and resource requirements, combined with the ready dependencies and the mutual exclusion relationships, and send it to the joint phase verification module. The joint phase verification module is used to determine the upper bound of the response time of the mandatory event task before executing the power reduction action, based on the remaining irreversible time of the state transition phase, the occupation of the shared recovery control resources, and the order of resource recovery and task execution, for each joint intermediate state formed by the power reduction action and the current in-transit phase; and to adjust the power reduction action according to the comparison result between the upper bound of the response time and the allowed response time of the mandatory event task, so as to obtain an adjusted execution plan that meets the task execution time limit, and send it to the net energy saving judgment module. The net energy saving judgment module is used to determine the net energy saving relative to the full cycle of maintaining resource availability, by taking into account the energy consumption of power reduction, low power consumption residence, resource recovery and power management according to the adjustment execution plan, and sending the adjustment execution plan and the net energy saving of the full cycle to the status execution control module. The state execution control module is used to control the task execution and hardware resource status according to the adjustment execution plan when the net energy saving of the complete cycle meets the energy saving conditions, and to send the task changes and state transition phase changes to the operation information acquisition module so that the joint phase verification module can re-verify the power reduction actions that have not yet been executed.
