Hierarchical skill scheduling openclaw access system and method

By collecting call and execution data in the OpenClaw framework in real time, a hierarchical scheduling framework is constructed, and the scheduling threshold is dynamically adjusted. This solves the problems of scheduling decision lag and resource waste, achieves efficient and adaptive skill scheduling, and reduces token consumption.

CN122152484AInactive Publication Date: 2026-06-05厦门工学院

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
厦门工学院
Filing Date
2026-05-09
Publication Date
2026-06-05
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies in the OpenClaw framework suffer from problems such as delayed scheduling decisions, resource waste, and increased reliance on remote skills, especially when local resources are insufficient, leading to excessive response latency and token consumption.

Method used

By collecting local skill call and execution data in real time, a hierarchical scheduling framework is constructed to jointly evaluate load fluctuations and execution stability, and scheduling thresholds are dynamically adjusted to optimize resource utilization and reduce reliance on remote skills.

Benefits of technology

It achieves efficient and adaptive hierarchical skill scheduling, reduces invalid token consumption, and improves response efficiency and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152484A_ABST
    Figure CN122152484A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, and more particularly to an OpenClaw access system and method for layered skill scheduling, which comprises an acquisition module, a level determination module, a division module, a disturbance determination module, a state determination module, a stage determination module, an execution module and an adjustment module. The present application constructs a complete quantitative evaluation chain from load fluctuation to execution stability by collecting the request arrival interval sequence, request burst degree and input scale growth gradient in the calling data, and the execution path bifurcation degree, backtracking depth, state transition frequency and resource occupation fluctuation phase difference in the execution data. The execution module calculates a comprehensive index with the stage weight coefficient, calling success rate and stage number proportion, forms a self-consistent closed loop of load-driven layering, execution quality-driven state and stage distribution-driven selection, and finally significantly reduces the invalid token consumption of OpenClaw, and realizes efficient adaptive layered skill scheduling access.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an OpenClaw access system and method for hierarchical skill scheduling. Background Technology

[0002] With the rapid development of edge computing and terminal intelligence, OpenClaw, as a lightweight and scalable local skill execution framework, is increasingly deployed on user devices to handle real-time tasks such as automated decision-making and data processing. However, in actual operation, OpenClaw local skills face challenges such as complex and variable invocation patterns, uncertain execution paths, and intense resource competition among multiple skills, making it difficult to simultaneously optimize response latency, invocation success rate, and resource overhead. Furthermore, when local capabilities are insufficient, over-reliance on cloud or remote skill services significantly increases token consumption and operational costs associated with pay-as-you-go billing. Therefore, how to achieve adaptive task routing and skill collaboration between local and remote endpoints within the OpenClaw framework, reduce ineffective dependence on remote services, and ensure service quality has become a pressing technical challenge.

[0003] Chinese Patent Publication No. CN116737344A discloses a scheduling method and scheduling service system for multi-container clusters. The method includes: deploying a scheduling service system on a server, the scheduling service system including a scheduling API service module, a controller service module, and several cluster proxy components, all of which are connected to the scheduling API service module. The controller service module is also connected to the scheduling API service module. The method involves obtaining a number of Kubernetes container clusters that are independent of each other and the same number of cluster proxy components, and setting these independent Kubernetes container clusters as member clusters of the scheduling service system; defining the application (APP) to be deployed using the deployment manifest of the Kubernetes container clusters, thus obtaining the deployment manifest of the application; instantiating the scheduling policy (CR) of the application, thus obtaining the scheduling policy (CR) of the application; submitting the deployment manifest and the scheduling policy (CR) of the application to the controller service module through the scheduling API service module; the controller service module splitting and parsing the scheduling policy (CR) and the deployment manifest to obtain identified instances to be deployed, storing these identified instances in the memory data of the scheduling service system to obtain a deployment queue; and having each cluster proxy component listen to the deployment queue, obtain its own instance to be deployed, and submit it to its corresponding member cluster for deployment.

[0004] Therefore, the existing technology has the following problems: it relies on Kubernetes container clusters as a unified infrastructure, requiring all member clusters to run in a Kubernetes environment, making it difficult to be compatible with lightweight or heterogeneous local execution environments, which can easily lead to high deployment thresholds and limited applicable scenarios; it relies on predefined deployment lists and scheduling policies (CR) for static splitting and parsing, lacking awareness and response to dynamic factors such as real-time load fluctuations and execution path changes, which can easily cause scheduling decisions to lag behind the actual running state; it relies on the polling mechanism of the cluster proxy component listening to the queue to be deployed, only focusing on the deployment location allocation of instances, without involving the closed-loop feedback adjustment of resource disturbances, call success rates, and token consumption during skill execution, which can easily lead to ineffective scheduling and waste of remote resources. Summary of the Invention

[0005] To address this, the present invention provides an OpenClaw access system and method for hierarchical skill scheduling. This system collects local skill call and execution data in real time, constructs a hierarchical scheduling framework that jointly evaluates load fluctuations and execution stability, and dynamically adjusts scheduling thresholds based on feedback data to overcome the technical problems in the prior art where static scheduling strategies lack the ability to adapt to runtime load changes, execution path uncertainties, and resource disturbances, resulting in rigid scheduling levels, increased invalid dependencies on remote skill stations, and high invalid token consumption.

[0006] To achieve the above objectives, in one aspect, the present invention provides an OpenClaw access system for hierarchical skill scheduling, comprising: The acquisition module is used to acquire in real time the local skill call data and execution data of each user terminal to be processed in the user terminal set during the OpenClaw operation. The call data includes the request arrival interval sequence, request burstiness and the growth gradient of the input scale, and the execution data includes the branching degree of the execution path, the backtracking depth of the execution path, the state transition frequency and the fluctuation phase difference of resource consumption. The level determination module is used to determine the initial scheduling level based on the call load evolution mode, the growth gradient and the preset level determination threshold group, wherein the call load evolution mode is determined based on the request arrival interval sequence and the request burstiness. A partitioning module is used to further partition the stable operation phase of local skills under the initial scheduling level based on the bifurcation degree, wherein the stable operation phase is determined based on the state transition frequency. The disturbance determination module is used to determine the resource coupling disturbance degree based on the fluctuation phase difference of each user terminal to be processed, and to correct it in combination with the backtracking depth to obtain the target disturbance degree. A state determination module is used to determine the scheduling evolution state of the local skill based on the results of the refined division, the state transition frequency and bifurcation degree of the local skill during the stable operation phase, and the target perturbation degree. The phase determination module is used to determine the corresponding station-level operation phase based on the state transition frequency, bifurcation degree and fluctuation phase difference of each super skill in the preset historical execution cycle. The super skill is obtained from the preset skill station based on the scheduling evolution state. The execution module is used to filter target execution skills and perform scheduling based on the distribution characteristics of the station-level operation phase; The adjustment module is used to adjust the preset level judgment threshold group based on the feedback data corresponding to the execution scheduling.

[0007] Furthermore, the hierarchy determination module includes: The pattern determination unit is used to calculate the coefficient of variation of the request interval based on the request arrival interval sequence, generate a two-dimensional feature vector in combination with the request burstiness, and determine that the call load evolution pattern has occurred when the coefficient of variation is greater than a preset variation threshold and the request burstiness is less than a preset burst threshold. The load calculation unit is used to calculate the exponentially weighted product of the coefficient of variation and the request burstiness based on the determination result of the occurrence of the call load evolution pattern, so as to obtain the load fluctuation value. The gradient calculation unit is used to calculate the rate of change of the growth gradient within a preset time window based on the called load evolution mode, so as to obtain the load change rate. The level determination unit is used to determine the initial scheduling level based on the correspondence between the load fluctuation value, the load change rate and the preset level determination threshold group.

[0008] Furthermore, the hierarchy determination unit includes: The threshold comparison subunit is used to compare the load fluctuation value with the first fluctuation threshold and the second fluctuation threshold in the preset hierarchical judgment threshold group, and to compare the load change rate with the first rate threshold and the second rate threshold in the preset hierarchical judgment threshold group. The hierarchical mapping subunit is used to determine, based on the comparison results, whether the initial scheduling hierarchical mapping is a local execution layer, a near-end cache layer, or a remote skill station layer.

[0009] Furthermore, the partitioning module includes: The stable phase determination unit is used to mark the time period corresponding to the state transition frequency of the local skill being less than a preset frequency threshold as the stable operation phase. The refinement division unit is used to divide each of the stable operating phases along the time axis into several stable single trajectory sub-phases and several stable branch exploration sub-phases according to the temporal change rate of the bifurcation degree within the stable operating phase.

