Resource flow optimization method and system for multi-task chain type triggering of smart watch

Through the resource flow optimization method triggered by smart watch multi-task chain, the resource competition and energy consumption increase caused by traditional task parallelism methods are solved, stable resource allocation and energy consumption management between tasks are realized, and the multi-task processing capability and battery life of smart watches are improved.

CN120029766AInactive Publication Date: 2025-05-23SHENZHEN HENGZHAOXUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510067753.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-05-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional task parallelism methods can easily lead to resource competition and energy consumption, affecting the normal operation of smart watch multi-tasking.

Method used

The resource flow optimization method triggered by smart watch multi-task chain is adopted, and resource flow and energy consumption management are optimized by identifying the task execution sequence, activating resource isolation settings, dynamically adjusting processing parameters and cache resources, sharing public resources, monitoring energy consumption, etc.

Benefits of technology

It effectively avoids resource conflicts between tasks, reduces energy consumption, and ensures the stability and battery life of smart watches during multi-tasking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029766A_ABST
    Figure CN120029766A_ABST
Patent Text Reader

Abstract

The invention provides a resource flow optimization method and system for multi-task chain type triggering of a smart watch, and is applied to the field of resource data processing. Through the design based on the task chain type triggering mechanism, the execution sequence and the dependency relationship of the tasks are clearly defined, the situation that multiple tasks contend for resources at the same time can be effectively avoided, each task begins to be executed only after the front task which the task depends on is executed, and therefore resource conflicts among the tasks are avoided, and the task execution efficiency is improved. Meanwhile, by activating the preset resource isolation mechanism, the resource usage amount of different tasks can be limited, that is, each task is allocated with limited resources according to the required resources, and therefore the situation that a certain task excessively occupies the resources, and execution of other tasks is affected is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of resource data processing, and in particular to a resource flow optimization method and system for multi-task chain triggering of a smart watch. Background Art

[0002] Currently, smart watches can run a variety of tasks, including sensor data collection, user notifications, background calculations, Bluetooth communications, etc., and these tasks may have complex dependencies. For example, motion data collection needs to be coordinated with heart rate monitoring, or Bluetooth transmission needs to wait for data analysis to be completed. However, traditional task parallel methods are prone to resource competition and increased energy consumption, affecting the normal operation of various tasks. Summary of the invention

[0003] The present invention aims to solve the problem that traditional task parallel methods easily lead to resource competition and increased energy consumption, affecting the normal operation of various tasks, and provide a resource flow optimization method and system for multi-task chain triggering of smart watches.

[0004] The present invention adopts the following technical means to solve the technical problem: The present invention provides a resource flow optimization method for multi-task chain triggering of a smart watch, comprising: Based on the pre-set task chain trigger mechanism in the smart watch, identify the current task execution order of the smart watch; Determining whether the task execution order matches a priority sequence preset by the smart watch; If yes, then obtain the task requirement resources of the task to be executed, activate the preset resource isolation settings of the smart watch according to the task requirement resources, limit the resource usage of the smart watch by a single task, and detect the real-time energy consumption data of the smart watch, wherein the task requirement resources specifically include background services, process management and network connections; Determining whether the real-time energy consumption data reaches a preset energy consumption upper limit; If it is reached, the computing load of the task to be executed is collected, and according to the computing load, the processing parameters of the smart watch are dynamically adjusted to obtain an access request for the task to be executed. Based on the access request, the idle background applications of the smart watch are adaptively frozen, and the preset cache resources of the idle background applications are limited, wherein the processing parameters specifically include operating frequency voltage, cache management optimization, and core activation sleep.

[0005] Furthermore, before the step of obtaining the task required resources of the task to be executed, the step further includes: Based on the pre-recorded access frequency of the smart watch to the task to be executed, classifying the resource access mode of the task to be executed, wherein the resource access mode specifically includes read-intensive, write-intensive and mixed; Determining whether the resource access mode complies with a preset resource sharing priority; If so, the preset resource reuse mechanism is activated, and according to the necessary resources reserved in the preset resource pool, the common resources between tasks are shared from the resource pool, and the common resources are introduced into the tasks to be executed, and the execution progress of the tasks to be executed is detected. According to the execution progress, the common resources are released back to the resource pool, wherein the common resources specifically include cache, data buffer and processor time.

[0006] Furthermore, the step of detecting the real-time energy consumption data of the smart watch further includes: Based on the preset monitoring requirements of the smart watch, the sampling interval of the preset sensor is adjusted, and the sensor is used to measure the energy consumption of each component in the smart watch; Determining whether the energy consumption exceeds a preset energy consumption upper limit; If so, the preset software architecture of the smart watch is split into a corresponding number of microservices, and corresponding energy consumption monitoring components are embedded in the microservices. Through the energy consumption monitoring components, the resource allocation of the microservices is dynamically adjusted.

[0007] Furthermore, the step of collecting the computing load of the task to be executed further includes: Based on the task type of the task to be executed, measuring the demand utilization rate of the task type for the preset CPU in different execution stages, wherein the task type specifically includes computing intensive, I / O intensive and storage intensive; Determining whether the demand utilization rate reaches a preset peak value; If so, then based on the task type, construct a task dependency graph for the tasks to be executed, obtain the dependency relationships between the tasks to be executed through the task dependency graph, identify the resource sharing situation between the tasks to be executed based on the dependency relationships, and limit the corresponding conflicting competing resources from the resource sharing situation.

[0008] Furthermore, the step of determining whether the task execution order matches the priority sequence preset by the smart watch further includes: Obtain resource occupancy information of the tasks to be executed, and optimize the execution order of the tasks based on the priority sequence and the resource occupancy information, wherein the optimization specifically includes delaying the execution of the tasks to be executed, scheduling the tasks to be executed on demand, and optimizing concurrent resource allocation; Determining whether a preset resource competition is detected in the task execution sequence; If so, identify the user's real-time behavior on the smart watch, dynamically adjust the reserved resources of the task execution order according to the real-time behavior, temporarily limit the priority sequence based on the reserved resources, and reintegrate the task execution order through the real-time behavior.

[0009] Furthermore, the step of determining whether the real-time energy consumption data reaches a preset energy consumption upper limit further includes: Based on the static power preset by the smart watch, adaptively generate the dynamic energy consumption upper limit of the smart watch; Determine whether the dynamic energy consumption upper limit can meet the current execution task volume of the smart watch; If not, the user's operation activity on the smart watch is detected according to the dynamic energy consumption upper limit, and the cache update frequency of the smart watch is dynamically adjusted according to the operation activity, wherein the cache update frequency is specifically the refresh frequency and replacement frequency of the data in the cache.

[0010] Furthermore, the step of identifying the current task execution order of the smart watch based on the task chain trigger mechanism pre-set in the smart watch also includes: Based on the task execution sequence, detecting the preset preconditions of the task to be executed; Determine whether the smart watch meets the precondition; If not, the to-be-executed tasks are temporarily moved out of the task execution sequence, and the task execution sequence is adaptively adjusted according to the moved to-be-executed tasks.

[0011] The present invention also provides a resource flow optimization system triggered by multi-task chain of smart watches, comprising: An identification module, used to identify the current task execution order of the smart watch based on a task chain trigger mechanism pre-set in the smart watch; A judgment module, used to judge whether the task execution order matches the priority sequence preset by the smart watch; an execution module, configured to obtain the task requirement resources of the task to be executed, activate the preset resource isolation setting of the smart watch according to the task requirement resources, limit the resource usage of the smart watch by a single task, and detect the real-time energy consumption data of the smart watch, wherein the task requirement resources specifically include background services, process management and network connections; A second judgment module is used to judge whether the real-time energy consumption data reaches a preset energy consumption upper limit; The second execution module is used to collect the computing load of the task to be executed if it is reached, dynamically adjust the processing parameters of the smart watch according to the computing load, obtain the access request of the task to be executed, and adaptively freeze the idle background application of the smart watch based on the access request, and limit the preset cache resources of the idle background application, wherein the processing parameters specifically include operating frequency voltage, cache management optimization and core activation sleep.

[0012] Furthermore, it also includes: A classification module, configured to classify the resource access mode of the task to be executed based on the pre-recorded access frequency of the smart watch to the task to be executed, wherein the resource access mode specifically includes read-intensive, write-intensive and mixed; A third judgment module is used to judge whether the resource access mode meets the preset resource sharing priority; The third execution module is used to activate the preset resource reuse mechanism, share the common resources between tasks from the resource pool according to the necessary resources reserved in the preset resource pool, introduce the common resources into the tasks to be executed, detect the execution progress of the tasks to be executed, and release the common resources back to the resource pool according to the execution progress, wherein the common resources specifically include cache, data buffer and processor time.

[0013] Furthermore, the execution module also includes: A measuring unit, configured to adjust a sampling interval of a preset sensor based on a preset monitoring requirement of the smart watch, and use the sensor to measure energy consumption of each component in the smart watch; A judging unit, used to judge whether the energy consumption exceeds a preset energy consumption upper limit; The execution unit is used to split the preset software architecture of the smart watch into a corresponding number of microservices, embed the corresponding energy consumption monitoring components in the microservices, and dynamically adjust the resource allocation of the microservices through the energy consumption monitoring components.

[0014] The present invention provides a resource flow optimization method and system for multi-task chain triggering of a smart watch, which has the following beneficial effects: The present invention uses a design based on a task chain trigger mechanism, in which the execution order and dependencies of tasks are clearly defined, which can effectively avoid multiple tasks from competing for resources at the same time. Each task will start executing only after the predecessor task on which it depends is completed, thereby avoiding resource conflicts between tasks. At the same time, by activating a preset resource isolation mechanism, the resource usage of different tasks can be limited, that is, each task is allocated limited resources according to its required resources, thereby avoiding a task from excessively occupying resources and affecting the execution of other tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flowchart of an embodiment of a resource flow optimization method for multi-task chain triggering of a smart watch according to the present invention; Figure 2 This is a structural block diagram of an embodiment of a resource flow optimization system triggered by multi-task chain of a smart watch of the present invention. DETAILED DESCRIPTION

