An end-side action recognition model resource scheduling method and system
By generating training rhythm cycles and stage resource budgets, and dynamically allocating model inference resources, the problem of low resource utilization efficiency in existing technologies is solved, the real-time performance and stability of edge action recognition are improved, and efficient recognition of key action stages is ensured.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIMEI UNIV
- Filing Date
- 2026-07-06
- Publication Date
- 2026-08-04
AI Technical Summary
Existing edge-side action recognition systems fail to fully incorporate the phased and periodic characteristics of the action training process, making it difficult to balance the recognition accuracy of key action phases, the timeliness of model scheduling, and the overall resource utilization efficiency in scenarios with limited resources and rapidly changing action phases.
By acquiring continuous action data, historical action cycle data, and edge resource status data, the system generates the current action phase, training rhythm cycle, and the estimated arrival time of the next key action phase. Combining phase importance and resource status, it generates a phase resource budget, dynamically allocates model inference resources, and optimizes model wake-up timing and resource configuration.
It improves the real-time performance, stability, and resource utilization of edge action recognition, reduces model switching lag and key frame misses during critical action phases, and enables the reduction of resource consumption during non-critical action phases and the reservation of saved computing power for upcoming critical action phases.
Smart Images

Figure CN122507524A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer resource scheduling and edge artificial intelligence technology, specifically to an edge action recognition model resource scheduling method and system. Background Technology
[0002] With the development of computer vision, human pose recognition, edge computing, and lightweight neural network models, action recognition technology has been gradually applied to edge-side application scenarios such as sports training, rehabilitation training, physical fitness testing, and fitness guidance. Edge-side devices typically acquire continuous action data such as user motion image data and skeletal keypoint data through cameras, inertial sensors, or other acquisition units, and run action recognition models on mobile terminals, edge computing devices, smart camera terminals, or embedded training terminals to identify the user's current action stage, action category, or degree of action standardization. Because edge-side devices can complete data acquisition and model inference locally, they have the characteristics of fast response speed, flexible deployment, and low network dependence, making them suitable for action recognition scenarios that require real-time feedback.
[0003] Existing edge-side action recognition systems typically reduce edge-side resource consumption by employing methods such as lightweight models, model compression, quantized inference, reduced input resolution, reduced sampling frame rate, edge-cloud collaborative inference, or switching model accuracy based on device load. In actual operation, edge devices can adjust the inference frequency, model accuracy, or data upload method of the action recognition model based on device-side parameters such as processor utilization, remaining cache, power consumption, temperature, or network status. This allows the action recognition model to adapt to the limited computing power, power consumption, and cache conditions of the edge device. Some existing solutions also pre-deploy multiple action recognition models at different levels, using higher-precision models when edge-side resources are sufficient and lower-precision models when resources are limited, thus achieving a balance between recognition accuracy and resource consumption.
[0004] However, existing edge-side action recognition model resource scheduling methods mainly rely on real-time adjustments based on the load of the edge device, focusing on the device's own resource status rather than fully considering the phased and periodic characteristics of the action training process itself. A complete action typically includes multiple action phases such as preparation, exertion, takeoff, landing, and recovery. Different action phases have different requirements for recognition accuracy, inference frame rate, cache window, and model level. For example, critical action phases such as takeoff, landing, release, and change of direction are short in duration and change rapidly, usually requiring action recognition models with higher accuracy and lower latency; while the preparation phase, recovery phase, or low-speed transition phase have relatively lower requirements for recognition accuracy and real-time performance. If the edge device always uses a fixed model or fixed frame rate for recognition, it is easy to waste computing power and cache in non-critical action phases; if a high-precision model is only switched after a critical action phase is detected, the time spent on model loading or inference may lead to missed key frames and delayed recognition results.
[0005] Furthermore, in cyclical action scenarios such as continuous jumping, continuous squatting, running gait, basketball shooting training, and rope skipping training, the action phases often exhibit a certain training rhythm pattern, and historical action cycle data can reflect the approximate arrival time of the next critical action phase. Existing technologies typically perform real-time recognition for the current frame or action segment, lacking a mechanism to predict the estimated arrival time of the next critical action phase based on historical action cycle data. They also lack a mechanism to generate phase resource budgets based on the importance of the action phase and the status of edge resources, and to reserve the computing power saved from lower-importance phases for subsequent critical action phases. Therefore, in scenarios with limited edge resources and rapidly changing action phases, existing technologies struggle to balance the recognition accuracy of critical action phases, the timeliness of model scheduling, and the overall resource utilization efficiency. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention provides a method and system for scheduling resources for edge-side action recognition models.
[0007] The technical solution adopted in this invention is as follows:
[0008] This invention proposes a resource scheduling method for an edge-side action recognition model, comprising the following steps:
[0009] The edge device acquires continuous motion acquisition data, historical motion cycle data, edge resource status data, and model-level data. The continuous motion acquisition data includes motion image data and skeletal key point data. The edge resource status data includes computing power utilization, cache balance, and power consumption. The model-level data includes the inference time of at least two motion recognition models.
[0010] The edge device generates the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on the continuous action acquisition data and the historical action cycle data. The training rhythm cycle is a cycle parameter used to characterize the training rhythm of continuous actions, generated based on the timestamps of adjacent key action phases in the historical action cycle data.
[0011] The edge device generates a stage importance based on the current action stage, the training rhythm cycle, and a preset stage importance table, and generates a stage resource budget based on the stage importance and the edge resource status data.
[0012] The edge device determines the model wake-up timing, target model level, inference frame rate, cache allocation amount, and computing unit allocation strategy based on the next critical action phase, the estimated arrival time of the next critical action phase, the remaining time of the current action phase, the phase resource budget, and the model level data.
[0013] The edge device performs action recognition model resource scheduling according to the model wake-up time, the target model level, the inference frame rate, the cache allocation amount, and the computing power unit allocation strategy.
[0014] Further, the edge device generates the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on the continuous action acquisition data and the historical action cycle data, including:
[0015] The end-side device extracts key point velocity sequences and motion phase features from the continuous motion acquisition data;
[0016] The end-side device matches the key point velocity sequence and the action phase feature with a preset action stage template to obtain the current action stage;
[0017] The edge device calculates the training rhythm cycle based on the timestamps of adjacent key action phases in the historical action cycle data.
[0018] The end-side device determines the next key action stage according to a preset key stage sequence table and the current action stage;
[0019] The edge device generates the estimated arrival time of the next key action phase based on the training rhythm cycle, the current action phase, and the next key action phase.
[0020] The end-side device generates the remaining time of the current action phase based on the phase start time and the predicted phase duration of the current action phase.
[0021] Further, the edge device generates a stage importance based on the current action stage, the training rhythm cycle, and a preset stage importance table, and generates a stage resource budget based on the stage importance and the edge resource status data, including:
[0022] The end-side device reads the basic stage importance from the preset stage importance table according to the current action stage;
[0023] The edge device calculates a rhythm stability coefficient based on the training rhythm cycle and the duration of multiple historical action cycles used to generate the training rhythm cycle. The rhythm stability coefficient is used to characterize the degree of fluctuation stability of the duration of the multiple historical action cycles relative to the training rhythm cycle.
[0024] The end-side device generates the stage importance based on the basic stage importance and the rhythm stability coefficient;
[0025] The edge device generates the stage resource budget based on the stage importance, the cache balance, the computing power utilization rate, and the power consumption value, wherein the stage resource budget includes the frame rate budget, the cache budget, and the computing power budget.
[0026] Furthermore, the model-level data also includes the model loading time and resource consumption of the at least two action recognition models;
[0027] The edge device determines the target model level and model wake-up timing based on the next critical action phase, the estimated arrival time of the next critical action phase, the remaining time of the current action phase, the phase resource budget, and the model level data, including:
[0028] The edge device filters candidate action recognition models from the at least two action recognition models based on the remaining time of the current action phase and the inference time.
[0029] The edge device determines the target model level from the candidate action recognition model based on the stage resource budget and the resource usage.
[0030] The end-side device determines the model wake-up time based on the expected arrival time of the next critical action phase and the model loading time.
[0031] Furthermore, the edge device determines the model wake-up timing based on the estimated arrival time of the next critical action phase and the model loading time, including:
[0032] The end-side device acquires the current time and calculates the remaining time between the estimated arrival time of the next critical action phase and the current time.
[0033] The end-side device compares the remaining time to reach the stage with the model loading time to obtain the model preloading determination result.
[0034] If the model preloading determination result indicates that the remaining time to reach the stage is not greater than the sum of the model loading time and the preset safety time, the end device determines the current time as the model wake-up time.
[0035] If the model preloading determination result indicates that the remaining time to reach the stage is greater than the sum of the model loading time and the preset safety time, the end device generates the model wake-up timing based on the expected arrival time of the next key action stage, the model loading time, and the preset safety time.
[0036] Furthermore, after the endpoint device generates the stage resource budget based on the stage importance and the endpoint resource status data, it also includes:
[0037] The end-side device compares the stage importance with a preset low importance threshold to obtain a low importance determination result;
[0038] When the low importance determination result indicates that the importance of the stage is less than the preset low importance threshold, the edge device generates a transferable computing power budget based on the stage resource budget and the edge resource status data;
[0039] The edge device generates a critical phase reserved budget based on the estimated arrival time of the next critical action phase and the transferable computing power budget;
[0040] The end-side device generates a stage queue identifier based on the next critical action stage, generates a scheduling time window corresponding to the stage queue identifier based on the expected arrival time of the next critical action stage, generates a resource budget queue based on the stage queue identifier and the scheduling time window, and writes the reserved budget for the critical stage into the resource budget queue.
[0041] Further, the edge device determines the inference frame rate, the cache allocation amount, and the computing unit allocation strategy, including:
[0042] The end-side device reads the model input size and the model minimum cache requirement according to the target model hierarchy;
[0043] The edge device generates the inference frame rate based on the stage resource budget and the model input size;
[0044] The endpoint device generates the cache allocation based on the cache remaining amount and the minimum cache requirement of the model.
[0045] The edge device determines at least one computing power unit from the central processing unit, graphics processing unit, and neural network processing unit based on the computing power occupancy rate, the power consumption value, and the target model level, and generates the computing power unit allocation strategy.
[0046] Furthermore, after calculating the training rhythm cycle based on the timestamps of adjacent key action phases in the historical action cycle data, the edge device further includes:
[0047] The end-side device generates the actual duration of the current stage based on the stage start time and the current time of the current action stage;
[0048] The end-side device generates a rhythm offset based on the actual duration of the current stage and the historical duration of the same stage in the historical action cycle data.
[0049] The end-side device corrects the training rhythm cycle based on the rhythm offset to obtain the corrected training rhythm cycle.
[0050] The end-side device updates the estimated arrival time of the next key action phase according to the modified training rhythm cycle.
[0051] Further, the edge device performs action recognition model resource scheduling according to the model wake-up timing, the target model level, the inference frame rate, the cache allocation amount, and the computing power unit allocation strategy, including:
[0052] The end-side device generates a model loading instruction based on the model wake-up timing;
[0053] The end-side device generates a model switching instruction based on the target model hierarchy;
[0054] The end-side device generates a frame sampling instruction based on the inference frame rate;
[0055] The endpoint device generates a cache allocation instruction based on the cache allocation amount;
[0056] The edge device generates a computing power allocation instruction according to the computing power unit allocation strategy;
[0057] The edge device generates a resource scheduling instruction sequence according to the model loading instruction, the model switching instruction, the frame sampling instruction, the cache allocation instruction, and the computing power allocation instruction, and executes the resource scheduling instruction sequence.
[0058] An edge-side action recognition model resource scheduling system is used to execute an edge-side action recognition model resource scheduling method, including:
[0059] The data acquisition module is used to acquire continuous motion acquisition data, historical motion cycle data, edge resource status data and model-level data. The continuous motion acquisition data includes motion image data and skeletal key point data. The edge resource status data includes computing power utilization, cache balance and power consumption value. The model-level data includes the inference time of at least two motion recognition models.
[0060] The phase prediction module is used to generate the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on the continuous action acquisition data and the historical action cycle data. The training rhythm cycle is a cycle parameter used to characterize the training rhythm of continuous actions, generated based on the timestamps of adjacent key action phases in the historical action cycle data.
[0061] The budget generation module is used to generate a stage importance based on the current action stage, the training rhythm cycle, and a preset stage importance table, and to generate a stage resource budget based on the stage importance and the edge resource status data.
[0062] The scheduling parameter determination module is used to determine the model wake-up timing, target model level, inference frame rate, cache allocation amount and computing unit allocation strategy based on the next critical action stage, the estimated arrival time of the next critical action stage, the remaining time of the current action stage, the stage resource budget and the model level data.
[0063] The scheduling and execution module is used to perform resource scheduling for the action recognition model according to the model wake-up time, the target model level, the inference frame rate, the cache allocation amount, and the computing power unit allocation strategy.
[0064] The beneficial effects of this invention are:
[0065] This invention generates the current action stage, training rhythm cycle, next critical action stage, and its estimated arrival time by continuously collecting action data and historical action cycle data. It also generates a stage resource budget by combining stage importance with edge resource status, enabling edge devices to dynamically allocate model inference resources based on action stage differences. Compared to fixed models or scheduling based solely on device load, this invention can reduce inference frame rate, model levels, and resource consumption during non-critical action stages, reserving the saved computing budget for upcoming critical action stages. Simultaneously, it determines the target model level based on the remaining time of the current action stage and the model inference time, and determines the model wake-up time based on model loading time, thereby reducing model switching lag and keyframe misses during critical action stages, and improving the real-time performance, stability, and resource utilization of edge action recognition. Attached Figure Description
[0066] Figure 1 This is a flowchart of the resource scheduling method for the edge action recognition model according to an embodiment of the present invention;
[0067] Figure 2 This is a flowchart illustrating the stage prediction and key stage arrival time generation of one embodiment of the present invention.
[0068] Figure 3 This is a flowchart illustrating the migration of stage resource budget and computing power budget according to an embodiment of the present invention;
[0069] Figure 4 This is a flowchart illustrating the model level selection and model wake-up timing determination according to an embodiment of the present invention;
[0070] Figure 5 This is a flowchart illustrating the generation of scheduling parameters and the execution of resource scheduling according to an embodiment of the present invention;
[0071] Figure 6 This is a block diagram of the resource scheduling system for the end-side action recognition model according to an embodiment of the present invention. Detailed Implementation
[0072] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0073] like Figures 1-5As shown in the figure, an embodiment of the present invention provides a resource scheduling method for edge-side action recognition models, which is applied to edge-side devices, such as mobile terminals, tablet computers, edge computing devices, smart camera terminals, or embedded training terminals. At least two action recognition models at different model levels are deployed in the edge-side device. These different model levels correspond to different inference times, model loading times, inference accuracy levels, and resource consumption.
[0074] Specifically, the resource scheduling method for the edge-side action recognition model includes the following steps:
[0075] S1. The edge device acquires continuous motion acquisition data, historical motion cycle data, edge resource status data, and model-level data. The continuous motion acquisition data includes motion image data and skeletal key point data. The edge resource status data includes computing power utilization, cache balance, and power consumption. The model-level data includes the inference time of at least two motion recognition models.
[0076] This step is used to periodically collect and standardize continuous action acquisition data, historical action cycle data, edge resource status data, and model-level data, providing a complete input boundary for subsequent stage prediction, resource budget generation, and scheduling parameter solving. This step can be periodically triggered by the scheduling control unit of the edge device, with the scheduling cycle matching the action acquisition frame rate (e.g., executed once every 100ms), ensuring that subsequent decisions are always based on the latest real-time status.
[0077] Specifically, continuous motion acquisition data refers to time-series data acquired in real-time by the edge device through sensing hardware. This data characterizes the user's current motion state and serves as the direct basis for identifying motion stages and calculating motion features. It includes motion image data and skeletal keypoint data. Motion image data is a sequence of continuously acquired video frames over time. Each frame corresponds to a fixed height, width, and RGB color channels. It can be acquired and output in real-time by the RGB camera built into the edge device. After cropping and normalization by the image preprocessing module, a standardized frame sequence is formed. This data serves as the raw input for the motion recognition model, used for final motion classification and quality scoring. It also provides raw image input for skeletal keypoint detection, supporting the calculation of keypoint coordinates. Skeletal keypoint data corresponds to the set of human joint coordinates for each frame, including the planar coordinates of multiple core human joints such as the shoulder, elbow, wrist, hip, knee, and ankle. The specific number of joints is determined by the keypoint detection model used. This data can be inferred and output in real-time for each frame of motion image using a lightweight human keypoint detection model deployed on the edge device, and then stored in the acquisition buffer after smoothing and filtering. Compared to raw image data, skeletal keypoint data has a lower dimension, enabling rapid calculation of features such as joint movement speed and motion phase. It is the core feature carrier for achieving millisecond-level motion stage matching in subsequent steps and a key foundation for supporting low-overhead look-ahead scheduling.
[0078] Historical action cycle data consists of statistical records persistently stored locally on the device. These records originate from archived action cycle results from the user's past training sessions and serve as the statistical benchmark for calculating training rhythm and predicting the arrival time of critical stages. This data contains a set of stage timestamps for several complete historical action cycles. Each complete action cycle is divided into multiple action stages, including critical action stages such as exertion and landing, as well as transitional stages such as preparation and recovery. Each action stage corresponds to a precise start timestamp. During each training session, the stage recognition results output by the action recognition model are automatically time-stamped and archived. After each complete action cycle ends, the timestamps of each stage within that cycle are appended to local storage. When the device is used for the first time and there is no historical training data, the system initializes using a general user action cycle template. By statistically analyzing the time intervals between stages in historical cycles, the system can extract the user's personalized training rhythm patterns and predict the arrival time of the next critical action stage, providing core data support for a forward-looking pre-scheduling mechanism.
[0079] Edge-side resource status data is a real-time sampling result of the current hardware load and available resources of edge devices. It serves as a hard constraint for resource budget allocation and computing unit scheduling, specifically including computing power utilization, cache availability, and power consumption. Computing power utilization characterizes the real-time occupancy ratio of the edge device's main computing unit (usually the overall computing load of the system-on-a-chip), with a value ranging from [0,1]. A value of 1 indicates that the device is fully loaded. This indicator reads the combined load of the processors (CPU, GPU, NPU) through the system interface and takes the average value over a recent period (e.g., 1 second) as the current computing power utilization rate. This reflects the current degree of computing power redundancy. A higher computing power utilization rate means less additional computing power can be allocated to the action recognition model, thus serving as an upper limit constraint on the computing power budget. Cache margin refers to the remaining available RAM capacity of the edge device. It is obtained by reading the available memory value through the system memory management interface and subtracting the system reserved memory. It is used to constrain the upper limit of the loading and running memory of the action recognition model, avoiding memory overflow and system lag caused by high-precision model loading. It also determines the maximum length of the inference frame cache window. Power consumption is the real-time power consumption of the edge device. It is obtained by reading the instantaneous power consumption of the whole device through the sampling interface of the power management chip and taking the sliding average. For battery-powered mobile terminals, power consumption is one of the core constraint indicators. High power consumption will accelerate the device temperature rise and shorten the battery life. This parameter is mainly used for power consumption optimization targets in the selection of computing units to prevent the device power consumption from exceeding the reasonable range after scheduling in critical stages.
[0080] Model-level data is a set of attribute parameters for multiple action recognition models with different levels of precision pre-deployed on the edge. It is the core carrier for realizing dynamic model switching and balancing recognition accuracy and resource consumption. At least two sets of action recognition models with different levels are deployed on the edge device. The models are divided into multiple levels according to their accuracy and resource consumption from low to high. The higher the level number, the more parameters the corresponding model has and the higher the inference accuracy, but the inference time, model loading time, and resource consumption also increase accordingly. Each level of the model corresponds to four attribute parameters: inference time, model loading time, memory consumption, and computing power consumption. Among them, inference time refers to the average time taken for the corresponding level model to complete the inference of a single frame of data. It can be obtained by offline calibration on the target hardware, covering test results under different computing power units such as CPU, GPU, and NPU. It is the core time constraint for subsequent candidate model selection. Only models with inference time less than the available time window of the current stage are allowed to be scheduled to avoid the problem of inference results lagging behind the action stage. Model loading time refers to the total time taken for the corresponding level model to be loaded from local storage to runtime memory and for operator initialization and warm-up to be completed. This can also be obtained through offline calibration, recording the complete time from the issuance of the loading command to the model being able to receive inference requests. Due to the large number of parameters in high-precision models, loading time can reach hundreds of milliseconds to several seconds. Waiting until the critical stage arrives before loading will result in severe lag. Therefore, this parameter is the core basis for calculating the model wake-up timing. This invention uses this parameter to calculate the wake-up time in advance, ensuring that the model is ready when the critical stage arrives. Memory usage refers to the memory space occupied by the weight parameters and intermediate feature maps during the steady-state operation of the corresponding level model. The peak memory usage from offline calibration is used as a fixed parameter to match the cache budget, ensuring that the selected target model level does not exceed the currently allocated cache space. Computational power usage refers to the computational power consumed by the corresponding level model in a single frame of inference. It is obtained based on the model's computational power load (FLOPs) combined with hardware computational efficiency calibration. It is used to calculate the total computational power requirement of the target model at a specified inference frame rate and to match and verify it with the computational power budget.
[0081] It should be noted that in actual operation, step S1 is not executed once, but rather the data is refreshed periodically with the scheduling cycle. Among them, the continuous action acquisition data and the terminal resource status data are updated at a high frequency and are refreshed synchronously with the scheduling cycle; the historical action cycle data is updated at a low frequency, and a new record is added only once after each complete action cycle; the model level data is static calibration data, which is only recalibrated and written to storage when the terminal firmware is upgraded or the model version is updated.
[0082] S2. The edge device generates the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on the continuous action acquisition data and historical action cycle data. The training rhythm cycle is a cycle parameter used to characterize the training rhythm of continuous actions, generated based on the timestamps of adjacent key action phases in the historical action cycle data.
[0083] This step uses the continuous action acquisition data and historical action cycle data obtained in step S1 to generate five prediction parameters through progressive processing of feature extraction, stage matching, cycle statistics and dynamic correction. These parameters are: the current action stage, the training rhythm cycle, the next key action stage, the estimated arrival time of the next key action stage, and the remaining time of the current action stage. This provides decision-making basis in the time and stage dimensions for subsequent stage resource budget generation and scheduling parameter solution.
[0084] In this invention, the training rhythm cycle refers to a periodic parameter used to characterize the repetitive rhythm of movements during continuous movement training. It is generated based on the timestamps of adjacent key movement stages in historical movement cycle data. Specifically, the historical movement cycle data includes multiple historical movement cycles, and each historical movement cycle records at least one timestamp of a key movement stage. The key movement stage can be the moment of force exertion, the moment of take-off, the moment of landing, the moment of release, the moment of change of direction, or other movement stages that can reflect the boundary of the movement cycle.
[0085] When calculating the training rhythm cycle, the edge device first selects the same key movement phase from historical movement cycle data as the cycle anchor point, then calculates the time difference between the timestamps corresponding to the cycle anchor points in two adjacent historical movement cycles, obtaining the duration of multiple historical movement cycles. Subsequently, the training rhythm cycle is generated based on the durations of multiple historical movement cycles. The training rhythm cycle can be the average, median, or average after outlier removal of the durations of multiple historical movement cycles, preferably the average after outlier removal, to reduce the impact of occasional pauses, movement interruptions, or recognition jitter on the cycle calculation results.
[0086] For example, in continuous squat training, the lowest point or the point of force exertion during each squat can be used as the cycle anchor point; in continuous jump training, the moment of take-off or landing can be used as the cycle anchor point; and in basketball shooting training, the moment of release can be used as the cycle anchor point. The edge device obtains the corresponding historical action cycle duration by statistically analyzing the time interval between two adjacent cycle anchor points, and generates a training rhythm cycle accordingly. Thus, the training rhythm cycle reflects the actual repetition speed of the user's actions in continuous motion training, providing a time benchmark for predicting the expected arrival time of the next key action phase, determining the model wake-up timing, and reserving resources for key phases.
[0087] It's important to note that the training rhythm period is not an abstract, subjective judgment, but rather a time parameter calculated from the timestamps of adjacent key action phases in historical action cycle data. This parameter characterizes the training rhythm of continuous actions, and its unit can be seconds. A shorter training rhythm period indicates a faster repetition speed of user actions and shorter intervals between key action phases; conversely, a longer training rhythm period indicates a slower repetition speed of user actions and longer intervals between key action phases. Based on this parameter, the edge device can predict the arrival timing of key action phases in advance, thereby completing the preloading and resource configuration of the action recognition model ahead of time.
[0088] In one embodiment of the present invention, step S2 specifically includes:
[0089] The edge device extracts key point velocity sequences and motion phase features from continuous motion acquisition data; the edge device matches the key point velocity sequences and motion phase features with a preset motion phase template to obtain the current motion phase; the edge device calculates the training rhythm cycle based on the timestamps of adjacent key motion phases in historical motion cycle data; the edge device determines the next key motion phase based on a preset key phase sequence list and the current motion phase; the edge device generates the estimated arrival time of the next key motion phase based on the training rhythm cycle, the current motion phase, and the next key motion phase; the edge device generates the remaining time of the current motion phase based on the phase start time and the predicted phase duration of the current motion phase.
[0090] In this embodiment of the invention, during specific execution, the edge device first extracts the velocity sequence of key points from the skeletal key point data included in the continuous motion acquisition data. This quantifies the intensity and trend of limb movement, providing a kinematic basis for subsequent motion stage matching. Inter-frame differencing is performed on the coordinates of the same key point in consecutive frames to calculate the instantaneous velocity of each key point, forming the velocity feature sequence of the entire frame.
[0091] ;
[0092] In the formula, This represents the instantaneous motion velocity of the k-th skeletal keypoint in frame t, in pixels per second. These represent the x and y pixel values of the k-th keypoint in frame t, respectively. These represent the x and y pixel values of the k-th keypoint in the (t-1)-th frame, respectively. This represents the time interval between two adjacent frames, in seconds, and its value is equal to the reciprocal of the motion capture frame rate. By combining the instantaneous velocities of all keypoints within a single frame in order of their keypoint numbers, the keypoint velocity sequence for that frame can be obtained.
[0093] In a specific embodiment of the present invention, the edge device performs a moving average filtering process on the key point velocity sequence (usually taking a 3-5 frame window) to suppress noise caused by key point detection jitter and avoid frequent false jumps in subsequent stage matching. Compared with the absolute coordinates of key points, the velocity feature is not affected by the user's height or distance from the user's position, and can more stably represent the action state. The limb velocity reaches its peak during key stages such as exertion and take-off, and the velocity is significantly reduced during transition stages such as preparation and recovery.
[0094] While extracting the velocity sequence of key points, the edge device simultaneously calculates the motion phase features corresponding to the current frame, mapping the current motion to its relative position within the period. A normalized phase value is used to uniformly represent the motion progress, eliminating interference from motion amplitude and individual differences. This complements the velocity features, jointly improving the robustness of stage matching. The formula for calculating the motion phase is:
[0095] ;
[0096] In the formula, This represents the action phase corresponding to frame t, with a value range of [0, 2π), and is used to characterize the relative position of the action in a complete cycle; This represents the current system timestamp, in seconds. The timestamp indicating the start of the current action cycle, in seconds, is determined by the trigger time of the previous baseline critical phase. This represents the initial estimated duration of the action cycle, in seconds. It is usually initialized using the actual duration of the previous complete cycle. It is a modulo 2π operation used to constrain the phase value within a single period.
[0097] Action phase features are normalized descriptions of action progress. For example, the lowest point of a squat corresponds to phase π, and the highest point of standing up corresponds to phase 0 or 2π. Regardless of the magnitude or speed of the user's movements, the phase intervals corresponding to the same action phase are highly stable, which can complement speed features and significantly improve the robustness of phase matching.
[0098] After obtaining the keypoint velocity sequence and action phase, the edge device matches them with a preset action phase template to determine the current specific action phase. In the preset action phase template, each action phase corresponds to a standard velocity feature template and a specific phase interval. The matching process employs a mechanism of hard phase constraints and soft velocity matching. First, phases with obvious mismatches are filtered out using the phase interval. Then, for the remaining candidate phases, the cosine similarity is used to calculate the matching degree between the current frame velocity features and each phase template. The phase with the highest similarity and that satisfies the phase interval constraints is selected as the current action phase. Accurately identifying the current action phase is a prerequisite for implementing phase-based differentiated resource scheduling. Only by clearly identifying whether the current phase is a transition phase or a critical phase can different resource budgets and model levels be matched accordingly, avoiding unnecessary resource consumption.
[0099] After identifying the current action phase, the edge device calculates the training rhythm cycle based on historical action cycle data, quantifying the frequency of user action repetition as a statistical benchmark for predicting the arrival time of the next phase. The calculation first selects a key action phase with the most significant features as the cycle anchor point. The time difference between adjacent cycles at this anchor point is calculated to obtain the duration of a single historical cycle. Then, the average of all historical cycle durations is taken to obtain the training rhythm cycle. The calculation formula is as follows:
[0100] ;
[0101] ;
[0102] In the formula, This indicates the index of the selected benchmark key action phase, such as the moment of force exertion or the moment of takeoff, which serves as a unified start and end anchor point for the cycle. This represents the start timestamp of the benchmark critical phase in the l-th historical cycle; This represents the actual duration of the l-th historical action cycle, in seconds. Indicates the total number of historical action cycles; This indicates the training rhythm cycle, which is the average cycle length of multiple movements, measured in seconds.
[0103] The reason for selecting the key stage with the most significant features as the cycle anchor point, rather than arbitrary stage boundaries, is that the key stage (such as hand release and foot push) has the highest time point recognition and the smallest detection error, and the calculated cycle duration is the most stable. The training rhythm cycle is the core benchmark for predicting the arrival time of future stages. The more stable the rhythm, the higher the prediction accuracy of the arrival time of subsequent stages, and the more accurate the timing of pre-scheduling operations such as model preloading and computing power reservation.
[0104] After obtaining the current action stage, the edge device determines the next critical action stage following the current stage based on the preset key stage sequence mapping relationship, thus clarifying the pre-scheduled target object. Action stages can be divided into two categories according to their flow: transition stages and critical stages. Critical stages refer to stages with concentrated technical points, short duration, and high requirements for recognition accuracy, such as exertion, airborne, landing, and release. Stages with smoother movements, such as preparation and recovery, belong to transition stages. The preset key stage sequence mapping table can be predefined according to the execution flow of a specific action. Inputting any stage index will output the index of the next critical action stage. For example, the stage sequence of continuous squats is: preparation → squatting → exertion → airborne → landing → recovery, where the critical stages are exertion and landing. When the current stage is preparation, the next critical stage is exertion; when the current stage is exertion, the next critical stage is landing. After clarifying the next critical action stage, all model preloading, computing power reservation, and other resource scheduling operations revolve around this target stage, avoiding waste caused by aimless resource reservation.
[0105] After determining the next critical action phase, the edge device combines historical phase interval statistics with the start time of the current phase to quantitatively calculate the estimated arrival time of the next critical action phase, providing a time benchmark for subsequent model wake-up timing calculations. Specifically, the average time interval from the current phase to the next critical phase is first calculated from historical data, and then the actual start time of the current phase is added to obtain the estimated arrival time. The calculation formula is as follows:
[0106] ;
[0107] ;
[0108] In the formula, This represents the average time interval from the start of the current stage to the start of the next key stage in historical data, expressed in seconds. This indicates the start timestamp of the next critical phase in the l-th historical cycle; This indicates the actual start timestamp of the current action phase in this cycle, triggered by the phase matching result, and is in seconds; This indicates the estimated arrival time of the next critical action phase, i.e., the estimated start time of the next critical phase, in seconds.
[0109] Based on the estimated arrival time, the edge device can accurately calculate the timing of early loading of the high-precision model, so as not to load too early and cause the model to be idle for a long time and occupy resources, nor to load too late and cause the model to be unready when the critical stage arrives, thus avoiding the problem of missing key frames.
[0110] Meanwhile, the edge device calculates the remaining time of the current action phase based on the historical average duration and the actual duration of the current phase, serving as a hard time constraint for subsequent candidate model selection. Specifically, it first calculates the historical average duration of the current phase, then subtracts the actual duration of the phase already completed to obtain the remaining time. The calculation formula is as follows:
[0111] ;
[0112] ;
[0113] In the formula, This indicates the historical average duration of the current action phase, in seconds; This represents the start timestamp of the next stage in the current stage of the l-th historical cycle; This indicates the remaining time in the current action phase, in seconds.
[0114] The remaining time in the current action phase is a hard constraint for selecting candidate action recognition models. If the inference time of a model in a single frame exceeds the remaining time in the current phase, the model cannot output a valid recognition result in the current phase (the phase has ended when the inference is completed) and must be removed from the candidate set. For example, if there are 300ms left in the current transition phase, a high-precision model with a single frame inference time of 500ms cannot be used in the current phase and can only be preloaded and used in the next key phase.
[0115] In one embodiment of the present invention, after the edge device calculates the training rhythm cycle based on the timestamps of adjacent key action stages in the historical action cycle data, the method further includes: the edge device generating the actual duration of the current stage based on the stage start time and the current time; the edge device generating a rhythm offset based on the actual duration of the current stage and the historical duration of the same stage in the historical action cycle data; the edge device correcting the training rhythm cycle based on the rhythm offset to obtain the corrected training rhythm cycle; and the edge device updating the estimated arrival time of the next key action stage based on the corrected training rhythm cycle.
[0116] In this invention, to adapt to scenarios where the pace of user training changes and to improve the prediction accuracy of stage arrival times, the edge device also dynamically corrects the training pace cycle and the estimated arrival time of the next stage based on the actual execution progress of the current stage; this is called pace offset correction processing. The calculation formula is:
[0117] ;
[0118] ;
[0119] ;
[0120] ;
[0121] In the formula, This indicates the actual duration of the current action phase, in seconds; This represents the rhythm offset coefficient, a dimensionless parameter. A value greater than 1 indicates that the current rhythm is slower than the historical average, and a value less than 1 indicates that the current rhythm is faster than the historical average. This indicates the corrected training pacing period, in seconds. This indicates the estimated arrival time of the next critical phase after the revision, in seconds.
[0122] The correction process is executed periodically with the scheduling cycle (calibrated every 100ms), dynamically updating the prediction results. For example, when a user performs continuous squat training, their physical strength decreases, the rhythm of the movement gradually slows down, and the offset coefficient gradually becomes greater than 1. The expected arrival time of the next critical stage will be delayed accordingly, avoiding the premature loading of the high-precision model and its long-term occupation of memory and computing power.
[0123] S3. The edge device generates a stage importance based on the current action stage, training rhythm cycle, and preset stage importance table, and generates a stage resource budget based on the stage importance and edge resource status data.
[0124] This step first calculates the importance of an action phase based on its inherent attributes and the reliability of rhythm prediction. Then, it generates the frame rate budget, cache budget, and computing power budget for the current phase by using the phase importance as the allocation weight and the real-time resource status on the edge as the constraint boundary. At the same time, it establishes a computing power migration mechanism for low-importance action phases, reserving the computing power resources saved in this phase in advance for subsequent key action phases, and realizes multi-cycle forward-looking resource management through a resource budget queue.
[0125] In one embodiment of the present invention, step S3 specifically includes:
[0126] The edge device reads the basic stage importance from a preset stage importance table based on the current action stage; the edge device calculates a rhythm stability coefficient based on the training rhythm cycle and the duration of multiple historical action cycles used to generate the training rhythm cycle. The rhythm stability coefficient is used to characterize the stability of the fluctuation of the duration of multiple historical action cycles relative to the training rhythm cycle; the edge device generates stage importance based on the basic stage importance and the rhythm stability coefficient; the edge device generates a stage resource budget based on stage importance, cache availability, computing power utilization, and power consumption. The stage resource budget includes frame rate budget, cache budget, and computing power budget.
[0127] In this invention, the rhythm stability coefficient is a coefficient used to characterize the stability of the training rhythm. It is calculated based on the training rhythm cycle and the durations of multiple historical action cycles used to generate the training rhythm cycle. Specifically, the training rhythm cycle reflects the central tendency of the durations of multiple historical action cycles, and the rhythm stability coefficient reflects the stability of the fluctuations of the durations of multiple historical action cycles relative to the training rhythm cycle. The closer the durations of multiple historical action cycles are to the training rhythm cycle, the more stable the user's movement rhythm is, and the higher the rhythm stability coefficient is; the greater the deviation of the durations of multiple historical action cycles from the training rhythm cycle, the greater the fluctuation of the user's movement rhythm, and the lower the rhythm stability coefficient is.
[0128] Specifically, the edge device can first calculate the dispersion of the duration of multiple historical movement cycles relative to the training rhythm cycle, and then generate a rhythm stability coefficient based on the dispersion. For example, the edge device can use the training rhythm cycle as the average cycle value, calculate the standard deviation of the duration of each historical movement cycle relative to the training rhythm cycle, and generate a cycle variation coefficient based on the ratio of the standard deviation to the training rhythm cycle; then, it can generate a rhythm stability coefficient based on the cycle variation coefficient. The smaller the cycle variation coefficient, the smaller the fluctuation of the duration of multiple historical movement cycles relative to the training rhythm cycle, and the more stable the training rhythm; the larger the cycle variation coefficient, the more obvious the fluctuation of the training rhythm.
[0129] In one optional implementation, the rhythm stability coefficient can be generated as follows: the edge device calculates the standard deviation based on the duration of multiple historical motion cycles, and uses the ratio of the standard deviation to the training rhythm cycle as the cycle variation coefficient; the edge device generates the rhythm stability coefficient based on the cycle variation coefficient and a preset stability coefficient adjustment parameter. The rhythm stability coefficient can range from 0 to 1. The closer the value is to 1, the more stable the duration of multiple historical motion cycles is relative to the training rhythm cycle; the closer the value is to 0, the more significant the fluctuations in the duration of multiple historical motion cycles relative to the training rhythm cycle.
[0130] For example, when a user performs continuous squats, jumps, or skipping rope training, if the duration of multiple historical action cycles remains relatively consistent, the rhythm stability coefficient calculated by the edge device will be high, indicating that the predicted arrival time of the next critical action stage has high reliability. In this case, the edge device can more actively preload the model and reserve resources for the critical stage based on the predicted arrival time. If the duration of multiple historical action cycles fluctuates greatly, for example, if the user's movements become fast or slow due to fatigue, the rhythm stability coefficient calculated by the edge device will be low, indicating that the reliability of the predicted arrival time of the next critical action stage is reduced. In this case, the edge device can reduce the correction result of the stage importance to avoid performing overly aggressive resource scheduling based on unstable prediction results.
[0131] Therefore, the rhythm stability coefficient is not an arbitrarily set empirical value, but a stability evaluation parameter calculated jointly by the training rhythm cycle and the duration of multiple historical action cycles. By introducing the rhythm stability coefficient, this invention can simultaneously consider the importance of the action stage itself and the reliability of the training rhythm prediction results during the stage resource budget generation process, thereby improving the stability and robustness of resource scheduling in the edge action recognition model.
[0132] Stage importance is a core indicator for quantifying the degree of requirement for recognition accuracy and real-time performance in the current action stage. Stage importance is a comprehensive evaluation value generated by combining the base stage importance and the rhythm stability coefficient. The base stage importance is determined by the technical attributes of the action stage, while the rhythm stability coefficient is used to correct the confidence level of the stage prediction. The two are multiplied to obtain the stage importance. In this embodiment of the invention, before calculating the stage importance, the rhythm stability coefficient is first calculated using historical action cycle data to quantify the fluctuation of the training rhythm and assess the confidence level of the stage arrival time prediction results. Specifically, the dispersion of the duration of each historical action cycle is first statistically analyzed, and the standard deviation of the cycle duration is calculated to characterize the absolute fluctuation amplitude. Then, the coefficient of variation is obtained by the ratio of the standard deviation to the average cycle duration, eliminating the influence of differences in the absolute value of cycles for different action types. Finally, the coefficient of variation is converted into the rhythm stability coefficient using an exponential decay method. The rhythm stability coefficient ranges from 0 to 1. When the training rhythm is highly stable, the coefficient approaches 1, indicating higher confidence in the stage prediction results. When the rhythm fluctuates significantly, the coefficient decreases accordingly to avoid aggressive resource scheduling based on unreliable prediction results and to ensure the robustness of the scheduling mechanism.
[0133] After obtaining the rhythm stability coefficient, the stage importance of the current action stage is calculated by combining it with the preset base stage importance. The calculation formula is as follows:
[0134] ;
[0135] In the formula, This represents the importance of the current action stage, with a value range of (0,1]. A higher value indicates that the stage has higher requirements for action recognition accuracy and real-time performance. The basic importance of the current action stage is set in the preset stage importance table. The value range is [0,1]. It can be marked offline by domain experts according to the characteristics of the action technique. For example, the basic importance of key stages such as exertion and landing is usually set to 0.8~0.95, and the basic importance of transition stages such as preparation and recovery is set to 0.15~0.4. The rhythm stability coefficient obtained from the aforementioned calculation is used to adjust the confidence level of the importance of the basic stage. , This is a preset stability coefficient adjustment parameter, a positive dimensionless constant used to control the attenuation of the stability coefficient by fluctuations. The larger the value, the faster the stability coefficient decays under the same fluctuation. The coefficient of variation for the historical cycle is dimensionless, and the ratio of the standard deviation to the mean represents the relative fluctuation of the cycle, eliminating the influence of the absolute value difference between different action cycles. Using a natural exponential function, a smooth nonlinear decay effect is achieved. This invention, through this calculation method, allows the stage importance to simultaneously reflect the technical importance of the action stage itself and the reliability of rhythm prediction, providing a reasonable weighting basis for subsequent resource budget allocation.
[0136] Based on stage importance and edge resource status data, the edge device generates three types of resource budgets for the current action stage, serving as upper limit constraints for subsequent scheduling parameter calculations. These include frame rate budget, cache budget, and computing power budget. The frame rate budget limits the maximum inference frame rate usable in the current stage, balancing real-time recognition with computing power consumption. The calculation formula is as follows:
[0137] ;
[0138] In the formula, The frame rate budget for the current action phase, in frames per second; The maximum inference frame rate supported by the edge device, in FPS (frames per second), is determined by both hardware computing power and the minimum inference time of the model, and is a fixed value calibrated offline. The importance of the current action phase; This represents the current computing power utilization rate of the edge device, with a value range of [0,1]. This represents the current available computing power ratio of the device, indicating the remaining computing power space. As shown in the formula, the frame rate budget is positively correlated with the importance of the stage and negatively correlated with the current computing power utilization rate. This ensures that higher inference frame rates are obtained in critical stages, while automatically lowering the frame rate ceiling when the device load is high, preventing the action recognition task from crowding out the computing resources of other processes in the system.
[0139] The cache budget limits the maximum memory space that can be allocated to the action recognition model in the current stage, ensuring the model runs normally while avoiding memory overflow. The calculation formula is as follows:
[0140] ;
[0141] In the formula, This is the cache capacity budget for the current action phase, i.e., the maximum cache space that can be allocated, in MB; This represents the current remaining cache capacity of the edge device, in MB, and is read in real time by the system interface. This budget allocates available cache space according to the proportion of stage importance. Critical stages can receive larger cache allowances to load higher-precision models and cache longer inference frame sequences, while transition stages are allocated only the minimum cache required to meet basic recognition needs.
[0142] The computing power budget is used to constrain the scale of computing power that can be consumed at the current stage in terms of total amount. It is the core total basis for the allocation of computing power units and the selection of model levels. The calculation formula is:
[0143] ;
[0144] In the formula, This is the computing power budget for the current action phase, i.e., the maximum computing power that can be allocated. The total computing power capacity of edge devices is expressed in normalized computing power units (NUMBER), representing a calibrated value inherent to the hardware. The computing power budget not only limits the upper limit of computing power usage in the current stage, but the difference between it and the fully available computing power also forms the basis for calculating the transferable computing power in low-importance stages, providing a quantitative basis for cross-stage resource scheduling.
[0145] In one embodiment of the present invention, after the end-side device generates a stage resource budget based on stage importance and end-side resource status data, it further includes:
[0146] The edge device compares the stage importance with a preset low importance threshold to obtain a low importance determination result. If the low importance determination result indicates that the stage importance is less than the preset low importance threshold, the edge device generates a transferable computing power budget based on the stage resource budget and edge resource status data. The edge device generates a critical stage reserved budget based on the expected arrival time of the next critical action stage and the transferable computing power budget. The edge device generates a stage queue identifier based on the next critical action stage, generates a scheduling time window corresponding to the stage queue identifier based on the expected arrival time of the next critical action stage, generates a resource budget queue based on the stage queue identifier and the scheduling time window, and writes the critical stage reserved budget into the resource budget queue.
[0147] In this embodiment of the invention, to achieve optimized resource allocation over time, this step establishes a low-importance stage computing power migration mechanism to address the problem of insufficient instantaneous computing power demand during critical stages in traditional real-time scheduling. Specifically, the edge device first compares the current stage importance with a preset low-importance threshold. If the stage importance is lower than the threshold, the current stage is determined to be a low-importance transition stage, and resource consumption can be proactively reduced to release surplus computing power. The low-importance threshold ranges from (0,1), and can be specifically set to 0.3~0.4. The formula for calculating the transferable computing power budget is:
[0148] ;
[0149] In the formula, The computing power budget that can be transferred during the low importance phase is the difference between the current full available computing power and the computing power budget for the current phase, representing the scale of computing power that can be saved by reducing resource consumption during this phase. This represents the current full available computing power of the edge devices; This is the current computing power budget.
[0150] When the importance of a stage is below the threshold, it indicates that the stage has low requirements for recognition accuracy and does not need to occupy the full available computing power. The difference in computing power can be released by actively reducing the model level and inference frame rate to support high-precision inference in subsequent critical stages, achieving resource and time reuse of "saving during idle time and using during busy time".
[0151] After calculating the transferable computing power, the edge device allocates this portion of computing power to the next critical action stage predicted in step S2, generating a critical stage reserved budget, the mathematical expression of which is:
[0152] ;
[0153] In the formula, The reserved computing power budget for the next key action phase is stored in a dedicated resource pool and only takes effect in the corresponding key phase; The index for the next critical action phase is inherited from the prediction result of step S2; The aforementioned calculation represents the transferable computing power budget. This invention, through targeted reservation, ensures that computing resources released during low-importance phases are not monopolized by other system tasks, guaranteeing sufficient computing power to support high-precision inference when critical action phases arrive.
[0154] In this embodiment of the invention, to achieve multi-cycle, multi-stage forward-looking resource management, the edge device constructs and maintains a resource budget queue to manage the reserved budgets for all future critical stages in an orderly manner. Each element in the resource budget queue contains three types of information: stage identifier, scheduling time window, and reserved computing power budget. The start point of the scheduling time window corresponds to the model wake-up time, and the end point corresponds to the expected arrival time of the critical stage. All elements in the resource budget queue are arranged in ascending order according to the expected arrival time of the next critical stage. The queue is updated once every scheduling cycle. Expired stage budgets are automatically removed from the queue, and newly predicted critical stage budgets are inserted into their corresponding positions in chronological order. Through this queue mechanism, the edge device can not only reserve resources for the next critical stage but also support the pre-scheduling of multiple consecutive critical stages, further improving the forward-looking and global optimization capabilities of resource scheduling.
[0155] S4. The edge device determines the model wake-up timing, target model level, inference frame rate, cache allocation amount, and computing unit allocation strategy based on the next critical action phase, the estimated arrival time of the next critical action phase, the remaining time of the current action phase, the phase resource budget, and model level data.
[0156] In this invention, the model-level data also includes the model loading time and resource consumption of at least two action recognition models.
[0157] The edge device determines the target model level and model wake-up timing based on the next critical action stage, the estimated arrival time of the next critical action stage, the remaining time of the current action stage, the stage resource budget, and model level data. Specifically, the edge device selects candidate action recognition models from at least two action recognition models based on the remaining time of the current action stage and the inference time; the edge device determines the target model level from the candidate action recognition models based on the stage resource budget and resource consumption; and the edge device determines the model wake-up timing based on the estimated arrival time of the next critical action stage and the model loading time.
[0158] Furthermore, the process of determining the model wake-up timing based on the estimated arrival time of the next critical action phase and the model loading time specifically includes: the edge device acquiring the current time and calculating the remaining time between the estimated arrival time of the next critical action phase and the current time; the edge device comparing the remaining time with the model loading time to obtain a model preloading determination result; if the model preloading determination result indicates that the remaining time is not greater than the sum of the model loading time and the preset safety time, the edge device determines the current time as the model wake-up timing; if the model preloading determination result indicates that the remaining time is greater than the sum of the model loading time and the preset safety time, the edge device generates a model wake-up timing based on the estimated arrival time of the next critical action phase, the model loading time, and the preset safety time.
[0159] In this step, candidate action recognition models are first screened. Using the available time window for the current action phase as a hard constraint, models whose inference time meets the timeliness requirements are selected from all pre-deployed models, narrowing the solution space for subsequent optimization and ensuring the time feasibility of the scheduling scheme. This invention uses the remaining time for the current action phase as a time limit, selecting models whose single-frame inference time does not exceed this limit, forming a candidate model set.
[0160] ;
[0161] in, A set of candidate action recognition models that meet time constraints; This is the action recognition model at the nth level; n is the model level index, with a value ranging from 1 to N. The larger the index, the higher the model accuracy and the longer the single-frame inference time. The inference time per frame for the nth level model is expressed in seconds. The remaining time for the current action phase is in seconds, calculated by step S2; N is the total number of levels of the action recognition model pre-deployed on the edge, with a value not less than 2.
[0162] The core logic of this screening mechanism is that if the reasoning time of a single frame of a certain model is greater than the remaining time of the current action stage, then even if reasoning is started immediately, the corresponding action stage will have ended by the time the reasoning is completed, and the output recognition result will lose its real-time value. Therefore, it needs to be directly excluded to avoid the problems of reasoning lag and key frame missed detection from the root.
[0163] After screening candidate models for time feasibility, the target model hierarchy is further optimized by considering resource constraints. Within the feasible range, the model with the highest recognition accuracy (highest hierarchy) is selected as the final target model for scheduling, achieving optimal recognition performance under resource constraints. The rule for determining the target model hierarchy can be expressed by the following mathematical expression:
[0164] ;
[0165] in, Index for the final determined target model hierarchy; This indicates that the model with the highest accuracy is the one that satisfies all constraints at the highest level. This represents the steady-state memory usage of the nth-level model, in MB. The cache capacity budget for the current action phase, in MB, is generated by step S3; This represents the computational power consumption for single-frame inference of the nth-level model. The frame rate budget for the current action phase, in frames per second, is generated by step S3; The total computing power requirement of the model at the target frame rate is the computing power per frame multiplied by the number of inference frames per second. The computing power budget for the current action stage is generated in step S3. In this embodiment of the invention, the model level selection follows the priority principle of "time feasibility, resource limit, and highest accuracy," maximizing the accuracy of action recognition while ensuring the feasibility of the solution and avoiding device memory overflow and computing power overload.
[0166] Once the target model hierarchy is determined, the corresponding model wake-up time, i.e. the time when the model starts loading, needs to be calculated. The core objective is to delay the loading time as much as possible while ensuring that the model is fully loaded and ready when the critical action stage arrives, so as to reduce the waste of resources caused by the high-precision model residing in memory for a long time.
[0167] Specifically, first, the remaining time from the current moment to the start of the next critical stage is calculated. Then, this time is compared with the sum of the model loading time and the safety buffer time. The final wake-up timing is determined in two scenarios. The first scenario is when the remaining time is insufficient to complete model loading. When the remaining time before the stage is less than or equal to the sum of the model loading time and the preset safety time, the model must be woken up immediately. In this case, the model wake-up timing is equal to the current system time, and the corresponding expression is:
[0168] ;
[0169] The second scenario involves scenarios with ample remaining time. When the remaining time before a stage ends exceeds the sum of the model loading time and the preset safety time, the model is woken up at the latest safe moment. In this case, the model wake-up time equals the estimated arrival time of the next critical stage minus the model loading time, and then minus the preset safety time. The corresponding expression is:
[0170] ;
[0171] In the above expression, The time point at which the model is woken up, in seconds; This is the current system timestamp, in seconds. The estimated arrival time of the next critical action phase, in seconds, is calculated from step S2; The total time taken, in seconds, for loading the target hierarchical model from storage to runtime memory and completing its warm-up. This is a preset safety buffer time, measured in seconds, used to offset the risks caused by fluctuations in loading time and errors in rhythm prediction.
[0172] This mechanism, through its on-demand preloading design, effectively resolves the contradiction between high-precision model loading lag and resource waste caused by persistent resident environments. When the critical phase is approaching, loading is initiated immediately, prioritizing model readiness before the critical phase and avoiding loading delays. When the critical phase is still far away, loading is initiated as late as possible, allowing the high-precision model to occupy memory and computing power as late as possible, extending the runtime of the low-resource mode, and reducing overall power consumption and resource consumption. The introduction of a safety buffer further offsets the increased loading time caused by rhythm prediction deviations and system load fluctuations, ensuring the reliability of preloading.
[0173] In one embodiment of the present invention, the edge device determines the inference frame rate, cache allocation amount, and computing unit allocation strategy, specifically including: the edge device reads the model input size and the minimum cache requirement of the model according to the target model level; the edge device generates the inference frame rate according to the stage resource budget and the model input size; the edge device generates the cache allocation amount according to the cache balance and the minimum cache requirement of the model; the edge device determines at least one computing unit from the central processing unit, the graphics processing unit, and the neural network processing unit according to the computing power utilization rate, power consumption value, and the target model level, and generates a computing unit allocation strategy.
[0174] After determining the model level and wake-up timing, the actual inference frame rate is calculated. The inference frame rate is capped by the frame rate budget generated in step S3, and is also adjusted based on the input size of the target model. Since the input resolution of different model levels varies, high-precision models typically have higher input resolution and greater computation per frame, resulting in a lower frame rate that can be supported by the same computing power. Therefore, the frame rate budget is adjusted inversely to the total number of pixels in the baseline input size, based on the total number of pixels in the target model's input, to obtain the final actual inference frame rate. This ensures that the total computing power consumption of different model levels is always controlled within the budget range, preventing high-precision models from exceeding computing power limits due to their large computational load.
[0175] After the inference frame rate is determined, the cache allocation is calculated. Under the dual constraints of the model's minimum operating requirements and the cache budget, the final memory space allocated to the action recognition model is determined, ensuring normal model operation while avoiding memory waste. The rule for determining the cache allocation can be expressed by the following mathematical expression:
[0176] ;
[0177] in, The final cache size allocated to the action recognition model, in MB; The minimum cache capacity required for the normal operation of the target hierarchical model, in MB, covering the minimum memory requirements for model weights and input / output buffers; To achieve the smaller value in the calculation, the cache allocation must not exceed the current cache budget or the model's own steady-state memory usage. To ensure that the cache allocation is not less than the minimum requirements for model operation and to prevent model failure due to insufficient memory, the following principles apply to cache allocation in this embodiment: It must meet the minimum cache requirements of the model, which is a prerequisite for model operation; it cannot exceed the current cache budget, nor should it exceed the actual memory usage of the model itself, to avoid memory waste; when the budget is sufficient, allocation is based on the actual memory usage of the model; when the budget is insufficient, if it is still higher than the minimum requirements, allocation is based on the budget; if the budget is lower than the minimum requirements, model level degradation is triggered, maximizing memory utilization efficiency while ensuring model operation.
[0178] Finally, a computing power unit allocation strategy is generated. From the three types of computing power units—CPU, GPU, and NPU—appropriate unit combinations are selected and their computing power ratios are allocated to achieve the lowest overall power consumption and optimal operating efficiency while meeting the computing power requirements of the target model. The three types of computing power units correspond to the central processing unit, graphics processing unit, and neural network processing unit, respectively. The allocation process aims to minimize the total power consumption of the entire machine, using the total computing power requirements of the target model at the target frame rate and the upper limit of the available computing power of each computing power unit as constraints. Scheduling is performed according to the principle of energy efficiency priority: priority is given to allocating the neural network processing unit with the highest energy efficiency ratio to minimize power consumption and temperature rise; when the computing power of the neural network processing unit is insufficient, the graphics processing unit is supplemented; only when the former two cannot meet the computing power requirements is the central processing unit used as a supplement. Finally, the computing power allocated to each unit is converted into an allocation ratio, forming a complete computing power unit allocation strategy. This strategy fully utilizes the advantages of heterogeneous computing power on the edge to ensure inference speed, while also adapting to the battery and heat dissipation constraints of mobile terminals through power optimization.
[0179] S5. The edge device performs action recognition model resource scheduling according to the model wake-up time, target model level, inference frame rate, cache allocation amount and computing power unit allocation strategy.
[0180] In one embodiment of the present invention, step S5 specifically includes: the terminal device generating a model loading instruction based on the model wake-up timing; the terminal device generating a model switching instruction based on the target model level; the terminal device generating a frame sampling instruction based on the inference frame rate; the terminal device generating a cache allocation instruction based on the cache allocation amount; the terminal device generating a computing power allocation instruction based on the computing power unit allocation strategy; and the terminal device generating a resource scheduling instruction sequence according to the model loading instruction, model switching instruction, frame sampling instruction, cache allocation instruction, and computing power allocation instruction, and executing the resource scheduling instruction sequence.
[0181] In this invention, the complete resource scheduling instruction sequence constructed in this step can be represented as:
[0182] ;
[0183] In the formula, It is a complete sequence of resource scheduling instructions, and an ordered set of instructions; This is the model loading instruction, responsible for the memory loading and warm-up of the target level model; This is a model switching instruction, responsible for the seamless switching of inference traffic between different levels of models; The frame sampling instruction is responsible for controlling the inference sampling frequency of the input data; It provides cache allocation instructions, responsible for the targeted allocation and dynamic reclamation of memory resources; It allocates instructions for computing power and is responsible for task binding and quota management of heterogeneous computing power units. The five types of instructions cover four scheduling dimensions: model lifecycle, input sampling, memory resources, and computing power resources, respectively, and achieve fine-grained scheduling throughout the entire process through time-series coordination.
[0184] During the preloading phase of scheduled execution, cache allocation instructions and model loading instructions are triggered sequentially, preparing resources in advance for high-precision inference in subsequent critical stages. The cache allocation instruction carries the cache allocation amount. Parameters are sent to the system memory management unit, which allocates a dedicated memory block of the corresponding size from the system's available cache pool and binds it to the action recognition inference process. The memory block is internally divided into a model weight area, input / output buffers, and intermediate feature map cache area in a fixed ratio. This ensures both the minimum memory requirements for model operation and strictly limits the upper limit of memory usage. When switching model levels or stages, the cache allocation instruction synchronously shrinks the memory allocation and reclaims excess memory from the system's available pool, achieving dynamic on-demand allocation of memory resources. After cache space allocation is complete, the system continuously monitors the system time and model wake-up timing. When the system time reaches the wake-up time, a model loading instruction is triggered, carrying the target model's hierarchical index. The parameters drive the inference engine to read the target model weights and operator configurations from local storage and load them into pre-allocated memory space. After the weight loading is complete, operator initialization and empty sample inference warm-up are automatically executed, putting the model into a ready-to-use state. This pre-loading mechanism moves the loading process of the high-precision model forward to before the critical action stage, completely avoiding the keyframe omission and inference lag problems caused by the model cold start time. Moreover, the model only occupies memory during the pre-loading stage and does not consume high-frequency computing power, thus balancing scheduling readiness and resource utilization efficiency.
[0185] When a critical action phase is reached, the model switching command is triggered, achieving precise alignment between the action phase and the model's accuracy. The model switching command carries the target model's hierarchical index. Switching trigger base time Key stage identification of the target Three types of parameters are used, employing a dual-trigger mechanism of time prediction and stage detection: when the system time reaches the expected arrival time of the next critical stage, or when real-time action stage matching detects that the current action has entered the target critical stage, a switch is triggered if either of these conditions is met. During the switch, the inference engine seamlessly switches the action acquisition data stream to the pre-loaded and ready target-level model, ensuring the continuity of the frame sequence and the stability of the inference results. After the switch is completed, the system processes the original running model according to subsequent scheduling needs: if there is no need to switch back in a short period of time, the old model is unloaded to release memory; if frequent switching is required in subsequent cycles, the model is retained in the cache to avoid repeated loading overhead. Through dynamic model switching, the edge device can automatically activate a high-precision model to ensure recognition accuracy during critical action stages, and switch back to a low-precision model during transition stages to control resource consumption, achieving a dynamic balance between accuracy and resources.
[0186] Simultaneously triggered with the model switching command are the frame sampling command and the computing power allocation command. These three work together to achieve a step-wise adjustment of the frame rate and computing power, adapting to the recognition needs of critical stages. The frame sampling command carries the target inference frame rate. The parameters are sent to the image acquisition and preprocessing module, which performs frame sampling on the original continuous acquisition frame sequence. The number of inference frames per unit time is directly controlled by adjusting the sampling interval. The sampling frame rate is reduced in the low importance stage to reduce invalid calculations and release computing resources. The sampling frame rate is increased in the critical stage to capture fast action details and ensure temporal resolution. This method can control computing power consumption by sampling only on the input side without modifying the model structure, and the overhead is extremely low.
[0187] The computing power allocation instructions are executed based on a heterogeneous computing power unit allocation strategy. The available computing power units on the edge device include a central processing unit, a graphics processing unit, and a neural network processing unit, which correspond to indexes respectively. The computing power allocation is optimized by constructing a solution model with the goal of minimizing total power consumption, and finally the computing power allocation ratio of each unit is obtained:
[0188] ;
[0189] In the formula, To be assigned to the The computing power scale of a computing power unit; For the first The computing power allocation ratio of the computing power unit is within the range of [value range missing]. The sum of the proportions of all units is 1, e is the index of the computing unit type, 1 is the central processing unit (CPU), 2 is the graphics processing unit (GPU), and 3 is the neural network processing unit (NPU).
[0190] During execution, the system sets computing power affinity for the inference process, prioritizing tasks to the neural network processing unit with the highest energy efficiency ratio. The insufficient part is supplemented by the graphics processing unit. The central processing unit is only called in extreme scenarios. Under the premise of meeting computing power requirements, the energy efficiency ratio is maximized, and the power consumption and temperature rise of the device are reduced.
[0191] In this embodiment of the invention, the five types of instructions are not executed independently and in parallel, but are arranged into a three-stage execution flow according to the temporal logic of look-ahead scheduling, ensuring a smooth and shock-free scheduling process. The first stage is the pre-loading preparation stage. At the model wake-up time, the cache allocation instruction is executed first to complete memory reservation, and then the model loading instruction is executed to complete model warm-up. At this time, the frame rate and computing power still maintain the low configuration of the current stage, only completing model memory residency, and the computing power overhead is extremely low. The second stage is the stage switching stage. When the next key action stage arrives, the model switching instruction, frame sampling instruction, and computing power allocation instruction are executed synchronously. The three work together to achieve a synchronous step jump in model accuracy, inference frame rate, and computing power quota, avoiding performance fluctuations caused by step-by-step adjustments. The third stage is the steady-state operation stage. The scheduling parameters remain in effect. Each scheduling cycle fine-tunes the parameters according to the real-time resource status and action progress to maintain a dynamic balance between resource consumption and recognition needs. Through the three-stage temporal arrangement, the scheduling process retains the initiative of look-ahead pre-scheduling while avoiding the impact of resource adjustments on system operation.
[0192] In a specific embodiment of the present invention, to offset scheduling deviations caused by fluctuations in action rhythm and changes in system state, the present invention can set up a dual-trigger verification mechanism, an anomaly degradation fallback mechanism, and a power consumption and temperature control protection mechanism to improve scheduling robustness and system stability. Specifically, the dual-trigger verification mechanism means that all stage switching instructions simultaneously use the time prediction result and the real-time stage detection result as trigger conditions, taking the first condition met to trigger, ensuring both the forward-looking nature of scheduling and offsetting timing deviations caused by prediction errors; the anomaly degradation fallback mechanism means that if a sudden memory shortage or other anomaly occurs during model loading, the system automatically downgrades to the next level model and re-triggers the loading process. If a critical stage arrives early and the model has not finished loading, the sampling frame rate of the current lower-level model is temporarily increased to prioritize real-time performance, and seamless switching occurs once the model is ready, ensuring uninterrupted basic recognition capabilities; the power consumption and temperature control protection mechanism means that the power consumption and temperature of the entire device are monitored in real time during operation. If the temperature exceeds a safety threshold, computing power throttling and frame rate reduction are automatically triggered to prioritize the operational safety of the edge device.
[0193] Corresponding to the terminal action recognition model resource scheduling method in the above embodiments, the present invention also proposes a terminal action recognition model resource scheduling system.
[0194] like Figure 6As shown in the figure, the terminal action recognition model resource scheduling system of this invention includes a data acquisition module, a stage prediction module, a budget generation module, a scheduling parameter determination module, and a scheduling execution module.
[0195] The data acquisition module is used to acquire continuous motion acquisition data, historical motion cycle data, edge resource status data, and model-level data. Continuous motion acquisition data includes motion image data and skeletal key point data. Edge resource status data includes computing power utilization, cache balance, and power consumption. Model-level data includes the inference time of at least two motion recognition models.
[0196] The phase prediction module is used to generate the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on continuous action acquisition data and historical action cycle data. The training rhythm cycle is a cycle parameter used to characterize the training rhythm of continuous actions, generated based on the timestamps of adjacent key action phases in the historical action cycle data.
[0197] The budget generation module is used to generate stage importance based on the current action stage, training rhythm cycle, and preset stage importance table, and to generate stage resource budget based on stage importance and edge resource status data.
[0198] The scheduling parameter determination module is used to determine the model wake-up timing, target model level, inference frame rate, cache allocation amount, and computing unit allocation strategy based on the next critical action phase, the expected arrival time of the next critical action phase, the remaining time of the current action phase, the phase resource budget, and model level data.
[0199] The scheduling and execution module is used to schedule action recognition model resources according to the model wake-up time, target model level, inference frame rate, cache allocation amount, and computing power unit allocation strategy.
[0200] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An end-side action recognition model resource scheduling method, characterized in that, Includes the following steps: The edge device acquires continuous motion acquisition data, historical motion cycle data, edge resource status data, and model-level data. The continuous motion acquisition data includes motion image data and skeletal key point data. The edge resource status data includes computing power utilization, cache balance, and power consumption. The model-level data includes the inference time of at least two motion recognition models. The edge device generates the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on the continuous action acquisition data and the historical action cycle data. The training rhythm cycle is a cycle parameter used to characterize the training rhythm of continuous actions, generated based on the timestamps of adjacent key action phases in the historical action cycle data. The edge device generates a stage importance based on the current action stage, the training rhythm cycle, and a preset stage importance table, and generates a stage resource budget based on the stage importance and the edge resource status data. The edge device determines the model wake-up timing, target model level, inference frame rate, cache allocation amount, and computing unit allocation strategy based on the next critical action phase, the estimated arrival time of the next critical action phase, the remaining time of the current action phase, the phase resource budget, and the model level data. The edge device performs action recognition model resource scheduling according to the model wake-up time, the target model level, the inference frame rate, the cache allocation amount, and the computing power unit allocation strategy.
2. The end-side action recognition model resource scheduling method of claim 1, wherein, The edge device generates the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on the continuous action acquisition data and the historical action cycle data, including: The end-side device extracts key point velocity sequences and motion phase features from the continuous motion acquisition data; The end-side device matches the key point velocity sequence and the action phase feature with a preset action stage template to obtain the current action stage; The edge device calculates the training rhythm cycle based on the timestamps of adjacent key action phases in the historical action cycle data. The end-side device determines the next key action stage according to a preset key stage sequence table and the current action stage; The edge device generates the estimated arrival time of the next key action phase based on the training rhythm cycle, the current action phase, and the next key action phase. The end-side device generates the remaining time of the current action phase based on the phase start time and the predicted phase duration of the current action phase.
3. The end-side action recognition model resource scheduling method of claim 1, wherein, The edge device generates a stage importance based on the current action stage, the training rhythm cycle, and a preset stage importance table, and generates a stage resource budget based on the stage importance and the edge resource status data, including: The end-side device reads the basic stage importance from the preset stage importance table according to the current action stage; The edge device calculates a rhythm stability coefficient based on the training rhythm cycle and the duration of multiple historical action cycles used to generate the training rhythm cycle. The rhythm stability coefficient is used to characterize the degree of fluctuation stability of the duration of the multiple historical action cycles relative to the training rhythm cycle. The end-side device generates the stage importance based on the basic stage importance and the rhythm stability coefficient; The edge device generates the stage resource budget based on the stage importance, the cache balance, the computing power utilization rate, and the power consumption value, wherein the stage resource budget includes the frame rate budget, the cache budget, and the computing power budget.
4. The end-side action recognition model resource scheduling method of claim 1, wherein, The model-level data also includes the model loading time and resource consumption of the at least two action recognition models; The edge device determines the target model level and model wake-up timing based on the next critical action phase, the estimated arrival time of the next critical action phase, the remaining time of the current action phase, the phase resource budget, and the model level data, including: The edge device filters candidate action recognition models from the at least two action recognition models based on the remaining time of the current action phase and the inference time. The edge device determines the target model level from the candidate action recognition model based on the stage resource budget and the resource usage. The end-side device determines the model wake-up time based on the expected arrival time of the next critical action phase and the model loading time.
5. The resource scheduling method for the end-side action recognition model according to claim 4, characterized in that, The edge device determines the model wake-up timing based on the estimated arrival time of the next critical action phase and the model loading time, including: The end-side device acquires the current time and calculates the remaining time between the estimated arrival time of the next critical action phase and the current time. The end-side device compares the remaining time to reach the stage with the model loading time to obtain the model preloading determination result. If the model preloading determination result indicates that the remaining time to reach the stage is not greater than the sum of the model loading time and the preset safety time, the end device determines the current time as the model wake-up time. If the model preloading determination result indicates that the remaining time to reach the stage is greater than the sum of the model loading time and the preset safety time, the end device generates the model wake-up timing based on the expected arrival time of the next key action stage, the model loading time, and the preset safety time.
6. The end-side action recognition model resource scheduling method of claim 1, wherein, After the endpoint device generates the phase resource budget based on the phase importance and the endpoint resource status data, it also includes: The end-side device compares the stage importance with a preset low importance threshold to obtain a low importance determination result; When the low importance determination result indicates that the importance of the stage is less than the preset low importance threshold, the edge device generates a transferable computing power budget based on the stage resource budget and the edge resource status data; The edge device generates a critical phase reserved budget based on the estimated arrival time of the next critical action phase and the transferable computing power budget; The end-side device generates a stage queue identifier based on the next critical action stage, generates a scheduling time window corresponding to the stage queue identifier based on the expected arrival time of the next critical action stage, generates a resource budget queue based on the stage queue identifier and the scheduling time window, and writes the reserved budget for the critical stage into the resource budget queue.
7. The end-side action recognition model resource scheduling method of claim 1, wherein, The edge device determines the inference frame rate, the cache allocation amount, and the computing unit allocation strategy, including: The end-side device reads the model input size and the model minimum cache requirement according to the target model hierarchy; The edge device generates the inference frame rate based on the stage resource budget and the model input size; The endpoint device generates the cache allocation based on the cache remaining amount and the minimum cache requirement of the model. The edge device determines at least one computing power unit from the central processing unit, graphics processing unit, and neural network processing unit based on the computing power occupancy rate, the power consumption value, and the target model level, and generates the computing power unit allocation strategy.
8. The end-side action recognition model resource scheduling method of claim 2, wherein, After the edge device calculates the training rhythm cycle based on the timestamps of adjacent key action phases in the historical action cycle data, it also includes: The end-side device generates the actual duration of the current stage based on the stage start time and the current time of the current action stage; The end-side device generates a rhythm offset based on the actual duration of the current stage and the historical duration of the same stage in the historical action cycle data. The end-side device corrects the training rhythm cycle based on the rhythm offset to obtain the corrected training rhythm cycle. The end-side device updates the estimated arrival time of the next key action phase according to the modified training rhythm cycle.
9. The end-side action recognition model resource scheduling method according to any one of claims 1-8, characterized in that, The edge device performs action recognition model resource scheduling according to the model wake-up time, the target model level, the inference frame rate, the cache allocation amount, and the computing power unit allocation strategy, including: The end-side device generates a model loading instruction based on the model wake-up timing; The end-side device generates a model switching instruction based on the target model hierarchy; The end-side device generates a frame sampling instruction based on the inference frame rate; The endpoint device generates a cache allocation instruction based on the cache allocation amount; The edge device generates a computing power allocation instruction according to the computing power unit allocation strategy; The edge device generates a resource scheduling instruction sequence according to the model loading instruction, the model switching instruction, the frame sampling instruction, the cache allocation instruction, and the computing power allocation instruction, and executes the resource scheduling instruction sequence.
10. An end-side action recognition model resource scheduling system, characterized in that, The method for scheduling end-side action recognition model resources as described in claim 1 includes: The data acquisition module is used to acquire continuous motion acquisition data, historical motion cycle data, edge resource status data and model-level data. The continuous motion acquisition data includes motion image data and skeletal key point data. The edge resource status data includes computing power utilization, cache balance and power consumption value. The model-level data includes the inference time of at least two motion recognition models. The phase prediction module is used to generate the current action phase, training rhythm cycle, next key action phase, estimated arrival time of the next key action phase, and remaining time of the current action phase based on the continuous action acquisition data and the historical action cycle data. The training rhythm cycle is a cycle parameter used to characterize the training rhythm of continuous actions, generated based on the timestamps of adjacent key action phases in the historical action cycle data. The budget generation module is used to generate a stage importance based on the current action stage, the training rhythm cycle, and a preset stage importance table, and to generate a stage resource budget based on the stage importance and the edge resource status data. The scheduling parameter determination module is used to determine the model wake-up timing, target model level, inference frame rate, cache allocation amount and computing unit allocation strategy based on the next critical action stage, the estimated arrival time of the next critical action stage, the remaining time of the current action stage, the stage resource budget and the model level data. The scheduling and execution module is used to perform resource scheduling for the action recognition model according to the model wake-up time, the target model level, the inference frame rate, the cache allocation amount, and the computing power unit allocation strategy.