[0010] Furthermore, the disturbance determination module includes: The phase difference statistics unit is used to calculate the root mean square of the fluctuation phase difference corresponding to each user terminal to be processed, so as to obtain the resource coupling disturbance degree. The backtracking depth correction unit is used to calculate a correction coefficient based on the backtracking depth. The correction coefficient is positively correlated with the backtracking depth and is used to correct the resource coupling disturbance degree in a product manner to obtain the target disturbance degree.

[0011] Furthermore, the state determination module includes: A sub-stage matching unit is used to match the stable single trajectory sub-stage with a preset evolutionary state table based on the state transition frequency and the bifurcation degree to obtain a stable single state, and to match the stable branch exploration sub-stage with a preset evolutionary state mapping table to obtain a stable exploration state, wherein the preset evolutionary state table includes a stable single state, a stable exploration state, a slightly perturbed state, a heavily perturbed state, and a state to be merged. The perturbation weighting unit is configured to: correct the stable single state to the slightly perturbed state when the target perturbation degree is between a first perturbation threshold and a second perturbation threshold; correct the stable single state to the heavily perturbed state and the stable exploration state to the slightly perturbed state when the target perturbation degree is greater than or equal to the second perturbation threshold and the backtracking depth is less than a preset depth threshold; and correct the stable single state to the state to be fused and the stable exploration state to the heavily perturbed state when the target perturbation degree is greater than or equal to the second perturbation threshold and the backtracking depth is greater than or equal to the preset depth threshold.

[0012] Furthermore, the stage determination module includes: The feature calculation unit is used to calculate the average value of the state transition frequency of each super skill based on the preset historical execution cycle to obtain a first feature value, and to calculate the variance of the bifurcation degree to obtain a second feature value, and to calculate the range of the fluctuation phase difference to obtain a third feature value. The stage determination unit is used to determine, based on the threshold comparison results of the first feature value, the second feature value, and the third feature value, whether the station-level operation stage of the super skill is a high-frequency stable stage, a low-frequency stable stage, a high-frequency branch stage, or a low-frequency branch stage.

[0013] Furthermore, the execution module includes: The distribution statistics unit is used to count the proportion of each station-level operation stage among the currently available super skills, and to obtain the call success rate of each super skill in the preset historical execution cycle. The index calculation unit is used to calculate the comprehensive index of each super skill. The comprehensive index is equal to the product of the preset stage weight coefficient corresponding to the current station-level operation stage of each super skill and the call success rate, divided by the quantity ratio. The preset stage weight coefficient corresponding to the high-frequency stable stage is greater than the preset stage weight coefficient corresponding to the low-frequency stable stage, the preset stage weight coefficient corresponding to the low-frequency stable stage is greater than the preset stage weight coefficient corresponding to the high-frequency branch stage, and the preset stage weight coefficient corresponding to the high-frequency branch stage is greater than the preset stage weight coefficient corresponding to the low-frequency branch stage. A filtering unit is used to select the super skill with the highest comprehensive index as the target execution skill; The scheduling execution unit is used to send the identifier of the target execution skill to the corresponding OpenClaw on the user terminal to be processed, and to trigger the local skill to call the target execution skill through the API gateway of the Docker container.

[0014] Furthermore, the adjustment module includes: The feedback collection unit is used to collect the changes in token consumption, call success rate, and average response latency of the OpenClaw client to be processed after execution scheduling. The threshold adjustment unit is used to adjust the first fluctuation threshold, the second fluctuation threshold, the first rate threshold and the second rate threshold in the preset hierarchical judgment threshold group according to the deviation between the token consumption change and the preset saving target.

[0015] On the other hand, the present invention also provides an OpenClaw access method for hierarchical skill scheduling, comprising: Real-time acquisition of local skill call data and execution data of each pending user in the user set during the OpenClaw operation. The call data includes the request arrival interval sequence, request burstiness and the growth gradient of the input scale. The execution data includes the branching degree of the execution path, the backtracking depth of the execution path, the state transition frequency and the fluctuation phase difference of resource consumption. The initial scheduling level is determined based on the call load evolution mode, the growth gradient, and the preset level determination threshold group, wherein the call load evolution mode is determined based on the request arrival interval sequence and the request burstiness. The stable operation phase of local skills under the initial scheduling level is further divided based on the bifurcation degree, wherein the stable operation phase is determined based on the state transition frequency. The resource coupling disturbance degree is determined based on the fluctuation phase difference of each user terminal to be processed, and then corrected by combining the backtracking depth to obtain the target disturbance degree. Based on the results of the refined division, the state transition frequency and bifurcation degree of the local skill during the stable operation phase, and the target perturbation degree, the scheduling evolution state of the local skill is determined. The corresponding station-level operation stage is determined based on the state transition frequency, bifurcation degree, and fluctuation phase difference of each super skill in the preset historical execution cycle. The super skill is obtained from the preset skill station based on the scheduling evolution state. Based on the distribution characteristics of the station-level operation phase, target execution skills are selected and scheduling is performed; The preset level judgment threshold group is adjusted based on the feedback data corresponding to the execution scheduling.

[0016] Compared with existing technologies, the beneficial effects of this invention are that by collecting request arrival interval sequences, request burstiness, and input scale growth gradients in real-time call data, as well as execution path bifurcation degree, backtracking depth, state transition frequency, and resource consumption fluctuation phase differences in execution data, a complete quantitative evaluation chain from load fluctuation to execution stability is constructed. The greater the load fluctuation and the faster the rate of change, the more the initial scheduling level tends to be towards the remote skill station layer, avoiding local resource overload; when the execution path bifurcation degree is low and the state transition is smooth, the stable operation phase is subdivided into single trajectory sub-phases, thereby matching a stable single state. Combined with the resource coupling disturbance degree calculated by fluctuation phase difference and backtracking depth correction, it can accurately distinguish between mild disturbances, severe disturbances, and even states to be merged, so that the scheduling evolution state strictly corresponds to the actual operational quality of the skill. The historical state transition frequency, bifurcation variance, and fluctuation phase difference range of super skills further characterize their station-level operational stages. The execution module calculates a comprehensive index based on stage weight coefficients, call success rates, and the proportion of stages, prioritizing the execution of super skills with the highest comprehensive index. This forms a self-consistent closed loop driven by load-driven layering, execution quality-driven state, and stage distribution-driven selection. This feedback data is also used to dynamically adjust threshold groups, enabling the system to continuously optimize scheduling decisions during long-term operation. Ultimately, this significantly reduces OpenClaw's invalid token consumption, achieving efficient and adaptive layered skill scheduling and access. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the OpenClaw access system for hierarchical skill scheduling in this embodiment; Figure 2 This is a schematic diagram of the hierarchy determination module in this embodiment; Figure 3 This is a schematic diagram of the execution module in this embodiment; Figure 4This is a flowchart of the OpenClaw access method for hierarchical skill scheduling in this embodiment. Detailed Implementation

[0018] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0019] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0020] Please see Figure 1 As shown, this is a schematic diagram of the OpenClaw access system with hierarchical skill scheduling in this embodiment. On one hand, this embodiment provides an OpenClaw access system with hierarchical skill scheduling, characterized by comprising: The acquisition module is used to acquire in real time the local skill call data and execution data of each user terminal to be processed in the user terminal set during the OpenClaw operation. The call data includes the request arrival interval sequence, request burstiness and the growth gradient of the input scale, and the execution data includes the branching degree of the execution path, the backtracking depth of the execution path, the state transition frequency and the fluctuation phase difference of resource consumption. A level determination module, connected to the acquisition module, is used to determine the initial scheduling level based on the call load evolution mode, the growth gradient, and a preset level determination threshold group, wherein the call load evolution mode is determined based on the request arrival interval sequence and the request burstiness. A partitioning module, connected to the acquisition module, is used to further partition the stable operation phase of local skills under the initial scheduling level based on the bifurcation degree, wherein the stable operation phase is determined based on the state transition frequency. The disturbance determination module, which is connected to the acquisition module, is used to determine the resource coupling disturbance degree based on the fluctuation phase difference of each user terminal to be processed, and to correct it in combination with the backtracking depth to obtain the target disturbance degree. A state determination module, which is connected to a partitioning module, a disturbance determination module, and an acquisition module, is used to determine the scheduling evolution state of the local skill based on the results of the refined partitioning, the state transition frequency and bifurcation degree of the local skill during the stable operation phase, and the target disturbance degree. The phase determination module, which is connected to the state determination module and the acquisition module, is used to determine the corresponding station-level operation phase based on the state transition frequency, bifurcation degree and fluctuation phase difference of each super skill in the preset historical execution cycle. The super skill is acquired from the preset skill station based on the scheduling evolution state. An execution module, connected to a phase determination module, is used to filter target execution skills and perform scheduling based on the distribution characteristics of the station-level operation phase; The adjustment module, which is connected to the execution module and the level determination module, is used to adjust the preset level determination threshold group based on the feedback data corresponding to the execution scheduling.