[0016] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The implementation of the objectives, functional features and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] Reference Figure 1 , a resource flow optimization method for multi-task chain triggering of a smart watch in an embodiment of the present invention, comprising: S1: Based on the pre-set task chain trigger mechanism in the smart watch, identify the current task execution order of the smart watch; S2: Determine whether the task execution order matches the priority sequence preset by the smart watch; S3: If yes, then obtain the task requirement resources of the task to be executed, activate the preset resource isolation settings of the smart watch according to the task requirement resources, limit the resource usage of the smart watch by a single task, and detect the real-time energy consumption data of the smart watch, wherein the task requirement resources specifically include background services, process management and network connections; S4: Determine whether the real-time energy consumption data reaches a preset energy consumption upper limit; S5: If reached, the computing load of the task to be executed is collected, and according to the computing load, the processing parameters of the smart watch are dynamically adjusted to obtain an access request for the task to be executed, and based on the access request, the idle background applications of the smart watch are adaptively frozen to limit the preset cache resources of the idle background applications, wherein the processing parameters specifically include operating frequency voltage, cache management optimization, and core activation sleep.

[0019] In this embodiment, the system identifies the current task execution order of the smart watch based on the task chain trigger mechanism pre-set in the smart watch, and then the system determines whether the task execution order matches the priority sequence pre-set by the smart watch to execute the corresponding steps; for example, when the system determines that the current task execution order of the smart watch does not match the priority sequence pre-set by the smart watch, the system will consider that there is a potential problem in task scheduling, which may cause the delayed execution of important tasks or low-priority tasks to occupy too many resources, thereby affecting the response speed, stability and energy efficiency of the system. The system will correct this problem by dynamically adjusting the priority or execution order of the tasks. For example, the system can suspend the currently executing low-priority tasks. Start high-priority tasks first, or postpone the start time of low-priority tasks to ensure that the task order meets expectations. At the same time, suspend the execution of the current low-priority task and put the task in the waiting queue. When the high-priority task is completed, the system resumes the execution of the low-priority task to ensure that the task execution order meets the expected priority. When the priority sequence changes, the system needs to adjust the task energy management strategy. For example, high-priority tasks may require more resources and higher energy efficiency requirements, while low-priority tasks can be executed in a lower energy efficiency mode. The system should dynamically adjust the energy efficiency strategy while adjusting the task order to ensure energy saving of the overall system. For example, when the system determines that the current task execution order of the smart watch It can match the priority sequence pre-set by the smart watch. At this time, the system will consider that there is no abnormality in task scheduling, and the system will obtain the task requirement resources to be executed. The task requirement resources specifically include background services, process management, and network connections. According to these task requirement resources, the resource isolation settings pre-set by the smart watch are activated to limit the resource usage of a single task on the smart watch and detect the real-time energy consumption data of the smart watch. The system can effectively avoid resource conflicts or competition by ensuring that tasks are executed in order of priority, and reduce performance bottlenecks or task blocking problems caused by the parallel execution of multiple tasks. This is crucial to maintaining the smooth operation of the smart watch, especially when multi-tasking or the system load is high. At the same time, by activating the preset Resource isolation mechanism. The system can limit the resource usage of each task. For example, the resource usage of background services and processes will be strictly controlled to prevent them from occupying too much computing and storage resources and affecting the execution of foreground tasks. This resource isolation can ensure the stability of smart watches when multiple tasks are running in parallel, and prevent a task from excessively occupying other tasks and affecting the performance of the entire system. By limiting the resource usage of each task, it avoids the situation where a single task excessively occupies system resources, ensuring the efficient execution of tasks. Tasks no longer compete for too many system resources, thereby reducing resource waste and system response delays. The system then determines whether the real-time energy consumption data of the smart watch has reached the preset energy consumption limit to execute the corresponding steps.For example, when the system determines that the real-time energy consumption data of the smart watch has not reached the preset energy consumption limit, the system will consider that the current task execution process has not caused excessive consumption of the battery or system resources, and the energy consumption level of the smart watch is still within a reasonable range. The system will continue to run according to the current task execution order and resource allocation. This means that the existing task scheduling strategies, priority processing, resource allocation, etc. do not need to be adjusted. At the same time, since the system's energy consumption level is within a safe range, the system can execute more low-priority or background tasks based on the current tasks to improve overall resource utilization. The system can increase the number of tasks in a timely manner, especially during the current When the task load is light, the remaining resources can be used to execute more tasks, and if there are sudden high-priority tasks entering, the system can handle them flexibly without being strictly constrained by energy consumption limits. Under the current energy consumption level, the system has sufficient resources to support the execution of these sudden tasks, avoiding system response delays or task execution interruptions due to insufficient energy consumption. For example, when the system determines that the real-time energy consumption data of the smart watch reaches the preset energy consumption limit, the system will consider that the current task execution process causes excessive consumption of batteries or resources, and the system will collect the computing load of the tasks to be executed, and dynamically adjust the processing parameters of the smart watch based on these computing loads. The processing parameters specifically include operating frequency voltage, cache management optimization and core activation sleep, obtain access requests for tasks to be executed, and adaptively freeze idle background applications of the smart watch based on different access requests, and limit the pre-set cache resources of idle background applications; by freezing idle background applications and limiting their cache resources, the system can effectively reduce the burden of background processes and prevent these inactive tasks from occupying valuable computing resources and memory, so that the system can focus more resources on high-priority tasks that need to be processed currently, avoiding system overload or performance degradation caused by excessive resource consumption, and adaptively adjusting the tasks based on different access requests. Resource usage, the system can flexibly respond to the needs of different tasks. For example, when there are fewer access requests for low-priority tasks, the resource allocation to them can be reduced, and vice versa, more resources can be provided to high-priority tasks. Such a resource scheduling mechanism can ensure that key tasks are completed in a timely manner while avoiding unnecessary energy consumption. And through the optimization and adjustment of operating frequency, voltage and cache management, the system can balance performance and energy consumption according to the needs of the current task. For example, during high-load tasks, the operating frequency can be increased to ensure fast response, and during low-load tasks, the frequency can be reduced to save power. This flexible scheduling can effectively avoid resource waste and improve system efficiency in a multi-tasking environment. ;

[0020] It should be noted that the access request of the task to be executed is obtained, and based on the access request, the idle background application of the smart watch is adaptively frozen to limit the preset cache resources of the idle background application. The specific examples are as follows: Assume that a user is using a smartwatch for health monitoring (gait monitoring and heart rate detection), and at the same time receives a message reminder from a social application, the system will dynamically schedule and optimize resources according to the following steps: First, obtain the access request for the task to be executed. Gait monitoring (high priority task): The user is performing gait monitoring. The accelerometer and gyroscope sensors in the watch are working in real time. The system needs to calculate based on the sensor data to provide gait analysis results. Heart rate detection (high priority task): The user is also monitoring their heart rate. The system needs to measure the user's heart rate data through an optical sensor (such as a PPG sensor) and process it in real time. Social message reminder (low priority task): The user receives a message from a social application. This task only notifies the user of a new message and does not require processing a large amount of data. It only requires more system resources when the user views the message. Then determine the demand for task resources. 1. Gait monitoring, Required resources: High-frequency sensor data acquisition (accelerometer, gyroscope), real-time data processing, continuous CPU usage; Priority: Very high, need to ensure uninterrupted data collection and real-time analysis; 2. Heart rate detection, Required resources: Continuous sensor data collection (optical heart rate monitoring), CPU for data analysis, high real-time data processing requirements; Priority: high, but slightly lower than gait monitoring, some processing can be slightly delayed; 3. Social message reminders, Required resources: Push notifications, data loading and display do not require frequent data processing and hardware resources. The main consumption is background processes and a small amount of CPU resources. Priority: Low, resources are needed only when the user clicks on it; Then freeze idle background apps. Detecting idle tasks: The system detects that social message reminders are low-priority tasks. Currently, they are just notifications, and no real-time data processing or frequent network requests are performed. Therefore, the background processes of social applications will be frozen and stop occupying CPU resources. At the same time, other applications (such as weather applications, news updates, etc.) will also be suspended, as these applications currently have no active tasks running. The system suspends the background processes of social applications and stops their unnecessary tasks, such as cache updates and data synchronization. The application will only be reactivated when the user views the message. Then limit the preset cache resources of idle background applications, Limit cache update frequency. Because social apps are in the background and not being viewed, the system reduces their cache update frequency and extends the cache refresh cycle. For example, the cache no longer updates social dynamics and messages frequently, and only loads data when the user opens the app. If the weather app is in the background, its cache update frequency will also be limited, for example, it will only update weather information every 10 minutes instead of every minute. If the system detects that resources are very tight, the smartwatch may close some unnecessary caches. For example, the real-time data cache of the weather app is closed until the user activates the app again, and then the cache is restored. Finally, the adaptive adjustment strategy is Assuming that the current gait monitoring task has a high computational load, the watch's processor needs to consume more energy to process the accelerometer and gyroscope data; in order to avoid excessive power consumption, the system may dynamically adjust: if the gait change is not obvious, the system may temporarily reduce the sampling frequency of the accelerometer and gyroscope to reduce the processor load; if the system load is high, the watch's CPU frequency may dynamically decrease to save energy; but if the gait monitoring task requires higher computing power to analyze the gait in real time, the CPU frequency will increase accordingly; if the heart rate detection task does not find an abnormality for a period of time (for example, the heart rate is within a stable range), the system can appropriately reduce the operating frequency of the heart rate sensor (for example, sampling once per second instead of three times per second) to save power; To summarize, the above examples enable smart watches to manage resources and energy consumption more intelligently by dynamically freezing idle background applications, limiting the use of cache resources, and adaptively adjusting the operating frequency of sensors and CPUs according to task requests. This optimization not only ensures the smooth execution of high-priority tasks, but also effectively saves energy when the user is inactive, thereby extending the battery life of the device and improving the user experience.

[0021] In this embodiment, before step S3 of obtaining the task required resources of the task to be executed, the following steps are also included: S301: Classifying resource access modes of the task to be executed based on the pre-recorded access frequency of the smart watch to the task to be executed, wherein the resource access modes specifically include read-intensive, write-intensive and mixed; S302: Determine whether the resource access mode meets the preset resource sharing priority; S303: If so, activate the preset resource reuse mechanism, share common resources between tasks from the resource pool according to the necessary resources reserved in the preset resource pool, introduce the common resources into the tasks to be executed, detect the execution progress of the tasks to be executed, and release the common resources back to the resource pool according to the execution progress, wherein the common resources specifically include cache, data buffer and processor time.