[0021] In this embodiment, local skills are OpenClaw skill modules running within Docker containers on each user terminal. These modules contain executable algorithm logic, parameter configurations, and input / output interface specifications, enabling them to independently perform specific functions (such as data classification, feature extraction, and request response). Local skills interact with the hierarchical scheduling system through local skill agent programs, reporting call and execution data, and receiving super skill fragments from skill stations for self-updating. Preset skill stations refer to skill aggregation and evolution centers deployed on the server side, used to collect similar local skills from different user terminals, generate super skills through federated fusion evolution, and distribute super skill fragments to user terminals as needed. Skill stations communicate with user-terminal OpenClaw through encrypted channels, and each skill station corresponds to a specific functional domain or virtual runtime environment. Super skills are enhanced versions of skills obtained by federated fusion evolution of multiple similar local skills by the preset skill station, exhibiting higher call success rates and execution efficiency than any single local skill participating in the fusion. The acquisition of super skills from preset skill stations based on scheduling evolution states is as follows: When the scheduling evolution state output by the state determination module is the state to be merged, the user terminal OpenClaw sends a skill acquisition request to the preset skill station. The request includes the type label of the current local skill, the scheduling evolution state, and the runtime environment identifier. The preset skill station selects the corresponding super skill fragment from the super skill library that matches the received scheduling evolution state, and distributes it according to the feedback weight and feedback granularity. When the scheduling evolution state is a stable single state, a stable exploratory state, a slightly disturbed state, or a heavily disturbed state, the user terminal only calls from the locally cached super skills, or selects an existing super skill from the connected skill station according to the comprehensive index, without triggering a new fusion acquisition process, so as to avoid unnecessary network overhead and token consumption.

[0022] In this embodiment, the user terminal set refers to all user terminal devices that have deployed OpenClaw local skills and have been connected to the hierarchical scheduling system; the user terminal to be processed refers to the user terminal in the user terminal set that is currently active, has skill call requirements, and has not yet completed this scheduling evaluation. The acquisition module collects the call data and execution data generated by local skills during the operation of OpenClaw through local skill agent programs deployed in the Docker containers of each user terminal, either through periodic polling or event triggering.

[0023] In this embodiment, the request arrival interval sequence in the call data refers to the sequence formed by arranging the time intervals between two consecutive external call requests received by the local skill in chronological order, with the unit being milliseconds; the request burstiness refers to the ratio of the number of requests arriving within a unit time window to the average number of requests arriving within that window, reflecting the concentration of requests; the growth gradient of the input scale refers to the slope of the change in the amount of data processed by a single call of the local skill over multiple consecutive calls, characterizing the increasing or decreasing trend of the input load. The acquisition module intercepts the entry call of the local skill through a hook function, records the timestamp and input data volume of each call, calculates the time difference between adjacent requests to obtain the interval sequence, calculates the ratio of the request count within the sliding window to the mean to obtain the burstiness, and performs linear fitting on the input data volume of multiple consecutive calls to obtain the growth gradient.

[0024] In this embodiment, the branching degree of the execution path in the execution data refers to the ratio of the number of different paths actually executed by the conditional branch or function call branch during the execution of the local skill to the total number of branches, with a value ranging from 0 to 1; the backtracking depth of the execution path refers to the maximum number of stack backscrambling levels during recursive calls or nested loops, reflecting the complexity of the control flow; the state transition frequency refers to the number of times the local skill switches from one internal state to another per unit time, measured in times per second; the fluctuation phase difference of resource consumption refers to the phase offset between the timing waveform of the local skill consuming resources such as CPU, memory, or network bandwidth and the reference waveform, measured in radians or degrees. The acquisition module obtains the branching degree by instrumenting the local skill code or utilizing the resource monitoring interface of the Docker container, statistically analyzes the branch coverage, obtains the backtracking depth by tracking the call stack depth, records the number of state machine transitions and divides it by the time window to obtain the state transition frequency, and performs Fourier transform on each resource consumption timing data to extract the fundamental phase and compares it with the idle period reference phase to obtain the fluctuation phase difference.

[0025] The preset historical execution period refers to the length of the historical time window used to statistically analyze the state transition frequency, bifurcation degree, and fluctuation phase difference of each super skill. It depends on twice the maximum time span required for a super skill to complete a typical function execution and enter a stable state. It is usually set between 300 seconds and 1800 seconds. In this embodiment, it is set to 900 seconds to ensure that a sufficient number of state transition events and branch execution samples are collected, so that the statistical characteristics are representative and stable.

[0026] By collecting real-time data on request arrival intervals, request burstiness, and the growth gradient of input scale, as well as execution path bifurcation, backtracking depth, state transition frequency, and resource consumption fluctuation phase difference in execution data, a complete quantitative evaluation chain from load fluctuation to execution stability is constructed. The greater the load fluctuation and the faster the rate of change, the more the initial scheduling level tends to be towards the remote skill station layer, avoiding local resource overload. When the execution path bifurcation is low and state transitions are smooth, the stable operation phase is subdivided into single-trajectory sub-phases to match a stable single state. Combined with resource coupling disturbance degree and backtracking depth correction calculated by fluctuation phase difference, it can accurately distinguish between mild disturbances, severe disturbances, and even states awaiting fusion, ensuring that the scheduling evolution state strictly corresponds to the actual operational quality of the skill. The historical state transition frequency, bifurcation variance, and fluctuation phase difference range of super skills further characterize their station-level operational phases. The execution module calculates a comprehensive index based on stage weight coefficients, call success rate, and stage quantity proportion, prioritizing the execution of super skills with the highest comprehensive index, forming a self-consistent closed loop of load-driven layering, execution quality-driven state, and stage distribution-driven selection. This feedback data is also used to dynamically adjust the threshold group, enabling the system to continuously optimize scheduling decisions during long-term operation, ultimately significantly reducing the consumption of invalid tokens in OpenClaw and achieving efficient and adaptive hierarchical skill scheduling access.

[0027] Please see Figure 2 As shown, this is a schematic diagram of the hierarchy determination module in this embodiment. In this embodiment, the hierarchy determination module includes: The pattern determination unit is used to calculate the coefficient of variation of the request interval based on the request arrival interval sequence, generate a two-dimensional feature vector in combination with the request burstiness, and determine that the call load evolution pattern has occurred when the coefficient of variation is greater than a preset variation threshold and the request burstiness is less than a preset burst threshold. The load calculation unit is used to calculate the exponentially weighted product of the coefficient of variation and the request burstiness based on the determination result of the occurrence of the call load evolution pattern, so as to obtain the load fluctuation value. The gradient calculation unit is used to calculate the rate of change of the growth gradient within a preset time window based on the called load evolution mode, so as to obtain the load change rate. The level determination unit is used to determine the initial scheduling level based on the correspondence between the load fluctuation value, the load change rate and the preset level determination threshold group.

[0028] The preset variation threshold depends on the 75th percentile of the coefficient of variation requested by the user's OpenClaw local skill during a historical stable operating period, plus 0.2 times the standard deviation. It is usually set between 0.8 and 1.5. In this embodiment, it is set to 1.2, which can distinguish between random natural jitter and statistically significant discrete peak arrival patterns.

[0029] The preset burst threshold depends on the 30th percentile of the burst rate requested by the user's OpenClaw local skills under typical business load. It is usually set between 0.4 and 0.8. In this embodiment, it is set to 0.6, which can filter out normal short-term fluctuations. Only when the burst rate is lower than this threshold is it judged as sparse arrival, thus avoiding misjudging high-concurrency continuous streams as pulse patterns.

[0030] In calculating the exponentially weighted product of the coefficient of variation and the request burstiness, the preset variation weight depends on the nonlinear amplification requirement of the coefficient of variation in reflecting the intensity of discrete spikes during load fluctuations. It is determined by the elasticity coefficient between the logarithm of the coefficient of variation and the resource utilization rate in historical data, and is usually set between 0.6 and 1.0. In this embodiment, it is set to 0.8, which can effectively widen the gap between the moderate coefficient of variation and the low variation range after exponential amplification. The preset request weight depends on the adjustment of the request burstiness in the exponentially weighted product on the overall result. In order to ensure that the product does not decay excessively when the burstiness is low, its value is usually about 0.5 times the variation weight, and is usually set between 0.2 and 0.6. In this embodiment, it is set to 0.4, which can make the burstiness have a smooth effect on the product in the range of 0.2 to 0.8, and avoid extreme values ​​dominating the result.

[0031] Load fluctuations are quantified by an exponentially weighted product of the coefficient of variation and request burstiness, while the rate of change of the growth gradient characterizes the rate of load change. These two metrics respectively reflect the temporal unevenness of requests and the expansion trend of the input scale. When the coefficient of variation is large and the burstiness is small, it means that requests arrive in discrete spikes rather than continuous high concurrency. In this case, the exponentially weighted product effectively highlights this sparse, strong-pulse characteristic, avoiding confusion with stable high loads. The rate of load change captures the ability of the input scale to rise sharply in a short period, forming a two-dimensional judgment criterion together with the load fluctuation value. When the fluctuation value is low and the rate of change is slow, the system determines it to be a local execution layer, utilizing the local low-latency advantage. When the fluctuation value or rate of change is in a medium range, it is classified into a near-end cache layer to absorb disturbances. When either indicator exceeds a high threshold, it is directly upgraded to the remote skill station layer, relying on stronger computing resources to cope with the impact. This hierarchical mechanism creates an inherent match between the scheduling level and the temporal non-stationarity of the load and the pressure of scale expansion, thereby minimizing unnecessary calls to remote skill stations and reducing token consumption while ensuring real-time response.

[0032] Specifically, the hierarchy determination unit includes: The threshold comparison subunit is used to compare the load fluctuation value with the first fluctuation threshold and the second fluctuation threshold in the preset hierarchical judgment threshold group, and to compare the load change rate with the first rate threshold and the second rate threshold in the preset hierarchical judgment threshold group. The hierarchical mapping subunit is used to determine, based on the comparison results, whether the initial scheduling hierarchical mapping is a local execution layer, a near-end cache layer, or a remote skill station layer.

[0033] In this embodiment, the hierarchical mapping subunit is used to map the initial scheduling level to a local execution layer when the load fluctuation value is less than a first fluctuation threshold and the load change rate is less than a first rate threshold; to map the initial scheduling level to a near-end cache layer when the load fluctuation value is between the first fluctuation threshold and a second fluctuation threshold or the load change rate is between the first rate threshold and the second rate threshold; and to map the initial scheduling level to a remote skill station layer when the load fluctuation value is greater than or equal to the second fluctuation threshold or the load change rate is greater than or equal to the second rate threshold.

[0034] In this embodiment, the preset hierarchical judgment threshold group includes a first fluctuation threshold, a second fluctuation threshold, a first rate threshold, and a second rate threshold, wherein... The first fluctuation threshold depends on the statistical mean of the product of the 30th percentile of the coefficient of variation of the request interval and the burstiness of the request in the historical stable operation period of the user's OpenClaw local skill. It is usually set between 0.15 and 0.35. In this embodiment, it is set to 0.25, which can distinguish between stable load and slightly fluctuating load. When the load fluctuation value is less than this threshold, it is determined to be suitable for local execution layer scheduling.

[0035] The second fluctuation threshold depends on the statistical mean of the product of the 80th percentile of the coefficient of variation of the request interval and the request burstiness of the user-side OpenClaw local skill during historical overload or abnormal periods, plus one standard deviation. It is usually set between 0.55 and 0.85. In this embodiment, it is set to 0.70, which can identify significant fluctuations in load. When the load fluctuation value is greater than or equal to this threshold, it is determined that an upgrade to the remote skill station layer is required.

[0036] The first rate threshold depends on the 25th percentile of the rate of change of the growth gradient of the user-side OpenClaw local skill input scale every 10 seconds within a typical business cycle. It is obtained by statistically analyzing the rate of change of the ratio of the difference in data volume between two consecutive calls in historical data. It is usually set between 2.0 and 5.0 MB / s², and in this embodiment it is set to 3.5 MB / s², which can distinguish between slowly changing loads and moderately growing loads. When the load change rate is less than this threshold, it is determined to be suitable for local execution layer scheduling.

[0037] The second rate threshold depends on the 85th percentile of the rate of change of the user's OpenClaw local skill input scale growth gradient every 10 seconds within the burst traffic window, plus twice the absolute deviation. It is determined by analyzing the distribution of data volume acceleration in historical burst scenarios and is usually set between 8.0 and 15.0 MB / s². In this embodiment, it is set to 12.0 MB / s², which can identify rapidly increasing load. When the load change rate is greater than or equal to this threshold, it is determined that an upgrade to the remote skill station layer is required.

[0038] By dividing load fluctuation values ​​into low, medium, and high intervals and matching them with corresponding rate thresholds, a two-dimensional hierarchical scheduling mechanism based on request dispersion and input size growth rate is constructed. When the load fluctuation value is below the first fluctuation threshold and the growth rate is below the first rate threshold, the request flow approaches a Poisson steady flow and the input size does not significantly expand. At this time, the local execution layer is sufficient to handle the load, avoiding the additional latency and token overhead caused by remote calls. When either the load fluctuation value or the rate falls into the middle interval, it indicates that the request is experiencing intermittent spikes or the input size is gradually increasing. The near-end caching layer can absorb short-term fluctuations without escalating to the remote end. When either indicator exceeds the second threshold, it means that drastic fluctuations in request intervals and a rapid expansion of the input size occur simultaneously or independently. Local resources cannot handle this smoothly, and the remote skill station must intervene. This hierarchical mapping follows the inherent relationship between load intensity and system stability in queuing theory, as well as the exponential impact of the input size growth rate on processing resource requirements. Finally, by dynamically matching the scheduling level with real-time load characteristics, the system significantly reduces the frequency of invalid interactions between OpenClaw and the remote skill station without sacrificing response quality, thereby reducing token consumption.

[0039] Specifically, the partitioning module includes: The stable phase determination unit is used to mark the time period corresponding to the state transition frequency of the local skill being less than a preset frequency threshold as the stable operation phase. The refinement division unit is used to divide each of the stable operating phases along the time axis into several stable single trajectory sub-phases and several stable branch exploration sub-phases according to the temporal change rate of the bifurcation degree within the stable operating phase.

[0040] In this embodiment, the refinement division unit is used to determine the time period corresponding to the time when the time-series change rate of the bifurcation degree is lower than the first change threshold as a stable single trajectory sub-stage, and to determine the time period corresponding to the time when the time-series change rate of the bifurcation degree is between the first change threshold and the second change threshold as a stable branch exploration sub-stage.

[0041] The preset frequency threshold depends on the 40th percentile of the state transition frequency of the user-side OpenClaw local skill within a historical period without abnormal operation. It is obtained by collecting the number of state machine transitions per unit time under normal load and removing sudden disturbance samples. It is usually set between 0.05 and 0.15 times / second. In this embodiment, it is set to 0.10 times / second, which can filter random state jumps to identify the time window when the skill enters macroscopically stable operation.

[0042] The first change threshold depends on the 20th percentile of the rate of change of the bifurcation degree during the execution of a single function of the local skill. It is obtained by differential statistics on historical segments in which the branch paths remain basically unchanged during the stable operation phase. It is usually set between 0.01 and 0.05 rad / s². In this embodiment, it is set to 0.03 rad / s², which can identify the branchless state with highly consistent execution trajectory. When the rate of change of the bifurcation degree is lower than this threshold, it is determined to be a stable single trajectory sub-phase.

[0043] The second change threshold depends on the 70th percentile of the rate of change of the bifurcation degree during the allowed branch exploration period of the local skill. It is obtained by statistical analysis of the distribution of the fluctuation amplitude of the bifurcation degree during the normal branch exploration phase. It is usually set between 0.08 and 0.15 rad / s². In this embodiment, it is set to 0.12 rad / s², which can distinguish between moderate branch exploration and abnormal branch explosion. When the rate of change of the bifurcation degree is between the first change threshold and the second change threshold, it is determined to be a stable branch exploration sub-phase.

[0044] In this embodiment, the state transition frequency refers to the average number of times per second that a local skill switches from the current state to the next state in its internal finite state machine. The acquisition module records state transition events by instrumentation, accumulates the number of transitions within a preset time window, and divides the result by the window duration. The stable phase determination unit merges the time periods covered by multiple adjacent sampling points that continuously meet the state transition frequency less than a preset frequency threshold into a stable operating phase. When the time when the condition is not met continuously exceeds a preset intermittent tolerance duration, the stable operating phase is determined to end, and the subsequent time period that meets the condition again is marked as a new stable operating phase.