[0022] In this embodiment, the system classifies the resource access modes of the tasks to be executed based on the access frequencies pre-recorded by the smart watch to the tasks to be executed. The resource access modes specifically include read-intensive, write-intensive and mixed types. Then the system determines whether these resource access modes meet the preset resource sharing priorities to execute the corresponding steps. For example, when the system determines that the resource access mode of the task to be executed cannot meet the preset resource sharing priorities, the system will believe that the resource usage mode of the current task may have an adverse effect on the overall resource allocation and performance of the system, and the system will readjust the task to be executed according to the current resource usage. The system can prioritize tasks, such as delaying the execution of tasks with a write-intensive resource access mode and giving priority to read-intensive tasks to balance resource usage. At the same time, the system can dynamically adjust the cache allocation strategy according to the resource access mode of the task. For example, for read-intensive tasks, the cache capacity can be increased to improve the cache hit rate of read operations, while for write-intensive tasks, the write buffer can be optimized to reduce the overhead caused by frequent write operations. In addition, independent resource pools can be set for different types of tasks. For example, read-intensive tasks and write-intensive tasks use different memory or storage areas to reduce interference between each other. For example, when the system determines that the resource access mode of the task to be executed is The method can meet the pre-set resource sharing priority. At this time, the system will believe that the resource usage of the current task will not have a negative impact on resource allocation and performance. The system will activate the pre-set resource reuse mechanism and share the common resources between tasks from the resource pool according to the necessary resources reserved in the pre-set resource pool. The common resources specifically include cache, data buffer and processor time. These common resources are introduced to the tasks to be executed, and the execution progress of the tasks to be executed is detected. After the execution progress is completed, the common resources are released back to the resource pool. By sharing common resources such as cache, data buffer and processor time, the system can maximize By utilizing limited resources, reducing resource idleness and waste, and improving overall resource utilization efficiency, the system effectively reduces resource competition and conflicts caused by independent resource applications by each task by sharing common resources among tasks, avoiding performance bottlenecks caused by resource contention. By sharing resources, resource reallocation and initialization overhead during task switching are reduced, task switching efficiency is improved, and system performance is improved. By reasonably allocating and reusing resources, the system can reduce unnecessary resource consumption and reduce energy consumption, thereby extending the battery life of smart watches. Sharing common resources avoids repeated allocation and release of resources, reducing the overall energy consumption of the system.