[0045] In this embodiment, the temporal rate of change of the bifurcation degree refers to the first derivative of the curve of the bifurcation degree changing with time, specifically calculated using the central difference method: the rate of change at time point t is equal to (the value of the bifurcation degree at time t+Δt minus the value of the bifurcation degree at time t-Δt) divided by twice Δt, where Δt is the sampling interval. The refinement division unit calculates the temporal rate of change of the bifurcation degree point by point in the stable operation phase using a sliding time window, with each sampling point corresponding to an instantaneous rate of change value; when the rate of change of multiple consecutive sampling points is lower than the first change threshold, the time period corresponding to these consecutive points is divided into a stable single trajectory sub-stage; when the rate of change of multiple consecutive sampling points is between the first change threshold and the second change threshold, it is divided into a stable branch exploration sub-stage; when the rate of change is greater than or equal to the second change threshold, it is regarded as an instantaneous bifurcation disturbance, and it is not divided into a separate sub-stage, but rather its adjacent sub-stages of the same type are merged, that is, the disturbance point is absorbed to the end of the previous sub-stage or the beginning of the next sub-stage.

[0046] In this embodiment, the boundaries of sub-stages are represented by timestamp intervals. Each sub-stage records its start time, end time, and sub-stage type, and stores these records in the user's local memory or a shared volume of a Docker container for the status determination module to read. When two consecutive adjacent sub-stages of the same type occur during a stable operation phase, the refinement unit automatically merges them into one sub-stage to avoid excessive fragmentation.

[0047] The stable phase is identified by filtering out state transition frequencies, and then further subdivided into single-trajectory sub-phases and branch exploration sub-phases based on the temporal change rate of the bifurcation degree. A low state transition frequency indicates sparse state machine switching within the skill, suggesting the system has moved beyond transient oscillations and entered a macroscopic stability window. Within this window, a bifurcation degree change rate below the first threshold means the execution path has almost no branches, with each call proceeding along the same code path, exhibiting high determinism. A bifurcation degree change rate between the two thresholds indicates moderate branch exploration, where the skill attempts different execution paths to seek optimization while remaining stable. This layered refinement from "whether it is stable" to "how it behaves after stabilization" essentially quantifies the skill's execution determinism into operable sub-phase labels, enabling subsequent state determination modules to distinguish between "conservatively executing stable single state" and "actively exploring stable exploratory state." This allows for the matching of differentiated disturbance response strategies to local skills with different evolutionary tendencies, improving the accuracy of scheduling decisions.

[0048] Specifically, the disturbance determination module includes: The phase difference statistics unit is used to calculate the root mean square of the fluctuation phase difference corresponding to each user terminal to be processed, so as to obtain the resource coupling disturbance degree. The backtracking depth correction unit is used to calculate a correction coefficient based on the backtracking depth. The correction coefficient is positively correlated with the backtracking depth and is used to correct the resource coupling disturbance degree in a product manner to obtain the target disturbance degree.

[0049] In this embodiment, the fluctuation phase difference refers to the phase offset of the time-series waveform of the same user terminal's local skill relative to the idle period reference waveform in three resource dimensions: CPU utilization, memory utilization, and network bandwidth utilization. These are denoted as θcpu, θmem, and θbw, respectively, in radians. The phase difference statistics unit first calculates the root mean square of these three phase differences within the same user terminal, i.e., √(θcpu). 2 +θmem 2 +θbw 2 The root mean square of the single-ended perturbation degree of the user terminal is calculated as 3 / 3. Then, the root mean square of the single-ended perturbation degree of each user terminal to be processed is calculated again to obtain the resource coupling perturbation degree Draw, which reflects the resource coupling degree of the entire user terminal set. When there is only one user terminal to be processed, the resource coupling perturbation degree is directly equal to the single-ended perturbation degree of that user terminal.

[0050] In this embodiment, the correction coefficient calculation formula used by the backtracking depth correction unit is: k = 1 + β × ln(1 + d), where d is the backtracking depth of the execution path provided by the acquisition module, in layers, and β is the preset depth gain coefficient. This logarithmic form ensures that the correction coefficient increases significantly when the backtracking depth is shallow, and gradually flattens out after the depth exceeds 5 layers, avoiding the unbounded correction coefficient due to excessive depth. The value of β ranges from 0.2 to 0.6, and is 0.4 in this embodiment. When the backtracking depth d = 0, k = 1; when d = 3, k ≈ 1 + 0.4 × 1.386 = 1.554; when d = 10, k ≈ 1 + 0.4 × 2.398 = 1.959, and never exceeds 2. The target perturbation degree Dtarget = Draw × k.

[0051] In this embodiment, if no recursion or nested loops occur on the user side during the execution cycle, the backtracking depth is directly set to 0; if multiple levels of calls exist, the backtracking depth is the maximum value within a preset time window. All calculations are completed within the user-side Docker container, and the results are stored in floating-point form and reported to the status determination module.

[0052] The resource coupling perturbation degree is obtained by calculating the root mean square (RMS) of the phase difference between resource usage fluctuations at each user terminal. A larger RMS value indicates a more significant phase misalignment between the time-series waveforms of different resources, and a stronger mutual constraint and competition among resources. The backtracking depth of the execution path represents the level of recursion or nested loops; a deeper level means more stack resources are used in a single call, higher context switching costs, and greater sensitivity to resource fluctuations. Multiplying the resource coupling perturbation degree by a correction coefficient positively correlated with the backtracking depth ensures that the final target perturbation degree reflects both the degree of coordination misalignment among multiple resources and the amplification effect of control flow complexity on perturbations. This joint quantification method ensures the physical consistency between the perturbation assessment and the actual operating environment of the skill, providing a realistic and comparable numerical basis for the target perturbation degree to participate in subsequent state corrections.

[0053] Specifically, the state determination module includes: A sub-stage matching unit is used to match the stable single trajectory sub-stage with a preset evolutionary state table based on the state transition frequency and the bifurcation degree to obtain a stable single state, and to match the stable branch exploration sub-stage with a preset evolutionary state mapping table to obtain a stable exploration state, wherein the preset evolutionary state table includes a stable single state, a stable exploration state, a slightly perturbed state, a heavily perturbed state, and a state to be merged. The perturbation weighting unit is configured to: correct the stable single state to the slightly perturbed state when the target perturbation degree is between a first perturbation threshold and a second perturbation threshold; correct the stable single state to the heavily perturbed state and the stable exploration state to the slightly perturbed state when the target perturbation degree is greater than or equal to the second perturbation threshold and the backtracking depth is less than a preset depth threshold; and correct the stable single state to the state to be fused and the stable exploration state to the heavily perturbed state when the target perturbation degree is greater than or equal to the second perturbation threshold and the backtracking depth is greater than or equal to the preset depth threshold.

[0054] In this embodiment, the preset evolutionary state mapping table is set based on the following: when the state transition frequency is less than 0.08 times / second and the bifurcation degree is less than 0.25, the skill execution has neither obvious state switching nor branch divergence. Even if the partitioning module marks it as a stable branch exploration sub-stage, the actual behavior is still close to a single trajectory, so a stable single state should be output. Conversely, if either the state transition frequency or the bifurcation degree exceeds the corresponding threshold, even if the partitioning module marks it as a stable single trajectory sub-stage, the skill has already shown significant fluctuations or branches, and it should no longer be regarded as a stable single state, but a stable exploration state should be output. The thresholds of 0.08 times / second and 0.25 are taken from the 65th percentile of the state transition frequency and bifurcation degree in a large number of normal operation samples, which can balance the risk of missed judgment and false judgment, and ensure the consistency between the baseline evolutionary state and the actual operation quality.

[0055] Preset Evolutionary State Mapping Table

[0056] The first perturbation threshold depends on the 60th percentile of the target perturbation degree of the user's OpenClaw local skill during the historical normal operation cycle. It is obtained by collecting the target perturbation degree of each user during the period without abnormal reports and sorting the values ​​at the 60th percentile. It is usually set between 0.25 and 0.45. In this embodiment, it is set to 0.35, which can identify the critical point at which the perturbation begins to have a slight impact on the stability of the skill. When the target perturbation degree exceeds this threshold, it is determined that a correction from a stable state to a slightly perturbation state is required.

[0057] The second perturbation threshold depends on the 85th percentile of the target perturbation degree of the user-side OpenClaw local skill within a historical period of mild anomalies. It is obtained by collecting statistics on the target perturbation degree during periods when there is a brief response delay or local call failure but no global fault is triggered. It is usually set between 0.65 and 0.85. In this embodiment, it is set to 0.75, which can distinguish between tolerable moderate perturbations and severe perturbations that require upgrade processing. When the target perturbation degree reaches or exceeds this threshold, it is determined that it needs to be corrected to a severe perturbation state or a state to be fused.

[0058] The preset depth threshold depends on the 80th percentile of the backtracking depth of the user's OpenClaw local skills in typical recursive or nested loop scenarios. It is obtained by statistically analyzing the distribution of the maximum function call stack depth in normal business loads and is usually set between 3 and 6 layers. In this embodiment, it is set to 4 layers, which can determine whether the current control flow complexity has exceeded the normal range. When the backtracking depth reaches or exceeds this threshold, it is determined that the stable single state needs to be corrected to the state to be merged or the stable exploratory state needs to be corrected to the heavily perturbed state.

[0059] By first matching the stable single-trajectory sub-stage to a stable single state and the stable branch exploration sub-stage to a stable exploration state, the basic behavioral patterns of the skill on the current execution path are distinguished. The disturbance weighting unit introduces the target disturbance degree and backtracking depth as correction criteria. The stable single state, due to its highly consistent execution path and low branch redundancy, is more sensitive to external resource disturbances and the control flow complexity brought about by deep nesting. Therefore, it is corrected to a mild disturbance state under moderate disturbances, upgraded to a severe disturbance state under strong disturbances and shallow backtracking depth, and directly judged as a state to be merged under strong disturbances and excessive backtracking depth, meaning that the current skill can hardly maintain stable execution independently. On the other hand, the stable exploration state is itself in branch exploration and has a stronger tolerance for disturbances. Under the same disturbance conditions, it only maintains the original state under moderate disturbances and is downgraded to a mild or severe disturbance state under strong disturbances. This differentiated correction mechanism follows the inherent relationship between the robustness of the system and the current operating point in the control system: the system in the high-redundancy exploration state has a naturally stronger ability to suppress disturbances than the system in the single-trajectory state. By incorporating the target perturbation degree and backtracking depth into the judgment, the scheduling evolution state can simultaneously reflect the intensity of resource coupling interference and the complexity of the skill's own control flow, ultimately ensuring that the state output strictly corresponds to the actual operational quality, providing an accurate premise for the subsequent selection of suitable super skills.

[0060] Specifically, the stage determination module includes: The feature calculation unit is used to calculate the average value of the state transition frequency of each super skill based on the preset historical execution cycle to obtain a first feature value, and to calculate the variance of the bifurcation degree to obtain a second feature value, and to calculate the range of the fluctuation phase difference to obtain a third feature value. The stage determination unit is used to determine, based on the threshold comparison results of the first feature value, the second feature value, and the third feature value, whether the station-level operation stage of the super skill is a high-frequency stable stage, a low-frequency stable stage, a high-frequency branch stage, or a low-frequency branch stage.

[0061] In this embodiment, the stage determination unit is used to determine that the station-level operation stage is a high-frequency stable stage when the first feature value is greater than or equal to the first frequency threshold and the second feature value is less than the second variance threshold; and to determine that the station-level operation stage is a low-frequency stable stage when the first feature value is less than the first frequency threshold and the second feature value is less than the second variance threshold; and to determine that the station-level operation stage is a high-frequency branch stage when the first feature value is greater than or equal to the first frequency threshold and the second feature value is greater than or equal to the second variance threshold; and to determine that the station-level operation stage is a low-frequency branch stage when the first feature value is less than the first frequency threshold and the second feature value is greater than or equal to the second variance threshold. The third feature value is used to correct the determination: when the third feature value is greater than the third range threshold, the high-frequency stable stage is downgraded to a low-frequency stable stage, and the high-frequency branch stage is downgraded to a low-frequency branch stage.

[0062] The first frequency threshold depends on the 50th percentile of the average state transition frequency of each super skill within a preset historical execution cycle. It is obtained by statistically analyzing the median of the historical state transition frequency distribution of all super skills in the system. It is usually set between 0.10 and 0.30 times / second. In this embodiment, it is set to 0.20 times / second, which can divide super skills into two categories: those with frequent active state transitions and those with sparse state transitions, providing a benchmark for distinguishing between high-frequency and low-frequency stages.

[0063] The second variance threshold depends on the 65th percentile of the bifurcation variance of each super skill within a preset historical execution period. It is obtained by sorting the variance of the statistical distribution of branch stability under normal execution conditions. It is usually set between 0.05 and 0.15. In this embodiment, it is set to 0.10, which can distinguish between concentrated and divergent execution paths, thereby determining whether a super skill is stable or branching.

[0064] The third range threshold depends on the 80th percentile of the range of the fluctuation phase difference of each super skill within a preset historical execution cycle. It is obtained by statistically analyzing the range distribution of the phase offset of the resource occupation waveform. It is usually set between 1.20 and 2.00 radians. In this embodiment, it is set to 1.60 radians to identify super skills with a high degree of resource coupling disorder. When the range exceeds this threshold, it indicates that the phase of the multi-resource waveform is seriously misaligned, and the originally determined high-frequency stage needs to be downgraded to the corresponding low-frequency stage.

[0065] By using a two-dimensional division based on the first and second eigenvalues, the operational quality of super skills is categorized into four quadrants: stable / branching and high-frequency / low-frequency. The mean frequency reflects the skill's execution activity, while the variance of the bifurcation degree reflects the divergent stability of the execution path. Together, these two factors determine the basic operational stage of the super skill. The third eigenvalue serves as a correction factor; a large range indicates significant fluctuations in the temporal waveform of resource consumption across different dimensions, suggesting a misalignment of multi-resource coupling. In this case, even if initially classified as high-frequency stable or high-frequency branching, it should be downgraded to the corresponding low-frequency stage, as resource phase disorder weakens the skill's actual ability to maintain high-frequency stability or high-frequency branching. This judgment logic—first classifying based on frequency and bifurcation degree, then downgrading based on resource fluctuation consistency—enables the station-level operational stage to comprehensively reflect the super skill's execution activity, path stability, and resource coordination health. This provides the execution module with reliable stage labels for selecting target skills, thereby improving the accuracy of scheduling decisions.

[0066] Please see Figure 3 As shown, this is a schematic diagram of the execution module in this embodiment. In this embodiment, the execution module includes: The distribution statistics unit is used to count the proportion of each station-level operation stage among the currently available super skills, and to obtain the call success rate of each super skill in the preset historical execution cycle. The index calculation unit is used to calculate the comprehensive index of each super skill. The comprehensive index is equal to the product of the preset stage weight coefficient corresponding to the current station-level operation stage of each super skill and the call success rate, divided by the quantity ratio. The preset stage weight coefficient corresponding to the high-frequency stable stage is greater than the preset stage weight coefficient corresponding to the low-frequency stable stage, the preset stage weight coefficient corresponding to the low-frequency stable stage is greater than the preset stage weight coefficient corresponding to the high-frequency branch stage, and the preset stage weight coefficient corresponding to the high-frequency branch stage is greater than the preset stage weight coefficient corresponding to the low-frequency branch stage. A filtering unit is used to select the super skill with the highest comprehensive index as the target execution skill; The scheduling execution unit is used to send the identifier of the target execution skill to the corresponding OpenClaw on the user terminal to be processed, and to trigger the local skill to call the target execution skill through the API gateway of the Docker container.

[0067] In this embodiment, when the distributed statistics unit calculates the proportion of each station-level operation phase among the currently available super skills, it first calculates the number of super skills included in each of the high-frequency stable phase, low-frequency stable phase, high-frequency branch phase, and low-frequency branch phase. Then, it divides the number of skills in each phase by the total number of currently available super skills to obtain the proportion of each phase. If the total number of currently available super skills is zero, all proportions are set to zero, and no subsequent scheduling is performed.

[0068] In this embodiment, the call success rate refers to the ratio of the number of times each super skill was successfully called within a preset historical execution period to the total number of calls. The distribution statistics unit extracts the call success records of each super skill from the call data collected by the acquisition module, or obtains the data from the locally maintained historical call log. If a super skill has never been called within the preset historical execution period, its call success rate is set to the default value of 0.5 to avoid the comprehensive index being zero due to a lack of historical data, thus preventing it from being selected.

[0069] In this embodiment, the index calculation unit calculates the comprehensive index of each super skill according to the following formula: the comprehensive index equals the stage weight coefficient multiplied by the success rate of the call, divided by the proportion of the stage to which the super skill belongs. When the proportion is zero, the comprehensive index of the super skill is directly set to zero. The comprehensive index is retained to four decimal places for subsequent sorting and comparison.

[0070] In this embodiment, when selecting the super skill with the highest comprehensive index, if multiple super skills have the same comprehensive index, the filtering unit further compares their call success rates and selects the super skill with the higher call success rate. If the call success rates are also equal, the filtering unit compares their stage weight coefficients and selects the super skill with the higher weight coefficient. If they are still equal, one is randomly selected and logged. After filtering, the identifier of the selected target execution skill is passed to the scheduling execution unit.