[0023] It should be noted that the preset resource reuse mechanism is activated, and according to the necessary resources reserved in the preset resource pool, the common resources between tasks are shared from the resource pool, the common resources are introduced into the tasks to be executed, the execution progress of the tasks to be executed is detected, and according to the execution progress, the common resources are released back to the resource pool. The specific examples are as follows: Suppose a user runs several apps on a smartwatch at the same time, including a music player app, a health monitoring app (recording heart rate, steps, etc.), and a background synchronization task (synchronizing the user's messages and calendar); Activate the resource reuse mechanism. When the user opens the music player application, the system detects that there are a large number of current tasks, so it activates the resource reuse mechanism. This mechanism is designed to ensure that each task shares system resources reasonably, and avoids a single task monopolizing resources and affecting other tasks. Resource pool management,The resource pool of the smart watch includes cache (for storing temporary data), data buffer (for transferring data streams), and processor time (allocation of CPU time slices); Reserve resources. According to preset rules, the system reserves some resources to ensure the continuous operation of the health monitoring application, because health monitoring is a high-priority task for users and requires continuous recording of health data. Sharing public resources: The system allocates a certain amount of cache and processor time from the resource pool to the music playback application; these resources are used to load music lists, decode music files, and control volume, playback and other functions; at the same time, the health monitoring application shares a part of the data buffer for real-time collection and storage of user heart rate and step data; the background synchronization task uses the system's low-priority processor time to synchronize the user's messages and calendar. Due to its low priority, this task will only occupy more resources when the system resources are sufficient; By introducing resources to the tasks to be executed, the music playback application can smoothly play music after obtaining the necessary processor time and cache, providing a seamless user experience; the health monitoring application uses the allocated buffer to continue recording the user's real-time health data to ensure data continuity and accuracy; the background synchronization task uses low-priority processor time to perform synchronization operations during system idle time without affecting the user experience of the foreground task; Detect task execution progress. The system continuously monitors the execution progress of each task. For example, after a music player finishes playing a song, the system will detect whether it needs to continue playing the next song or wait for further operation from the user. After a certain amount of data is collected, the health monitoring application will regularly upload the data to the cloud. The system will monitor this process to ensure that the data is uploaded smoothly. Release resources. When the user pauses or closes the music playback app, the system detects that the app no ​​longer needs processor time and cache, and releases these resources back to the resource pool. The released resources can be immediately reused by health monitoring apps or other high-priority tasks, such as speeding up the upload of health data or responding to other user operations. In summary, the above examples avoid long-term occupation of resources by a single task through dynamic allocation and recycling of resources, thereby improving the overall resource utilization efficiency of the system. At the same time, high-priority tasks (such as health monitoring) always receive sufficient resource support even if other tasks are also running. When the user switches or closes tasks, the system can respond quickly, reducing freezes or delays caused by insufficient resources and providing a smooth operating experience.

[0024] In this embodiment, the step S3 of detecting the real-time energy consumption data of the smart watch further includes: S31: Based on the preset monitoring requirements of the smart watch, adjusting the sampling interval of the preset sensor, and using the sensor to measure the energy consumption of each component in the smart watch; S32: Determine whether the energy consumption exceeds a preset energy consumption upper limit; S33: If yes, split the preset software architecture of the smart watch into a corresponding number of microservices, embed the corresponding energy consumption monitoring components in the microservices, and dynamically adjust the resource allocation of the microservices through the energy consumption monitoring components.

[0025] In this embodiment, the system adjusts the sampling interval of the sensors based on the monitoring requirements preset by the smart watch, applies these sensors to measure the energy consumption of each component in the smart watch, and then the system determines whether these energy consumption conditions exceed the preset energy consumption upper limit to execute the corresponding steps; for example, when the system determines that the energy consumption of each component in the smart watch does not exceed the preset energy consumption upper limit, the system will consider that the current energy consumption level is within the normal range, each component is in good operating condition, and no unnecessary power consumption is caused, and the system does not need to take any additional energy-saving measures immediately, and can continue to operate according to the current task scheduling and resource management strategy. At the same time, the current energy consumption data is recorded for subsequent energy consumption analysis and optimization. For example, it can be used as a baseline data to compare with the energy consumption data of other time periods in the future to find potential energy consumption optimization points. Although the current energy consumption is normal, the system should still maintain real-time monitoring to ensure that when the workload increases or the external conditions change, the sampling interval or other operating parameters of the sensor can be adjusted in time to avoid sudden energy consumption growth; for example, when the system determines that the energy consumption of each component in the smart watch exceeds the preset energy consumption limit, the system will consider the current energy consumption level abnormal, and the system will split the pre-set software architecture of the smart watch into the corresponding number of Microservices are embedded with corresponding energy consumption monitoring components in microservices. Through these energy consumption monitoring components, the resource allocation of microservices is dynamically adjusted. By embedding energy consumption monitoring components, the system can capture the energy consumption of each microservice in real time, so that the system can dynamically adjust resource allocation according to actual energy consumption, thereby avoiding excessive use of overall system resources. After being split into microservices, the system can more flexibly manage the energy consumption of different functional modules, and reduce the resource occupation of high-energy consumption components through targeted optimization, thereby achieving overall energy consumption balance. At the same time, the microservice architecture allows the system to flexibly allocate resources according to current task requirements, avoiding waste caused by fixed resource allocation in traditional architecture. By dynamically adjusting resources, it ensures that resources are used for the most needed tasks, thereby improving overall resource utilization. Dividing resource usage into different microservices can effectively reduce resource competition between tasks and prevent the high energy consumption of a task from affecting the normal operation of other tasks. When a microservice has abnormal energy consumption, the system can independently adjust or limit the resource allocation of the microservice without affecting the normal operation of other microservices. This isolation mechanism improves the overall stability of the system. The modular nature of the microservice architecture makes the system easier to optimize and expand. For example, the energy consumption algorithm can be optimized for a specific microservice without significantly changing the entire system architecture.

[0026] It should be noted that the preset software architecture of the smart watch is split into a corresponding number of microservices, and corresponding energy consumption monitoring components are embedded in the microservices. Through the energy consumption monitoring components, the resource allocation of the microservices is dynamically adjusted. The specific examples are as follows: Assume that in daily use, smart watches have multiple functional modules, such as health monitoring, music control, message notification, etc. In order to manage energy consumption more efficiently, the system splits these functional modules into independent microservices and embeds energy consumption monitoring components in each microservice; Health monitoring microservices, Background,The health monitoring microservice is responsible for recording the user's heart rate, steps, sleep quality and other data; this service usually needs to run continuously to ensure the integrity and real-time nature of the data; The problem was found that the energy consumption monitoring component detected that there was no obvious difference in energy consumption patterns during the day and at night, and energy consumption was still higher at night; analysis found that even when the user was sleeping, heart rate and step monitoring were still sampled at the same frequency as during the day; Solution: The system dynamically adjusts the sampling frequency based on the data fed back by the energy consumption monitoring component. During the user's sleep, the heart rate sampling frequency is reduced from once per minute to once per hour, and step monitoring is suspended. Through this adjustment, nighttime energy consumption is reduced by 30%, while users can still obtain accurate sleep data. Message notification microservice, Background,The message notification microservice is responsible for receiving and displaying notifications from mobile phones, such as text messages, emails, and social media reminders. To ensure real-time performance, this microservice usually checks for new notifications at a high frequency; The problem was found that the energy consumption monitoring component found that notification checks were still performed at a high frequency when the user was not actively using the watch, resulting in unnecessary energy waste; Solution: The system optimized the behavior of the message notification microservice based on energy consumption monitoring data. When the watch is idle, the notification check frequency is reduced to once every 10 minutes. When the user activates the watch, the check frequency is restored to once every minute. This optimization measure reduces the total energy consumption by 20% without affecting the user experience. Music control microservice, Background,The music control microservice allows users to play, pause, and switch songs through the watch; this service needs to communicate with the phone frequently during music playback; Problem discovery: The energy consumption monitoring component found that when music playback was paused, the microservice continued to maintain high-frequency communication with the mobile phone, resulting in additional energy consumption; Solution: The system optimized the communication strategy based on monitoring data. When the music playback is paused for more than 5 minutes, the microservice will automatically disconnect the real-time communication with the mobile phone and enter low-power mode. The connection will be re-established only when the user operates again. This adjustment reduces the standby energy consumption of the music control microservice by 40%. To sum up, in the above examples, by introducing energy consumption monitoring components, smart watches can accurately identify the energy consumption patterns of different microservices and optimize resource allocation accordingly. This method not only extends the battery life of the device, but also ensures the normal operation of various functions and improves the user experience.

[0027] In this embodiment, the step S5 of collecting the computing load of the task to be executed further includes: S51: Based on the task type of the task to be executed, measuring the required utilization rate of the task type on the preset CPU in different execution stages, wherein the task type specifically includes computing intensive, I / O intensive and storage intensive; S52: Determine whether the demand utilization rate reaches a preset peak value; S53: If yes, then construct a task dependency graph of the tasks to be executed according to the task type, obtain the dependency relationships between the tasks to be executed through the task dependency graph, identify the resource sharing situation between the tasks to be executed based on the dependency relationships, and limit the corresponding conflicting competing resources from the resource sharing situation.

[0028] In this embodiment, the system measures the demand utilization rate of the task type for a preset CPU in different execution stages based on the task type to be executed, which specifically includes computationally intensive, I / O intensive, and storage intensive tasks. The system then determines whether the demand utilization rate has reached a preset peak value to execute corresponding steps. For example, when the system determines that the demand utilization rate of the task type for a preset CPU in different execution stages has not reached a preset peak value, the system will consider that the CPU is not fully utilized for the execution of the current task and there may be unoptimized resource utilization. The system will reduce the CPU resources allocated to the task and allocate excess CPU resources to other tasks that are more in need, so as to improve the resource utilization of the overall system, such as lowering the CPU priority of the current task so that other high-priority tasks can obtain more CPU time, and at the same time, by reducing the CPU's working The system can reduce the operating frequency or enter low power consumption mode to reduce energy consumption and extend battery life. For example, when the task is not urgent or the non-real-time requirement is low, the system can reduce the CPU frequency to run the task, thereby saving power, and continuously monitor the task execution. If the task demand increases in the subsequent execution stage, the CPU resource allocation can be adjusted in time to ensure that the task can be responded to in time when the resource demand fluctuates. For example, when the system determines that the demand utilization rate of the task type for the preset CPU in different execution stages has reached the preset peak value, the system will consider that the CPU utilization rate of the current task execution has been overloaded. The system will build a task dependency graph for the tasks to be executed based on these task types, and obtain the dependency relationship between the tasks to be executed through the task dependency graph. Based on these dependency relationships, the resource sharing situation between the tasks to be executed is identified, and the corresponding conflicting competition resources are limited from the resource sharing situation.By constructing a task dependency graph of tasks to be executed, the system can accurately understand the dependencies between tasks and ensure that tasks that must be executed in sequence are not interrupted or disordered. For example, the result of a computationally intensive task may be used as the input of another task. If it is not executed in the dependency order, it may cause execution errors or waste of resources. At the same time, by identifying the resource sharing between each task to be executed, the system can avoid multiple tasks competing for the same resource at the same time, thereby reducing resource conflicts and unnecessary interference between tasks. For example, some tasks may share the same memory buffer. If it is not managed during execution, it may cause cache competition and affect the execution efficiency of other tasks. When the task dependency graph is clear and the resource sharing relationship is reasonably restricted, the system can more intelligently identify which tasks can be executed in parallel and which tasks must be executed sequentially. For example, computationally intensive tasks may not need to wait for the completion of I / O intensive tasks, so they can be executed in parallel, thereby shortening the total execution time. Resource competition often leads to waiting and retries between tasks, causing the CPU to frequently switch tasks or increase waiting time, which not only affects the efficiency of task execution, but also increases the energy consumption of the system. By limiting the competition of tasks for conflicting resources, the system can reduce unnecessary switching and waiting time, thereby reducing energy consumption. ;

[0029] It should be noted that, according to the task type, a task dependency graph of the task to be executed is constructed, and the dependency relationship between the tasks to be executed is obtained through the task dependency graph. According to the dependency relationship, the resource sharing situation between the tasks to be executed is identified, and the corresponding conflicting competitive resources are limited from the resource sharing situation. The specific examples are as follows: Assume that a smartwatch needs to handle the following tasks: Task A: Computationally intensive tasks, performing complex data analysis (such as sports data analysis); Task B: I / O intensive task, reading real-time data from sensors (such as heart rate, temperature, etc.); Task C: a storage-intensive task that stores the results calculated by Task A in a storage device; The following dependencies exist between these tasks: Task B must be executed first, and Task A needs to rely on the sensor data of Task B for calculation; After task A is completed, task C starts to execute and stores the calculation results in the storage device; These tasks also have conflicts in resource usage: Task A and Task C may need to share the CPU, especially during the calculation phase of Task A, the CPU will be under high load; Task B requires I / O devices to read sensor data, and Task C may also need to access storage devices to write data; The task dependency graph is: Task B → Task A → Task C (sequential execution) Since Task A and Task C share the CPU, and Task B and Task C share the I / O and storage devices, Task A requires a lot of computing, and Task C also requires the CPU to process when storing data, that is, the system must avoid Task A and Task C occupying the CPU at the same time; Task B and Task C both need to access sensor data and storage devices, so appropriate scheduling must be performed; The system ensures that task B is executed first through priority scheduling, because task A depends on the result of task B. Task A and task C can be executed in parallel, but it is necessary to ensure that there is no conflict when using the CPU. For example, the system can dynamically adjust the execution order of tasks to ensure that task A and task C do not occupy too much CPU resources at the same time. When a task is executed, the system monitors the resource requirements of the task to determine whether there is a resource conflict. When the CPU resource requirements are too high, the system can choose to reduce the execution frequency of the task or delay the execution of task C until task A is completed and the CPU resources are released. To avoid resource conflicts of I / O devices, the system can limit the parallelism of Task B and Task C. For example, when Task B is performing data acquisition, the system can temporarily suspend the storage operation of Task C until Task B is completed. After that, Task C can safely perform data storage. To sum up, in the above examples, by constructing a task dependency graph, the system can clearly understand the relationship between tasks, thereby identifying the conflict points of shared resources. The system can dynamically adjust the task scheduling strategy, resource allocation and execution order to maximize resource utilization efficiency, reduce resource conflicts during task execution, and improve the task execution efficiency and energy efficiency of smart watches.

[0030] In this embodiment, the step S2 of determining whether the task execution order matches the priority sequence preset by the smart watch further includes: S21: Obtain resource occupancy information of the tasks to be executed, and optimize the task execution order based on the priority sequence and the resource occupancy information, wherein the optimization specifically includes delaying the execution of the tasks to be executed, scheduling the tasks to be executed on demand, and optimizing concurrent resource allocation; S22: Determine whether the task execution sequence detects a preset resource competition; S23: If yes, identify the user's real-time behavior on the smart watch, dynamically adjust the reserved resources of the task execution order according to the real-time behavior, temporarily limit the priority sequence based on the reserved resources, and reintegrate the task execution order through the real-time behavior.

[0031] In this embodiment, the system obtains the resource occupancy information of the tasks to be executed, and optimizes the task execution order based on the priority sequence and resource occupancy information. The optimization is specifically to delay the execution of the tasks to be executed, schedule the tasks to be executed on demand, and optimize the concurrent resource allocation. The system then determines whether the task execution order detects a preset resource competition to execute the corresponding steps. For example, when the system determines that the task execution order does not detect the preset resource competition, the system will consider that the current task execution order and resource allocation do not cause resource conflicts or bottlenecks, and the tasks can proceed smoothly as planned. The system will continue to execute tasks according to the existing optimized execution order, and no additional task scheduling is required at this time. Or resource allocation adjustment, tasks can be executed as expected, and resource usage is relatively efficient. At the same time, the on-demand scheduling strategy is maintained to ensure that the execution order of tasks to be executed can be dynamically adjusted according to the actual situation of current resources. At this time, the concurrency and priority of task execution should be reasonably controlled to avoid performance problems caused by excessive resource competition, and continue to optimize the allocation of concurrent resources, such as appropriately increasing the number of parallel tasks, and improving the efficiency and response speed of overall task execution without resource conflicts. Especially when multiple tasks are executed, the parallelism and resource sharing of tasks should be effectively utilized to avoid resource waste; for example, when the system determines that the task execution order detects the pre-set resources Competition, at this time the system will think that the current task execution order and resource allocation cause a conflict, and the task cannot be carried out normally. The system will identify the user's real-time behavior on the smart watch, and dynamically adjust the pre-occupied resources of the task execution order according to different real-time behaviors. Based on these pre-occupied resources, the priority sequence of the smart watch is temporarily restricted, and the task execution order is reintegrated through the user's real-time behavior. The system can timely identify and resolve resource conflicts between tasks by dynamically adjusting the task execution order. For example, if two tasks need to occupy a large amount of CPU resources or memory at the same time, and these resources are insufficient, the system can avoid task conflicts by scheduling one of the tasks first and delaying the execution of the other task. By identifying the user's real-time behavior, the system can adjust the order of task execution according to the user's needs. For example, if the user is using a smartwatch for high-intensity interactions (such as checking messages or making calls), the system can prioritize the execution of these tasks and delay or pause unimportant background tasks. By limiting the priority sequence of the smartwatch, the system can flexibly control the execution of high-priority tasks when resources compete, and temporarily reduce the resource usage of low-priority tasks. For example, when the user is performing a high-priority task (such as answering a call), the system can temporarily reduce the resource usage of low-priority tasks to ensure a smooth user experience.

[0032] In this embodiment, the step S4 of determining whether the real-time energy consumption data reaches a preset energy consumption upper limit further includes: S41: adaptively generating a dynamic energy consumption upper limit of the smart watch based on a preset static power level of the smart watch; S42: Determine whether the dynamic energy consumption upper limit can meet the current execution task volume of the smart watch; S43: If not, detecting the user's operation activity on the smart watch according to the dynamic energy consumption upper limit, and dynamically adjusting the cache update frequency of the smart watch according to the operation activity, wherein the cache update frequency specifically refers to the refresh frequency and replacement frequency of the data in the cache.

[0033] In this embodiment, the system adaptively generates a dynamic energy consumption upper limit of the smart watch based on the static power preset by the smart watch, and then the system determines whether the dynamic energy consumption upper limit can meet the current execution task volume of the smart watch to execute the corresponding steps; for example, when the system determines that the dynamic energy consumption upper limit of the smart watch can meet the current execution task volume of the smart watch, the system will consider that the current energy budget of the smart watch is sufficient to support the task being executed, and the system can continue to execute the current task to ensure that the device will not cause excessive battery consumption or system crash due to excessive energy consumption, and the system will continue to execute each task in the current task scheduling order without interrupting or postponing the task. Execution, because the current dynamic energy consumption upper limit is sufficient to support the task volume, the battery consumption is within a reasonable range, and when the dynamic energy consumption upper limit meets the current task requirements, the system can consider increasing the number of concurrent tasks, especially in low-load conditions, and can execute more background tasks or low-priority tasks, thereby improving the system's work efficiency, and dynamically allocate computing resources according to the energy consumption requirements of the tasks to avoid ineffective resource waste. For computing-intensive tasks, the system can prioritize the allocation of more computing power to ensure that the tasks can proceed smoothly, and for I / O-intensive or storage-intensive tasks, the system can appropriately reduce the allocation of computing resources to reduce energy consumption; for example, when the system If it is determined that the dynamic energy consumption upper limit of the smart watch cannot meet the current execution task volume of the smart watch, the system will consider that the current energy budget cannot support the tasks to be executed. The system will detect the user's operation activity on the smart watch according to the dynamic energy consumption upper limit, and dynamically adjust the cache update frequency of the smart watch according to different operation activities. The cache update frequency specifically refers to the refresh frequency and replacement frequency of the data in the cache. By adjusting the cache update frequency according to the user's operation activity, the system can avoid frequent cache updates when the user activity is low, which can significantly reduce unnecessary energy consumption. Reducing the refresh frequency and replacement frequency of cached data can save the processor's workload. load, thereby extending battery life and avoiding excessive battery consumption due to frequent data updates. At the same time, adjusting the cache update frequency can effectively optimize resource utilization. When user operations are active, the system can appropriately increase the cache update frequency to ensure that the smart watch responds faster and user operations receive timely feedback. When activity is low, the system reduces frequent cache refreshes to avoid resource waste and ensure battery adequacy. Dynamic adjustment of the cache update frequency can effectively alleviate system resource constraints. When the task volume increases and the energy budget is insufficient, the system reduces resource usage by reducing the cache update frequency, thereby ensuring that other important tasks can be executed smoothly.

[0034] It should be noted that, according to the dynamic energy consumption upper limit, the user's operation activity on the smart watch is detected, and the cache update frequency of the smart watch is dynamically adjusted according to the operation activity. The specific examples are as follows: Hypothesis 1: High user activity (frequent use of smartwatches), The user is doing running training and frequently checks real-time sports data (such as heart rate, steps, calories burned, etc.) through the smartwatch. At this time, the user interacts with the smartwatch very frequently, the touch operation frequency is high, and the watch activity is high. Dynamically adjust the cache update frequency. By monitoring user operations, the system finds that users check data every few seconds, so it is necessary to ensure that the data displayed each time is the latest. To ensure timely response, the system will adjust the cache update frequency to a higher value (for example, refresh once every 1 second). Task optimization: the system will allocate more processing resources to applications related to the current sports task, such as heart rate monitoring and step counting applications, and try to avoid unnecessary background tasks occupying resources, such as weather information updates; Energy efficiency management: despite frequent operations, the system will ensure that the smartwatch does not quickly run out of battery due to frequent data updates based on a dynamic energy consumption cap (calculating the current power and task load); the lower the battery power, the system will prioritize limiting the cache update frequency of non-critical tasks; For example, when the user is running, the smartwatch displays real-time heart rate data every 1 second, maintaining a high frequency of updates and refreshes to ensure that the user obtains the latest exercise data and avoid excessive battery depletion due to frequent cache updates; Hypothesis 2: User low activity (smartwatch in standby mode), The user has just finished running and is in a static resting state. The watch is in standby mode and the user has not performed any touch operations or checked any notifications. At this time, the system detects that the user's operation activity is low and the operation frequency of the smart watch is almost zero. Dynamically adjust the cache update frequency. If the system recognizes that the user has not operated the watch for a long time, it will reduce the cache update frequency. For example, the update frequency is adjusted from once every 1 second to once every 10 seconds. At this time, the system will increase the update frequency only when the user actively checks the watch. Task optimization: the system may reduce unnecessary background tasks, such as weather forecast or email updates, and retain a small number of important tasks (such as time display and health data synchronization); Energy efficiency management: When the battery power of the watch is not in high-intensity operation demand, the system will adjust the energy budget according to the dynamic energy consumption limit to ensure that the battery of the smart watch can last longer; If the user places the smartwatch on the desktop and enters standby mode, the system reduces the cache update frequency and data synchronization frequency, refreshing the background health data only once every 10 seconds, greatly reducing battery consumption. Hypothetical scenario 3: Low battery but active user (user active but low battery), The battery level of the smartwatch has dropped to 20%, but the user still frequently interacts with the watch, checks notifications and health data, and the operation activity is still high. At this time, the watch faces the problem of how to balance user needs and battery life when the battery level is low; Dynamically adjust the cache update frequency. The system will first calculate the dynamic power consumption limit. If it finds that the power is insufficient to support a higher frequency of cache updates, the system will reduce the update frequency of non-essential tasks, such as reducing the weather synchronization frequency from once a minute to once every 15 minutes. Task optimization: The system will optimize task execution, maintain the update frequency of the functions that users need most (such as health data synchronization and message notifications), and reduce less urgent background tasks; at this time, users can still receive important notifications and health data, but the system ensures that these tasks do not take up too much power; Energy efficiency management: when users still frequently interact with their smartwatches, the system prioritizes the response of key tasks, such as sports data synchronization and health monitoring, while extending battery life by reducing the update frequency of unimportant tasks; For example, when users check their steps and health data, the smartwatch ensures that the data is updated every few seconds. However, in order to extend the battery life, the system reduces the frequency of synchronization of weather information and social media to avoid unnecessary power consumption. Hypothesis 4: The user does not operate for a long time (the smart watch is in sleep mode). The user wears the smartwatch but does not perform any operation, and the smartwatch enters sleep mode. At this time, the system detects that the user's operation activity is almost zero, and the watch no longer updates data frequently. Dynamically adjust the cache update frequency. The system will significantly reduce the cache update frequency. For example, it may reduce the cache update frequency from once every 1 second to once every 30 seconds or 1 minute until the user activates the watch again. Task optimization: the watch may stop unimportant background updates, such as synchronization of push notifications and updates of weather forecasts, to avoid these operations wasting battery; Energy efficiency management: The system will significantly reduce energy consumption by reducing data synchronization and cache updates based on a dynamic energy consumption cap, ensuring that the battery remains fully charged and waiting for the next user interaction. If the user does not touch the smartwatch, the watch automatically enters sleep mode; at this time, the cache update frequency is reduced to once every 30 seconds, and the background application temporarily stops updating, only keeping the time display, to ensure that the battery can stay charged for a long time; To summarize, the scenarios in the above examples demonstrate how to intelligently adjust the cache update frequency to maximize battery usage efficiency and optimize user experience based on the user's operating activity and the battery status of the smartwatch. Whenever the operating activity is high, the system will increase the cache update frequency to ensure a quick response to user needs. When the user is less active or the battery is low, the system will appropriately reduce the cache update frequency, thereby extending battery life and avoiding unnecessary waste of resources.

[0035] In this embodiment, based on the task chain trigger mechanism pre-set in the smart watch, the step S1 of identifying the current task execution order of the smart watch further includes: S11: Based on the task execution order, detecting the preset preconditions of the task to be executed; S12: Determine whether the smart watch meets the precondition; S13: If not, the to-be-executed tasks are temporarily removed from the task execution sequence, and the task execution sequence is adaptively adjusted according to the removed to-be-executed tasks.

[0036] In this embodiment, the system detects the pre-set preconditions of the task to be executed based on the task execution order, and then the system determines whether the smart watch can meet the pre-set preconditions to execute the corresponding steps; for example, when the system determines that the smart watch can meet the pre-set preconditions of the task to be executed, the system will consider that the current task execution environment and resource status meet expectations, and the task can be started or continued normally. The system will start to execute the task to ensure that the required resources (such as processing power, memory, storage, etc.) are ready, that is, the system can process the task in an optimized manner. At the same time, if the smart watch has multiple tasks to be executed, the system can optimize the task scheduling order based on task priority, current resource usage and user needs to ensure that the most critical or most urgent tasks are executed first, and after ensuring that the task preconditions are met, the system will allocate and adjust resources as needed, including adjusting CPU usage, memory and cache, etc., to ensure that resources are fully utilized and avoid resource competition and conflict between tasks; for example, when the system determines that the smart watch cannot meet the pre-set preconditions of the task to be executed, the system will consider that the current task execution environment and resource status do not meet expectations , the system will temporarily remove the pending tasks from the task execution order, and adaptively adjust the task execution order according to the pending tasks that have been removed; after temporarily removing the unexecutable tasks from the task execution order, the system can free up resources to avoid the long-term inability to execute tasks due to insufficient resources. By adjusting the task execution order, the current tasks that can be carried out smoothly are given priority to avoid waste of system resources. At the same time, tasks are prevented from being forced to execute due to unsatisfied preconditions, and the system is prevented from entering an error state or an exception. Temporary removal of tasks from the execution order helps to ensure the stability of the system and avoid crashes or deadlocks caused by task conflicts or insufficient resources. If the current resource status cannot support task execution, especially when the battery power is low or other hardware resources are tight, temporarily removing tasks from the execution order can effectively reduce unnecessary energy consumption or resource consumption and extend the use time of smart watches. The system can dynamically adjust the task execution order according to real-time conditions to ensure that the smart watch always runs the tasks that need to be executed first. The system optimizes the execution order by identifying the priority, resource requirements and current available resources of task execution, and improves the efficiency and response speed of overall task scheduling.

[0037] Reference Figure 2 , is a resource flow optimization system for multi-task chain triggering of a smart watch in one embodiment of the present invention, comprising: The identification module 10 is used to identify the current task execution order of the smart watch based on the task chain trigger mechanism pre-set in the smart watch; A judging module 20, used to judge whether the task execution order matches the priority sequence preset by the smart watch; The execution module 30 is used to obtain the task requirement resources of the task to be executed, activate the resource isolation setting preset by the smart watch according to the task requirement resources, limit the resource usage of the smart watch by a single task, and detect the real-time energy consumption data of the smart watch, wherein the task requirement resources specifically include background services, process management and network connections; The second judgment module 40 is used to judge whether the real-time energy consumption data reaches a preset energy consumption upper limit; The second execution module 50 is used to collect the computing load of the task to be executed if it is reached, dynamically adjust the processing parameters of the smart watch according to the computing load, obtain the access request of the task to be executed, and adaptively freeze the idle background application of the smart watch based on the access request, and limit the preset cache resources of the idle background application, wherein the processing parameters specifically include operating frequency voltage, cache management optimization and core activation sleep.

[0038] In this embodiment, the identification module 10 identifies the current task execution order of the smart watch based on the task chain trigger mechanism pre-set in the smart watch, and then the judgment module 20 judges whether the task execution order matches the priority sequence pre-set by the smart watch to execute the corresponding steps; for example, when the system determines that the current task execution order of the smart watch does not match the priority sequence pre-set by the smart watch, the system will consider that there is a potential problem in task scheduling, which may cause the delayed execution of important tasks or low-priority tasks to occupy too many resources, thereby affecting the response speed, stability and energy efficiency of the system. The system will correct this problem by dynamically adjusting the priority or execution order of the task, for example, the system can pause the currently executing low-priority task. Tasks, start high-priority tasks first, or postpone the start time of low-priority tasks to ensure that the task order meets expectations, and at the same time suspend the execution of the current low-priority task and put the task in the waiting queue. When the high-priority task is completed, the system resumes the execution of the low-priority task to ensure that the task execution order meets the expected priority. When the priority sequence changes, the system needs to adjust the task energy management strategy. For example, high-priority tasks may require more resources and higher energy efficiency requirements, while low-priority tasks can be executed in a lower energy efficiency mode. The system should dynamically adjust the energy efficiency strategy while adjusting the task order to ensure energy saving of the overall system; for example, when the system determines that the current task execution order of the smart watch can If the task scheduling is not abnormal, the system will obtain the task requirement resources of the task to be executed, which specifically include background services, process management and network connections. According to these task requirement resources, the resource isolation settings pre-set by the smart watch are activated to limit the resource usage of the smart watch by a single task, and detect the real-time energy consumption data of the smart watch. The system can effectively avoid resource conflicts or competitions by ensuring that tasks are executed in order of priority, and reduce performance bottlenecks or task blocking problems caused by the parallel execution of multiple tasks. This is very important for maintaining the smooth operation of the smart watch, especially when multi-tasking or the system load is high. At the same time, by activating the preset resource isolation settings, the system can effectively avoid resource conflicts or competitions by ensuring that tasks are executed in order of priority, and reduce performance bottlenecks or task blocking problems caused by the parallel execution of multiple tasks. This is very important for maintaining the smooth operation of the smart watch, especially when multi-tasking or the system load is high. Source isolation mechanism, the system can limit the resource usage of each task, for example, the resource usage of background services and processes will be strictly controlled to prevent them from occupying too much computing and storage resources and affecting the execution of foreground tasks. This resource isolation can ensure the stability of the smart watch when multiple tasks are running in parallel, and prevent a task from excessively occupying the resources of other tasks and affecting the performance of the entire system. By limiting the resource usage of each task, it avoids the situation where a single task excessively occupies system resources, ensures the efficient execution of tasks, and tasks no longer compete for too many system resources, thereby reducing resource waste and system response delays; then the second judgment module 40 judges whether the real-time energy consumption data of the smart watch reaches the preset energy consumption upper limit to execute the corresponding steps;For example, when the system determines that the real-time energy consumption data of the smart watch has not reached the preset energy consumption limit, the system will consider that the current task execution process has not caused excessive consumption of the battery or system resources, and the energy consumption level of the smart watch is still within a reasonable range. The system will continue to run according to the current task execution order and resource allocation. This means that the existing task scheduling strategy, priority processing, resource allocation, etc. do not need to be adjusted. At the same time, since the system's energy consumption level is within a safe range, the system can execute more low-priority or background tasks based on the current task to improve overall resource utilization. The system can increase the number of tasks in a timely manner, especially during the current task. When the load of the task is light, the remaining resources can be used to execute more tasks, and if there is a sudden high-priority task entering, the system can handle it flexibly without being strictly constrained by energy consumption restrictions. Under the current energy consumption level, the system has sufficient resources to support the execution of these sudden tasks, avoiding system response delays or task execution interruptions due to insufficient energy consumption; for example, when the system determines that the real-time energy consumption data of the smart watch reaches a preset energy consumption limit, the second execution module 50 will consider that the current task execution process causes excessive consumption of batteries or resources, and the system will collect the computing load of the task to be executed, and dynamically adjust the processing of the smart watch based on these computing loads. Parameters, processing parameters specifically include operating frequency voltage, cache management optimization and core activation sleep, obtain access requests for tasks to be executed, and adaptively freeze idle background applications of smart watches based on different access requests, and limit the pre-set cache resources of idle background applications; by freezing idle background applications and limiting their cache resources, the system can effectively reduce the burden of background processes and prevent these inactive tasks from occupying valuable computing resources and memory, so that the system can focus more resources on high-priority tasks that need to be processed currently, avoiding system overload or performance degradation caused by excessive resource consumption, and adaptively adjusting tasks based on different access requests The system can flexibly respond to the needs of different tasks by using resources. For example, when there are fewer access requests for low-priority tasks, the resource allocation to them can be reduced, and vice versa, more resources can be provided to high-priority tasks. Such a resource scheduling mechanism can ensure that key tasks are completed in a timely manner while avoiding unnecessary energy consumption. Moreover, by optimizing and adjusting the operating frequency, voltage, and cache management, the system can balance performance and energy consumption according to the needs of the current task. For example, during high-load tasks, the operating frequency can be increased to ensure fast response, while during low-load tasks, the frequency can be reduced to save power. This flexible scheduling can effectively avoid resource waste and improve system efficiency in a multi-tasking environment. ;

[0039] In this embodiment, it also includes: A classification module, configured to classify the resource access mode of the task to be executed based on the pre-recorded access frequency of the smart watch to the task to be executed, wherein the resource access mode specifically includes read-intensive, write-intensive and mixed; A third judgment module is used to judge whether the resource access mode meets the preset resource sharing priority; The third execution module is used to activate the preset resource reuse mechanism, share the common resources between tasks from the resource pool according to the necessary resources reserved in the preset resource pool, introduce the common resources into the tasks to be executed, detect the execution progress of the tasks to be executed, and release the common resources back to the resource pool according to the execution progress, wherein the common resources specifically include cache, data buffer and processor time.

[0040] In this embodiment, the system classifies the resource access modes of the tasks to be executed based on the access frequencies pre-recorded by the smart watch to the tasks to be executed. The resource access modes specifically include read-intensive, write-intensive and mixed types. Then the system determines whether these resource access modes meet the preset resource sharing priorities to execute the corresponding steps. For example, when the system determines that the resource access mode of the task to be executed cannot meet the preset resource sharing priorities, the system will believe that the resource usage mode of the current task may have an adverse effect on the overall resource allocation and performance of the system, and the system will readjust the task to be executed according to the current resource usage. The system can prioritize tasks, such as delaying the execution of tasks with a write-intensive resource access mode and giving priority to read-intensive tasks to balance resource usage. At the same time, the system can dynamically adjust the cache allocation strategy according to the resource access mode of the task. For example, for read-intensive tasks, the cache capacity can be increased to improve the cache hit rate of read operations, while for write-intensive tasks, the write buffer can be optimized to reduce the overhead caused by frequent write operations. In addition, independent resource pools can be set for different types of tasks. For example, read-intensive tasks and write-intensive tasks use different memory or storage areas to reduce interference between each other. For example, when the system determines that the resource access mode of the task to be executed is The method can meet the pre-set resource sharing priority. At this time, the system will believe that the resource usage of the current task will not have a negative impact on resource allocation and performance. The system will activate the pre-set resource reuse mechanism and share the common resources between tasks from the resource pool according to the necessary resources reserved in the pre-set resource pool. The common resources specifically include cache, data buffer and processor time. These common resources are introduced to the tasks to be executed, and the execution progress of the tasks to be executed is detected. After the execution progress is completed, the common resources are released back to the resource pool. By sharing common resources such as cache, data buffer and processor time, the system can maximize By utilizing limited resources, reducing resource idleness and waste, and improving overall resource utilization efficiency, the system effectively reduces resource competition and conflicts caused by independent resource applications by each task by sharing common resources among tasks, avoiding performance bottlenecks caused by resource contention. By sharing resources, resource reallocation and initialization overhead during task switching are reduced, task switching efficiency is improved, and system performance is improved. By reasonably allocating and reusing resources, the system can reduce unnecessary resource consumption and reduce energy consumption, thereby extending the battery life of smart watches. Sharing common resources avoids repeated allocation and release of resources, reducing the overall energy consumption of the system.

[0041] In this embodiment, the execution module further includes: A measuring unit, configured to adjust a sampling interval of a preset sensor based on a preset monitoring requirement of the smart watch, and use the sensor to measure energy consumption of each component in the smart watch; A judging unit, used to judge whether the energy consumption exceeds a preset energy consumption upper limit; The execution unit is used to split the preset software architecture of the smart watch into a corresponding number of microservices, embed the corresponding energy consumption monitoring components in the microservices, and dynamically adjust the resource allocation of the microservices through the energy consumption monitoring components.

[0042] In this embodiment, the system adjusts the sampling interval of the sensors based on the monitoring requirements preset by the smart watch, applies these sensors to measure the energy consumption of each component in the smart watch, and then the system determines whether these energy consumption conditions exceed the preset energy consumption upper limit to execute the corresponding steps; for example, when the system determines that the energy consumption of each component in the smart watch does not exceed the preset energy consumption upper limit, the system will consider that the current energy consumption level is within the normal range, each component is in good operating condition, and no unnecessary power consumption is caused, and the system does not need to take any additional energy-saving measures immediately, and can continue to operate according to the current task scheduling and resource management strategy. At the same time, the current energy consumption data is recorded for subsequent energy consumption analysis and optimization. For example, it can be used as a baseline data to compare with the energy consumption data of other time periods in the future to find potential energy consumption optimization points. Although the current energy consumption is normal, the system should still maintain real-time monitoring to ensure that when the workload increases or the external conditions change, the sampling interval or other operating parameters of the sensor can be adjusted in time to avoid sudden energy consumption growth; for example, when the system determines that the energy consumption of each component in the smart watch exceeds the preset energy consumption limit, the system will consider the current energy consumption level abnormal, and the system will split the pre-set software architecture of the smart watch into the corresponding number of Microservices are embedded with corresponding energy consumption monitoring components in microservices. Through these energy consumption monitoring components, the resource allocation of microservices is dynamically adjusted. By embedding energy consumption monitoring components, the system can capture the energy consumption of each microservice in real time, so that the system can dynamically adjust resource allocation according to actual energy consumption, thereby avoiding excessive use of overall system resources. After being split into microservices, the system can more flexibly manage the energy consumption of different functional modules, and reduce the resource occupation of high-energy consumption components through targeted optimization, thereby achieving overall energy consumption balance. At the same time, the microservice architecture allows the system to flexibly allocate resources according to current task requirements, avoiding waste caused by fixed resource allocation in traditional architecture. By dynamically adjusting resources, it ensures that resources are used for the most needed tasks, thereby improving overall resource utilization. Dividing resource usage into different microservices can effectively reduce resource competition between tasks and prevent the high energy consumption of a task from affecting the normal operation of other tasks. When a microservice has abnormal energy consumption, the system can independently adjust or limit the resource allocation of the microservice without affecting the normal operation of other microservices. This isolation mechanism improves the overall stability of the system. The modular nature of the microservice architecture makes the system easier to optimize and expand. For example, the energy consumption algorithm can be optimized for a specific microservice without significantly changing the entire system architecture.

[0043] In this embodiment, the second execution module further includes: A second measuring unit is used to measure the demand utilization rate of the task type for the preset CPU in different execution stages based on the task type of the task to be executed, wherein the task type specifically includes computing intensive, I / O intensive and storage intensive; A second judgment unit is used to judge whether the demand usage rate reaches a preset peak value; The second execution unit is used to construct a task dependency graph for the task to be executed according to the task type, obtain the dependency relationship between the tasks to be executed through the task dependency graph, identify the resource sharing situation between the tasks to be executed based on the dependency relationship, and limit the corresponding conflicting competing resources from the resource sharing situation.

[0044] In this embodiment, the system measures the demand utilization rate of the task type for a preset CPU in different execution stages based on the task type to be executed, which specifically includes computationally intensive, I / O intensive, and storage intensive tasks. The system then determines whether the demand utilization rate has reached a preset peak value to execute corresponding steps. For example, when the system determines that the demand utilization rate of the task type for a preset CPU in different execution stages has not reached a preset peak value, the system will consider that the CPU is not fully utilized for the execution of the current task and there may be unoptimized resource utilization. The system will reduce the CPU resources allocated to the task and allocate excess CPU resources to other tasks that are more in need, so as to improve the resource utilization of the overall system, such as lowering the CPU priority of the current task so that other high-priority tasks can obtain more CPU time, and at the same time, by reducing the CPU's working The system can reduce the operating frequency or enter low power consumption mode to reduce energy consumption and extend battery life. For example, when the task is not urgent or the non-real-time requirement is low, the system can reduce the CPU frequency to run the task, thereby saving power, and continuously monitor the task execution. If the task demand increases in the subsequent execution stage, the CPU resource allocation can be adjusted in time to ensure that the task can be responded to in time when the resource demand fluctuates. For example, when the system determines that the demand utilization rate of the task type for the preset CPU in different execution stages has reached the preset peak value, the system will consider that the CPU utilization rate of the current task execution has been overloaded. The system will build a task dependency graph for the tasks to be executed based on these task types, and obtain the dependency relationship between the tasks to be executed through the task dependency graph. Based on these dependency relationships, the resource sharing situation between the tasks to be executed is identified, and the corresponding conflicting competition resources are limited from the resource sharing situation.By constructing a task dependency graph of tasks to be executed, the system can accurately understand the dependencies between tasks and ensure that tasks that must be executed in sequence are not interrupted or disordered. For example, the result of a computationally intensive task may be used as the input of another task. If it is not executed in the dependency order, it may cause execution errors or waste of resources. At the same time, by identifying the resource sharing between each task to be executed, the system can avoid multiple tasks competing for the same resource at the same time, thereby reducing resource conflicts and unnecessary interference between tasks. For example, some tasks may share the same memory buffer. If it is not managed during execution, it may cause cache competition and affect the execution efficiency of other tasks. When the task dependency graph is clear and the resource sharing relationship is reasonably restricted, the system can more intelligently identify which tasks can be executed in parallel and which tasks must be executed sequentially. For example, computationally intensive tasks may not need to wait for the completion of I / O intensive tasks, so they can be executed in parallel, thereby shortening the total execution time. Resource competition often leads to waiting and retries between tasks, causing the CPU to frequently switch tasks or increase waiting time, which not only affects the efficiency of task execution, but also increases the energy consumption of the system. By limiting the competition of tasks for conflicting resources, the system can reduce unnecessary switching and waiting time, thereby reducing energy consumption. ;

[0045] In this embodiment, the judgment module further includes: an acquisition unit, configured to acquire resource occupancy information of the tasks to be executed, and optimize the execution order of the tasks based on the priority sequence and the resource occupancy information, wherein the optimization specifically includes delaying the execution of the tasks to be executed, scheduling the tasks to be executed on demand, and optimizing concurrent resource allocation; A third judgment unit, used to judge whether the task execution sequence detects a preset resource competition; The third execution unit is used to identify the user's real-time behavior on the smart watch, dynamically adjust the reserved resources of the task execution order according to the real-time behavior, temporarily limit the priority sequence based on the reserved resources, and reintegrate the task execution order through the real-time behavior.

[0046] In this embodiment, the system obtains the resource occupancy information of the tasks to be executed, and optimizes the task execution order based on the priority sequence and resource occupancy information. The optimization is specifically to delay the execution of the tasks to be executed, schedule the tasks to be executed on demand, and optimize the concurrent resource allocation. The system then determines whether the task execution order detects a preset resource competition to execute the corresponding steps. For example, when the system determines that the task execution order does not detect the preset resource competition, the system will consider that the current task execution order and resource allocation do not cause resource conflicts or bottlenecks, and the tasks can proceed smoothly as planned. The system will continue to execute tasks according to the existing optimized execution order, and no additional task scheduling is required at this time. Or resource allocation adjustment, tasks can be executed as expected, and resource usage is relatively efficient. At the same time, the on-demand scheduling strategy is maintained to ensure that the execution order of tasks to be executed can be dynamically adjusted according to the actual situation of current resources. At this time, the concurrency and priority of task execution should be reasonably controlled to avoid performance problems caused by excessive resource competition, and continue to optimize the allocation of concurrent resources, such as appropriately increasing the number of parallel tasks, and improving the efficiency and response speed of overall task execution without resource conflicts. Especially when multiple tasks are executed, the parallelism and resource sharing of tasks should be effectively utilized to avoid resource waste; for example, when the system determines that the task execution order detects the pre-set resources Competition, at this time the system will think that the current task execution order and resource allocation cause a conflict, and the task cannot be carried out normally. The system will identify the user's real-time behavior on the smart watch, and dynamically adjust the pre-occupied resources of the task execution order according to different real-time behaviors. Based on these pre-occupied resources, the priority sequence of the smart watch is temporarily restricted, and the task execution order is reintegrated through the user's real-time behavior. The system can timely identify and resolve resource conflicts between tasks by dynamically adjusting the task execution order. For example, if two tasks need to occupy a large amount of CPU resources or memory at the same time, and these resources are insufficient, the system can avoid task conflicts by scheduling one of the tasks first and delaying the execution of the other task. By identifying the user's real-time behavior, the system can adjust the order of task execution according to the user's needs. For example, if the user is using a smartwatch for high-intensity interactions (such as checking messages or making calls), the system can prioritize the execution of these tasks and delay or pause unimportant background tasks. By limiting the priority sequence of the smartwatch, the system can flexibly control the execution of high-priority tasks when resources compete, and temporarily reduce the resource usage of low-priority tasks. For example, when the user is performing a high-priority task (such as answering a call), the system can temporarily reduce the resource usage of low-priority tasks to ensure a smooth user experience.

[0047] In this embodiment, the second determination module further includes: A generating unit, configured to adaptively generate a dynamic energy consumption upper limit of the smart watch based on a preset static power level of the smart watch; A third judgment unit is used to judge whether the dynamic energy consumption upper limit can meet the current execution task volume of the smart watch; The third execution unit is used to detect the user's operation activity on the smart watch according to the dynamic energy consumption upper limit, and dynamically adjust the cache update frequency of the smart watch according to the operation activity, wherein the cache update frequency is specifically the refresh frequency and replacement frequency of the data in the cache.

[0048] In this embodiment, the system adaptively generates a dynamic energy consumption upper limit of the smart watch based on the static power preset by the smart watch, and then the system determines whether the dynamic energy consumption upper limit can meet the current execution task volume of the smart watch to execute the corresponding steps; for example, when the system determines that the dynamic energy consumption upper limit of the smart watch can meet the current execution task volume of the smart watch, the system will consider that the current energy budget of the smart watch is sufficient to support the task being executed, and the system can continue to execute the current task to ensure that the device will not cause excessive battery consumption or system crash due to excessive energy consumption, and the system will continue to execute each task in the current task scheduling order without interrupting or postponing the task. Execution, because the current dynamic energy consumption upper limit is sufficient to support the task volume, the battery consumption is within a reasonable range, and when the dynamic energy consumption upper limit meets the current task requirements, the system can consider increasing the number of concurrent tasks, especially in low-load conditions, and can execute more background tasks or low-priority tasks, thereby improving the system's work efficiency, and dynamically allocate computing resources according to the energy consumption requirements of the tasks to avoid ineffective resource waste. For computing-intensive tasks, the system can prioritize the allocation of more computing power to ensure that the tasks can proceed smoothly, and for I / O-intensive or storage-intensive tasks, the system can appropriately reduce the allocation of computing resources to reduce energy consumption; for example, when the system If it is determined that the dynamic energy consumption upper limit of the smart watch cannot meet the current execution task volume of the smart watch, the system will consider that the current energy budget cannot support the tasks to be executed. The system will detect the user's operation activity on the smart watch according to the dynamic energy consumption upper limit, and dynamically adjust the cache update frequency of the smart watch according to different operation activities. The cache update frequency specifically refers to the refresh frequency and replacement frequency of the data in the cache. By adjusting the cache update frequency according to the user's operation activity, the system can avoid frequent cache updates when the user activity is low, which can significantly reduce unnecessary energy consumption. Reducing the refresh frequency and replacement frequency of cached data can save the processor's workload. load, thereby extending battery life and avoiding excessive battery consumption due to frequent data updates. At the same time, adjusting the cache update frequency can effectively optimize resource utilization. When user operations are active, the system can appropriately increase the cache update frequency to ensure that the smart watch responds faster and user operations receive timely feedback. When activity is low, the system reduces frequent cache refreshes to avoid resource waste and ensure battery adequacy. Dynamic adjustment of the cache update frequency can effectively alleviate system resource constraints. When the task volume increases and the energy budget is insufficient, the system reduces resource usage by reducing the cache update frequency, thereby ensuring that other important tasks can be executed smoothly.

[0049] In this embodiment, the identification module further includes: A detection unit, used for detecting a preset precondition of a task to be executed based on the task execution order; A fourth determination unit, configured to determine whether the smart watch meets the precondition; The fourth execution unit is configured to, if not, temporarily move the to-be-executed task out of the task execution sequence, and adaptively adjust the task execution sequence according to the moved to-be-executed task.

[0050] In this embodiment, the system detects the pre-set preconditions of the task to be executed based on the task execution order, and then the system determines whether the smart watch can meet the pre-set preconditions to execute the corresponding steps; for example, when the system determines that the smart watch can meet the pre-set preconditions of the task to be executed, the system will consider that the current task execution environment and resource status meet expectations, and the task can be started or continued normally. The system will start to execute the task to ensure that the required resources (such as processing power, memory, storage, etc.) are ready, that is, the system can process the task in an optimized manner. At the same time, if the smart watch has multiple tasks to be executed, the system can optimize the task scheduling order based on task priority, current resource usage and user needs to ensure that the most critical or most urgent tasks are executed first, and after ensuring that the task preconditions are met, the system will allocate and adjust resources as needed, including adjusting CPU usage, memory and cache, etc., to ensure that resources are fully utilized and avoid resource competition and conflict between tasks; for example, when the system determines that the smart watch cannot meet the pre-set preconditions of the task to be executed, the system will consider that the current task execution environment and resource status do not meet expectations , the system will temporarily remove the pending tasks from the task execution order, and adaptively adjust the task execution order according to the pending tasks that have been removed; after temporarily removing the unexecutable tasks from the task execution order, the system can free up resources to avoid the long-term inability to execute tasks due to insufficient resources. By adjusting the task execution order, the current tasks that can be carried out smoothly are given priority to avoid waste of system resources. At the same time, tasks are prevented from being forced to execute due to unsatisfied preconditions, and the system is prevented from entering an error state or an exception. Temporary removal of tasks from the execution order helps to ensure the stability of the system and avoid crashes or deadlocks caused by task conflicts or insufficient resources. If the current resource status cannot support task execution, especially when the battery power is low or other hardware resources are tight, temporarily removing tasks from the execution order can effectively reduce unnecessary energy consumption or resource consumption and extend the use time of smart watches. The system can dynamically adjust the task execution order according to real-time conditions to ensure that the smart watch always runs the tasks that need to be executed first. The system optimizes the execution order by identifying the priority, resource requirements and current available resources of task execution, and improves the efficiency and response speed of overall task scheduling.

[0051] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A resource flow optimization method for multi-task chain triggering of a smart watch, characterized in that: The following steps are involved: Based on the pre-set task chain trigger mechanism in the smart watch, identify the current task execution order of the smart watch; Determining whether the task execution order matches a priority sequence preset by the smart watch; If yes, then obtain the task requirement resources of the task to be executed, activate the preset resource isolation settings of the smart watch according to the task requirement resources, limit the resource usage of the smart watch by a single task, and detect the real-time energy consumption data of the smart watch, wherein the task requirement resources specifically include background services, process management and network connections; Determining whether the real-time energy consumption data reaches a preset energy consumption upper limit; If it is reached, the computing load of the task to be executed is collected, and according to the computing load, the processing parameters of the smart watch are dynamically adjusted to obtain an access request for the task to be executed. Based on the access request, the idle background applications of the smart watch are adaptively frozen, and the preset cache resources of the idle background applications are limited, wherein the processing parameters specifically include operating frequency voltage, cache management optimization, and core activation sleep.

2. The resource flow optimization method for multi-task chain triggering of a smart watch according to claim 1, characterized in that: Before the step of obtaining the task required resources for the task to be executed, the method further includes: Based on the pre-recorded access frequency of the smart watch to the task to be executed, classifying the resource access mode of the task to be executed, wherein the resource access mode specifically includes read-intensive, write-intensive and mixed; Determining whether the resource access mode complies with a preset resource sharing priority; If so, the preset resource reuse mechanism is activated, and according to the necessary resources reserved in the preset resource pool, the common resources between tasks are shared from the resource pool, and the common resources are introduced into the tasks to be executed, and the execution progress of the tasks to be executed is detected. According to the execution progress, the common resources are released back to the resource pool, wherein the common resources specifically include cache, data buffer and processor time.

3. The resource flow optimization method for multi-task chain triggering of a smart watch according to claim 1, characterized in that: The step of detecting the real-time energy consumption data of the smart watch also includes: Based on the preset monitoring requirements of the smart watch, the sampling interval of the preset sensor is adjusted, and the sensor is used to measure the energy consumption of each component in the smart watch; Determining whether the energy consumption exceeds a preset energy consumption upper limit; If so, the preset software architecture of the smart watch is split into a corresponding number of microservices, and corresponding energy consumption monitoring components are embedded in the microservices. Through the energy consumption monitoring components, the resource allocation of the microservices is dynamically adjusted.

4. The resource flow optimization method for multi-task chain triggering of a smart watch according to claim 1, characterized in that: The step of collecting the computing load of the task to be executed further includes: Based on the task type of the task to be executed, measuring the demand utilization rate of the task type for the preset CPU in different execution stages, wherein the task type specifically includes computing intensive, I / O intensive and storage intensive; Determining whether the demand utilization rate reaches a preset peak value; If so, then based on the task type, construct a task dependency graph for the tasks to be executed, obtain the dependency relationships between the tasks to be executed through the task dependency graph, identify the resource sharing situation between the tasks to be executed based on the dependency relationships, and limit the corresponding conflicting competing resources from the resource sharing situation.

5. The resource flow optimization method for multi-task chain triggering of a smart watch according to claim 1, characterized in that: The step of determining whether the task execution order matches the priority sequence preset by the smart watch further includes: Obtain resource occupancy information of the tasks to be executed, and optimize the execution order of the tasks based on the priority sequence and the resource occupancy information, wherein the optimization specifically includes delaying the execution of the tasks to be executed, scheduling the tasks to be executed on demand, and optimizing concurrent resource allocation; Determining whether a preset resource competition is detected in the task execution sequence; If so, identify the user's real-time behavior on the smart watch, dynamically adjust the reserved resources of the task execution order according to the real-time behavior, temporarily limit the priority sequence based on the reserved resources, and reintegrate the task execution order through the real-time behavior.

6. The resource flow optimization method for multi-task chain triggering of a smart watch according to claim 1, characterized in that: The step of determining whether the real-time energy consumption data reaches a preset energy consumption upper limit also includes: Based on the static power preset by the smart watch, adaptively generate the dynamic energy consumption upper limit of the smart watch; Determine whether the dynamic energy consumption upper limit can meet the current execution task volume of the smart watch; If not, the user's operation activity on the smart watch is detected according to the dynamic energy consumption upper limit, and the cache update frequency of the smart watch is dynamically adjusted according to the operation activity, wherein the cache update frequency is specifically the refresh frequency and replacement frequency of the data in the cache.

7. The resource flow optimization method for multi-task chain triggering of a smart watch according to claim 1, characterized in that: The step of identifying the current task execution order of the smart watch based on the task chain trigger mechanism pre-set in the smart watch also includes: Based on the task execution sequence, detecting the preset preconditions of the task to be executed; Determine whether the smart watch meets the precondition; If not, the to-be-executed tasks are temporarily moved out of the task execution sequence, and the task execution sequence is adaptively adjusted according to the moved to-be-executed tasks.

8. Resource flow optimization system triggered by multi-task chain of smart watches, characterized in that: include: An identification module, used to identify the current task execution order of the smart watch based on a task chain trigger mechanism pre-set in the smart watch; A judgment module, used to judge whether the task execution order matches the priority sequence preset by the smart watch; an execution module, configured to obtain the task requirement resources of the task to be executed, activate the preset resource isolation setting of the smart watch according to the task requirement resources, limit the resource usage of the smart watch by a single task, and detect the real-time energy consumption data of the smart watch, wherein the task requirement resources specifically include background services, process management and network connections; A second judgment module is used to judge whether the real-time energy consumption data reaches a preset energy consumption upper limit; The second execution module is used to collect the computing load of the task to be executed if it is reached, dynamically adjust the processing parameters of the smart watch according to the computing load, obtain the access request of the task to be executed, and adaptively freeze the idle background application of the smart watch based on the access request, and limit the preset cache resources of the idle background application, wherein the processing parameters specifically include operating frequency voltage, cache management optimization and core activation sleep.

9. The resource flow optimization system triggered by multi-task chain of smart watch according to claim 8, characterized in that: Also includes: A classification module, configured to classify the resource access mode of the task to be executed based on the pre-recorded access frequency of the smart watch to the task to be executed, wherein the resource access mode specifically includes read-intensive, write-intensive and mixed; A third judgment module is used to judge whether the resource access mode meets the preset resource sharing priority; The third execution module is used to activate the preset resource reuse mechanism, share the common resources between tasks from the resource pool according to the necessary resources reserved in the preset resource pool, introduce the common resources into the tasks to be executed, detect the execution progress of the tasks to be executed, and release the common resources back to the resource pool according to the execution progress, wherein the common resources specifically include cache, data buffer and processor time.

10. The resource flow optimization system triggered by multi-task chain of smart watch according to claim 8, characterized in that: The execution module also includes: A measuring unit, configured to adjust a sampling interval of a preset sensor based on a preset monitoring requirement of the smart watch, and use the sensor to measure energy consumption of each component in the smart watch; A judging unit, used to judge whether the energy consumption exceeds a preset energy consumption upper limit; The execution unit is used to split the preset software architecture of the smart watch into a corresponding number of microservices, embed the corresponding energy consumption monitoring components in the microservices, and dynamically adjust the resource allocation of the microservices through the energy consumption monitoring components.