[0071] In this embodiment, the scheduling execution unit issues scheduling instructions through the API gateway of the Docker container. The instructions include the identifier of the target execution skill, the call parameters, and the timeout period. After receiving the instructions, the local skill loads the target execution skill into the container and executes it. The execution result is returned to the scheduling execution unit through the API gateway, and then the scheduling execution unit feeds back to the upper-layer application that initiated the call. If the target execution skill call fails, such as due to a timeout or an error code, the scheduling execution unit automatically downgrades and selects the skill with the second highest comprehensive index from the remaining super skills for execution, retrying a maximum of two times. If both retries fail, a call failure response is returned, and the adjustment module is triggered to record the exception.

[0072] The preset stage weight coefficient corresponding to the high-frequency stable stage depends on the fact that the super skill in this stage has the dual advantages of high-frequency calling and stable execution. It should be given the highest scheduling priority and is usually set between 0.8 and 1.0. In this embodiment, it is set to 0.9, which can ensure that stable and active skills are selected for execution first.

[0073] The preset stage weight coefficient corresponding to the low-frequency stable stage depends on the fact that stable skills are still superior to any branching skills even if the call frequency is low. The critical separation point between stable and branching skills is determined by sorting experiments. It is usually set between 0.5 and 0.7. In this embodiment, it is set to 0.6, which enables low-frequency stable skills to be scheduled before high-frequency branching skills.

[0074] The preset stage weight coefficient corresponding to the high-frequency branch stage depends on the fact that the high-frequency call in the branch-type skill can partially compensate for the path instability, but is lower than that of the stable type. The distinction between high and low within the branch type is determined by comparative testing. It is usually set between 0.3 and 0.5. In this embodiment, it is set to 0.4, which can make the high-frequency branch skill take priority over the low-frequency branch skill but lag behind all stable skills.

[0075] The preset stage weight coefficient corresponding to the low-frequency branch stage depends on the divergent skill execution path and sparse call in this stage, which has the lowest scheduling value. It is usually set between 0.1 and 0.3. In this embodiment, it is set to 0.2, which can be selected as the lowest priority only when better skills are unavailable.

[0076] The comprehensive index considers stage weight coefficients, call success rates, and stage quantity proportions simultaneously: the stage weight coefficient reflects the scheduling preference of stable skills over branching skills and high-frequency skills over low-frequency skills; the call success rate directly reflects the historical service quality of a skill; and the quantity proportion, as the denominator, is used to suppress resource contention and cache competition caused by a large number of skills being selected frequently in popular stages. High-frequency stable stages have the highest weight, but if their quantity proportion is too large, the comprehensive index of individual skills will be appropriately lowered, allowing skills with extremely high call success rates in low-frequency stable stages to be selected, thus creating a natural balance between skill quality, stage preference, and cluster load. The filtering unit selects the skill with the highest comprehensive index for execution, which can dynamically balance the utilization rate of skills in each stage while ensuring service quality, avoiding overload of a few hot skills, and reducing the additional token overhead caused by invalid or inefficient calls, achieving synergistic optimization of scheduling efficiency and service stability.

[0077] Specifically, the adjustment module includes: The feedback collection unit is used to collect the changes in token consumption, call success rate, and average response latency of the OpenClaw client to be processed after execution scheduling. The threshold adjustment unit is used to adjust the first fluctuation threshold, the second fluctuation threshold, the first rate threshold and the second rate threshold in the preset hierarchical judgment threshold group according to the deviation between the token consumption change and the preset saving target.

[0078] In this embodiment, the feedback collection unit, through a local skill agent program deployed within each user's Docker container, records the cumulative token consumption, the number of successful calls, the total number of calls, and the average response latency per call within a preset feedback period after each scheduling execution. The difference between the corresponding values ​​of the later period and the earlier period is used as the change in token consumption, the change in call success rate, and the change in average response latency. Token consumption is obtained by summing the input and output character counts in the OpenClaw API call log; the call success rate is calculated by dividing the number of successful calls by the total number of calls; and the average response latency is obtained by taking the arithmetic mean of the time taken for all calls from initiation to receipt of a complete response. The collected changes are temporarily stored locally on the user's device in floating-point form and reported to the adjustment module with the next scheduling request.

[0079] In this embodiment, when the token consumption change increases, the threshold adjustment unit increases the first fluctuation threshold and the first rate threshold according to the product of the deviation and the preset adjustment step size, so that more tasks are identified as local execution layers. When the token consumption change decreases and is lower than the preset token change threshold, the threshold adjustment unit decreases the first fluctuation threshold and the first rate threshold according to the product of the absolute value of the deviation and the preset adjustment step size, so that more tasks are upgraded to the near-end cache layer or the far-end skill station layer.

[0080] The preset saving target depends on the expected reduction in token consumption of the OpenClaw system within a unit monitoring period. It is determined by analyzing the difference between the historical average token consumption and the lower limit of acceptable resource overhead for the business. It is usually set between 10% and 25%. In this embodiment, it is set to 15%, which can serve as a benchmark reference point for threshold adjustment. When the actual token consumption changes deviate from this target, the corresponding threshold increase or decrease operation is triggered.

[0081] The preset adjustment step size depends on the minimum change applied to the first fluctuation threshold and the first rate threshold in a single adjustment. It is determined by the minimum increment required for the system to converge to a stable scheduling state in simulation tests. It is usually set between 0.01 and 0.05. In this embodiment, it is set to 0.03, which can ensure the response sensitivity to token consumption deviation while avoiding drastic threshold oscillations.

[0082] The preset token change threshold depends on the minimum decrease in token consumption that the user-side OpenClaw can accept within a unit monitoring period. It is obtained by analyzing the random fluctuation of token consumption during normal operation in history and taking three times its standard deviation. It is usually set between 5% and 15%. In this embodiment, it is set to 10%, which can distinguish between effective savings and normal fluctuations. The threshold is only lowered when the reduction in token consumption exceeds this threshold.

[0083] By collecting data on changes in token consumption, call success rate, and average response latency as feedback, and using the deviation of token consumption from a preset saving target as the core driving factor: when token consumption increases, it indicates that the current scheduling level is too aggressive, with too many tasks being sent to remote skill stations or near-end cache layers, leading to increased additional token overhead. In this case, the first fluctuation threshold and the first rate threshold are increased, causing more tasks to be determined as local execution layers, using local processing to eliminate unnecessary outgoing tokens. When token consumption decreases and is below the preset saving target, it indicates that the system has spare capacity to handle more tasks. The first fluctuation threshold and the first rate threshold are appropriately reduced, upgrading some tasks to the near-end cache layer or remote skill station layer to achieve higher call success rates and lower response latency. This threshold adjustment strategy, which takes token consumption deviation as the guiding principle and considers both success rate and latency changes, ensures that the boundary of the scheduling level dynamically shifts with actual operational performance, thereby continuously approaching the optimal working point in the trade-off between token saving and service quality, ultimately achieving adaptive optimization of OpenClaw's overall token consumption.

[0084] Please see Figure 4 As shown, this is a flowchart of the OpenClaw access method for hierarchical skill scheduling in this embodiment. Furthermore, this embodiment also provides an OpenClaw access method for hierarchical skill scheduling, including: Real-time acquisition of local skill call data and execution data of each pending user in the user set during the OpenClaw operation. The call data includes the request arrival interval sequence, request burstiness and the growth gradient of the input scale. The execution data includes the branching degree of the execution path, the backtracking depth of the execution path, the state transition frequency and the fluctuation phase difference of resource consumption. The initial scheduling level is determined based on the call load evolution mode, the growth gradient, and the preset level determination threshold group, wherein the call load evolution mode is determined based on the request arrival interval sequence and the request burstiness. The stable operation phase of local skills under the initial scheduling level is further divided based on the bifurcation degree, wherein the stable operation phase is determined based on the state transition frequency. The resource coupling disturbance degree is determined based on the fluctuation phase difference of each user terminal to be processed, and then corrected by combining the backtracking depth to obtain the target disturbance degree. Based on the results of the refined division, the state transition frequency and bifurcation degree of the local skill during the stable operation phase, and the target perturbation degree, the scheduling evolution state of the local skill is determined. The corresponding station-level operation stage is determined based on the state transition frequency, bifurcation degree, and fluctuation phase difference of each super skill in the preset historical execution cycle. The super skill is obtained from the preset skill station based on the scheduling evolution state. Based on the distribution characteristics of the station-level operation phase, target execution skills are selected and scheduling is performed; The preset level judgment threshold group is adjusted based on the feedback data corresponding to the execution scheduling.

[0085] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An OpenClaw access system for hierarchical skill scheduling, characterized in that, include: The acquisition module is used to acquire in real time the local skill call data and execution data of each user terminal to be processed in the user terminal set during the OpenClaw operation. The call data includes the request arrival interval sequence, request burstiness and the growth gradient of the input scale, and the execution data includes the branching degree of the execution path, the backtracking depth of the execution path, the state transition frequency and the fluctuation phase difference of resource consumption. The level determination module is used to determine the initial scheduling level based on the call load evolution mode, the growth gradient and the preset level determination threshold group, wherein the call load evolution mode is determined based on the request arrival interval sequence and the request burstiness. A partitioning module is used to further partition the stable operation phase of local skills under the initial scheduling level based on the bifurcation degree, wherein the stable operation phase is determined based on the state transition frequency. The disturbance determination module is used to determine the resource coupling disturbance degree based on the fluctuation phase difference of each user terminal to be processed, and to correct it in combination with the backtracking depth to obtain the target disturbance degree. A state determination module is used to determine the scheduling evolution state of the local skill based on the results of the refined division, the state transition frequency and bifurcation degree of the local skill during the stable operation phase, and the target perturbation degree. The phase determination module is used to determine the corresponding station-level operation phase based on the state transition frequency, bifurcation degree and fluctuation phase difference of each super skill in the preset historical execution cycle. The super skill is obtained from the preset skill station based on the scheduling evolution state. The execution module is used to filter target execution skills and perform scheduling based on the distribution characteristics of the station-level operation phase; The adjustment module is used to adjust the preset level judgment threshold group based on the feedback data corresponding to the execution scheduling.

2. The OpenClaw access system for hierarchical skill scheduling according to claim 1, characterized in that, The hierarchy determination module includes: The pattern determination unit is used to calculate the coefficient of variation of the request interval based on the request arrival interval sequence, generate a two-dimensional feature vector in combination with the request burstiness, and determine that the call load evolution pattern has occurred when the coefficient of variation is greater than a preset variation threshold and the request burstiness is less than a preset burst threshold. The load calculation unit is used to calculate the exponentially weighted product of the coefficient of variation and the request burstiness based on the determination result of the occurrence of the call load evolution pattern, so as to obtain the load fluctuation value. The gradient calculation unit is used to calculate the rate of change of the growth gradient within a preset time window based on the called load evolution mode, so as to obtain the load change rate. The level determination unit is used to determine the initial scheduling level based on the correspondence between the load fluctuation value, the load change rate and the preset level determination threshold group.

3. The OpenClaw access system for hierarchical skill scheduling according to claim 2, characterized in that, The hierarchy determination unit includes: The threshold comparison subunit is used to compare the load fluctuation value with the first fluctuation threshold and the second fluctuation threshold in the preset hierarchical judgment threshold group, and to compare the load change rate with the first rate threshold and the second rate threshold in the preset hierarchical judgment threshold group. The hierarchical mapping subunit is used to determine, based on the comparison results, whether the initial scheduling hierarchical mapping is a local execution layer, a near-end cache layer, or a remote skill station layer.

4. The OpenClaw access system for hierarchical skill scheduling according to claim 3, characterized in that, The partitioning module includes: The stable phase determination unit is used to mark the time period corresponding to the state transition frequency of the local skill being less than a preset frequency threshold as the stable operation phase. The refinement division unit is used to divide each of the stable operating phases along the time axis into several stable single trajectory sub-phases and several stable branch exploration sub-phases according to the temporal change rate of the bifurcation degree within the stable operating phase.

5. The OpenClaw access system for hierarchical skill scheduling according to claim 4, characterized in that, The disturbance determination module includes: The phase difference statistics unit is used to calculate the root mean square of the fluctuation phase difference corresponding to each user terminal to be processed, so as to obtain the resource coupling disturbance degree. The backtracking depth correction unit is used to calculate a correction coefficient based on the backtracking depth. The correction coefficient is positively correlated with the backtracking depth and is used to correct the resource coupling disturbance degree in a product manner to obtain the target disturbance degree.

6. The OpenClaw access system for hierarchical skill scheduling according to claim 5, characterized in that, The status determination module includes: A sub-stage matching unit is used to match the stable single trajectory sub-stage with a preset evolutionary state table based on the state transition frequency and the bifurcation degree to obtain a stable single state, and to match the stable branch exploration sub-stage with a preset evolutionary state mapping table to obtain a stable exploration state, wherein the preset evolutionary state table includes a stable single state, a stable exploration state, a slightly perturbed state, a heavily perturbed state, and a state to be merged. The perturbation weighting unit is configured to: correct the stable single state to the slightly perturbed state when the target perturbation degree is between a first perturbation threshold and a second perturbation threshold; correct the stable single state to the heavily perturbed state and the stable exploration state to the slightly perturbed state when the target perturbation degree is greater than or equal to the second perturbation threshold and the backtracking depth is less than a preset depth threshold; and correct the stable single state to the state to be fused and the stable exploration state to the heavily perturbed state when the target perturbation degree is greater than or equal to the second perturbation threshold and the backtracking depth is greater than or equal to the preset depth threshold.

7. The OpenClaw access system for hierarchical skill scheduling according to claim 6, characterized in that, The stage determination module includes: The feature calculation unit is used to calculate the average value of the state transition frequency of each super skill based on the preset historical execution cycle to obtain a first feature value, and to calculate the variance of the bifurcation degree to obtain a second feature value, and to calculate the range of the fluctuation phase difference to obtain a third feature value. The stage determination unit is used to determine, based on the threshold comparison results of the first feature value, the second feature value, and the third feature value, whether the station-level operation stage of the super skill is a high-frequency stable stage, a low-frequency stable stage, a high-frequency branch stage, or a low-frequency branch stage.

8. The OpenClaw access system for hierarchical skill scheduling according to claim 7, characterized in that, The execution module includes: The distribution statistics unit is used to count the proportion of each station-level operation stage among the currently available super skills, and to obtain the call success rate of each super skill in the preset historical execution cycle. The index calculation unit is used to calculate the comprehensive index of each super skill. The comprehensive index is equal to the product of the preset stage weight coefficient corresponding to the current station-level operation stage of each super skill and the call success rate, divided by the quantity ratio. The preset stage weight coefficient corresponding to the high-frequency stable stage is greater than the preset stage weight coefficient corresponding to the low-frequency stable stage, the preset stage weight coefficient corresponding to the low-frequency stable stage is greater than the preset stage weight coefficient corresponding to the high-frequency branch stage, and the preset stage weight coefficient corresponding to the high-frequency branch stage is greater than the preset stage weight coefficient corresponding to the low-frequency branch stage. A filtering unit is used to select the super skill with the highest comprehensive index as the target execution skill; The scheduling execution unit is used to send the identifier of the target execution skill to the corresponding OpenClaw on the user terminal to be processed, and to trigger the local skill to call the target execution skill through the API gateway of the Docker container.

9. The OpenClaw access system for hierarchical skill scheduling according to claim 8, characterized in that, The adjustment module includes: The feedback collection unit is used to collect the changes in token consumption, call success rate, and average response latency of the OpenClaw client to be processed after execution scheduling. The threshold adjustment unit is used to adjust the first fluctuation threshold, the second fluctuation threshold, the first rate threshold and the second rate threshold in the preset hierarchical judgment threshold group according to the deviation between the token consumption change and the preset saving target.

10. A hierarchical skill scheduling OpenClaw access method, applied to the hierarchical skill scheduling OpenClaw access system according to any one of claims 1-9, characterized in that, include: Real-time acquisition of local skill call data and execution data of each pending user in the user set during the OpenClaw operation. The call data includes the request arrival interval sequence, request burstiness and the growth gradient of the input scale. The execution data includes the branching degree of the execution path, the backtracking depth of the execution path, the state transition frequency and the fluctuation phase difference of resource consumption. The initial scheduling level is determined based on the call load evolution mode, the growth gradient, and the preset level determination threshold group, wherein the call load evolution mode is determined based on the request arrival interval sequence and the request burstiness. The stable operation phase of local skills under the initial scheduling level is further divided based on the bifurcation degree, wherein the stable operation phase is determined based on the state transition frequency. The resource coupling disturbance degree is determined based on the fluctuation phase difference of each user terminal to be processed, and then corrected by combining the backtracking depth to obtain the target disturbance degree. Based on the results of the refined division, the state transition frequency and bifurcation degree of the local skill during the stable operation phase, and the target perturbation degree, the scheduling evolution state of the local skill is determined. The corresponding station-level operation stage is determined based on the state transition frequency, bifurcation degree, and fluctuation phase difference of each super skill in the preset historical execution cycle. The super skill is obtained from the preset skill station based on the scheduling evolution state. Based on the distribution characteristics of the station-level operation phase, target execution skills are selected and scheduling is performed; The preset level judgment threshold group is adjusted based on the feedback data corresponding to the execution scheduling.